Commit a82861ea authored by François Grisez's avatar François Grisez
Browse files

Prevents VideoToolbox filter from being registerd on iOS simulators

parent 237432b5
...@@ -832,6 +832,10 @@ MSFilterDesc ms_vt_h264_dec = { ...@@ -832,6 +832,10 @@ MSFilterDesc ms_vt_h264_dec = {
}; };
void _register_videotoolbox_if_supported(MSFactory *factory) { void _register_videotoolbox_if_supported(MSFactory *factory) {
#if TARGET_OS_SIMULATOR
ms_warning("VideoToolbox H264 codec is not supported on simulators");
#else
#ifdef __ios #ifdef __ios
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0) { if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0) {
#else #else
...@@ -841,9 +845,11 @@ void _register_videotoolbox_if_supported(MSFactory *factory) { ...@@ -841,9 +845,11 @@ void _register_videotoolbox_if_supported(MSFactory *factory) {
ms_factory_register_filter(factory, &ms_vt_h264_enc); ms_factory_register_filter(factory, &ms_vt_h264_enc);
ms_factory_register_filter(factory, &ms_vt_h264_dec); ms_factory_register_filter(factory, &ms_vt_h264_dec);
} else { } else {
ms_warning("Cannot register VideoToolbox H264 codec. That" ms_warning("Cannot register VideoToolbox H264 codec. That "
" requires iOS 8 or MacOSX 10.8"); "requires iOS 8 or MacOSX 10.8");
} }
#endif
} }
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