Skip to content

Commit d07a8c1

Browse files
authored
Merge pull request #40 from dneg/update_0_10_0
Release 0.10.0
2 parents 56bf691 + 2588ce2 commit d07a8c1

File tree

318 files changed

+24861
-4568
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

318 files changed

+24861
-4568
lines changed

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.9.0" CACHE STRING "Version string")
3+
set(XSTUDIO_GLOBAL_VERSION "0.10.0" CACHE STRING "Version string")
44
set(XSTUDIO_GLOBAL_NAME xStudio)
55

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

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@
7575
# built documents.
7676
#
7777
# The short X.Y version.
78-
version = '0.8.0'
78+
version = '0.10.0'
7979
# The full version, including alpha/beta/rc tags.
80-
release = '0.8.0'
80+
release = '0.10.0'
8181

8282
# The language for content autogenerated by Sphinx. Refer to documentation
8383
# for a list of supported languages.

docs/user_docs/appendix/python_scripting.rst

Lines changed: 67 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,30 @@ Some simple python scripts are included with the xSTUDIO source code. These can
3333
API classes and methods include docstrings - query them using **help()** and **dir()**.
3434

3535

36-
Python Examples
37-
===============
36+
Python Plugins
37+
=================
38+
39+
xSTUDIO now provides a Python plugin API. The features of this API are still being expanded (Q2 2023) but it is ready to be used for some purposes. For example, it's possible to create Viewport overlay graphics, add menu items to some of xSTUDIO's menus that execute callback methods in your plugin. You can create attributes on your python plugin class instance that can be exposed in the QML UI layer to, for example, add buttons to the toolbar or launch fully customised QML interfaces.
40+
41+
To learn more about the plugin API we reccommend that you look at the examples available in the xSTUDIO source repository. These can be found in the **src/demos/python_plugins** subfolder. Note that the dnSetLoopRange is dependent on metadata that is specific to DNEG's pipeline but it is nevertheless commented for 3rd party users to refer to.
42+
43+
To 'install' Python plugins you simply need to copy your plugins to an appropriate location and set the 'XSTUDIO_PYTHON_PLUGIN_PATH' environment variable to point to this location before running the xstudio binary. Typically at a studio sys-admins would advise on this and set-up appropriate wrapper scripts for xSTUDIO that ensure your environment variables are set. However, it's also very straightforward for an individual user. The env var should be a colon separated list of file system paths that include the python-importable module folder of your plugin(s).
44+
45+
For example, let's say you have downloaded the xSTUDIO source repo to the a folder here /home/$USER/Dev/:
46+
47+
.. code-block:: bash
48+
:caption: Install the demo plugins and launch xSTUDIO to test them
49+
50+
sudo mkdir -p /usr/local/lib/xstudio/python-plugins
51+
cp -r /home/$USER/Dev/xstudio/src/demos/python_plugins/* /usr/local/lib/xstudio/python-plugins/
52+
export XSTUDIO_PYTHON_PLUGIN_PATH=/usr/local/lib/xstudio/python-plugins
53+
xstudio
54+
55+
56+
Python Scripting Examples
57+
=========================
58+
59+
Aside from python 'plugins', which are essentially scripts that instance a custom plugin class to handle callbacks and manage certain typical communication with the core app, you also can do many things through straightforward scripts.
3860

3961
**Here's a really basic example that prints out all the media paths in your session.**
4062

@@ -72,35 +94,38 @@ Python Examples
7294
video = '/home/Media/some_quicktime.mov'
7395
audio = '/home/Media/some_audio.wav'
7496
75-
# create a playlist
76-
playlist = XSTUDIO.api.session.create_playlist(name='My Playlist2')
7797
78-
# make the playlist the 'viewed' playlist
79-
XSTUDIO.api.session.set_on_screen_source(playlist[1])
98+
# create a playlist - note the result is a pair, the first element is the
99+
# Uuid, the second is the Playlist class instance
100+
playlist = XSTUDIO.api.session.create_playlist(name='My Playlist')[1]
101+
102+
# make the playlist the 'viewed' playlist
103+
XSTUDIO.api.session.set_on_screen_source(playlist)
80104
81105
# add a frames based source (eg. jpegs.0001.jpg, jpegs.0002.jpg etc.)
82-
frames_based_media = playlist[1].add_media(frames)
106+
frames_based_media = playlist.add_media(frames)
83107
# set the frame rate for the frames source
84108
frames_based_media.media_source().rate = FrameRate(30.0)
85109
86-
# add a combined audio/video
87-
video_only = playlist[1].add_media(video)
110+
# add a containerised media item
111+
video_only = playlist.add_media(video)
88112
89-
# add a combined audio/video
90-
combined = playlist[1].add_media_with_audio(video, audio)
113+
# add a combined audio/video
114+
combined = playlist.add_media_with_audio(frames, audio)
91115
92-
# add aan audio only source
93-
audio_only = playlist[1].add_media(audio)
116+
# add an audio only source
117+
audio_only = playlist.add_media(audio)
94118
95-
# create a playhead for the playlist
96-
playlist[1].create_playhead()
97-
playhead = playlist[1].playheads[0]
119+
# get the playlist's playhead. Each playlist has its own playhead - by making
120+
# it the 'active' (viewed) playhead below we can start playing media from the
121+
# playlist in the viewer.
122+
playhead = playlist.playhead
98123
99124
# get the 'playhead_selection' object, which is used to choose
100-
# items from a playlist for playing
101-
plahead_selector = playlist[1].playhead_selection
125+
# items from a playlist for playing
126+
plahead_selector = playlist.playhead_selection
102127
103-
# select all the added media for playing (using their uuids)
128+
# select all the added media for playing (using their uuids)
104129
plahead_selector.set_selection(
105130
[
106131
frames_based_media.uuid,
@@ -109,6 +134,28 @@ Python Examples
109134
audio_only.uuid
110135
])
111136
137+
XSTUDIO.api.app.set_viewport_playhead(playhead)
138+
139+
# Some components of xSTUDIO are built with the 'Module' base class. These
140+
# components have attributes which can be queried and modified through the API.
112141
113-
# start playback
142+
# To inspect the attributes you can call the attributes_digest() method thus:
143+
#
144+
print("Viewport attrs: {0}".format(XSTUDIO.api.app.viewport.attributes_digest(verbose=True).dump(pad=2)))
145+
print("Playhead attrs: {0}".format(playhead.attributes_digest(True).dump(pad=2)))
146+
147+
# By inspecting the attributes on the playhead, we can see the compare attr
148+
# and it's options ... by setting to String the playhead will string together
149+
# the selected media in a (most basic) sequence. Other options are 'A/B' or 'Off'.
150+
playhead.set_attribute("Compare", "String")
151+
152+
# while we're at it let's set the viewport to 'Best' fit, so the whole image is
153+
# fitted to the viewport area
154+
XSTUDIO.api.app.viewport.set_attribute("Fit (F)", "Best")
155+
156+
# start playback
114157
playhead.playing = True
158+
159+
# We can also interact with the 'colour_pipeline' object (the OCIO colour
160+
# management plugin), for example
161+
XSTUDIO.api.app.colour_pipeline.set_attribute("Exposure", 0.5)

docs/user_docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
# built documents.
5656
#
5757
# The short X.Y version.
58-
version = '0.9'
58+
version = '0.10'
5959
# The full version, including alpha/beta/rc tags.
60-
release = '0.9 (alpha)'
60+
release = '0.10 (alpha)'
6161

6262
# The language for content autogenerated by Sphinx. Refer to documentation
6363
# for a list of supported languages.

docs/user_docs/overview.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ xSTUDIO is a media playback and review application designed for professionals wo
1111
xSTUDIO is optimised to import and handle very large collections of media sources rapidly, loads specialised image formats and displays images with colour management. Users can quickly import, organise and group media into playlists and 'subsets', playing through and looping on media items and adding review notes and sketched annotations, allowing one to view the media in a highly interactive and collaborative way. This enables workflows that are essential for teams in VFX, animation and other post-production activities who need to see, on demand, the artwork that they and their colleagues are creating. For example one can jump between the viewed media source instantaneously, inspect pixels close-up, do frame-by-frame comparisons across multiple media sources, annotate the media with drawings and captions or add feedback notes to share.
1212

1313

14-
Current Version: v0.9 (alpha) - Overview
14+
Current Version: v0.10 (alpha) - Overview
1515
*****************************************
1616

1717
This version of the application is a robust and high performance playback and review solution. xSTUDIO has been deployed at DNEG since September 2022 and is in daily use by thousands of VFX and Animation artists, supervisors and producers across our global teams to conduct image reviews.
@@ -46,7 +46,7 @@ Here are some key features for users that are available now:
4646
5. 'Snapshot' button allows you to save an annotation to disk as a jpeg /tiff etc image.
4747
- Navigate your media collection through the notes interface by jumping directly to bookmarked frames.
4848

49-
.. image:: ../images/interface-01.png
49+
.. image:: images/interface-01.png
5050

5151
**The Viewer**
5252

docs/user_docs/release_notes/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Release Notes
55
=============
66

77
==============
8-
v0.9.0 (Alpha)
8+
v0.10.0 (Alpha)
99
==============
1010

1111
This intial open source version of xSTUDIO should be considered as a 'preview' release as the development team get to grips with maintaining the code base on a public repo. There are still some major features under development so we expect some parts of the code to change and expand considerably.

include/xstudio/atoms.hpp

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const std::string colour_pipeline_registry{"COLOURPIPELINE"};
2929
const std::string embedded_python_registry{"EMBEDDEDPYTHON"};
3030
const std::string global_event_group{"XSTUDIO_EVENTS"};
3131
const std::string global_registry{"GLOBAL"};
32+
const std::string global_playhead_events_actor{"GLOBALPLAYHEADEVENTS"};
3233
const std::string global_store_registry{"GLOBALSTORE"};
3334
const std::string image_cache_registry{"IMAGECACHE"};
3435
const std::string keyboard_events{"KEYBOARDEVENTS"};
@@ -88,7 +89,6 @@ namespace colour_pipeline {
8889
} // namespace colour_pipeline
8990

9091
namespace media {
91-
class FrameRequestList;
9292
class MediaDetail;
9393
class MediaKey;
9494
class AVFrameID;
@@ -105,6 +105,7 @@ namespace media_reader {
105105
class AudioBufPtr;
106106
class ImageBufPtr;
107107
class MediaReaderManager;
108+
class PixelInfo;
108109
} // namespace media_reader
109110

110111
namespace thumbnail {
@@ -166,6 +167,7 @@ CAF_ALLOW_UNSAFE_MESSAGE_TYPE(xstudio::media::AVFrameIDsAndTimePoints)
166167
CAF_ALLOW_UNSAFE_MESSAGE_TYPE(xstudio::media_reader::AudioBuffer)
167168
CAF_ALLOW_UNSAFE_MESSAGE_TYPE(xstudio::media_reader::AudioBufPtr)
168169
CAF_ALLOW_UNSAFE_MESSAGE_TYPE(xstudio::media_reader::ImageBufPtr)
170+
CAF_ALLOW_UNSAFE_MESSAGE_TYPE(xstudio::media_reader::PixelInfo)
169171
CAF_ALLOW_UNSAFE_MESSAGE_TYPE(xstudio::ui::Hotkey)
170172

171173
// clang-format off
@@ -198,6 +200,7 @@ CAF_BEGIN_TYPE_ID_BLOCK(xstudio_simple_types, first_custom_type_id)
198200
CAF_ADD_TYPE_ID(xstudio_simple_types, (xstudio::media_reader::AudioBufPtr))
199201
CAF_ADD_TYPE_ID(xstudio_simple_types, (xstudio::media_reader::ImageBufPtr))
200202
CAF_ADD_TYPE_ID(xstudio_simple_types, (xstudio::media_reader::MRCertainty))
203+
CAF_ADD_TYPE_ID(xstudio_simple_types, (xstudio::media_reader::PixelInfo))
201204
CAF_ADD_TYPE_ID(xstudio_simple_types, (xstudio::playhead::CompareMode))
202205
CAF_ADD_TYPE_ID(xstudio_simple_types, (xstudio::playhead::LoopMode))
203206
CAF_ADD_TYPE_ID(xstudio_simple_types, (xstudio::playhead::OverflowMode))
@@ -406,6 +409,9 @@ CAF_BEGIN_TYPE_ID_BLOCK(xstudio_framework_atoms, xstudio_complex_types_last_type
406409
CAF_ADD_ATOM(xstudio_framework_atoms, xstudio::utility, version_atom)
407410

408411
// **************** add new entries here ******************
412+
CAF_ADD_ATOM(xstudio_framework_atoms, xstudio::global, get_global_playhead_events_atom)
413+
CAF_ADD_ATOM(xstudio_framework_atoms, xstudio::module, attribute_uuids_atom)
414+
CAF_ADD_ATOM(xstudio_framework_atoms, xstudio::global, get_actor_from_registry_atom)
409415

410416
CAF_END_TYPE_ID_BLOCK(xstudio_framework_atoms)
411417

@@ -524,7 +530,7 @@ CAF_BEGIN_TYPE_ID_BLOCK(xstudio_session_atoms, xstudio_plugin_atoms_last_type_id
524530
CAF_ADD_ATOM(xstudio_session_atoms, xstudio::playlist, get_media_atom)
525531
CAF_ADD_ATOM(xstudio_session_atoms, xstudio::playlist, get_media_uuid_atom)
526532
CAF_ADD_ATOM(xstudio_session_atoms, xstudio::playlist, get_next_media_atom)
527-
CAF_ADD_ATOM(xstudio_session_atoms, xstudio::playlist, get_playheads_atom)
533+
CAF_ADD_ATOM(xstudio_session_atoms, xstudio::playlist, get_playhead_atom)
528534
CAF_ADD_ATOM(xstudio_session_atoms, xstudio::playlist, insert_container_atom)
529535
CAF_ADD_ATOM(xstudio_session_atoms, xstudio::playlist, loading_media_atom)
530536
CAF_ADD_ATOM(xstudio_session_atoms, xstudio::playlist, media_content_changed_atom)
@@ -665,6 +671,10 @@ CAF_BEGIN_TYPE_ID_BLOCK(xstudio_playback_atoms, xstudio_session_atoms_last_type_
665671
// **************** add new entries here ******************
666672
CAF_ADD_ATOM(xstudio_playback_atoms, xstudio::playhead, last_frame_media_pointer_atom)
667673
CAF_ADD_ATOM(xstudio_playback_atoms, xstudio::colour_pipeline, display_colour_transform_hash_atom)
674+
CAF_ADD_ATOM(xstudio_playback_atoms, xstudio::colour_pipeline, pixel_info_atom)
675+
CAF_ADD_ATOM(xstudio_playback_atoms, xstudio::playhead, media_logical_frame_atom)
676+
677+
668678

669679
CAF_END_TYPE_ID_BLOCK(xstudio_playback_atoms)
670680

@@ -701,6 +711,8 @@ CAF_BEGIN_TYPE_ID_BLOCK(xstudio_ui_atoms, xstudio_playback_atoms_last_type_id+10
701711
CAF_ADD_ATOM(xstudio_ui_atoms, xstudio::ui::viewport, viewport_set_scene_coordinates_atom)
702712

703713
// **************** add new entries here ******************
714+
CAF_ADD_ATOM(xstudio_ui_atoms, xstudio::ui::viewport, enable_hud_atom)
715+
CAF_ADD_ATOM(xstudio_ui_atoms, xstudio::ui::keypress_monitor, hotkey_atom)
704716

705717
CAF_END_TYPE_ID_BLOCK(xstudio_ui_atoms)
706718

include/xstudio/audio/audio_output_actor.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,6 @@ class AudioOutputControlActor : public caf::event_based_actor {
6767
int video_frame_ = {0};
6868
int retry_on_error_ = {0};
6969
utility::Uuid uuid_ = {utility::Uuid::generate()};
70+
utility::Uuid sub_playhead_uuid_;
7071
};
7172
} // namespace xstudio::audio

include/xstudio/audio/audio_output_device.hpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,20 @@ class AudioOutputDevice {
2828
*/
2929
virtual ~AudioOutputDevice() = default;
3030

31+
/**
32+
* @brief Open the connection to the sounding device
33+
*
34+
* @details Note this will be called everytime audio playback starts
35+
*/
36+
virtual void connect_to_soundcard() = 0;
37+
38+
/**
39+
* @brief Close the connection to the sounding device
40+
*
41+
* @details Note this will be called everytime audio playback stops
42+
*/
43+
virtual void disconnect_from_soundcard() = 0;
44+
3145
/**
3246
* @brief Query the soundcard for how many samples it would like to recieve for
3347
* playback

include/xstudio/bookmark/bookmark_actor.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace bookmark {
2929

3030
void build_annotation_via_plugin(const utility::JsonStore &anno_data);
3131

32-
void set_owner(caf::actor owner);
32+
void set_owner(caf::actor owner, const bool dead = false);
3333

3434

3535
private:

0 commit comments

Comments
 (0)