Merge branches 'video_panning_option' and 'bestsource' into feature

This commit is contained in:
arch1t3cht 2023-04-23 15:39:41 +02:00
commit 00e241d74b
3 changed files with 7 additions and 6 deletions

View File

@ -56,7 +56,7 @@ BSAudioProvider::BSAudioProvider(agi::fs::path const& filename, agi::BackgroundR
{
bs.SetMaxCacheSize(OPT_GET("Provider/Audio/BestSource/Max Cache Size")->GetInt() << 20);
br->Run([&](agi::ProgressSink *ps) {
ps->SetTitle(from_wx(_("Exacting")));
ps->SetTitle(from_wx(_("Indexing")));
ps->SetMessage(from_wx(_("Creating cache... This can take a while!")));
ps->SetIndeterminate();
if (bs.GetExactDuration()) {

View File

@ -659,8 +659,8 @@ struct video_opt_autoscroll final : public Command {
struct video_pan_reset final : public validator_video_loaded {
CMD_NAME("video/pan_reset")
STR_MENU("Reset video pan")
STR_DISP("Reset video pan")
STR_MENU("Reset Video Pan")
STR_DISP("Reset Video Pan")
STR_HELP("Reset the video pan to the original value")
void operator()(agi::Context *c) override {

View File

@ -43,6 +43,7 @@ namespace agi { class BackgroundRunner; }
#include <libaegisub/make_unique.h>
#include <libaegisub/background_runner.h>
#include <libaegisub/log.h>
#include <libaegisub/format.h>
namespace {
@ -114,7 +115,7 @@ BSVideoProvider::BSVideoProvider(agi::fs::path const& filename, std::string cons
}
br->Run([&](agi::ProgressSink *ps) {
ps->SetTitle(from_wx(_("Exacting")));
ps->SetTitle(from_wx(_("Indexing")));
ps->SetMessage(from_wx(_("Creating cache... This can take a while!")));
ps->SetIndeterminate();
if (bs.GetExactDuration()) {
@ -125,7 +126,7 @@ BSVideoProvider::BSVideoProvider(agi::fs::path const& filename, std::string cons
br->Run([&](agi::ProgressSink *ps) {
ps->SetTitle(from_wx(_("Scanning")));
ps->SetMessage(from_wx(_("Finding Keyframes and Timecodes...")));
ps->SetMessage(from_wx(_("Reading timecodes and frame/sample data")));
std::vector<int> TimecodesVector;
for (int n = 0; n < properties.NumFrames; n++) {
@ -159,7 +160,7 @@ BSVideoProvider::BSVideoProvider(agi::fs::path const& filename, std::string cons
colorspace = colormatrix_description(frame->GetAVFrame());
}
catch (VideoException const& err) {
throw VideoOpenError("Failed to create BestVideoSource");
throw VideoOpenError(agi::format("Failed to create BestVideoSource: %s", + err.what()));
}
void BSVideoProvider::GetFrame(int n, VideoFrame &out) {