Update API to whatever ffmpeg changed the past few days

Original commit message from CVS:
Update API to whatever ffmpeg changed the past few days
This commit is contained in:
Ronald S. Bultje 2002-12-12 13:12:44 +00:00
parent 306e1bffad
commit 0d32d395f1
4 changed files with 9 additions and 9 deletions

2
common

@ -1 +1 @@
Subproject commit 92ff5101d55c0f853620bf13f8dd528992824137 Subproject commit 79e6940e7ff1a6cbf959a1f7a0a3d1ed3f90d3ee

View file

@ -41,7 +41,7 @@ struct _GstFFMpegDec {
GstPad *sinkpad; GstPad *sinkpad;
AVCodecContext *context; AVCodecContext *context;
AVPicture *picture; AVFrame *picture;
}; };
typedef struct _GstFFMpegDecClass GstFFMpegDecClass; 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->sinkpad);
gst_element_add_pad (GST_ELEMENT (ffmpegdec), ffmpegdec->srcpad); gst_element_add_pad (GST_ELEMENT (ffmpegdec), ffmpegdec->srcpad);
ffmpegdec->picture = g_malloc0 (sizeof (AVPicture)); ffmpegdec->picture = g_malloc0 (sizeof (AVFrame));
} }
static void static void

View file

@ -383,7 +383,7 @@ gst_ffmpegenc_chain_video (GstPad *pad, GstBuffer *inbuf)
GstFFMpegEnc *ffmpegenc = (GstFFMpegEnc *)(gst_pad_get_parent (pad)); GstFFMpegEnc *ffmpegenc = (GstFFMpegEnc *)(gst_pad_get_parent (pad));
gpointer data; gpointer data;
gint size, frame_size; gint size, frame_size;
AVPicture picture, rpicture, *toencode; AVFrame picture, rpicture, *toencode;
gboolean free_data = FALSE, free_res = FALSE; gboolean free_data = FALSE, free_res = FALSE;
data = GST_BUFFER_DATA (inbuf); 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; toencode = &picture;
if (ffmpegenc->need_resample) { if (ffmpegenc->need_resample) {
@ -419,12 +419,12 @@ gst_ffmpegenc_chain_video (GstPad *pad, GstBuffer *inbuf)
guint8 *rdata; guint8 *rdata;
rdata = g_malloc ((rframe_size * 3)/2); 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; free_res = TRUE;
toencode = &rpicture; toencode = &rpicture;
img_resample (ffmpegenc->resample, &rpicture, &picture); img_resample (ffmpegenc->resample, (AVPicture*)&rpicture, (AVPicture*)&picture);
} }
outbuf = gst_buffer_new (); outbuf = gst_buffer_new ();

View file

@ -37,7 +37,7 @@ struct _GstFFMpegMux {
GstPad *sinkpad; GstPad *sinkpad;
AVCodecContext *context; AVCodecContext *context;
AVPicture *picture; AVFrame *picture;
}; };
typedef struct _GstFFMpegMuxClass GstFFMpegMuxClass; 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->sinkpad);
gst_element_add_pad (GST_ELEMENT (ffmpegmux), ffmpegmux->srcpad); gst_element_add_pad (GST_ELEMENT (ffmpegmux), ffmpegmux->srcpad);
ffmpegmux->picture = g_malloc0 (sizeof (AVPicture)); ffmpegmux->picture = g_malloc0 (sizeof (AVFrame));
} }
static void static void