Skip to content
Snippets Groups Projects
Commit 374abb93 authored by Aline Gondim Santos's avatar Aline Gondim Santos Committed by Adrien Béraud
Browse files

misc: bump ffmpeg

Change-Id: I9a72b2693e3fc41a3b41f01eb1f13f535ec86508
parent cd2a2810
No related branches found
No related tags found
No related merge requests found
0c184e960a234cd08cbc3539885d00e83b17b28b2b49c1c55b8dc0f6d22f88183a48900285ac01e63a051bd12b003dd131f171f669b2051abeba8a3c3411975d ffmpeg-n4.4.2.tar.gz 3ea683f3a3cb9cd3f27c953655240ae3b5981e2103876a1c9d66fcdce02d4e0c9205aed78829de0c5577fd6414f32a662b472b329cb516fc5212381c71a9bd74 ffmpeg-n5.0.tar.gz
From b5afccbddc5877cc383b5b000d83071c3afb3318 Mon Sep 17 00:00:00 2001 From 81b86c3688049ca15352ba4ee66a5989928b8861 Mon Sep 17 00:00:00 2001
From: kkostiuk <kateryna.kostiuk@savoirfairelinux.com> From: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
Date: Tue, 27 Apr 2021 15:11:31 -0400 Date: Tue, 19 Jul 2022 13:18:20 -0300
Subject: [PATCH] changes Subject: [PATCH] ios disable b frames
--- ---
libavcodec/videotoolboxenc.c | 19 +++++++++++++++++-- libavcodec/videotoolboxenc.c | 14 ++++++++++++++
1 file changed, 17 insertions(+), 2 deletions(-) 1 file changed, 14 insertions(+)
diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index 9b7ee67..86b562e 100644 index 418ff00b8d..9fab30fd69 100644
--- a/libavcodec/videotoolboxenc.c --- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c +++ b/libavcodec/videotoolboxenc.c
@@ -1389,7 +1389,19 @@ static int vtenc_configure_encoder(AVCodecContext *avctx) @@ -1434,6 +1434,20 @@ static int vtenc_configure_encoder(AVCodecContext *avctx)
}
vtctx->codec_id = avctx->codec_id; vtctx->codec_id = avctx->codec_id;
- avctx->max_b_frames = 16;
+ CFBooleanRef has_b_frames_cfbool; + CFBooleanRef has_b_frames_cfbool;
+ +
+ int error = VTSessionCopyProperty(vtctx->session, + int error = VTSessionCopyProperty(vtctx->session,
...@@ -29,21 +28,10 @@ index 9b7ee67..86b562e 100644 ...@@ -29,21 +28,10 @@ index 9b7ee67..86b562e 100644
+ } + }
+ CFRelease(has_b_frames_cfbool); + CFRelease(has_b_frames_cfbool);
+ } + }
+
if (vtctx->codec_id == AV_CODEC_ID_H264) { if (vtctx->codec_id == AV_CODEC_ID_H264) {
vtctx->get_param_set_func = CMVideoFormatDescriptionGetH264ParameterSetAtIndex; vtctx->get_param_set_func = CMVideoFormatDescriptionGetH264ParameterSetAtIndex;
@@ -1508,7 +1520,10 @@ static av_cold int vtenc_init(AVCodecContext *avctx)
if (!status && has_b_frames_cfbool) {
//Some devices don't output B-frames for main profile, even if requested.
// HEVC has b-pyramid
- vtctx->has_b_frames = (CFBooleanGetValue(has_b_frames_cfbool) && avctx->codec_id == AV_CODEC_ID_HEVC) ? 2 : 1;
+ vtctx->has_b_frames = CFBooleanGetValue(has_b_frames_cfbool);
+ if (vtctx->has_b_frames && avctx->codec_id == AV_CODEC_ID_HEVC) {
+ vtctx->has_b_frames = 2;
+ }
CFRelease(has_b_frames_cfbool);
}
avctx->has_b_frames = vtctx->has_b_frames;
-- --
2.24.3 (Apple Git-128) 2.34.1
{ {
"name": "ffmpeg", "name": "ffmpeg",
"version": "n4.4.2", "version": "n5.0",
"url": "https://github.com/FFmpeg/FFmpeg/archive/__VERSION__.tar.gz", "url": "https://git.ffmpeg.org/gitweb/ffmpeg.git/snapshot/__VERSION__.tar.gz",
"deps": [ "deps": [
"vpx", "vpx",
"x264", "x264",
...@@ -13,13 +13,13 @@ ...@@ -13,13 +13,13 @@
"change-RTCP-ratio.patch", "change-RTCP-ratio.patch",
"rtp_ext_abs_send_time.patch", "rtp_ext_abs_send_time.patch",
"libopusenc-reload-packet-loss-at-encode.patch", "libopusenc-reload-packet-loss-at-encode.patch",
"libopusdec-enable-FEC.patch" "libopusdec-enable-FEC.patch",
],
"win_patches": [
"windows-configure.patch", "windows-configure.patch",
"windows-configure-ffnvcodec.patch", "windows-configure-ffnvcodec.patch",
"windows-configure-libmfx.patch" "windows-configure-libmfx.patch"
], ],
"win_patches": [
],
"project_paths": [], "project_paths": [],
"with_env" : "10.0.16299.0", "with_env" : "10.0.16299.0",
"custom_scripts": { "custom_scripts": {
......
FFMPEG_HASH := n4.4.2 FFMPEG_HASH := n5.0
FFMPEG_URL := https://git.ffmpeg.org/gitweb/ffmpeg.git/snapshot/$(FFMPEG_HASH).tar.gz FFMPEG_URL := https://git.ffmpeg.org/gitweb/ffmpeg.git/snapshot/$(FFMPEG_HASH).tar.gz
PKGS+=ffmpeg PKGS+=ffmpeg
......
From f498c487a24bd39f1adfaa51b415e93456d36612 Mon Sep 17 00:00:00 2001 From c1b210534b15188c964b31dc47e172f8ed4aca55 Mon Sep 17 00:00:00 2001
From: agsantos <aline.gondimsantos@savoirfairelinux.com> From: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
Date: Wed, 17 Nov 2021 12:37:32 -0500 Date: Tue, 19 Jul 2022 13:35:19 -0300
Subject: [PATCH] Screen sharing x11 fixes Subject: [PATCH] Screen sharing x11 fixes
+ We can now have a single stream in the x11grab, which can be updated to follow window resizing + We can now have a single stream in the x11grab, which can be updated to follow window resizing
...@@ -13,7 +13,7 @@ note: This is a custom patch for later rebase ...@@ -13,7 +13,7 @@ note: This is a custom patch for later rebase
1 file changed, 45 insertions(+), 141 deletions(-) 1 file changed, 45 insertions(+), 141 deletions(-)
diff --git a/libavdevice/xcbgrab.c b/libavdevice/xcbgrab.c diff --git a/libavdevice/xcbgrab.c b/libavdevice/xcbgrab.c
index 8e3292e577..406716682f 100644 index 64a68ba497..76e654b424 100644
--- a/libavdevice/xcbgrab.c --- a/libavdevice/xcbgrab.c
+++ b/libavdevice/xcbgrab.c +++ b/libavdevice/xcbgrab.c
@@ -29,11 +29,6 @@ @@ -29,11 +29,6 @@
...@@ -82,7 +82,7 @@ index 8e3292e577..406716682f 100644 ...@@ -82,7 +82,7 @@ index 8e3292e577..406716682f 100644
- shmdt(data); - shmdt(data);
-} -}
- -
-static AVBufferRef *allocate_shm_buffer(void *opaque, buffer_size_t size) -static AVBufferRef *allocate_shm_buffer(void *opaque, size_t size)
-{ -{
- xcb_connection_t *conn = opaque; - xcb_connection_t *conn = opaque;
- xcb_shm_seg_t segment; - xcb_shm_seg_t segment;
...@@ -123,7 +123,7 @@ index 8e3292e577..406716682f 100644 ...@@ -123,7 +123,7 @@ index 8e3292e577..406716682f 100644
- av_log(s, AV_LOG_ERROR, "Could not get shared memory buffer.\n"); - av_log(s, AV_LOG_ERROR, "Could not get shared memory buffer.\n");
- return AVERROR(ENOMEM); - return AVERROR(ENOMEM);
- } - }
- segment = (xcb_shm_seg_t)av_buffer_pool_buffer_get_opaque(buf); - segment = (xcb_shm_seg_t)(uintptr_t)av_buffer_pool_buffer_get_opaque(buf);
- -
- iq = xcb_shm_get_image(c->conn, drawable, - iq = xcb_shm_get_image(c->conn, drawable,
- c->x, c->y, c->width, c->height, ~0, - c->x, c->y, c->width, c->height, ~0,
...@@ -298,5 +298,5 @@ index 8e3292e577..406716682f 100644 ...@@ -298,5 +298,5 @@ index 8e3292e577..406716682f 100644
if (c->draw_mouse) { if (c->draw_mouse) {
if (!(c->draw_mouse = check_xfixes(c->conn))) { if (!(c->draw_mouse = check_xfixes(c->conn))) {
-- --
2.30.2 2.34.1
From 4bb07a5a8306e27a430d6d62c7b7e23300d594a3 Mon Sep 17 00:00:00 2001 From 93cb08f8eaabda03e2f3c70dc546a6fb72b2e752 Mon Sep 17 00:00:00 2001
From: Pierre Lespagnol <pierre.lespagnol@savoirfairelinux.com> From: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
Date: Fri, 29 Jan 2021 16:52:01 -0500 Date: Tue, 19 Jul 2022 15:14:05 -0300
Subject: [PATCH] windows ffnvcodec patch Subject: [PATCH] windows ffnvcodec patch
--- ---
configure | 8 -------- configure | 8 --------
1 file changed, 8 deletions(-) 1 file changed, 8 deletions(-)
diff --git a/configure b/configure
index d0fb8a1fc3..4a6defcc78 100755
--- a/configure --- a/configure
+++ b/configure +++ b/configure
@@ -6246,14 +6246,6 @@ else @@ -6406,14 +6406,6 @@ else
check_nvcc cuda_llvm check_nvcc cuda_llvm
fi fi
...@@ -21,9 +23,9 @@ Subject: [PATCH] windows ffnvcodec patch ...@@ -21,9 +23,9 @@ Subject: [PATCH] windows ffnvcodec patch
- check_pkg_config ffnvcodec "ffnvcodec >= 8.1.24.11 ffnvcodec < 8.2" "$ffnv_hdr_list" "" - check_pkg_config ffnvcodec "ffnvcodec >= 8.1.24.11 ffnvcodec < 8.2" "$ffnv_hdr_list" ""
-fi -fi
- -
check_cpp_condition winrt windows.h "!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)" if enabled_all libglslang libshaderc; then
die "ERROR: libshaderc and libglslang are mutually exclusive, if in doubt, disable libglslang"
if ! disabled w32threads && ! enabled pthreads; then fi
-- --
2.27.0 2.30.2.windows.1
From d8378480c349c5c4e30ca89fa68695661103c309 Mon Sep 17 00:00:00 2001 From 7e3dd8d95bd8b0364bad194c180d1ccf24b88a05 Mon Sep 17 00:00:00 2001
From: Pierre Lespagnol <pierre.lespagnol@savoirfairelinux.com> From: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
Date: Fri, 29 Jan 2021 16:56:48 -0500 Date: Tue, 19 Jul 2022 15:17:29 -0300
Subject: [PATCH] windows libmfx patch Subject: [PATCH] windows libmfx patch
--- ---
configure | 2 -- configure | 5 -----
1 file changed, 2 deletions(-) 1 file changed, 5 deletions(-)
diff --git a/configure b/configure
index 4a6defcc78..955db827fb 100755
--- a/configure --- a/configure
+++ b/configure +++ b/configure
@@ -6374,12 +6374,6 @@ enabled liblensfun && require_pkg_config liblensfun lensfun lensfun.h lf_ @@ -6547,11 +6547,6 @@ enabled liblensfun && require_pkg_config liblensfun lensfun lensfun.h lf_
# Media SDK or Intel Media Server Studio, these don't come with # Media SDK or Intel Media Server Studio, these don't come with
# pkg-config support. Instead, users should make sure that the build # pkg-config support. Instead, users should make sure that the build
# can find the libraries and headers through other means. # can find the libraries and headers through other means.
...@@ -18,10 +20,9 @@ Subject: [PATCH] windows libmfx patch ...@@ -18,10 +20,9 @@ Subject: [PATCH] windows libmfx patch
-if enabled libmfx; then -if enabled libmfx; then
- check_cc MFX_CODEC_VP9 "mfx/mfxvp9.h mfx/mfxstructures.h" "MFX_CODEC_VP9" - check_cc MFX_CODEC_VP9 "mfx/mfxvp9.h mfx/mfxstructures.h" "MFX_CODEC_VP9"
-fi -fi
-
enabled libmodplug && require_pkg_config libmodplug libmodplug libmodplug/modplug.h ModPlug_Load enabled libmodplug && require_pkg_config libmodplug libmodplug libmodplug/modplug.h ModPlug_Load
enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame $libm_extralibs enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame $libm_extralibs
enabled libmysofa && { check_pkg_config libmysofa libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine ||
-- --
2.27.0 2.30.2.windows.1
From 1d10f0603d85336efef694036c884b1743572e1e Mon Sep 17 00:00:00 2001 From 31afebe5d5659e7aa2a5919b6f163bf970e44578 Mon Sep 17 00:00:00 2001
From: Pierre Lespagnol <pierre.lespagnol@savoirfairelinux.com> From: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
Date: Fri, 29 Jan 2021 16:08:55 -0500 Date: Tue, 19 Jul 2022 15:08:45 -0300
Subject: [PATCH] windows configure patch Subject: [PATCH] windows configure patch
--- ---
configure | 35 +---------------------------------- configure | 35 +----------------------------------
1 file changed, 1 insertion(+), 34 deletions(-) 1 file changed, 1 insertion(+), 34 deletions(-)
diff --git a/configure b/configure
index 6b5ef6332e..d0fb8a1fc3 100755
--- a/configure --- a/configure
+++ b/configure +++ b/configure
@@ -1578,7 +1578,7 @@ require_cpp_condition(){ @@ -1621,7 +1621,7 @@ require_cpp_condition(){
require_pkg_config(){ require_pkg_config(){
log require_pkg_config "$@" log require_pkg_config "$@"
pkg_version="$2" pkg_version="$2"
...@@ -17,8 +19,8 @@ Subject: [PATCH] windows configure patch ...@@ -17,8 +19,8 @@ Subject: [PATCH] windows configure patch
+ #check_pkg_config "$@" || die "ERROR: $pkg_version not found using pkg-config$pkg_config_fail_message" + #check_pkg_config "$@" || die "ERROR: $pkg_version not found using pkg-config$pkg_config_fail_message"
} }
test_host_cc(){ require_pkg_config_cpp(){
@@ -6436,28 +6436,6 @@ enabled libvo_amrwbenc && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_in @@ -6620,28 +6620,6 @@ enabled libvo_amrwbenc && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_in
enabled libvorbis && require_pkg_config libvorbis vorbis vorbis/codec.h vorbis_info_init && enabled libvorbis && require_pkg_config libvorbis vorbis vorbis/codec.h vorbis_info_init &&
require_pkg_config libvorbisenc vorbisenc vorbis/vorbisenc.h vorbis_encode_init require_pkg_config libvorbisenc vorbisenc vorbis/vorbisenc.h vorbis_encode_init
...@@ -47,7 +49,7 @@ Subject: [PATCH] windows configure patch ...@@ -47,7 +49,7 @@ Subject: [PATCH] windows configure patch
enabled libwebp && { enabled libwebp && {
enabled libwebp_encoder && require_pkg_config libwebp "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion enabled libwebp_encoder && require_pkg_config libwebp "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion
enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; } enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; }
@@ -7140,17 +7118,6 @@ flatten_extralibs_wrapper(){ @@ -7325,17 +7303,6 @@ flatten_extralibs_wrapper(){
eval printf \''%s'\' \""\$$list_name"\" eval printf \''%s'\' \""\$$list_name"\"
} }
...@@ -66,4 +68,5 @@ Subject: [PATCH] windows configure patch ...@@ -66,4 +68,5 @@ Subject: [PATCH] windows configure patch
eval ${linkunit}_extralibs=\$\(flatten_extralibs_wrapper ${linkunit}_extralibs\) eval ${linkunit}_extralibs=\$\(flatten_extralibs_wrapper ${linkunit}_extralibs\)
done done
-- --
2.27.0 2.30.2.windows.1
\ No newline at end of file
...@@ -335,11 +335,8 @@ MediaEncoder::initStream(const SystemCodecInfo& systemCodecInfo, AVBufferRef* fr ...@@ -335,11 +335,8 @@ MediaEncoder::initStream(const SystemCodecInfo& systemCodecInfo, AVBufferRef* fr
throw MediaEncoderException("Could not open encoder"); throw MediaEncoderException("Could not open encoder");
} }
#ifndef _WIN32
avcodec_parameters_from_context(stream->codecpar, encoderCtx); avcodec_parameters_from_context(stream->codecpar, encoderCtx);
#else
stream->codec = encoderCtx;
#endif
// framerate is not copied from encoderCtx to stream // framerate is not copied from encoderCtx to stream
stream->avg_frame_rate = encoderCtx->framerate; stream->avg_frame_rate = encoderCtx->framerate;
#ifdef ENABLE_VIDEO #ifdef ENABLE_VIDEO
...@@ -578,11 +575,7 @@ std::string ...@@ -578,11 +575,7 @@ std::string
MediaEncoder::print_sdp() MediaEncoder::print_sdp()
{ {
/* theora sdp can be huge */ /* theora sdp can be huge */
#ifndef _WIN32
const auto sdp_size = outputCtx_->streams[currentStreamIdx_]->codecpar->extradata_size + 2048; const auto sdp_size = outputCtx_->streams[currentStreamIdx_]->codecpar->extradata_size + 2048;
#else
const auto sdp_size = outputCtx_->streams[currentStreamIdx_]->codec->extradata_size + 2048;
#endif
std::string sdp(sdp_size, '\0'); std::string sdp(sdp_size, '\0');
av_sdp_create(&outputCtx_, 1, &(*sdp.begin()), sdp_size); av_sdp_create(&outputCtx_, 1, &(*sdp.begin()), sdp_size);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment