linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] Feature request & Patch - Get a callback when audi


From: Tony Bussieres
Subject: [Linphone-developers] Feature request & Patch - Get a callback when audio file is done
Date: Sat, 26 Oct 2013 23:23:20 -0400

I wanted a simple solution for automatically call a number, play a wav then hangup.

I'm completely new to linphone.

I started to make a little perl wrapper over linphonec. It was working, but to make it better I wanted libphonec to notify me back when the wav file was all streamed to the client.

Looking around the C source code  and found a way to be callbacked by using ms_filter_set_notify_callback

I've made a patch that exposes a new public  function in linphonecore.h.

void linphone_core_set_play_file_with_cb(LinphoneCore *lc, const char *file, MSFilterNotifyFunc cb);

the original linphone_core_set_play_file calls  linphone_core_set_play_file_with_cb with NULL for cb
so that all existing program will work as expected.

The new API user could register a callback with linphone_core_set_play_file_with_cb and 
the callback will be triggered when the streaming of the file is completed.

I've also moved 2 variables declarations that were causing problem because they were unused when I compiled with --disable-video

Here's the patch that does that. 

Regards,

-tony





Attachment: 0001-Added-a-public-call-linphone_core_set_play_file_with.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]