GstRtp.RTCPBuffer¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
buffer |
r/w |
||
map |
r/w |
Methods¶
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
Details¶
- class GstRtp.RTCPBuffer¶
Note: The API in this module is not yet declared stable.
The GstRTPCBuffer helper functions makes it easy to parse and create regular
Gst.Buffer
objects that contain compound RTCP packets. These buffers are typically of ‘application/x-rtcp’Gst.Caps
.An RTCP buffer consists of 1 or more
GstRtp.RTCPPacket
structures that you can retrieve withGstRtp.RTCPBuffer.get_first_packet
().GstRtp.RTCPPacket
acts as a pointer into the RTCP buffer; you can move to the next packet withGstRtp.RTCPPacket.move_to_next
().- classmethod new(mtu)[source]¶
- Parameters:
mtu (
int
) – the maximum mtu size.- Returns:
A newly allocated buffer.
- Return type:
Create a new buffer for constructing RTCP packets. The packet will have a maximum size of mtu.
- classmethod new_copy_data(data)[source]¶
- Parameters:
data (
bytes
) – data for the new buffer- Returns:
A newly allocated buffer with a copy of data and of size len.
- Return type:
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.
- classmethod new_take_data(data)[source]¶
- Parameters:
data (
bytes
) – data for the new buffer- Returns:
A newly allocated buffer with data and of size len.
- Return type:
Create a new buffer and set the data and size of the buffer to data and len respectively. data will be freed when the buffer is unreffed, so this function transfers ownership of data to the new buffer.
- classmethod validate(buffer)[source]¶
- Parameters:
buffer (
Gst.Buffer
) – the buffer to validate- Returns:
True
if buffer is a valid RTCP packet.- Return type:
Check if the data pointed to by buffer is a valid RTCP packet using
GstRtp.RTCPBuffer.validate_data
().
- classmethod validate_data(data)[source]¶
- Parameters:
data (
bytes
) – the data to validate- Returns:
True
if the data points to a valid RTCP packet.- Return type:
Check if the data and size point to the data of a valid compound, non-reduced size RTCP packet. Use this function to validate a packet before using the other functions in this module.
- classmethod validate_data_reduced(data)[source]¶
- Parameters:
data (
bytes
) – the data to validate- Returns:
True
if the data points to a valid RTCP packet.- Return type:
Check if the data and size point to the data of a valid RTCP packet. Use this function to validate a packet before using the other functions in this module.
This function is updated to support reduced size rtcp packets according to RFC 5506 and will validate full compound RTCP packets as well as reduced size RTCP packets.
New in version 1.6.
- classmethod validate_reduced(buffer)[source]¶
- Parameters:
buffer (
Gst.Buffer
) – the buffer to validate- Returns:
True
if buffer is a valid RTCP packet.- Return type:
Check if the data pointed to by buffer is a valid RTCP packet using
GstRtp.RTCPBuffer.validate_reduced
().New in version 1.6.
- add_packet(type, packet)[source]¶
- Parameters:
type (
GstRtp.RTCPType
) – theGstRtp.RTCPType
of the new packetpacket (
GstRtp.RTCPPacket
) – pointer to new packet
- Returns:
True
if the packet could be created. This function returnsFalse
if the max mtu is exceeded for the buffer.- Return type:
Add a new packet of type to self. packet will point to the newly created packet.
- get_first_packet(packet)[source]¶
- Parameters:
packet (
GstRtp.RTCPPacket
) – aGstRtp.RTCPPacket
- Returns:
True
if the packet existed in self.- Return type:
Initialize a new
GstRtp.RTCPPacket
pointer that points to the first packet in self.