public interface RtmpPublisher
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Stop and close the current RTMP streaming client.
|
boolean |
connect(java.lang.String url)
Issues an RTMP "connect" command and wait for the response.
|
boolean |
publish(java.lang.String publishType)
Issues an RTMP "publish" command and write the media content stream packets (audio and video).
|
void |
publishAudioData(byte[] data,
int size,
int dts)
publish an audio content packet to server
|
void |
publishVideoData(byte[] data,
int size,
int dts)
publish a video content packet to server
|
void |
setAuthorization(java.lang.String user,
java.lang.String password) |
void |
setVideoResolution(int width,
int height)
set video resolution
|
boolean connect(java.lang.String url)
url - specify the RTMP urlboolean publish(java.lang.String publishType)
publishType - specify the way to publish raw RTMP packets among "live", "record" and
"append"java.lang.IllegalStateException - if the client is not connected to a RTMP servervoid close()
void publishVideoData(byte[] data,
int size,
int dts)
data - video stream byte arraysize - video stream byte size (not the whole length of byte array)dts - video stream decoding timestampvoid publishAudioData(byte[] data,
int size,
int dts)
data - audio stream byte arraysize - audio stream byte size (not the whole length of byte array)dts - audio stream decoding timestampvoid setVideoResolution(int width,
int height)
width - video widthheight - video heightvoid setAuthorization(java.lang.String user,
java.lang.String password)