Replace GST_PLUGINS_LIBS_* with GST_PLUGINS_BASE_*
authorJan Schmidt <thaytan@mad.scientist.com>
Fri, 1 Jul 2005 08:10:55 +0000 (08:10 +0000)
committerJan Schmidt <thaytan@mad.scientist.com>
Fri, 1 Jul 2005 08:10:55 +0000 (08:10 +0000)
Original commit message from CVS:
2005-07-01  Jan Schmidt  <thaytan@mad.scientist.com>
* 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

ChangeLog
ext/mad/Makefile.am
ext/mad/gstid3tag.c
ext/mad/gstmad.c

index 698265f..7ea24a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2005-07-01  Jan Schmidt  <thaytan@mad.scientist.com>
+       * 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  <edward@fluendo.com>
 
        * gst/avi/Makefile.am: (libgstavi_la_LIBADD):
index 4d8b357..0d159f3 100644 (file)
@@ -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
index dd69ac1..5fbac7e 100644 (file)
@@ -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, &current, &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, &current, &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);
index 0a1ecc9..343526d 100644 (file)
@@ -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;