Update for alloc_buffer changes.
authorAndy Wingo <wingo@pobox.com>
Mon, 5 Dec 2005 13:03:40 +0000 (13:03 +0000)
committerAndy Wingo <wingo@pobox.com>
Mon, 5 Dec 2005 13:03:40 +0000 (13:03 +0000)
Original commit message from CVS:
2005-12-05  Andy Wingo  <wingo@pobox.com>

* ext/a52dec/gsta52dec.c: (gst_a52dec_push):
* ext/mad/gstmad.c: (gst_mad_chain):
* ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_alloc_buffer):
* gst/dvdlpcmdec/gstdvdlpcmdec.c: (gst_dvdlpcmdec_chain_raw):
* gst/iec958/ac3iec.c: (ac3iec_chain_raw):
* gst/realmedia/rmdemux.c: (gst_rmdemux_add_stream),
(gst_rmdemux_parse_packet): Update for alloc_buffer changes.

ChangeLog
ext/a52dec/gsta52dec.c
ext/mad/gstmad.c
ext/mpeg2dec/gstmpeg2dec.c
gst/dvdlpcmdec/gstdvdlpcmdec.c
gst/iec958/ac3iec.c
gst/realmedia/rmdemux.c

index 3b1687a..748bfe5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2005-12-05  Andy Wingo  <wingo@pobox.com>
 
+       * ext/a52dec/gsta52dec.c: (gst_a52dec_push):
+       * ext/mad/gstmad.c: (gst_mad_chain):
+       * ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_alloc_buffer):
+       * gst/dvdlpcmdec/gstdvdlpcmdec.c: (gst_dvdlpcmdec_chain_raw):
+       * gst/iec958/ac3iec.c: (ac3iec_chain_raw):
+       * gst/realmedia/rmdemux.c: (gst_rmdemux_add_stream),
+       (gst_rmdemux_parse_packet): Update for alloc_buffer changes.
+
+2005-12-05  Andy Wingo  <wingo@pobox.com>
+
        * ext/mad/gstid3tag.c (plugin_init): Remove id3tag -- there's just
        id3demux and id3mux now. Fixes #323199.
 
index 723d957..2785a85 100644 (file)
@@ -292,8 +292,9 @@ gst_a52dec_push (GstA52Dec * a52dec,
     return GST_FLOW_ERROR;
   }
 
-  result = gst_pad_alloc_buffer (srcpad, 0, 256 * chans * (SAMPLE_WIDTH / 8),
-      GST_PAD_CAPS (srcpad), &buf);
+  result =
+      gst_pad_alloc_buffer_and_set_caps (srcpad, 0,
+      256 * chans * (SAMPLE_WIDTH / 8), GST_PAD_CAPS (srcpad), &buf);
   if (result != GST_FLOW_OK)
     return result;
 
index 77e9271..5b4e0ee 100644 (file)
@@ -1498,8 +1498,9 @@ gst_mad_chain (GstPad * pad, GstBuffer * buffer)
 
         /* will attach the caps to the buffer */
         result =
-            gst_pad_alloc_buffer (mad->srcpad, 0, nsamples * mad->channels * 2,
-            GST_PAD_CAPS (mad->srcpad), &outbuffer);
+            gst_pad_alloc_buffer_and_set_caps (mad->srcpad, 0,
+            nsamples * mad->channels * 2, GST_PAD_CAPS (mad->srcpad),
+            &outbuffer);
         if (result != GST_FLOW_OK) {
           /* Head for the exit, dropping samples as we go */
           GST_LOG ("Skipping frame synthesis due to pad_alloc return value");
index fc23793..be5ddbf 100644 (file)
@@ -423,8 +423,9 @@ gst_mpeg2dec_alloc_buffer (GstMpeg2dec * mpeg2dec, gint64 offset,
 
   if (mpeg2dec->format == MPEG2DEC_FORMAT_I422) {
     ret =
-        gst_pad_alloc_buffer (mpeg2dec->srcpad, GST_BUFFER_OFFSET_NONE,
-        size * 2, GST_PAD_CAPS (mpeg2dec->srcpad), &outbuf);
+        gst_pad_alloc_buffer_and_set_caps (mpeg2dec->srcpad,
+        GST_BUFFER_OFFSET_NONE, size * 2, GST_PAD_CAPS (mpeg2dec->srcpad),
+        &outbuf);
     if (ret != GST_FLOW_OK)
       goto no_buffer;
 
@@ -436,8 +437,9 @@ gst_mpeg2dec_alloc_buffer (GstMpeg2dec * mpeg2dec, gint64 offset,
 
   } else {
     ret =
-        gst_pad_alloc_buffer (mpeg2dec->srcpad, GST_BUFFER_OFFSET_NONE,
-        (size * 3) / 2, GST_PAD_CAPS (mpeg2dec->srcpad), &outbuf);
+        gst_pad_alloc_buffer_and_set_caps (mpeg2dec->srcpad,
+        GST_BUFFER_OFFSET_NONE, (size * 3) / 2, GST_PAD_CAPS (mpeg2dec->srcpad),
+        &outbuf);
     if (ret != GST_FLOW_OK)
       goto no_buffer;
 
@@ -464,7 +466,7 @@ gst_mpeg2dec_alloc_buffer (GstMpeg2dec * mpeg2dec, gint64 offset,
 done:
   if (ret != GST_FLOW_OK) {
     outbuf = NULL;              /* just to asure NULL return, looking the path
-                                   above it happens only when gst_pad_alloc_buffer
+                                   above it happens only when gst_pad_alloc_buffer_and_set_caps
                                    fails to alloc outbf */
   }
   *obuf = outbuf;
index 38293cf..cbe3421 100644 (file)
@@ -464,7 +464,7 @@ gst_dvdlpcmdec_chain_raw (GstPad * pad, GstBuffer * buf)
       GstBuffer *outbuf;
       GstCaps *bufcaps = GST_PAD_CAPS (dvdlpcmdec->srcpad);
 
-      ret = gst_pad_alloc_buffer (dvdlpcmdec->srcpad, 0,
+      ret = gst_pad_alloc_buffer_and_set_caps (dvdlpcmdec->srcpad, 0,
           samples * 3, bufcaps, &outbuf);
 
       if (ret != GST_FLOW_OK)
index 0c6e543..7b9a3a5 100644 (file)
@@ -312,8 +312,9 @@ ac3iec_chain_raw (GstPad * pad, GstBuffer * buf)
       GstCaps *bufcaps = GST_PAD_CAPS (ac3iec->src);
 
       /* Create a new buffer, and copy the frame data into it. */
-      ret = gst_pad_alloc_buffer (ac3iec->src, 0, AC3P_IEC_FRAME_SIZE,
-          bufcaps, &new);
+      ret =
+          gst_pad_alloc_buffer_and_set_caps (ac3iec->src, 0,
+          AC3P_IEC_FRAME_SIZE, bufcaps, &new);
       if (ret != GST_FLOW_OK)
         goto buffer_alloc_failed;
 
index e94ac90..8bda324 100644 (file)
@@ -1367,7 +1367,7 @@ gst_rmdemux_add_stream (GstRMDemux * rmdemux, GstRMDemuxStream * stream)
     if (stream->extra_data_size > 0) {
       GstBuffer *buffer;
 
-      if ((ret = gst_pad_alloc_buffer
+      if ((ret = gst_pad_alloc_buffer_and_set_caps
               (stream->pad, GST_BUFFER_OFFSET_NONE, stream->extra_data_size,
                   stream->caps, &buffer))
           != GST_FLOW_OK) {
@@ -1743,8 +1743,10 @@ gst_rmdemux_parse_packet (GstRMDemux * rmdemux, const void *data,
 
   if ((rmdemux->offset + packet_size) > stream->seek_offset &&
       stream && stream->pad) {
-    if ((ret = gst_pad_alloc_buffer (stream->pad, GST_BUFFER_OFFSET_NONE,
-                packet_size, stream->caps, &buffer)) != GST_FLOW_OK) {
+    if ((ret =
+            gst_pad_alloc_buffer_and_set_caps (stream->pad,
+                GST_BUFFER_OFFSET_NONE, packet_size, stream->caps,
+                &buffer)) != GST_FLOW_OK) {
       GST_WARNING_OBJECT (rmdemux, "failed to alloc src buffer for stream %d",
           id);
       return ret;