java.lang.Object | |
↳ | org.opencdnunion.media.streamer.avAdaptor.AVAdapter |
network adaptor and Audio video interleave module
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | AVAdapter.AdapterListener | ||||||||||
class | AVAdapter.BwEstConfig |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | BW_EST_STRATEGY_NORMAL | ||||||||||
int | CMD_RELEASE | ||||||||||
int | CMD_START | ||||||||||
int | CMD_STOP | ||||||||||
int | CMD_WRITE_FRAME | ||||||||||
int | ERROR_AV_ASYNC_ERROR | ||||||||||
int | INFO_AUDIO_HEADER_GOT | ||||||||||
int | INFO_EST_BW_DROP | ||||||||||
int | INFO_EST_BW_RAISE | ||||||||||
int | INFO_PACKET_SEND_SLOW | ||||||||||
int | INFO_STARTED | ||||||||||
int | INFO_STOPPED | ||||||||||
int | INFO_VIDEO_HEADER_GOT | ||||||||||
long | INVALID_TS | ||||||||||
int | STATE_IDLE | ||||||||||
int | STATE_PROCESSING | ||||||||||
int | STATE_STARTING | ||||||||||
int | STATE_STOPPING |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected int | mAFrameDropped | ||||||||||
protected Handler | mAdapterHandler | ||||||||||
protected AVAdapter.AdapterListener | mAdapterListener | ||||||||||
protected HandlerThread | mAdapterThread | ||||||||||
protected AVAdapterWrapper | mAdapterWrapper | ||||||||||
protected boolean | mAudioTrackAdded | ||||||||||
protected long | mInitDts | ||||||||||
protected boolean | mIsAudioOnly | ||||||||||
protected boolean | mIsProcessing | ||||||||||
protected boolean | mIsVideoOnly | ||||||||||
protected long | mLastAudioDts | ||||||||||
protected long | mLastVideoDts | ||||||||||
protected final Handler | mMainHandler | ||||||||||
protected AtomicInteger | mState | ||||||||||
protected int | mVFrameDroppedInner | ||||||||||
protected int | mVFrameDroppedUpper | ||||||||||
protected boolean | mVideoKeyFrameGot | ||||||||||
protected long | mVideoPts | ||||||||||
protected boolean | mVideoTrackAdded |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AVAdapter(String name) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AVAdapter.AdapterListener | getAdapterListener() | ||||||||||
SinkPin<AudioPacket> | getAudioSink() | ||||||||||
boolean |
getAutoWork()
Get if publisher start/stop by input frames.
| ||||||||||
int |
getDroppedVideoFrames()
Get dropped video frame number util now.
| ||||||||||
SrcPin<AVPacketBase> | getSrcPin() | ||||||||||
boolean |
getUseSyncMode()
Get if writing frames in sync mode.
| ||||||||||
SinkPin<ImgPacket> | getVideoSink() | ||||||||||
boolean | isAudioExtraGot() | ||||||||||
boolean | isAudioOnly() | ||||||||||
boolean | isProcessing() | ||||||||||
boolean | isVideoExtraGot() | ||||||||||
boolean | isVideoOnly() | ||||||||||
void | release() | ||||||||||
void | setAVAdapterListener(AVAdapter.AdapterListener listener) | ||||||||||
void | setAudioExtra(AVPacketBase audioExtra) | ||||||||||
void |
setAudioOnly(boolean audioOnly)
Set if this stream is audio only.
| ||||||||||
void |
setAutoWork(boolean autoWork)
Set if publisher start/stop by input frames.
| ||||||||||
void | setBwEstConfig(AVAdapter.BwEstConfig config) | ||||||||||
void |
setUseSyncMode(boolean useSyncMode)
Set if writing frames in sync mode.
| ||||||||||
void | setVideoExtra(AVPacketBase videoExtra) | ||||||||||
void |
setVideoOnly(boolean videoOnly)
Set if this stream is video only.
| ||||||||||
boolean | start() | ||||||||||
void | stop() | ||||||||||
int | writeFrame(int type, ByteBuffer data, long dts, long pts, int flags) |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | doRelease() | ||||||||||
int | doStart() | ||||||||||
void | doStop() | ||||||||||
int | doWriteFrame(Object object) | ||||||||||
void | handleAVFrame(AVPacketBase packet) | ||||||||||
void | postError(int err, long msg) | ||||||||||
void | postError(int err) | ||||||||||
void | postInfo(int type, long msg) | ||||||||||
void | postInfo(int type) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Get if publisher start/stop by input frames.
Get dropped video frame number util now. Valid on STATE_PROCESSING.
Get if writing frames in sync mode.
Set if this stream is audio only.
audioOnly | true if stream is audio only |
---|
Set if publisher start/stop by input frames.
For example, onFormatChanged would start publishing if publisher not started,
and packet with FLAG_END_OF_STREAM
would stop publishing.
autoWork | true to enable, false to disable |
---|
Set if writing frames in sync mode.
useSyncMode | true in sync mode, false in async mode. |
---|
Set if this stream is video only.
videoOnly | true if stream is video only |
---|