Skip to content

Commit a3cd61c

Browse files
Replaced conanfile.txt with cconanfile.py
1 parent fa0758e commit a3cd61c

File tree

4 files changed

+95
-68
lines changed

4 files changed

+95
-68
lines changed

ci/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ jobs:
168168
169169
- task: PublishTestResults@2
170170
displayName: 'Publish Unit Tests Results'
171-
continueOnError: True
172171
inputs:
173172
testResultsFormat: 'JUnit'
174173
testResultsFiles: 'results/unit_tests/unit_tests.xml'

scripts/conan/setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def conan_profile_create(profile_name, args):
3939
if args.compiler == 'clang':
4040
cc_compiler = ''
4141
cxx_compiler = ''
42-
42+
4343
if platform.system() == 'Linux':
4444
cc_compiler = f'clang-{args.compiler_version}'
4545
cxx_compiler = f'clang++-{args.compiler_version}'
@@ -104,9 +104,10 @@ def get_conanfile_directories(args):
104104
current_working_directory = pathlib.Path().resolve()
105105
conanfile_directories = []
106106
if not args.directories:
107-
conanfile_directories_include = set(current_working_directory.glob('**/conanfile.txt'))
107+
conanfile_directories_include = set(current_working_directory.glob('**/conanfile.*'))
108108
conanfile_directories_exclude = set(current_working_directory.glob('**/.conan/**/conanfile.*'))
109-
conanfile_directories = conanfile_directories_include - conanfile_directories_exclude
109+
conanfile_root = set(current_working_directory.glob('conanfile.py'))
110+
conanfile_directories = conanfile_directories_include - conanfile_directories_exclude - conanfile_root
110111
else:
111112
conanfile_directories = args.directories
112113

video_io/conanfile.py

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
#!/usr/bin/env python
2+
# Copyright 2024 TeiaCare
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
from conans import ConanFile
17+
18+
class FFMPEG(ConanFile):
19+
requires = "ffmpeg/6.1.1"
20+
generators = "CMakeDeps"
21+
settings = "os", "compiler", "build_type", "arch"
22+
options = {"shared": [True, False], "fPIC": [True, False]}
23+
default_options = {"shared": False, "fPIC": True}
24+
25+
def config_options(self):
26+
if self.settings.os == "Windows":
27+
del self.options.fPIC
28+
29+
def configure(self):
30+
if self.options.shared:
31+
del self.options.fPIC
32+
33+
self.options["ffmpeg"].disable_all_encoders=True
34+
self.options["ffmpeg"].enable_encoders='libx264'
35+
36+
self.options["ffmpeg"].disable_all_decoders=True
37+
self.options["ffmpeg"].enable_decoders='h264,hevc,mpegvideo,mpeg1video,mpeg2video,mpeg4,mjpeg'
38+
39+
self.options["ffmpeg"].disable_all_muxers=True
40+
self.options["ffmpeg"].enable_muxers='rtp,rtsp,mov,h264,hevc,matroska,mp4'
41+
42+
self.options["ffmpeg"].disable_all_demuxers=True
43+
self.options["ffmpeg"].enable_demuxers='rtp,rtsp,h264,hevc,mov,matroska,mjpeg,mpeg,mpegvideo'
44+
45+
self.options["ffmpeg"].disable_all_protocols=True
46+
self.options["ffmpeg"].enable_protocols='rtp,srtp,udp,tcp,file,async'
47+
48+
self.options["ffmpeg"].disable_all_parsers=True
49+
self.options["ffmpeg"].disable_all_hardware_accelerators=True
50+
self.options["ffmpeg"].disable_all_bitstream_filters=True
51+
self.options["ffmpeg"].disable_all_devices=True
52+
self.options["ffmpeg"].disable_all_filters=True
53+
54+
self.options["ffmpeg"].avformat=True
55+
self.options["ffmpeg"].avcodec=True
56+
self.options["ffmpeg"].swscale=True
57+
self.options["ffmpeg"].avdevice=False
58+
self.options["ffmpeg"].avfilter=False
59+
self.options["ffmpeg"].swresample=False
60+
61+
self.options["ffmpeg"].with_asm=True
62+
self.options["ffmpeg"].with_zlib=True
63+
self.options["ffmpeg"].with_bzip2=True
64+
self.options["ffmpeg"].with_lzma=False
65+
self.options["ffmpeg"].with_libiconv=False
66+
self.options["ffmpeg"].with_freetype=False
67+
self.options["ffmpeg"].with_openjpeg=False
68+
self.options["ffmpeg"].with_openh264=True
69+
self.options["ffmpeg"].with_opus=False
70+
self.options["ffmpeg"].with_vorbis=False
71+
self.options["ffmpeg"].with_zeromq=False
72+
self.options["ffmpeg"].with_sdl=False
73+
self.options["ffmpeg"].with_libx264=True
74+
self.options["ffmpeg"].with_libx265=True
75+
self.options["ffmpeg"].with_libvpx=False
76+
self.options["ffmpeg"].with_libmp3lame=False
77+
self.options["ffmpeg"].with_libfdk_aac=False
78+
self.options["ffmpeg"].with_libwebp=False
79+
self.options["ffmpeg"].with_ssl='openssl'
80+
self.options["ffmpeg"].with_xcb=False
81+
self.options["ffmpeg"].with_programs=True
82+
self.options["ffmpeg"].with_libsvtav1=False
83+
self.options["ffmpeg"].with_libaom=False
84+
self.options["ffmpeg"].with_libdav1d=False
85+
86+
if self.settings.os == "Linux":
87+
self.options["ffmpeg"].with_libalsa=False
88+
self.options["ffmpeg"].with_pulse=False
89+
self.options["ffmpeg"].with_vaapi=False
90+
self.options["ffmpeg"].with_vdpau=False
91+
self.options["ffmpeg"].with_vulkan=False

video_io/conanfile.txt

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)