RTCPBuffer

Note: The API in this module is not yet declared stable.

The GstRTPCBuffer helper functions makes it easy to parse and create regular #GstBuffer objects that contain compound RTCP packets. These buffers are typically of 'application/x-rtcp' #GstCaps.

An RTCP buffer consists of 1 or more #GstRTCPPacket structures that you can retrieve with gstrtp.rtcpbuffer.RTCPBuffer.getFirstPacket. #GstRTCPPacket acts as a pointer into the RTCP buffer; you can move to the next packet with gstrtp.rtcppacket.RTCPPacket.moveToNext.

Members

Functions

addPacket
bool addPacket(gstrtp.types.RTCPType type, gstrtp.rtcppacket.RTCPPacket packet)

Add a new packet of type to rtcp. packet will point to the newly created packet.

getFirstPacket
bool getFirstPacket(gstrtp.rtcppacket.RTCPPacket packet)

Initialize a new #GstRTCPPacket pointer that points to the first packet in rtcp.

getPacketCount
uint getPacketCount()

Get the number of RTCP packets in rtcp.

unmap
bool unmap()

Finish rtcp after being constructed. This function is usually called after gstrtp.rtcpbuffer.RTCPBuffer.map and after adding the RTCP items to the new buffer.

Static functions

map
bool map(gst.buffer.Buffer buffer, gst.types.MapFlags flags, gstrtp.rtcpbuffer.RTCPBuffer rtcp)

Open buffer for reading or writing, depending on flags. The resulting RTCP buffer state is stored in rtcp.

newCopyData
gst.buffer.Buffer newCopyData(ubyte[] data)

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.

newTakeData
gst.buffer.Buffer newTakeData(ubyte[] data)

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.

new_
gst.buffer.Buffer new_(uint mtu)

Create a new buffer for constructing RTCP packets. The packet will have a maximum size of mtu.

validate
bool validate(gst.buffer.Buffer buffer)

Check if the data pointed to by buffer is a valid RTCP packet using gstrtp.rtcpbuffer.RTCPBuffer.validateData.

validateData
bool validateData(ubyte[] data)

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.

validateDataReduced
bool validateDataReduced(ubyte[] data)

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.

validateReduced
bool validateReduced(gst.buffer.Buffer buffer)

Check if the data pointed to by buffer is a valid RTCP packet using gstrtp.rtcpbuffer.RTCPBuffer.validateReduced.