public class SinkImpl extends Object implements Sink, PacketSink
| Constructor and Description |
|---|
SinkImpl(String destName,
Format outputFormat,
Codec outputVideoCodec,
Codec outputAudioCodec) |
| Modifier and Type | Method and Description |
|---|---|
static SinkImpl |
createWithStream(SeekableByteChannel destStream,
Format outputFormat,
Codec outputVideoCodec,
Codec outputAudioCodec) |
protected ByteBuffer |
encodeAudio(AudioBuffer audioBuffer) |
protected VideoEncoder.EncodedFrame |
encodeVideo(Picture frame,
ByteBuffer _out) |
void |
finish()
Finilizes encoding process, flushes the buffers and closes off the
output file (or any other resources for that matter).
|
ColorSpace |
getInputColor()
Gets the color space that the sink expects
|
void |
init()
Initializes output to this sink.
|
void |
initMuxer() |
boolean |
isAudio() |
boolean |
isVideo() |
void |
outputAudioFrame(AudioFrameWithPacket audioFrame)
Outputs an audio frame to the sink
|
void |
outputAudioPacket(Packet audioPkt,
AudioCodecMeta audioCodecMeta) |
void |
outputVideoFrame(VideoFrameWithPacket videoFrame)
Outputs video frame to the sink
|
void |
outputVideoPacket(Packet packet,
VideoCodecMeta codecMeta) |
void |
setInterlaced(Boolean interlaced) |
void |
setOption(Options option,
Object value) |
void |
setProfile(String profile) |
public void outputVideoPacket(Packet packet, VideoCodecMeta codecMeta) throws IOException
outputVideoPacket in interface PacketSinkIOExceptionpublic void outputAudioPacket(Packet audioPkt, AudioCodecMeta audioCodecMeta) throws IOException
outputAudioPacket in interface PacketSinkIOExceptionpublic void initMuxer()
throws IOException
IOExceptionpublic void finish()
throws IOException
Sinkfinish in interface SinkIOExceptionpublic static SinkImpl createWithStream(SeekableByteChannel destStream, Format outputFormat, Codec outputVideoCodec, Codec outputAudioCodec)
public void init()
throws IOException
Sinkinit in interface SinkIOExceptionprotected VideoEncoder.EncodedFrame encodeVideo(Picture frame, ByteBuffer _out)
protected ByteBuffer encodeAudio(AudioBuffer audioBuffer)
public void setProfile(String profile)
public void setInterlaced(Boolean interlaced)
public void outputVideoFrame(VideoFrameWithPacket videoFrame) throws IOException
SinkoutputVideoFrame in interface SinkIOExceptionpublic void outputAudioFrame(AudioFrameWithPacket audioFrame) throws IOException
SinkoutputAudioFrame in interface SinkIOExceptionpublic ColorSpace getInputColor()
SinkgetInputColor in interface SinkCopyright © 2019. All rights reserved.