Skip to content

Commit

Permalink
[ffmpeg] add openh264 support (microsoft#17531)
Browse files Browse the repository at this point in the history
* [ffmpeg] add openh264 support

* [ffmpeg] bump port version

* [ffmpeg] x-add-version

Co-authored-by: Billy Robert ONeal III <[email protected]>
  • Loading branch information
mcmtroffaes and BillyONeal authored Apr 30, 2021
1 parent 8dad905 commit 63c7a82
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 3 deletions.
8 changes: 6 additions & 2 deletions ports/ffmpeg/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: ffmpeg
Version: 4.3.2
Port-Version: 6
Port-Version: 7
Homepage: https://ffmpeg.org
Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.
FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations.
Expand Down Expand Up @@ -55,7 +55,7 @@ Feature: version3
Description: Upgrade (L)GPL to version 3

Feature: all
Build-Depends: ffmpeg[bzip2,iconv,freetype,lzma,mp3lame,openjpeg,opus,snappy,soxr,speex,theora,vorbis,vpx,webp,zlib], ffmpeg[ass] (!(uwp | arm)), ffmpeg[dav1d] (!(uwp | arm | x86 | osx)), ffmpeg[fontconfig] (!(windows & static) & !(uwp | arm)), ffmpeg[fribidi] (!(uwp | arm)), ffmpeg[ilbc] (!(arm & uwp)), ffmpeg[modplug] (!(windows & static) & !uwp), ffmpeg[nvcodec] ((windows | linux) & !uwp & !arm), ffmpeg[opencl] (!uwp), ffmpeg[ssh] (!(uwp | arm) & !static), ffmpeg[opengl] (!uwp & !(windows & arm) & !osx), ffmpeg[sdl2] (!osx), ffmpeg[tensorflow] (!(x86 | arm | uwp) & !static), ffmpeg[tesseract] (!uwp & !(windows & arm) & !static), ffmpeg[wavpack] (!arm), ffmpeg[xml2] (!static)
Build-Depends: ffmpeg[bzip2,iconv,freetype,lzma,mp3lame,openh264,openjpeg,opus,snappy,soxr,speex,theora,vorbis,vpx,webp,zlib], ffmpeg[ass] (!(uwp | arm)), ffmpeg[dav1d] (!(uwp | arm | x86 | osx)), ffmpeg[fontconfig] (!(windows & static) & !(uwp | arm)), ffmpeg[fribidi] (!(uwp | arm)), ffmpeg[ilbc] (!(arm & uwp)), ffmpeg[modplug] (!(windows & static) & !uwp), ffmpeg[nvcodec] ((windows | linux) & !uwp & !arm), ffmpeg[opencl] (!uwp), ffmpeg[ssh] (!(uwp | arm) & !static), ffmpeg[opengl] (!uwp & !(windows & arm) & !osx), ffmpeg[sdl2] (!osx), ffmpeg[tensorflow] (!(x86 | arm | uwp) & !static), ffmpeg[tesseract] (!uwp & !(windows & arm) & !static), ffmpeg[wavpack] (!arm), ffmpeg[xml2] (!static)
Description: Build with all allowed dependencies selected that are compatible with the lgpl license

Feature: all-gpl
Expand Down Expand Up @@ -130,6 +130,10 @@ Feature: opengl
Build-Depends: opengl, opengl-registry
Description: OpenGL rendering

Feature: openh264
Build-Depends: openh264
Description: H.264 de/encoding via openh264

Feature: openjpeg
Build-Depends: openjpeg
Description: JPEG 2000 de/encoding via OpenJPEG
Expand Down
5 changes: 5 additions & 0 deletions ports/ffmpeg/FindFFMPEG.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ if(@ENABLE_OPENGL@)
list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS ${OPENGL_LIBRARIES})
endif()

if(@ENABLE_OPENH264@)
select_library_configurations_from_names(BASENAME openh264 NAMES openh264)
list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS ${openh264_LIBRARIES})
endif()

if(@ENABLE_OPENJPEG@)
find_dependency(OpenJPEG)
select_library_configurations_from_targets(BASENAME openjpeg TARGETS openjp2)
Expand Down
8 changes: 8 additions & 0 deletions ports/ffmpeg/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,14 @@ else()
set(OPTIONS "${OPTIONS} --disable-opengl")
endif()

set(ENABLE_OPENH264 OFF)
if("openh264" IN_LIST FEATURES)
set(OPTIONS "${OPTIONS} --enable-libopenh264")
set(ENABLE_OPENH264 ${STATIC_LINKAGE})
else()
set(OPTIONS "${OPTIONS} --disable-libopenh264")
endif()

set(ENABLE_OPENJPEG OFF)
if("openjpeg" IN_LIST FEATURES)
set(OPTIONS "${OPTIONS} --enable-libopenjpeg")
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1950,7 +1950,7 @@
},
"ffmpeg": {
"baseline": "4.3.2",
"port-version": 6
"port-version": 7
},
"ffnvcodec": {
"baseline": "10.0.26.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/f-/ffmpeg.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "bb3d01a7b00d6fe90592750d48e18049eb93215d",
"version-string": "4.3.2",
"port-version": 7
},
{
"git-tree": "a6d19d895b8c522d7d1179d93ae1e9386ac38ac2",
"version-string": "4.3.2",
Expand Down

0 comments on commit 63c7a82

Please sign in to comment.