/GstBuffer/GstData/ in the API where you can pass events. Fix the plugins to deal...
authorAndy Wingo <wingo@pobox.com>
Wed, 8 Oct 2003 16:07:38 +0000 (16:07 +0000)
committerAndy Wingo <wingo@pobox.com>
Wed, 8 Oct 2003 16:07:38 +0000 (16:07 +0000)
Original commit message from CVS:
/GstBuffer/GstData/ in the API where you can pass events. Fix the plugins to deal with that. Fixes #113488.

common
ext/ffmpeg/gstffmpegdec.c
ext/ffmpeg/gstffmpegdemux.c
ext/ffmpeg/gstffmpegenc.c
ext/ffmpeg/gstffmpegmux.c
ext/ffmpeg/gstffmpegprotocol.c

diff --git a/common b/common
index b7abb51..e903f88 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit b7abb510aa14e8692df39ea8c2c758e37d8a8d8a
+Subproject commit e903f88a7388f0b463204ea1f960a4ace840175b
index efab63a..e81c539 100644 (file)
@@ -271,8 +271,9 @@ gst_ffmpegdec_release_buffer (AVCodecContext *context,
 
 static void
 gst_ffmpegdec_chain (GstPad    *pad,
-                    GstBuffer *inbuf)
+                    GstData *_data)
 {
+  GstBuffer *inbuf = GST_BUFFER (_data);
   GstBuffer *outbuf = NULL;
   GstFFMpegDec *ffmpegdec = (GstFFMpegDec *)(gst_pad_get_parent (pad));
   GstFFMpegDecClass *oclass = (GstFFMpegDecClass*)(G_OBJECT_GET_CLASS (ffmpegdec));
@@ -354,7 +355,7 @@ gst_ffmpegdec_chain (GstPad    *pad,
 
       GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (inbuf);
 
-      gst_pad_push (ffmpegdec->srcpad, outbuf);
+      gst_pad_push (ffmpegdec->srcpad, GST_DATA (outbuf));
     } 
 
     size -= len;
index 6815695..c0ead8a 100644 (file)
@@ -246,7 +246,7 @@ gst_ffmpegdemux_loop (GstElement *element)
         pad = ffmpegdemux->srcpads[i];
         if (GST_PAD_IS_USABLE (pad)) {
           gst_data_ref (GST_DATA (event));
-          gst_pad_push (pad, GST_BUFFER (event));
+          gst_pad_push (pad, GST_DATA (event));
         }
         gst_data_unref (GST_DATA (event));
       }
@@ -332,7 +332,7 @@ gst_ffmpegdemux_loop (GstElement *element)
       GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_KEY_UNIT);
     }
 
-    gst_pad_push (pad, outbuf);
+    gst_pad_push (pad, GST_DATA (outbuf));
     pkt.destruct (&pkt);
   }
 }
index 4672dff..54fc65e 100644 (file)
@@ -124,7 +124,7 @@ static void gst_ffmpegenc_dispose           (GObject *object);
 
 static GstPadLinkReturn
                gst_ffmpegenc_connect           (GstPad *pad, GstCaps *caps);
-static void    gst_ffmpegenc_chain             (GstPad *pad, GstBuffer *buffer);
+static void    gst_ffmpegenc_chain             (GstPad *pad, GstData *_data);
 
 static void    gst_ffmpegenc_set_property      (GObject *object,
                                                 guint prop_id,
@@ -339,8 +339,9 @@ gst_ffmpegenc_connect (GstPad  *pad,
 
 static void
 gst_ffmpegenc_chain (GstPad    *pad,
-                    GstBuffer *inbuf)
+                    GstData *_data)
 {
+  GstBuffer *inbuf = GST_BUFFER (_data);
   GstBuffer *outbuf = NULL;
   GstFFMpegEnc *ffmpegenc = (GstFFMpegEnc *)(gst_pad_get_parent (pad));
   GstFFMpegEncClass *oclass = (GstFFMpegEncClass*)(G_OBJECT_GET_CLASS(ffmpegenc));
@@ -393,7 +394,7 @@ gst_ffmpegenc_chain (GstPad    *pad,
   GST_BUFFER_SIZE (outbuf) = ret_size;
   GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (inbuf);
   GST_BUFFER_DURATION (outbuf) = GST_BUFFER_DURATION (inbuf);
-  gst_pad_push (ffmpegenc->srcpad, outbuf);
+  gst_pad_push (ffmpegenc->srcpad, GST_DATA (outbuf));
 
   gst_buffer_unref (inbuf);
 }
index b789c90..9a693f4 100644 (file)
@@ -321,7 +321,7 @@ gst_ffmpegmux_loop (GstElement *element)
            ffmpegmux->eos[i] == FALSE &&
            ffmpegmux->bufferqueue[i] == NULL) {
       /* we can pull a buffer! */
-      buf = gst_pad_pull (pad);
+      buf = GST_BUFFER (gst_pad_pull (pad));
       if (GST_IS_EVENT (buf)) {
         if (GST_EVENT_TYPE (GST_EVENT (buf)) == GST_EVENT_EOS) {
           /* flag EOS on this stream */
index 5373eb9..6668868 100644 (file)
@@ -151,7 +151,7 @@ gst_write (URLContext    *h,
   GST_BUFFER_SIZE (outbuf) = size;
   memcpy (GST_BUFFER_DATA (outbuf), buf, size);
 
-  gst_pad_push (info->pad, outbuf);
+  gst_pad_push (info->pad, GST_DATA (outbuf));
 
   return 0;
 }
@@ -188,7 +188,7 @@ gst_seek (URLContext *h,
 
     case URL_WRONLY: {
       GstEvent *event = gst_event_new_seek (seek_type, pos);
-      gst_pad_push (info->pad, GST_BUFFER (event));
+      gst_pad_push (info->pad, GST_DATA (event));
     }
       break;
   }
@@ -207,7 +207,7 @@ gst_close (URLContext *h)
     case URL_WRONLY: {
       /* send EOS - that closes down the stream */
       GstEvent *event = gst_event_new (GST_EVENT_EOS);
-      gst_pad_push (info->pad, GST_BUFFER (event));
+      gst_pad_push (info->pad, GST_DATA (event));
     }
       break;