/** * fs_session_start_telephony_event: * @session: a #FsSession * @event: A #FsStreamDTMFEvent or another number defined at * http://www.iana.org/assignments/audio-telephone-event-registry * @volume: The volume in dBm0 without the negative sign. Should be between * 0 and 36. Higher values mean lower volume * @method: The method used to send the event * * This function will start sending a telephony event (such as a DTMF * tone) on the #FsSession. You have to call the function * fs_session_stop_telephony_event() to stop it. * This function will use any available method, if you want to use a specific * method only, use fs_session_start_telephony_event_full() * * Returns: %TRUE if sucessful, it can return %FALSE if the #FsStream * does not support this telephony event. */ gboolean fs_session_start_telephony_event (FsSession *session, guint8 event, guint8 volume, FsDTMFMethod method) { FsSessionClass *klass = FS_SESSION_GET_CLASS (session); if (klass->start_telephony_event) { return klass->start_telephony_event (session, event, volume, method); } else { GST_WARNING ("start_telephony_event not defined in class"); } return FALSE; }
/** * fs_session_start_telephony_event: * @session: a #FsSession * @event: A #FsStreamDTMFEvent or another number defined at * http://www.iana.org/assignments/audio-telephone-event-registry * @volume: The volume in dBm0 without the negative sign. Should be between * 0 and 36. Higher values mean lower volume * * This function will start sending a telephony event (such as a DTMF * tone) on the #FsSession. You have to call the function * fs_session_stop_telephony_event() to stop it. * * If this function returns %TRUE, a "farstream-telephony-event-started" will * always be emitted when the event is actually played out. * * Returns: %TRUE if sucessful, it can return %FALSE if the #FsStream * does not support this telephony event. */ gboolean fs_session_start_telephony_event (FsSession *session, guint8 event, guint8 volume) { FsSessionClass *klass; g_return_val_if_fail (session, FALSE); g_return_val_if_fail (FS_IS_SESSION (session), FALSE); klass = FS_SESSION_GET_CLASS (session); if (klass->start_telephony_event) { return klass->start_telephony_event (session, event, volume); } else { GST_WARNING ("start_telephony_event not defined in class"); } return FALSE; }