public class RTMPSink extends JSink
| Modifier and Type | Field and Description |
|---|---|
static int |
APPEND |
static int |
RECORD |
AV_SYNC_IN, BUFFER_OVERFLOW, CLOSED, CONNECT, CONNECTED, CONNECTION_TIMEOUT, DISPLAY_LOCAL, DUMP, ERROR, HTTP_AUDIO, LOCAL, MAX_BT_DROP, MAX_BT_WARN, MAX_DURATION, MIN_BT, MJPG, MKV, NO_AUDIO, NO_VIDEO, OFFSET_TIME_IN, OFFSET_TIME_OUT, OPT_PKT_SIZE, PIPE_SIZE, pipeSize, PREVIEW, RTMP, RTP, SHOW_DLG_SAVE, SHOW_ENC_DLG, SOCKET_ERROR, SOCKET_SBS, socketSendBufferSize, STARVING, TSNET, UNCONNECTED| Constructor and Description |
|---|
RTMPSink(DSFiltergraph src,
java.lang.String targetURL,
java.lang.String streamName,
DSFilterInfo videoEncoder,
DSFilterInfo audioEncoder,
int flags) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Shuts down the sink and frees all resources it allocated.
|
void |
connect()
When constructing the sink with the JSink.UNCONNECTED flag set, call this after encoders are configured.
|
int |
getChunkSize() |
void |
propertyChange(java.beans.PropertyChangeEvent pe) |
void |
sampleReceived(SampleBuffer inBuffer)
Called from SampleAccessFilters used by this sink.
|
void |
sendRTMP(RTMPMessage msg)
Can be used to send AMF formatted messages to the server.
|
void |
setChunkSize(int chunkSize) |
static void |
setConnectionTimeout(int msecTimeout) |
create, getID, getOutputBufferSize, getOutputMediaType, setNetworkInterface, setSinkOption, setSocketOptionpublic static final int RECORD
public static final int APPEND
public RTMPSink(DSFiltergraph src, java.lang.String targetURL, java.lang.String streamName, DSFilterInfo videoEncoder, DSFilterInfo audioEncoder, int flags) throws java.lang.Exception
java.lang.Exceptionpublic void connect()
throws java.lang.Exception
java.lang.Exceptionpublic static void setConnectionTimeout(int msecTimeout)
public void sendRTMP(RTMPMessage msg) throws java.lang.Exception
java.lang.Exceptionpublic int getChunkSize()
public void setChunkSize(int chunkSize)
throws java.lang.Exception
java.lang.Exceptionpublic void propertyChange(java.beans.PropertyChangeEvent pe)
propertyChange in interface java.beans.PropertyChangeListenerpropertyChange in class JSinkpublic void close()
JSinkpublic void sampleReceived(SampleBuffer inBuffer)
JSinksampleReceived in class JSink