Adds a RFC 5285 header extension with a one byte header to the end of the RTP header. If there is already a RFC 5285 header extension with a one byte header, the new extension will be appended. It will not work if there is already a header extension that does not follow the mechanism described in RFC 5285 or if there is a header extension with a two bytes header as described in RFC 5285. In that case, use gstrtp.rtpbuffer.RTPBuffer.addExtensionTwobytesHeader
Adds a RFC 5285 header extension with a two bytes header to the end of the RTP header. If there is already a RFC 5285 header extension with a two bytes header, the new extension will be appended. It will not work if there is already a header extension that does not follow the mechanism described in RFC 5285 or if there is a header extension with a one byte header as described in RFC 5285. In that case, use gstrtp.rtpbuffer.RTPBuffer.addExtensionOnebyteHeader
Get the CSRC at index idx in buffer.
Get the CSRC count of the RTP packet in buffer.
Check if the extension bit is set on the RTP packet in buffer.
Similar to gst_rtp_buffer_get_extension_data, but more suitable for language bindings usage. bits will contain the extension 16 bits of custom data and the extension data (not including the extension header) is placed in a new #GBytes structure.
Parses RFC 5285 style header extensions with a one byte header. It will return the nth extension with the requested id.
Parses RFC 5285 style header extensions with a two bytes header. It will return the nth extension with the requested id.
Return the total length of the header in buffer. This include the length of the fixed header, the CSRC list and the extension header.
Check if the marker bit is set on the RTP packet in buffer.
Return the total length of the packet in buffer.
Check if the padding bit is set on the RTP packet in buffer.
Similar to gst_rtp_buffer_get_payload, but more suitable for language bindings usage. The return value is a pointer to a #GBytes structure containing the payload data in rtp.
Create a buffer of the payload of the RTP packet in buffer. This function will internally create a subbuffer of buffer so that a memcpy can be avoided.
Get the length of the payload of the RTP packet in buffer.
Create a subbuffer of the payload of the RTP packet in buffer. offset bytes are skipped in the payload and the subbuffer will be of size len. If len is -1 the total payload starting from offset is subbuffered.
Get the payload type of the RTP packet in buffer.
Get the sequence number of the RTP packet in buffer.
Get the SSRC of the RTP packet in buffer.
Get the timestamp of the RTP packet in buffer.
Get the version number of the RTP packet in buffer.
Set the amount of padding in the RTP packet in buffer to len. If len is 0, the padding is removed.
Unsets the extension bit of the RTP buffer and removes the extension header and data.
Modify the CSRC at index idx in buffer to csrc.
Set the extension bit on the RTP packet in buffer to extension.
Set the extension bit of the rtp buffer and fill in the bits and length of the extension header. If the existing extension data is not large enough, it will be made larger.
Set the marker bit on the RTP packet in buffer to marker.
Set the total rtp size to len. The data in the buffer will be made larger if needed. Any padding will be removed from the packet.
Set the padding bit on the RTP packet in buffer to padding.
Set the payload type of the RTP packet in buffer to payload_type.
Set the sequence number of the RTP packet in buffer to seq.
Set the SSRC on the RTP packet in buffer to ssrc.
Set the timestamp of the RTP packet in buffer to timestamp.
Set the version of the RTP packet in buffer to version.
Unmap rtp previously mapped with gstrtp.rtpbuffer.RTPBuffer.map.
Allocate enough data in buffer to hold an RTP packet with csrc_count CSRCs, a payload length of payload_len and padding of pad_len. buffer must be writable and all previous memory in buffer will be freed. If pad_len is >0, the padding bit will be set. All other RTP header fields will be set to 0/FALSE.
Calculate the header length of an RTP packet with csrc_count CSRC entries. An RTP packet can have at most 15 CSRC entries.
Calculate the total length of an RTP packet with a payload size of payload_len, a padding of pad_len and a csrc_count CSRC entries.
Calculate the length of the payload of an RTP packet with size packet_len, a padding of pad_len and a csrc_count CSRC entries.
Compare two sequence numbers, taking care of wraparounds. This function returns the difference between seqnum1 and seqnum2.
Get the default clock-rate for the static payload type payload_type.
Update the exttimestamp field with the extended timestamp of timestamp For the first call of the method, exttimestamp should point to a location with a value of -1.
Similar to gst_rtp_buffer_get_extension_onebyte_header, but working on the #GBytes you get from gst_rtp_buffer_get_extension_bytes. Parses RFC 5285 style header extensions with a one byte header. It will return the nth extension with the requested id.
Map the contents of buffer into rtp.
Allocate a new #GstBuffer with enough data to hold an RTP packet with csrc_count CSRCs, a payload length of payload_len and padding of pad_len. All other RTP header fields will be set to 0/FALSE.
Create a new #GstBuffer that can hold an RTP packet that is exactly packet_len long. The length of the payload depends on pad_len and csrc_count and can be calculated with gstrtp.rtpbuffer.RTPBuffer.calcPayloadLen. All RTP header fields will be set to 0/FALSE.
Create a new buffer and set the data to a copy of len bytes of data and the size to len. The data will be freed when the buffer is freed.
The GstRTPBuffer helper functions makes it easy to parse and create regular #GstBuffer objects that contain RTP payloads. These buffers are typically of 'application/x-rtp' #GstCaps.