gstrtp.c.types

C types for gstrtp1 library

Types 26

Different types of feedback messages.

FbTypeInvalid = 0Invalid type
RtpfbTypeNack = 1Generic NACK
RtpfbTypeTmmbr = 3Temporary Maximum Media Stream Bit Rate Request
RtpfbTypeTmmbn = 4Temporary Maximum Media Stream Bit Rate Notification
RtpfbTypeRtcpSrReq = 5Request an SR packet for early synchronization
RtpfbTypeTwcc = 15
PsfbTypePli = 1Picture Loss Indication
PsfbTypeSli = 2Slice Loss Indication
PsfbTypeRpsi = 3Reference Picture Selection Indication
PsfbTypeAfb = 15Application layer Feedback
PsfbTypeFir = 4Full Intra Request Command
PsfbTypeTstr = 5Temporal-Spatial Trade-off Request
PsfbTypeTstn = 6Temporal-Spatial Trade-off Notification
PsfbTypeVbcn = 7Video Back Channel Message

Different types of SDES content.

Invalid = - 1Invalid SDES entry
End = 0End of SDES list
Cname = 1Canonical name
Name = 2User name
Email = 3User's electronic mail address
Phone = 4User's phone number
Loc = 5Geographic user location
Tool = 6Name of application or tool
Note = 7Notice about the source
Priv = 8Private extensions
H323Caddr = 9H.323 callable address
Apsi = 10Application Specific Identifier (RFC6776)
Rgrp = 11Reporting Group Identifier (RFC8861)
RtpStreamId = 12RtpStreamId SDES item (RFC8852).
RepairedRtpStreamId = 13RepairedRtpStreamId SDES item (RFC8852).
Ccid = 14CLUE CaptId (RFC8849)
Mid = 15MID SDES item (RFC8843).

Different RTCP packet types.

Invalid = 0Invalid type
Sr = 200Sender report
Rr = 201Receiver report
Sdes = 202Source description
Bye = 203Goodbye
App = 204Application defined
Rtpfb = 205Transport layer feedback.
Psfb = 206Payload-specific feedback.
Xr = 207Extended report.

Types of RTCP Extended Reports, those are defined in RFC 3611 and other RFCs according to the IANA registry.

Invalid = - 1Invalid XR Report Block
Lrle = 1Loss RLE Report Block
Drle = 2Duplicate RLE Report Block
Prt = 3Packet Receipt Times Report Block
Rrt = 4Receiver Reference Time Report Block
Dlrr = 5Delay since the last Receiver Report
Ssumm = 6Statistics Summary Report Block
VoipMetrics = 7VoIP Metrics Report Block

Additional RTP buffer flags. These flags can potentially be used on any buffers carrying RTP packets.

Note that these are only valid for #GstCaps of type: application/x-rtp (x-rtcp). They can conflict with other extended buffer flags.

Retransmission = 1048576The #GstBuffer was once wrapped in a retransmitted packet as specified by RFC 4588.
Redundant = 2097152The packet represents redundant RTP packet. The flag is used in gstrtpstorage to be able to hold the packetback and use it only for recovery from packet loss. Since: 1.14
Last = 268435456Offset to define more flags.

Additional mapping flags for [gstrtp.rtpbuffer.RTPBuffer.map].

SkipPadding = 65536Skip mapping and validation of RTP padding and RTP pad count when present. Useful for buffers where the padding may be encrypted.
Last = 16777216Offset to define more flags

Direction to which to apply the RTP Header Extension

Inactive = 0Neither send nor receive RTP Header Extensions
Sendonly = 1Only send RTP Header Extensions @GSTRTPHEADEREXTENSIONDIRECTION_RECVONLY: Only receive RTP Header Extensions
Recvonly = 2
Sendrecv = 3Send and receive RTP Header Extensions ext
Inherited = 4RTP header extension direction is inherited from the stream

Flags that apply to a RTP Audio/Video header extension.

OneByte = 1The one byte rtp extension header. 1-16 data bytes per extension with a maximum of 14 extension ids in total.
TwoByte = 2The two byte rtp extension header. 256 data bytes per extension with a maximum of 255 (or 256 including appbits) extensions in total.

Standard predefined fixed payload types.

The official list is at:

http://www.iana.org/assignments/rtp-parameters

Audio: reserved: 19 unassigned: 20-23,

Video: unassigned: 24, 27, 29, 30, 35-71, 77-95 Reserved for RTCP conflict avoidance: 72-76

Pcmu = 0ITU-T G.711. mu-law audio (RFC 3551)
_1016 = 1RFC 3551 says reserved
G721 = 2RFC 3551 says reserved
Gsm = 3GSM audio
G723 = 4ITU G.723.1 audio
Dvi48000 = 5IMA ADPCM wave type (RFC 3551)
Dvi416000 = 6IMA ADPCM wave type (RFC 3551)
Lpc = 7experimental linear predictive encoding
Pcma = 8ITU-T G.711 A-law audio (RFC 3551)
G722 = 9ITU-T G.722 (RFC 3551)
L16Stereo = 10stereo PCM
L16Mono = 11mono PCM
Qcelp = 12EIA & TIA standard IS-733
Cn = 13Comfort Noise (RFC 3389)
Mpa = 14Audio MPEG 1-3.
G728 = 15ITU-T G.728 Speech coder (RFC 3551)
Dvi411025 = 16IMA ADPCM wave type (RFC 3551)
Dvi422050 = 17IMA ADPCM wave type (RFC 3551)
G729 = 18ITU-T G.729 Speech coder (RFC 3551)
Cellb = 25See RFC 2029
Jpeg = 26ISO Standards 10918-1 and 10918-2 (RFC 2435)
Nv = 28nv encoding by Ron Frederick
H261 = 31ITU-T Recommendation H.261 (RFC 2032)
Mpv = 32Video MPEG 1 & 2 (RFC 2250)
Mp2t = 33MPEG-2 transport stream (RFC 2250)
H263 = 34Video H263 (RFC 2190)

The transfer profile to use.

Unknown = 0invalid profile
Avp = 1the Audio/Visual profile (RFC 3551)
Savp = 2the secure Audio/Visual profile (RFC 3711)
Avpf = 3the Audio/Visual profile with feedback (RFC 4585)
Savpf = 4the secure Audio/Visual profile with feedback (RFC 5124)

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].

Fields
GstBuffer * buffer

Data structure that points to a packet at @offset in @buffer. The size of the structure is made public to allow stack allocations.

Fields
GstRTCPBuffer * rtcppointer to RTCP buffer
uint offsetoffset of packet in buffer data
gboolean padding
ubyte count
ushort length
uint itemOffset
uint itemCount
uint entryOffset

Provides a base class for audio RTP payloaders for frame or sample based audio codecs (constant bitrate)

This class derives from GstRTPBasePayload. It can be used for payloading audio codecs. It will only work with constant bitrate codecs. It supports both frame based and sample based codecs. It takes care of packing up the audio data into RTP packets and filling up the headers accordingly. The payloading is done based on the maximum MTU (mtu) and the maximum time per packet (max-ptime). The general idea is to divide large data buffers into smaller RTP packets. The RTP packet size is the minimum of either the MTU, max-ptime (if set) or available data. The RTP packet size is always larger or equal to min-ptime (if set). If min-ptime is not set, any residual data is sent in a last RTP packet. In the case of frame based codecs, the resulting RTP packets always contain full frames.

Usage

To use this base class, your child element needs to call either [gstrtp.rtpbase_audio_payload.RTPBaseAudioPayload.setFrameBased] or [gstrtp.rtpbase_audio_payload.RTPBaseAudioPayload.setSampleBased]. This is usually done in the element's _init() function. Then, the child element must call either [gstrtp.rtpbase_audio_payload.RTPBaseAudioPayload.setFrameOptions], [gstrtp.rtpbase_audio_payload.RTPBaseAudioPayload.setSampleOptions] or gst_rtp_base_audio_payload_set_samplebits_options. Since GstRTPBaseAudioPayload derives from GstRTPBasePayload, the child element must set any variables or call/override any functions required by that base class. The child element does not need to override any other functions specific to GstRTPBaseAudioPayload.

Fields
int frameSize
int frameDuration
int sampleSize
void *[4] GstReserved

Base class for audio RTP payloader.

Fields
GstRTPBasePayloadClass parentClassthe parent class
void *[4] GstReserved

Provides a base class for RTP depayloaders

In order to handle RTP header extensions correctly if the depayloader aggregates multiple RTP packet payloads into one output buffer this class provides the function [gstrtp.rtpbase_depayload.RTPBaseDepayload.setAggregateHdrextEnabled]. If the aggregation is enabled the virtual functions @GstRTPBaseDepayload.process or @GstRTPBaseDepayload.process_rtp_packet must tell the base class what happens to the current RTP packet. By default the base class assumes that the packet payload is used with the next output buffer.

If the RTP packet will not be used with an output buffer [gstrtp.rtpbase_depayload.RTPBaseDepayload.dropped] must be called. A typical situation would be if we are waiting for a keyframe.

If the RTP packet will be used but not with the current output buffer but with the next one [gstrtp.rtpbase_depayload.RTPBaseDepayload.delayed] must be called. This may happen if the current RTP packet signals the start of a new output buffer and the currently processed output buffer will be pushed first. The undelay happens implicitly once the current buffer has been pushed or [gstrtp.rtpbase_depayload.RTPBaseDepayload.flush] has been called.

If [gstrtp.rtpbase_depayload.RTPBaseDepayload.flush] is called all RTP packets that have not been dropped since the last output buffer are dropped, e.g. if an output buffer is discarded due to malformed data. This may or may not include the current RTP packet depending on the 2nd parameter @keep_current.

Be aware that in case [gstrtp.rtpbase_depayload.RTPBaseDepayload.pushList] is used each buffer will see the same list of RTP header extensions.

Fields
GstElement parent
GstPad * sinkpad
GstPad * srcpad
uint clockRate
GstSegment segment
gboolean needNewsegment
void *[4] GstReserved

Base class for RTP depayloaders.

Fields
GstElementClass parentClassthe parent class
gboolean function(GstRTPBaseDepayload * filter, GstCaps * caps) setCapsconfigure the depayloader
GstBuffer * function(GstRTPBaseDepayload * base, GstBuffer * in_) processprocess incoming rtp packets. Subclass must implement either this method or @processrtppacket to process incoming rtp packets. If the child returns a buffer without a valid timestamp, the timestamp...
gboolean function(GstRTPBaseDepayload * filter, GstEvent * event) packetLostsignal the depayloader about packet loss
gboolean function(GstRTPBaseDepayload * filter, GstEvent * event) handleEventcustom event handling
GstBuffer * function(GstRTPBaseDepayload * base, GstRTPBuffer * rtpBuffer) processRtpPacketSame as the process virtual function, but slightly more efficient, since it is passed the rtp buffer structure that has already been mapped (with GSTMAPREAD) by the base class and thus does not hav...
void *[3] GstReserved

Provides a base class for RTP payloaders

Fields
GstElement element
GstPad * sinkpad
GstPad * srcpad
uint tsBase
ushort seqnumBase
char * media
char * encodingName
gboolean dynamic
uint clockRate
int tsOffset
uint timestamp
short seqnumOffset
ushort seqnum
long maxPtime
uint pt
uint ssrc
uint currentSsrc
uint mtu
GstSegment segment
ulong minPtime
ulong ptime
ulong ptimeMultiple
void *[4] GstReserved

Base class for audio RTP payloader.

Fields
GstElementClass parentClassthe parent class
GstCaps * function(GstRTPBasePayload * payload, GstPad * pad, GstCaps * filter) getCapsget desired caps
gboolean function(GstRTPBasePayload * payload, GstCaps * caps) setCapsconfigure the payloader
GstFlowReturn function(GstRTPBasePayload * payload, GstBuffer * buffer) handleBufferprocess data
gboolean function(GstRTPBasePayload * payload, GstEvent * event) sinkEventcustom event handling on the sinkpad
gboolean function(GstRTPBasePayload * payload, GstEvent * event) srcEventcustom event handling on the srcpad
gboolean function(GstRTPBasePayload * payload, GstPad * pad, GstQuery * query) querycustom query handling
void *[4] GstReserved

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.

Fields
GstBuffer * bufferpointer to RTP buffer
uint stateinternal state
void *[4] dataarray of data
size_t[4] sizearray of size
GstMapInfo[4] maparray of #GstMapInfo

Instance struct for a RTP Audio/Video header extension.

Fields
GstElement parentthe parent #GObject
void *[4] GstReserved

Base class for RTP Header extensions.

Fields
GstElementClass parentClassthe parent class
GstRTPHeaderExtensionFlags function(GstRTPHeaderExtension * ext) getSupportedFlagsretrieve the supported flags
size_t function(GstRTPHeaderExtension * ext, const(GstBuffer) * inputMeta) getMaxSizeretrieve the maximum size for this extension based on the information available from input_meta. Implementations should attempt to provide as accurate information as possible as the returned value...
ptrdiff_t function(GstRTPHeaderExtension * ext, const(GstBuffer) * inputMeta, GstRTPHeaderExtensionFlags writeFlags, GstBuffer * output, ubyte * data, size_t size) writewrite into @data the information for this extension. Various information is provided to help writing extensions in particular cases.
gboolean function(GstRTPHeaderExtension * ext, GstRTPHeaderExtensionFlags readFlags, const(ubyte) * data, size_t size, GstBuffer * buffer) readread from a rtp payloaded buffer and extract the extension information, optionally adding some meta onto the output buffer.
gboolean function(GstRTPHeaderExtension * ext, const(GstCaps) * caps) setNonRtpSinkCapsread any information from sink caps that the header extension needs for its function.
gboolean function(GstRTPHeaderExtension * ext, GstCaps * caps) updateNonRtpSrcCapsupdate depayloader non-RTP (depayloaded) caps with the information parsed from RTP header.
gboolean function(GstRTPHeaderExtension * ext, GstRTPHeaderExtensionDirection direction, const(char) * attributes) setAttributesset the necessary attributes that may be signaled e.g. with an SDP.
gboolean function(GstRTPHeaderExtension * ext, GstCaps * caps) setCapsFromAttributeswrite the necessary caps field/s for the configured attributes e.g. as signalled with SDP.
void *[20] GstReserved

Structure holding default payload type information.

Fields
ubyte payloadTypepayload type, -1 means dynamic
const(char) * mediathe media type(s), usually "audio", "video", "application", "text", "message".
const(char) * encodingNamethe encoding name of @pt
uint clockRatedefault clock rate, 0 = unknown/variable
const(char) * encodingParametersencoding parameters. For audio this is the number of channels. NULL = not applicable.
uint bitratethe bitrate of the media. 0 = unknown/variable.
void *[4] GstReserved

Meta describing the source(s) of the buffer.

Fields
GstMeta metaparent #GstMeta
uint ssrcthe SSRC
gboolean ssrcValidwhether @ssrc is set and valid
uint[15] csrcpointer to the CSRCs
uint csrcCountnumber of elements in @csrc