Skip to content

Commit 81a748e

Browse files
committed
ffmpeg-ma: Add --with-iec61883 option on Linux
libiec61883 is not available through Homebrew. Therefore, the library and its development package should be installed on the target system using the native package manager. Signed-off-by: Maxime Gervais <[email protected]>
1 parent 4e5388b commit 81a748e

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

ffmpeg-ma.rb

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class FfmpegMa < Formula
1010
regex(/href=.*?ffmpeg[._-]v?(\d+(?:\.\d+)+)\.t/i)
1111
end
1212

13+
option "with-iec61883", "Enable DV device (Linux)" if OS.linux?
14+
1315
depends_on "pkgconf" => :build
1416
depends_on "freetype"
1517
depends_on "harfbuzz"
@@ -68,8 +70,6 @@ def install
6870
--disable-shared
6971
--enable-static
7072
--enable-pthreads
71-
--enable-videotoolbox
72-
--enable-audiotoolbox
7373
--enable-libfreetype
7474
--enable-libharfbuzz
7575
--enable-libopenh264
@@ -79,13 +79,18 @@ def install
7979
--enable-zlib
8080
--enable-sdl2
8181
--enable-ffplay
82-
--extra-cflags=-IDeckLinkSDK/Mac/include
8382
]
8483

8584
args << "--enable-neon" if Hardware::CPU.arm?
85+
args << "--enable-videotoolbox" if OS.mac?
86+
args << "--enable-audiotoolbox" if OS.mac?
87+
args << "--extra-cflags=-IDeckLinkSDK/Mac/include" if OS.mac?
88+
args << "--extra-cflags=-IDeckLinkSDK/Linux/include" if OS.linux?
89+
args << "--enable-libiec61883" if (build.with? "iec61883") && OS.linux?
8690

8791
system "./configure", *args
88-
rm "version" # Remove this file, CFLAGS contains -I. and its confused with the C++ <version> standard header
92+
# Remove this file, CFLAGS contains -I. and its confused with the C++ <version> standard header
93+
rm "version" if File.file?("version")
8994
system "make"
9095

9196
bin.install buildpath.children.select { |f| f.file? && f.executable? && f.basename.to_s.end_with?("-ma") }
@@ -94,7 +99,7 @@ def install
9499
test do
95100
# Create an example mp4 file
96101
mp4out = testpath/"video.mp4"
97-
system bin/"ffmpeg", "-filter_complex", "testsrc=rate=1:duration=1", mp4out
102+
system bin/"ffmpeg-ma", "-filter_complex", "testsrc=rate=1:duration=1", mp4out
98103
assert_path_exists mp4out
99104
end
100105
end

0 commit comments

Comments
 (0)