![]() |
![]() |
![]() |
GStreamer Base Plugins 0.10 Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <gst/sdp/gstsdpmessage.h> enum GstSDPResult; GstSDPOrigin; GstSDPConnection; #define GST_SDP_BWTYPE_CT #define GST_SDP_BWTYPE_AS #define GST_SDP_BWTYPE_EXT_PREFIX #define GST_SDP_BWTYPE_RR #define GST_SDP_BWTYPE_RS #define GST_SDP_BWTYPE_TIAS GstSDPBandwidth; GstSDPTime; GstSDPZone; GstSDPKey; GstSDPAttribute; GstSDPMedia; GstSDPMessage; GstSDPResult gst_sdp_message_new (GstSDPMessage **msg
); GstSDPResult gst_sdp_message_init (GstSDPMessage *msg
); GstSDPResult gst_sdp_message_uninit (GstSDPMessage *msg
); GstSDPResult gst_sdp_message_free (GstSDPMessage *msg
); GstSDPResult gst_sdp_message_parse_buffer (const guint8 *data
,guint size
,GstSDPMessage *msg
); gchar* gst_sdp_message_as_text (const GstSDPMessage *msg
); GstSDPResult gst_sdp_message_parse_uri (const gchar *uri
,GstSDPMessage *msg
); gchar* gst_sdp_message_as_uri (const gchar *scheme
,const GstSDPMessage *msg
); gboolean gst_sdp_address_is_multicast (const gchar *nettype
,const gchar *addrtype
,const gchar *addr
); const gchar* gst_sdp_message_get_version (const GstSDPMessage *msg
); GstSDPResult gst_sdp_message_set_version (GstSDPMessage *msg
,const gchar *version
); const GstSDPOrigin* gst_sdp_message_get_origin (const GstSDPMessage *msg
); GstSDPResult gst_sdp_message_set_origin (GstSDPMessage *msg
,const gchar *username
,const gchar *sess_id
,const gchar *sess_version
,const gchar *nettype
,const gchar *addrtype
,const gchar *addr
); const gchar* gst_sdp_message_get_session_name (const GstSDPMessage *msg
); GstSDPResult gst_sdp_message_set_session_name (GstSDPMessage *msg
,const gchar *session_name
); const gchar* gst_sdp_message_get_information (const GstSDPMessage *msg
); GstSDPResult gst_sdp_message_set_information (GstSDPMessage *msg
,const gchar *information
); const gchar* gst_sdp_message_get_uri (const GstSDPMessage *msg
); GstSDPResult gst_sdp_message_set_uri (GstSDPMessage *msg
,const gchar *uri
); guint gst_sdp_message_emails_len (const GstSDPMessage *msg
); const gchar* gst_sdp_message_get_email (const GstSDPMessage *msg
,guint idx
); GstSDPResult gst_sdp_message_add_email (GstSDPMessage *msg
,const gchar *email
); guint gst_sdp_message_phones_len (const GstSDPMessage *msg
); const gchar* gst_sdp_message_get_phone (const GstSDPMessage *msg
,guint idx
); GstSDPResult gst_sdp_message_add_phone (GstSDPMessage *msg
,const gchar *phone
); const GstSDPConnection* gst_sdp_message_get_connection (const GstSDPMessage *msg
); GstSDPResult gst_sdp_message_set_connection (GstSDPMessage *msg
,const gchar *nettype
,const gchar *addrtype
,const gchar *address
,guint ttl
,guint addr_number
); guint gst_sdp_message_bandwidths_len (const GstSDPMessage *msg
); const GstSDPBandwidth* gst_sdp_message_get_bandwidth (const GstSDPMessage *msg
,guint idx
); GstSDPResult gst_sdp_message_add_bandwidth (GstSDPMessage *msg
,const gchar *bwtype
,guint bandwidth
); guint gst_sdp_message_times_len (const GstSDPMessage *msg
); const GstSDPTime* gst_sdp_message_get_time (const GstSDPMessage *msg
,guint idx
); GstSDPResult gst_sdp_message_add_time (GstSDPMessage *msg
,const gchar *start
,const gchar *stop
,const gchar **repeat
); guint gst_sdp_message_zones_len (const GstSDPMessage *msg
); const GstSDPZone* gst_sdp_message_get_zone (const GstSDPMessage *msg
,guint idx
); GstSDPResult gst_sdp_message_add_zone (GstSDPMessage *msg
,const gchar *adj_time
,const gchar *typed_time
); const GstSDPKey* gst_sdp_message_get_key (const GstSDPMessage *msg
); GstSDPResult gst_sdp_message_set_key (GstSDPMessage *msg
,const gchar *type
,const gchar *data
); guint gst_sdp_message_attributes_len (const GstSDPMessage *msg
); const GstSDPAttribute* gst_sdp_message_get_attribute (const GstSDPMessage *msg
,guint idx
); const gchar* gst_sdp_message_get_attribute_val (const GstSDPMessage *msg
,const gchar *key
); const gchar* gst_sdp_message_get_attribute_val_n (const GstSDPMessage *msg
,const gchar *key
,guint nth
); GstSDPResult gst_sdp_message_add_attribute (GstSDPMessage *msg
,const gchar *key
,const gchar *value
); guint gst_sdp_message_medias_len (const GstSDPMessage *msg
); const GstSDPMedia* gst_sdp_message_get_media (const GstSDPMessage *msg
,guint idx
); GstSDPResult gst_sdp_message_add_media (GstSDPMessage *msg
,GstSDPMedia *media
); GstSDPResult gst_sdp_message_dump (const GstSDPMessage *msg
); GstSDPResult gst_sdp_media_new (GstSDPMedia **media
); GstSDPResult gst_sdp_media_init (GstSDPMedia *media
); GstSDPResult gst_sdp_media_uninit (GstSDPMedia *media
); GstSDPResult gst_sdp_media_free (GstSDPMedia *media
); const gchar* gst_sdp_media_get_media (const GstSDPMedia *media
); GstSDPResult gst_sdp_media_set_media (GstSDPMedia *media
,const gchar *med
); guint gst_sdp_media_get_port (const GstSDPMedia *media
); guint gst_sdp_media_get_num_ports (const GstSDPMedia *media
); GstSDPResult gst_sdp_media_set_port_info (GstSDPMedia *media
,guint port
,guint num_ports
); const gchar* gst_sdp_media_get_proto (const GstSDPMedia *media
); GstSDPResult gst_sdp_media_set_proto (GstSDPMedia *media
,const gchar *proto
); guint gst_sdp_media_formats_len (const GstSDPMedia *media
); const gchar* gst_sdp_media_get_format (const GstSDPMedia *media
,guint idx
); GstSDPResult gst_sdp_media_add_format (GstSDPMedia *media
,const gchar *format
); const gchar* gst_sdp_media_get_information (const GstSDPMedia *media
); GstSDPResult gst_sdp_media_set_information (GstSDPMedia *media
,const gchar *information
); guint gst_sdp_media_connections_len (const GstSDPMedia *media
); const GstSDPConnection* gst_sdp_media_get_connection (const GstSDPMedia *media
,guint idx
); GstSDPResult gst_sdp_media_add_connection (GstSDPMedia *media
,const gchar *nettype
,const gchar *addrtype
,const gchar *address
,guint ttl
,guint addr_number
); guint gst_sdp_media_bandwidths_len (const GstSDPMedia *media
); const GstSDPBandwidth* gst_sdp_media_get_bandwidth (const GstSDPMedia *media
,guint idx
); GstSDPResult gst_sdp_media_add_bandwidth (GstSDPMedia *media
,const gchar *bwtype
,guint bandwidth
); const GstSDPKey* gst_sdp_media_get_key (const GstSDPMedia *media
); GstSDPResult gst_sdp_media_set_key (GstSDPMedia *media
,const gchar *type
,const gchar *data
); guint gst_sdp_media_attributes_len (const GstSDPMedia *media
); const GstSDPAttribute * gst_sdp_media_get_attribute (const GstSDPMedia *media
,guint idx
); const gchar* gst_sdp_media_get_attribute_val (const GstSDPMedia *media
,const gchar *key
); const gchar* gst_sdp_media_get_attribute_val_n (const GstSDPMedia *media
,const gchar *key
,guint nth
); GstSDPResult gst_sdp_media_add_attribute (GstSDPMedia *media
,const gchar *key
,const gchar *value
); gchar* gst_sdp_media_as_text (const GstSDPMedia *media
);
typedef enum { GST_SDP_OK = 0, GST_SDP_EINVAL = -1 } GstSDPResult;
Return values for the SDP functions.
typedef struct { gchar *username; gchar *sess_id; gchar *sess_version; gchar *nettype; gchar *addrtype; gchar *addr; } GstSDPOrigin;
The contents of the SDP "o=" field which gives the originator of the session (their username and the address of the user's host) plus a session id and session version number.
the user's login on the originating host, or it is "-" if the originating host does not support the concept of user ids. | |
is a numeric string such that the tuple of username , sess_id ,
nettype , addrtype and addr form a globally unique identifier for the
session.
|
|
a version number for this announcement | |
the type of network. "IN" is defined to have the meaning "Internet". | |
the type of addr .
|
|
the globally unique address of the machine from which the session was created. |
typedef struct { gchar *nettype; gchar *addrtype; gchar *address; guint ttl; guint addr_number; } GstSDPConnection;
The contents of the SDP "c=" field which contains connection data.
#define GST_SDP_BWTYPE_AS "AS"
The Application-Specific Maximum bandwidth modifier.
#define GST_SDP_BWTYPE_EXT_PREFIX "X-"
The extension prefix bandwidth modifier.
#define GST_SDP_BWTYPE_RR "RR"
RTCP bandwidth allocated to data receivers (RFC 3556).
Since 0.10.15
#define GST_SDP_BWTYPE_RS "RS"
RTCP bandwidth allocated to active data senders (RFC 3556).
Since 0.10.15
#define GST_SDP_BWTYPE_TIAS "TIAS"
Transport Independent Application Specific Maximum bandwidth (RFC 3890).
Since 0.10.30
typedef struct { gchar *bwtype; guint bandwidth; } GstSDPBandwidth;
The contents of the SDP "b=" field which specifies the proposed bandwidth to be used by the session or media.
typedef struct { gchar *start; gchar *stop; GArray *repeat; } GstSDPTime;
The contents of the SDP "t=" field which specify the start and stop times for a conference session.
start time for the conference. The value is the decimal representation of Network Time Protocol (NTP) time values in seconds | |
stop time for the conference. The value is the decimal representation of Network Time Protocol (NTP) time values in seconds | |
repeat times for a session |
typedef struct { gchar *time; gchar *typed_time; } GstSDPZone;
The contents of the SDP "z=" field which allows the sender to specify a list of time zone adjustments and offsets from the base time.
typedef struct { gchar *type; gchar *data; } GstSDPKey;
The contents of the SDP "k=" field which is used to convey encryption keys.
typedef struct { gchar *key; gchar *value; } GstSDPAttribute;
The contents of the SDP "a=" field which contains a key/value pair.
typedef struct { gchar *media; guint port; guint num_ports; gchar *proto; GArray *fmts; gchar *information; GArray *connections; GArray *bandwidths; GstSDPKey key; GArray *attributes; } GstSDPMedia;
The contents of the SDP "m=" field with all related fields.
the media type | |
the transport port to which the media stream will be sent | |
the number of ports or -1 if only one port was specified | |
the transport protocol | |
an array of gchar formats | |
the media title | |
array of GstSDPConnection with media connection information | |
array of GstSDPBandwidth with media bandwidth information | |
GstSDPKey |
the encryption key |
array of GstSDPAttribute with the additional media attributes |
typedef struct { gchar *version; GstSDPOrigin origin; gchar *session_name; gchar *information; gchar *uri; GArray *emails; GArray *phones; GstSDPConnection connection; GArray *bandwidths; GArray *times; GArray *zones; GstSDPKey key; GArray *attributes; GArray *medias; } GstSDPMessage;
The contents of the SDP message.
the protocol version | |
GstSDPOrigin |
owner/creator and session identifier |
session name | |
session information | |
URI of description | |
array of gchar with email addresses | |
array of gchar with phone numbers | |
GstSDPConnection |
connection information for the session |
array of GstSDPBandwidth with bandwidth information | |
array of GstSDPTime with time descriptions | |
array of GstSDPZone with time zone adjustments | |
GstSDPKey |
encryption key |
array of GstSDPAttribute with session attributes | |
array of GstSDPMedia with media descriptions |
GstSDPResult gst_sdp_message_new (GstSDPMessage **msg
);
Allocate a new GstSDPMessage and store the result in msg
.
|
pointer to new GstSDPMessage |
Returns : |
a GstSDPResult. |
GstSDPResult gst_sdp_message_init (GstSDPMessage *msg
);
Initialize msg
so that its contents are as if it was freshly allocated
with gst_sdp_message_new()
. This function is mostly used to initialize a message
allocated on the stack. gst_sdp_message_uninit()
undoes this operation.
When this function is invoked on newly allocated data (with malloc or on the stack), its contents should be set to 0 before calling this function.
|
a GstSDPMessage |
Returns : |
a GstSDPResult. |
GstSDPResult gst_sdp_message_uninit (GstSDPMessage *msg
);
Free all resources allocated in msg
. msg
should not be used anymore after
this function. This function should be used when msg
was allocated on the
stack and initialized with gst_sdp_message_init()
.
|
a GstSDPMessage |
Returns : |
a GstSDPResult. |
GstSDPResult gst_sdp_message_free (GstSDPMessage *msg
);
Free all resources allocated by msg
. msg
should not be used anymore after
this function. This function should be used when msg
was dynamically
allocated with gst_sdp_message_new()
.
|
a GstSDPMessage |
Returns : |
a GstSDPResult. |
GstSDPResult gst_sdp_message_parse_buffer (const guint8 *data
,guint size
,GstSDPMessage *msg
);
Parse the contents of size
bytes pointed to by data
and store the result in
msg
.
|
the start of the buffer |
|
the size of the buffer |
|
the result GstSDPMessage |
Returns : |
GST_SDP_OK on success. |
gchar* gst_sdp_message_as_text (const GstSDPMessage *msg
);
Convert the contents of msg
to a text string.
|
a GstSDPMessage |
Returns : |
A dynamically allocated string representing the SDP description. |
GstSDPResult gst_sdp_message_parse_uri (const gchar *uri
,GstSDPMessage *msg
);
Parse the null-terminated uri
and store the result in msg
.
The uri should be of the form:
scheme://[address[:ttl=ttl][:noa=noa]]/[sessionname] [type=value *[&type=value]]
where value is url encoded. This looslely resembles http://tools.ietf.org/html/draft-fujikawa-sdp-url-01
|
the start of the uri |
|
the result GstSDPMessage |
Returns : |
GST_SDP_OK on success. |
Since 0.10.31
gchar* gst_sdp_message_as_uri (const gchar *scheme
,const GstSDPMessage *msg
);
Creates a uri from msg
with the given scheme
. The uri has the format:
scheme
:///[type=value *[&type=value]]
Where each value is url encoded.
|
the uri scheme |
|
the GstSDPMessage |
Returns : |
a uri for msg .
|
Since 0.10.31
gboolean gst_sdp_address_is_multicast (const gchar *nettype
,const gchar *addrtype
,const gchar *addr
);
Check if the given addr
is a multicast address.
|
a network type |
|
an address type |
|
an address |
Returns : |
TRUE when addr is multicast.
|
Since 0.10.32
const gchar* gst_sdp_message_get_version (const GstSDPMessage *msg
);
Get the version in msg
.
|
a GstSDPMessage |
Returns : |
a GstSDPResult. |
GstSDPResult gst_sdp_message_set_version (GstSDPMessage *msg
,const gchar *version
);
Set the version in msg
.
|
a GstSDPMessage |
|
the version |
Returns : |
a GstSDPResult. |
const GstSDPOrigin* gst_sdp_message_get_origin (const GstSDPMessage *msg
);
Get the origin of msg
.
|
a GstSDPMessage |
Returns : |
a GstSDPOrigin. The result remains valid as long as msg is valid.
|
GstSDPResult gst_sdp_message_set_origin (GstSDPMessage *msg
,const gchar *username
,const gchar *sess_id
,const gchar *sess_version
,const gchar *nettype
,const gchar *addrtype
,const gchar *addr
);
Configure the SDP origin in msg
with the given parameters.
|
a GstSDPMessage |
|
the user name |
|
a session id |
|
a session version |
|
a network type |
|
an address type |
|
an address |
Returns : |
GST_SDP_OK. |
const gchar* gst_sdp_message_get_session_name (const GstSDPMessage *msg
);
Get the session name in msg
.
|
a GstSDPMessage |
Returns : |
a GstSDPResult. |
GstSDPResult gst_sdp_message_set_session_name (GstSDPMessage *msg
,const gchar *session_name
);
Set the session name in msg
.
|
a GstSDPMessage |
|
the session name |
Returns : |
a GstSDPResult. |
const gchar* gst_sdp_message_get_information (const GstSDPMessage *msg
);
Get the information in msg
.
|
a GstSDPMessage |
Returns : |
a GstSDPResult. |
GstSDPResult gst_sdp_message_set_information (GstSDPMessage *msg
,const gchar *information
);
Set the information in msg
.
|
a GstSDPMessage |
|
the information |
Returns : |
a GstSDPResult. |
const gchar* gst_sdp_message_get_uri (const GstSDPMessage *msg
);
Get the URI in msg
.
|
a GstSDPMessage |
Returns : |
a GstSDPResult. |
GstSDPResult gst_sdp_message_set_uri (GstSDPMessage *msg
,const gchar *uri
);
Set the URI in msg
.
|
a GstSDPMessage |
|
the URI |
Returns : |
a GstSDPResult. |
guint gst_sdp_message_emails_len (const GstSDPMessage *msg
);
Get the number of emails in msg
.
|
a GstSDPMessage |
Returns : |
the number of emails in msg .
|
const gchar* gst_sdp_message_get_email (const GstSDPMessage *msg
,guint idx
);
Get the email with number idx
from msg
.
|
a GstSDPMessage |
|
an email index |
Returns : |
the email at position idx .
|
GstSDPResult gst_sdp_message_add_email (GstSDPMessage *msg
,const gchar *email
);
Add email
to the list of emails in msg
.
|
a GstSDPMessage |
|
an email |
Returns : |
a GstSDPResult. |
guint gst_sdp_message_phones_len (const GstSDPMessage *msg
);
Get the number of phones in msg
.
|
a GstSDPMessage |
Returns : |
the number of phones in msg .
|
const gchar* gst_sdp_message_get_phone (const GstSDPMessage *msg
,guint idx
);
Get the phone with number idx
from msg
.
|
a GstSDPMessage |
|
a phone index |
Returns : |
the phone at position idx .
|
GstSDPResult gst_sdp_message_add_phone (GstSDPMessage *msg
,const gchar *phone
);
Add phone
to the list of phones in msg
.
|
a GstSDPMessage |
|
a phone |
Returns : |
a GstSDPResult. |
const GstSDPConnection* gst_sdp_message_get_connection (const GstSDPMessage *msg
);
Get the connection of msg
.
|
a GstSDPMessage |
Returns : |
a GstSDPConnection. The result remains valid as long as msg is valid.
|
GstSDPResult gst_sdp_message_set_connection (GstSDPMessage *msg
,const gchar *nettype
,const gchar *addrtype
,const gchar *address
,guint ttl
,guint addr_number
);
Configure the SDP connection in msg
with the given parameters.
|
a GstSDPMessage |
|
the type of network. "IN" is defined to have the meaning "Internet". |
|
the type of address. |
|
the address |
|
the time to live of the address |
|
the number of layers |
Returns : |
a GstSDPResult. |
guint gst_sdp_message_bandwidths_len (const GstSDPMessage *msg
);
Get the number of bandwidth information in msg
.
|
a GstSDPMessage |
Returns : |
the number of bandwidth information in msg .
|
const GstSDPBandwidth* gst_sdp_message_get_bandwidth (const GstSDPMessage *msg
,guint idx
);
Get the bandwidth at index idx
from msg
.
|
a GstSDPMessage |
|
the bandwidth index |
Returns : |
a GstSDPBandwidth. |
GstSDPResult gst_sdp_message_add_bandwidth (GstSDPMessage *msg
,const gchar *bwtype
,guint bandwidth
);
Add the specified bandwidth information to msg
.
|
a GstSDPMessage |
|
the bandwidth modifier type |
|
the bandwidth in kilobits per second |
Returns : |
a GstSDPResult. |
guint gst_sdp_message_times_len (const GstSDPMessage *msg
);
Get the number of time information entries in msg
.
|
a GstSDPMessage |
Returns : |
the number of time information entries in msg .
|
const GstSDPTime* gst_sdp_message_get_time (const GstSDPMessage *msg
,guint idx
);
Get time information with index idx
from msg
.
|
a GstSDPMessage |
|
the time index |
Returns : |
a GstSDPTime. |
GstSDPResult gst_sdp_message_add_time (GstSDPMessage *msg
,const gchar *start
,const gchar *stop
,const gchar **repeat
);
Add time information start
and stop
to msg
.
|
a GstSDPMessage |
|
the start time |
|
the stop time |
|
the repeat times |
Returns : |
a GstSDPResult. |
guint gst_sdp_message_zones_len (const GstSDPMessage *msg
);
Get the number of time zone information entries in msg
.
|
a GstSDPMessage |
Returns : |
the number of time zone information entries in msg .
|
const GstSDPZone* gst_sdp_message_get_zone (const GstSDPMessage *msg
,guint idx
);
Get time zone information with index idx
from msg
.
|
a GstSDPMessage |
|
the zone index |
Returns : |
a GstSDPZone. |
GstSDPResult gst_sdp_message_add_zone (GstSDPMessage *msg
,const gchar *adj_time
,const gchar *typed_time
);
Add time zone information to msg
.
|
a GstSDPMessage |
|
the NTP time that a time zone adjustment happens |
|
the offset from the time when the session was first scheduled |
Returns : |
a GstSDPResult. |
const GstSDPKey* gst_sdp_message_get_key (const GstSDPMessage *msg
);
Get the encryption information from msg
.
|
a GstSDPMessage |
Returns : |
a GstSDPKey. |
GstSDPResult gst_sdp_message_set_key (GstSDPMessage *msg
,const gchar *type
,const gchar *data
);
Adds the encryption information to msg
.
|
a GstSDPMessage |
|
the encryption type |
|
the encryption data |
Returns : |
a GstSDPResult. |
guint gst_sdp_message_attributes_len (const GstSDPMessage *msg
);
Get the number of attributes in msg
.
|
a GstSDPMessage |
Returns : |
the number of attributes in msg .
|
const GstSDPAttribute* gst_sdp_message_get_attribute (const GstSDPMessage *msg
,guint idx
);
Get the attribute at position idx
in msg
.
|
a GstSDPMessage |
|
the index |
Returns : |
the GstSDPAttribute at position idx .
|
const gchar* gst_sdp_message_get_attribute_val (const GstSDPMessage *msg
,const gchar *key
);
Get the first attribute with key key
in msg
.
|
a GstSDPMessage |
|
the key |
Returns : |
the attribute value of the first attribute with key .
|
const gchar* gst_sdp_message_get_attribute_val_n (const GstSDPMessage *msg
,const gchar *key
,guint nth
);
Get the nth
attribute with key key
in msg
.
|
a GstSDPMessage |
|
the key |
|
the index |
Returns : |
the attribute value of the nth attribute with key .
|
GstSDPResult gst_sdp_message_add_attribute (GstSDPMessage *msg
,const gchar *key
,const gchar *value
);
Add the attribute with key
and value
to msg
.
|
a GstSDPMessage |
|
the key |
|
the value |
Returns : |
GST_SDP_OK .
|
guint gst_sdp_message_medias_len (const GstSDPMessage *msg
);
Get the number of media descriptions in msg
.
|
a GstSDPMessage |
Returns : |
the number of media descriptions in msg .
|
const GstSDPMedia* gst_sdp_message_get_media (const GstSDPMessage *msg
,guint idx
);
Get the media description at index idx
in msg
.
|
a GstSDPMessage |
|
the index |
Returns : |
a GstSDPMedia. |
GstSDPResult gst_sdp_message_add_media (GstSDPMessage *msg
,GstSDPMedia *media
);
Adds media
to the array of medias in msg
. This function takes ownership of
the contents of media
so that media
will have to be reinitialized with
gst_media_init()
before it can be used again.
|
a GstSDPMessage |
|
a GstSDPMedia to add |
Returns : |
a GstSDPResult. |
GstSDPResult gst_sdp_message_dump (const GstSDPMessage *msg
);
Dump the parsed contents of msg
to stdout.
|
a GstSDPMessage |
Returns : |
a GstSDPResult. |
GstSDPResult gst_sdp_media_new (GstSDPMedia **media
);
Allocate a new GstSDPMedia and store the result in media
.
|
pointer to new GstSDPMedia |
Returns : |
a GstSDPResult. |
GstSDPResult gst_sdp_media_init (GstSDPMedia *media
);
Initialize media
so that its contents are as if it was freshly allocated
with gst_sdp_media_new()
. This function is mostly used to initialize a media
allocated on the stack. gst_sdp_media_uninit()
undoes this operation.
When this function is invoked on newly allocated data (with malloc or on the stack), its contents should be set to 0 before calling this function.
|
a GstSDPMedia |
Returns : |
a GstSDPResult. |
GstSDPResult gst_sdp_media_uninit (GstSDPMedia *media
);
Free all resources allocated in media
. media
should not be used anymore after
this function. This function should be used when media
was allocated on the
stack and initialized with gst_sdp_media_init()
.
|
a GstSDPMedia |
Returns : |
a GstSDPResult. |
GstSDPResult gst_sdp_media_free (GstSDPMedia *media
);
Free all resources allocated by media
. media
should not be used anymore after
this function. This function should be used when media
was dynamically
allocated with gst_sdp_media_new()
.
|
a GstSDPMedia |
Returns : |
a GstSDPResult. |
const gchar* gst_sdp_media_get_media (const GstSDPMedia *media
);
Get the media description of media
.
|
a GstSDPMedia |
Returns : |
the media description. |
GstSDPResult gst_sdp_media_set_media (GstSDPMedia *media
,const gchar *med
);
Set the media description of media
to med
.
|
a GstSDPMedia |
|
the media description |
Returns : |
GST_SDP_OK. |
guint gst_sdp_media_get_port (const GstSDPMedia *media
);
Get the port number for media
.
|
a GstSDPMedia |
Returns : |
the port number of media .
|
guint gst_sdp_media_get_num_ports (const GstSDPMedia *media
);
Get the number of ports for media
.
|
a GstSDPMedia |
Returns : |
the number of ports for media .
|
GstSDPResult gst_sdp_media_set_port_info (GstSDPMedia *media
,guint port
,guint num_ports
);
Set the port information in media
.
|
a GstSDPMedia |
|
the port number |
|
the number of ports |
Returns : |
GST_SDP_OK. |
const gchar* gst_sdp_media_get_proto (const GstSDPMedia *media
);
Get the transport protocol of media
|
a GstSDPMedia |
Returns : |
the transport protocol of media .
|
GstSDPResult gst_sdp_media_set_proto (GstSDPMedia *media
,const gchar *proto
);
Set the media transport protocol of media
to proto
.
|
a GstSDPMedia |
|
the media transport protocol |
Returns : |
GST_SDP_OK. |
guint gst_sdp_media_formats_len (const GstSDPMedia *media
);
Get the number of formats in media
.
|
a GstSDPMedia |
Returns : |
the number of formats in media .
|
const gchar* gst_sdp_media_get_format (const GstSDPMedia *media
,guint idx
);
Get the format information at position idx
in media
.
|
a GstSDPMedia |
|
an index |
Returns : |
the format at position idx .
|
GstSDPResult gst_sdp_media_add_format (GstSDPMedia *media
,const gchar *format
);
Add the format information to media
.
|
a GstSDPMedia |
|
the format |
Returns : |
GST_SDP_OK. |
const gchar* gst_sdp_media_get_information (const GstSDPMedia *media
);
Get the information of media
|
a GstSDPMedia |
Returns : |
the information of media .
|
GstSDPResult gst_sdp_media_set_information (GstSDPMedia *media
,const gchar *information
);
Set the media information of media
to information
.
|
a GstSDPMedia |
|
the media information |
Returns : |
GST_SDP_OK. |
guint gst_sdp_media_connections_len (const GstSDPMedia *media
);
Get the number of connection fields in media
.
|
a GstSDPMedia |
Returns : |
the number of connections in media .
|
const GstSDPConnection* gst_sdp_media_get_connection (const GstSDPMedia *media
,guint idx
);
Get the connection at position idx
in media
.
|
a GstSDPMedia |
|
an index |
Returns : |
the GstSDPConnection at position idx .
|
GstSDPResult gst_sdp_media_add_connection (GstSDPMedia *media
,const gchar *nettype
,const gchar *addrtype
,const gchar *address
,guint ttl
,guint addr_number
);
Add the given connection parameters to media
.
|
a GstSDPMedia |
|
the type of network. "IN" is defined to have the meaning "Internet". |
|
the type of address. |
|
the address |
|
the time to live of the address |
|
the number of layers |
Returns : |
a GstSDPResult. |
guint gst_sdp_media_bandwidths_len (const GstSDPMedia *media
);
Get the number of bandwidth fields in media
.
|
a GstSDPMedia |
Returns : |
the number of bandwidths in media .
|
const GstSDPBandwidth* gst_sdp_media_get_bandwidth (const GstSDPMedia *media
,guint idx
);
Get the bandwidth at position idx
in media
.
|
a GstSDPMedia |
|
an index |
Returns : |
the GstSDPBandwidth at position idx .
|
GstSDPResult gst_sdp_media_add_bandwidth (GstSDPMedia *media
,const gchar *bwtype
,guint bandwidth
);
Add the bandwidth information with bwtype
and bandwidth
to media
.
|
a GstSDPMedia |
|
the bandwidth modifier type |
|
the bandwidth in kilobits per second |
Returns : |
GST_SDP_OK. |
const GstSDPKey* gst_sdp_media_get_key (const GstSDPMedia *media
);
Get the encryption information from media
.
|
a GstSDPMedia |
Returns : |
a GstSDPKey. |
GstSDPResult gst_sdp_media_set_key (GstSDPMedia *media
,const gchar *type
,const gchar *data
);
Adds the encryption information to media
.
|
a GstSDPMedia |
|
the encryption type |
|
the encryption data |
Returns : |
a GstSDPResult. |
guint gst_sdp_media_attributes_len (const GstSDPMedia *media
);
Get the number of attribute fields in media
.
|
a GstSDPMedia |
Returns : |
the number of attributes in media .
|
const GstSDPAttribute * gst_sdp_media_get_attribute (const GstSDPMedia *media
,guint idx
);
Get the attribute at position idx
in media
.
|
a GstSDPMedia |
|
an index |
Returns : |
the GstSDPAttribute at position idx .
|
const gchar* gst_sdp_media_get_attribute_val (const GstSDPMedia *media
,const gchar *key
);
Get the first attribute value for key
in media
.
|
a GstSDPMedia |
|
a key |
Returns : |
the first attribute value for key .
|
const gchar* gst_sdp_media_get_attribute_val_n (const GstSDPMedia *media
,const gchar *key
,guint nth
);
Get the nth
attribute value for key
in media
.
|
a GstSDPMedia |
|
a key |
|
an index |
Returns : |
the nth attribute value.
|
GstSDPResult gst_sdp_media_add_attribute (GstSDPMedia *media
,const gchar *key
,const gchar *value
);
Add the attribute with key
and value
to media
.
|
a GstSDPMedia |
|
a key |
|
a value |
Returns : |
GST_SDP_OK. |
gchar* gst_sdp_media_as_text (const GstSDPMedia *media
);
Convert the contents of media
to a text string.
|
a GstSDPMedia |
Returns : |
A dynamically allocated string representing the media. |