Commit 021d4f02 authored by Simon Morlat's avatar Simon Morlat

fix synchronous notifications API

parent 07d1b02e
......@@ -141,7 +141,6 @@ struct _MSFilter{
uint32_t last_tick;
MSFilterStats *stats;
bool_t seen;
bool_t synchronous_notifies;
};
......@@ -367,12 +366,6 @@ MS2_PUBLIC int ms_filter_call_method_noarg(MSFilter *f, unsigned int id);
*/
MS2_PUBLIC void ms_filter_set_notify_callback(MSFilter *f, MSFilterNotifyFunc fn, void *userdata);
/**
* Forces the filter to synchronously send notifications, that is
* the notify callback will be called from MSTicker thread instead of being
* run by a MSEventQueue.
*/
MS2_PUBLIC void ms_filter_enable_synchronous_notifcations(MSFilter *f, bool_t yesno);
/**
* Get MSFilterId's filter.
......@@ -559,6 +552,7 @@ void ms_filter_preprocess(MSFilter *f, struct _MSTicker *t);
void ms_filter_postprocess(MSFilter *f);
bool_t ms_filter_inputs_have_data(MSFilter *f);
void ms_filter_notify(MSFilter *f, unsigned int id, void *arg);
void ms_filter_notify_synchronous(MSFilter *f, unsigned int id, void *arg);
void ms_filter_notify_no_arg(MSFilter *f, unsigned int id);
#define ms_filter_lock(f) ms_mutex_lock(&(f)->lock)
#define ms_filter_unlock(f) ms_mutex_unlock(&(f)->lock)
......
......@@ -138,6 +138,12 @@ void ms_filter_notify(MSFilter *f, unsigned int id, void *arg){
}
}
void ms_filter_notify_synchronous(MSFilter *f, unsigned int id, void *arg){
if (f->notify){
f->notify(f->notify_ud,f,id,arg);
}
}
void ms_filter_notify_no_arg(MSFilter *f, unsigned int id){
ms_filter_notify(f,id,NULL);
}
......@@ -24,7 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "mediastreamer2/msextdisplay.h"
static void ext_display_init(MSFilter *f){
ms_filter_enable_synchronous_notifcations (f,TRUE);
}
static void ext_display_uninit(MSFilter *f){
......
......@@ -220,10 +220,6 @@ void ms_filter_set_notify_callback(MSFilter *f, MSFilterNotifyFunc fn, void *ud)
f->notify_ud=ud;
}
void ms_filter_enable_synchronous_notifcations(MSFilter *f, bool_t yesno){
f->synchronous_notifies=yesno;
}
void ms_filter_destroy(MSFilter *f){
if (f->desc->uninit!=NULL)
f->desc->uninit(f);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment