Skip to content
4 changes: 2 additions & 2 deletions include/xstudio/ui/keyboard.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ namespace ui {
inline static const std::map<int, int> key_to_modifier = {
{16777248, (int)ShiftModifier},
{16777249, (int)ControlModifier},
{16777251, (int)AltModifier},
{16777249, (int)MetaModifier}};
{16777250, (int)MetaModifier},
{16777251, (int)AltModifier}};

// This is very rough and ready, needs a lot more work!
class Hotkey {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void GradingDataSerialiser::register_serialiser(
const unsigned char maj_ver,
const unsigned char minor_ver,
std::shared_ptr<GradingDataSerialiser> sptr) {
int fver = maj_ver << 8 + minor_ver;
int fver = (maj_ver << 8) + minor_ver;
assert(sptr);
if (serialisers.find(fver) != serialisers.end()) {
throw std::runtime_error("Attempt to register Annotation Serialiser with a used "
Expand Down
3 changes: 3 additions & 0 deletions src/plugin/media_metadata/ffprobe/src/ffprobe_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,9 @@ std::shared_ptr<MediaFile> FFProbe::open_file(const std::string &path) {
av_dict_set(&format_opts, "scan_all_pmts", "1", AV_DICT_DONT_OVERWRITE);
auto scan_all_pmts_set = 1;

// Tell ffmpeg to export custom "udta" metadata tags.
av_dict_set_int(&format_opts, "export_all", 1, 0);

iformat = av_find_input_format("format");
if (not iformat) {
// throw std::runtime_error("Unknown input format");
Expand Down
5 changes: 4 additions & 1 deletion src/python_module/src/py_register.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ void register_timecode_class(py::module &m, const std::string &name) {
auto str_impl = [](const utility::Timecode &x) { return to_string(x); };
py::class_<utility::Timecode>(m, name.c_str())
.def(py::init<>())
.def(py::init<const int, const double>())
.def("__str__", str_impl)
.def("hours", [](const utility::Timecode &x) { return x.hours(); })
.def("minutes", [](const utility::Timecode &x) { return x.minutes(); })
Expand Down Expand Up @@ -289,9 +290,10 @@ void register_mediareference_class(py::module &m, const std::string &name) {
&utility::MediaReference::uri, py::const_),
"URI of mediareference",
py::arg("fpf") = utility::MediaReference::FramePadFormat::FPF_XSTUDIO)

.def("set_frame_list", &utility::MediaReference::set_frame_list)
.def("uri_from_frame", &utility::MediaReference::uri_from_frame)
.def("timecode", &utility::MediaReference::timecode)
.def("set_timecode", &utility::MediaReference::set_timecode)
.def("offset", &utility::MediaReference::offset)
.def("set_offset", &utility::MediaReference::set_offset)
.def("start_frame_offset", &utility::MediaReference::start_frame_offset)
Expand Down Expand Up @@ -569,6 +571,7 @@ void register_frame_list_class(py::module &m, const std::string &name) {
auto str_impl = [](const utility::FrameList &x) { return to_string(x); };
py::class_<utility::FrameList>(m, name.c_str())
.def(py::init<>())
.def(py::init<int, int, int>())
.def(py::init<std::string>())
.def("__str__", str_impl);
}
Expand Down
1 change: 1 addition & 0 deletions src/python_module/src/py_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ void py_ui(py::module_ &m) {
.value("NoModifier", ui::KeyboardModifier::NoModifier)
.value("ShiftModifier", ui::KeyboardModifier::ShiftModifier)
.value("ControlModifier", ui::KeyboardModifier::ControlModifier)
.value("AltModifier", ui::KeyboardModifier::AltModifier)
.value("MetaModifier", ui::KeyboardModifier::MetaModifier)
.value("KeypadModifier", ui::KeyboardModifier::KeypadModifier)
.value("GroupSwitchModifier", ui::KeyboardModifier::GroupSwitchModifier)
Expand Down
2 changes: 1 addition & 1 deletion src/scanner/src/scanner_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ media::MediaStatus check_media_status(const MediaReference &mr) {
try {

if (mr.container()) {
if (not fs::exists(uri_to_posix_path(mr.uri())))
if (mr.uri().scheme() == "file" and not fs::exists(uri_to_posix_path(mr.uri())))
ms = media::MediaStatus::MS_MISSING;
} else {
// check first and last frame.
Expand Down
7 changes: 6 additions & 1 deletion src/thumbnail/src/thumbnail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ void DiskCacheStat::populate(const std::string &path) {
for (const auto &entry : fs::recursive_directory_iterator(path)) {
if (fs::is_regular_file(entry.status())) {
auto mtime = fs::last_write_time(entry.path());
const auto stem = entry.path().stem().string();
#if __apple__
if (stem == ".DS_Store")
continue;
#endif
add_thumbnail(
std::stoull(entry.path().stem().string(), nullptr, 16),
std::stoull(stem, nullptr, 16),
fs::file_size(entry.path()),
mtime);
}
Expand Down
2 changes: 2 additions & 0 deletions src/timeline/src/clip_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ caf::message_handler ClipActor::message_handler() {
return jsn;
},

[=](utility::event_atom, utility::name_atom, const std::string & /*name*/) {},

[=](item_name_atom, const std::string &value) -> JsonStore {
auto jsn = base_.item().set_name(value);
if (not jsn.is_null())
Expand Down
Loading