From bf77145014986458af5717226a4708664c424014 Mon Sep 17 00:00:00 2001 From: moi15moi Date: Wed, 4 Dec 2024 20:36:50 -0500 Subject: [PATCH 1/5] [ffmpeg.wrap] Bump ffmpeg to meson-7.1 bestsource (R10) now require: - libavcodec: >=61.19.0 - libavformat: >=61.7.0 - libavutil:>=59.39.0 --- subprojects/ffmpeg.wrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/ffmpeg.wrap b/subprojects/ffmpeg.wrap index 811b3740fe..929be934ce 100644 --- a/subprojects/ffmpeg.wrap +++ b/subprojects/ffmpeg.wrap @@ -1,7 +1,7 @@ [wrap-git] directory = ffmpeg url = https://gitlab.freedesktop.org/gstreamer/meson-ports/ffmpeg.git -revision = meson-6.1 +revision = meson-7.1 depth = 1 [provide] From 4ecab3e61fc8aa299ef43338e4b7bba7ba3c6549 Mon Sep 17 00:00:00 2001 From: moi15moi Date: Wed, 4 Dec 2024 20:39:55 -0500 Subject: [PATCH 2/5] [bestsource.wrap] Bump bestsource to R10 The [commit](https://github.com/vapoursynth/bestsource/commit/c25cf29da9389cf26d3355054a30975dd2a38f75) added a new API, so we can retrieve the track metadata. --- subprojects/bestsource.wrap | 3 +-- subprojects/packagefiles/bestsource/0001.patch | 16 ---------------- 2 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 subprojects/packagefiles/bestsource/0001.patch diff --git a/subprojects/bestsource.wrap b/subprojects/bestsource.wrap index 4df85ca2d7..4ca74981fc 100644 --- a/subprojects/bestsource.wrap +++ b/subprojects/bestsource.wrap @@ -1,8 +1,7 @@ [wrap-git] url = https://github.com/vapoursynth/bestsource -revision = R8 +revision = R10 clone-recursive = true -diff_files = bestsource/0001.patch [provide] bestsource = bestsource_dep diff --git a/subprojects/packagefiles/bestsource/0001.patch b/subprojects/packagefiles/bestsource/0001.patch deleted file mode 100644 index 4c3862b662..0000000000 --- a/subprojects/packagefiles/bestsource/0001.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/meson.build b/meson.build -index 6017b15..eec9249 100644 ---- a/meson.build -+++ b/meson.build -@@ -2,10 +2,7 @@ project('BestSource', 'cpp', - default_options: ['buildtype=release', 'b_ndebug=if-release', 'cpp_std=c++17'], - license: 'MIT', - meson_version: '>=0.53.0', -- version: '.'.join([ -- run_command('grep', 'BEST_SOURCE_VERSION_MAJOR', 'src/version.h', check: true).stdout().strip().split()[2], -- run_command('grep', 'BEST_SOURCE_VERSION_MINOR', 'src/version.h', check: true).stdout().strip().split()[2], -- ]) -+ version: '6.0' - ) - - api_sources = files( From 0989cf70503f230bba77c02895b7fec4e468c954 Mon Sep 17 00:00:00 2001 From: moi15moi Date: Wed, 4 Dec 2024 20:43:55 -0500 Subject: [PATCH 3/5] [bestsource provider] Remove VariableFormat parameter This [commit](https://github.com/vapoursynth/bestsource/commit/4f6ef06399989a288d46e5a50a27cfb749d5d955) removed the VariableFormat parameter in videosource.h This [commit](https://github.com/vapoursynth/bestsource/commit/2817e14e91cbea36566b6f7284acb7701062a07e) removed the VariableFormat parameter in audiosource.h --- src/audio_provider_bestsource.cpp | 2 +- src/video_provider_bestsource.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/audio_provider_bestsource.cpp b/src/audio_provider_bestsource.cpp index df68fda632..3198d30941 100644 --- a/src/audio_provider_bestsource.cpp +++ b/src/audio_provider_bestsource.cpp @@ -67,7 +67,7 @@ BSAudioProvider::BSAudioProvider(agi::fs::path const& filename, agi::BackgroundR ps->SetTitle(from_wx(_("Indexing"))); ps->SetMessage(from_wx(_("Indexing file... This will take a while!"))); try { - bs = agi::make_unique(filename.string(), static_cast(track), -1, false, 0, 1, provider_bs::GetCacheFile(filename), &bsopts, 0, [=](int Track, int64_t Current, int64_t Total) { + bs = agi::make_unique(filename.string(), static_cast(track), -1, 0, 1, provider_bs::GetCacheFile(filename), &bsopts, 0, [=](int Track, int64_t Current, int64_t Total) { ps->SetProgress(Current, Total); return !ps->IsCancelled(); }); diff --git a/src/video_provider_bestsource.cpp b/src/video_provider_bestsource.cpp index d640d70082..025ffabcba 100644 --- a/src/video_provider_bestsource.cpp +++ b/src/video_provider_bestsource.cpp @@ -116,7 +116,7 @@ BSVideoProvider::BSVideoProvider(agi::fs::path const& filename, std::string cons ps->SetTitle(from_wx(_("Indexing"))); ps->SetMessage(from_wx(_("Decoding the full track to ensure perfect frame accuracy. This will take a while!"))); try { - bs = agi::make_unique(filename.string(), "", 0, static_cast(track_info.first), false, OPT_GET("Provider/Video/BestSource/Threads")->GetInt(), 1, provider_bs::GetCacheFile(filename), &bsopts, [=](int Track, int64_t Current, int64_t Total) { + bs = agi::make_unique(filename.string(), "", 0, static_cast(track_info.first), OPT_GET("Provider/Video/BestSource/Threads")->GetInt(), 1, provider_bs::GetCacheFile(filename), &bsopts, [=](int Track, int64_t Current, int64_t Total) { ps->SetProgress(Current, Total); return !ps->IsCancelled(); }); From 9bccea1767c05d31b7fb1020d14e9846f994cc56 Mon Sep 17 00:00:00 2001 From: moi15moi Date: Wed, 4 Dec 2024 20:44:42 -0500 Subject: [PATCH 4/5] [bestsource] Add track language and title in the selection track menu --- src/bestsource_common.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/bestsource_common.cpp b/src/bestsource_common.cpp index 9e44daf685..df17d8cf56 100644 --- a/src/bestsource_common.cpp +++ b/src/bestsource_common.cpp @@ -56,7 +56,18 @@ std::pair SelectTrack(agi::fs::path const& filename, bool if (info.MediaType == type) { TrackNumbers.push_back(i); - Choices.Add(agi::wxformat(_("Track %02d: %s"), i, info.CodecString)); + std::map metadata = tracklist.GetTrackMetadata(i); + wxString description = agi::wxformat(_("Track %02d: %s"), i, info.CodecString); + + if (metadata.count("language") > 0) { + description += agi::wxformat(_(" - [%s]"), metadata["language"]); + } + + if (metadata.count("title") > 0) { + description += agi::wxformat(_(" - %s"), metadata["title"]); + } + + Choices.Add(description); } } From 9cbf792bbd5fa3d2f4f39a0f879e92f0ab9f6856 Mon Sep 17 00:00:00 2001 From: moi15moi Date: Sat, 28 Dec 2024 21:12:30 -0500 Subject: [PATCH 5/5] [bestsource provider] Remove VariableFormat parameter This [commit](https://github.com/vapoursynth/bestsource/commit/633d6e8334f8f17e15cb939194343852ba7c35b1#diff-fe0470628acf368c8971852850ca82394169b0fd8a64c78426663f21ee0ef2a2) added the ViewID parameter in videosource.h Let's set it to 0 since we don't support spatial videos. --- src/video_provider_bestsource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_provider_bestsource.cpp b/src/video_provider_bestsource.cpp index 025ffabcba..0a269dc90c 100644 --- a/src/video_provider_bestsource.cpp +++ b/src/video_provider_bestsource.cpp @@ -116,7 +116,7 @@ BSVideoProvider::BSVideoProvider(agi::fs::path const& filename, std::string cons ps->SetTitle(from_wx(_("Indexing"))); ps->SetMessage(from_wx(_("Decoding the full track to ensure perfect frame accuracy. This will take a while!"))); try { - bs = agi::make_unique(filename.string(), "", 0, static_cast(track_info.first), OPT_GET("Provider/Video/BestSource/Threads")->GetInt(), 1, provider_bs::GetCacheFile(filename), &bsopts, [=](int Track, int64_t Current, int64_t Total) { + bs = agi::make_unique(filename.string(), "", 0, static_cast(track_info.first), 0, OPT_GET("Provider/Video/BestSource/Threads")->GetInt(), 1, provider_bs::GetCacheFile(filename), &bsopts, [=](int Track, int64_t Current, int64_t Total) { ps->SetProgress(Current, Total); return !ps->IsCancelled(); });