public class JNIEncoder extends net.sf.fmj.media.AbstractCodec implements RTCPFeedbackMessageListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
AVAILABLE_PRESETS
The available presets we can use with the encoder.
|
static java.lang.String |
BASELINE_PROFILE
The name of the baseline H.264 (encoding) profile.
|
static boolean |
DEFAULT_DEFAULT_INTRA_REFRESH
The default value of the
DEFAULT_INTRA_REFRESH_PNAME
ConfigurationService property. |
static java.lang.String |
DEFAULT_DEFAULT_PROFILE
The default value of the
DEFAULT_PROFILE_PNAME
ConfigurationService property. |
static int |
DEFAULT_FRAME_RATE
The frame rate to be assumed by JNIEncoder instances in the
absence of any other frame rate indication.
|
static java.lang.String |
DEFAULT_INTRA_REFRESH_PNAME
The name of the boolean ConfigurationService property which
specifies whether Periodic Intra Refresh is to be used by default.
|
static int |
DEFAULT_KEYINT
The default maximum GOP (group of pictures) size i.e.
|
static java.lang.String |
DEFAULT_PRESET
The default value of the
PRESET_PNAME
ConfigurationService property. |
static java.lang.String |
DEFAULT_PROFILE_PNAME
The name of the ConfigurationService property which specifies
the H.264 (encoding) profile to be used in the absence of negotiation.
|
static java.lang.String |
HIGH_PROFILE
The name of the high H.264 (encoding) profile.
|
static java.lang.String |
KEYINT_PNAME
The name of the integer ConfigurationService property which
specifies the maximum GOP (group of pictures) size i.e.
|
static java.lang.String |
MAIN_PROFILE
The name of the main H.264 (encoding) profile.
|
static java.lang.String |
PRESET_PNAME
The name of the ConfigurationService property which specifies
the x264 preset to be used by JNIEncoder.
|
(package private) static javax.media.Format[] |
SUPPORTED_OUTPUT_FORMATS
The list of Formats supported by JNIEncoder instances
as output.
|
static int |
X264_KEYINT_MAX_INFINITE |
static int |
X264_KEYINT_MIN_AUTO |
Constructor and Description |
---|
JNIEncoder()
Initializes a new JNIEncoder instance.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this Codec.
|
java.lang.String |
getName()
Gets the name of this Codec.
|
javax.media.Format[] |
getSupportedOutputFormats(javax.media.Format in)
Returns the list of formats supported at the output.
|
void |
open()
Opens this Codec.
|
int |
process(javax.media.Buffer inBuffer,
javax.media.Buffer outBuffer)
Processes/encodes a buffer.
|
void |
rtcpFeedbackMessageReceived(RTCPFeedbackMessageEvent ev)
Notifies this RTCPFeedbackListener that an RTCP feedback message
has been received
|
void |
setAdditionalCodecSettings(java.util.Map<java.lang.String,java.lang.String> additionalCodecSettings)
Sets additional settings on this Codec.
|
javax.media.Format |
setInputFormat(javax.media.Format format)
Sets the Format of the media data to be input to this
Codec.
|
void |
setKeyFrameControl(KeyFrameControl keyFrameControl)
Sets the KeyFrameControl to be used by this
JNIEncoder as a means of control over its key frame-related
logic.
|
javax.media.Format |
setOutputFormat(javax.media.Format format)
Sets the Format in which this Codec is to output media
data.
|
void |
setPacketizationMode(java.lang.String packetizationMode)
Sets the packetization mode to be used for the H.264 RTP payload output
by this JNIEncoder and the associated packetizer.
|
checkInputBuffer, dump, getInputFormat, getOutputFormat, getSupportedInputFormats, isEOM, propagateEOM
addControl, getControl, getControls, removeControl
public static final java.lang.String[] AVAILABLE_PRESETS
public static final java.lang.String BASELINE_PROFILE
public static final boolean DEFAULT_DEFAULT_INTRA_REFRESH
DEFAULT_INTRA_REFRESH_PNAME
ConfigurationService property.public static final java.lang.String MAIN_PROFILE
public static final java.lang.String DEFAULT_DEFAULT_PROFILE
DEFAULT_PROFILE_PNAME
ConfigurationService property.public static final int DEFAULT_FRAME_RATE
public static final java.lang.String DEFAULT_INTRA_REFRESH_PNAME
setAdditionalCodecSettings(Map)
.public static final int DEFAULT_KEYINT
public static final java.lang.String DEFAULT_PRESET
PRESET_PNAME
ConfigurationService property.public static final java.lang.String DEFAULT_PROFILE_PNAME
public static final java.lang.String HIGH_PROFILE
public static final java.lang.String KEYINT_PNAME
public static final java.lang.String PRESET_PNAME
static final javax.media.Format[] SUPPORTED_OUTPUT_FORMATS
public static final int X264_KEYINT_MAX_INFINITE
public static final int X264_KEYINT_MIN_AUTO
public void close()
close
in interface javax.media.PlugIn
close
in class net.sf.fmj.media.AbstractPlugIn
public java.lang.String getName()
getName
in interface javax.media.PlugIn
getName
in class net.sf.fmj.media.AbstractPlugIn
public javax.media.Format[] getSupportedOutputFormats(javax.media.Format in)
getSupportedOutputFormats
in interface javax.media.Codec
getSupportedOutputFormats
in class net.sf.fmj.media.AbstractCodec
in
- input Format to determine corresponding output
Formatspublic void open() throws javax.media.ResourceUnavailableException
open
in interface javax.media.PlugIn
open
in class net.sf.fmj.media.AbstractPlugIn
javax.media.ResourceUnavailableException
public int process(javax.media.Buffer inBuffer, javax.media.Buffer outBuffer)
process
in interface javax.media.Codec
process
in class net.sf.fmj.media.AbstractCodec
inBuffer
- input bufferoutBuffer
- output bufferpublic void rtcpFeedbackMessageReceived(RTCPFeedbackMessageEvent ev)
rtcpFeedbackMessageReceived
in interface RTCPFeedbackMessageListener
ev
- an RTCPFeedbackMessageEvent which specifies the
details of the notification event such as the feedback message type and
the payload typepublic void setAdditionalCodecSettings(java.util.Map<java.lang.String,java.lang.String> additionalCodecSettings)
additionalCodecSettings
- the additional settings to be set on this
Codecpublic javax.media.Format setInputFormat(javax.media.Format format)
setInputFormat
in interface javax.media.Codec
setInputFormat
in class net.sf.fmj.media.AbstractCodec
format
- the Format of media data to set on this
Codecpublic void setKeyFrameControl(KeyFrameControl keyFrameControl)
keyFrameControl
- the KeyFrameControl to be used by this
JNIEncoder as a means of control over its key frame-related
logicpublic javax.media.Format setOutputFormat(javax.media.Format format)
setOutputFormat
in interface javax.media.Codec
setOutputFormat
in class net.sf.fmj.media.AbstractCodec
format
- the Format in which this Codec is to
output media datapublic void setPacketizationMode(java.lang.String packetizationMode)
packetizationMode
- the packetization mode to be used for the H.264
RTP payload output by this JNIEncoder and the associated
packetizer
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.