*/
#ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
#endif
#include <stdlib.h>
#include <glib.h>
#ifndef M_PI
-# define M_PI 3.14159265358979323846 /* pi */
+#define M_PI 3.14159265358979323846 /* pi */
#endif
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);
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);
*/
#ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
#endif
#include <stdlib.h>
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 {
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);