sending DTMF RFC 2833
Olivier Crête
olivier.crete at collabora.com
Mon Nov 23 12:47:53 PST 2015
Hi,
You don't need the queues, but this is indeed how it's meant to be
used.
To see the debug messages to see what happens, you can do:
GST_DEBUG=*dtmf*:9,*rtpmux*:9
Olivier
On Mon, 2015-11-23 at 08:24 -0800, symeon.mattes wrote:
> Hi,
>
> I found in gst-plugins-farsight
> <http://www.freedesktop.org/software/farstream/releases/obsolete/gst-
> plugins-farsight/> ;
> in ./tests/dtmfsend.c an example of how to send dtmf signals. The
> code is
> very similar to what I wrote before i.e.
>
> pipeline_sending=gst_pipeline_new("sending-data");
> dtmf = gst_element_factory_make("rtpdtmfsrc",NULL);
> udpsink = gst_element_factory_make("udpsink",NULL);
>
> g_object_set(G_OBJECT(udpsink),"port",remotePort.intValue,"host",remo
> teAddress.UTF8String,"bind-port",5004,NULL);
>
> gst_bin_add_many(GST_BIN(pipeline_sending), dtmf,udpsink,NULL);
> gst_element_link_many(dtmf,udpsink,NULL);
>
> GstStructure *structure = gst_structure_new("dtmf-event",
> "type",G_TYPE_INT,1,
> "number",G_TYPE_INT,4,
> "volume",G_TYPE_INT,25,
> "start",G_TYPE_BOOLEAN,TRUE,NULL);
> GstEvent *event =
> gst_event_new_custom(GST_EVENT_CUSTOM_UPSTREAM,structure);
> gst_element_send_event(pipeline_sending,event);
>
> I've tried also what olivier wrote i.e.
>
> pipeline_sending=gst_pipeline_new("sending-data");
> micinput = gst_element_factory_make("osxaudiosrc","snd-
> microphone");
> queue[0] = gst_element_factory_make ("queue", NULL);
> audioconvert = gst_element_factory_make("audioconvert",NULL);
> audioresample = gst_element_factory_make("audioresample",NULL);
> alawenc = gst_element_factory_make("alawenc","snd-encoder");
> rtppcmapay = gst_element_factory_make("rtppcmapay",NULL);
> queue[1] = gst_element_factory_make ("queue", NULL);
> dtmf_input=gst_element_factory_make("rtpdtmfsrc",NULL);
> rtpdtmfmux=gst_element_factory_make("rtpdtmfmux",NULL);
> udpsink = gst_element_factory_make("udpsink",NULL);
>
> g_object_set(G_OBJECT(udpsink),"port",remotePort.intValue,"host",remo
> teAddress.UTF8String,"bind-port",5004,NULL);
>
>
> gst_bin_add_many(GST_BIN(pipeline_sending),micinput,queue[0],audiocon
> vert,audioresample,alawenc,rtppcmapay,queue[1],udpsink,rtpdtmfmux,dtm
> f_input,NULL);
>
> gst_element_link_many(micinput,audioconvert,audioresample,alawenc,rtp
> pcmapay,queue[0],NULL);
> gst_element_link_many(rtpdtmfmux,udpsink,NULL);
> gst_element_link_many(dtmf_input,queue[1],NULL);
>
>
> gst_element_link_pads(queue[0],"src",rtpdtmfmux,"sink_0");
> gst_element_link_pads(queue[1],"src",rtpdtmfmux,"priority_sink_0"
> );
>
> And then I sent an event:
> GST_DEBUG_OBJECT (pipeline_sending, "sending dtmf event..");
> GstStructure *structure = gst_structure_new("dtmf-event",
> "type",G_TYPE_INT,1,
> //1
> corresponds to gst rtp dtmf type event
> "number",G_TYPE_INT,(
> gint)
> dtmfNumber,
> "volume",G_TYPE_INT,(
> gint)
> 10,
>
> "start",G_TYPE_BOOLEAN,(gboolean) TRUE,NULL);
> GstEvent *event =
> gst_event_new_custom(GST_EVENT_CUSTOM_UPSTREAM,structure);
> if (gst_element_send_event(pipeline_sending,event))
> GST_DEBUG_OBJECT (pipeline_sending, "The event has been
> handled..");
> else
> GST_ERROR_OBJECT (pipeline_sending, "The event was not
> handled.");
>
>
> The gst_element_send_event seems to return true, which means that the
> event
> has been handled. However I cannot see any dtmf rtpevent in my
> network
> traces (I'm using wireshark). Is there any way I could debug it
> further? I'm
> not so sure if rtpdtmfsrc or udpsrc has any issue.
>
>
> Thanks in advance
>
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble
> .com/sending-DTMF-RFC-2833-tp4674573p4674609.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
--
Olivier Crête
olivier.crete at collabora.com
More information about the gstreamer-devel
mailing list