|
Triton Mobile SDK for Android 3.5.1
This is a custom android player made by Triton Digital
|
Public Member Functions | |
| void | setVersion (int version) |
| Sets the field that identifies the version of RTP (2 bits). | |
| void | setPadding (boolean padding) |
| Sets the field that indicates if the packet contains one or more additional padding bytes at the end which are not part of the payload (1 bit) | |
| void | setExtension (boolean extension) |
| Sets the field that indicates if there is an extension following the header (1 bit) | |
| void | setCC (int cc) |
| Sets the fiels that gives the number of CSRC identifiers that follow the fixed header (4 bits). | |
| void | setMarker (boolean marker) |
| Set the marker bit that indicates the frame boundaries (1 bit) The interpretation of the marker is defined by a profile. | |
| void | setPayloadType (int payloadType) |
| Set payload type (7 bits) Typically a number in the SDP dynamic profile range, the value does not matter as long as it is used consistently in the rest of the RTSP negotiation process (rtpmap). | |
| void | setSequenceNumber (short sequenceNumber) |
| Set the sequence number type (16 bits) Increments by 1 for each packet in the same stream. | |
| short | getSequenceNumber () |
| Get the sequence number type. | |
| void | setTimeStamp (int timestamp) |
| Set the time stamp type (32 bits) Typically the number of samples between the first packet and the first sample of this one (could be approximated by 'time since beginning of the stream' * 'sample rate'). | |
| int | getTimeStamp () |
| Get the sequence number type. | |
| void | setSsrc (int ssrc) |
| Set synchronization sources (32 bits) Not used in this type of application where there is only one media (audio), one source and no synchronisation. | |
| byte[] | getData () |
| Gets the packet raw data. | |
| int | getLength () |
| Gets the size of the entire packet (payload size + header size) | |
| void | setPayloadSize (int payloadSize) |
Static Public Attributes | |
| static final int | PAYLOAD_TYPE = 97 |
| Random payload type, in the range of the dynamic payload type of SDP (RFC 2327, http://www.ietf.org/rfc/rfc2327.txt) | |
| static final int | HEADER_SIZE = 12 |
| Size of RTP header. | |
Helps creating a RTP packet. The size of the payload needs to be known before creating the packet. Then, each field of the header needs to be set. Each field of the header has a default value that should be appropriate for most cases. The documentation of each field setter tells the default value for this field.
The packet is constructed according to the RFC 3550 (http://www.ietf.org/rfc/rfc3550.txt)
| byte[] com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacket.getData | ( | ) |
Gets the packet raw data.
Typically used to send the bytes to a socket after constructing it and setting the various header fields / payload.
Implements com.tritondigital.net.streaming.proxy.dataprovider.Packet.
| int com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacket.getLength | ( | ) |
Gets the size of the entire packet (payload size + header size)
Implements com.tritondigital.net.streaming.proxy.dataprovider.Packet.
| void com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacket.setCC | ( | int | cc | ) |
Sets the fiels that gives the number of CSRC identifiers that follow the fixed header (4 bits).
Default value: 0x0
| void com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacket.setExtension | ( | boolean | extension | ) |
Sets the field that indicates if there is an extension following the header (1 bit)
Default value: false (0x0)
| void com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacket.setMarker | ( | boolean | marker | ) |
Set the marker bit that indicates the frame boundaries (1 bit) The interpretation of the marker is defined by a profile.
For the supported profiles, true if packet contains the end of the audio element (e.g. end of audioMuxElement in mp4-latm), false otherwise.
Default value: false (0x0)
| void com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacket.setPadding | ( | boolean | padding | ) |
Sets the field that indicates if the packet contains one or more additional padding bytes at the end which are not part of the payload (1 bit)
Default value: false (0x0)
| void com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacket.setPayloadSize | ( | int | payloadSize | ) |
Sets the payload size. If the current buffer is not large enough, it is reallocated and the header is copied to the new buffer.
No assumption can be made regarding the previous payload after a call to this method. It may still be present if no reallocation was necessary, and it may be lost if there was a reallocation (as only the header is copied). It is assumed that changing the size of the payload implicitly implies changing the payload itself.
| void com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacket.setPayloadType | ( | int | payloadType | ) |
Set payload type (7 bits) Typically a number in the SDP dynamic profile range, the value does not matter as long as it is used consistently in the rest of the RTSP negotiation process (rtpmap).
Default value: PAYLOAD_TYPE (0x61 - 97)
| void com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacket.setSequenceNumber | ( | short | sequenceNumber | ) |
Set the sequence number type (16 bits) Increments by 1 for each packet in the same stream.
Default value: 0x0
| void com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacket.setSsrc | ( | int | ssrc | ) |
Set synchronization sources (32 bits) Not used in this type of application where there is only one media (audio), one source and no synchronisation.
Default value: 0x0
| void com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacket.setTimeStamp | ( | int | timestamp | ) |
Set the time stamp type (32 bits) Typically the number of samples between the first packet and the first sample of this one (could be approximated by 'time since beginning of the stream' * 'sample rate').
Default value: 0x0
| void com.tritondigital.net.streaming.proxy.dataprovider.rtp.RtpPacket.setVersion | ( | int | version | ) |
Sets the field that identifies the version of RTP (2 bits).
Default value: 0x2
|
static |
Size of RTP header.
Not using any extension / CCRS => fixed size