From 032090d9c284a78a7123ab55146b244779b46f10 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Cr=C3=AAte?= Date: Fri, 7 May 2010 18:42:06 -0400 Subject: [PATCH] dtmf: Remove rtpdtmfmux stream-lock code --- gst/dtmf/gstdtmfsrc.c | 22 ---------------------- gst/dtmf/gstrtpdtmfsrc.c | 22 ---------------------- 2 files changed, 44 deletions(-) diff --git a/gst/dtmf/gstdtmfsrc.c b/gst/dtmf/gstdtmfsrc.c index 8831b39..8ed76e0 100644 --- a/gst/dtmf/gstdtmfsrc.c +++ b/gst/dtmf/gstdtmfsrc.c @@ -440,22 +440,6 @@ gst_dtmf_src_get_property (GObject * object, guint prop_id, GValue * value, } static void -gst_dtmf_src_set_stream_lock (GstDTMFSrc * dtmfsrc, gboolean lock) -{ - GstPad *srcpad = GST_BASE_SRC_PAD (dtmfsrc); - GstEvent *event; - GstStructure *structure; - - structure = gst_structure_new ("stream-lock", - "lock", G_TYPE_BOOLEAN, lock, NULL); - - event = gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM_OOB, structure); - if (!gst_pad_push_event (srcpad, event)) { - GST_WARNING_OBJECT (dtmfsrc, "stream-lock event not handled"); - } -} - -static void gst_dtmf_prepare_timestamps (GstDTMFSrc * dtmfsrc) { GstClock *clock; @@ -638,9 +622,6 @@ gst_dtmf_src_create (GstBaseSrc * basesrc, guint64 offset, case DTMF_EVENT_TYPE_START: gst_dtmf_prepare_timestamps (dtmfsrc); - /* Don't forget to get exclusive access to the stream */ - gst_dtmf_src_set_stream_lock (dtmfsrc, TRUE); - event->packet_count = 0; dtmfsrc->last_event = event; event = NULL; @@ -673,8 +654,6 @@ gst_dtmf_src_create (GstBaseSrc * basesrc, guint64 offset, "Received two consecutive DTMF start events"); break; case DTMF_EVENT_TYPE_STOP: - gst_dtmf_src_set_stream_lock (dtmfsrc, FALSE); - g_slice_free (GstDTMFSrcEvent, dtmfsrc->last_event); dtmfsrc->last_event = NULL; break; @@ -747,7 +726,6 @@ paused: if (dtmfsrc->last_event) { GST_DEBUG_OBJECT (dtmfsrc, "Stopping current event"); /* Don't forget to release the stream lock */ - gst_dtmf_src_set_stream_lock (dtmfsrc, FALSE); g_slice_free (GstDTMFSrcEvent, dtmfsrc->last_event); dtmfsrc->last_event = NULL; } diff --git a/gst/dtmf/gstrtpdtmfsrc.c b/gst/dtmf/gstrtpdtmfsrc.c index 30a9f5c..563585e 100644 --- a/gst/dtmf/gstrtpdtmfsrc.c +++ b/gst/dtmf/gstrtpdtmfsrc.c @@ -507,22 +507,6 @@ gst_rtp_dtmf_src_get_property (GObject * object, guint prop_id, GValue * value, } static void -gst_rtp_dtmf_src_set_stream_lock (GstRTPDTMFSrc * dtmfsrc, gboolean lock) -{ - GstEvent *event; - GstStructure *structure; - - structure = gst_structure_new ("stream-lock", - "lock", G_TYPE_BOOLEAN, lock, NULL); - - event = gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM_OOB, structure); - if (!gst_pad_push_event (GST_BASE_SRC_PAD (dtmfsrc), event)) { - GST_WARNING_OBJECT (dtmfsrc, "stream-lock event not handled"); - } - -} - -static void gst_rtp_dtmf_prepare_timestamps (GstRTPDTMFSrc * dtmfsrc) { GstClock *clock; @@ -688,9 +672,6 @@ gst_rtp_dtmf_src_create (GstBaseSrc * basesrc, guint64 offset, dtmfsrc->redundancy_count = dtmfsrc->packet_redundancy; gst_rtp_dtmf_prepare_timestamps (dtmfsrc); - /* Don't forget to get exclusive access to the stream */ - gst_rtp_dtmf_src_set_stream_lock (dtmfsrc, TRUE); - dtmfsrc->payload = event->payload; event->payload = NULL; break; @@ -804,9 +785,6 @@ send_last: /* This is the end of the event */ if (dtmfsrc->last_packet == TRUE && dtmfsrc->redundancy_count == 0) { - /* Don't forget to release the stream lock */ - gst_rtp_dtmf_src_set_stream_lock (dtmfsrc, FALSE); - g_slice_free (GstRTPDTMFPayload, dtmfsrc->payload); dtmfsrc->payload = NULL; -- 2.7.4