From: Jan Schmidt Date: Fri, 1 Jul 2005 08:10:55 +0000 (+0000) Subject: Replace GST_PLUGINS_LIBS_* with GST_PLUGINS_BASE_* X-Git-Tag: 1.19.3~505^2~2337 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4fae1576531bf8e1780e999bcbf2d1568033d845;p=platform%2Fupstream%2Fgstreamer.git Replace GST_PLUGINS_LIBS_* with GST_PLUGINS_BASE_* Original commit message from CVS: 2005-07-01 Jan Schmidt * ext/libcaca/Makefile.am: * ext/mad/Makefile.am: * gst/effectv/Makefile.am: * gst/udp/Makefile.am: Replace GST_PLUGINS_LIBS_* with GST_PLUGINS_BASE_* * ext/mad/gstid3tag.c: (gst_id3_tag_src_query), (gst_id3_tag_src_event), (gst_id3_tag_sink_event), (gst_id3_tag_chain), (plugin_init): * ext/mad/gstmad.c: (gst_mad_src_query), (gst_mad_chain): Signedness warning fix, use gst_pad_get_peer instead of GST_PAD_PEER in querying and event handling, because we're not holding the pad lock and the peer may disappear. * gst/avi/gstavidemux.c: (gst_avi_demux_parse_subindex), (gst_avi_demux_parse_index), (gst_avi_demux_massage_index): Signedness warning fixes. * gst/videofilter/gstvideotemplate.c: (plugin_init): Remove gst_library_load --- diff --git a/ChangeLog b/ChangeLog index 698265f..7ea24a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2005-07-01 Jan Schmidt + * ext/libcaca/Makefile.am: + * ext/mad/Makefile.am: + * gst/effectv/Makefile.am: + * gst/udp/Makefile.am: + Replace GST_PLUGINS_LIBS_* with GST_PLUGINS_BASE_* + + * ext/mad/gstid3tag.c: (gst_id3_tag_src_query), + (gst_id3_tag_src_event), (gst_id3_tag_sink_event), + (gst_id3_tag_chain), (plugin_init): + * ext/mad/gstmad.c: (gst_mad_src_query), (gst_mad_chain): + Signedness warning fix, use gst_pad_get_peer instead of GST_PAD_PEER + in querying and event handling, because we're not holding the pad + lock and the peer may disappear. + * gst/avi/gstavidemux.c: (gst_avi_demux_parse_subindex), + (gst_avi_demux_parse_index), (gst_avi_demux_massage_index): + Signedness warning fixes. + + * gst/videofilter/gstvideotemplate.c: (plugin_init): + Remove gst_library_load + 2005-06-30 Edward Hervey * gst/avi/Makefile.am: (libgstavi_la_LIBADD): diff --git a/ext/mad/Makefile.am b/ext/mad/Makefile.am index 4d8b357..0d159f3 100644 --- a/ext/mad/Makefile.am +++ b/ext/mad/Makefile.am @@ -2,8 +2,8 @@ plugin_LTLIBRARIES = libgstmad.la libgstmad_la_SOURCES = gstmad.c gstid3tag.c -libgstmad_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_LIBS_CFLAGS) $(MAD_CFLAGS) $(ID3_CFLAGS) +libgstmad_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(MAD_CFLAGS) $(ID3_CFLAGS) libgstmad_la_LIBADD = $(MAD_LIBS) $(ID3_LIBS) $(GST_INTERFACES_LIBS) -libgstmad_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(GST_PLUGINS_LIBS_LIBS) -lgsttagedit-0.9 +libgstmad_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(GST_PLUGINS_BASE_LIBS) -lgsttagedit-0.9 noinst_HEADERS = gstmad.h diff --git a/ext/mad/gstid3tag.c b/ext/mad/gstid3tag.c index dd69ac1..5fbac7e 100644 --- a/ext/mad/gstid3tag.c +++ b/ext/mad/gstid3tag.c @@ -430,11 +430,14 @@ gst_id3_tag_src_query (GstPad * pad, GstQuery * query) gst_query_parse_position (query, &format, NULL, NULL); switch (format) { - case GST_FORMAT_BYTES: - if (GST_PAD_PEER (tag->sinkpad) && - tag->state == GST_ID3_TAG_STATE_NORMAL && - gst_pad_query_position (GST_PAD_PEER (tag->sinkpad), - &format, ¤t, &total)) { + case GST_FORMAT_BYTES:{ + GstPad *peer; + + if ((peer = gst_pad_get_peer (tag->sinkpad)) == NULL) + break; + + if (tag->state == GST_ID3_TAG_STATE_NORMAL && + gst_pad_query_position (peer, &format, ¤t, &total)) { total -= tag->v2tag_size + tag->v1tag_size; total += tag->v2tag_size_new + tag->v1tag_size_new; if (tag->state == GST_ID3_TAG_STATE_NORMAL) { @@ -446,7 +449,9 @@ gst_id3_tag_src_query (GstPad * pad, GstQuery * query) res = TRUE; } + gst_object_unref (peer); break; + } default: break; } @@ -491,7 +496,7 @@ gst_id3_tag_src_event (GstPad * pad, GstEvent * event) new = gst_event_new_seek (GST_EVENT_SEEK_TYPE (event), GST_EVENT_SEEK_OFFSET (event) + diff); gst_event_unref (event); - return gst_pad_send_event (GST_PAD_PEER (tag->sinkpad), new); + return gst_pad_push_event (tag->sinkpad, new); } break; default: @@ -1027,6 +1032,7 @@ gst_id3_tag_chain (GstPad * pad, GstBuffer * buffer) GstID3Tag *tag; tag = GST_ID3_TAG (gst_pad_get_parent (pad)); + GST_DEBUG_OBJECT (tag, "Chain, state = %d", tag->state); switch (tag->state) { case GST_ID3_TAG_STATE_SEEKING_TO_V1_TAG: @@ -1083,7 +1089,7 @@ gst_id3_tag_chain (GstPad * pad, GstBuffer * buffer) /* seek to beginning */ GST_LOG_OBJECT (tag, "seeking back to beginning"); gst_id3_tag_set_state (tag, GST_ID3_TAG_STATE_SEEKING_TO_NORMAL); - if (!gst_pad_send_event (GST_PAD_PEER (tag->sinkpad), + if (!gst_pad_push_event (tag->sinkpad, gst_event_new_seek (GST_FORMAT_BYTES | GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH, tag->v2tag_size))) { GST_ELEMENT_ERROR (tag, CORE, SEEK, (NULL), @@ -1159,7 +1165,7 @@ gst_id3_tag_chain (GstPad * pad, GstBuffer * buffer) return GST_FLOW_OK; /* seek to ID3v1 tag */ gst_id3_tag_set_state (tag, GST_ID3_TAG_STATE_SEEKING_TO_V1_TAG); - if (gst_pad_send_event (GST_PAD_PEER (tag->sinkpad), + if (gst_pad_push_event (tag->sinkpad, gst_event_new_seek (GST_FORMAT_BYTES | GST_SEEK_METHOD_END | GST_SEEK_FLAG_FLUSH, -128))) { gst_buffer_unref (buffer); diff --git a/ext/mad/gstmad.c b/ext/mad/gstmad.c index 0a1ecc9..343526d 100644 --- a/ext/mad/gstmad.c +++ b/ext/mad/gstmad.c @@ -554,16 +554,23 @@ gst_mad_src_query (GstPad * pad, GstQuery * query) GstFormat format; GstFormat rformat; gint64 cur, total, total_bytes; + GstPad *peer; /* save requested format */ gst_query_parse_position (query, &format, NULL, NULL); /* query peer for total length in bytes */ gst_query_set_position (query, GST_FORMAT_BYTES, -1, -1); - if (!gst_pad_query (GST_PAD_PEER (mad->sinkpad), query)) { + + if ((peer = gst_pad_get_peer (mad->sinkpad)) == NULL) + goto error; + + if (!gst_pad_query (peer, query)) { GST_LOG_OBJECT (mad, "query on peer pad failed"); goto error; } + gst_object_unref (peer); + /* get the returned format */ gst_query_parse_position (query, &rformat, NULL, &total_bytes); if (rformat == GST_FORMAT_BYTES) @@ -1267,7 +1274,7 @@ static GstFlowReturn gst_mad_chain (GstPad * pad, GstBuffer * buffer) { GstMad *mad; - guchar *data; + guint8 *data; glong size; gboolean new_pts = FALSE; GstClockTime timestamp;