[Pidgin] #12617: Patch to add out-of-band DTMF support

Pidgin trac at pidgin.im
Fri Oct 11 12:37:51 EDT 2013


#12617: Patch to add out-of-band DTMF support
-----------------------------------------+-------------------------
 Reporter:  BigBrownChunx                |       Owner:  darkrain42
     Type:  patch                        |      Status:  new
Milestone:  Patches Needing Improvement  |   Component:  libpurple
  Version:  2.7.3                        |  Resolution:
 Keywords:  dtmf media                   |
-----------------------------------------+-------------------------

Comment (by dwmw2):

 I also wondered if we should have separate calls for start/stop instead of
 just a duration. The original UI patch from Jan-Michael Brummer did that,
 with functions for press/release of the buttons which would start/stop the
 DTMF directly:
 {{{
 +phone_dtmf_pressed_cb(GtkButton *button, gpointer user_data)
 +{
 +       PurpleMediaManager *manager = purple_media_manager_get();
 +       GstElement *pipeline;
 +
 +       pipeline = purple_media_manager_get_pipeline(manager);
 +
 +       if (pipeline) {
 +               GstStructure *structure;
 +               GstEvent *event;
 +               gint num = GPOINTER_TO_INT(user_data);
 +
 +               structure = gst_structure_new("dtmf-event",
 +                                               "type", G_TYPE_INT, 1,
 +                                               "number", G_TYPE_INT, num,
 +                                               "volume", G_TYPE_INT, 25,
 +                                               "start", G_TYPE_BOOLEAN,
 TRUE, NULL);
 +
 +               event = gst_event_new_custom(GST_EVENT_CUSTOM_UPSTREAM,
 structure);
 +               gst_element_send_event(pipeline, event);
 +       }
 +}
 }}}

-- 
Ticket URL: <https://developer.pidgin.im/ticket/12617#comment:16>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list