mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-21 13:08:08 +00:00
Add initialization of mediastreamer plugins in the Python module.
This commit is contained in:
parent
86b74cc521
commit
36d535354f
1 changed files with 9 additions and 0 deletions
|
|
@ -247,6 +247,13 @@ static PyObject * pylinphone_Core_get_video_devices(PyObject *self, void *closur
|
|||
return _list;
|
||||
}
|
||||
|
||||
static void pylinphone_init_ms2_plugins(void) {
|
||||
ms_init(); // Initialize mediastreamer2 before loading the plugins
|
||||
#ifdef ENABLE_OPENH264
|
||||
libmsopenh264_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
static PyObject * pylinphone_Core_class_method_new(PyObject *cls, PyObject *args) {
|
||||
LinphoneCore * cresult;
|
||||
pylinphone_CoreObject *self;
|
||||
|
|
@ -275,6 +282,7 @@ static PyObject * pylinphone_Core_class_method_new(PyObject *cls, PyObject *args
|
|||
{{/core_events}}
|
||||
|
||||
pylinphone_trace(1, "[PYLINPHONE] >>> %s(%p, \"%s\", \"%s\")", __FUNCTION__, _vtable_dict, _config_path, _factory_config_path);
|
||||
pylinphone_init_ms2_plugins();
|
||||
cresult = linphone_core_new(&_vtable, _config_path, _factory_config_path, self);
|
||||
self->native_ptr = cresult;
|
||||
|
||||
|
|
@ -317,6 +325,7 @@ static PyObject * pylinphone_Core_class_method_new_with_config(PyObject *cls, Py
|
|||
{{/core_events}}
|
||||
|
||||
pylinphone_trace(1, "[PYLINPHONE] >>> %s(%p [%p])", __FUNCTION__, _config, _config_native_ptr);
|
||||
pylinphone_init_ms2_plugins();
|
||||
cresult = linphone_core_new_with_config(&_vtable, _config_native_ptr, self);
|
||||
self->native_ptr = cresult;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue