summaryrefslogtreecommitdiffstats
path: root/gst/dtmf
diff options
context:
space:
mode:
authorOlivier Crete <olivier.crete@collabora.co.uk>2007-09-17 16:08:20 +0000
committerEdward Hervey <bilboed@bilboed.com>2009-02-21 17:48:04 +0100
commit833252112191b2b6ff0b4b071a90f06aaeb8d6e8 (patch)
tree77e9445f37a83763815bfefd8c93bc2ea23cec68 /gst/dtmf
parent908f5167aee4c2fe2d1eb241384ddc9052198f98 (diff)
downloadgst-plugins-bad-833252112191b2b6ff0b4b071a90f06aaeb8d6e8.tar.gz
gst-plugins-bad-833252112191b2b6ff0b4b071a90f06aaeb8d6e8.tar.bz2
gst-plugins-bad-833252112191b2b6ff0b4b071a90f06aaeb8d6e8.zip
[MOVED FROM GST-P-FARSIGHT] Add patch to make it work with maemo dsp sources that payload incorrectly
20070917160820-3e2dc-06b1b1d1b0918b30dabea5a0714cb732b3b8d8dd.gz
Diffstat (limited to 'gst/dtmf')
-rw-r--r--gst/dtmf/gstdtmfsrc.c8
-rw-r--r--gst/dtmf/gstrtpdtmfsrc.c8
2 files changed, 16 insertions, 0 deletions
diff --git a/gst/dtmf/gstdtmfsrc.c b/gst/dtmf/gstdtmfsrc.c
index 2429a71c..e0a73dd1 100644
--- a/gst/dtmf/gstdtmfsrc.c
+++ b/gst/dtmf/gstdtmfsrc.c
@@ -480,7 +480,11 @@ gst_dtmf_prepare_timestamps (GstDTMFSrc *dtmfsrc)
clock = gst_element_get_clock (GST_ELEMENT (dtmfsrc));
if (clock != NULL) {
+#ifdef MAEMO_BROKEN
+ dtmfsrc->timestamp = gst_clock_get_time (clock);
+#else
dtmfsrc->timestamp = gst_clock_get_time (clock) - base_time;
+#endif
gst_object_unref (clock);
} else {
gchar *dtmf_name = gst_element_get_name (dtmfsrc);
@@ -712,8 +716,12 @@ gst_dtmf_src_create (GstBaseSrc * basesrc, guint64 offset,
clock = gst_element_get_clock (GST_ELEMENT (basesrc));
+#ifdef MAEMO_BROKEN
+ clockid = gst_clock_new_single_shot_id (clock, dtmfsrc->timestamp);
+#else
clockid = gst_clock_new_single_shot_id (clock, dtmfsrc->timestamp +
gst_element_get_base_time (GST_ELEMENT (dtmfsrc)));
+#endif
gst_object_unref (clock);
GST_OBJECT_LOCK (dtmfsrc);
diff --git a/gst/dtmf/gstrtpdtmfsrc.c b/gst/dtmf/gstrtpdtmfsrc.c
index 9c796fff..5c979cf1 100644
--- a/gst/dtmf/gstrtpdtmfsrc.c
+++ b/gst/dtmf/gstrtpdtmfsrc.c
@@ -540,7 +540,11 @@ gst_rtp_dtmf_prepare_timestamps (GstRTPDTMFSrc *dtmfsrc)
GstClock *clock;
GstClockTime base_time;
+#ifdef MAEMO_BROKEN
+ base_time = 0;
+#else
base_time = gst_element_get_base_time (GST_ELEMENT (dtmfsrc));
+#endif
clock = gst_element_get_clock (GST_ELEMENT (dtmfsrc));
if (clock != NULL) {
@@ -765,8 +769,12 @@ gst_rtp_dtmf_src_create (GstBaseSrc * basesrc, guint64 offset,
clock = gst_element_get_clock (GST_ELEMENT (basesrc));
+#ifdef MAEMO_BROKEN
+ clockid = gst_clock_new_single_shot_id (clock, dtmfsrc->timestamp);
+#else
clockid = gst_clock_new_single_shot_id (clock, dtmfsrc->timestamp +
gst_element_get_base_time (GST_ELEMENT (dtmfsrc)));
+#endif
gst_object_unref (clock);
GST_OBJECT_LOCK (dtmfsrc);