Skip to content

Commit

Permalink
Update ffmpeg wrap to 6.1
Browse files Browse the repository at this point in the history
and fix a warning caused by ffmpeg 6.1 API changes
  • Loading branch information
0tkl committed Dec 27, 2023
1 parent b0c77be commit d61d4d3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
6 changes: 5 additions & 1 deletion src/video_provider_bestsource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,12 @@ BSVideoProvider::BSVideoProvider(agi::fs::path const& filename, std::string cons
if (frame == nullptr) {
throw VideoOpenError("Couldn't read frame!");
}

// https://github.com/FFmpeg/FFmpeg/blob/n6.1/doc/APIchanges#L144-L148
#if (LIBAVUTIL_VERSION_MAJOR == 58 && LIBAVUTIL_VERSION_MINOR >= 7) || LIBAVUTIL_VERSION_MAJOR >= 59
if (frame->GetAVFrame()->flags & AV_FRAME_FLAG_KEY) {
#else
if (frame->GetAVFrame()->key_frame) {
#endif
Keyframes.push_back(n);
}

Expand Down
3 changes: 2 additions & 1 deletion subprojects/ffmpeg.wrap
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[wrap-git]
directory = ffmpeg
url = https://gitlab.freedesktop.org/gstreamer/meson-ports/ffmpeg.git
revision = head
revision = meson-6.1
depth = 1
diff_files = ffmpeg/0001.patch

[provide]
Expand Down
18 changes: 9 additions & 9 deletions subprojects/packagefiles/ffmpeg/0001.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/meson.build b/meson.build
index 688b368859..dc9d18acd5 100644
index 27d1387315..e8d7d3ccc2 100644
--- a/meson.build
+++ b/meson.build
@@ -1037,7 +1037,7 @@ check_components = [
@@ -1042,7 +1042,7 @@ check_components = [
['user32', ['windows.h', 'winuser.h'], ['GetShellWindow'], ['user32']],
['vfw32', ['windows.h', 'vfw.h'], ['capCreateCaptureWindow'], ['vfw3']],
['vaapi', ['va/va.h'], ['vaInitialize'], ['va']],
Expand All @@ -11,15 +11,15 @@ index 688b368859..dc9d18acd5 100644

# Libraries with preconditions
['vaapi_drm', ['va/va.h', 'va/va_drm.h'], ['vaGetDisplayDRM'], ['va', 'va-drm'],
@@ -1925,6 +1925,7 @@ foreach check : all_checks
@@ -1930,6 +1930,7 @@ foreach check : all_checks
prefix = ''

found = true
+ skipchecks = false

preconditions = opts.get('preconditions', [])

@@ -1980,6 +1981,11 @@ foreach check : all_checks
@@ -1985,6 +1986,11 @@ foreach check : all_checks
req = false
endif
dep = cc.find_library(link_with, required : req)
Expand All @@ -31,7 +31,7 @@ index 688b368859..dc9d18acd5 100644
found = found and dep.found()
extra_deps += dep
endforeach
@@ -2009,7 +2015,8 @@ foreach check : all_checks
@@ -2014,7 +2020,8 @@ foreach check : all_checks
else
dep = dependency(pkg_name, required : req)
endif
Expand All @@ -41,7 +41,7 @@ index 688b368859..dc9d18acd5 100644
extra_deps += dep
endif
endif
@@ -2023,14 +2030,14 @@ foreach check : all_checks
@@ -2028,14 +2035,14 @@ foreach check : all_checks
endif

if not conf.has(header.underscorify())
Expand All @@ -58,7 +58,7 @@ index 688b368859..dc9d18acd5 100644
n_funcs_found = 0
foreach symbol : funcs
if check_type == 'header-func'
@@ -2050,7 +2057,7 @@ foreach check : all_checks
@@ -2055,7 +2062,7 @@ foreach check : all_checks
endif
endif

Expand All @@ -67,7 +67,7 @@ index 688b368859..dc9d18acd5 100644
n_defines_found = 0
foreach symbol : defines
if cc.get_define(symbol, dependencies : extra_deps, prefix: prefix, args : c_args + project_c_args) != ''
@@ -2060,15 +2067,15 @@ foreach check : all_checks
@@ -2065,15 +2072,15 @@ foreach check : all_checks
found = n_defines_found == defines.length()
endif

Expand All @@ -86,7 +86,7 @@ index 688b368859..dc9d18acd5 100644
found = cc.has_type(type, prefix : prefix, dependencies : extra_deps, args : c_args + project_c_args)
endif

@@ -3087,6 +3094,11 @@ foreach a: arch_list
@@ -3103,6 +3110,11 @@ foreach a: arch_list
endforeach

foreach have: have_list
Expand Down

0 comments on commit d61d4d3

Please sign in to comment.