mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
dtmf: Remove leftover MAEMO_BROKEN defines
Remove defines to work around bugs in old Maemo releases
This commit is contained in:
parent
3c86c6432a
commit
27cafd8d8e
2 changed files with 7 additions and 28 deletions
|
@ -113,7 +113,7 @@
|
|||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -123,7 +123,7 @@
|
|||
#include <glib.h>
|
||||
|
||||
#ifndef M_PI
|
||||
# define M_PI 3.14159265358979323846 /* pi */
|
||||
#define M_PI 3.14159265358979323846 /* pi */
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -457,17 +457,11 @@ static void
|
|||
gst_dtmf_prepare_timestamps (GstDTMFSrc * dtmfsrc)
|
||||
{
|
||||
GstClock *clock;
|
||||
GstClockTime base_time;
|
||||
|
||||
base_time = gst_element_get_base_time (GST_ELEMENT (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
|
||||
dtmfsrc->timestamp = gst_clock_get_time (clock)
|
||||
- gst_element_get_base_time (GST_ELEMENT (dtmfsrc));
|
||||
gst_object_unref (clock);
|
||||
} else {
|
||||
gchar *dtmf_name = gst_element_get_name (dtmfsrc);
|
||||
|
@ -696,12 +690,8 @@ 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);
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -515,18 +515,12 @@ static void
|
|||
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) {
|
||||
dtmfsrc->timestamp = gst_clock_get_time (clock)
|
||||
+ (MIN_INTER_DIGIT_INTERVAL * GST_MSECOND) - base_time;
|
||||
+ (MIN_INTER_DIGIT_INTERVAL * GST_MSECOND)
|
||||
- gst_element_get_base_time (GST_ELEMENT (dtmfsrc));
|
||||
dtmfsrc->start_timestamp = dtmfsrc->timestamp;
|
||||
gst_object_unref (clock);
|
||||
} else {
|
||||
|
@ -742,13 +736,8 @@ gst_rtp_dtmf_src_create (GstBaseSrc * basesrc, guint64 offset,
|
|||
GST_DEBUG_OBJECT (dtmfsrc, "Processed events, now lets wait on the clock");
|
||||
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue