forked from mia/Aegisub
parent
7485ae46a1
commit
d399e44061
1 changed files with 8 additions and 14 deletions
|
@ -84,7 +84,6 @@ public:
|
||||||
std::string colormatrix_description(const AVFrame *frame) {
|
std::string colormatrix_description(const AVFrame *frame) {
|
||||||
// Assuming TV for unspecified
|
// Assuming TV for unspecified
|
||||||
std::string str = frame->color_range == AVCOL_RANGE_JPEG ? "PC" : "TV";
|
std::string str = frame->color_range == AVCOL_RANGE_JPEG ? "PC" : "TV";
|
||||||
LOG_D("bestsource") << frame->colorspace;
|
|
||||||
|
|
||||||
switch (frame->colorspace) {
|
switch (frame->colorspace) {
|
||||||
case AVCOL_SPC_BT709:
|
case AVCOL_SPC_BT709:
|
||||||
|
@ -114,21 +113,16 @@ BSVideoProvider::BSVideoProvider(agi::fs::path const& filename, std::string cons
|
||||||
has_audio = false;
|
has_audio = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
br->Run([&](agi::ProgressSink *ps) {
|
||||||
|
ps->SetTitle(from_wx(_("Exacting")));
|
||||||
|
ps->SetMessage(from_wx(_("Creating cache... This can take a while!")));
|
||||||
|
ps->SetIndeterminate();
|
||||||
|
if (bs.GetExactDuration()) {
|
||||||
|
LOG_D("provider/video/bestsource") << "File cached and has exact samples.";
|
||||||
|
}
|
||||||
|
});
|
||||||
properties = bs.GetVideoProperties();
|
properties = bs.GetVideoProperties();
|
||||||
|
|
||||||
if (properties.NumFrames == -1) {
|
|
||||||
LOG_D("bs") << "File not cached or varying samples, creating cache.";
|
|
||||||
br->Run([&](agi::ProgressSink *ps) {
|
|
||||||
ps->SetTitle(from_wx(_("Exacting")));
|
|
||||||
ps->SetMessage(from_wx(_("Creating cache... This can take a while!")));
|
|
||||||
ps->SetIndeterminate();
|
|
||||||
if (bs.GetExactDuration()) {
|
|
||||||
LOG_D("bs") << "File cached and has exact samples.";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
properties = bs.GetVideoProperties();
|
|
||||||
}
|
|
||||||
|
|
||||||
br->Run([&](agi::ProgressSink *ps) {
|
br->Run([&](agi::ProgressSink *ps) {
|
||||||
ps->SetTitle(from_wx(_("Scanning")));
|
ps->SetTitle(from_wx(_("Scanning")));
|
||||||
ps->SetMessage(from_wx(_("Finding Keyframes and Timecodes...")));
|
ps->SetMessage(from_wx(_("Finding Keyframes and Timecodes...")));
|
||||||
|
|
Loading…
Reference in a new issue