A class to create RTP Packet using the MPEG4-GENERIC profile, based on RFC 3640 (http://www.rfc-editor.org/rfc/rfc3640.txt)
More...
|
| void | onAudioConfigDecoded (AudioConfig audioConfig) |
| |
|
void | onAudioDataDecoded (byte[] audioData, int audioDataLength, int timestamp) |
| |
| String | getSdpConfig (String absControlUrl) |
| | Returns the SDP string to be sent by the RTSP server in response to a Describe request.
|
| |
| void | stop () |
| | In addition to the default stop, Resets the Sdp Config state to make sure to block the next time that this provider is used, until the SdpConfig is ready again.
|
| |
|
void | stopBlockingUntilAudioConfigReady () |
| | Unblock the thread waiting on a call to blockUntilReady.
|
| |
| boolean | isSdpConfigReady () |
| | Tells if the SDP strings can be retrieved without blocking.
|
| |
| short | getFirstPacketSequenceNumber () |
| | Gets the sequence number that the first packet in the queue has (or will have when it is inserted).
|
| |
| int | getFirstPacketTimestamp () |
| | Gets the timestamp that the first packet in the queue has (or will have when it is inserted).
|
| |
|
void | setStateChangedListener (StateChangedListener stateChangedListener) |
| | Sets the listener to be notified by any state change on this provider.
|
| |
| Packet | getPacket () |
| | Returns the next Packet in the stream.
|
| |
|
void | addFreePacketToPool (Packet packet) |
| | Puts the given packet back in the free pool packets.
|
| |
| void | clearInternalBuffer () |
| | If the provider keeps a buffer of already available packets, clear it immediately.
|
| |
|
|
final String | TAG = "RtpPacketProvider" |
| |
|
AudioConfig | mAudioConfig |
| |
|
short | mNextPacketSequenceNumber = 0 |
| | Increments by one for each new packet that is pushed in the queue.
|
| |
| final ArrayBlockingQueue< Packet > | mPacketsQueue = new ArrayBlockingQueue<>(QUEUE_SIZE) |
| | List of all packets that were received from the client and not sent to the server yet.
|
| |
|
final ArrayBlockingQueue< Packet > | mFreePacketsPool = new ArrayBlockingQueue<>(QUEUE_SIZE) |
| |
|
static final String | LOCALHOST = "127.0.0.1" |
| |
|
static final String | CRLF = "\r\n" |
| |
A class to create RTP Packet using the MPEG4-GENERIC profile, based on RFC 3640 (http://www.rfc-editor.org/rfc/rfc3640.txt)
◆ createPayload()
| void com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProviderMpeg4Generic.createPayload |
( |
byte[] |
audioData, |
|
|
int |
audioDataLength, |
|
|
byte[] |
outPayload, |
|
|
int |
outPayloadOffset |
|
) |
| |
|
protected |
Create the payload for RTP Packet with the MPEG4-GENERIC profile.
Puts the content of the payload in the given preallocated output buffer and the given offset. This helps preventing new buffer copy by reusing the same bytes array for the output.
- Parameters
-
| audioData | The data to put in the payload |
| audioDataLength | The part of the AudioData buffer to use (buffer might be bigger if is is reused) |
| outPayload | Reference to a byte array preallocated with enough memory (at least the size returned by getPayloadSize) |
| outPayloadOffset | Offset at which the payload will be written in outPayload, allowing to create a header before the payload. |
Reimplemented from com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProvider.
◆ getPayloadSize()
| int com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProviderMpeg4Generic.getPayloadSize |
( |
int |
audioDataLength | ) |
|
|
protected |
◆ getProfileSpecificSdpConfig()
| String com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProviderMpeg4Generic.getProfileSpecificSdpConfig |
( |
| ) |
|
|
protected |
◆ onAudioConfigDecoded()
| void com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacketProviderMpeg4Generic.onAudioConfigDecoded |
( |
AudioConfig |
audioConfig | ) |
|
The documentation for this class was generated from the following file:
- streamingproxy/src/main/java/com/tritondigital/net/streaming/proxy/dataprovider/rtp/RtpPacketProviderMpeg4Generic.java