Merge pull request #50220 from pbogdan/ffmpeg-cleanup

ffmpeg: misc cleanups
This commit is contained in:
Silvan Mosberger 2019-01-27 19:00:12 +01:00 committed by GitHub
commit fede41404d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 49 additions and 93 deletions

View File

@ -1,6 +1,6 @@
{ fetchurl, stdenv, squashfsTools, xorg, alsaLib, makeWrapper, openssl, freetype
, glib, pango, cairo, atk, gdk_pixbuf, gtk2, cups, nspr, nss, libpng
, libgcrypt, systemd, fontconfig, dbus, expat, ffmpeg_0_10, curl, zlib, gnome3
, libgcrypt, systemd, fontconfig, dbus, expat, ffmpeg, curl, zlib, gnome3
, at-spi2-atk
}:
@ -26,7 +26,7 @@ let
curl
dbus
expat
ffmpeg_0_10
ffmpeg
fontconfig
freetype
gdk_pixbuf
@ -118,6 +118,9 @@ stdenv.mkDerivation {
ln -s ${nspr.out}/lib/libnspr4.so $libdir/libnspr4.so
ln -s ${nspr.out}/lib/libplc4.so $libdir/libplc4.so
ln -s ${ffmpeg.out}/lib/libavcodec.so.56 $libdir/libavcodec-ffmpeg.so.56
ln -s ${ffmpeg.out}/lib/libavformat.so.56 $libdir/libavformat-ffmpeg.so.56
rpath="$out/share/spotify:$libdir"
patchelf \

View File

@ -1,8 +0,0 @@
{ callPackage, ... } @ args:
callPackage ./generic.nix (args // rec {
version = "${branch}.16";
branch = "0.10";
sha256 = "1l9z5yfp1vq4z2y4mh91707dhcn41c3pd505i0gvdzcdsp5j6y77";
patches = [ ./vpxenc-0.10-libvpx-1.5.patch ];
})

View File

@ -1,8 +0,0 @@
{ callPackage, ... } @ args:
callPackage ./generic.nix (args // rec {
version = "${branch}.12";
branch = "1.2";
sha256 = "0za9w87rk4x6wkjc6iaxqx2ihlsgj181ilfgxfjc54mdgxfcjfli";
patches = [ ./vpxenc-1.2-libvpx-1.5.patch ];
})

View File

@ -1,30 +0,0 @@
{ fetchurl, stdenv, pkgconfig, gst-plugins-base, bzip2, yasm, orc
, useInternalFfmpeg ? false, ffmpeg ? null }:
stdenv.mkDerivation rec {
name = "gst-ffmpeg-0.10.13";
src = fetchurl {
urls = [
"https://gstreamer.freedesktop.org/src/gst-ffmpeg/${name}.tar.bz2"
"mirror://gentoo/distfiles/${name}.tar.bz2"
];
sha256 = "0qmvgwcfybci78sd73mhvm4bsb7l0xsk9yljrgik80g011ds1z3n";
};
# Upstream strongly recommends against using --with-system-ffmpeg,
# but we do it anyway because we're so hardcore (and we don't want
# multiple copies of ffmpeg).
configureFlags = stdenv.lib.optional (!useInternalFfmpeg) "--with-system-ffmpeg";
buildInputs =
[ pkgconfig bzip2 gst-plugins-base orc ]
++ (if useInternalFfmpeg then [ yasm ] else [ ffmpeg ]);
meta = {
homepage = https://gstreamer.freedesktop.org/releases/gst-ffmpeg;
description = "GStreamer's plug-in using FFmpeg";
license = stdenv.lib.licenses.gpl2Plus;
platforms = stdenv.lib.platforms.unix;
};
}

View File

@ -15,10 +15,13 @@ stdenv.mkDerivation rec {
cmakeFlags = [ "-DTAGLIB_MIN_VERSION=${(builtins.parseDrvName taglib.name).version}" ];
patches = [ (fetchpatch {
url = "https://bitbucket.org/acoustid/acoustid-fingerprinter/commits/632e87969c3a5562a5d4842b03613267ba6236b2/raw";
sha256 = "15hm9knrpqn3yqrwyjz4zh2aypwbcycd0c5svrsy1fb2h2rh05jk";
}) ];
patches = [
(fetchpatch {
url = "https://bitbucket.org/acoustid/acoustid-fingerprinter/commits/632e87969c3a5562a5d4842b03613267ba6236b2/raw";
sha256 = "15hm9knrpqn3yqrwyjz4zh2aypwbcycd0c5svrsy1fb2h2rh05jk";
})
./ffmpeg.patch
];
meta = with stdenv.lib; {
homepage = https://acoustid.org/fingerprinter;

View File

@ -0,0 +1,26 @@
diff --git a/decoder.h b/decoder.h
index 028f58f..4428ac1 100644
--- a/decoder.h
+++ b/decoder.h
@@ -39,6 +39,8 @@ extern "C" {
#define AV_SAMPLE_FMT_S16 SAMPLE_FMT_S16
#endif
+#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
+
class Decoder
{
public:
diff --git a/ffmpeg/audioconvert.h b/ffmpeg/audioconvert.h
index 2b28e2e..a699986 100644
--- a/ffmpeg/audioconvert.h
+++ b/ffmpeg/audioconvert.h
@@ -79,7 +79,7 @@ int avcodec_channel_layout_num_channels(int64_t channel_layout);
* @param fmt_name Format name, or NULL if unknown
* @return Channel layout mask
*/
-uint64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name);
+uint64_t avcodec_guess_channel_layout(int nb_channels, enum AVCodecID codec_id, const char *fmt_name);
struct AVAudioConvert;
typedef struct AVAudioConvert AVAudioConvert;

View File

@ -118,7 +118,6 @@ mapAliases ({
googleAuthenticator = google-authenticator; # added 2016-10-16
grantlee5 = libsForQt5.grantlee; # added 2015-12-19
gsettings_desktop_schemas = gsettings-desktop-schemas; # added 2018-02-25
gst_ffmpeg = gst-ffmpeg; # added 2017-02
gst_plugins_bad = gst-plugins-bad; # added 2017-02
gst_plugins_base = gst-plugins-base; # added 2017-02
gst_plugins_good = gst-plugins-good; # added 2017-02

View File

@ -458,7 +458,7 @@ in
acme-sh = callPackage ../tools/admin/acme.sh { };
acoustidFingerprinter = callPackage ../tools/audio/acoustid-fingerprinter {
ffmpeg = ffmpeg_1;
ffmpeg = ffmpeg_2;
};
acpica-tools = callPackage ../tools/system/acpica-tools { };
@ -1848,7 +1848,6 @@ in
cantata = libsForQt5.callPackage ../applications/audio/cantata {
inherit vlc;
ffmpeg = ffmpeg_2;
};
can-utils = callPackage ../os-specific/linux/can-utils { };
@ -1883,9 +1882,7 @@ in
certmgr = callPackage ../tools/security/certmgr { };
cfdg = callPackage ../tools/graphics/cfdg {
ffmpeg = ffmpeg_2;
};
cfdg = callPackage ../tools/graphics/cfdg { };
checkinstall = callPackage ../tools/package-management/checkinstall { };
@ -8085,9 +8082,7 @@ in
inherit (ocamlPackages) reason;
renpy = callPackage ../development/interpreters/renpy {
ffmpeg = ffmpeg_2;
};
renpy = callPackage ../development/interpreters/renpy { };
pixie = callPackage ../development/interpreters/pixie { };
dust = callPackage ../development/interpreters/pixie/dust.nix { };
@ -9721,12 +9716,6 @@ in
blas = if stdenv.isDarwin then blas else openblas;
};
ffmpeg_0_10 = callPackage ../development/libraries/ffmpeg/0.10.nix {
inherit (darwin.apple_sdk.frameworks) Cocoa;
};
ffmpeg_1_2 = callPackage ../development/libraries/ffmpeg/1.2.nix {
inherit (darwin.apple_sdk.frameworks) Cocoa;
};
ffmpeg_2_8 = callPackage ../development/libraries/ffmpeg/2.8.nix {
inherit (darwin.apple_sdk.frameworks) Cocoa;
};
@ -9738,8 +9727,6 @@ in
};
# Aliases
ffmpeg_0 = ffmpeg_0_10;
ffmpeg_1 = ffmpeg_1_2;
ffmpeg_2 = ffmpeg_2_8;
ffmpeg_3 = ffmpeg_3_4;
ffmpeg = ffmpeg_3;
@ -9762,15 +9749,11 @@ in
VideoDecodeAcceleration;
};
ffmpegthumbnailer = callPackage ../development/libraries/ffmpegthumbnailer {
ffmpeg = ffmpeg_2;
};
ffmpegthumbnailer = callPackage ../development/libraries/ffmpegthumbnailer { };
ffmpeg-sixel = callPackage ../development/libraries/ffmpeg-sixel { };
ffms = callPackage ../development/libraries/ffms {
ffmpeg = ffmpeg_2;
};
ffms = callPackage ../development/libraries/ffms { };
fftw = callPackage ../development/libraries/fftw { };
fftwSinglePrec = fftw.override { precision = "single"; };
@ -10100,10 +10083,6 @@ in
gst-plugins-ugly = callPackage ../development/libraries/gstreamer/legacy/gst-plugins-ugly {};
gst-ffmpeg = callPackage ../development/libraries/gstreamer/legacy/gst-ffmpeg {
ffmpeg = ffmpeg_0;
};
gst-python = callPackage ../development/libraries/gstreamer/legacy/gst-python {};
gstreamermm = callPackage ../development/libraries/gstreamer/legacy/gstreamermm { };
@ -11870,7 +11849,6 @@ in
openct = callPackage ../development/libraries/openct { };
opencv = callPackage ../development/libraries/opencv {
ffmpeg = ffmpeg_2;
inherit (darwin) cf-private;
inherit (darwin.apple_sdk.frameworks) Cocoa QTKit;
};
@ -13067,9 +13045,7 @@ in
xdo = callPackage ../tools/misc/xdo { };
xineLib = callPackage ../development/libraries/xine-lib {
ffmpeg = ffmpeg_2;
};
xineLib = callPackage ../development/libraries/xine-lib { };
xautolock = callPackage ../misc/screensavers/xautolock { };
@ -13626,7 +13602,7 @@ in
lighttpd = callPackage ../servers/http/lighttpd { };
livepeer = callPackage ../servers/livepeer { ffmpeg = ffmpeg_3; };
livepeer = callPackage ../servers/livepeer { };
lwan = callPackage ../servers/http/lwan { };
@ -16180,7 +16156,6 @@ in
avxsynth = callPackage ../applications/video/avxsynth {
libjpeg = libjpeg_original; # error: 'JCOPYRIGHT_SHORT' was not declared in this scope
ffmpeg = ffmpeg_2;
};
awesome-4-0 = callPackage ../applications/window-managers/awesome {
@ -16203,9 +16178,7 @@ in
bandwidth = callPackage ../tools/misc/bandwidth { };
baresip = callPackage ../applications/networking/instant-messengers/baresip {
ffmpeg = ffmpeg_1;
};
baresip = callPackage ../applications/networking/instant-messengers/baresip { };
barrier = callPackage ../applications/misc/barrier {};
@ -17327,7 +17300,7 @@ in
# This must go when weston v2 is released
freerdp_legacy = callPackage ../applications/networking/remote/freerdp/legacy.nix {
cmake = cmake_2_8;
ffmpeg = ffmpeg_1;
ffmpeg = ffmpeg_2;
};
fte = callPackage ../applications/editors/fte { };
@ -17543,7 +17516,6 @@ in
guvcview = callPackage ../os-specific/linux/guvcview {
pulseaudioSupport = config.pulseaudio or true;
ffmpeg = ffmpeg_2;
};
gxmessage = callPackage ../applications/misc/gxmessage { };
@ -18257,9 +18229,7 @@ in
wxGTK30 = wxGTK30.override { withWebKit = true ; };
};
moc = callPackage ../applications/audio/moc {
ffmpeg = ffmpeg_2;
};
moc = callPackage ../applications/audio/moc { };
mod-distortion = callPackage ../applications/audio/mod-distortion { };
@ -19440,6 +19410,7 @@ in
spotify = callPackage ../applications/audio/spotify {
libgcrypt = libgcrypt_1_5;
libpng = libpng12;
ffmpeg = ffmpeg_2;
curl = curl.override {
sslSupport = false; gnutlsSupport = true;
};