From: Wim Taymans Date: Fri, 29 Apr 2011 16:40:36 +0000 (+0200) Subject: Merge branch 'master' into 0.11 X-Git-Tag: RELEASE-0.11.1~105 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c71a2ec502633c6d0fb11bcb573c26facc355556;p=platform%2Fupstream%2Fgst-libav.git Merge branch 'master' into 0.11 Conflicts: configure.ac ext/ffmpeg/gstffmpegdec.c --- c71a2ec502633c6d0fb11bcb573c26facc355556 diff --cc ext/ffmpeg/gstffmpeg.c index a69bf49,6fccb61..d131e1b --- a/ext/ffmpeg/gstffmpeg.c +++ b/ext/ffmpeg/gstffmpeg.c @@@ -148,11 -148,11 +148,11 @@@ plugin_init (GstPlugin * plugin #endif #if 0 gst_ffmpegcsp_register (plugin); -#endif gst_ffmpegaudioresample_register (plugin); +#endif - register_protocol (&gstreamer_protocol); - register_protocol (&gstpipe_protocol); + av_register_protocol2 (&gstreamer_protocol, sizeof (URLProtocol)); + av_register_protocol2 (&gstpipe_protocol, sizeof (URLProtocol)); /* Now we can return the pointer to the newly created Plugin object. */ return TRUE; diff --cc ext/ffmpeg/gstffmpegdec.c index a70152b,7f9c106..954da4e --- a/ext/ffmpeg/gstffmpegdec.c +++ b/ext/ffmpeg/gstffmpegdec.c @@@ -1021,15 -1036,12 +1021,15 @@@ gst_ffmpegdec_get_buffer (AVCodecContex return avcodec_default_get_buffer (context, picture); } + /* FIXME, unmap me later */ + data = gst_buffer_map (buf, &size, NULL, GST_MAP_WRITE); + /* copy the right pointers and strides in the picture object */ gst_ffmpeg_avpicture_fill ((AVPicture *) picture, - GST_BUFFER_DATA (buf), context->pix_fmt, width, height); + data, context->pix_fmt, width, height); break; } - case CODEC_TYPE_AUDIO: + case AVMEDIA_TYPE_AUDIO: default: GST_ERROR_OBJECT (ffmpegdec, "_get_buffer() should never get called for non-video buffers !"); @@@ -2110,7 -2067,7 +2124,8 @@@ gst_ffmpegdec_audio_frame (GstFFMpegDe gint have_data = AVCODEC_MAX_AUDIO_FRAME_SIZE; GstClockTime out_timestamp, out_duration; gint64 out_offset; + int16_t *odata; + AVPacket *packet; GST_DEBUG_OBJECT (ffmpegdec, "size:%d, offset:%" G_GINT64_FORMAT ", ts:%" GST_TIME_FORMAT ", dur:%" @@@ -2122,9 -2079,9 +2137,11 @@@ new_aligned_buffer (AVCODEC_MAX_AUDIO_FRAME_SIZE, GST_PAD_CAPS (ffmpegdec->srcpad)); + odata = gst_buffer_map (*outbuf, NULL, NULL, GST_MAP_WRITE); - len = avcodec_decode_audio2 (ffmpegdec->context, odata, &have_data, - data, size); ++ + packet = gst_avpacket_new (data, size); - len = avcodec_decode_audio3 (ffmpegdec->context, - (int16_t *) GST_BUFFER_DATA (*outbuf), &have_data, packet); ++ len = avcodec_decode_audio3 (ffmpegdec->context, odata, &have_data, packet); ++ GST_DEBUG_OBJECT (ffmpegdec, "Decode audio: len=%d, have_data=%d", len, have_data);