}
static void
-gst_dtmf_prepare_timestamps (GstDTMFSrc *dtmfsrc, GstDTMFSrcEvent *event)
+gst_dtmf_prepare_timestamps (GstDTMFSrc *dtmfsrc)
{
GstClock *clock;
clock = GST_ELEMENT_CLOCK (dtmfsrc);
if (clock != NULL)
- event->timestamp = gst_clock_get_time (GST_ELEMENT_CLOCK (dtmfsrc));
+ dtmfsrc->timestamp = gst_clock_get_time (GST_ELEMENT_CLOCK (dtmfsrc));
else {
GST_ERROR_OBJECT (dtmfsrc, "No clock set for element %s",
GST_ELEMENT_NAME (dtmfsrc));
- event->timestamp = GST_CLOCK_TIME_NONE;
+ dtmfsrc->timestamp = GST_CLOCK_TIME_NONE;
}
}
/* timestamp and duration of GstBuffer */
GST_BUFFER_DURATION (buf) = duration * GST_MSECOND;
- GST_BUFFER_TIMESTAMP (buf) = event->timestamp;
- event->timestamp += GST_BUFFER_DURATION (buf);
+ GST_BUFFER_TIMESTAMP (buf) = dtmfsrc->timestamp;
+ dtmfsrc->timestamp += GST_BUFFER_DURATION (buf);
/* FIXME: Should we sync to clock ourselves or leave it to sink */
gst_dtmf_src_wait_for_buffer_ts (dtmfsrc, buf);
if (event->event_type == DTMF_EVENT_TYPE_STOP) {
GST_WARNING_OBJECT (dtmfsrc, "Received a DTMF stop event when already stopped", GST_BUFFER_SIZE (buf));
} else if (event->event_type == DTMF_EVENT_TYPE_START) {
- gst_dtmf_prepare_timestamps (dtmfsrc, event);
+ gst_dtmf_prepare_timestamps (dtmfsrc);
/* Don't forget to get exclusive access to the stream */
gst_dtmf_src_set_stream_lock (dtmfsrc, TRUE);
typedef enum _GstDTMFEventType GstDTMFEventType;
struct _GstDTMFSrcEvent {
- GstClockTime timestamp;
GstDTMFEventType event_type;
double sample;
guint16 event_number;
GstDTMFSrcEvent* last_event;
guint16 interval;
+ GstClockTime timestamp;
};