diff options
author | Youness Alaoui <youness.alaoui@collabora.co.uk> | 2007-09-13 20:46:14 +0000 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2009-02-21 17:48:02 +0100 |
commit | a88f8d3310471ab9a4f740028616fc64ab91b939 (patch) | |
tree | e22a01b1b5e7f60859d38acb7ca2f9b794616ada /gst | |
parent | 4a11ad9df0e8357031a5a2834d61625b0ab00626 (diff) | |
download | gst-plugins-bad-a88f8d3310471ab9a4f740028616fc64ab91b939.tar.gz gst-plugins-bad-a88f8d3310471ab9a4f740028616fc64ab91b939.tar.bz2 gst-plugins-bad-a88f8d3310471ab9a4f740028616fc64ab91b939.zip |
[MOVED FROM GST-P-FARSIGHT] added debugs
20070913204614-4f0f6-68c2a69ae7a1efca6e13c116dbad7f9b686f0242.gz
Diffstat (limited to 'gst')
-rw-r--r-- | gst/dtmf/gstdtmfsrc.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gst/dtmf/gstdtmfsrc.c b/gst/dtmf/gstdtmfsrc.c index 06fc5027..9dca9a49 100644 --- a/gst/dtmf/gstdtmfsrc.c +++ b/gst/dtmf/gstdtmfsrc.c @@ -655,8 +655,11 @@ gst_dtmf_src_create (GstBaseSrc * basesrc, guint64 offset, start: if (dtmfsrc->last_event == NULL) { + GST_DEBUG_OBJECT (dtmfsrc, "popping"); event = g_async_queue_pop (dtmfsrc->event_queue); + GST_DEBUG_OBJECT (dtmfsrc, "popped %d", event->event_type); + if (event->event_type == DTMF_EVENT_TYPE_STOP) { GST_WARNING_OBJECT (dtmfsrc, "Received a DTMF stop event when already stopped"); @@ -673,6 +676,7 @@ gst_dtmf_src_create (GstBaseSrc * basesrc, guint64 offset, * We're pushing it back because it has to stay in there until * the task is really paused (and the queue will then be flushed) */ + GST_DEBUG_OBJECT (dtmfsrc, "pushing pause_task..."); g_async_queue_push (dtmfsrc->event_queue, event); g_async_queue_unref (dtmfsrc->event_queue); } @@ -689,11 +693,21 @@ gst_dtmf_src_create (GstBaseSrc * basesrc, guint64 offset, g_free (dtmfsrc->last_event); dtmfsrc->last_event = NULL; goto start; + } else if (event->event_type == DTMF_EVENT_TYPE_PAUSE_TASK) { + /* + * We're pushing it back because it has to stay in there until + * the task is really paused (and the queue will then be flushed) + */ + GST_DEBUG_OBJECT (dtmfsrc, "pushing pause_task..."); + g_async_queue_push (dtmfsrc->event_queue, event); + g_async_queue_unref (dtmfsrc->event_queue); } } } g_async_queue_unref (dtmfsrc->event_queue); + GST_DEBUG_OBJECT (dtmfsrc, "end event check"); + if (dtmfsrc->last_event) { buf = gst_dtmf_src_create_next_tone_packet (dtmfsrc, dtmfsrc->last_event); @@ -705,6 +719,7 @@ gst_dtmf_src_create (GstBaseSrc * basesrc, guint64 offset, ret = GST_FLOW_WRONG_STATE; } + GST_DEBUG_OBJECT (dtmfsrc, "returning"); return ret; } |