Commit 73bd2518 authored by François Grisez's avatar François Grisez

Do not register VideoToolbox filters on platforms which do not support it

parent 162ce6d7
......@@ -783,5 +783,11 @@ MSFilterDesc ms_vt_h264_dec = {
.methods = h264_dec_methods
};
MS_FILTER_DESC_EXPORT(ms_vt_h264_dec)
void _register_videotoolbox_if_supported(MSFactory *factory) {
if (VTCompressionSessionCreate != NULL) {
ms_factory_register_filter(factory, &ms_vt_h264_enc);
ms_factory_register_filter(factory, &ms_vt_h264_dec);
}
}
......@@ -46,6 +46,9 @@ extern bool_t libmsandroiddisplay_init(MSFactory *factory);
extern void libmsandroiddisplaybad_init(MSFactory *factory);
extern void libmsandroidopengldisplay_init(MSFactory *factory);
#if defined(__APPLE__) && defined(HAVE_VIDEO)
extern void _register_videotoolbox_if_supported(MSFactory *factory);
#endif
#include "voipdescs.h"
#include "mediastreamer2/mssndcard.h"
......@@ -264,6 +267,10 @@ void ms_factory_init_voip(MSFactory *obj){
ms_factory_register_filter(obj,ms_voip_filter_descs[i]);
}
#if defined(__APPLE__) && defined(HAVE_VIDEO)
_register_videotoolbox_if_supported(obj);
#endif
cm=ms_snd_card_manager_new();
ms_message("Registering all soundcard handlers");
cm->factory=obj;
......
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