rpms/gstreamer-ffmpeg/devel gstreamer-ffmpeg.spec,1.21,1.22
by jwrdegoede
Author: jwrdegoede
Update of /cvs/free/rpms/gstreamer-ffmpeg/devel
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv28784
Modified Files:
gstreamer-ffmpeg.spec
Log Message:
* Thu Jul 12 2012 Hans de Goede <j.w.r.degoede(a)gmail.com> - 0.10.13-3
- Switch to the build in libav for now, gst-ffmpeg wants libav-0.8,
and the system ffmpeg is 0.11, which is more or less the unreleased
libav-0.9. Once libav-0.9 gets officially released gst-ffmpeg will
hopefully switch to it
- Upgrade the buildin libav to 0.8.3 to get all the security fixes from
upstream libav
Index: gstreamer-ffmpeg.spec
===================================================================
RCS file: /cvs/free/rpms/gstreamer-ffmpeg/devel/gstreamer-ffmpeg.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- gstreamer-ffmpeg.spec 12 Jul 2012 14:07:06 -0000 1.21
+++ gstreamer-ffmpeg.spec 12 Jul 2012 14:35:20 -0000 1.22
@@ -25,7 +25,10 @@
Patch12: 0012-ffdec-don-t-flush-buffers-on-DISCONT.patch
BuildRequires: gstreamer-devel >= 0.10.0
BuildRequires: gstreamer-plugins-base-devel >= 0.10.0
-BuildRequires: orc-devel bzip2-devel
+BuildRequires: orc-devel bzip2-devel zlib-devel
+%ifarch %{ix86} x86_64
+BuildRequires: yasm
+%endif
%description
GStreamer is a streaming media framework, based on graphs of filters which
12 years, 4 months
rpms/gstreamer-ffmpeg/devel 0001-configure.ac-Fix-for-new-libav.patch, NONE, 1.1 0002-gstffmpegutils-Fix-include.patch, NONE, 1.1 0003-gstffmpegdec-Re-enable-MT-decoding-by-default.patch, NONE, 1.1 0004-ffmpeg-fix-pad-template-ref-leaks.patch, NONE, 1.1 0005-ffmpegdec-Report-latency-if-B-frames-are-present.patch, NONE, 1.1 0006-ffmpeg-Channel-layouts-are-now-set-for-DTS-and-E-AC3.patch, NONE, 1.1 0007-ffmpegdemux-fix-caps-leak.patch, NONE, 1.1 0008-ffdec-Only-set-get_buffer-function-for-video.patch, NONE,
by jwrdegoede
Author: jwrdegoede
Update of /cvs/free/rpms/gstreamer-ffmpeg/devel
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv26164
Modified Files:
.cvsignore gstreamer-ffmpeg.spec sources
Added Files:
0001-configure.ac-Fix-for-new-libav.patch
0002-gstffmpegutils-Fix-include.patch
0003-gstffmpegdec-Re-enable-MT-decoding-by-default.patch
0004-ffmpeg-fix-pad-template-ref-leaks.patch
0005-ffmpegdec-Report-latency-if-B-frames-are-present.patch
0006-ffmpeg-Channel-layouts-are-now-set-for-DTS-and-E-AC3.patch
0007-ffmpegdemux-fix-caps-leak.patch
0008-ffdec-Only-set-get_buffer-function-for-video.patch
0009-codecmap-Add-mapping-for-Indeo-4-video-codec.patch
0010-ffmpegdec-Use-auto-threads-if-available-and-only-sli.patch
0011-ffmux-Use-correct-enum-type-for-return-value.patch
0012-ffdec-don-t-flush-buffers-on-DISCONT.patch
Log Message:
* Thu Jul 12 2012 Hans de Goede <j.w.r.degoede(a)gmail.com> - 0.10.13-3
- Switch to the build in libav for now, gst-ffmpeg wants libav-0.8,
and the system ffmpeg is 0.11, which is more or less the unreleased
libav-0.9. Once libav-0.9 gets officially released gst-ffmpeg will
hopefully switch to it
- Upgrade the buildin libav to 0.8.3 to get all the security fixes from
upstream libav
0001-configure.ac-Fix-for-new-libav.patch:
configure | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- NEW FILE 0001-configure.ac-Fix-for-new-libav.patch ---
>From d97f8b09fbc1db16ad257ad0f0c682611a95a94c Mon Sep 17 00:00:00 2001
From: Edward Hervey <edward.hervey(a)collabora.co.uk>
Date: Mon, 17 Oct 2011 14:26:20 +0000
Subject: [PATCH 01/12] configure.ac: Fix for new libav
---
configure | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 87e825e..83020f7 100755
--- a/configure
+++ b/configure
@@ -16696,8 +16696,8 @@ fi
embffmpeg_configure_args="--prefix=$prefix"
# Enable pic and static so that we get .a files, but with PIC code.
- embffmpeg_configure_args="$embffmpeg_configure_args --disable-ffserver --disable-ffplay\
- --disable-ffmpeg --disable-ffprobe --enable-static --enable-pic \
+ embffmpeg_configure_args="$embffmpeg_configure_args --disable-avserver --disable-avplay\
+ --disable-ffmpeg --disable-avprobe --enable-postproc --enable-gpl --enable-static --enable-pic \
--disable-encoder=flac --disable-decoder=cavs --disable-protocols --disable-devices\
--disable-network --disable-hwaccels --disable-filters --disable-doc\
--enable-optimizations"
--
1.7.10.4
0002-gstffmpegutils-Fix-include.patch:
gstffmpegutils.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- NEW FILE 0002-gstffmpegutils-Fix-include.patch ---
>From d4e381c1cf8fa825d060b3c2797272e675d15937 Mon Sep 17 00:00:00 2001
From: Edward Hervey <edward.hervey(a)collabora.co.uk>
Date: Mon, 17 Oct 2011 16:26:52 +0200
Subject: [PATCH 02/12] gstffmpegutils: Fix include
---
ext/ffmpeg/gstffmpegutils.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/ext/ffmpeg/gstffmpegutils.h b/ext/ffmpeg/gstffmpegutils.h
index 4b713de..dbc3fae 100644
--- a/ext/ffmpeg/gstffmpegutils.h
+++ b/ext/ffmpeg/gstffmpegutils.h
@@ -20,11 +20,17 @@
#ifndef __GST_FFMPEG_UTILS_H__
#define __GST_FFMPEG_UTILS_H__
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#ifdef HAVE_FFMPEG_UNINSTALLED
+#include <mathematics.h>
#include <avcodec.h>
#else
#include <libavcodec/avcodec.h>
#endif
+
#include <gst/gst.h>
/*
--
1.7.10.4
0003-gstffmpegdec-Re-enable-MT-decoding-by-default.patch:
gstffmpegdec.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- NEW FILE 0003-gstffmpegdec-Re-enable-MT-decoding-by-default.patch ---
>From 68c379469f807bc8d34bd8bb0ea28fd25a9be1db Mon Sep 17 00:00:00 2001
From: Edward Hervey <edward.hervey(a)collabora.co.uk>
Date: Mon, 17 Oct 2011 16:27:36 +0200
Subject: [PATCH 03/12] gstffmpegdec: Re-enable MT-decoding by default
---
ext/ffmpeg/gstffmpegdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c
index cc07889..035307e 100644
--- a/ext/ffmpeg/gstffmpegdec.c
+++ b/ext/ffmpeg/gstffmpegdec.c
@@ -197,7 +197,7 @@ gst_ts_info_get (GstFFMpegDec * dec, gint idx)
#define DEFAULT_DO_PADDING TRUE
#define DEFAULT_DEBUG_MV FALSE
#define DEFAULT_CROP TRUE
-#define DEFAULT_MAX_THREADS 1
+#define DEFAULT_MAX_THREADS 0
enum
{
--
1.7.10.4
0004-ffmpeg-fix-pad-template-ref-leaks.patch:
ffmpeg/gstffmpegaudioresample.c | 6 ++----
ffmpeg/gstffmpegdeinterlace.c | 6 ++----
ffmpeg/gstffmpegmux.c | 3 +++
libpostproc/gstpostproc.c | 8 ++++----
libswscale/gstffmpegscale.c | 7 ++-----
5 files changed, 13 insertions(+), 17 deletions(-)
--- NEW FILE 0004-ffmpeg-fix-pad-template-ref-leaks.patch ---
>From e392044f5b363f0cdba8a9441a1cb32b20387569 Mon Sep 17 00:00:00 2001
From: Vincent Penquerc'h <vincent.penquerch(a)collabora.co.uk>
Date: Mon, 28 Nov 2011 13:23:42 +0000
Subject: [PATCH 04/12] ffmpeg: fix pad template ref leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
---
ext/ffmpeg/gstffmpegaudioresample.c | 6 ++----
ext/ffmpeg/gstffmpegdeinterlace.c | 6 ++----
ext/ffmpeg/gstffmpegmux.c | 3 +++
ext/libpostproc/gstpostproc.c | 8 ++++----
ext/libswscale/gstffmpegscale.c | 6 ++----
5 files changed, 13 insertions(+), 16 deletions(-)
diff --git a/ext/ffmpeg/gstffmpegaudioresample.c b/ext/ffmpeg/gstffmpegaudioresample.c
index 321a008..b63068d 100644
--- a/ext/ffmpeg/gstffmpegaudioresample.c
+++ b/ext/ffmpeg/gstffmpegaudioresample.c
@@ -103,10 +103,8 @@ gst_ffmpegaudioresample_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&src_factory));
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&sink_factory));
+ gst_element_class_add_static_pad_template (element_class, &src_factory);
+ gst_element_class_add_static_pad_template (element_class, &sink_factory);
gst_element_class_set_details_simple (element_class,
"FFMPEG Audio resampling element", "Filter/Converter/Audio",
"Converts audio from one samplerate to another",
diff --git a/ext/ffmpeg/gstffmpegdeinterlace.c b/ext/ffmpeg/gstffmpegdeinterlace.c
index de95314..40fea5e 100644
--- a/ext/ffmpeg/gstffmpegdeinterlace.c
+++ b/ext/ffmpeg/gstffmpegdeinterlace.c
@@ -145,10 +145,8 @@ gst_ffmpegdeinterlace_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&src_factory));
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&sink_factory));
+ gst_element_class_add_static_pad_template (element_class, &src_factory);
+ gst_element_class_add_static_pad_template (element_class, &sink_factory);
gst_element_class_set_details_simple (element_class,
"FFMPEG Deinterlace element", "Filter/Effect/Video/Deinterlace",
"Deinterlace video", "Luca Ognibene <luogni(a)tin.it>");
diff --git a/ext/ffmpeg/gstffmpegmux.c b/ext/ffmpeg/gstffmpegmux.c
index 538aeed..a041761 100644
--- a/ext/ffmpeg/gstffmpegmux.c
+++ b/ext/ffmpeg/gstffmpegmux.c
@@ -272,17 +272,20 @@ gst_ffmpegmux_base_init (gpointer g_class)
/* pad templates */
srctempl = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, srccaps);
gst_element_class_add_pad_template (element_class, srctempl);
+ gst_object_unref (srctempl);
if (audiosinkcaps) {
audiosinktempl = gst_pad_template_new ("audio_%d",
GST_PAD_SINK, GST_PAD_REQUEST, audiosinkcaps);
gst_element_class_add_pad_template (element_class, audiosinktempl);
+ gst_object_unref (audiosinktempl);
}
if (videosinkcaps) {
videosinktempl = gst_pad_template_new ("video_%d",
GST_PAD_SINK, GST_PAD_REQUEST, videosinkcaps);
gst_element_class_add_pad_template (element_class, videosinktempl);
+ gst_object_unref (videosinktempl);
}
beach:
diff --git a/ext/libpostproc/gstpostproc.c b/ext/libpostproc/gstpostproc.c
index f9ddcdd..963b77d 100644
--- a/ext/libpostproc/gstpostproc.c
+++ b/ext/libpostproc/gstpostproc.c
@@ -381,10 +381,10 @@ gst_post_proc_base_init (GstPostProcClass * klass)
g_free (longname);
g_free (description);
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&gst_post_proc_src_template));
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&gst_post_proc_sink_template));
+ gst_element_class_add_static_pad_template (element_class,
+ &gst_post_proc_src_template);
+ gst_element_class_add_static_pad_template (element_class,
+ &gst_post_proc_sink_template);
klass->filterid = ppidx;
}
diff --git a/ext/libswscale/gstffmpegscale.c b/ext/libswscale/gstffmpegscale.c
index b9ef3e1..e00956c 100644
--- a/ext/libswscale/gstffmpegscale.c
+++ b/ext/libswscale/gstffmpegscale.c
@@ -190,10 +190,8 @@ gst_ffmpegscale_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&src_factory));
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&sink_factory));
+ gst_element_class_add_static_pad_template (element_class, &src_factory);
+ gst_element_class_add_static_pad_template (element_class, &sink_factory);
gst_element_class_set_details_simple (element_class, "FFMPEG Scale element",
"Filter/Converter/Video",
"Converts video from one resolution to another",
--
1.7.10.4
0005-ffmpegdec-Report-latency-if-B-frames-are-present.patch:
gstffmpegdec.c | 62 +++++++++++++++++++++++++++++++++------------------------
1 file changed, 36 insertions(+), 26 deletions(-)
--- NEW FILE 0005-ffmpegdec-Report-latency-if-B-frames-are-present.patch ---
>From 75665085f654d312a57a06406ae0e6c31ffdd1cd Mon Sep 17 00:00:00 2001
From: Edward Hervey <edward.hervey(a)collabora.co.uk>
Date: Tue, 8 Nov 2011 18:56:54 +0100
Subject: [PATCH 05/12] ffmpegdec: Report latency if B-frames are present
... and cleanup the query handler while we're at it
https://bugzilla.gnome.org/show_bug.cgi?id=663616
---
ext/ffmpeg/gstffmpegdec.c | 61 ++++++++++++++++++++++++++-------------------
1 file changed, 36 insertions(+), 25 deletions(-)
diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c
index 035307e..a0f609a 100644
--- a/ext/ffmpeg/gstffmpegdec.c
+++ b/ext/ffmpeg/gstffmpegdec.c
@@ -477,35 +477,43 @@ static gboolean
gst_ffmpegdec_query (GstPad * pad, GstQuery * query)
{
GstFFMpegDec *ffmpegdec;
- GstPad *peer;
- gboolean res;
+ gboolean res = FALSE;
ffmpegdec = (GstFFMpegDec *) gst_pad_get_parent (pad);
- res = FALSE;
-
- if ((peer = gst_pad_get_peer (ffmpegdec->sinkpad))) {
- /* just forward to peer */
- res = gst_pad_query (peer, query);
- gst_object_unref (peer);
- }
-#if 0
- {
- GstFormat bfmt;
-
- bfmt = GST_FORMAT_BYTES;
-
- /* ok, do bitrate calc... */
- if ((type != GST_QUERY_POSITION && type != GST_QUERY_TOTAL) ||
- *fmt != GST_FORMAT_TIME || ffmpegdec->context->bit_rate == 0 ||
- !gst_pad_query (peer, type, &bfmt, value))
- return FALSE;
-
- if (ffmpegdec->pcache && type == GST_QUERY_POSITION)
- *value -= GST_BUFFER_SIZE (ffmpegdec->pcache);
- *value *= GST_SECOND / ffmpegdec->context->bit_rate;
+ switch (GST_QUERY_TYPE (query)) {
+ case GST_QUERY_LATENCY:
+ {
+ GST_DEBUG_OBJECT (ffmpegdec, "latency query %d",
+ ffmpegdec->context->has_b_frames);
+ if ((res = gst_pad_peer_query (ffmpegdec->sinkpad, query))) {
+ if (ffmpegdec->context->has_b_frames) {
+ gboolean live;
+ GstClockTime min_lat, max_lat, our_lat;
+
+ gst_query_parse_latency (query, &live, &min_lat, &max_lat);
+ if (ffmpegdec->format.video.fps_n > 0)
+ our_lat =
+ gst_util_uint64_scale_int (ffmpegdec->context->has_b_frames *
+ GST_SECOND, ffmpegdec->format.video.fps_d,
+ ffmpegdec->format.video.fps_n);
+ else
+ our_lat =
+ gst_util_uint64_scale_int (ffmpegdec->context->has_b_frames *
+ GST_SECOND, 1, 25);
+ if (min_lat != -1)
+ min_lat += our_lat;
+ if (max_lat != -1)
+ max_lat += our_lat;
+ gst_query_set_latency (query, live, min_lat, max_lat);
+ }
+ }
+ }
+ break;
+ default:
+ res = gst_pad_query_default (pad, query);
+ break;
}
-#endif
gst_object_unref (ffmpegdec);
@@ -1546,6 +1554,9 @@ check_keyframe (GstFFMpegDec * ffmpegdec)
if (!ffmpegdec->has_b_frames && ffmpegdec->picture->pict_type == FF_B_TYPE) {
GST_DEBUG_OBJECT (ffmpegdec, "we have B frames");
ffmpegdec->has_b_frames = TRUE;
+ /* Emit latency message to recalculate it */
+ gst_element_post_message (GST_ELEMENT_CAST (ffmpegdec),
+ gst_message_new_latency (GST_OBJECT_CAST (ffmpegdec)));
}
is_itype = (ffmpegdec->picture->pict_type == FF_I_TYPE);
--
1.7.10.4
0006-ffmpeg-Channel-layouts-are-now-set-for-DTS-and-E-AC3.patch:
gstffmpegcodecmap.c | 20 --------------------
1 file changed, 20 deletions(-)
--- NEW FILE 0006-ffmpeg-Channel-layouts-are-now-set-for-DTS-and-E-AC3.patch ---
>From 36004f3ac91e3436a55b2fd22438fe43493dcb8a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian.droege(a)collabora.co.uk>
Date: Tue, 10 Jan 2012 10:08:05 +0100
Subject: [PATCH 06/12] ffmpeg: Channel layouts are now set for DTS and (E)AC3
by libav
---
ext/ffmpeg/gstffmpegcodecmap.c | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/ext/ffmpeg/gstffmpegcodecmap.c b/ext/ffmpeg/gstffmpegcodecmap.c
index f3381dd..2b06b2b 100644
--- a/ext/ffmpeg/gstffmpegcodecmap.c
+++ b/ext/ffmpeg/gstffmpegcodecmap.c
@@ -340,25 +340,6 @@ gst_ff_aud_caps_new (AVCodecContext * context, enum CodecID codec_id,
GstAudioChannelPosition *pos;
guint64 channel_layout = context->channel_layout;
- if (channel_layout == 0) {
- const guint64 default_channel_set[] = {
- 0, 0, CH_LAYOUT_SURROUND, CH_LAYOUT_QUAD, CH_LAYOUT_5POINT0,
- CH_LAYOUT_5POINT1, 0, CH_LAYOUT_7POINT1
- };
-
- switch (codec_id) {
- case CODEC_ID_EAC3:
- case CODEC_ID_AC3:
- case CODEC_ID_DTS:
- if (context->channels > 0
- && context->channels < G_N_ELEMENTS (default_channel_set))
- channel_layout = default_channel_set[context->channels - 1];
- break;
- default:
- break;
- }
- }
-
caps = gst_caps_new_simple (mimetype,
"rate", G_TYPE_INT, context->sample_rate,
"channels", G_TYPE_INT, context->channels, NULL);
--
1.7.10.4
0007-ffmpegdemux-fix-caps-leak.patch:
gstffmpegdemux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE 0007-ffmpegdemux-fix-caps-leak.patch ---
>From e0212a0b36fea9a3ad836bb0014e136675ad7ac8 Mon Sep 17 00:00:00 2001
From: Vincent Penquerc'h <vincent.penquerch(a)collabora.co.uk>
Date: Thu, 12 Jan 2012 14:57:48 +0000
Subject: [PATCH 07/12] ffmpegdemux: fix caps leak
---
ext/ffmpeg/gstffmpegdemux.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ext/ffmpeg/gstffmpegdemux.c b/ext/ffmpeg/gstffmpegdemux.c
index 3eb5328..6122a40 100644
--- a/ext/ffmpeg/gstffmpegdemux.c
+++ b/ext/ffmpeg/gstffmpegdemux.c
@@ -1330,6 +1330,7 @@ gst_ffmpegdemux_type_find (GstTypeFind * tf, gpointer priv)
in_plugin->name, sinkcaps, res);
gst_type_find_suggest (tf, res, sinkcaps);
+ gst_caps_unref (sinkcaps);
}
}
}
--
1.7.10.4
0008-ffdec-Only-set-get_buffer-function-for-video.patch:
gstffmpegdec.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- NEW FILE 0008-ffdec-Only-set-get_buffer-function-for-video.patch ---
>From 2a7cd3290348ef20eef728e37e5c4dce31c40b08 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian.droege(a)collabora.co.uk>
Date: Wed, 18 Jan 2012 10:05:09 +0100
Subject: [PATCH 08/12] ffdec: Only set get_buffer() function for video
Fixes bug #666435.
---
ext/ffmpeg/gstffmpegdec.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c
index a0f609a..cbef197 100644
--- a/ext/ffmpeg/gstffmpegdec.c
+++ b/ext/ffmpeg/gstffmpegdec.c
@@ -766,9 +766,11 @@ gst_ffmpegdec_setcaps (GstPad * pad, GstCaps * caps)
}
/* set buffer functions */
- ffmpegdec->context->get_buffer = gst_ffmpegdec_get_buffer;
- ffmpegdec->context->release_buffer = gst_ffmpegdec_release_buffer;
- ffmpegdec->context->draw_horiz_band = NULL;
+ if (oclass->in_plugin->type == AVMEDIA_TYPE_VIDEO) {
+ ffmpegdec->context->get_buffer = gst_ffmpegdec_get_buffer;
+ ffmpegdec->context->release_buffer = gst_ffmpegdec_release_buffer;
+ ffmpegdec->context->draw_horiz_band = NULL;
+ }
/* default is to let format decide if it needs a parser */
ffmpegdec->turnoff_parser = FALSE;
--
1.7.10.4
0009-codecmap-Add-mapping-for-Indeo-4-video-codec.patch:
gstffmpegcodecmap.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
--- NEW FILE 0009-codecmap-Add-mapping-for-Indeo-4-video-codec.patch ---
>From 92b319b021f4b0ce2ee7069d9894a6a47a78faf9 Mon Sep 17 00:00:00 2001
From: Edward Hervey <edward.hervey(a)collabora.co.uk>
Date: Wed, 22 Feb 2012 12:14:21 +0100
Subject: [PATCH 09/12] codecmap: Add mapping for Indeo 4 video codec
---
ext/ffmpeg/gstffmpegcodecmap.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/ext/ffmpeg/gstffmpegcodecmap.c b/ext/ffmpeg/gstffmpegcodecmap.c
index 2b06b2b..3759a35 100644
--- a/ext/ffmpeg/gstffmpegcodecmap.c
+++ b/ext/ffmpeg/gstffmpegcodecmap.c
@@ -906,6 +906,11 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
"indeoversion", G_TYPE_INT, 5, NULL);
break;
+ case CODEC_ID_INDEO4:
+ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-indeo",
+ "indeoversion", G_TYPE_INT, 4, NULL);
+ break;
+
case CODEC_ID_INDEO3:
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-indeo",
"indeoversion", G_TYPE_INT, 3, NULL);
@@ -3162,6 +3167,9 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
case 5:
id = CODEC_ID_INDEO5;
break;
+ case 4:
+ id = CODEC_ID_INDEO4;
+ break;
case 3:
id = CODEC_ID_INDEO3;
break;
--
1.7.10.4
0010-ffmpegdec-Use-auto-threads-if-available-and-only-sli.patch:
gstffmpegdec.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
--- NEW FILE 0010-ffmpegdec-Use-auto-threads-if-available-and-only-sli.patch ---
>From daabb55de44947f322181a3d7c320ad0202baf7a Mon Sep 17 00:00:00 2001
From: Edward Hervey <edward.hervey(a)collabora.co.uk>
Date: Fri, 2 Mar 2012 17:27:30 +0100
Subject: [PATCH 10/12] ffmpegdec: Use auto-threads if available, and only
slice-threading
Slice threading causes less latency (and corruption)
---
ext/ffmpeg/gstffmpegdec.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c
index cbef197..6ad266e 100644
--- a/ext/ffmpeg/gstffmpegdec.c
+++ b/ext/ffmpeg/gstffmpegdec.c
@@ -884,11 +884,16 @@ gst_ffmpegdec_setcaps (GstPad * pad, GstCaps * caps)
* supports it) */
ffmpegdec->context->debug_mv = ffmpegdec->debug_mv;
- if (ffmpegdec->max_threads == 0)
- ffmpegdec->context->thread_count = gst_ffmpeg_auto_max_threads ();
- else
+ 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 = ffmpegdec->max_threads;
+ ffmpegdec->context->thread_type = FF_THREAD_SLICE;
+
/* open codec - we don't select an output pix_fmt yet,
* simply because we don't know! We only get it
* during playback... */
--
1.7.10.4
0011-ffmux-Use-correct-enum-type-for-return-value.patch:
gstffmpegmux.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- NEW FILE 0011-ffmux-Use-correct-enum-type-for-return-value.patch ---
>From 283e0a54d04b2bf84fc365752dd4004c1e501f38 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian.droege(a)collabora.co.uk>
Date: Tue, 6 Mar 2012 15:27:22 +0100
Subject: [PATCH 11/12] ffmux: Use correct enum type for return value
---
ext/ffmpeg/gstffmpegmux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ext/ffmpeg/gstffmpegmux.c b/ext/ffmpeg/gstffmpegmux.c
index a041761..5486bda 100644
--- a/ext/ffmpeg/gstffmpegmux.c
+++ b/ext/ffmpeg/gstffmpegmux.c
@@ -785,7 +785,7 @@ gst_ffmpegmux_collected (GstCollectPads * pads, gpointer user_data)
static GstStateChangeReturn
gst_ffmpegmux_change_state (GstElement * element, GstStateChange transition)
{
- GstFlowReturn ret;
+ GstStateChangeReturn ret;
GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) (element);
switch (transition) {
--
1.7.10.4
0012-ffdec-don-t-flush-buffers-on-DISCONT.patch:
gstffmpegdec.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--- NEW FILE 0012-ffdec-don-t-flush-buffers-on-DISCONT.patch ---
>From 4422d5369e2831003d721f2ccd30410b1efbdf36 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wim.taymans(a)collabora.co.uk>
Date: Fri, 20 Apr 2012 16:16:25 +0200
Subject: [PATCH 12/12] ffdec: don't flush buffers on DISCONT
Don't flush the buffers that ffmpeg has on DISCONT but instead let it recover.
This gives a much better image in the case of packet loss.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=635020
---
ext/ffmpeg/gstffmpegdec.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c
index 6ad266e..d0773aa 100644
--- a/ext/ffmpeg/gstffmpegdec.c
+++ b/ext/ffmpeg/gstffmpegdec.c
@@ -2560,15 +2560,15 @@ gst_ffmpegdec_chain (GstPad * pad, GstBuffer * inbuf)
discont = GST_BUFFER_IS_DISCONT (inbuf);
/* The discont flags marks a buffer that is not continuous with the previous
- * buffer. This means we need to clear whatever data we currently have. We
- * currently also wait for a new keyframe, which might be suboptimal in the
- * case of a network error, better show the errors than to drop all data.. */
+ * buffer. This means we need to clear whatever data we currently have. We let
+ * ffmpeg continue with the data that it has. We currently drain the old
+ * frames that might be inside the decoder and we clear any partial data in
+ * the pcache, we might be able to remove the drain and flush too. */
if (G_UNLIKELY (discont)) {
GST_DEBUG_OBJECT (ffmpegdec, "received DISCONT");
/* drain what we have queued */
gst_ffmpegdec_drain (ffmpegdec);
gst_ffmpegdec_flush_pcache (ffmpegdec);
- avcodec_flush_buffers (ffmpegdec->context);
ffmpegdec->discont = TRUE;
gst_ffmpegdec_reset_ts (ffmpegdec);
}
--
1.7.10.4
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/gstreamer-ffmpeg/devel/.cvsignore,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- .cvsignore 29 Jan 2012 21:15:47 -0000 1.12
+++ .cvsignore 12 Jul 2012 14:07:05 -0000 1.13
@@ -1 +1,2 @@
gst-ffmpeg-0.10.13.tar.bz2
+libav-0.8.3.tar.xz
Index: gstreamer-ffmpeg.spec
===================================================================
RCS file: /cvs/free/rpms/gstreamer-ffmpeg/devel/gstreamer-ffmpeg.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- gstreamer-ffmpeg.spec 28 Feb 2012 11:26:22 -0000 1.20
+++ gstreamer-ffmpeg.spec 12 Jul 2012 14:07:06 -0000 1.21
@@ -1,16 +1,30 @@
Name: gstreamer-ffmpeg
Version: 0.10.13
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: GStreamer FFmpeg-based plug-ins
Group: Applications/Multimedia
# the ffmpeg plugin is LGPL, the postproc plugin is GPL
License: GPLv2+ and LGPLv2+
URL: http://gstreamer.freedesktop.org/
-Source: http://gstreamer.freedesktop.org/src/gst-ffmpeg/gst-ffmpeg-%{version}.tar...
+Source0: http://gstreamer.freedesktop.org/src/gst-ffmpeg/gst-ffmpeg-%{version}.tar...
+# We drop in a newer libav to get all the security bugfixes from there!
+Source1: http://libav.org/releases/libav-0.8.3.tar.xz
Patch0: gst-ffmpeg-0.10.12-ChangeLog-UTF-8.patch
+# Patches cherry picked from upstream for newer libav and bugfixes
+Patch1: 0001-configure.ac-Fix-for-new-libav.patch
+Patch2: 0002-gstffmpegutils-Fix-include.patch
+Patch3: 0003-gstffmpegdec-Re-enable-MT-decoding-by-default.patch
+Patch4: 0004-ffmpeg-fix-pad-template-ref-leaks.patch
+Patch5: 0005-ffmpegdec-Report-latency-if-B-frames-are-present.patch
+Patch6: 0006-ffmpeg-Channel-layouts-are-now-set-for-DTS-and-E-AC3.patch
+Patch7: 0007-ffmpegdemux-fix-caps-leak.patch
+Patch8: 0008-ffdec-Only-set-get_buffer-function-for-video.patch
+Patch9: 0009-codecmap-Add-mapping-for-Indeo-4-video-codec.patch
+Patch10: 0010-ffmpegdec-Use-auto-threads-if-available-and-only-sli.patch
+Patch11: 0011-ffmux-Use-correct-enum-type-for-return-value.patch
+Patch12: 0012-ffdec-don-t-flush-buffers-on-DISCONT.patch
BuildRequires: gstreamer-devel >= 0.10.0
BuildRequires: gstreamer-plugins-base-devel >= 0.10.0
-BuildRequires: ffmpeg-devel >= 0.8.8
BuildRequires: orc-devel bzip2-devel
%description
@@ -25,15 +39,31 @@
%prep
-%setup -q -n gst-ffmpeg-%{version}
+%setup -q -n gst-ffmpeg-%{version} -a 1
+rm -r gst-libs/ext/libav
+mv libav-0.8.3 gst-libs/ext/libav
%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
%build
+# Note no --with-system-ffmpeg *for now*, as gst-ffmpeg wants libav-0.8,
+# and the system ffmpeg is 0.11, which is more or less libav-0.9
%configure --disable-dependency-tracking --disable-static \
--with-package-name="gst-plugins-ffmpeg rpmfusion rpm" \
--with-package-origin="http://rpmfusion.org/" \
- --with-system-ffmpeg
+ --with-ffmpeg-extra-configure=--enable-runtime-cpudetect
make %{?_smp_mflags}
@@ -50,6 +80,14 @@
%changelog
+* Thu Jul 12 2012 Hans de Goede <j.w.r.degoede(a)gmail.com> - 0.10.13-3
+- Switch to the build in libav for now, gst-ffmpeg wants libav-0.8,
+ and the system ffmpeg is 0.11, which is more or less the unreleased
+ libav-0.9. Once libav-0.9 gets officially released gst-ffmpeg will
+ hopefully switch to it
+- Upgrade the buildin libav to 0.8.3 to get all the security fixes from
+ upstream libav
+
* Tue Feb 28 2012 Nicolas Chauvet <kwizart(a)gmail.com> - 0.10.13-2
- Rebuilt for x264/FFmpeg
Index: sources
===================================================================
RCS file: /cvs/free/rpms/gstreamer-ffmpeg/devel/sources,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- sources 29 Jan 2012 21:15:47 -0000 1.12
+++ sources 12 Jul 2012 14:07:06 -0000 1.13
@@ -1 +1,2 @@
7f5beacaf1312db2db30a026b36888c4 gst-ffmpeg-0.10.13.tar.bz2
+a15280a6a5d1cbc2dac392d22680c257 libav-0.8.3.tar.xz
12 years, 4 months
rpms/mythtv/devel mythtv.spec,1.100,1.101
by Richard Shaw
Author: hobbes1069
Update of /cvs/free/rpms/mythtv/devel
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv6805
Modified Files:
mythtv.spec
Log Message:
python-MythTV should require python-lxml, not the frontend package.
Index: mythtv.spec
===================================================================
RCS file: /cvs/free/rpms/mythtv/devel/mythtv.spec,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -r1.100 -r1.101
--- mythtv.spec 11 Jul 2012 22:49:26 -0000 1.100
+++ mythtv.spec 11 Jul 2012 23:36:11 -0000 1.101
@@ -512,7 +512,7 @@
Requires: perl(XML::Simple)
Requires: mythtv-common = %{version}-%{release}
Requires: mythtv-base-themes = %{version}
-Requires: python-MythTV python-lxml
+Requires: python-MythTV
Provides: mythtv-frontend-api = %{mythfeapiver}
Obsoletes: mythvideo < %{version}-%{release}
Provides: mythvideo = %{version}-%{release}
12 years, 4 months
rpms/mythtv/devel mythtv.spec,1.99,1.100
by Ken Dreyer
Author: ktdreyer
Update of /cvs/free/rpms/mythtv/devel
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv3154
Modified Files:
mythtv.spec
Log Message:
Require python-lxml for python-MythTV
Index: mythtv.spec
===================================================================
RCS file: /cvs/free/rpms/mythtv/devel/mythtv.spec,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -r1.99 -r1.100
--- mythtv.spec 7 Jul 2012 13:56:34 -0000 1.99
+++ mythtv.spec 11 Jul 2012 22:49:26 -0000 1.100
@@ -620,6 +620,7 @@
Requires: MySQL-python
Requires: PyXML
+Requires: python-lxml
%description -n python-MythTV
Provides a python-based interface to interacting with MythTV.
12 years, 4 months
rpms/gmameui/F-16 gmameui.spec,1.5,1.6
by Sérgio M. Basto
Author: sergiomb
Update of /cvs/nonfree/rpms/gmameui/F-16
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv30175
Modified Files:
gmameui.spec
Log Message:
* Wed Jul 11 2012 Sérgio Basto <sergio(a)serjux.com> - 0.4.13-0.2.20120704cvs
- add Requires: gnome-icon-theme-legacy, to fix more missing icons.
Index: gmameui.spec
===================================================================
RCS file: /cvs/nonfree/rpms/gmameui/F-16/gmameui.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- gmameui.spec 7 Jul 2012 19:28:21 -0000 1.5
+++ gmameui.spec 11 Jul 2012 21:33:18 -0000 1.6
@@ -1,7 +1,7 @@
Summary: Frontend for MAME
Name: gmameui
Version: 0.2.13
-Release: 0.2.20120704cvs%{?dist}
+Release: 0.3.20120704cvs%{?dist}
License: GPLv3+
Group: Applications/Emulators
URL: http://gmameui.sourceforge.net/
@@ -26,6 +26,8 @@
BuildRequires: gtkimageview-devel
BuildRequires: vte-devel
+Requires: gnome-icon-theme-legacy
+
%description
GMAMEUI is a front-end program that helps you run MAME (either xmame or
@@ -77,6 +79,9 @@
%changelog
+* Wed Jul 11 2012 Sérgio Basto <sergio(a)serjux.com> - 0.4.13-0.2.20120704cvs
+- add Requires: gnome-icon-theme-legacy, to fix more missing icons.
+
* Sat Jul 07 2012 Sérgio Basto <sergio(a)serjux.com> - 0.2.13-0.2.20120704cvs
- add missing icons, extract from gnome-icon-theme-gperfection2_2.3-0ubuntu3_all.deb
gmamui relies on some old gnome-icons-theme, cleans icons errors.
12 years, 4 months
rpms/gmameui/F-17 gmameui.spec,1.8,1.9
by Sérgio M. Basto
Author: sergiomb
Update of /cvs/nonfree/rpms/gmameui/F-17
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv29364
Modified Files:
gmameui.spec
Log Message:
* Wed Jul 11 2012 Sérgio Basto <sergio(a)serjux.com> - 0.4.13-0.2.20120704cvs
- add Requires: gnome-icon-theme-legacy, to fix more missing icons.
Index: gmameui.spec
===================================================================
RCS file: /cvs/nonfree/rpms/gmameui/F-17/gmameui.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- gmameui.spec 7 Jul 2012 14:40:03 -0000 1.8
+++ gmameui.spec 11 Jul 2012 21:22:42 -0000 1.9
@@ -1,7 +1,7 @@
Summary: Frontend for MAME
Name: gmameui
Version: 0.2.13
-Release: 0.2.20120704cvs%{?dist}
+Release: 0.3.20120704cvs%{?dist}
License: GPLv3+
Group: Applications/Emulators
URL: http://gmameui.sourceforge.net/
@@ -26,6 +26,8 @@
BuildRequires: gtkimageview-devel
BuildRequires: vte-devel
+Requires: gnome-icon-theme-legacy
+
%description
GMAMEUI is a front-end program that helps you run MAME (either xmame or
@@ -77,6 +79,9 @@
%changelog
+* Wed Jul 11 2012 Sérgio Basto <sergio(a)serjux.com> - 0.4.13-0.2.20120704cvs
+- add Requires: gnome-icon-theme-legacy, to fix more missing icons.
+
* Sat Jul 07 2012 Sérgio Basto <sergio(a)serjux.com> - 0.2.13-0.2.20120704cvs
- add missing icons, extract from gnome-icon-theme-gperfection2_2.3-0ubuntu3_all.deb
gmamui relies on some old gnome-icons-theme, cleans icons errors.
12 years, 4 months
rpms/gmameui/devel gmameui.spec,1.8,1.9
by Sérgio M. Basto
Author: sergiomb
Update of /cvs/nonfree/rpms/gmameui/devel
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv29259
Modified Files:
gmameui.spec
Log Message:
* Wed Jul 11 2012 Sérgio Basto <sergio(a)serjux.com> - 0.4.13-0.2.20120704cvs
- add Requires: gnome-icon-theme-legacy, to fix more missing icons.
Index: gmameui.spec
===================================================================
RCS file: /cvs/nonfree/rpms/gmameui/devel/gmameui.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- gmameui.spec 7 Jul 2012 13:38:38 -0000 1.8
+++ gmameui.spec 11 Jul 2012 21:21:25 -0000 1.9
@@ -1,7 +1,7 @@
Summary: Frontend for MAME
Name: gmameui
Version: 0.2.13
-Release: 0.2.20120704cvs%{?dist}
+Release: 0.3.20120704cvs%{?dist}
License: GPLv3+
Group: Applications/Emulators
URL: http://gmameui.sourceforge.net/
@@ -26,6 +26,8 @@
BuildRequires: gtkimageview-devel
BuildRequires: vte-devel
+Requires: gnome-icon-theme-legacy
+
%description
GMAMEUI is a front-end program that helps you run MAME (either xmame or
@@ -77,6 +79,9 @@
%changelog
+* Wed Jul 11 2012 Sérgio Basto <sergio(a)serjux.com> - 0.4.13-0.2.20120704cvs
+- add Requires: gnome-icon-theme-legacy, to fix more missing icons.
+
* Sat Jul 07 2012 Sérgio Basto <sergio(a)serjux.com> - 0.2.13-0.2.20120704cvs
- add missing icons, extract from gnome-icon-theme-gperfection2_2.3-0ubuntu3_all.deb
gmamui relies on some old gnome-icons-theme, cleans icons errors.
12 years, 4 months
rpms/dvdstyler/devel dvdstyler-ffmpeg54.patch, NONE, 1.1 dvdstyler.spec, 1.19, 1.20
by Nicolas Chauvet
Author: kwizart
Update of /cvs/free/rpms/dvdstyler/devel
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv26901/devel
Modified Files:
dvdstyler.spec
Added Files:
dvdstyler-ffmpeg54.patch
Log Message:
Fix for ffmpeg54
dvdstyler-ffmpeg54.patch:
mediaenc_ffmpeg.cpp | 116 +++++++++++++++++++++++++++++++++++-----------------
mediaenc_ffmpeg.h | 4 -
2 files changed, 82 insertions(+), 38 deletions(-)
--- NEW FILE dvdstyler-ffmpeg54.patch ---
diff -up DVDStyler-2.0rc1/src/mediaenc_ffmpeg.cpp.ffmpeg54 DVDStyler-2.0rc1/src/mediaenc_ffmpeg.cpp
--- DVDStyler-2.0rc1/src/mediaenc_ffmpeg.cpp.ffmpeg54 2011-08-02 21:03:48.000000000 +0200
+++ DVDStyler-2.0rc1/src/mediaenc_ffmpeg.cpp 2012-07-11 22:34:36.027178790 +0200
@@ -3,7 +3,7 @@
// Purpose: FFMPEG Media Encoder
// Author: Alex Thuering
// Created: 04.08.2007
-// RCS-ID: $Id: mediaenc_ffmpeg.cpp,v 1.27 2011/08/02 19:03:48 ntalex Exp $
+// RCS-ID: $Id: mediaenc_ffmpeg.cpp,v 1.30 2012/06/04 20:35:11 ntalex Exp $
// Copyright: (c) Alex Thuering
// Licence: GPL
/////////////////////////////////////////////////////////////////////////////
@@ -26,6 +26,7 @@ extern "C" {
#define __STDC_LIMIT_MACROS
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
+#include <libavutil/mathematics.h>
}
#define AUDIO_BUF_SIZE 524288
@@ -37,7 +38,6 @@ wxFfmpegMediaEncoder::wxFfmpegMediaEncod
m_videoStm = NULL;
m_audioStm = NULL;
m_samples = NULL;
- m_audioOutbuf = NULL;
m_picture = NULL;
m_imgConvertCtx = NULL;
m_videoOutbuf = NULL;
@@ -58,6 +58,14 @@ wxString wxFfmpegMediaEncoder::GetBacken
#define av_guess_format guess_format
#endif
+void print_error(const char *filename, int err) {
+ char errbuf[128];
+ const char *errbuf_ptr = errbuf;
+ if (av_strerror(err, errbuf, sizeof(errbuf)) < 0)
+ errbuf_ptr = strerror(AVUNERROR(err));
+ wxLogError(wxT("%s: %s\n"), filename, errbuf_ptr);
+}
+
bool wxFfmpegMediaEncoder::BeginEncode(const wxString& fileName, VideoFormat videoFormat, AudioFormat audioFormat,
AspectRatio aspectRatio, int videoBitrate) {
EndEncode();
@@ -92,10 +100,6 @@ bool wxFfmpegMediaEncoder::BeginEncode(c
if (!addAudioStream(outputFormat->audio_codec))
return false;
- if (av_set_parameters(m_outputCtx, NULL) < 0) {
- wxLogError(wxT("Invalid output format parameters"));
- return false;
- }
av_dump_format(m_outputCtx, 0, (const char*) fileName.fn_str(), 1);
m_outputCtx->packet_size = 2048;
@@ -107,16 +111,22 @@ bool wxFfmpegMediaEncoder::BeginEncode(c
return false;
// open the output file
- if (avio_open(&m_outputCtx->pb, fileName.mb_str(), URL_WRONLY) < 0) {
+ if (avio_open2(&m_outputCtx->pb, fileName.mb_str(), AVIO_FLAG_WRITE, NULL, NULL) < 0) {
wxLogError(wxT("Could not open '%s'"), fileName.c_str());
return false;
}
+
// write the stream header
+ AVDictionary *opts = NULL;
+ av_dict_set(&opts, "packet_size", "2048", 0);
+ av_dict_set(&opts, "muxrate", "10080000", 0);
+ char tmpstr[48];
+ snprintf(tmpstr, sizeof(tmpstr), "%i", (int)(0.5 * AV_TIME_BASE));
+ av_dict_set(&opts, "preload", tmpstr, 0);
m_outputCtx->packet_size = 2048;
- m_outputCtx->mux_rate = 10080000;
- m_outputCtx->preload = (int) (0.5 * AV_TIME_BASE);
m_outputCtx->max_delay = (int) (0.7 * AV_TIME_BASE);
- av_write_header(m_outputCtx);
+ avformat_write_header(m_outputCtx, &opts);
+ av_dict_free(&opts);
return true;
}
@@ -126,11 +136,12 @@ bool wxFfmpegMediaEncoder::addVideoStrea
m_videoStm = NULL;
return true;
}
- m_videoStm = av_new_stream(m_outputCtx, 0);
+ m_videoStm = avformat_new_stream(m_outputCtx, NULL);
if (!m_videoStm) {
wxLogError(wxT("Could not alloc stream"));
return false;
}
+ m_videoStm->id = 0;
AVCodecContext* c = m_videoStm->codec;
c->thread_count = m_threadCount;
@@ -158,41 +169,46 @@ bool wxFfmpegMediaEncoder::addAudioStrea
m_audioStm = NULL;
return true;
}
- m_audioStm = av_new_stream(m_outputCtx, 1);
+ m_audioStm = avformat_new_stream(m_outputCtx, NULL);
if (!m_audioStm) {
wxLogError(wxT("Could not alloc stream"));
return false;
}
+ m_audioStm->id = 1;
AVCodecContext* c = m_audioStm->codec;
c->thread_count = m_threadCount;
+ c->time_base.den = 25;
+ c->time_base.num = 1;
c->codec_id = (CodecID) codecId;
c->codec_type = AVMEDIA_TYPE_AUDIO;
c->bit_rate = 64000;
c->sample_rate = 48000;
c->sample_fmt = codecId == CODEC_ID_AC3 ? AV_SAMPLE_FMT_FLT : AV_SAMPLE_FMT_S16;
c->channels = 2;
+ // some formats want stream headers to be separate
+ if(m_outputCtx->oformat->flags & AVFMT_GLOBALHEADER)
+ c->flags |= CODEC_FLAG_GLOBAL_HEADER;
+
return true;
}
bool wxFfmpegMediaEncoder::OpenAudioEncoder() {
AVCodecContext* c = m_audioStm->codec;
-
// find the audio encoder and open it
AVCodec* codec = avcodec_find_encoder(c->codec_id);
if (!codec) {
wxLogError(wxT("Audio codec not found"));
return false;
}
- if (avcodec_open(c, codec) < 0) {
+ if (avcodec_open2(c, codec, NULL) < 0) {
wxLogError(wxT("Could not open audio codec"));
return false;
}
- m_audioOutbuf = (uint8_t*) av_malloc(AUDIO_BUF_SIZE);
- m_samples = (int16_t*) av_malloc(AUDIO_BUF_SIZE/2);
- memset(m_samples, 0, AUDIO_BUF_SIZE/2);
+ m_samples = (int16_t*) av_malloc(c->frame_size * av_get_bytes_per_sample(c->sample_fmt) * c->channels);
+ memset(m_samples, 0, c->frame_size * av_get_bytes_per_sample(c->sample_fmt) * c->channels);
return true;
}
@@ -203,9 +219,6 @@ void wxFfmpegMediaEncoder::CloseAudioEnc
if (m_samples)
av_free(m_samples);
m_samples = NULL;
- if (m_audioOutbuf)
- av_free(m_audioOutbuf);
- m_audioOutbuf = NULL;
m_audioStm = NULL;
}
@@ -233,7 +246,7 @@ bool wxFfmpegMediaEncoder::OpenVideoEnco
wxLogError(wxT("Video codec not found"));
return false;
}
- if (avcodec_open(c, codec) < 0) {
+ if (avcodec_open2(c, codec, NULL) < 0) {
wxLogError(wxT("Could not open video codec"));
return false;
}
@@ -312,24 +325,27 @@ bool wxFfmpegMediaEncoder::EncodeImage(w
}
bool wxFfmpegMediaEncoder::writeAudioFrame() {
- AVPacket pkt;
+ AVPacket pkt = { 0 }; // data and size must be 0;
+ AVFrame *frame = avcodec_alloc_frame();
+ int got_packet;
+
av_init_packet(&pkt);
-
- AVCodecContext* c = m_audioStm->codec;
- memset(m_audioOutbuf, 0, AUDIO_BUF_SIZE);
- pkt.size = avcodec_encode_audio(c, m_audioOutbuf, AUDIO_BUF_SIZE, m_samples);
- if (pkt.size < 0) {
- wxLogError(wxT("Audio encoding failed"));
- return false;
- }
- pkt.pts = av_rescale_q(c->coded_frame->pts, c->time_base, m_audioStm->time_base);
- pkt.flags |= AV_PKT_FLAG_KEY;
- pkt.stream_index = m_audioStm->index;
- pkt.data = m_audioOutbuf;
+ AVCodecContext *c = m_audioStm->codec;
+
+ frame->nb_samples = c->frame_size;
+ avcodec_fill_audio_frame(frame, c->channels, c->sample_fmt, (uint8_t *) m_samples, c->frame_size
+ * av_get_bytes_per_sample(c->sample_fmt) * c->channels, 1);
+
+ avcodec_encode_audio2(c, &pkt, frame, &got_packet);
+ if (!got_packet)
+ return true;
+
+ pkt.stream_index = m_audioStm->index;
// write the compressed frame in the media file
- if (av_interleaved_write_frame(m_outputCtx, &pkt) != 0) {
- wxLogError(wxT("Error while writing audio frame"));
+ int ret = av_interleaved_write_frame(m_outputCtx, &pkt);
+ if (ret < 0) {
+ print_error("Error while writing audio frame", ret);
return false;
}
return true;
@@ -339,6 +355,33 @@ bool wxFfmpegMediaEncoder::writeVideoFra
AVCodecContext *c = m_videoStm->codec;
// encode the image
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(54, 0, 0)
+ AVPacket pkt;
+ av_init_packet(&pkt);
+ pkt.data = m_videoOutbuf;
+ pkt.size = VIDEO_BUF_SIZE;
+
+ int got_packet = 0;
+ int ret = avcodec_encode_video2(c, &pkt, m_picture, &got_packet);
+ if (ret < 0) {
+ print_error("Error while writing video frame", ret);
+ return false;
+ }
+ if (got_packet) {
+ if (pkt.pts != (int64_t) AV_NOPTS_VALUE)
+ pkt.pts = av_rescale_q(pkt.pts, c->time_base, m_videoStm->time_base);
+ if (pkt.dts != (int64_t) AV_NOPTS_VALUE)
+ pkt.dts = av_rescale_q(pkt.dts, c->time_base, m_videoStm->time_base);
+ pkt.stream_index = m_videoStm->index;
+
+ // write the compressed frame in the media file
+ ret = av_interleaved_write_frame(m_outputCtx, &pkt);
+ if (ret < 0) {
+ print_error("Error while writing video frame", ret);
+ return false;
+ }
+ }
+#else
int out_size = avcodec_encode_video(c, m_videoOutbuf, VIDEO_BUF_SIZE, m_picture);
if (out_size < 0) {
wxLogError(wxT("Video encoding failed"));
@@ -362,6 +405,7 @@ bool wxFfmpegMediaEncoder::writeVideoFra
wxLogError(wxT("Error while writing video frame"));
return false;
}
+#endif
return true;
}
diff -up DVDStyler-2.0rc1/src/mediaenc_ffmpeg.h.ffmpeg54 DVDStyler-2.0rc1/src/mediaenc_ffmpeg.h
--- DVDStyler-2.0rc1/src/mediaenc_ffmpeg.h.ffmpeg54 2009-06-15 19:59:16.000000000 +0200
+++ DVDStyler-2.0rc1/src/mediaenc_ffmpeg.h 2012-07-11 22:37:35.862061554 +0200
@@ -3,7 +3,7 @@
// Purpose: FFMPEG Media Encoder
// Author: Alex Thuering
// Created: 04.08.2007
-// RCS-ID: $Id: mediaenc_ffmpeg.h,v 1.8 2009/06/15 17:59:16 ntalex Exp $
+// RCS-ID: $Id: mediaenc_ffmpeg.h,v 1.9 2012/05/31 21:01:49 ntalex Exp $
// Copyright: (c) Alex Thuering
// Licence: GPL
/////////////////////////////////////////////////////////////////////////////
@@ -40,7 +40,6 @@ private:
bool addAudioStream(int codecId);
int16_t* m_samples;
- uint8_t* m_audioOutbuf;
bool OpenAudioEncoder();
void CloseAudioEncoder();
@@ -57,3 +56,4 @@ private:
};
#endif // WX_FFMPEG_MEDIA_ENCODER_H
+
Index: dvdstyler.spec
===================================================================
RCS file: /cvs/free/rpms/dvdstyler/devel/dvdstyler.spec,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- dvdstyler.spec 11 Jul 2012 18:18:41 -0000 1.19
+++ dvdstyler.spec 11 Jul 2012 20:52:12 -0000 1.20
@@ -13,6 +13,7 @@
# Based on http://www.freebsd.org/cgi/cvsweb.cgi/ports/multimedia/dvdstyler/files/pa...
# Fixes 'directory not empty' error because of xmlto outputting a new .proc file
Patch2: dvdstyler-docs-xmlto.patch
+Patch3: dvdstyler-ffmpeg54.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# build
BuildRequires: automake, autoconf
@@ -58,6 +59,7 @@
%patch0 -b .validdesktop
%patch1 -b .libjpeg
%patch2 -b .xmlto
+%patch3 -p1 -b .ffmpeg54
%{__sed} -i 's|_T("xine \\"dvd:/$DIR\\"");|_T("totem \\"dvd://$DIR\\"");|' src/Config.h
%build
12 years, 4 months
rpms/libva-intel-driver/devel libva-intel-driver.spec,1.3,1.4
by Nicolas Chauvet
Author: kwizart
Update of /cvs/free/rpms/libva-intel-driver/devel
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv17131
Modified Files:
libva-intel-driver.spec
Log Message:
Switch to pkgconfig(libudev)
Index: libva-intel-driver.spec
===================================================================
RCS file: /cvs/free/rpms/libva-intel-driver/devel/libva-intel-driver.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- libva-intel-driver.spec 11 Jul 2012 17:58:16 -0000 1.3
+++ libva-intel-driver.spec 11 Jul 2012 18:37:37 -0000 1.4
@@ -2,7 +2,7 @@
Name: libva-intel-driver
Version: 1.0.18
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: HW video decode support for Intel integrated graphics
Group: System Environment/Libraries
License: MIT and EPL
@@ -15,11 +15,7 @@
BuildRequires: libtool
%{?_with_gen4asm:BuildRequires: intel-gen4asm >= 1.2}
-%if 0%{?fedora} > 17 || 0%{?rhel} > 6
-BuildRequires: systemd-devel
-%else
-BuildRequires: libudev-devel
-%endif
+BuildRequires: pkgconfig(libudev)
BuildRequires: libXext-devel
BuildRequires: libXfixes-devel
BuildRequires: libdrm-devel >= 2.4.23
@@ -77,8 +73,8 @@
%changelog
-* Wed Jul 11 2012 Nicolas Chauvet <kwizart(a)gmail.com> - 1.0.18-2
-- Switch to systemd-devel
+* Wed Jul 11 2012 Nicolas Chauvet <kwizart(a)gmail.com> - 1.0.18-3
+- Switch to pkgconfig(libudev)
* Mon Jun 04 2012 Nicolas Chauvet <kwizart(a)gmail.com> - 1.0.18-1
- Update to 1.0.18
12 years, 4 months
rpms/vlc/devel vlc-2.0.2-xcb_discard.patch, NONE, 1.1 vlc.spec, 1.156, 1.157
by Nicolas Chauvet
Author: kwizart
Update of /cvs/free/rpms/vlc/devel
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv16257/devel
Modified Files:
vlc.spec
Added Files:
vlc-2.0.2-xcb_discard.patch
Log Message:
Switch to pkgconfig(libudev)
vlc-2.0.2-xcb_discard.patch:
xcb.c | 4 ++++
1 file changed, 4 insertions(+)
--- NEW FILE vlc-2.0.2-xcb_discard.patch ---
diff -up vlc-2.0.2/modules/access/screen/xcb.c.discard vlc-2.0.2/modules/access/screen/xcb.c
--- vlc-2.0.2/modules/access/screen/xcb.c.discard 2011-12-08 19:00:26.000000000 +0100
+++ vlc-2.0.2/modules/access/screen/xcb.c 2012-07-11 15:07:43.092366202 +0200
@@ -319,7 +319,11 @@ static void Demux (void *data)
msg_Err (demux, "bad X11 drawable 0x%08"PRIx32, sys->window);
discard:
if (sys->follow_mouse)
+#if 0
xcb_discard_reply (conn, gc.sequence);
+#else
+ msg_Warn (demux, "xcb_discard_reply not available in libxcb < 1.6") ;
+#endif
return;
}
Index: vlc.spec
===================================================================
RCS file: /cvs/free/rpms/vlc/devel/vlc.spec,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -r1.156 -r1.157
--- vlc.spec 4 Jul 2012 16:44:29 -0000 1.156
+++ vlc.spec 11 Jul 2012 18:26:16 -0000 1.157
@@ -15,6 +15,7 @@
%global _with_xvidcore --with-xvidcore
%global _with_live555 --with-live555
%global _with_vaapi --with-vaapi
+%global _with_xcb 1
%endif
%if 0%{?fedora}
%global _with_fluidsyth 1
@@ -28,11 +29,12 @@
Summary: The cross-platform open-source multimedia framework, player and server
Name: vlc
Version: 2.0.2
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2+
Group: Applications/Multimedia
URL: http://www.videolan.org
Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{...
+Patch0: vlc-2.0.2-xcb_discard.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: desktop-file-utils
@@ -96,7 +98,7 @@
BuildRequires: libtheora-devel
BuildRequires: libtiger-devel
BuildRequires: libtiff-devel
-BuildRequires: libudev-devel >= 142
+BuildRequires: pkgconfig(libudev)
BuildRequires: libupnp-devel
BuildRequires: libv4l-devel
%{?_with_vaapi:BuildRequires: libva-devel}
@@ -140,7 +142,10 @@
BuildRequires: libX11-devel
BuildRequires: libXext-devel
BuildRequires: libXpm-devel
-BuildRequires: xcb-util-devel
+%{?_with_xcb:
+BuildRequires: libxcb-devel
+BuildRequires: xcb-util-devel
+}
BuildRequires: xorg-x11-proto-devel
@@ -210,6 +215,14 @@
%prep
%setup -q -n %{name}-%{version}%{?vlc_rc}
+%if 0%{?rhel}
+%patch0 -p1 -b .xcb_discard
+%{?_with_xcb:
+sed -i -e "s|xcb >= 1.6|xcb >= 1.5|" configure configure.ac
+touch -r config.h.in configure configure.ac
+}
+%endif
+
%{?_with_bootstrap:
rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || :
./bootstrap
@@ -495,6 +508,10 @@
%changelog
+* Wed Jul 11 2012 Nicolas Chauvet <kwizart(a)gmail.com> - 2.0.2-3
+- Fix build of xcb
+- Switch to pkgconfig(libudev)
+
* Wed Jul 04 2012 Nicolas Chauvet <kwizart(a)gmail.com> - 2.0.2-2
- Rework BR and RPM conditionals
- Drop support for anything below EL-6 and current Fedora.
12 years, 4 months