Skip to content

Commit 702b0b7

Browse files
committed
ffmpeg: added openvino support
1 parent 00ce907 commit 702b0b7

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

recipes/ffmpeg/all/conanfile.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class FFMpegConan(ConanFile):
4848
"with_freetype": [True, False],
4949
"with_openjpeg": [True, False],
5050
"with_openh264": [True, False],
51+
"with_openvino": [True, False],
5152
"with_opus": [True, False],
5253
"with_vorbis": [True, False],
5354
"with_zeromq": [True, False],
@@ -125,6 +126,7 @@ class FFMpegConan(ConanFile):
125126
"with_freetype": True,
126127
"with_openjpeg": True,
127128
"with_openh264": True,
129+
"with_openvino": True,
128130
"with_opus": True,
129131
"with_vorbis": True,
130132
"with_zeromq": False,
@@ -202,6 +204,7 @@ def _dependencies(self):
202204
"with_libiconv": ["avcodec"],
203205
"with_openjpeg": ["avcodec"],
204206
"with_openh264": ["avcodec"],
207+
"with_openvino": ["avfilter"],
205208
"with_vorbis": ["avcodec"],
206209
"with_opus": ["avcodec"],
207210
"with_libx264": ["avcodec"],
@@ -222,6 +225,10 @@ def _dependencies(self):
222225
def _version_supports_vulkan(self):
223226
return Version(self.version) >= "4.3.0"
224227

228+
@property
229+
def _version_supports_openvino(self):
230+
return Version(self.version) >= "6.1.0"
231+
225232
def export_sources(self):
226233
export_conandata_patches(self)
227234

@@ -245,10 +252,14 @@ def config_options(self):
245252
del self.options.with_avfoundation
246253
if not self._version_supports_vulkan:
247254
self.options.rm_safe("with_vulkan")
255+
if not self._version_supports_openvino:
256+
del self.options.with_openvino
248257

249258
def configure(self):
250259
if self.options.shared:
251260
self.options.rm_safe("fPIC")
261+
if not self.options.avfilter:
262+
self.options.rm_safe("with_openvino")
252263
self.settings.rm_safe("compiler.cppstd")
253264
self.settings.rm_safe("compiler.libcxx")
254265

@@ -270,6 +281,8 @@ def requirements(self):
270281
self.requires("openjpeg/2.5.0")
271282
if self.options.with_openh264:
272283
self.requires("openh264/2.3.1")
284+
if self.options.get_safe("with_openvino"):
285+
self.requires("openvino/2023.2.0")
273286
if self.options.with_vorbis:
274287
self.requires("vorbis/1.3.7")
275288
if self.options.with_opus:
@@ -493,6 +506,9 @@ def opt_append_disable_if_set(args, what, v):
493506
"gpl", self.options.with_libx264 or self.options.with_libx265 or self.options.postproc)
494507
]
495508

509+
if self._version_supports_openvino:
510+
args.append(opt_enable_disable("libopenvino", self.options.get_safe("with_openvino")))
511+
496512
# Individual Component Options
497513
opt_append_disable_if_set(args, "everything", self.options.disable_everything)
498514
opt_append_disable_if_set(args, "encoders", self.options.disable_all_encoders)
@@ -970,6 +986,8 @@ def package_info(self):
970986
"CoreImage")
971987
if Version(self.version) >= "5.0" and is_apple_os(self):
972988
self.cpp_info.components["avfilter"].frameworks.append("Metal")
989+
if self.options.get_safe("with_openvino"):
990+
self.cpp_info.components["avfilter"].requires.append("openvino::Runtime_C")
973991

974992
if self.options.get_safe("with_vaapi"):
975993
self.cpp_info.components["avutil"].requires.extend(

0 commit comments

Comments
 (0)