rpms/gstreamer-plugins-base/F-12 pulsesink-disable-old-version-hack.patch, NONE, 1.1
Bastien Nocera
hadess at fedoraproject.org
Tue Oct 27 01:11:52 UTC 2009
- Previous message (by thread): rpms/gstreamer-plugins-base/F-12 gstreamer-plugins-base.spec, 1.89, 1.90
- Next message (by thread): rpms/lvm2/devel LVM2.2.02.54.tgz.asc, NONE, 1.1 .cvsignore, 1.72, 1.73 lvm2.spec, 1.184, 1.185 sources, 1.79, 1.80 upstream, 1.65, 1.66 LVM2.2.02.53.tgz.asc, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: hadess
Update of /cvs/pkgs/rpms/gstreamer-plugins-base/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9979
Added Files:
pulsesink-disable-old-version-hack.patch
Log Message:
add missing patch
pulsesink-disable-old-version-hack.patch:
gstbaseaudiosink.c | 46 +++++++++++++++++++++++++++++++++++-----------
1 file changed, 35 insertions(+), 11 deletions(-)
--- NEW FILE pulsesink-disable-old-version-hack.patch ---
>From 35cddfb1e3ddc6513c7daca093d72151a13e9342 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wim.taymans at collabora.co.uk>
Date: Thu, 10 Sep 2009 10:38:16 +0000
Subject: baseaudiosink: add ugly backward compat hack
Check for pulsesink < 0.10.17 because it includes code that is now included in
baseaudiosink. Disable that code in baseaudiosink to be compatible with the
older version.
---
diff --git a/gst-libs/gst/audio/gstbaseaudiosink.c b/gst-libs/gst/audio/gstbaseaudiosink.c
index afa62c3..23fde25 100644
--- a/gst-libs/gst/audio/gstbaseaudiosink.c
+++ b/gst-libs/gst/audio/gstbaseaudiosink.c
@@ -56,6 +56,8 @@ struct _GstBaseAudioSinkPrivate
gboolean sync_latency;
GstClockTime eos_time;
+
+ gboolean do_time_offset;
};
/* BaseAudioSink signals and args */
@@ -231,12 +233,15 @@ gst_base_audio_sink_class_init (GstBaseAudioSinkClass * klass)
* thread-safety in GObject */
g_type_class_ref (GST_TYPE_AUDIO_CLOCK);
g_type_class_ref (GST_TYPE_RING_BUFFER);
+
}
static void
gst_base_audio_sink_init (GstBaseAudioSink * baseaudiosink,
GstBaseAudioSinkClass * g_class)
{
+ GstPluginFeature *feature;
+
baseaudiosink->priv = GST_BASE_AUDIO_SINK_GET_PRIVATE (baseaudiosink);
baseaudiosink->buffer_time = DEFAULT_BUFFER_TIME;
@@ -253,6 +258,24 @@ gst_base_audio_sink_init (GstBaseAudioSink * baseaudiosink,
/* install some custom pad_query functions */
gst_pad_set_query_function (GST_BASE_SINK_PAD (baseaudiosink),
GST_DEBUG_FUNCPTR (gst_base_audio_sink_query_pad));
+
+ baseaudiosink->priv->do_time_offset = TRUE;
+
+ /* check the factory, pulsesink < 0.10.17 does the timestamp offset itself so
+ * we should not do ourselves */
+ feature =
+ GST_PLUGIN_FEATURE_CAST (GST_ELEMENT_CLASS (g_class)->elementfactory);
+ GST_DEBUG ("created from factory %p", feature);
+
+ /* HACK for old pulsesink that did the time_offset themselves */
+ if (feature) {
+ if (strcmp (gst_plugin_feature_get_name (feature), "pulsesink") == 0) {
+ if (!gst_plugin_feature_check_version (feature, 0, 10, 17)) {
+ /* we're dealing with an old pulsesink, we need to disable time corection */
+ baseaudiosink->priv->do_time_offset = FALSE;
+ }
+ }
+ }
}
static void
@@ -1409,16 +1432,18 @@ gst_base_audio_sink_render (GstBaseSink * bsink, GstBuffer * buf)
}
/* bring to position in the ringbuffer */
- time_offset =
- GST_AUDIO_CLOCK_CAST (sink->provided_clock)->abidata.ABI.time_offset;
- if (render_start > time_offset)
- render_start -= time_offset;
- else
- render_start = 0;
- if (render_stop > time_offset)
- render_stop -= time_offset;
- else
- render_stop = 0;
+ if (sink->priv->do_time_offset) {
+ time_offset =
+ GST_AUDIO_CLOCK_CAST (sink->provided_clock)->abidata.ABI.time_offset;
+ if (render_start > time_offset)
+ render_start -= time_offset;
+ else
+ render_start = 0;
+ if (render_stop > time_offset)
+ render_stop -= time_offset;
+ else
+ render_stop = 0;
+ }
/* and bring the time to the rate corrected offset in the buffer */
render_start = gst_util_uint64_scale_int (render_start,
--
cgit v0.8.2
- Previous message (by thread): rpms/gstreamer-plugins-base/F-12 gstreamer-plugins-base.spec, 1.89, 1.90
- Next message (by thread): rpms/lvm2/devel LVM2.2.02.54.tgz.asc, NONE, 1.1 .cvsignore, 1.72, 1.73 lvm2.spec, 1.184, 1.185 sources, 1.79, 1.80 upstream, 1.65, 1.66 LVM2.2.02.53.tgz.asc, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list