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

Do not build videotoolbox-h265-utilities.cpp for 32-bit systems.

parent 47c47b16
......@@ -373,9 +373,11 @@ if(ENABLE_VIDEO)
voip/h26x/videotoolbox-decoder.cpp
voip/h26x/videotoolbox-encoder.cpp
voip/h26x/videotoolbox-h264-utilities.cpp
voip/h26x/videotoolbox-h265-utilities.cpp
voip/h26x/videotoolbox-utils.cpp
)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
list(APPEND VOIP_SOURCE_FILES_CXX voip/h26x/videotoolbox-h265-utilities.cpp)
endif()
endif()
if(ANDROID)
list(APPEND VOIP_SOURCE_FILES_C
......@@ -542,10 +544,13 @@ bc_apply_compile_flags(VOIP_SOURCE_FILES_OBJC STRICT_OPTIONS_CPP STRICT_OPTIONS_
if(VOIP_SOURCE_FILES_CXX)
set_source_files_properties(${VOIP_SOURCE_FILES_CXX} PROPERTIES LANGUAGE CXX)
bc_apply_compile_flags(VOIP_SOURCE_FILES_CXX STRICT_OPTIONS_CPP STRICT_OPTIONS_CXX)
if(IOS)
if(IOS AND (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64"))
set_source_files_properties(voip/h26x/videotoolbox-h265-utilities.cpp
PROPERTIES COMPILE_FLAGS "-miphoneos-version-min=11.0"
)
set_source_files_properties(voip/h26x/videotoolbox-utils.cpp
PROPERTIES COMPILE_DEFINITIONS "H265_SUPPORTED"
)
endif()
endif()
......
......@@ -21,7 +21,9 @@
#include <unordered_map>
#include "videotoolbox-h264-utilities.h"
#ifdef H265_SUPPORTED
#include "videotoolbox-h265-utilities.h"
#endif
#include "videotoolbox-utils.h"
......@@ -118,9 +120,13 @@ CMFormatDescriptionRef VideoToolboxUtilities::createFormatDescription(const H26x
VideoToolboxUtilities *VideoToolboxUtilities::create(const std::string &mime) {
if (mime == "video/avc") {
return new VideoToolboxH264Utilities();
} else if (mime == "video/hevc") {
}
#ifdef H265_SUPPORTED
else if (mime == "video/hevc") {
return new VideoToolboxH265Utilities();
} else {
}
#endif
else {
throw invalid_argument(mime + " not supported");
}
}
......
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