Commit f1491348 authored by Peter Kjellerstedt's avatar Peter Kjellerstedt Committed by Wim Taymans

gst-libs/gst/sdp/gstsdpmessage.*: Separate INIT_ARRAY() and related macros...

gst-libs/gst/sdp/gstsdpmessage.*: Separate INIT_ARRAY() and related macros into two versions, one for structures and ...

Original commit message from CVS:
Patch by: Peter Kjellerstedt  <pkj at axis com>
* gst-libs/gst/sdp/gstsdpmessage.c: (gst_sdp_time_init),
(gst_sdp_message_init), (gst_sdp_message_uninit),
(is_multicast_address), (gst_sdp_message_as_text),
(gst_sdp_message_get_origin), (gst_sdp_message_set_connection),
(gst_sdp_message_get_connection), (gst_sdp_message_add_bandwidth),
(gst_sdp_message_add_time), (gst_sdp_message_add_zone),
(gst_sdp_message_get_key), (gst_sdp_message_get_attribute_val_n),
(gst_sdp_message_get_attribute_val), (gst_sdp_message_add_media),
(gst_sdp_media_init), (gst_sdp_media_uninit),
(gst_sdp_media_as_text), (gst_sdp_media_set_port_info),
(gst_sdp_media_connections_len), (gst_sdp_media_add_connection),
(gst_sdp_media_bandwidths_len), (gst_sdp_media_get_bandwidth),
(gst_sdp_media_add_bandwidth), (gst_sdp_media_attributes_len),
(gst_sdp_parse_line), (print_media), (gst_sdp_message_dump):
* gst-libs/gst/sdp/gstsdpmessage.h:
Separate INIT_ARRAY() and related macros into two versions, one for
structures and one for pointers (e.g., INIT_ARRAY() and
INIT_PTR_ARRAY()). This fixes a segmentation error on freeing the
lists of emails and phone numbers.
Add missing const as appropriate.
Change all gint to guint since they all actually represent unsigned
values.
Do not use time as a variable name as it shadows the global time().
Add gst_sdp_message_as_text() and gst_sdp_media_as_text().
Actually implement gst_sdp_message_add_time().
Make gst_sdp_message_add_time() take repeat times as an argument.
Store repeat times in GstSDPTime as a GArray rather than as gchar**.
Corrected the definition of gst_sdp_media_get_bandwidth() (was
misspelled as badwidth).
gst-indented and a little clean up. Fixes #471067.
parent 6d7debb0
2007-09-05 Wim Taymans <wim.taymans@gmail.com>
Patch by: Peter Kjellerstedt <pkj at axis com>
* gst-libs/gst/sdp/gstsdpmessage.c: (gst_sdp_time_init),
(gst_sdp_message_init), (gst_sdp_message_uninit),
(is_multicast_address), (gst_sdp_message_as_text),
(gst_sdp_message_get_origin), (gst_sdp_message_set_connection),
(gst_sdp_message_get_connection), (gst_sdp_message_add_bandwidth),
(gst_sdp_message_add_time), (gst_sdp_message_add_zone),
(gst_sdp_message_get_key), (gst_sdp_message_get_attribute_val_n),
(gst_sdp_message_get_attribute_val), (gst_sdp_message_add_media),
(gst_sdp_media_init), (gst_sdp_media_uninit),
(gst_sdp_media_as_text), (gst_sdp_media_set_port_info),
(gst_sdp_media_connections_len), (gst_sdp_media_add_connection),
(gst_sdp_media_bandwidths_len), (gst_sdp_media_get_bandwidth),
(gst_sdp_media_add_bandwidth), (gst_sdp_media_attributes_len),
(gst_sdp_parse_line), (print_media), (gst_sdp_message_dump):
* gst-libs/gst/sdp/gstsdpmessage.h:
Separate INIT_ARRAY() and related macros into two versions, one for
structures and one for pointers (e.g., INIT_ARRAY() and
INIT_PTR_ARRAY()). This fixes a segmentation error on freeing the
lists of emails and phone numbers.
Add missing const as appropriate.
Change all gint to guint since they all actually represent unsigned
values.
Do not use time as a variable name as it shadows the global time().
Add gst_sdp_message_as_text() and gst_sdp_media_as_text().
Actually implement gst_sdp_message_add_time().
Make gst_sdp_message_add_time() take repeat times as an argument.
Store repeat times in GstSDPTime as a GArray rather than as gchar**.
Corrected the definition of gst_sdp_media_get_bandwidth() (was
misspelled as badwidth).
gst-indented and a little clean up. Fixes #471067.
2007-09-05 Sebastian Dröge <slomo@circular-chaos.org>
* gst/volume/gstvolume.c: (volume_choose_func),
......@@ -25,10 +60,12 @@
2007-09-04 Wim Taymans <wim.taymans@gmail.com>
Patch by: Laurent Glayal <spglegle at yahoo dot fr>
* gst-libs/gst/rtp/gstbasertpaudiopayload.c:
(gst_base_rtp_payload_audio_handle_event):
Return FALSE from the event handler to let the parent class handle the
event.
event. Fixes #446766.
* gst-libs/gst/rtp/gstbasertpdepayload.c:
(gst_base_rtp_depayload_chain), (gst_base_rtp_depayload_push_full):
This diff is collapsed.
......@@ -58,8 +58,8 @@ G_BEGIN_DECLS
* session.
* @sess_version: a version number for this announcement
* @nettype: the type of network. "IN" is defined to have the meaning
* "Internet".
* @addrtype: the type of @addr.
* "Internet".
* @addrtype: the type of @addr.
* @addr: the globally unique address of the machine from which the session was
* created.
*
......@@ -79,8 +79,8 @@ typedef struct {
/**
* GstSDPConnection:
* @nettype: the type of network. "IN" is defined to have the meaning
* "Internet".
* @addrtype: the type of @address.
* "Internet".
* @addrtype: the type of @address.
* @address: the address
* @ttl: the time to live of the address
* @addr_number: the number of layers
......@@ -88,11 +88,11 @@ typedef struct {
* The contents of the SDP "c=" field which contains connection data.
*/
typedef struct {
gchar *nettype;
gchar *addrtype;
gchar *nettype;
gchar *addrtype;
gchar *address;
gint ttl;
gint addr_number;
guint ttl;
guint addr_number;
} GstSDPConnection;
/**
......@@ -124,7 +124,7 @@ typedef struct {
*/
typedef struct {
gchar *bwtype;
gint bandwidth;
guint bandwidth;
} GstSDPBandwidth;
/**
......@@ -133,17 +133,15 @@ typedef struct {
* representation of Network Time Protocol (NTP) time values in seconds
* @stop: stop time for the conference. The value is the decimal
* representation of Network Time Protocol (NTP) time values in seconds
* @n_repeat: the number of repeat times
* @repeat: repeat times for a session
*
* The contents of the SDP "t=" field which specify the start and stop times for
* a conference session.
*/
typedef struct {
gchar *start;
gchar *stop;
gint n_repeat;
gchar **repeat;
gchar *start;
gchar *stop;
GArray *repeat;
} GstSDPTime;
/**
......@@ -202,8 +200,8 @@ typedef struct {
*/
typedef struct {
gchar *media;
gint port;
gint num_ports;
guint port;
guint num_ports;
gchar *proto;
GArray *fmts;
gchar *information;
......@@ -217,7 +215,7 @@ typedef struct {
* GstSDPMessage:
* @version: the protocol version
* @origin: owner/creator and session identifier
* @session_name: session name
* @session_name: session name
* @information: session information
* @uri: URI of description
* @emails: array of #gchar with email addresses
......@@ -237,7 +235,7 @@ typedef struct {
GstSDPOrigin origin;
gchar *session_name;
gchar *information;
gchar *uri;
gchar *uri;
GArray *emails;
GArray *phones;
GstSDPConnection connection;
......@@ -257,68 +255,70 @@ GstSDPResult gst_sdp_message_free (GstSDPMessage *msg)
GstSDPResult gst_sdp_message_parse_buffer (const guint8 *data, guint size, GstSDPMessage *msg);
const gchar* gst_sdp_message_get_version (GstSDPMessage *msg);
gchar* gst_sdp_message_as_text (const GstSDPMessage *msg);
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 (GstSDPMessage *msg);
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 (GstSDPMessage *msg);
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 (GstSDPMessage *msg);
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 (GstSDPMessage *msg);
const gchar* gst_sdp_message_get_uri (const GstSDPMessage *msg);
GstSDPResult gst_sdp_message_set_uri (GstSDPMessage *msg, const gchar *uri);
gint gst_sdp_message_emails_len (GstSDPMessage *msg);
const gchar* gst_sdp_message_get_email (GstSDPMessage *msg, guint idx);
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);
gint gst_sdp_message_phones_len (GstSDPMessage *msg);
const gchar* gst_sdp_message_get_phone (GstSDPMessage *msg, guint idx);
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 (GstSDPMessage *msg);
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,
gint ttl, gint addr_number);
guint ttl, guint addr_number);
gint gst_sdp_message_bandwidths_len (GstSDPMessage *msg);
const GstSDPBandwidth* gst_sdp_message_get_bandwidth (GstSDPMessage *msg, guint idx);
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,
gint bandwidth);
guint bandwidth);
gint gst_sdp_message_times_len (GstSDPMessage *msg);
const GstSDPTime* gst_sdp_message_get_time (GstSDPMessage *msg, guint idx);
GstSDPResult gst_sdp_message_add_time (GstSDPMessage *msg, const gchar *time);
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);
gint gst_sdp_message_zones_len (GstSDPMessage *msg);
const GstSDPZone* gst_sdp_message_get_zone (GstSDPMessage *msg, guint idx);
GstSDPResult gst_sdp_message_add_zone (GstSDPMessage *msg, const gchar *time,
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 (GstSDPMessage *msg);
const GstSDPKey* gst_sdp_message_get_key (const GstSDPMessage *msg);
GstSDPResult gst_sdp_message_set_key (GstSDPMessage *msg, const gchar *type,
const gchar *data);
gint gst_sdp_message_attributes_len (GstSDPMessage *msg);
const GstSDPAttribute* gst_sdp_message_get_attribute (GstSDPMessage *msg, guint idx);
const gchar* gst_sdp_message_get_attribute_val (GstSDPMessage *msg, const gchar *key);
const gchar* gst_sdp_message_get_attribute_val_n (GstSDPMessage *msg, const gchar *key,
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);
gint gst_sdp_message_medias_len (GstSDPMessage *msg);
const GstSDPMedia* gst_sdp_message_get_media (GstSDPMessage *msg, guint idx);
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 (GstSDPMessage *msg);
GstSDPResult gst_sdp_message_dump (const GstSDPMessage *msg);
/* Media descriptions */
GstSDPResult gst_sdp_media_new (GstSDPMedia **media);
......@@ -326,40 +326,42 @@ GstSDPResult gst_sdp_media_init (GstSDPMedia *media)
GstSDPResult gst_sdp_media_uninit (GstSDPMedia *media);
GstSDPResult gst_sdp_media_free (GstSDPMedia *media);
gchar* gst_sdp_media_as_text (const GstSDPMedia *media);
const gchar* gst_sdp_media_get_media (const GstSDPMedia *media);
GstSDPResult gst_sdp_media_set_media (GstSDPMedia *media, const gchar *med);
gint gst_sdp_media_get_port (const GstSDPMedia *media);
gint gst_sdp_media_get_num_ports (const GstSDPMedia *media);
GstSDPResult gst_sdp_media_set_port_info (GstSDPMedia *media, gint port,
gint num_ports);
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);
gint gst_sdp_media_formats_len (const GstSDPMedia *media);
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);
gint gst_sdp_media_connections_len (const GstSDPMedia *media);
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,
gint ttl, gint addr_number);
guint ttl, guint addr_number);
gint gst_sdp_media_bandwidths_len (const GstSDPMedia *media);
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,
gint bandwidth);
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);
gint gst_sdp_media_attributes_len (const GstSDPMedia *media);
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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment