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

Fixes for FFmpeg 7, round 1 #340640

Merged
merged 3 commits into from
Sep 16, 2024
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch2
, pkg-config
, cmake
, ninja
Expand Down Expand Up @@ -42,6 +43,18 @@ stdenv.mkDerivation {
fetchSubmodules = true;
};

patches = [
# Remove usage of AVCodecContext::reordered_opaque
(fetchpatch2 {
name = "webrtc-ffmpeg-7.patch";
url = "https://webrtc.googlesource.com/src/+/e7d10047096880feb5e9846375f2da54aef91202%5E%21/?format=TEXT";
decode = "base64 -d";
stripLen = 1;
extraPrefix = "src/";
hash = "sha256-EdwHeVko8uDsP5GTw2ryWiQgRVCAdPc1me6hySdiwMU=";
})
];

postPatch = lib.optionalString stdenv.isLinux ''
substituteInPlace src/modules/desktop_capture/linux/wayland/egl_dmabuf.cc \
--replace '"libEGL.so.1"' '"${libGL}/lib/libEGL.so.1"' \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch2,
pkg-config,
cmake,
crc32c,
Expand Down Expand Up @@ -41,6 +42,18 @@ stdenv.mkDerivation {
fetchSubmodules = true;
};

patches = [
# Remove usage of AVCodecContext::reordered_opaque
(fetchpatch2 {
name = "webrtc-ffmpeg-7.patch";
url = "https://webrtc.googlesource.com/src/+/e7d10047096880feb5e9846375f2da54aef91202%5E%21/?format=TEXT";
decode = "base64 -d";
stripLen = 1;
extraPrefix = "src/";
hash = "sha256-EdwHeVko8uDsP5GTw2ryWiQgRVCAdPc1me6hySdiwMU=";
})
];

outputs = [
"out"
"dev"
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9372,7 +9372,7 @@ with pkgs;
lesspipe = callPackage ../tools/misc/lesspipe { };

liquidsoap = callPackage ../tools/audio/liquidsoap/full.nix {
ffmpeg = ffmpeg-full;
ffmpeg = ffmpeg_6-full;
ocamlPackages = ocaml-ng.ocamlPackages_4_14;
};

Expand Down
14 changes: 7 additions & 7 deletions pkgs/top-level/ocaml-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -510,31 +510,31 @@ let

ffmpeg = callPackage ../development/ocaml-modules/ffmpeg { };
ffmpeg-av = callPackage ../development/ocaml-modules/ffmpeg/ffmpeg-av.nix {
inherit (pkgs) ffmpeg;
ffmpeg = pkgs.ffmpeg_6;
inherit (pkgs.darwin.apple_sdk.frameworks) AudioToolbox VideoToolbox;
};
ffmpeg-avcodec = callPackage ../development/ocaml-modules/ffmpeg/ffmpeg-avcodec.nix {
inherit (pkgs) ffmpeg;
ffmpeg = pkgs.ffmpeg_6;
inherit (pkgs.darwin.apple_sdk.frameworks) AudioToolbox VideoToolbox;
};
ffmpeg-avdevice = callPackage ../development/ocaml-modules/ffmpeg/ffmpeg-avdevice.nix {
inherit (pkgs) ffmpeg;
ffmpeg = pkgs.ffmpeg_6;
inherit (pkgs.darwin.apple_sdk.frameworks) AppKit AudioToolbox AVFoundation Cocoa CoreImage ForceFeedback OpenGL VideoToolbox;
};
ffmpeg-avfilter = callPackage ../development/ocaml-modules/ffmpeg/ffmpeg-avfilter.nix {
inherit (pkgs) ffmpeg;
ffmpeg = pkgs.ffmpeg_6;
inherit (pkgs.darwin.apple_sdk.frameworks) AppKit CoreImage OpenGL VideoToolbox;
};
ffmpeg-avutil = callPackage ../development/ocaml-modules/ffmpeg/ffmpeg-avutil.nix {
inherit (pkgs) ffmpeg;
ffmpeg = pkgs.ffmpeg_6;
inherit (pkgs.darwin.apple_sdk.frameworks) AudioToolbox VideoToolbox;
};
ffmpeg-swresample = callPackage ../development/ocaml-modules/ffmpeg/ffmpeg-swresample.nix {
inherit (pkgs) ffmpeg;
ffmpeg = pkgs.ffmpeg_6;
inherit (pkgs.darwin.apple_sdk.frameworks) VideoToolbox;
};
ffmpeg-swscale = callPackage ../development/ocaml-modules/ffmpeg/ffmpeg-swscale.nix {
inherit (pkgs) ffmpeg;
ffmpeg = pkgs.ffmpeg_6;
inherit (pkgs.darwin.apple_sdk.frameworks) VideoToolbox;
};

Expand Down