diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index b8c975b38f..ea8d99cffb 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -2242,11 +2242,11 @@ gst_segment_flags_get_type GstStructure GstStructureForeachFunc GstStructureMapFunc -gst_structure_empty_new -gst_structure_id_empty_new +gst_structure_new_empty +gst_structure_new_id_empty gst_structure_new gst_structure_new_valist -gst_structure_id_new +gst_structure_new_id gst_structure_copy gst_structure_free gst_structure_get_name diff --git a/docs/random/porting-to-0.11.txt b/docs/random/porting-to-0.11.txt index 9785164d83..d10efaf8e8 100644 --- a/docs/random/porting-to-0.11.txt +++ b/docs/random/porting-to-0.11.txt @@ -239,6 +239,10 @@ The 0.11 porting guide accessible from the application anymore. Use the methods to retrieve and modify fields from the array. + gst_structure_empty_new() -> gst_structure_new_empty() + gst_structure_id_empty_new() -> gst_structure_new_id_empty() + gst_structure_id_new() -> gst_structure_new_id() + * GstEvent GST_EVENT_SRC is removed. Don't use this anymore. diff --git a/gst/gstbufferpool.c b/gst/gstbufferpool.c index 4797d385ee..f4237e8c48 100644 --- a/gst/gstbufferpool.c +++ b/gst/gstbufferpool.c @@ -117,7 +117,7 @@ gst_buffer_pool_init (GstBufferPool * pool) pool->active = FALSE; pool->configured = FALSE; pool->started = FALSE; - pool->config = gst_structure_id_empty_new (GST_QUARK (BUFFER_POOL_CONFIG)); + pool->config = gst_structure_new_id_empty (GST_QUARK (BUFFER_POOL_CONFIG)); gst_buffer_pool_config_set (pool->config, NULL, 0, 0, 0, 0, 0); gst_poll_write_control (pool->poll); diff --git a/gst/gstcaps.c b/gst/gstcaps.c index 09c0f46170..ef04217d50 100644 --- a/gst/gstcaps.c +++ b/gst/gstcaps.c @@ -249,7 +249,7 @@ gst_caps_new_empty_simple (const char *media_type) GstStructure *structure; caps = gst_caps_new_empty (); - structure = gst_structure_empty_new (media_type); + structure = gst_structure_new_empty (media_type); if (structure) gst_caps_append_structure_unchecked (caps, structure); @@ -1496,7 +1496,7 @@ gst_caps_structure_union (const GstStructure * struct1, if (struct1->name != struct2->name) return NULL; - dest = gst_structure_id_empty_new (struct1->name); + dest = gst_structure_new_id_empty (struct1->name); for (i = 0; i < struct1->fields->len; i++) { GValue dest_value = { 0 }; diff --git a/gst/gstelement.c b/gst/gstelement.c index 1abce1a41d..5ad1f59762 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -246,7 +246,7 @@ gst_element_base_class_init (gpointer g_class) * the details in class_init instead of base_init */ element_class->metadata = element_class->metadata ? gst_structure_copy (element_class->metadata) : - gst_structure_empty_new ("metadata"); + gst_structure_new_empty ("metadata"); /* Copy the pad templates so elements inherit them * from their base class but elements can add pad templates in class_init diff --git a/gst/gstevent.c b/gst/gstevent.c index 9b31f43873..0b00645e6a 100644 --- a/gst/gstevent.c +++ b/gst/gstevent.c @@ -366,7 +366,7 @@ gst_event_writable_structure (GstEvent * event) if (structure == NULL) { structure = - gst_structure_id_empty_new (gst_event_type_to_quark (GST_EVENT_TYPE + gst_structure_new_id_empty (gst_event_type_to_quark (GST_EVENT_TYPE (event))); gst_structure_set_parent_refcount (structure, &event->mini_object.refcount); GST_EVENT_STRUCTURE (event) = structure; @@ -506,7 +506,7 @@ gst_event_new_flush_stop (gboolean reset_time) GST_CAT_INFO (GST_CAT_EVENT, "creating flush stop %d", reset_time); event = gst_event_new_custom (GST_EVENT_FLUSH_STOP, - gst_structure_id_new (GST_QUARK (EVENT_FLUSH_STOP), + gst_structure_new_id (GST_QUARK (EVENT_FLUSH_STOP), GST_QUARK (RESET_TIME), G_TYPE_BOOLEAN, reset_time, NULL)); return event; @@ -580,7 +580,7 @@ gst_event_new_caps (GstCaps * caps) GST_CAT_INFO (GST_CAT_EVENT, "creating caps event %" GST_PTR_FORMAT, caps); event = gst_event_new_custom (GST_EVENT_CAPS, - gst_structure_id_new (GST_QUARK (EVENT_CAPS), + gst_structure_new_id (GST_QUARK (EVENT_CAPS), GST_QUARK (CAPS), GST_TYPE_CAPS, caps, NULL)); return event; @@ -658,7 +658,7 @@ gst_event_new_segment (GstSegment * segment) segment); event = gst_event_new_custom (GST_EVENT_SEGMENT, - gst_structure_id_new (GST_QUARK (EVENT_SEGMENT), + gst_structure_new_id (GST_QUARK (EVENT_SEGMENT), GST_QUARK (SEGMENT), GST_TYPE_SEGMENT, segment, NULL)); return event; @@ -774,7 +774,7 @@ gst_event_new_buffer_size (GstFormat format, gint64 minsize, ", maxsize %" G_GINT64_FORMAT ", async %d", gst_format_get_name (format), minsize, maxsize, async); - structure = gst_structure_id_new (GST_QUARK (EVENT_BUFFER_SIZE), + structure = gst_structure_new_id (GST_QUARK (EVENT_BUFFER_SIZE), GST_QUARK (FORMAT), GST_TYPE_FORMAT, format, GST_QUARK (MINSIZE), G_TYPE_INT64, minsize, GST_QUARK (MAXSIZE), G_TYPE_INT64, maxsize, @@ -889,7 +889,7 @@ gst_event_new_qos (GstQOSType type, gdouble proportion, ", timestamp %" GST_TIME_FORMAT, type, proportion, diff, GST_TIME_ARGS (timestamp)); - structure = gst_structure_id_new (GST_QUARK (EVENT_QOS), + structure = gst_structure_new_id (GST_QUARK (EVENT_QOS), GST_QUARK (TYPE), GST_TYPE_QOS_TYPE, type, GST_QUARK (PROPORTION), G_TYPE_DOUBLE, proportion, GST_QUARK (DIFF), G_TYPE_INT64, diff, @@ -1007,7 +1007,7 @@ gst_event_new_seek (gdouble rate, GstFormat format, GstSeekFlags flags, stop); } - structure = gst_structure_id_new (GST_QUARK (EVENT_SEEK), + structure = gst_structure_new_id (GST_QUARK (EVENT_SEEK), GST_QUARK (RATE), G_TYPE_DOUBLE, rate, GST_QUARK (FORMAT), GST_TYPE_FORMAT, format, GST_QUARK (FLAGS), GST_TYPE_SEEK_FLAGS, flags, @@ -1115,7 +1115,7 @@ gst_event_new_latency (GstClockTime latency) GST_CAT_INFO (GST_CAT_EVENT, "creating latency event %" GST_TIME_FORMAT, GST_TIME_ARGS (latency)); - structure = gst_structure_id_new (GST_QUARK (EVENT_LATENCY), + structure = gst_structure_new_id (GST_QUARK (EVENT_LATENCY), GST_QUARK (LATENCY), G_TYPE_UINT64, latency, NULL); event = gst_event_new_custom (GST_EVENT_LATENCY, structure); @@ -1180,7 +1180,7 @@ gst_event_new_step (GstFormat format, guint64 amount, gdouble rate, GST_CAT_INFO (GST_CAT_EVENT, "creating step event"); - structure = gst_structure_id_new (GST_QUARK (EVENT_STEP), + structure = gst_structure_new_id (GST_QUARK (EVENT_STEP), GST_QUARK (FORMAT), GST_TYPE_FORMAT, format, GST_QUARK (AMOUNT), G_TYPE_UINT64, amount, GST_QUARK (RATE), G_TYPE_DOUBLE, rate, @@ -1280,7 +1280,7 @@ gst_event_new_sink_message (GstMessage * msg) GST_CAT_INFO (GST_CAT_EVENT, "creating sink-message event"); - structure = gst_structure_id_new (GST_QUARK (EVENT_SINK_MESSAGE), + structure = gst_structure_new_id (GST_QUARK (EVENT_SINK_MESSAGE), GST_QUARK (MESSAGE), GST_TYPE_MESSAGE, msg, NULL); event = gst_event_new_custom (GST_EVENT_SINK_MESSAGE, structure); diff --git a/gst/gstmessage.c b/gst/gstmessage.c index 7b481ac272..91881bb08c 100644 --- a/gst/gstmessage.c +++ b/gst/gstmessage.c @@ -388,7 +388,7 @@ gst_message_new_error (GstObject * src, GError * error, const gchar * debug) GstMessage *message; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (MESSAGE_ERROR), + structure = gst_structure_new_id (GST_QUARK (MESSAGE_ERROR), GST_QUARK (GERROR), GST_TYPE_G_ERROR, error, GST_QUARK (DEBUG), G_TYPE_STRING, debug, NULL); message = gst_message_new_custom (GST_MESSAGE_ERROR, src, structure); @@ -415,7 +415,7 @@ gst_message_new_warning (GstObject * src, GError * error, const gchar * debug) GstMessage *message; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (MESSAGE_WARNING), + structure = gst_structure_new_id (GST_QUARK (MESSAGE_WARNING), GST_QUARK (GERROR), GST_TYPE_G_ERROR, error, GST_QUARK (DEBUG), G_TYPE_STRING, debug, NULL); message = gst_message_new_custom (GST_MESSAGE_WARNING, src, structure); @@ -444,7 +444,7 @@ gst_message_new_info (GstObject * src, GError * error, const gchar * debug) GstMessage *message; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (MESSAGE_INFO), + structure = gst_structure_new_id (GST_QUARK (MESSAGE_INFO), GST_QUARK (GERROR), GST_TYPE_G_ERROR, error, GST_QUARK (DEBUG), G_TYPE_STRING, debug, NULL); message = gst_message_new_custom (GST_MESSAGE_INFO, src, structure); @@ -507,7 +507,7 @@ gst_message_new_buffering (GstObject * src, gint percent) g_return_val_if_fail (percent >= 0 && percent <= 100, NULL); - structure = gst_structure_id_new (GST_QUARK (MESSAGE_BUFFERING), + structure = gst_structure_new_id (GST_QUARK (MESSAGE_BUFFERING), GST_QUARK (BUFFER_PERCENT), G_TYPE_INT, percent, GST_QUARK (BUFFERING_MODE), GST_TYPE_BUFFERING_MODE, GST_BUFFERING_STREAM, GST_QUARK (AVG_IN_RATE), G_TYPE_INT, -1, @@ -540,7 +540,7 @@ gst_message_new_state_changed (GstObject * src, GstMessage *message; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (MESSAGE_STATE), + structure = gst_structure_new_id (GST_QUARK (MESSAGE_STATE), GST_QUARK (OLD_STATE), GST_TYPE_STATE, (gint) oldstate, GST_QUARK (NEW_STATE), GST_TYPE_STATE, (gint) newstate, GST_QUARK (PENDING_STATE), GST_TYPE_STATE, (gint) pending, NULL); @@ -595,7 +595,7 @@ gst_message_new_clock_provide (GstObject * src, GstClock * clock, GstMessage *message; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (MESSAGE_CLOCK_PROVIDE), + structure = gst_structure_new_id (GST_QUARK (MESSAGE_CLOCK_PROVIDE), GST_QUARK (CLOCK), GST_TYPE_CLOCK, clock, GST_QUARK (READY), G_TYPE_BOOLEAN, ready, NULL); message = gst_message_new_custom (GST_MESSAGE_CLOCK_PROVIDE, src, structure); @@ -625,7 +625,7 @@ gst_message_new_clock_lost (GstObject * src, GstClock * clock) GstMessage *message; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (MESSAGE_CLOCK_LOST), + structure = gst_structure_new_id (GST_QUARK (MESSAGE_CLOCK_LOST), GST_QUARK (CLOCK), GST_TYPE_CLOCK, clock, NULL); message = gst_message_new_custom (GST_MESSAGE_CLOCK_LOST, src, structure); @@ -650,7 +650,7 @@ gst_message_new_new_clock (GstObject * src, GstClock * clock) GstMessage *message; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (MESSAGE_NEW_CLOCK), + structure = gst_structure_new_id (GST_QUARK (MESSAGE_NEW_CLOCK), GST_QUARK (CLOCK), GST_TYPE_CLOCK, clock, NULL); message = gst_message_new_custom (GST_MESSAGE_NEW_CLOCK, src, structure); @@ -687,7 +687,7 @@ gst_message_new_structure_change (GstObject * src, GstStructureChangeType type, /* g_return_val_if_fail (GST_PAD_DIRECTION (src) == GST_PAD_SINK, NULL); */ g_return_val_if_fail (GST_IS_ELEMENT (owner), NULL); - structure = gst_structure_id_new (GST_QUARK (MESSAGE_STRUCTURE_CHANGE), + structure = gst_structure_new_id (GST_QUARK (MESSAGE_STRUCTURE_CHANGE), GST_QUARK (TYPE), GST_TYPE_STRUCTURE_CHANGE_TYPE, type, GST_QUARK (OWNER), GST_TYPE_ELEMENT, owner, GST_QUARK (BUSY), G_TYPE_BOOLEAN, busy, NULL); @@ -720,7 +720,7 @@ gst_message_new_segment_start (GstObject * src, GstFormat format, GstMessage *message; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (MESSAGE_SEGMENT_START), + structure = gst_structure_new_id (GST_QUARK (MESSAGE_SEGMENT_START), GST_QUARK (FORMAT), GST_TYPE_FORMAT, format, GST_QUARK (POSITION), G_TYPE_INT64, position, NULL); message = gst_message_new_custom (GST_MESSAGE_SEGMENT_START, src, structure); @@ -750,7 +750,7 @@ gst_message_new_segment_done (GstObject * src, GstFormat format, GstMessage *message; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (MESSAGE_SEGMENT_DONE), + structure = gst_structure_new_id (GST_QUARK (MESSAGE_SEGMENT_DONE), GST_QUARK (FORMAT), GST_TYPE_FORMAT, format, GST_QUARK (POSITION), G_TYPE_INT64, position, NULL); message = gst_message_new_custom (GST_MESSAGE_SEGMENT_DONE, src, structure); @@ -822,7 +822,7 @@ gst_message_new_duration (GstObject * src, GstFormat format, gint64 duration) GstMessage *message; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (MESSAGE_DURATION), + structure = gst_structure_new_id (GST_QUARK (MESSAGE_DURATION), GST_QUARK (FORMAT), GST_TYPE_FORMAT, format, GST_QUARK (DURATION), G_TYPE_INT64, duration, NULL); message = gst_message_new_custom (GST_MESSAGE_DURATION, src, structure); @@ -869,7 +869,7 @@ gst_message_new_async_done (GstObject * src, gboolean reset_time) GstMessage *message; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (MESSAGE_ASYNC_DONE), + structure = gst_structure_new_id (GST_QUARK (MESSAGE_ASYNC_DONE), GST_QUARK (RESET_TIME), G_TYPE_BOOLEAN, reset_time, NULL); message = gst_message_new_custom (GST_MESSAGE_ASYNC_DONE, src, structure); @@ -920,7 +920,7 @@ gst_message_new_request_state (GstObject * src, GstState state) GstMessage *message; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (MESSAGE_REQUEST_STATE), + structure = gst_structure_new_id (GST_QUARK (MESSAGE_REQUEST_STATE), GST_QUARK (NEW_STATE), GST_TYPE_STATE, (gint) state, NULL); message = gst_message_new_custom (GST_MESSAGE_REQUEST_STATE, src, structure); @@ -1598,7 +1598,7 @@ gst_message_new_stream_status (GstObject * src, GstStreamStatusType type, GstMessage *message; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (MESSAGE_STREAM_STATUS), + structure = gst_structure_new_id (GST_QUARK (MESSAGE_STREAM_STATUS), GST_QUARK (TYPE), GST_TYPE_STREAM_STATUS_TYPE, (gint) type, GST_QUARK (OWNER), GST_TYPE_ELEMENT, owner, NULL); message = gst_message_new_custom (GST_MESSAGE_STREAM_STATUS, src, structure); @@ -1724,7 +1724,7 @@ gst_message_new_step_done (GstObject * src, GstFormat format, guint64 amount, GstMessage *message; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (MESSAGE_STEP_DONE), + structure = gst_structure_new_id (GST_QUARK (MESSAGE_STEP_DONE), GST_QUARK (FORMAT), GST_TYPE_FORMAT, format, GST_QUARK (AMOUNT), G_TYPE_UINT64, amount, GST_QUARK (RATE), G_TYPE_DOUBLE, rate, @@ -1809,7 +1809,7 @@ gst_message_new_step_start (GstObject * src, gboolean active, GstFormat format, GstMessage *message; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (MESSAGE_STEP_START), + structure = gst_structure_new_id (GST_QUARK (MESSAGE_STEP_START), GST_QUARK (ACTIVE), G_TYPE_BOOLEAN, active, GST_QUARK (FORMAT), GST_TYPE_FORMAT, format, GST_QUARK (AMOUNT), G_TYPE_UINT64, amount, @@ -1893,7 +1893,7 @@ gst_message_new_qos (GstObject * src, gboolean live, guint64 running_time, GstMessage *message; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (MESSAGE_QOS), + structure = gst_structure_new_id (GST_QUARK (MESSAGE_QOS), GST_QUARK (LIVE), G_TYPE_BOOLEAN, live, GST_QUARK (RUNNING_TIME), G_TYPE_UINT64, running_time, GST_QUARK (STREAM_TIME), G_TYPE_UINT64, stream_time, @@ -2122,7 +2122,7 @@ gst_message_new_progress (GstObject * src, GstProgressType type, if (type == GST_PROGRESS_TYPE_START || type == GST_PROGRESS_TYPE_CONTINUE) percent = 0; - structure = gst_structure_id_new (GST_QUARK (MESSAGE_PROGRESS), + structure = gst_structure_new_id (GST_QUARK (MESSAGE_PROGRESS), GST_QUARK (TYPE), GST_TYPE_PROGRESS_TYPE, type, GST_QUARK (CODE), G_TYPE_STRING, code, GST_QUARK (TEXT), G_TYPE_STRING, text, diff --git a/gst/gstquery.c b/gst/gstquery.c index 1e5f0412f6..5053782369 100644 --- a/gst/gstquery.c +++ b/gst/gstquery.c @@ -385,7 +385,7 @@ gst_query_new_position (GstFormat format) GstQuery *query; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (QUERY_POSITION), + structure = gst_structure_new_id (GST_QUARK (QUERY_POSITION), GST_QUARK (FORMAT), GST_TYPE_FORMAT, format, GST_QUARK (CURRENT), G_TYPE_INT64, G_GINT64_CONSTANT (-1), NULL); @@ -464,7 +464,7 @@ gst_query_new_duration (GstFormat format) GstQuery *query; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (QUERY_DURATION), + structure = gst_structure_new_id (GST_QUARK (QUERY_DURATION), GST_QUARK (FORMAT), GST_TYPE_FORMAT, format, GST_QUARK (DURATION), G_TYPE_INT64, G_GINT64_CONSTANT (-1), NULL); @@ -543,7 +543,7 @@ gst_query_new_latency (void) GstQuery *query; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (QUERY_LATENCY), + structure = gst_structure_new_id (GST_QUARK (QUERY_LATENCY), GST_QUARK (LIVE), G_TYPE_BOOLEAN, FALSE, GST_QUARK (MIN_LATENCY), G_TYPE_UINT64, G_GUINT64_CONSTANT (0), GST_QUARK (MAX_LATENCY), G_TYPE_UINT64, G_GUINT64_CONSTANT (-1), NULL); @@ -632,7 +632,7 @@ gst_query_new_convert (GstFormat src_format, gint64 value, GstQuery *query; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (QUERY_CONVERT), + structure = gst_structure_new_id (GST_QUARK (QUERY_CONVERT), GST_QUARK (SRC_FORMAT), GST_TYPE_FORMAT, src_format, GST_QUARK (SRC_VALUE), G_TYPE_INT64, value, GST_QUARK (DEST_FORMAT), GST_TYPE_FORMAT, dest_format, @@ -726,7 +726,7 @@ gst_query_new_segment (GstFormat format) GstQuery *query; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (QUERY_SEGMENT), + structure = gst_structure_new_id (GST_QUARK (QUERY_SEGMENT), GST_QUARK (RATE), G_TYPE_DOUBLE, (gdouble) 0.0, GST_QUARK (FORMAT), GST_TYPE_FORMAT, format, GST_QUARK (START_VALUE), G_TYPE_INT64, G_GINT64_CONSTANT (-1), @@ -886,7 +886,7 @@ gst_query_new_seeking (GstFormat format) GstQuery *query; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (QUERY_SEEKING), + structure = gst_structure_new_id (GST_QUARK (QUERY_SEEKING), GST_QUARK (FORMAT), GST_TYPE_FORMAT, format, GST_QUARK (SEEKABLE), G_TYPE_BOOLEAN, FALSE, GST_QUARK (SEGMENT_START), G_TYPE_INT64, G_GINT64_CONSTANT (-1), @@ -979,7 +979,7 @@ gst_query_new_formats (void) GstQuery *query; GstStructure *structure; - structure = gst_structure_id_empty_new (GST_QUARK (QUERY_FORMATS)); + structure = gst_structure_new_id_empty (GST_QUARK (QUERY_FORMATS)); query = gst_query_new (GST_QUERY_FORMATS, structure); return query; @@ -1147,7 +1147,7 @@ gst_query_new_buffering (GstFormat format) /* by default, we configure the answer as no buffering with a 100% buffering * progress */ - structure = gst_structure_id_new (GST_QUARK (QUERY_BUFFERING), + structure = gst_structure_new_id (GST_QUARK (QUERY_BUFFERING), GST_QUARK (BUSY), G_TYPE_BOOLEAN, FALSE, GST_QUARK (BUFFER_PERCENT), G_TYPE_INT, 100, GST_QUARK (BUFFERING_MODE), GST_TYPE_BUFFERING_MODE, GST_BUFFERING_STREAM, @@ -1505,7 +1505,7 @@ gst_query_new_uri (void) GstQuery *query; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (QUERY_URI), + structure = gst_structure_new_id (GST_QUARK (QUERY_URI), GST_QUARK (URI), G_TYPE_STRING, NULL, NULL); query = gst_query_new (GST_QUERY_URI, structure); @@ -1577,7 +1577,7 @@ gst_query_new_allocation (GstCaps * caps, gboolean need_pool) GstQuery *query; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (QUERY_ALLOCATION), + structure = gst_structure_new_id (GST_QUARK (QUERY_ALLOCATION), GST_QUARK (CAPS), GST_TYPE_CAPS, caps, GST_QUARK (NEED_POOL), G_TYPE_BOOLEAN, need_pool, GST_QUARK (SIZE), G_TYPE_UINT, 0, @@ -1928,7 +1928,7 @@ gst_query_new_scheduling (void) GstQuery *query; GstStructure *structure; - structure = gst_structure_id_new (GST_QUARK (QUERY_SCHEDULING), + structure = gst_structure_new_id (GST_QUARK (QUERY_SCHEDULING), GST_QUARK (PULL_MODE), G_TYPE_BOOLEAN, FALSE, GST_QUARK (RANDOM_ACCESS), G_TYPE_BOOLEAN, FALSE, GST_QUARK (SEQUENTIAL), G_TYPE_BOOLEAN, TRUE, diff --git a/gst/gststructure.c b/gst/gststructure.c index 4ed2472acc..00ca09f93d 100644 --- a/gst/gststructure.c +++ b/gst/gststructure.c @@ -36,7 +36,7 @@ * provides a means to enforce mutability using the refcount of the parent * with the gst_structure_set_parent_refcount() method. * - * A #GstStructure can be created with gst_structure_empty_new() or + * A #GstStructure can be created with gst_structure_new_empty() or * gst_structure_new(), which both take a name and an optional set of * key/value pairs along with the types of the values. * @@ -127,7 +127,7 @@ _priv_gst_structure_initialize (void) } static GstStructure * -gst_structure_id_empty_new_with_size (GQuark quark, guint prealloc) +gst_structure_new_id_empty_with_size (GQuark quark, guint prealloc) { GstStructureImpl *structure; @@ -142,7 +142,7 @@ gst_structure_id_empty_new_with_size (GQuark quark, guint prealloc) } /** - * gst_structure_id_empty_new: + * gst_structure_new_id_empty: * @quark: name of new structure * * Creates a new, empty #GstStructure with the given name as a GQuark. @@ -152,11 +152,11 @@ gst_structure_id_empty_new_with_size (GQuark quark, guint prealloc) * Returns: (transfer full): a new, empty #GstStructure */ GstStructure * -gst_structure_id_empty_new (GQuark quark) +gst_structure_new_id_empty (GQuark quark) { g_return_val_if_fail (quark != 0, NULL); - return gst_structure_id_empty_new_with_size (quark, 0); + return gst_structure_new_id_empty_with_size (quark, 0); } #ifndef G_DISABLE_CHECKS @@ -188,7 +188,7 @@ gst_structure_validate_name (const gchar * name) #endif /** - * gst_structure_empty_new: + * gst_structure_new_empty: * @name: name of new structure * * Creates a new, empty #GstStructure with the given @name. @@ -200,11 +200,11 @@ gst_structure_validate_name (const gchar * name) * Returns: (transfer full): a new, empty #GstStructure */ GstStructure * -gst_structure_empty_new (const gchar * name) +gst_structure_new_empty (const gchar * name) { g_return_val_if_fail (gst_structure_validate_name (name), NULL); - return gst_structure_id_empty_new_with_size (g_quark_from_string (name), 0); + return gst_structure_new_id_empty_with_size (g_quark_from_string (name), 0); } /** @@ -257,7 +257,7 @@ gst_structure_new_valist (const gchar * name, { GstStructure *structure; - structure = gst_structure_empty_new (name); + structure = gst_structure_new_empty (name); if (structure) gst_structure_set_valist (structure, firstfield, varargs); @@ -321,7 +321,7 @@ gst_structure_copy (const GstStructure * structure) g_return_val_if_fail (structure != NULL, NULL); len = GST_STRUCTURE_FIELDS (structure)->len; - new_structure = gst_structure_id_empty_new_with_size (structure->name, len); + new_structure = gst_structure_new_id_empty_with_size (structure->name, len); for (i = 0; i < len; i++) { GstStructureField new_field = { 0 }; @@ -718,7 +718,7 @@ gst_structure_id_set_valist (GstStructure * structure, } /** - * gst_structure_id_new: + * gst_structure_new_id: * @name_quark: name of new structure * @field_quark: the GQuark for the name of the field to set * @...: variable arguments @@ -726,7 +726,7 @@ gst_structure_id_set_valist (GstStructure * structure, * Creates a new #GstStructure with the given name as a GQuark, followed by * fieldname quark, GType, argument(s) "triplets" in the same format as * gst_structure_id_set(). Basically a convenience wrapper around - * gst_structure_id_empty_new() and gst_structure_id_set(). + * gst_structure_new_id_empty() and gst_structure_id_set(). * * The last variable argument must be NULL (or 0). * @@ -737,7 +737,7 @@ gst_structure_id_set_valist (GstStructure * structure, * Since: 0.10.24 */ GstStructure * -gst_structure_id_new (GQuark name_quark, GQuark field_quark, ...) +gst_structure_new_id (GQuark name_quark, GQuark field_quark, ...) { GstStructure *s; va_list varargs; @@ -745,7 +745,7 @@ gst_structure_id_new (GQuark name_quark, GQuark field_quark, ...) g_return_val_if_fail (name_quark != 0, NULL); g_return_val_if_fail (field_quark != 0, NULL); - s = gst_structure_id_empty_new (name_quark); + s = gst_structure_new_id_empty (name_quark); va_start (varargs, field_quark); gst_structure_id_set_valist_internal (s, field_quark, varargs); @@ -2242,7 +2242,7 @@ gst_structure_from_string (const gchar * string, gchar ** end) save = *w; *w = '\0'; - structure = gst_structure_empty_new (name); + structure = gst_structure_new_empty (name); *w = save; if (G_UNLIKELY (structure == NULL)) @@ -3044,7 +3044,7 @@ gst_structure_intersect (const GstStructure * struct1, /* copy fields from struct1 which we have not in struct2 to target * intersect if we have the field in both */ - data.dest = gst_structure_id_empty_new (struct1->name); + data.dest = gst_structure_new_id_empty (struct1->name); data.intersect = struct2; if (G_UNLIKELY (!gst_structure_foreach ((GstStructure *) struct1, gst_structure_intersect_field1, &data))) diff --git a/gst/gststructure.h b/gst/gststructure.h index 964a2a3e24..86e100e2e1 100644 --- a/gst/gststructure.h +++ b/gst/gststructure.h @@ -85,15 +85,15 @@ struct _GstStructure { GType gst_structure_get_type (void); -GstStructure * gst_structure_empty_new (const gchar * name); -GstStructure * gst_structure_id_empty_new (GQuark quark); +GstStructure * gst_structure_new_empty (const gchar * name); +GstStructure * gst_structure_new_id_empty (GQuark quark); GstStructure * gst_structure_new (const gchar * name, const gchar * firstfield, ...) G_GNUC_NULL_TERMINATED; GstStructure * gst_structure_new_valist (const gchar * name, const gchar * firstfield, va_list varargs); -GstStructure * gst_structure_id_new (GQuark name_quark, +GstStructure * gst_structure_new_id (GQuark name_quark, GQuark field_quark, ...); GstStructure * gst_structure_copy (const GstStructure *structure); diff --git a/gst/gsttaglist.c b/gst/gsttaglist.c index f8651b13eb..9afbef1d42 100644 --- a/gst/gsttaglist.c +++ b/gst/gsttaglist.c @@ -637,7 +637,7 @@ gst_tag_is_fixed (const gchar * tag) GstTagList * gst_tag_list_new_empty (void) { - return GST_TAG_LIST (gst_structure_id_empty_new (GST_QUARK (TAGLIST))); + return GST_TAG_LIST (gst_structure_new_id_empty (GST_QUARK (TAGLIST))); } /** diff --git a/tests/check/gst/gstevent.c b/tests/check/gst/gstevent.c index 94912d0328..c2d5e158c5 100644 --- a/tests/check/gst/gstevent.c +++ b/tests/check/gst/gstevent.c @@ -198,7 +198,7 @@ GST_START_TEST (create_events) /* Custom event types */ { - structure = gst_structure_empty_new ("application/x-custom"); + structure = gst_structure_new_empty ("application/x-custom"); fail_if (structure == NULL); event = gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM, structure); fail_if (event == NULL); @@ -217,7 +217,7 @@ GST_START_TEST (create_events) /* Event copying */ { - structure = gst_structure_empty_new ("application/x-custom"); + structure = gst_structure_new_empty ("application/x-custom"); fail_if (structure == NULL); event = gst_event_new_custom (GST_EVENT_CUSTOM_BOTH, structure); @@ -237,7 +237,7 @@ GST_START_TEST (create_events) /* Make events writable */ { - structure = gst_structure_empty_new ("application/x-custom"); + structure = gst_structure_new_empty ("application/x-custom"); fail_if (structure == NULL); event = gst_event_new_custom (GST_EVENT_CUSTOM_BOTH, structure); /* ref the event so that it becomes non-writable */ @@ -392,7 +392,7 @@ static void test_event GST_DEBUG ("test event called"); event = gst_event_new_custom (type, - gst_structure_empty_new ("application/x-custom")); + gst_structure_new_empty ("application/x-custom")); g_get_current_time (&sent_event_time); got_event_time.tv_sec = 0; got_event_time.tv_usec = 0; diff --git a/tests/check/gst/gstiterator.c b/tests/check/gst/gstiterator.c index 1eff6516df..3263d89370 100644 --- a/tests/check/gst/gstiterator.c +++ b/tests/check/gst/gstiterator.c @@ -176,7 +176,7 @@ GST_END_TEST; GST_START_TEST (test_single) { GstIterator *it; - GstStructure *s = gst_structure_empty_new ("test"); + GstStructure *s = gst_structure_new_empty ("test"); GValue v = { 0, }; GstStructure *i; diff --git a/tests/check/gst/gststructure.c b/tests/check/gst/gststructure.c index de8468be2e..d2a14846e5 100644 --- a/tests/check/gst/gststructure.c +++ b/tests/check/gst/gststructure.c @@ -183,12 +183,12 @@ GST_START_TEST (test_to_string) { GstStructure *st1; - ASSERT_CRITICAL (st1 = gst_structure_empty_new ("Foo\nwith-newline")); + ASSERT_CRITICAL (st1 = gst_structure_new_empty ("Foo\nwith-newline")); fail_unless (st1 == NULL); - ASSERT_CRITICAL (st1 = gst_structure_empty_new ("Foo with whitespace")); + ASSERT_CRITICAL (st1 = gst_structure_new_empty ("Foo with whitespace")); fail_unless (st1 == NULL); - ASSERT_CRITICAL (st1 = gst_structure_empty_new ("1st")); + ASSERT_CRITICAL (st1 = gst_structure_new_empty ("1st")); fail_unless (st1 == NULL); } @@ -321,7 +321,7 @@ GST_START_TEST (test_structure_new) g_error_free (e); gst_structure_free (s); - ASSERT_CRITICAL (gst_structure_free (gst_structure_empty_new + ASSERT_CRITICAL (gst_structure_free (gst_structure_new_empty ("0.10:decoder-video/mpeg"))); /* make sure we bail out correctly in case of an error or if parsing fails */ @@ -369,7 +369,7 @@ GST_START_TEST (test_fixate_frac_list) gst_value_set_fraction (&frac, 10, 1); gst_value_list_append_value (&list, &frac); - s = gst_structure_empty_new ("name"); + s = gst_structure_new_empty ("name"); gst_structure_set_value (s, "frac", &list); g_value_unset (&frac); g_value_unset (&list); diff --git a/tests/check/pipelines/simple-launch-lines.c b/tests/check/pipelines/simple-launch-lines.c index 79cfab47a6..81015643b8 100644 --- a/tests/check/pipelines/simple-launch-lines.c +++ b/tests/check/pipelines/simple-launch-lines.c @@ -240,7 +240,7 @@ got_handoff (GstElement * sink, GstBuffer * buf, GstPad * pad, gpointer unused) { gst_element_post_message (sink, gst_message_new_application (NULL, - gst_structure_empty_new ("foo"))); + gst_structure_new_empty ("foo"))); } static void diff --git a/win32/common/libgstreamer.def b/win32/common/libgstreamer.def index 4b14057fbe..a7a836965a 100644 --- a/win32/common/libgstreamer.def +++ b/win32/common/libgstreamer.def @@ -614,7 +614,6 @@ EXPORTS gst_message_type_to_quark gst_meta_get_info gst_meta_register - gst_meta_timing_get_info gst_mini_object_copy gst_mini_object_flags_get_type gst_mini_object_init @@ -965,7 +964,6 @@ EXPORTS gst_structure_can_intersect gst_structure_change_type_get_type gst_structure_copy - gst_structure_empty_new gst_structure_fixate gst_structure_fixate_field gst_structure_fixate_field_boolean @@ -996,13 +994,11 @@ EXPORTS gst_structure_has_field gst_structure_has_field_typed gst_structure_has_name - gst_structure_id_empty_new gst_structure_id_get gst_structure_id_get_valist gst_structure_id_get_value gst_structure_id_has_field gst_structure_id_has_field_typed - gst_structure_id_new gst_structure_id_set gst_structure_id_set_valist gst_structure_id_set_value @@ -1013,6 +1009,9 @@ EXPORTS gst_structure_map_in_place gst_structure_n_fields gst_structure_new + gst_structure_new_empty + gst_structure_new_id + gst_structure_new_id_empty gst_structure_new_valist gst_structure_nth_field_name gst_structure_remove_all_fields