GStreamer Base Plugins 0.10 Library Reference Manual | ||||
---|---|---|---|---|
#include <gst/rtp/gstrtppayload.h> enum GstRTPPayload; #define GST_RTP_PAYLOAD_IS_DYNAMIC (pt) GstRTPPayloadInfo; const GstRTPPayloadInfo* gst_rtp_payload_info_for_name (const gchar *media, const gchar *encoding_name); const GstRTPPayloadInfo* gst_rtp_payload_info_for_pt (guint8 payload_type);
The GstRTPPayloads helper functions makes it easy to deal with static and dynamic payloads. Its main purpose is to retrieve properties such as the default clock-rate and get session bandwidth information.
Last reviewed on 2007-10-01 (0.10.15)
typedef enum { /* Audio: */ GST_RTP_PAYLOAD_PCMU = 0, GST_RTP_PAYLOAD_1016 = 1, /* RFC 3551 says reserved */ GST_RTP_PAYLOAD_G721 = 2, /* RFC 3551 says reserved */ GST_RTP_PAYLOAD_GSM = 3, GST_RTP_PAYLOAD_G723 = 4, GST_RTP_PAYLOAD_DVI4_8000 = 5, GST_RTP_PAYLOAD_DVI4_16000 = 6, GST_RTP_PAYLOAD_LPC = 7, GST_RTP_PAYLOAD_PCMA = 8, GST_RTP_PAYLOAD_G722 = 9, GST_RTP_PAYLOAD_L16_STEREO = 10, GST_RTP_PAYLOAD_L16_MONO = 11, GST_RTP_PAYLOAD_QCELP = 12, GST_RTP_PAYLOAD_CN = 13, GST_RTP_PAYLOAD_MPA = 14, GST_RTP_PAYLOAD_G728 = 15, GST_RTP_PAYLOAD_DVI4_11025 = 16, GST_RTP_PAYLOAD_DVI4_22050 = 17, GST_RTP_PAYLOAD_G729 = 18, /* Video: */ GST_RTP_PAYLOAD_CELLB = 25, GST_RTP_PAYLOAD_JPEG = 26, GST_RTP_PAYLOAD_NV = 28, GST_RTP_PAYLOAD_H261 = 31, GST_RTP_PAYLOAD_MPV = 32, GST_RTP_PAYLOAD_MP2T = 33, GST_RTP_PAYLOAD_H263 = 34, /* BOTH */ } GstRTPPayload;
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
#define GST_RTP_PAYLOAD_IS_DYNAMIC(pt) ((pt) >= 96 && (pt) <= 127)
Check if pt
is a dynamic payload type.
pt : |
a payload type |
typedef struct { guint8 payload_type; const gchar *media; const gchar *encoding_name; guint clock_rate; const gchar *encoding_parameters; guint bitrate; } GstRTPPayloadInfo;
Structure holding default payload type information.
guint8 payload_type ; |
payload type, -1 means dynamic |
const gchar *media ; |
the media type(s), usually "audio", "video", "application", "text", "message". |
const gchar *encoding_name ; |
the encoding name of pt
|
guint clock_rate ; |
default clock rate, 0 = unknown/variable |
const gchar *encoding_parameters ; |
encoding parameters. For audio this is the number of channels. NULL = not applicable. |
guint bitrate ; |
the bitrate of the media. 0 = unknown/variable. |
const GstRTPPayloadInfo* gst_rtp_payload_info_for_name (const gchar *media, const gchar *encoding_name);
Get the GstRTPPayloadInfo for media
and encoding_name
. This function is
mostly used to get the default clock-rate and bandwidth for dynamic payload
types specified with media
and encoding
name.
The search for encoding_name
will be performed in a case insensitve way.
media : |
the media to find |
encoding_name : |
the encoding name to find |
Returns : | a GstRTPPayloadInfo or NULL when no info could be found. |
const GstRTPPayloadInfo* gst_rtp_payload_info_for_pt (guint8 payload_type);
Get the GstRTPPayloadInfo for payload_type
. This function is
mostly used to get the default clock-rate and bandwidth for static payload
types specified with payload_type
.
payload_type : |
the payload_type to find |
Returns : | a GstRTPPayloadInfo or NULL when no info could be found. |