public class RTMPStreamer extends android.os.Handler implements IMediaMuxer
Modifier and Type | Class and Description |
---|---|
class |
RTMPStreamer.Frame |
static interface |
RTMPStreamer.Listener |
static class |
RTMPStreamer.RTMPErrorCode |
SEND_AUDIO, SEND_AUDIO_HEADER, SEND_VIDEO, SEND_VIDEO_HEADER, STOP_STREAMING
Constructor and Description |
---|
RTMPStreamer(android.os.Looper looper,
RTMPStreamer.Listener listener) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
file_close() |
void |
file_open(java.lang.String s) |
int |
getFrameCountInQueue() |
long |
getLastAudioFrameTimeStamp() |
long |
getLastReceivedAudioFrameTimeStamp() |
long |
getLastReceivedVideoFrameTimeStamp() |
long |
getLastSentFrameTimeStamp() |
long |
getLastVideoFrameTimeStamp() |
long |
getSentByteAmount() |
long |
getSentByteAmount2() |
long |
getSentTotalVideoFrameCount() |
int |
getVideoFrameCountInQueue() |
void |
handleMessage(android.os.Message msg)
It is critically important to send the frames in time order.
|
boolean |
isConnected() |
void |
onSocketError() |
boolean |
open(java.lang.String url) |
void |
reset() |
void |
setApplyFrameDrop(boolean applyFrameDrop) |
void |
stopMuxer() |
void |
writeAudio(byte[] data,
int size,
long presentationTime) |
void |
writeAudioHeader(byte[] data,
int length) |
void |
writeFLVHeader(boolean hasAudio,
boolean hasVideo) |
void |
writeVideo(byte[] data,
int length,
long presentationTime) |
void |
writeVideo(byte[] data,
int length,
long presentationTime,
boolean isKeyFrame) |
void |
writeVideoHeader(byte[] data,
int length) |
createAsync, createAsync, dispatchMessage, dump, getLooper, getMessageName, hasCallbacks, hasMessages, hasMessages, obtainMessage, obtainMessage, obtainMessage, obtainMessage, obtainMessage, post, postAtFrontOfQueue, postAtTime, postAtTime, postDelayed, postDelayed, removeCallbacks, removeCallbacks, removeCallbacksAndMessages, removeMessages, removeMessages, sendEmptyMessage, sendEmptyMessageAtTime, sendEmptyMessageDelayed, sendMessage, sendMessageAtFrontOfQueue, sendMessageAtTime, sendMessageDelayed, toString
public RTMPStreamer(android.os.Looper looper, RTMPStreamer.Listener listener)
public void setApplyFrameDrop(boolean applyFrameDrop)
public long getLastReceivedVideoFrameTimeStamp()
public long getLastReceivedAudioFrameTimeStamp()
public long getLastSentFrameTimeStamp()
public long getSentByteAmount()
public long getSentByteAmount2()
public boolean open(java.lang.String url)
open
in interface IMediaMuxer
public void close()
public void onSocketError()
public void reset()
public void handleMessage(android.os.Message msg)
handleMessage
in class android.os.Handler
msg
- public long getLastAudioFrameTimeStamp()
getLastAudioFrameTimeStamp
in interface IMediaMuxer
public long getLastVideoFrameTimeStamp()
getLastVideoFrameTimeStamp
in interface IMediaMuxer
public void writeFLVHeader(boolean hasAudio, boolean hasVideo)
public void file_open(java.lang.String s)
public void file_close()
public boolean isConnected()
isConnected
in interface IMediaMuxer
public void writeAudio(byte[] data, int size, long presentationTime)
writeAudio
in interface IMediaMuxer
public void writeVideo(byte[] data, int length, long presentationTime)
writeVideo
in interface IMediaMuxer
public void writeVideo(byte[] data, int length, long presentationTime, boolean isKeyFrame)
writeVideo
in interface IMediaMuxer
public void writeVideoHeader(byte[] data, int length)
writeVideoHeader
in interface IMediaMuxer
public void writeAudioHeader(byte[] data, int length)
writeAudioHeader
in interface IMediaMuxer
public void stopMuxer()
stopMuxer
in interface IMediaMuxer
public int getFrameCountInQueue()
getFrameCountInQueue
in interface IMediaMuxer
public int getVideoFrameCountInQueue()
getVideoFrameCountInQueue
in interface IMediaMuxer
public long getSentTotalVideoFrameCount()