Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle Secure Reliable Transport protocol #137

Merged
merged 1 commit into from
Jan 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/build-ffmpeg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ jobs:
- name: Set deployment target
if: matrix.os == 'macos-13' || matrix.os == 'macos-14'
run: echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV
- name: Install packages
- name: Install packages for macOS
if: matrix.os == 'macos-13' || matrix.os == 'macos-14'
run: |
brew update
brew unlink gettext libidn2 libpng libtiff libunistring libx11 libxau libxcb libxdmcp little-cms2 unbound
- uses: msys2/setup-msys2@v2
if: matrix.os == 'windows-latest'
with:
install: base-devel mingw-w64-x86_64-gcc mingw-w64-x86_64-gperf mingw-w64-x86_64-nasm
install: base-devel mingw-w64-x86_64-gcc mingw-w64-x86_64-gperf mingw-w64-x86_64-nasm openssl-devel
path-type: inherit
release: false
- name: Build FFmpeg
Expand Down Expand Up @@ -131,7 +131,9 @@ jobs:
- name: Build FFmpeg
env:
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BEFORE_ALL_LINUX: cp -ar vendor /tmp
CIBW_BEFORE_ALL_LINUX: |
yum install -y openssl-devel
cp -ar vendor /tmp
CIBW_BEFORE_BUILD: python scripts/build-ffmpeg.py /tmp/vendor --enable-gpl --stage ${{ env.stage }}
CIBW_BUILD: cp39-*
CIBW_REPAIR_WHEEL_COMMAND_LINUX: LD_LIBRARY_PATH=/tmp/vendor/lib:$LD_LIBRARY_PATH auditwheel repair -w {dest_dir} {wheel}
Expand Down
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Currently FFmpeg 7.1 is built with the following packages enabled for all platfo
- opus 1.4
- speex 1.2.1
- svt-av1 2.2.1
- srt 1.5.4 (encryption disabled on macOS)
- twolame 0.4.0
- vorbis 1.3.7
- vpx 1.14.0
Expand Down
11 changes: 11 additions & 0 deletions scripts/build-ffmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from cibuildpkg import Builder, Package, fetch, get_platform, log_group, run


plat = platform.system()

library_group = [
Expand Down Expand Up @@ -177,6 +178,15 @@
source_dir="source",
gpl=True,
),
Package(
name="srt",
source_url="https://github.com/Haivision/srt/archive/refs/tags/v1.5.4.tar.gz",
build_system="cmake",
build_arguments =
[r"-DOPENSSL_ROOT_DIR=C:\Program Files\OpenSSL"] if plat == "Windows"
else ["-DENABLE_ENCRYPTION=OFF"] if plat == "Darwin"
else [""]
),
]

openh264 = Package(
Expand Down Expand Up @@ -329,6 +339,7 @@ def main():
"--enable-libopus",
"--enable-libspeex",
"--enable-libsvtav1",
"--enable-libsrt",
"--enable-libtwolame",
"--enable-libvorbis",
"--enable-libvpx",
Expand Down
12 changes: 11 additions & 1 deletion scripts/cibuildpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,14 @@ def _build_with_autoconf(self, package: Package, for_builder: bool) -> None:

if package.name == "ffmpeg" and platform.system() == "Windows":
correct_configure(os.path.join(package_source_path, "configure"))

prepend_env(env, "LDFLAGS", "-LC:/PROGRA~1/OpenSSL/lib")
prepend_env(
env,
"PKG_CONFIG_PATH",
"/c/msys64/usr/lib/pkgconfig",
separator=":",
)

# build package
os.makedirs(package_build_path, exist_ok=True)
with chdir(package_build_path):
Expand Down Expand Up @@ -274,6 +281,9 @@ def _build_with_cmake(self, package: Package, for_builder: bool) -> None:
if platform.system() == "Darwin":
cmake_args.append("-DCMAKE_INSTALL_NAME_DIR=" + os.path.join(prefix, "lib"))

if package.name == "srt" and platform.system() == "Linux":
run(["yum", "-y", "install", "openssl-devel"])

# build package
os.makedirs(package_build_path, exist_ok=True)
with chdir(package_build_path):
Expand Down
Loading