
public class Encoder extends Coder
Coder.Flag, Coder.Flag2, Coder.State| Modifier and Type | Method and Description |
|---|---|
Encoder |
copyReference()
Create a new Encoder object that is actually referring to the
exact same underlying native object.
|
void |
encode(MediaPacket output,
MediaSampled media)
Encode the given Media using this encoder.
Callers should call this repeatedly on a media object ntil we consume all the media. Also, when done in order to flush the encoder, caller should call this method passing in 0 (null) for media to tell the encoder to flush any data it was keeping a hold of. |
void |
encodeAudio(MediaPacket output,
MediaAudio samples)
Encode the given MediaAudio using this encoder.
Callers should call this repeatedly on a set of samples until we consume all the samples. Also, when done in order to flush the encoder, caller should call this method passing in 0 (null) for samples to tell the encoder to flush any data it was keeping a hold of. |
void |
encodeVideo(MediaPacket output,
MediaPicture picture)
Encode the given MediaPicture using this encoder.
The MediaPicture will allocate a buffer to use internally for this, and will free it when the frame destroys itself. Also, when done in order to flush the encoder, caller should call this method passing in 0 (null) for frame to tell the encoder to flush any data it was keeping a hold of. |
boolean |
equals(Object obj)
Compares two values, returning true if the underlying objects in native code are the same object.
|
long |
getNumDroppedFrames()
the number of media object the encoder had to drop (i.e.
|
int |
hashCode()
Get a hashable value for this object.
|
static Encoder |
make(Codec codec)
Create a Encoder that will use the given Codec.
|
static Encoder |
make(Coder src)
Creates a Encoder from a given Encoder
|
void |
open(KeyValueBag inputOptions,
KeyValueBag unsetOptions)
Open this Coder, using the given bag of Codec-specific options.
|
getChannelLayout, getChannels, getCodec, getCodecID, getCodecType, getFlag, getFlag2, getFlags, getFlags2, getFrameCount, getFrameSize, getHeight, getPixelFormat, getSampleFormat, getSampleRate, getState, getTimeBase, getWidth, setChannelLayout, setChannels, setFlag, setFlag2, setFlags, setFlags2, setHeight, setPixelFormat, setSampleFormat, setSampleRate, setTimeBase, setWidth, toStringgetNumProperties, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsInt, getPropertyAsLong, getPropertyAsRational, getPropertyAsString, getPropertyMetaData, getPropertyMetaData, setProperty, setProperty, setProperty, setProperty, setProperty, setPropertydelete, getCurrentRefCountpublic Encoder copyReference()
copyReference in class Coderpublic boolean equals(Object obj)
public int hashCode()
public long getNumDroppedFrames()
public static Encoder make(Codec codec)
InvalidArgument - if codec is null or codec cannot decode.public static Encoder make(Coder src)
InvalidArgument - if src is nullpublic void open(KeyValueBag inputOptions, KeyValueBag unsetOptions)
public void encodeVideo(MediaPacket output, MediaPicture picture)
output - [out] The packet to encode into. Caller should checkpicture - [in] The picture to encodepublic void encodeAudio(MediaPacket output, MediaAudio samples)
output - [out] The packet to encode into. Caller should checksamples - [in] The samples to consumepublic void encode(MediaPacket output, MediaSampled media)
output - [out] The packet to encode into. Caller should checkthrows - an exception if getCodecType() and the underlyingCopyright © 2018 Humble Software. All rights reserved.