java.lang.Object | |
↳ | org.opencdnunion.media.streamer.publisher.Publisher |
Base class of publish modules.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | Publisher.PubListener |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | ERROR_START_FAILED | ||||||||||
int | ERROR_STOP_FAILED | ||||||||||
int | ERROR_UNKNOWN | ||||||||||
int | ERROR_WRITE_FAILED | ||||||||||
int | INFO_STARTED | ||||||||||
int | INFO_STOPPED | ||||||||||
int | STATE_IDLE | ||||||||||
int | STATE_PUBLISHING | ||||||||||
int | STATE_STARTING | ||||||||||
int | STATE_STOPPING |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected int | mCurrentUploadKBitrate | ||||||||||
protected long | mLastSendTime | ||||||||||
protected int | mLastUploadedKBytes | ||||||||||
protected Publisher.PubListener | mPubListener | ||||||||||
protected Handler | mPublishHandler | ||||||||||
protected HandlerThread | mPublishThread | ||||||||||
protected AtomicInteger | mState | ||||||||||
protected int | mUploadedBytes |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Publisher(String name) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
SinkPin<AVPacketBase> | getAVSinkPin() | ||||||||||
int |
getCurrentUploadKBitrate()
Get current upload bandwidth.
| ||||||||||
int |
getUploadedKBytes()
Get current uploaded data size.
| ||||||||||
void |
release()
Release publisher.
| ||||||||||
void |
setPubListener(Publisher.PubListener listener)
Set publisher listener.
| ||||||||||
boolean |
start(String url)
Start publisher.
| ||||||||||
void |
stop()
Stop publisher.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void | doFormatChanged(Object format) | ||||||||||
abstract int | doFrameAvailable(AVPacketBase packet) | ||||||||||
abstract void | doRelease() | ||||||||||
abstract int | doStart(String url) | ||||||||||
abstract int | doStop() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Get current upload bandwidth. Valid on STATE_PROCESSING.
Get current uploaded data size. Valid on STATE_PROCESSING.
Release publisher.
Set publisher listener.
listener | listener to set |
---|