GNOME Bugzilla – Bug 471067
Make the SDP code useable for generating SDP descriptions
Last modified: 2007-09-05 23:08:07 UTC
Please describe the problem: The attached patch makes a number of changes to the SDP code to make it possible to use it to generate SDP descriptions. More specifically: * 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. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 94493 [details] [review] Support for generating SDP descriptions
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.