diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2013-04-26 15:16:01 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2013-04-26 15:19:01 +0200 |
commit | 71e9ba441ebd93c42fb5609306538a745f2a9a8b (patch) | |
tree | 457b6293e46e66d05807d76bb09c032ddc7eb34d | |
parent | 9f0a4c6ac51c66fa91efe9f267624cb9ae398029 (diff) |
Update gst-libav to latest GITdebian/1.0.7-2
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/patches/03_git-2013-04-26.patch (renamed from debian/patches/03_git-2012-12-19.patch) | 1103 | ||||
-rw-r--r-- | debian/patches/series | 2 |
3 files changed, 708 insertions, 399 deletions
diff --git a/debian/changelog b/debian/changelog index 121f666..2b3160d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ gst-libav1.0 (1.0.7-2) experimental; urgency=low * Upload of new version using libav 9. + * debian/patches/03_git-2013-04-26.patch: + + Update patch. -- Sebastian Dröge <slomo@debian.org> Fri, 26 Apr 2013 15:09:18 +0200 diff --git a/debian/patches/03_git-2012-12-19.patch b/debian/patches/03_git-2013-04-26.patch index 7a75824..d1c6f1a 100644 --- a/debian/patches/03_git-2012-12-19.patch +++ b/debian/patches/03_git-2013-04-26.patch @@ -1,8 +1,18 @@ -Index: gst-libav1.0/ext/libav/Makefile.am -=================================================================== ---- gst-libav1.0.orig/ext/libav/Makefile.am 2012-12-18 11:50:11.000000000 +0100 -+++ gst-libav1.0/ext/libav/Makefile.am 2012-12-19 10:46:06.515992803 +0100 -@@ -10,9 +10,9 @@ +diff --git a/ext/Makefile.am b/ext/Makefile.am +index bbdb9f0..16718f6 100644 +--- a/ext/Makefile.am ++++ b/ext/Makefile.am +@@ -1 +1,4 @@ +-SUBDIRS = libav libswscale ++# disable/skip avvideoscale until someone makes it work ++SUBDIRS = libav ++ ++DIST_SUBDIRS = libav libswscale +diff --git a/ext/libav/Makefile.am b/ext/libav/Makefile.am +index a1e51f4..24d0eb9 100644 +--- a/ext/libav/Makefile.am ++++ b/ext/libav/Makefile.am +@@ -10,9 +10,9 @@ libgstlibav_la_SOURCES = gstav.c \ gstavprotocol.c \ gstavcodecmap.c \ gstavutils.c \ @@ -14,7 +24,7 @@ Index: gst-libav1.0/ext/libav/Makefile.am gstavviddec.c \ gstavcfg.c \ gstavdemux.c \ -@@ -40,7 +40,9 @@ +@@ -40,7 +40,9 @@ noinst_HEADERS = \ gstav.h \ gstavcodecmap.h \ gstavutils.h \ @@ -24,11 +34,12 @@ Index: gst-libav1.0/ext/libav/Makefile.am + gstavaudenc.h \ gstavvidenc.h \ gstavcfg.h \ - gstavpipe.h -Index: gst-libav1.0/ext/libav/gstav.c -=================================================================== ---- gst-libav1.0.orig/ext/libav/gstav.c 2012-12-19 10:45:25.000000000 +0100 -+++ gst-libav1.0/ext/libav/gstav.c 2012-12-19 10:46:06.515992803 +0100 +- gstavpipe.h ++ gstavprotocol.h +diff --git a/ext/libav/gstav.c b/ext/libav/gstav.c +index 8c88a13..7884a51 100644 +--- a/ext/libav/gstav.c ++++ b/ext/libav/gstav.c @@ -13,8 +13,8 @@ * * You should have received a copy of the GNU Library General Public @@ -40,7 +51,7 @@ Index: gst-libav1.0/ext/libav/gstav.c */ /* First, include the header file for the plugin, to bring in the -@@ -45,7 +45,7 @@ +@@ -45,7 +45,7 @@ gst_ffmpeg_avcodec_open (AVCodecContext * avctx, AVCodec * codec) int ret; g_static_mutex_lock (&gst_avcodec_mutex); @@ -49,7 +60,7 @@ Index: gst-libav1.0/ext/libav/gstav.c g_static_mutex_unlock (&gst_avcodec_mutex); return ret; -@@ -69,7 +69,7 @@ +@@ -69,7 +69,7 @@ gst_ffmpeg_av_find_stream_info (AVFormatContext * ic) int ret; g_static_mutex_lock (&gst_avcodec_mutex); @@ -58,7 +69,32 @@ Index: gst-libav1.0/ext/libav/gstav.c g_static_mutex_unlock (&gst_avcodec_mutex); return ret; -@@ -156,9 +156,6 @@ +@@ -83,9 +83,6 @@ gst_ffmpeg_log_callback (void *ptr, int level, const char *fmt, va_list vl) + gint len = strlen (fmt); + gchar *fmt2 = NULL; + +- if (_shut_up_I_am_probing) +- return; +- + switch (level) { + case AV_LOG_QUIET: + gst_level = GST_LEVEL_NONE; +@@ -117,10 +114,6 @@ gst_ffmpeg_log_callback (void *ptr, int level, const char *fmt, va_list vl) + } + #endif + +-#ifndef GST_DISABLE_GST_DEBUG +-gboolean _shut_up_I_am_probing = FALSE; +-#endif +- + static gboolean + plugin_init (GstPlugin * plugin) + { +@@ -145,13 +138,9 @@ plugin_init (GstPlugin * plugin) + gst_ffmpegscale_register (plugin); + #endif + #if 0 +- gst_ffmpegcsp_register (plugin); gst_ffmpegaudioresample_register (plugin); #endif @@ -68,10 +104,10 @@ Index: gst-libav1.0/ext/libav/gstav.c /* Now we can return the pointer to the newly created Plugin object. */ return TRUE; } -Index: gst-libav1.0/ext/libav/gstav.h -=================================================================== ---- gst-libav1.0.orig/ext/libav/gstav.h 2012-12-18 11:50:11.000000000 +0100 -+++ gst-libav1.0/ext/libav/gstav.h 2012-12-19 10:46:06.515992803 +0100 +diff --git a/ext/libav/gstav.h b/ext/libav/gstav.h +index 5cd69a5..82e2972 100644 +--- a/ext/libav/gstav.h ++++ b/ext/libav/gstav.h @@ -13,8 +13,8 @@ * * You should have received a copy of the GNU Library General Public @@ -83,37 +119,45 @@ Index: gst-libav1.0/ext/libav/gstav.h */ /* First, include the header file for the plugin, to bring in the -@@ -28,6 +28,8 @@ - #include <libavformat/avformat.h> +@@ -36,21 +36,16 @@ GST_DEBUG_CATEGORY_EXTERN (ffmpeg_debug); - #include <gst/gst.h> -+#include <gst/audio/audio.h> -+#include <gst/video/video.h> + G_BEGIN_DECLS + +-#ifndef GST_DISABLE_GST_DEBUG +-extern gboolean _shut_up_I_am_probing; +-#endif +- + extern gboolean gst_ffmpegdemux_register (GstPlugin * plugin); + extern gboolean gst_ffmpegauddec_register (GstPlugin * plugin); + extern gboolean gst_ffmpegviddec_register (GstPlugin * plugin); + extern gboolean gst_ffmpegaudenc_register (GstPlugin * plugin); + extern gboolean gst_ffmpegvidenc_register (GstPlugin * plugin); + extern gboolean gst_ffmpegmux_register (GstPlugin * plugin); +-extern gboolean gst_ffmpegcsp_register (GstPlugin * plugin); + #if 0 + extern gboolean gst_ffmpegscale_register (GstPlugin * plugin); +-#endif + extern gboolean gst_ffmpegaudioresample_register (GstPlugin * plugin); ++#endif + extern gboolean gst_ffmpegdeinterlace_register (GstPlugin * plugin); - GST_DEBUG_CATEGORY_EXTERN (ffmpeg_debug); - #define GST_CAT_DEFAULT ffmpeg_debug -@@ -55,10 +57,13 @@ - int gst_ffmpeg_avcodec_close (AVCodecContext *avctx); - int gst_ffmpeg_av_find_stream_info(AVFormatContext *ic); + int gst_ffmpeg_avcodec_open (AVCodecContext *avctx, AVCodec *codec); +@@ -59,9 +54,6 @@ int gst_ffmpeg_av_find_stream_info(AVFormatContext *ic); --G_END_DECLS -+int gst_ffmpegdata_open (GstPad * pad, int flags, AVIOContext ** context); -+int gst_ffmpegdata_close (AVIOContext * h); -+typedef struct _GstFFMpegPipe GstFFMpegPipe; -+int gst_ffmpeg_pipe_open (GstFFMpegPipe *ffpipe, int flags, AVIOContext ** context); -+int gst_ffmpeg_pipe_close (AVIOContext * h); + G_END_DECLS -extern URLProtocol gstreamer_protocol; -extern URLProtocol gstpipe_protocol; -+G_END_DECLS - +- /* use GST_FFMPEG URL_STREAMHEADER with URL_WRONLY if the first * buffer should be used as streamheader property on the pad's caps. */ -Index: gst-libav1.0/ext/libav/gstavauddec.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gst-libav1.0/ext/libav/gstavauddec.c 2012-12-19 10:46:06.515992803 +0100 -@@ -0,0 +1,887 @@ + #define GST_FFMPEG_URL_STREAMHEADER 16 +diff --git a/ext/libav/gstavauddec.c b/ext/libav/gstavauddec.c +new file mode 100644 +index 0000000..e6646af +--- /dev/null ++++ b/ext/libav/gstavauddec.c +@@ -0,0 +1,893 @@ +/* GStreamer + * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu> + * Copyright (C) <2012> Collabora Ltd. @@ -552,6 +596,8 @@ Index: gst-libav1.0/ext/libav/gstavauddec.c + + if (len >= 0 && have_data > 0) { + BufferInfo *buffer_info = frame.opaque; ++ gint nsamples, channels, byte_per_sample; ++ gsize output_size; + + if (!gst_ffmpegauddec_negotiate (ffmpegdec, FALSE)) { + *outbuf = NULL; @@ -560,6 +606,13 @@ Index: gst-libav1.0/ext/libav/gstavauddec.c + goto beach; + } + ++ channels = ffmpegdec->info.channels; ++ nsamples = frame.nb_samples; ++ byte_per_sample = ffmpegdec->info.finfo->width / 8; ++ ++ /* frame.linesize[0] might contain padding, allocate only what's needed */ ++ output_size = nsamples * byte_per_sample * channels; ++ + GST_DEBUG_OBJECT (ffmpegdec, "Creating output buffer"); + if (buffer_info) { + *outbuf = buffer_info->buffer; @@ -567,20 +620,17 @@ Index: gst-libav1.0/ext/libav/gstavauddec.c + g_slice_free (BufferInfo, buffer_info); + frame.opaque = NULL; + } else if (av_sample_fmt_is_planar (ffmpegdec->context->sample_fmt) -+ && ffmpegdec->info.channels > 1) { ++ && channels > 1) { + gint i, j; -+ gint nsamples, channels; + GstMapInfo minfo; + -+ channels = ffmpegdec->info.channels; -+ ++ /* note: linesize[0] might contain padding, allocate only what's needed */ + *outbuf = + gst_audio_decoder_allocate_output_buffer (GST_AUDIO_DECODER -+ (ffmpegdec), frame.linesize[0] * channels); ++ (ffmpegdec), output_size); + + gst_buffer_map (*outbuf, &minfo, GST_MAP_WRITE); + -+ nsamples = frame.nb_samples; + switch (ffmpegdec->info.finfo->width) { + case 8:{ + guint8 *odata = minfo.data; @@ -634,8 +684,8 @@ Index: gst-libav1.0/ext/libav/gstavauddec.c + } else { + *outbuf = + gst_audio_decoder_allocate_output_buffer (GST_AUDIO_DECODER -+ (ffmpegdec), frame.linesize[0]); -+ gst_buffer_fill (*outbuf, 0, frame.data[0], frame.linesize[0]); ++ (ffmpegdec), output_size); ++ gst_buffer_fill (*outbuf, 0, frame.data[0], output_size); + } + + GST_DEBUG_OBJECT (ffmpegdec, "Buffer created. Size: %d", have_data); @@ -795,8 +845,8 @@ Index: gst-libav1.0/ext/libav/gstavauddec.c + oclass = (GstFFMpegAudDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec)); + + GST_LOG_OBJECT (ffmpegdec, -+ "Received new data of size %u, offset:%" G_GUINT64_FORMAT ", ts:%" -+ GST_TIME_FORMAT ", dur:%" GST_TIME_FORMAT, ++ "Received new data of size %" G_GSIZE_FORMAT ", offset:%" G_GUINT64_FORMAT ++ ", ts:%" GST_TIME_FORMAT ", dur:%" GST_TIME_FORMAT, + gst_buffer_get_size (inbuf), GST_BUFFER_OFFSET (inbuf), + GST_TIME_ARGS (GST_BUFFER_PTS (inbuf)), + GST_TIME_ARGS (GST_BUFFER_DURATION (inbuf))); @@ -1001,10 +1051,11 @@ Index: gst-libav1.0/ext/libav/gstavauddec.c + + return TRUE; +} -Index: gst-libav1.0/ext/libav/gstavauddec.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gst-libav1.0/ext/libav/gstavauddec.h 2012-12-19 10:46:06.515992803 +0100 +diff --git a/ext/libav/gstavauddec.h b/ext/libav/gstavauddec.h +new file mode 100644 +index 0000000..23d11fd +--- /dev/null ++++ b/ext/libav/gstavauddec.h @@ -0,0 +1,73 @@ +/* GStreamer + * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu> @@ -1079,11 +1130,12 @@ Index: gst-libav1.0/ext/libav/gstavauddec.h +G_END_DECLS + +#endif -Index: gst-libav1.0/ext/libav/gstavaudenc.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gst-libav1.0/ext/libav/gstavaudenc.c 2012-12-19 10:46:06.515992803 +0100 -@@ -0,0 +1,741 @@ +diff --git a/ext/libav/gstavaudenc.c b/ext/libav/gstavaudenc.c +new file mode 100644 +index 0000000..2db08bb +--- /dev/null ++++ b/ext/libav/gstavaudenc.c +@@ -0,0 +1,752 @@ +/* GStreamer + * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu> + * Copyright (C) <2012> Collabora Ltd. @@ -1749,6 +1801,7 @@ Index: gst-libav1.0/ext/libav/gstavaudenc.c + in_plugin = av_codec_next (NULL); + while (in_plugin) { + gchar *type_name; ++ guint rank; + + /* Skip non-AV codecs */ + if (in_plugin->type != AVMEDIA_TYPE_AUDIO) @@ -1810,7 +1863,17 @@ Index: gst-libav1.0/ext/libav/gstavaudenc.c + } + } + -+ if (!gst_element_register (plugin, type_name, GST_RANK_SECONDARY, type)) { ++ switch (in_plugin->id) { ++ /* avenc_aac: see https://bugzilla.gnome.org/show_bug.cgi?id=691617 */ ++ case CODEC_ID_AAC: ++ rank = GST_RANK_NONE; ++ break; ++ default: ++ rank = GST_RANK_SECONDARY; ++ break; ++ } ++ ++ if (!gst_element_register (plugin, type_name, rank, type)) { + g_free (type_name); + return FALSE; + } @@ -1825,10 +1888,11 @@ Index: gst-libav1.0/ext/libav/gstavaudenc.c + + return TRUE; +} -Index: gst-libav1.0/ext/libav/gstavaudenc.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gst-libav1.0/ext/libav/gstavaudenc.h 2012-12-19 10:46:06.519992803 +0100 +diff --git a/ext/libav/gstavaudenc.h b/ext/libav/gstavaudenc.h +new file mode 100644 +index 0000000..b01184f +--- /dev/null ++++ b/ext/libav/gstavaudenc.h @@ -0,0 +1,77 @@ +/* GStreamer + * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu> @@ -1907,10 +1971,10 @@ Index: gst-libav1.0/ext/libav/gstavaudenc.h +G_END_DECLS + +#endif /* __GST_FFMPEGAUDENC_H__ */ -Index: gst-libav1.0/ext/libav/gstavcfg.c -=================================================================== ---- gst-libav1.0.orig/ext/libav/gstavcfg.c 2012-12-18 11:50:11.000000000 +0100 -+++ gst-libav1.0/ext/libav/gstavcfg.c 2012-12-19 10:46:06.519992803 +0100 +diff --git a/ext/libav/gstavcfg.c b/ext/libav/gstavcfg.c +index 5ee23dd..1d7c9d7 100644 +--- a/ext/libav/gstavcfg.c ++++ b/ext/libav/gstavcfg.c @@ -16,8 +16,8 @@ * * You should have received a copy of the GNU Library General Public @@ -1922,7 +1986,7 @@ Index: gst-libav1.0/ext/libav/gstavcfg.c */ -@@ -147,7 +147,6 @@ +@@ -147,7 +147,6 @@ gst_ffmpeg_dct_algo_get_type (void) {FF_DCT_FASTINT, "Fast Integer", "fastint"}, {FF_DCT_INT, "Accurate Integer", "int"}, {FF_DCT_MMX, "MMX", "mmx"}, @@ -1930,7 +1994,7 @@ Index: gst-libav1.0/ext/libav/gstavcfg.c {FF_DCT_ALTIVEC, "ALTIVEC", "altivec"}, {FF_DCT_FAAN, "FAAN", "faan"}, {0, NULL, NULL}, -@@ -173,8 +172,6 @@ +@@ -173,8 +172,6 @@ gst_ffmpeg_idct_algo_get_type (void) {FF_IDCT_SIMPLE, "Simple", "simple"}, {FF_IDCT_SIMPLEMMX, "Simple MMX", "simplemmx"}, {FF_IDCT_LIBMPEG2MMX, "LIBMPEG2MMX", "libmpeg2mmx"}, @@ -1939,7 +2003,7 @@ Index: gst-libav1.0/ext/libav/gstavcfg.c {FF_IDCT_ARM, "ARM", "arm"}, {FF_IDCT_ALTIVEC, "ALTIVEC", "altivec"}, {FF_IDCT_SH4, "SH4", "sh4"}, -@@ -263,16 +260,11 @@ +@@ -263,16 +260,11 @@ gst_ffmpeg_flags_get_type (void) if (!ffmpeg_flags_type) { static const GFlagsValue ffmpeg_flags[] = { @@ -1956,7 +2020,7 @@ Index: gst-libav1.0/ext/libav/gstavcfg.c {CODEC_FLAG_LOOP_FILTER, "Loop filter", "loop-filter"}, {CODEC_FLAG_GRAY, "Only decode/encode grayscale", "gray"}, {CODEC_FLAG_NORMALIZE_AQP, -@@ -282,13 +274,9 @@ +@@ -282,13 +274,9 @@ gst_ffmpeg_flags_get_type (void) "global-headers"}, {CODEC_FLAG_AC_PRED, "H263 Advanced Intra Coding / MPEG4 AC prediction", "aic"}, @@ -1970,7 +2034,7 @@ Index: gst-libav1.0/ext/libav/gstavcfg.c {CODEC_FLAG_CLOSED_GOP, "Closed GOP", "closedgop"}, {0, NULL, NULL}, }; -@@ -750,10 +738,8 @@ +@@ -750,10 +738,8 @@ gst_ffmpeg_cfg_install_property (GstFFMpegVidEncClass * klass, guint base) prop_id = base; g_return_if_fail (base > 0); @@ -1983,10 +2047,10 @@ Index: gst-libav1.0/ext/libav/gstavcfg.c g_warning ("could not get context"); for (list = property_list; list; list = list->next) { -Index: gst-libav1.0/ext/libav/gstavcfg.h -=================================================================== ---- gst-libav1.0.orig/ext/libav/gstavcfg.h 2012-12-18 11:50:11.000000000 +0100 -+++ gst-libav1.0/ext/libav/gstavcfg.h 2012-12-19 10:46:06.519992803 +0100 +diff --git a/ext/libav/gstavcfg.h b/ext/libav/gstavcfg.h +index 5251eb2..2aef665 100644 +--- a/ext/libav/gstavcfg.h ++++ b/ext/libav/gstavcfg.h @@ -13,8 +13,8 @@ * * You should have received a copy of the GNU Library General Public @@ -1998,10 +2062,10 @@ Index: gst-libav1.0/ext/libav/gstavcfg.h */ -Index: gst-libav1.0/ext/libav/gstavcodecmap.c -=================================================================== ---- gst-libav1.0.orig/ext/libav/gstavcodecmap.c 2012-12-19 10:41:47.607997717 +0100 -+++ gst-libav1.0/ext/libav/gstavcodecmap.c 2012-12-19 10:46:06.523992803 +0100 +diff --git a/ext/libav/gstavcodecmap.c b/ext/libav/gstavcodecmap.c +index 7b28800..cac15ee 100644 +--- a/ext/libav/gstavcodecmap.c ++++ b/ext/libav/gstavcodecmap.c @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public @@ -2066,7 +2130,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c /* IMPORTANT: Keep this sorted by the ffmpeg channel masks */ static const struct { -@@ -80,34 +43,60 @@ +@@ -80,34 +43,60 @@ static const struct GstAudioChannelPosition gst; } _ff_to_gst_layout[] = { { @@ -2150,7 +2214,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c gboolean none_layout = FALSE; if (channel_layout == 0) { -@@ -170,6 +159,52 @@ +@@ -170,6 +159,52 @@ gst_ffmpeg_channel_layout_to_gst (AVCodecContext * context, return TRUE; } @@ -2203,7 +2267,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c /* this macro makes a caps width fixed or unfixed width/height * properties depending on whether we've got a context. * -@@ -179,10 +214,10 @@ +@@ -179,10 +214,10 @@ gst_ffmpeg_channel_layout_to_gst (AVCodecContext * context, * but I'm too lazy today. Maybe later. */ static GstCaps * @@ -2217,7 +2281,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c GstCaps *caps = NULL; va_list var_args; gint i; -@@ -252,32 +287,58 @@ +@@ -252,32 +287,58 @@ gst_ff_vid_caps_new (AVCodecContext * context, enum CodecID codec_id, { static struct { @@ -2264,6 +2328,8 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c - "framerate", GST_TYPE_FRACTION, profiles[i].framerate_n, - profiles[i].framerate_d, "pixel-aspect-ratio", GST_TYPE_FRACTION, - profiles[i].par_n, profiles[i].par_d, NULL); +- +- gst_caps_append (caps, temp); + if (strcmp (mimetype, "video/x-raw") == 0) { + caps = gst_caps_new_empty (); + for (i = 0; i < n_sizes; i++) { @@ -2274,8 +2340,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c + "framerate", GST_TYPE_FRACTION, profiles[i].framerate_n, + profiles[i].framerate_d, "pixel-aspect-ratio", + GST_TYPE_FRACTION, profiles[i].par_n, profiles[i].par_d, NULL); - -- gst_caps_append (caps, temp); ++ + gst_caps_append (caps, temp); + } + } else { @@ -2293,7 +2358,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c } break; } -@@ -294,7 +355,40 @@ +@@ -294,7 +355,40 @@ gst_ff_vid_caps_new (AVCodecContext * context, enum CodecID codec_id, break; } default: @@ -2334,7 +2399,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c } } -@@ -302,27 +396,84 @@ +@@ -302,27 +396,84 @@ gst_ff_vid_caps_new (AVCodecContext * context, enum CodecID codec_id, * default unfixed setting */ if (!caps) { GST_DEBUG ("Creating default caps"); @@ -2429,7 +2494,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c gint i; va_list var_args; -@@ -334,7 +485,8 @@ +@@ -334,7 +485,8 @@ gst_ff_aud_caps_new (AVCodecContext * context, enum CodecID codec_id, "rate", G_TYPE_INT, context->sample_rate, "channels", G_TYPE_INT, context->channels, NULL); @@ -2439,7 +2504,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c guint64 mask; if (gst_audio_channel_positions_to_mask (pos, context->channels, FALSE, -@@ -422,10 +574,6 @@ +@@ -422,10 +574,6 @@ gst_ff_aud_caps_new (AVCodecContext * context, enum CodecID codec_id, break; } @@ -2450,7 +2515,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c /* regardless of encode/decode, open up channels if applicable */ /* Until decoders/encoders expose the maximum number of channels * they support, we whitelist them here. */ -@@ -438,15 +586,40 @@ +@@ -438,15 +586,40 @@ gst_ff_aud_caps_new (AVCodecContext * context, enum CodecID codec_id, break; } @@ -2498,7 +2563,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c g_value_init (&list, GST_TYPE_LIST); for (i = 0; i < n_rates; i++) { -@@ -457,21 +630,41 @@ +@@ -457,21 +630,41 @@ gst_ff_aud_caps_new (AVCodecContext * context, enum CodecID codec_id, gst_value_list_append_value (&list, &v); g_value_unset (&v); } @@ -2549,7 +2614,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c return caps; } -@@ -504,7 +697,7 @@ +@@ -504,7 +697,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, switch (codec_id) { case CODEC_ID_MPEG1VIDEO: /* FIXME: bitrate */ @@ -2558,7 +2623,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c "mpegversion", G_TYPE_INT, 1, "systemstream", G_TYPE_BOOLEAN, FALSE, NULL); break; -@@ -512,9 +705,10 @@ +@@ -512,9 +705,10 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, case CODEC_ID_MPEG2VIDEO: if (encode) { /* FIXME: bitrate */ @@ -2572,7 +2637,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c } else { /* decode both MPEG-1 and MPEG-2; width/height/fps are all in * the MPEG video stream headers, so may be omitted from caps. */ -@@ -530,23 +724,25 @@ +@@ -530,23 +724,25 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, case CODEC_ID_H263: if (encode) { @@ -2606,7 +2671,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c if (encode && context) { gst_caps_set_simple (caps, -@@ -560,13 +756,14 @@ +@@ -560,13 +756,14 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, case CODEC_ID_H263I: caps = @@ -2624,7 +2689,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c break; case CODEC_ID_RV10: -@@ -593,7 +790,7 @@ +@@ -593,7 +790,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, /* FIXME: context->sub_id must be filled in during decoding */ caps = @@ -2633,7 +2698,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c "video/x-pn-realvideo", "systemstream", G_TYPE_BOOLEAN, FALSE, "rmversion", G_TYPE_INT, version, NULL); if (context) { -@@ -609,20 +806,21 @@ +@@ -609,20 +806,21 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, case CODEC_ID_MP1: /* FIXME: bitrate */ @@ -2658,7 +2723,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c "mpegversion", G_TYPE_INT, 1, "layer", G_TYPE_INT, 3, NULL); } else { /* Decodes MPEG-1 layer 1/2/3. Samplerate, channels et al are -@@ -635,14 +833,14 @@ +@@ -635,14 +833,14 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, case CODEC_ID_MUSEPACK7: caps = @@ -2675,7 +2740,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c "audio/x-ffmpeg-parsed-musepack", "streamversion", G_TYPE_INT, 8, NULL); break; -@@ -650,41 +848,44 @@ +@@ -650,41 +848,44 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, case CODEC_ID_AC3: /* FIXME: bitrate */ caps = @@ -2728,7 +2793,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c "audio/x-ffmpeg-parsed-ape", NULL); if (context) { gst_caps_set_simple (caps, -@@ -694,12 +895,14 @@ +@@ -694,12 +895,14 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, case CODEC_ID_MLP: caps = @@ -2745,7 +2810,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c break; /* MJPEG is normal JPEG, Motion-JPEG and Quicktime MJPEG-A. MJPEGB -@@ -710,18 +913,20 @@ +@@ -710,18 +913,20 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, case CODEC_ID_MJPEG: case CODEC_ID_LJPEG: caps = @@ -2770,7 +2835,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c break; case CODEC_ID_MPEG4: -@@ -731,41 +936,42 @@ +@@ -731,41 +936,42 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, switch (context->codec_tag) { case GST_MAKE_FOURCC ('D', 'I', 'V', 'X'): caps = @@ -2831,7 +2896,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c break; case CODEC_ID_MSMPEG4V1: -@@ -775,11 +981,12 @@ +@@ -775,11 +981,12 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, gint version = 41 + codec_id - CODEC_ID_MSMPEG4V1; /* encode-FIXME: bitrate */ @@ -2848,7 +2913,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c } } break; -@@ -789,30 +996,34 @@ +@@ -789,30 +996,34 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, { gint version = (codec_id == CODEC_ID_WMV1) ? 1 : 2; @@ -2889,7 +2954,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c break; case CODEC_ID_DVVIDEO: -@@ -846,11 +1057,13 @@ +@@ -846,11 +1057,13 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, format = "I420"; break; } @@ -2907,7 +2972,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c "systemstream", G_TYPE_BOOLEAN, FALSE, NULL); } } -@@ -862,21 +1075,24 @@ +@@ -862,21 +1075,24 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, gint version = (codec_id == CODEC_ID_WMAV1) ? 1 : 2; if (context) { @@ -2941,7 +3006,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c "wmaversion", G_TYPE_INT, 3, NULL); break; } -@@ -884,7 +1100,8 @@ +@@ -884,7 +1100,8 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, case CODEC_ID_WMAVOICE: { caps = @@ -2951,7 +3016,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c break; } -@@ -893,15 +1110,16 @@ +@@ -893,15 +1110,16 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, { gint version = (codec_id == CODEC_ID_MACE3) ? 3 : 6; @@ -2971,7 +3036,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c if (context) { gst_caps_set_simple (caps, "bpp", G_TYPE_INT, context->bits_per_coded_sample, NULL); -@@ -910,84 +1128,93 @@ +@@ -910,84 +1128,93 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, case CODEC_ID_CYUV: caps = @@ -3083,7 +3148,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c if (!encode) { GValue arr = { 0, }; -@@ -1029,45 +1256,50 @@ +@@ -1029,45 +1256,50 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, break; } case CODEC_ID_AAC_LATM: /* LATM/LOAS AAC syntax */ @@ -3142,7 +3207,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c NULL); break; -@@ -1078,26 +1310,28 @@ +@@ -1078,26 +1310,28 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, break; case CODEC_ID_VCR1: @@ -3178,7 +3243,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c "layout", G_TYPE_STRING, "microsoft", NULL); if (context) { gst_caps_set_simple (caps, -@@ -1108,7 +1342,8 @@ +@@ -1108,7 +1342,8 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, break; case CODEC_ID_QTRLE: @@ -3188,7 +3253,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c "layout", G_TYPE_STRING, "quicktime", NULL); if (context) { gst_caps_set_simple (caps, -@@ -1120,54 +1355,59 @@ +@@ -1120,54 +1355,59 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, case CODEC_ID_MSVIDEO1: caps = @@ -3199,9 +3264,10 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c case CODEC_ID_WMV3: - caps = gst_ff_vid_caps_new (context, codec_id, encode, "video/x-wmv", +- "wmvversion", G_TYPE_INT, 3, NULL); + caps = + gst_ff_vid_caps_new (context, NULL, codec_id, encode, "video/x-wmv", - "wmvversion", G_TYPE_INT, 3, NULL); ++ "wmvversion", G_TYPE_INT, 3, "format", G_TYPE_STRING, "WMV3", NULL); break; case CODEC_ID_VC1: - caps = gst_ff_vid_caps_new (context, codec_id, encode, "video/x-wmv", @@ -3262,7 +3328,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c if (context) { gst_caps_set_simple (caps, "depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL); -@@ -1178,142 +1418,164 @@ +@@ -1178,142 +1418,164 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, case CODEC_ID_KMVC: caps = @@ -3459,7 +3525,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c if (context) { gst_caps_set_simple (caps, "depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL); -@@ -1328,8 +1590,6 @@ +@@ -1328,8 +1590,6 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, case CODEC_ID_FLIC: case CODEC_ID_VMDVIDEO: case CODEC_ID_VMDAUDIO: @@ -3468,7 +3534,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c case CODEC_ID_SNOW: case CODEC_ID_VIXL: case CODEC_ID_QPEG: -@@ -1379,7 +1639,8 @@ +@@ -1379,7 +1639,8 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, break; } @@ -3478,7 +3544,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c "format", G_TYPE_STRING, gst_audio_format_to_string (format), "layout", G_TYPE_STRING, "interleaved", NULL); } -@@ -1387,18 +1648,20 @@ +@@ -1387,18 +1648,20 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, case CODEC_ID_PCM_MULAW: caps = @@ -3502,7 +3568,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c if (context) gst_caps_set_simple (caps, "block_align", G_TYPE_INT, context->block_align, -@@ -1408,7 +1671,8 @@ +@@ -1408,7 +1671,8 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, case CODEC_ID_ADPCM_G726: { /* the G726 decoder can also handle G721 */ @@ -3512,7 +3578,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c "layout", G_TYPE_STRING, "g726", NULL); if (context) gst_caps_set_simple (caps, -@@ -1541,7 +1805,8 @@ +@@ -1541,7 +1805,8 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, /* FIXME: someone please check whether we need additional properties * in this caps definition. */ @@ -3522,7 +3588,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c "layout", G_TYPE_STRING, layout, NULL); if (context) gst_caps_set_simple (caps, -@@ -1551,34 +1816,39 @@ +@@ -1551,34 +1816,39 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, break; case CODEC_ID_AMR_NB: @@ -3569,7 +3635,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c NULL); if (context) { gst_caps_set_simple (caps, -@@ -1610,7 +1880,7 @@ +@@ -1610,7 +1880,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, /* FIXME: properties? */ caps = @@ -3578,7 +3644,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c "audio/x-pn-realaudio", "raversion", G_TYPE_INT, version, NULL); if (context) { gst_caps_set_simple (caps, -@@ -1647,7 +1917,8 @@ +@@ -1647,7 +1917,8 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, /* FIXME: someone please check whether we need additional properties * in this caps definition. */ @@ -3588,7 +3654,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c "layout", G_TYPE_STRING, layout, NULL); if (context) gst_caps_set_simple (caps, -@@ -1662,7 +1933,8 @@ +@@ -1662,7 +1933,8 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, case CODEC_ID_ALAC: caps = @@ -3598,7 +3664,18 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c if (context) { gst_caps_set_simple (caps, "samplesize", G_TYPE_INT, context->bits_per_coded_sample, NULL); -@@ -1686,7 +1958,8 @@ +@@ -1677,6 +1949,10 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, + } + break; + ++ case CODEC_ID_S302M: ++ caps = gst_caps_new_empty_simple ("audio/x-smpte-302m"); ++ break; ++ + case CODEC_ID_DVD_SUBTITLE: + case CODEC_ID_DVB_SUBTITLE: + caps = NULL; +@@ -1686,7 +1962,8 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, break; case CODEC_ID_TTA: caps = @@ -3608,7 +3685,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c if (context) { gst_caps_set_simple (caps, "samplesize", G_TYPE_INT, context->bits_per_coded_sample, NULL); -@@ -1694,8 +1967,8 @@ +@@ -1694,8 +1971,8 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, break; case CODEC_ID_TWINVQ: caps = @@ -3619,7 +3696,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c break; default: GST_DEBUG ("Unknown codec ID %d, please add mapping here", codec_id); -@@ -1714,12 +1987,14 @@ +@@ -1714,12 +1991,14 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, switch (codec->type) { case AVMEDIA_TYPE_VIDEO: mime = g_strdup_printf ("video/x-gst-av-%s", codec->name); @@ -3636,7 +3713,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c if (context) gst_caps_set_simple (caps, "block_align", G_TYPE_INT, context->block_align, -@@ -1743,11 +2018,6 @@ +@@ -1743,11 +2022,6 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, gst_buffer_unref (data); } @@ -3648,7 +3725,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c GST_LOG ("caps for codec_id=%d: %" GST_PTR_FORMAT, codec_id, caps); } else { -@@ -1764,7 +2034,7 @@ +@@ -1764,7 +2038,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, * See below for usefullness */ @@ -3657,7 +3734,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, AVCodecContext * context, enum CodecID codec_id) { -@@ -1774,7 +2044,7 @@ +@@ -1774,7 +2048,7 @@ gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, AVCodecContext * context, format = gst_ffmpeg_pixfmt_to_videoformat (pix_fmt); if (format != GST_VIDEO_FORMAT_UNKNOWN) { @@ -3666,7 +3743,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c "format", G_TYPE_STRING, gst_video_format_to_string (format), NULL); } -@@ -1787,41 +2057,55 @@ +@@ -1787,41 +2061,55 @@ gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, AVCodecContext * context, return caps; } @@ -3741,7 +3818,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c "format", G_TYPE_STRING, gst_audio_format_to_string (format), "layout", G_TYPE_STRING, "interleaved", NULL); GST_LOG ("caps for sample_fmt=%d: %" GST_PTR_FORMAT, sample_fmt, caps); -@@ -1832,6 +2116,22 @@ +@@ -1832,6 +2120,22 @@ gst_ffmpeg_smpfmt_to_caps (enum AVSampleFormat sample_fmt, return caps; } @@ -3764,7 +3841,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c GstCaps * gst_ffmpeg_codectype_to_audio_caps (AVCodecContext * context, enum CodecID codec_id, gboolean encode, AVCodec * codec) -@@ -1846,32 +2146,17 @@ +@@ -1846,32 +2150,17 @@ gst_ffmpeg_codectype_to_audio_caps (AVCodecContext * context, if (context) { /* Specific codec context */ @@ -3806,7 +3883,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c return caps; } -@@ -1887,53 +2172,15 @@ +@@ -1887,50 +2176,12 @@ gst_ffmpeg_codectype_to_video_caps (AVCodecContext * context, if (context) { caps = gst_ffmpeg_pixfmt_to_caps (context->pix_fmt, context, codec_id); } else { @@ -3823,15 +3900,10 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c - gst_caps_append (caps, temp); - } - } -+ caps = -+ gst_ff_vid_caps_new (context, codec, codec_id, encode, "video/x-raw", -+ NULL); -+ if (!caps_has_field (caps, "format")) -+ gst_ffmpeg_video_set_pix_fmts (caps, codec ? codec->pix_fmts : NULL); - } - return caps; - } - +- } +- return caps; +-} +- -/* Convert a FFMPEG codec Type and optional AVCodecContext - * to a GstCaps. If the context is ommitted, no fixed values - * for video/audio size will be included in the GstCaps @@ -3857,15 +3929,17 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c - default: - caps = NULL; - break; -- } -- -- return caps; --} ++ caps = ++ gst_ff_vid_caps_new (context, codec, codec_id, encode, "video/x-raw", ++ NULL); ++ if (!caps_has_field (caps, "format")) ++ gst_ffmpeg_video_set_pix_fmts (caps, codec ? codec->pix_fmts : NULL); + } - - /* Convert a GstCaps (audio/raw) to a FFMPEG SampleFmt - * and other audio properties in a AVCodecContext. - * -@@ -2033,8 +2280,6 @@ + return caps; + } + +@@ -2033,8 +2284,6 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps * caps, context->sample_aspect_ratio.num); } @@ -3874,7 +3948,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c if (!raw) return; -@@ -2182,6 +2427,11 @@ +@@ -2182,6 +2431,11 @@ static const PixToFmt pixtofmttable[] = { {GST_VIDEO_FORMAT_I420_10BE, PIX_FMT_YUV420P10BE}, {GST_VIDEO_FORMAT_I422_10LE, PIX_FMT_YUV422P10LE}, {GST_VIDEO_FORMAT_I422_10BE, PIX_FMT_YUV422P10BE}, @@ -3886,7 +3960,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c }; GstVideoFormat -@@ -2230,6 +2480,112 @@ +@@ -2230,6 +2484,112 @@ gst_ffmpeg_videoinfo_to_context (GstVideoInfo * info, AVCodecContext * context) gst_ffmpeg_videoformat_to_pixfmt (GST_VIDEO_INFO_FORMAT (info)); } @@ -3999,10 +4073,10 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.c /* Convert a GstCaps and a FFMPEG codec Type to a * AVCodecContext. If the context is ommitted, no fixed values * for video/audio size will be included in the context -Index: gst-libav1.0/ext/libav/gstavcodecmap.h -=================================================================== ---- gst-libav1.0.orig/ext/libav/gstavcodecmap.h 2012-12-18 11:50:11.630158238 +0100 -+++ gst-libav1.0/ext/libav/gstavcodecmap.h 2012-12-19 10:46:06.523992803 +0100 +diff --git a/ext/libav/gstavcodecmap.h b/ext/libav/gstavcodecmap.h +index 52e5bec..01ce9b1 100644 +--- a/ext/libav/gstavcodecmap.h ++++ b/ext/libav/gstavcodecmap.h @@ -13,8 +13,8 @@ * * You should have received a copy of the GNU Library General Public @@ -4014,7 +4088,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.h */ #ifndef __GST_FFMPEG_CODECMAP_H__ -@@ -41,11 +41,6 @@ +@@ -41,11 +41,6 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, */ GstCaps * @@ -4026,7 +4100,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.h gst_ffmpeg_codectype_to_audio_caps (AVCodecContext *context, enum CodecID codec_id, gboolean encode, -@@ -91,9 +86,15 @@ +@@ -91,9 +86,15 @@ void gst_ffmpeg_videoinfo_to_context (GstVideoInfo *info, AVCodecContext *context); @@ -4042,7 +4116,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.h /* * _formatid_to_caps () is meant for muxers/demuxers, it * transforms a name (ffmpeg way of ID'ing these, why don't -@@ -104,19 +105,6 @@ +@@ -104,19 +105,6 @@ enum PixelFormat gst_ffmpeg_videoformat_to_pixfmt (GstVideoFormat format); GstCaps * gst_ffmpeg_formatid_to_caps (const gchar *format_name); @@ -4062,7 +4136,7 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.h /* * _formatid_get_codecids () can be used to get the codecIDs * (CODEC_ID_NONE-terminated list) that fit that specific -@@ -131,7 +119,7 @@ +@@ -131,7 +119,7 @@ gst_ffmpeg_formatid_get_codecids (const gchar *format_name, gboolean @@ -4071,10 +4145,11 @@ Index: gst-libav1.0/ext/libav/gstavcodecmap.h GstAudioChannelPosition * pos); #endif /* __GST_FFMPEG_CODECMAP_H__ */ -Index: gst-libav1.0/ext/libav/gstavdec.c -=================================================================== ---- gst-libav1.0.orig/ext/libav/gstavdec.c 2012-12-18 11:50:11.000000000 +0100 -+++ /dev/null 1970-01-01 00:00:00.000000000 +0000 +diff --git a/ext/libav/gstavdec.c b/ext/libav/gstavdec.c +deleted file mode 100644 +index 8291099..0000000 +--- a/ext/libav/gstavdec.c ++++ /dev/null @@ -1,1457 +0,0 @@ -/* GStreamer - * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu> @@ -5533,10 +5608,10 @@ Index: gst-libav1.0/ext/libav/gstavdec.c - - return TRUE; -} -Index: gst-libav1.0/ext/libav/gstavdeinterlace.c -=================================================================== ---- gst-libav1.0.orig/ext/libav/gstavdeinterlace.c 2012-12-18 11:50:11.000000000 +0100 -+++ gst-libav1.0/ext/libav/gstavdeinterlace.c 2012-12-19 10:46:06.523992803 +0100 +diff --git a/ext/libav/gstavdeinterlace.c b/ext/libav/gstavdeinterlace.c +index 65961f6..faa81bb 100644 +--- a/ext/libav/gstavdeinterlace.c ++++ b/ext/libav/gstavdeinterlace.c @@ -16,8 +16,8 @@ * * You should have received a copy of the GNU Library General Public @@ -5548,7 +5623,7 @@ Index: gst-libav1.0/ext/libav/gstavdeinterlace.c */ #ifdef HAVE_CONFIG_H -@@ -203,7 +203,7 @@ +@@ -203,7 +203,7 @@ gst_ffmpegdeinterlace_sink_setcaps (GstPad * pad, GstCaps * caps) } gst_ffmpegdeinterlace_update_passthrough (deinterlace); @@ -5557,10 +5632,10 @@ Index: gst-libav1.0/ext/libav/gstavdeinterlace.c ctx->width = deinterlace->width; ctx->height = deinterlace->height; ctx->pix_fmt = PIX_FMT_NB; -Index: gst-libav1.0/ext/libav/gstavdemux.c -=================================================================== ---- gst-libav1.0.orig/ext/libav/gstavdemux.c 2012-12-18 11:50:11.000000000 +0100 -+++ gst-libav1.0/ext/libav/gstavdemux.c 2012-12-19 10:46:06.527992803 +0100 +diff --git a/ext/libav/gstavdemux.c b/ext/libav/gstavdemux.c +index bee67a5..de0341f 100644 +--- a/ext/libav/gstavdemux.c ++++ b/ext/libav/gstavdemux.c @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public @@ -5572,7 +5647,16 @@ Index: gst-libav1.0/ext/libav/gstavdemux.c */ #ifdef HAVE_CONFIG_H -@@ -332,7 +332,14 @@ +@@ -32,7 +32,7 @@ + #include "gstav.h" + #include "gstavcodecmap.h" + #include "gstavutils.h" +-#include "gstavpipe.h" ++#include "gstavprotocol.h" + + #define MAX_STREAMS 20 + +@@ -332,7 +332,14 @@ gst_ffmpegdemux_close (GstFFMpegDemux * demux) demux->audiopads = 0; /* close demuxer context from ffmpeg */ @@ -5588,7 +5672,16 @@ Index: gst-libav1.0/ext/libav/gstavdemux.c demux->context = NULL; GST_OBJECT_LOCK (demux); -@@ -1115,9 +1122,9 @@ +@@ -995,7 +1002,7 @@ gst_ffmpegdemux_get_stream (GstFFMpegDemux * demux, AVStream * avstream) + + + stream_id = +- gst_pad_create_stream_id_printf (pad, GST_ELEMENT_CAST (demux), "%u", ++ gst_pad_create_stream_id_printf (pad, GST_ELEMENT_CAST (demux), "%03u", + avstream->index); + gst_pad_push_event (pad, gst_event_new_stream_start (stream_id)); + g_free (stream_id); +@@ -1115,9 +1122,9 @@ gst_ffmpegdemux_read_tags (GstFFMpegDemux * demux) static gboolean gst_ffmpegdemux_open (GstFFMpegDemux * demux) { @@ -5599,7 +5692,7 @@ Index: gst-libav1.0/ext/libav/gstavdemux.c gint res, n_streams, i; #if 0 /* Re-enable once converted to new AVMetaData API -@@ -1133,15 +1140,14 @@ +@@ -1133,15 +1140,14 @@ gst_ffmpegdemux_open (GstFFMpegDemux * demux) /* open via our input protocol hack */ if (demux->seekable) @@ -5620,10 +5713,11 @@ Index: gst-libav1.0/ext/libav/gstavdemux.c GST_DEBUG_OBJECT (demux, "av_open_input returned %d", res); if (res < 0) goto open_failed; -Index: gst-libav1.0/ext/libav/gstavenc.c -=================================================================== ---- gst-libav1.0.orig/ext/libav/gstavenc.c 2012-12-18 11:50:11.000000000 +0100 -+++ /dev/null 1970-01-01 00:00:00.000000000 +0000 +diff --git a/ext/libav/gstavenc.c b/ext/libav/gstavenc.c +deleted file mode 100644 +index 312787e..0000000 +--- a/ext/libav/gstavenc.c ++++ /dev/null @@ -1,825 +0,0 @@ -/* GStreamer - * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu> @@ -6450,10 +6544,11 @@ Index: gst-libav1.0/ext/libav/gstavenc.c - - return TRUE; -} -Index: gst-libav1.0/ext/libav/gstavenc.h -=================================================================== ---- gst-libav1.0.orig/ext/libav/gstavenc.h 2012-12-18 11:50:11.000000000 +0100 -+++ /dev/null 1970-01-01 00:00:00.000000000 +0000 +diff --git a/ext/libav/gstavenc.h b/ext/libav/gstavenc.h +deleted file mode 100644 +index 019b168..0000000 +--- a/ext/libav/gstavenc.h ++++ /dev/null @@ -1,82 +0,0 @@ -/* GStreamer - * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu> @@ -6537,10 +6632,10 @@ Index: gst-libav1.0/ext/libav/gstavenc.h -G_END_DECLS - -#endif /* __GST_FFMPEGAUDENC_H__ */ -Index: gst-libav1.0/ext/libav/gstavmux.c -=================================================================== ---- gst-libav1.0.orig/ext/libav/gstavmux.c 2012-12-18 11:50:11.630158238 +0100 -+++ gst-libav1.0/ext/libav/gstavmux.c 2012-12-19 10:46:06.527992803 +0100 +diff --git a/ext/libav/gstavmux.c b/ext/libav/gstavmux.c +index d9e8969..b302270 100644 +--- a/ext/libav/gstavmux.c ++++ b/ext/libav/gstavmux.c @@ -13,8 +13,8 @@ * * You should have received a copy of the GNU Library General Public @@ -6552,7 +6647,7 @@ Index: gst-libav1.0/ext/libav/gstavmux.c */ #ifdef HAVE_CONFIG_H -@@ -24,6 +24,7 @@ +@@ -24,12 +24,14 @@ #include <string.h> #include <libavformat/avformat.h> @@ -6560,7 +6655,14 @@ Index: gst-libav1.0/ext/libav/gstavmux.c #include <gst/gst.h> #include <gst/base/gstcollectpads.h> -@@ -57,8 +58,8 @@ + #include "gstav.h" + #include "gstavcodecmap.h" + #include "gstavutils.h" ++#include "gstavprotocol.h" + + typedef struct _GstFFMpegMux GstFFMpegMux; + typedef struct _GstFFMpegMuxPad GstFFMpegMuxPad; +@@ -57,8 +59,8 @@ struct _GstFFMpegMux /*< private > */ /* event_function is the collectpads default eventfunction */ GstPadEventFunction event_function; @@ -6570,7 +6672,7 @@ Index: gst-libav1.0/ext/libav/gstavmux.c }; typedef struct _GstFFMpegMuxClass GstFFMpegMuxClass; -@@ -89,12 +90,6 @@ +@@ -89,12 +91,6 @@ enum enum { @@ -6583,7 +6685,7 @@ Index: gst-libav1.0/ext/libav/gstavmux.c PROP_0, PROP_PRELOAD, PROP_MAXDELAY -@@ -301,8 +296,8 @@ +@@ -301,8 +297,8 @@ gst_ffmpegmux_class_init (GstFFMpegMuxClass * klass) g_object_class_install_property (gobject_class, PROP_PRELOAD, g_param_spec_int ("preload", "preload", @@ -6594,7 +6696,7 @@ Index: gst-libav1.0/ext/libav/gstavmux.c g_object_class_install_property (gobject_class, PROP_MAXDELAY, g_param_spec_int ("maxdelay", "maxdelay", -@@ -329,17 +324,13 @@ +@@ -329,17 +325,13 @@ gst_ffmpegmux_init (GstFFMpegMux * ffmpegmux, GstFFMpegMuxClass * g_class) gst_collect_pads_set_function (ffmpegmux->collect, (GstCollectPadsFunction) gst_ffmpegmux_collected, ffmpegmux); @@ -6613,7 +6715,7 @@ Index: gst-libav1.0/ext/libav/gstavmux.c ffmpegmux->max_delay = 0; } -@@ -391,7 +382,9 @@ +@@ -391,7 +383,9 @@ gst_ffmpegmux_finalize (GObject * object) { GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) object; @@ -6624,7 +6726,7 @@ Index: gst-libav1.0/ext/libav/gstavmux.c gst_object_unref (ffmpegmux->collect); if (G_OBJECT_CLASS (parent_class)->finalize) -@@ -445,10 +438,10 @@ +@@ -445,10 +439,10 @@ gst_ffmpegmux_request_new_pad (GstElement * element, gst_element_add_pad (element, pad); /* AVStream needs to be created */ @@ -6637,7 +6739,7 @@ Index: gst-libav1.0/ext/libav/gstavmux.c st->codec->bit_rate = bitrate; st->codec->frame_size = framesize; /* we fill in codec during capsnego */ -@@ -480,7 +473,7 @@ +@@ -480,7 +474,7 @@ gst_ffmpegmux_setcaps (GstPad * pad, GstCaps * caps) collect_pad = (GstFFMpegMuxPad *) gst_pad_get_element_private (pad); st = ffmpegmux->context->streams[collect_pad->padnum]; @@ -6646,7 +6748,7 @@ Index: gst-libav1.0/ext/libav/gstavmux.c ffmpegmux->context->max_delay = ffmpegmux->max_delay; /* for the format-specific guesses, we'll go to -@@ -554,7 +547,7 @@ +@@ -554,7 +548,7 @@ gst_ffmpegmux_collected (GstCollectPads * pads, gpointer user_data) /* open "file" (gstreamer protocol to next element) */ if (!ffmpegmux->opened) { @@ -6655,7 +6757,7 @@ Index: gst-libav1.0/ext/libav/gstavmux.c /* we do need all streams to have started capsnego, * or things will go horribly wrong */ -@@ -648,21 +641,15 @@ +@@ -648,21 +642,15 @@ gst_ffmpegmux_collected (GstCollectPads * pads, gpointer user_data) open_flags |= GST_FFMPEG_URL_STREAMHEADER; } @@ -6680,7 +6782,7 @@ Index: gst-libav1.0/ext/libav/gstavmux.c GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, SETTINGS, (NULL), ("Failed to write file header - check codec settings")); return GST_FLOW_ERROR; -@@ -672,7 +659,7 @@ +@@ -672,7 +660,7 @@ gst_ffmpegmux_collected (GstCollectPads * pads, gpointer user_data) ffmpegmux->opened = TRUE; /* flush the header so it will be used as streamheader */ @@ -6689,7 +6791,7 @@ Index: gst-libav1.0/ext/libav/gstavmux.c } /* take the one with earliest timestamp, -@@ -779,8 +766,8 @@ +@@ -779,8 +767,8 @@ gst_ffmpegmux_collected (GstCollectPads * pads, gpointer user_data) /* close down */ av_write_trailer (ffmpegmux->context); ffmpegmux->opened = FALSE; @@ -6700,7 +6802,7 @@ Index: gst-libav1.0/ext/libav/gstavmux.c gst_pad_push_event (ffmpegmux->srcpad, gst_event_new_eos ()); return GST_FLOW_EOS; } -@@ -818,7 +805,7 @@ +@@ -818,7 +806,7 @@ gst_ffmpegmux_change_state (GstElement * element, GstStateChange transition) gst_tag_setter_reset_tags (GST_TAG_SETTER (ffmpegmux)); if (ffmpegmux->opened) { ffmpegmux->opened = FALSE; @@ -6709,25 +6811,88 @@ Index: gst-libav1.0/ext/libav/gstavmux.c } break; case GST_STATE_CHANGE_READY_TO_NULL: -Index: gst-libav1.0/ext/libav/gstavpipe.h -=================================================================== ---- gst-libav1.0.orig/ext/libav/gstavpipe.h 2012-12-19 10:41:47.000000000 +0100 -+++ gst-libav1.0/ext/libav/gstavpipe.h 2012-12-19 10:46:06.527992803 +0100 -@@ -13,8 +13,8 @@ - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the +diff --git a/ext/libav/gstavpipe.h b/ext/libav/gstavpipe.h +deleted file mode 100644 +index 5ded77f..0000000 +--- a/ext/libav/gstavpipe.h ++++ /dev/null +@@ -1,72 +0,0 @@ +-/* GStreamer +- * Copyright (C) <2006> Mark Nauwelaerts <manauw@skynet.be> +- * +- * This library is free software; you can redistribute it and/or +- * modify it under the terms of the GNU Library General Public +- * License as published by the Free Software Foundation; either +- * version 2 of the License, or (at your option) any later version. +- * +- * This library is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * Library General Public License for more details. +- * +- * You should have received a copy of the GNU Library General Public +- * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. -+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, -+ * Boston, MA 02110-1301, USA. - */ - - -Index: gst-libav1.0/ext/libav/gstavprotocol.c -=================================================================== ---- gst-libav1.0.orig/ext/libav/gstavprotocol.c 2012-12-18 11:50:11.000000000 +0100 -+++ gst-libav1.0/ext/libav/gstavprotocol.c 2012-12-19 10:46:06.527992803 +0100 +- */ +- +- +-#ifndef __GST_FFMPEGPIPE_H__ +-#define __GST_FFMPEGPIPE_H__ +- +-#include <gst/base/gstadapter.h> +-#include "gstav.h" +- +-G_BEGIN_DECLS +- +-/* pipe protocol helpers */ +-#define GST_FFMPEG_PIPE_MUTEX_LOCK(m) G_STMT_START { \ +- GST_LOG_OBJECT (m, "locking tlock from thread %p", g_thread_self ()); \ +- g_mutex_lock (&m->tlock); \ +- GST_LOG_OBJECT (m, "locked tlock from thread %p", g_thread_self ()); \ +-} G_STMT_END +- +-#define GST_FFMPEG_PIPE_MUTEX_UNLOCK(m) G_STMT_START { \ +- GST_LOG_OBJECT (m, "unlocking tlock from thread %p", g_thread_self ()); \ +- g_mutex_unlock (&m->tlock); \ +-} G_STMT_END +- +-#define GST_FFMPEG_PIPE_WAIT(m) G_STMT_START { \ +- GST_LOG_OBJECT (m, "thread %p waiting", g_thread_self ()); \ +- g_cond_wait (&m->cond, &m->tlock); \ +-} G_STMT_END +- +-#define GST_FFMPEG_PIPE_SIGNAL(m) G_STMT_START { \ +- GST_LOG_OBJECT (m, "signalling from thread %p", g_thread_self ()); \ +- g_cond_signal (&m->cond); \ +-} G_STMT_END +- +-typedef struct _GstFFMpegPipe GstFFMpegPipe; +- +-struct _GstFFMpegPipe +-{ +- /* lock for syncing */ +- GMutex tlock; +- /* with TLOCK */ +- /* signals counterpart thread to have a look */ +- GCond cond; +- /* seen eos */ +- gboolean eos; +- /* flowreturn obtained by src task */ +- GstFlowReturn srcresult; +- /* adpater collecting data */ +- GstAdapter *adapter; +- /* amount needed in adapter by src task */ +- guint needed; +-}; +- +-G_END_DECLS +- +-#endif /* __GST_FFMPEGPIPE_H__ */ +diff --git a/ext/libav/gstavprotocol.c b/ext/libav/gstavprotocol.c +index 9c4b052..5d01eaa 100644 +--- a/ext/libav/gstavprotocol.c ++++ b/ext/libav/gstavprotocol.c @@ -14,8 +14,8 @@ * * You should have received a copy of the GNU Library General Public @@ -6739,7 +6904,16 @@ Index: gst-libav1.0/ext/libav/gstavprotocol.c */ #ifdef HAVE_CONFIG_H -@@ -43,63 +43,14 @@ +@@ -29,7 +29,7 @@ + #include <gst/gst.h> + + #include "gstav.h" +-#include "gstavpipe.h" ++#include "gstavprotocol.h" + + typedef struct _GstProtocolInfo GstProtocolInfo; + +@@ -43,63 +43,14 @@ struct _GstProtocolInfo }; static int @@ -6805,7 +6979,7 @@ Index: gst-libav1.0/ext/libav/gstavprotocol.c GST_DEBUG ("Pulling %d bytes at position %" G_GUINT64_FORMAT, size, info->offset); -@@ -131,17 +82,17 @@ +@@ -131,17 +82,17 @@ gst_ffmpegdata_peek (URLContext * h, unsigned char *buf, int size) } static int @@ -6826,7 +7000,7 @@ Index: gst-libav1.0/ext/libav/gstavprotocol.c if (res >= 0) info->offset += res; -@@ -151,15 +102,13 @@ +@@ -151,15 +102,13 @@ gst_ffmpegdata_read (URLContext * h, unsigned char *buf, int size) } static int @@ -6844,7 +7018,7 @@ Index: gst-libav1.0/ext/libav/gstavprotocol.c /* create buffer and push data further */ outbuf = gst_buffer_new_and_alloc (size); -@@ -174,7 +123,7 @@ +@@ -174,7 +123,7 @@ gst_ffmpegdata_write (URLContext * h, const unsigned char *buf, int size) } static int64_t @@ -6853,7 +7027,7 @@ Index: gst-libav1.0/ext/libav/gstavprotocol.c { GstProtocolInfo *info; guint64 newpos = 0, oldpos; -@@ -182,76 +131,68 @@ +@@ -182,76 +131,68 @@ gst_ffmpegdata_seek (URLContext * h, int64_t pos, int whence) GST_DEBUG ("Seeking to %" G_GINT64_FORMAT ", whence=%d", (gint64) pos, whence); @@ -6984,7 +7158,7 @@ Index: gst-libav1.0/ext/libav/gstavprotocol.c } GST_DEBUG ("Now at offset %" G_GUINT64_FORMAT " (returning %" G_GUINT64_FORMAT -@@ -259,84 +200,90 @@ +@@ -259,84 +200,90 @@ gst_ffmpegdata_seek (URLContext * h, int64_t pos, int whence) return newpos; } @@ -7119,7 +7293,7 @@ Index: gst-libav1.0/ext/libav/gstavprotocol.c GST_LOG ("requested size %d", size); -@@ -366,21 +313,38 @@ +@@ -366,21 +313,38 @@ gst_ffmpeg_pipe_read (URLContext * h, unsigned char *buf, int size) return size; } @@ -7169,10 +7343,94 @@ Index: gst-libav1.0/ext/libav/gstavprotocol.c + + return 0; +} -Index: gst-libav1.0/ext/libav/gstavutils.c -=================================================================== ---- gst-libav1.0.orig/ext/libav/gstavutils.c 2012-12-18 11:50:11.000000000 +0100 -+++ gst-libav1.0/ext/libav/gstavutils.c 2012-12-19 10:46:06.531992803 +0100 +diff --git a/ext/libav/gstavprotocol.h b/ext/libav/gstavprotocol.h +new file mode 100644 +index 0000000..f4b2ba8 +--- /dev/null ++++ b/ext/libav/gstavprotocol.h +@@ -0,0 +1,78 @@ ++/* GStreamer ++ * Copyright (C) <2006> Mark Nauwelaerts <manauw@skynet.be> ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Library General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU Library General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, ++ * Boston, MA 02110-1301, USA. ++ */ ++ ++ ++#ifndef __GST_FFMPEGPROTOCOL_H__ ++#define __GST_FFMPEGPROTOCOL_H__ ++ ++#include <gst/base/gstadapter.h> ++#include "gstav.h" ++ ++G_BEGIN_DECLS ++ ++/* pipe protocol helpers */ ++#define GST_FFMPEG_PIPE_MUTEX_LOCK(m) G_STMT_START { \ ++ GST_LOG_OBJECT (m, "locking tlock from thread %p", g_thread_self ()); \ ++ g_mutex_lock (&m->tlock); \ ++ GST_LOG_OBJECT (m, "locked tlock from thread %p", g_thread_self ()); \ ++} G_STMT_END ++ ++#define GST_FFMPEG_PIPE_MUTEX_UNLOCK(m) G_STMT_START { \ ++ GST_LOG_OBJECT (m, "unlocking tlock from thread %p", g_thread_self ()); \ ++ g_mutex_unlock (&m->tlock); \ ++} G_STMT_END ++ ++#define GST_FFMPEG_PIPE_WAIT(m) G_STMT_START { \ ++ GST_LOG_OBJECT (m, "thread %p waiting", g_thread_self ()); \ ++ g_cond_wait (&m->cond, &m->tlock); \ ++} G_STMT_END ++ ++#define GST_FFMPEG_PIPE_SIGNAL(m) G_STMT_START { \ ++ GST_LOG_OBJECT (m, "signalling from thread %p", g_thread_self ()); \ ++ g_cond_signal (&m->cond); \ ++} G_STMT_END ++ ++typedef struct _GstFFMpegPipe GstFFMpegPipe; ++ ++struct _GstFFMpegPipe ++{ ++ /* lock for syncing */ ++ GMutex tlock; ++ /* with TLOCK */ ++ /* signals counterpart thread to have a look */ ++ GCond cond; ++ /* seen eos */ ++ gboolean eos; ++ /* flowreturn obtained by src task */ ++ GstFlowReturn srcresult; ++ /* adpater collecting data */ ++ GstAdapter *adapter; ++ /* amount needed in adapter by src task */ ++ guint needed; ++}; ++ ++int gst_ffmpeg_pipe_open (GstFFMpegPipe *ffpipe, int flags, AVIOContext ** context); ++int gst_ffmpeg_pipe_close (AVIOContext * h); ++ ++int gst_ffmpegdata_open (GstPad * pad, int flags, AVIOContext ** context); ++int gst_ffmpegdata_close (AVIOContext * h); ++ ++G_END_DECLS ++ ++#endif /* __GST_FFMPEGPROTOCOL_H__ */ +diff --git a/ext/libav/gstavutils.c b/ext/libav/gstavutils.c +index f7a80f6..403a6b6 100644 +--- a/ext/libav/gstavutils.c ++++ b/ext/libav/gstavutils.c @@ -13,8 +13,8 @@ * * You should have received a copy of the GNU Library General Public @@ -7196,7 +7454,7 @@ Index: gst-libav1.0/ext/libav/gstavutils.c G_CONST_RETURN gchar * gst_ffmpeg_get_codecid_longname (enum CodecID codec_id) -@@ -44,16 +49,21 @@ +@@ -44,16 +49,21 @@ av_smp_format_depth (enum AVSampleFormat smp_fmt) gint depth = -1; switch (smp_fmt) { case AV_SAMPLE_FMT_U8: @@ -7218,10 +7476,18 @@ Index: gst-libav1.0/ext/libav/gstavutils.c depth = 8; break; default: -Index: gst-libav1.0/ext/libav/gstavutils.h -=================================================================== ---- gst-libav1.0.orig/ext/libav/gstavutils.h 2012-12-18 11:50:11.000000000 +0100 -+++ gst-libav1.0/ext/libav/gstavutils.h 2012-12-19 10:46:06.531992803 +0100 +@@ -476,7 +486,6 @@ gst_ffmpeg_auto_max_threads (void) + if (n < 1) + n = 1; + +- GST_INFO ("threads: %d", n); + g_once_init_leave (&n_threads, n); + } + +diff --git a/ext/libav/gstavutils.h b/ext/libav/gstavutils.h +index ebe49fb..97415eb 100644 +--- a/ext/libav/gstavutils.h ++++ b/ext/libav/gstavutils.h @@ -13,8 +13,8 @@ * * You should have received a copy of the GNU Library General Public @@ -7233,10 +7499,10 @@ Index: gst-libav1.0/ext/libav/gstavutils.h */ #ifndef __GST_FFMPEG_UTILS_H__ -Index: gst-libav1.0/ext/libav/gstavviddec.c -=================================================================== ---- gst-libav1.0.orig/ext/libav/gstavviddec.c 2012-12-18 11:50:11.000000000 +0100 -+++ gst-libav1.0/ext/libav/gstavviddec.c 2012-12-19 10:46:06.531992803 +0100 +diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c +index 7675a71..f2b5b38 100644 +--- a/ext/libav/gstavviddec.c ++++ b/ext/libav/gstavviddec.c @@ -13,8 +13,8 @@ * * You should have received a copy of the GNU Library General Public @@ -7248,7 +7514,7 @@ Index: gst-libav1.0/ext/libav/gstavviddec.c */ #ifdef HAVE_CONFIG_H -@@ -35,73 +35,12 @@ +@@ -35,78 +35,17 @@ #include "gstav.h" #include "gstavcodecmap.h" #include "gstavutils.h" @@ -7323,7 +7589,13 @@ Index: gst-libav1.0/ext/libav/gstavviddec.c #define DEFAULT_LOWRES 0 #define DEFAULT_SKIPFRAME 0 #define DEFAULT_DIRECT_RENDERING TRUE -@@ -234,7 +173,12 @@ + #define DEFAULT_DEBUG_MV FALSE +-#define DEFAULT_MAX_THREADS 1 ++#define DEFAULT_MAX_THREADS 0 + + enum + { +@@ -234,7 +173,12 @@ gst_ffmpegviddec_base_init (GstFFMpegVidDecClass * klass) GST_DEBUG ("Couldn't get sink caps for decoder '%s'", in_plugin->name); sinkcaps = gst_caps_new_empty_simple ("unknown/unknown"); } @@ -7337,7 +7609,7 @@ Index: gst-libav1.0/ext/libav/gstavviddec.c /* pad templates */ sinktempl = gst_pad_template_new ("sink", GST_PAD_SINK, -@@ -301,8 +245,11 @@ +@@ -301,8 +245,11 @@ gst_ffmpegviddec_class_init (GstFFMpegVidDecClass * klass) static void gst_ffmpegviddec_init (GstFFMpegVidDec * ffmpegdec) { @@ -7350,7 +7622,7 @@ Index: gst-libav1.0/ext/libav/gstavviddec.c ffmpegdec->picture = avcodec_alloc_frame (); ffmpegdec->opened = FALSE; ffmpegdec->skip_frame = ffmpegdec->lowres = 0; -@@ -321,10 +268,7 @@ +@@ -321,10 +268,7 @@ gst_ffmpegviddec_finalize (GObject * object) ffmpegdec->context = NULL; } @@ -7362,7 +7634,7 @@ Index: gst-libav1.0/ext/libav/gstavviddec.c G_OBJECT_CLASS (parent_class)->finalize (object); } -@@ -334,9 +278,6 @@ +@@ -334,9 +278,6 @@ gst_ffmpegviddec_finalize (GObject * object) static void gst_ffmpegviddec_close (GstFFMpegVidDec * ffmpegdec) { @@ -7372,7 +7644,7 @@ Index: gst-libav1.0/ext/libav/gstavviddec.c GST_LOG_OBJECT (ffmpegdec, "closing ffmpeg codec"); gst_caps_replace (&ffmpegdec->last_caps, NULL); -@@ -345,10 +286,7 @@ +@@ -345,10 +286,7 @@ gst_ffmpegviddec_close (GstFFMpegVidDec * ffmpegdec) gst_ffmpeg_avcodec_close (ffmpegdec->context); ffmpegdec->opened = FALSE; @@ -7384,7 +7656,7 @@ Index: gst-libav1.0/ext/libav/gstavviddec.c if (ffmpegdec->context->extradata) { av_free (ffmpegdec->context->extradata); -@@ -397,6 +335,25 @@ +@@ -397,6 +335,25 @@ could_not_open: } } @@ -7410,7 +7682,7 @@ Index: gst-libav1.0/ext/libav/gstavviddec.c static gboolean gst_ffmpegviddec_set_format (GstVideoDecoder * decoder, GstVideoCodecState * state) -@@ -430,9 +387,6 @@ +@@ -428,9 +385,6 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder, gst_ffmpegviddec_drain (ffmpegdec); GST_OBJECT_LOCK (ffmpegdec); gst_ffmpegviddec_close (ffmpegdec); @@ -7419,8 +7691,8 @@ Index: gst-libav1.0/ext/libav/gstavviddec.c - avcodec_get_context_defaults (ffmpegdec->context); } - /* set buffer functions */ -@@ -452,6 +406,8 @@ + gst_caps_replace (&ffmpegdec->last_caps, state->caps); +@@ -452,6 +406,8 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder, GST_LOG_OBJECT (ffmpegdec, "size after %dx%d", ffmpegdec->context->width, ffmpegdec->context->height); @@ -7429,7 +7701,7 @@ Index: gst-libav1.0/ext/libav/gstavviddec.c if (!ffmpegdec->context->time_base.den || !ffmpegdec->context->time_base.num) { GST_DEBUG_OBJECT (ffmpegdec, "forcing 25/1 framerate"); ffmpegdec->context->time_base.num = 1; -@@ -460,7 +416,7 @@ +@@ -460,7 +416,7 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder, /* workaround encoder bugs */ ffmpegdec->context->workaround_bugs |= FF_BUG_AUTODETECT; @@ -7438,7 +7710,54 @@ Index: gst-libav1.0/ext/libav/gstavviddec.c /* for slow cpus */ ffmpegdec->context->lowres = ffmpegdec->lowres; -@@ -651,6 +607,7 @@ +@@ -471,30 +427,16 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder, + ffmpegdec->context->debug_mv = ffmpegdec->debug_mv; + + { +- const gchar *env = g_getenv ("GST_AVVIDDEC_MAX_THREADS"); +- int max_threads = ffmpegdec->max_threads; + GstQuery *query; + gboolean is_live; + +- if (env != NULL) { +- if (g_str_equal (env, "auto")) +- max_threads = 0; +- else +- max_threads = MAX (atoi (env), 0); +- +- if (max_threads != 1) { +- GST_WARNING_OBJECT (ffmpegdec, "max threads forced to %d, this might " +- "lead to decoding errors or artefacts", max_threads); +- } +- } +- +- if (max_threads == 0) { ++ if (ffmpegdec->max_threads == 0) { + if (!(oclass->in_plugin->capabilities & CODEC_CAP_AUTO_THREADS)) + ffmpegdec->context->thread_count = gst_ffmpeg_auto_max_threads (); + else + ffmpegdec->context->thread_count = 0; + } else +- ffmpegdec->context->thread_count = max_threads; ++ ffmpegdec->context->thread_count = ffmpegdec->max_threads; + + query = gst_query_new_latency (); + is_live = FALSE; +@@ -505,11 +447,10 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder, + } + gst_query_unref (query); + +- /* Slice based threading is broken in libav 0.8 */ + if (is_live) +- ffmpegdec->context->thread_type = 0; /* FF_THREAD_SLICE */ ++ ffmpegdec->context->thread_type = FF_THREAD_SLICE; + else +- ffmpegdec->context->thread_type = /* FF_THREAD_SLICE | */ FF_THREAD_FRAME; ++ ffmpegdec->context->thread_type = FF_THREAD_SLICE | FF_THREAD_FRAME; + } + + /* open codec - we don't select an output pix_fmt yet, +@@ -683,6 +624,7 @@ fallback: duplicate_frame: { GST_WARNING_OBJECT (ffmpegdec, "already alloc'ed output buffer for frame"); @@ -7446,7 +7765,7 @@ Index: gst-libav1.0/ext/libav/gstavviddec.c return -1; } no_frame: -@@ -1123,12 +1080,12 @@ +@@ -1155,12 +1097,12 @@ gst_ffmpegviddec_video_frame (GstFFMpegVidDec * ffmpegdec, /* now decode the frame */ gst_avpacket_init (&packet, data, size); @@ -7461,18 +7780,21 @@ Index: gst-libav1.0/ext/libav/gstavviddec.c GST_DEBUG_OBJECT (ffmpegdec, "copy pal %p %p", &packet, pal); } -@@ -1527,8 +1484,8 @@ - avcodec_align_dimensions2 (ffmpegdec->context, &width, &height, - linesize_align); - edge = -- ffmpegdec->context-> -- flags & CODEC_FLAG_EMU_EDGE ? 0 : avcodec_get_edge_width (); -+ ffmpegdec-> -+ context->flags & CODEC_FLAG_EMU_EDGE ? 0 : avcodec_get_edge_width (); - /* increase the size for the padding */ - width += edge << 1; - height += edge << 1; -@@ -1691,7 +1648,8 @@ +@@ -1358,10 +1300,9 @@ gst_ffmpegviddec_handle_frame (GstVideoDecoder * decoder, + gboolean do_padding; + + GST_LOG_OBJECT (ffmpegdec, +- "Received new data of size %u, dts %" GST_TIME_FORMAT ", pts:%" +- GST_TIME_FORMAT ", dur:%" GST_TIME_FORMAT, +- gst_buffer_get_size (frame->input_buffer), +- GST_TIME_ARGS (frame->dts), ++ "Received new data of size %" G_GSIZE_FORMAT ", dts %" GST_TIME_FORMAT ++ ", pts:%" GST_TIME_FORMAT ", dur:%" GST_TIME_FORMAT, ++ gst_buffer_get_size (frame->input_buffer), GST_TIME_ARGS (frame->dts), + GST_TIME_ARGS (frame->pts), GST_TIME_ARGS (frame->duration)); + + if (!gst_buffer_map (frame->input_buffer, &minfo, GST_MAP_READ)) { +@@ -1723,7 +1664,8 @@ gst_ffmpegviddec_register (GstPlugin * plugin) gchar *plugin_name; /* only video decoders */ @@ -7482,10 +7804,11 @@ Index: gst-libav1.0/ext/libav/gstavviddec.c goto next; /* no quasi-codecs, please */ -Index: gst-libav1.0/ext/libav/gstavviddec.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gst-libav1.0/ext/libav/gstavviddec.h 2012-12-19 10:46:06.531992803 +0100 +diff --git a/ext/libav/gstavviddec.h b/ext/libav/gstavviddec.h +new file mode 100644 +index 0000000..c8649c4 +--- /dev/null ++++ b/ext/libav/gstavviddec.h @@ -0,0 +1,93 @@ +/* GStreamer + * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu> @@ -7580,10 +7903,10 @@ Index: gst-libav1.0/ext/libav/gstavviddec.h +G_END_DECLS + +#endif -Index: gst-libav1.0/ext/libav/gstavvidenc.c -=================================================================== ---- gst-libav1.0.orig/ext/libav/gstavvidenc.c 2012-12-18 11:50:11.634158239 +0100 -+++ gst-libav1.0/ext/libav/gstavvidenc.c 2012-12-19 10:46:06.531992803 +0100 +diff --git a/ext/libav/gstavvidenc.c b/ext/libav/gstavvidenc.c +index b747613..7b24c45 100644 +--- a/ext/libav/gstavvidenc.c ++++ b/ext/libav/gstavvidenc.c @@ -13,8 +13,8 @@ * * You should have received a copy of the GNU Library General Public @@ -7595,7 +7918,7 @@ Index: gst-libav1.0/ext/libav/gstavvidenc.c */ #ifdef HAVE_CONFIG_H -@@ -56,13 +56,13 @@ +@@ -56,13 +56,13 @@ enum enum { @@ -7616,7 +7939,7 @@ Index: gst-libav1.0/ext/libav/gstavvidenc.c }; #define GST_TYPE_ME_METHOD (gst_ffmpegvidenc_me_method_get_type()) -@@ -98,6 +98,8 @@ +@@ -98,6 +98,8 @@ static gboolean gst_ffmpegvidenc_set_format (GstVideoEncoder * encoder, GstVideoCodecState * state); static gboolean gst_ffmpegvidenc_propose_allocation (GstVideoEncoder * encoder, GstQuery * query); @@ -7625,7 +7948,7 @@ Index: gst-libav1.0/ext/libav/gstavvidenc.c static GstCaps *gst_ffmpegvidenc_getcaps (GstVideoEncoder * encoder, GstCaps * filter); -@@ -144,7 +146,12 @@ +@@ -144,7 +146,12 @@ gst_ffmpegvidenc_base_init (GstFFMpegVidEncClass * klass) srccaps = gst_caps_new_empty_simple ("unknown/unknown"); } @@ -7639,7 +7962,7 @@ Index: gst-libav1.0/ext/libav/gstavvidenc.c /* pad templates */ sinktempl = gst_pad_template_new ("sink", GST_PAD_SINK, -@@ -157,7 +164,6 @@ +@@ -157,7 +164,6 @@ gst_ffmpegvidenc_base_init (GstFFMpegVidEncClass * klass) klass->in_plugin = in_plugin; klass->srctempl = srctempl; klass->sinktempl = sinktempl; @@ -7647,7 +7970,7 @@ Index: gst-libav1.0/ext/libav/gstavvidenc.c return; } -@@ -178,30 +184,30 @@ +@@ -178,30 +184,30 @@ gst_ffmpegvidenc_class_init (GstFFMpegVidEncClass * klass) /* FIXME: could use -1 for a sensible per-codec default based on * e.g. input resolution and framerate */ @@ -7684,7 +8007,7 @@ Index: gst-libav1.0/ext/libav/gstavvidenc.c venc_class->stop = gst_ffmpegvidenc_stop; venc_class->finish = gst_ffmpegvidenc_finish; -@@ -209,6 +215,7 @@ +@@ -209,6 +215,7 @@ gst_ffmpegvidenc_class_init (GstFFMpegVidEncClass * klass) venc_class->getcaps = gst_ffmpegvidenc_getcaps; venc_class->set_format = gst_ffmpegvidenc_set_format; venc_class->propose_allocation = gst_ffmpegvidenc_propose_allocation; @@ -7692,7 +8015,7 @@ Index: gst-libav1.0/ext/libav/gstavvidenc.c gobject_class->finalize = gst_ffmpegvidenc_finalize; } -@@ -216,8 +223,11 @@ +@@ -216,8 +223,11 @@ gst_ffmpegvidenc_class_init (GstFFMpegVidEncClass * klass) static void gst_ffmpegvidenc_init (GstFFMpegVidEnc * ffmpegenc) { @@ -7705,7 +8028,7 @@ Index: gst-libav1.0/ext/libav/gstavvidenc.c ffmpegenc->picture = avcodec_alloc_frame (); ffmpegenc->opened = FALSE; -@@ -243,15 +253,9 @@ +@@ -243,15 +253,9 @@ gst_ffmpegvidenc_finalize (GObject * object) gst_ffmpeg_cfg_finalize (ffmpegenc); @@ -7722,7 +8045,7 @@ Index: gst-libav1.0/ext/libav/gstavvidenc.c g_free (ffmpegenc->filename); -@@ -262,117 +266,13 @@ +@@ -262,117 +266,13 @@ static GstCaps * gst_ffmpegvidenc_getcaps (GstVideoEncoder * encoder, GstCaps * filter) { GstFFMpegVidEnc *ffmpegenc = (GstFFMpegVidEnc *) encoder; @@ -7843,7 +8166,7 @@ Index: gst-libav1.0/ext/libav/gstavvidenc.c } static gboolean -@@ -394,9 +294,6 @@ +@@ -394,9 +294,6 @@ gst_ffmpegvidenc_set_format (GstVideoEncoder * encoder, ffmpegenc->opened = FALSE; } @@ -7853,7 +8176,7 @@ Index: gst-libav1.0/ext/libav/gstavvidenc.c /* if we set it in _getcaps we should set it also in _link */ ffmpegenc->context->strict_std_compliance = -1; -@@ -546,16 +443,7 @@ +@@ -546,16 +443,7 @@ gst_ffmpegvidenc_set_format (GstVideoEncoder * encoder, gst_caps_unref (icaps); return FALSE; } @@ -7871,7 +8194,7 @@ Index: gst-libav1.0/ext/libav/gstavvidenc.c /* Store input state and set output state */ if (ffmpegenc->input_state) -@@ -796,24 +684,28 @@ +@@ -796,24 +684,28 @@ gst_ffmpegvidenc_flush_buffers (GstFFMpegVidEnc * ffmpegenc, gboolean send) (("Could not write to file \"%s\"."), ffmpegenc->filename), GST_ERROR_SYSTEM); @@ -7914,7 +8237,7 @@ Index: gst-libav1.0/ext/libav/gstavvidenc.c } } -@@ -835,18 +727,18 @@ +@@ -835,18 +727,18 @@ gst_ffmpegvidenc_set_property (GObject * object, /* Check the argument id to see which argument we're setting. */ switch (prop_id) { @@ -7938,7 +8261,7 @@ Index: gst-libav1.0/ext/libav/gstavvidenc.c ffmpegenc->rtp_payload_size = g_value_get_int (value); break; default: -@@ -867,19 +759,19 @@ +@@ -867,19 +759,19 @@ gst_ffmpegvidenc_get_property (GObject * object, ffmpegenc = (GstFFMpegVidEnc *) (object); switch (prop_id) { @@ -7963,7 +8286,7 @@ Index: gst-libav1.0/ext/libav/gstavvidenc.c g_value_set_int (value, ffmpegenc->rtp_payload_size); break; default: -@@ -890,15 +782,26 @@ +@@ -890,15 +782,26 @@ gst_ffmpegvidenc_get_property (GObject * object, } static gboolean @@ -7994,7 +8317,7 @@ Index: gst-libav1.0/ext/libav/gstavvidenc.c if (ffmpegenc->file) { fclose (ffmpegenc->file); ffmpegenc->file = NULL; -@@ -971,7 +874,8 @@ +@@ -971,7 +874,8 @@ gst_ffmpegvidenc_register (GstPlugin * plugin) } /* only video encoders */ @@ -8004,10 +8327,10 @@ Index: gst-libav1.0/ext/libav/gstavvidenc.c goto next; /* FIXME : We should have a method to know cheaply whether we have a mapping -Index: gst-libav1.0/ext/libav/gstavvidenc.h -=================================================================== ---- gst-libav1.0.orig/ext/libav/gstavvidenc.h 2012-12-18 11:50:11.000000000 +0100 -+++ gst-libav1.0/ext/libav/gstavvidenc.h 2012-12-19 10:46:06.531992803 +0100 +diff --git a/ext/libav/gstavvidenc.h b/ext/libav/gstavvidenc.h +index eb201b3..d19dc39 100644 +--- a/ext/libav/gstavvidenc.h ++++ b/ext/libav/gstavvidenc.h @@ -13,8 +13,8 @@ * * You should have received a copy of the GNU Library General Public @@ -8029,7 +8352,7 @@ Index: gst-libav1.0/ext/libav/gstavvidenc.h typedef struct _GstFFMpegVidEnc GstFFMpegVidEnc; -@@ -76,7 +78,6 @@ +@@ -76,7 +78,6 @@ struct _GstFFMpegVidEncClass AVCodec *in_plugin; GstPadTemplate *srctempl, *sinktempl; @@ -8037,10 +8360,10 @@ Index: gst-libav1.0/ext/libav/gstavvidenc.h }; #define GST_TYPE_FFMPEGVIDENC \ -Index: gst-libav1.0/ext/libswscale/gstffmpegscale.c -=================================================================== ---- gst-libav1.0.orig/ext/libswscale/gstffmpegscale.c 2012-12-18 11:50:11.000000000 +0100 -+++ gst-libav1.0/ext/libswscale/gstffmpegscale.c 2012-12-19 10:46:06.535992803 +0100 +diff --git a/ext/libswscale/gstffmpegscale.c b/ext/libswscale/gstffmpegscale.c +index ce980a8..a2b0248 100644 +--- a/ext/libswscale/gstffmpegscale.c ++++ b/ext/libswscale/gstffmpegscale.c @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public @@ -8052,107 +8375,91 @@ Index: gst-libav1.0/ext/libswscale/gstffmpegscale.c */ #ifdef HAVE_CONFIG_H -Index: gst-libav1.0/gst-libav.doap -=================================================================== ---- gst-libav1.0.orig/gst-libav.doap 2012-12-19 10:41:47.607997717 +0100 -+++ gst-libav1.0/gst-libav.doap 2012-12-19 10:46:06.535992803 +0100 -@@ -34,26 +34,6 @@ - - <release> - <Version> -- <revision>1.0.4</revision> -- <branch>1.0</branch> -- <name></name> -- <created>2012-12-18</created> -- <file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.0.4.tar.xz" /> -- </Version> -- </release> -- -- <release> -- <Version> -- <revision>1.0.3</revision> -- <branch>1.0</branch> -- <name></name> -- <created>2012-11-21</created> -- <file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.0.3.tar.xz" /> -- </Version> -- </release> -- -- <release> -- <Version> - <revision>1.0.2</revision> - <branch>1.0</branch> - <name></name> -Index: gst-libav1.0/gst-libs/ext/Makefile.am -=================================================================== ---- gst-libav1.0.orig/gst-libs/ext/Makefile.am 2012-12-18 11:50:11.000000000 +0100 -+++ gst-libav1.0/gst-libs/ext/Makefile.am 2012-12-19 10:46:06.535992803 +0100 -@@ -36,7 +36,7 @@ +@@ -246,44 +246,15 @@ gst_ffmpegscale_caps_remove_format_info (GstCaps * caps) + { + int i; + GstStructure *structure; +- GstCaps *rgbcaps; +- GstCaps *graycaps; + + caps = gst_caps_copy (caps); + + for (i = 0; i < gst_caps_get_size (caps); i++) { + structure = gst_caps_get_structure (caps, i); + +- gst_structure_set_name (structure, "video/x-raw-yuv"); + gst_structure_remove_field (structure, "format"); +- gst_structure_remove_field (structure, "endianness"); +- gst_structure_remove_field (structure, "depth"); +- gst_structure_remove_field (structure, "bpp"); +- gst_structure_remove_field (structure, "red_mask"); +- gst_structure_remove_field (structure, "green_mask"); +- gst_structure_remove_field (structure, "blue_mask"); +- gst_structure_remove_field (structure, "alpha_mask"); +- gst_structure_remove_field (structure, "palette_data"); + } + +- rgbcaps = gst_caps_copy (caps); +- +- for (i = 0; i < gst_caps_get_size (rgbcaps); i++) { +- structure = gst_caps_get_structure (rgbcaps, i); +- +- gst_structure_set_name (structure, "video/x-raw-rgb"); +- } +- graycaps = gst_caps_copy (caps); +- +- for (i = 0; i < gst_caps_get_size (graycaps); i++) { +- structure = gst_caps_get_structure (graycaps, i); +- +- gst_structure_set_name (structure, "video/x-raw-gray"); +- } +- +- gst_caps_append (caps, graycaps); +- gst_caps_append (caps, rgbcaps); +- + return caps; + } + +diff --git a/gst-libs/ext/Makefile.am b/gst-libs/ext/Makefile.am +index b1054e1..12f35c8 100644 +--- a/gst-libs/ext/Makefile.am ++++ b/gst-libs/ext/Makefile.am +@@ -23,7 +23,7 @@ clean-local: + + dist-clean: + cd libav && $(MAKE) distclean +- rm -rf $(TMP_DIST_DIR) ++ rm -rf libav/$(TMP_DIST_DIR) + rm -f Makefile + rm -f libav/.version + rm -f libav/.config +@@ -36,19 +36,19 @@ maintainer-clean: distclean maintainerclean: maintainer-clean dist-local: - GIT_DIR=libav/.git git checkout-index --prefix=../$(TMP_DIST_DIR)/libav/ -a +- touch $(TMP_DIST_DIR)/libav/config.mak + GIT_DIR=libav/.git git checkout-index --prefix=$(TMP_DIST_DIR)/libav/ -a - touch $(TMP_DIST_DIR)/libav/config.mak ++ touch libav/$(TMP_DIST_DIR)/libav/config.mak echo "Patching libav ./configure" - sed -e '/Unknown option/ {N;N;s/exit 1//; }' $(TMP_DIST_DIR)/libav/configure > $(TMP_DIST_DIR)/libav/configure.tmp -Index: gst-libav1.0/tests/check/elements/avdec_adpcm.c -=================================================================== ---- gst-libav1.0.orig/tests/check/elements/avdec_adpcm.c 2012-12-18 11:50:11.634158239 +0100 -+++ gst-libav1.0/tests/check/elements/avdec_adpcm.c 2012-12-19 10:46:06.535992803 +0100 -@@ -14,8 +14,8 @@ - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the -- * Free Software Foundation, Inc., 59 Temple Place - Suite 330, -- * Boston, MA 02111-1307, USA. -+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, -+ * Boston, MA 02110-1301, USA. - */ - - #include <gst/check/gstcheck.h> -Index: gst-libav1.0/tests/check/elements/avdemux_ape.c -=================================================================== ---- gst-libav1.0.orig/tests/check/elements/avdemux_ape.c 2012-12-18 11:50:11.634158239 +0100 -+++ gst-libav1.0/tests/check/elements/avdemux_ape.c 2012-12-19 10:46:06.535992803 +0100 -@@ -14,8 +14,8 @@ - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the -- * Free Software Foundation, Inc., 59 Temple Place - Suite 330, -- * Boston, MA 02111-1307, USA. -+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, -+ * Boston, MA 02110-1301, USA. - */ - - #include <gst/check/gstcheck.h> -Index: gst-libav1.0/tests/check/generic/libavcodec-locking.c -=================================================================== ---- gst-libav1.0.orig/tests/check/generic/libavcodec-locking.c 2012-12-18 11:50:11.634158239 +0100 -+++ gst-libav1.0/tests/check/generic/libavcodec-locking.c 2012-12-19 10:46:06.535992803 +0100 -@@ -16,8 +16,8 @@ - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the -- * Free Software Foundation, Inc., 59 Temple Place - Suite 330, -- * Boston, MA 02111-1307, USA. -+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, -+ * Boston, MA 02110-1301, USA. - */ - - -Index: gst-libav1.0/tests/check/generic/plugin-test.c -=================================================================== ---- gst-libav1.0.orig/tests/check/generic/plugin-test.c 2012-12-18 11:50:11.634158239 +0100 -+++ gst-libav1.0/tests/check/generic/plugin-test.c 2012-12-19 10:46:06.535992803 +0100 -@@ -16,8 +16,8 @@ - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the -- * Free Software Foundation, Inc., 59 Temple Place - Suite 330, -- * Boston, MA 02111-1307, USA. -+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, -+ * Boston, MA 02110-1301, USA. - */ - - +- sed -e '/Unknown option/ {N;N;s/exit 1//; }' $(TMP_DIST_DIR)/libav/configure > $(TMP_DIST_DIR)/libav/configure.tmp +- mv $(TMP_DIST_DIR)/libav/configure.tmp $(TMP_DIST_DIR)/libav/configure +- chmod +x $(TMP_DIST_DIR)/libav/configure ++ sed -e '/Unknown option/ {N;N;s/exit 1//; }' libav/$(TMP_DIST_DIR)/libav/configure > libav/$(TMP_DIST_DIR)/libav/configure.tmp ++ mv libav/$(TMP_DIST_DIR)/libav/configure.tmp libav/$(TMP_DIST_DIR)/libav/configure ++ chmod +x libav/$(TMP_DIST_DIR)/libav/configure + + distdir: dist-local +- cp -r $(TMP_DIST_DIR)/libav ${distdir} ++ cp -r libav/$(TMP_DIST_DIR)/libav ${distdir} + cp -f $(top_srcdir)/gst-libs/ext/Makefile.am $(top_srcdir)/gst-libs/ext/Makefile.in ${distdir} +- rm -rf $(TMP_DIST_DIR) ++ rm -rf libav/$(TMP_DIST_DIR) + + dist: dist-local +- cd $(TMP_DIST_DIR) && tar -czf libav.tar.gz libav +- mv $(TMP_DIST_DIR)/libav.tar.gz ./ +- rm -rf $(TMP_DIST_DIR) ++ cd libav/$(TMP_DIST_DIR) && tar -czf libav.tar.gz libav ++ mv libav/$(TMP_DIST_DIR)/libav.tar.gz ./ ++ rm -rf libav/$(TMP_DIST_DIR) diff --git a/debian/patches/series b/debian/patches/series index cfa3387..2238249 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,4 @@ 02_plugin-dependencies.patch -03_git-2012-12-19.patch +03_git-2013-04-26.patch 04_gstreamer-1.0.patch 99_ltmain_as-needed.patch |