Update API to whatever ffmpeg changed the past few days
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>
Thu, 12 Dec 2002 13:12:44 +0000 (13:12 +0000)
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>
Thu, 12 Dec 2002 13:12:44 +0000 (13:12 +0000)
Original commit message from CVS:
Update API to whatever ffmpeg changed the past few days

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

diff --git a/common b/common
index 92ff510..79e6940 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 92ff5101d55c0f853620bf13f8dd528992824137
+Subproject commit 79e6940e7ff1a6cbf959a1f7a0a3d1ed3f90d3ee
index 97e05d0..28d2dda 100644 (file)
@@ -41,7 +41,7 @@ struct _GstFFMpegDec {
   GstPad *sinkpad;
 
   AVCodecContext *context;
-  AVPicture *picture;
+  AVFrame *picture;
 };
 
 typedef struct _GstFFMpegDecClass GstFFMpegDecClass;
@@ -208,7 +208,7 @@ gst_ffmpegdec_init(GstFFMpegDec *ffmpegdec)
   gst_element_add_pad (GST_ELEMENT (ffmpegdec), ffmpegdec->sinkpad);
   gst_element_add_pad (GST_ELEMENT (ffmpegdec), ffmpegdec->srcpad);
 
-  ffmpegdec->picture = g_malloc0 (sizeof (AVPicture));
+  ffmpegdec->picture = g_malloc0 (sizeof (AVFrame));
 }
 
 static void
index 15692ed..9dc6795 100644 (file)
@@ -383,7 +383,7 @@ gst_ffmpegenc_chain_video (GstPad *pad, GstBuffer *inbuf)
   GstFFMpegEnc *ffmpegenc = (GstFFMpegEnc *)(gst_pad_get_parent (pad));
   gpointer data;
   gint size, frame_size;
-  AVPicture picture, rpicture, *toencode;
+  AVFrame picture, rpicture, *toencode;
   gboolean free_data = FALSE, free_res = FALSE;
 
   data = GST_BUFFER_DATA (inbuf);
@@ -411,7 +411,7 @@ gst_ffmpegenc_chain_video (GstPad *pad, GstBuffer *inbuf)
   }
   */
 
-  avpicture_fill (&picture, data, PIX_FMT_YUV420P, ffmpegenc->in_width, ffmpegenc->in_height);
+  avpicture_fill ((AVPicture*)&picture, data, PIX_FMT_YUV420P, ffmpegenc->in_width, ffmpegenc->in_height);
   toencode = &picture;
 
   if (ffmpegenc->need_resample) {
@@ -419,12 +419,12 @@ gst_ffmpegenc_chain_video (GstPad *pad, GstBuffer *inbuf)
     guint8 *rdata;
 
     rdata = g_malloc ((rframe_size * 3)/2);
-    avpicture_fill (&rpicture, rdata, PIX_FMT_YUV420P, ffmpegenc->context->width, ffmpegenc->context->height);
+    avpicture_fill ((AVPicture*)&rpicture, rdata, PIX_FMT_YUV420P, ffmpegenc->context->width, ffmpegenc->context->height);
 
     free_res = TRUE;
     toencode = &rpicture;
     
-    img_resample (ffmpegenc->resample, &rpicture, &picture);
+    img_resample (ffmpegenc->resample, (AVPicture*)&rpicture, (AVPicture*)&picture);
   }
 
   outbuf = gst_buffer_new ();
index 7737781..ba4cac1 100644 (file)
@@ -37,7 +37,7 @@ struct _GstFFMpegMux {
   GstPad *sinkpad;
 
   AVCodecContext *context;
-  AVPicture *picture;
+  AVFrame *picture;
 };
 
 typedef struct _GstFFMpegMuxClass GstFFMpegMuxClass;
@@ -213,7 +213,7 @@ gst_ffmpegmux_init(GstFFMpegMux *ffmpegmux)
   gst_element_add_pad (GST_ELEMENT (ffmpegmux), ffmpegmux->sinkpad);
   gst_element_add_pad (GST_ELEMENT (ffmpegmux), ffmpegmux->srcpad);
 
-  ffmpegmux->picture = g_malloc0 (sizeof (AVPicture));
+  ffmpegmux->picture = g_malloc0 (sizeof (AVFrame));
 }
 
 static void