Skip to content

Commit b83ddbe

Browse files
authored
Bug fixes (#51)
* Bug fixes Signed-off-by: Al Crate <[email protected]>
1 parent 38d2b07 commit b83ddbe

File tree

16 files changed

+136
-74
lines changed

16 files changed

+136
-74
lines changed

CHANGELOG.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1 @@
11

2-
3-
4-
5-
6-
7-
8-
9-
10-

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
22

3-
set(XSTUDIO_GLOBAL_VERSION "0.11.0" CACHE STRING "Version string")
3+
set(XSTUDIO_GLOBAL_VERSION "0.11.2" CACHE STRING "Version string")
44
set(XSTUDIO_GLOBAL_NAME xStudio)
55

66
project(${XSTUDIO_GLOBAL_NAME} VERSION ${XSTUDIO_GLOBAL_VERSION} LANGUAGES CXX)

docs/build_guides/centos_7.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Install 5.15 dev tools, using Qt5 online installer, requires login account (free
4646
wget https://github.com/nlohmann/json/archive/refs/tags/v3.11.2.tar.gz
4747
tar -xf v3.11.2.tar.gz
4848
mkdir json-3.11.2/build
49-
cd json-3.7.3/build
49+
cd json-3.11.2/build
5050
cmake .. -DJSON_BuildTests=Off
5151
make -j $JOBS
5252
sudo make install

docs/build_guides/rocky_linux_9_1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
wget https://github.com/nlohmann/json/archive/refs/tags/v3.11.2.tar.gz
2929
tar -xf v3.11.2.tar.gz
3030
mkdir json-3.11.2/build
31-
cd json-3.7.3/build
31+
cd json-3.11.2/build
3232
cmake .. -DJSON_BuildTests=Off
3333
make -j $JOBS
3434
sudo make install

include/xstudio/ui/qml/session_model_ui.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ class SessionModel : public caf::mixin::actor_object<JSONTreeModel> {
210210
Q_INVOKABLE void relinkMedia(const QModelIndexList &indexes, const QUrl &path);
211211
Q_INVOKABLE void decomposeMedia(const QModelIndexList &indexes);
212212
Q_INVOKABLE void rescanMedia(const QModelIndexList &indexes);
213+
Q_INVOKABLE QModelIndex getPlaylistIndex(const QModelIndex &index) const;
213214

214215
signals:
215216
void bookmarkActorAddrChanged();
@@ -296,7 +297,6 @@ class SessionModel : public caf::mixin::actor_object<JSONTreeModel> {
296297
const utility::JsonTree &tree,
297298
const QPersistentModelIndex &search_hint = QModelIndex());
298299
utility::Uuid refreshId(nlohmann::json &ij);
299-
QModelIndex getPlaylistIndex(const QModelIndex &index) const;
300300

301301
QFuture<QList<QUuid>> handleMediaIdDropFuture(
302302
const int proposedAction, const utility::JsonStore &drop, const QModelIndex &index);

src/media/src/media_source_actor.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ MediaSourceActor::MediaSourceActor(
129129
base_.set_media_reference(mr);
130130

131131

132-
anon_send(actor_cast<actor>(this), acquire_media_detail_atom_v, media_reference.rate());
132+
// special case , when duplicating, as that'll suppy streams.
133+
// anon_send(actor_cast<actor>(this), acquire_media_detail_atom_v, media_reference.rate());
133134

134135
init();
135136
}

src/plugin/data_source/dneg/shotgun/src/data_source_shotgun.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,12 @@ ShotgunDataSourceActor<T>::ShotgunDataSourceActor(
757757

758758
// do we need the UI to have spun up before we can issue calls to shotgun...
759759
// erm...
760-
[=](use_data_atom, const caf::uri &uri) -> result<UuidActorVector> {
760+
[=](use_data_atom atom, const caf::uri &uri) {
761+
delegate(actor_cast<caf::actor>(this), atom, uri, FrameRate());
762+
},
763+
[=](use_data_atom,
764+
const caf::uri &uri,
765+
const FrameRate &media_rate) -> result<UuidActorVector> {
761766
// check protocol == shotgun..
762767
if (uri.scheme() != "shotgun")
763768
return UuidActorVector();

src/plugin/data_source/dneg/shotgun/src/qml/Shotgun.1/ShotgunPublishNotes.qml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,7 @@ XsWindow {
181181
)
182182

183183
publishNotesDialog.payload = tmp
184-
// console.log(tmp)
185184
publish_func(tmp, playlist_uuid)
186-
// onAccepted: push_playlist_note_promise(data_source, payload, playlist, playlist_uuid, error)
187185
}
188186
}
189187

src/plugin/data_source/dneg/shotgun/src/qml/Shotgun.1/ShotgunRoot.qml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -992,16 +992,15 @@ Item {
992992
let inds = app_window.sessionSelectionModel.selectedIndexes
993993
inds.forEach(
994994
function (item, index) {
995-
let type = item.model.get(item, "typeRole")
996-
if(type == "Playlist") {
997-
// get playlist name
998-
let uuid = item.model.get(item, "actorUuidRole")
999-
1000-
push_notes_dialog.publishSelected = selected_media
1001-
push_notes_dialog.playlist_uuid = uuid
1002-
push_notes_dialog.updatePublish()
1003-
push_notes_dialog.show()
1004-
}
995+
// find playlist..
996+
let plind = app_window.sessionModel.getPlaylistIndex(item)
997+
// get playlist name
998+
let uuid = item.model.get(plind, "actorUuidRole")
999+
1000+
push_notes_dialog.publishSelected = selected_media
1001+
push_notes_dialog.playlist_uuid = uuid
1002+
push_notes_dialog.updatePublish()
1003+
push_notes_dialog.show()
10051004
}
10061005
)
10071006
}

src/plugin/media_reader/openexr/src/openexr.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -580,22 +580,23 @@ xstudio::media::MediaDetail OpenEXRMediaReader::detail(const caf::uri &uri) cons
580580
else if (timecode_rate)
581581
fr = static_cast<double>(timecode_rate->value());
582582

583-
if (fr == 0.0)
584-
fr = 24.0;
585-
586583
if (timecode) {
584+
// note if frame rate is no known from metadata we use 24pfs
585+
// as a default
587586
tc = utility::Timecode(
588587
timecode->value().hours(),
589588
timecode->value().minutes(),
590589
timecode->value().seconds(),
591590
timecode->value().frame(),
592-
fr,
591+
fr == 0.0 ? 24.0 : fr,
593592
timecode->value().dropFrame());
594593
} else if (rate) {
595594
tc = utility::Timecode("00:00:00:00", fr);
596595
}
597596

598-
frd.set_rate(utility::FrameRate(1.0 / fr));
597+
// if frame rate is not known, return null frame rate so xSTUDIO will
598+
// apply its global frame rate
599+
frd.set_rate(fr == 0.0 ? utility::FrameRate() : utility::FrameRate(1.0 / fr));
599600

600601
std::vector<std::string> stream_ids;
601602
for (int prt = 0; prt < parts; ++prt) {

0 commit comments

Comments
 (0)