Skip to content

Commit e78eb84

Browse files
committed
Adding Blackmagic Designs Decklink SDI card video output plugin
1 parent b4672a6 commit e78eb84

164 files changed

Lines changed: 22154 additions & 45 deletions

File tree

Some content is hidden

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

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ option(OTIO_SUBMODULE "Automatically build OpenTimelineIO as a submodule" OFF)
2020
option(USE_VCPKG "Use Vcpkg for package management" OFF)
2121
option(BUILD_PYSIDE_WIDGETS "Build xstudio player as PySide widget" OFF)
2222
option(OPENIMAGEIO_PLUGIN "Include the OpenImageIO PLugin" ON)
23+
option(BMD_DECKLINK_PLUGIN "Include the Blackmagic DeckLink SDI Card Video Output Plugin" ON)
2324

2425
if(WIN32)
2526
set(USE_VCPKG ON)

CMakePresets.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
"binaryDir": "${sourceDir}/build",
88
"cacheVariables": {
99
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/../vcpkg/scripts/buildsystems/vcpkg.cmake",
10-
"Qt6_DIR": "/Users/tedwaine/Qt6/6.5.3/macos/lib/cmake/Qt6",
10+
"Qt6_DIR": "C:\\Qt6\\6.5.3\\msvc2019_64\\lib\\cmake\\Qt6",
1111
"CMAKE_INSTALL_PREFIX": "xstudio_install",
1212
"X_VCPKG_APPLOCAL_DEPS_INSTALL": "ON",
1313
"BUILD_DOCS": "OFF",
1414
"USE_VCPKG": "ON",
15-
"STUDIO_PLUGINS": ""
15+
"STUDIO_PLUGINS": "",
16+
"BMD_DECKLINK_PLUGIN": "OFF"
1617
}
1718
},
1819
{

cmake/macros.cmake

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,15 @@ if (BUILD_TESTING)
8484
endif (BUILD_TESTING)
8585
8686
macro(default_options_local name)
87+
8788
if (NOT CAF_FOUND)
8889
find_package(CAF COMPONENTS core io)
8990
endif (NOT CAF_FOUND)
9091
9192
find_package(spdlog CONFIG REQUIRED)
9293
9394
default_compile_options(${name})
95+
9496
target_include_directories(${name}
9597
PUBLIC
9698
$<BUILD_INTERFACE:${ROOT_DIR}/include>
@@ -100,19 +102,27 @@ macro(default_options_local name)
100102
SYSTEM PUBLIC
101103
$<BUILD_INTERFACE:${ROOT_DIR}/extern/include>
102104
)
105+
103106
if (APPLE)
104-
set_target_properties(${name}
105-
PROPERTIES
106-
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/xSTUDIO.app/Contents/Frameworks"
107-
INSTALL_RPATH "@executable_path/../Frameworks"
108-
INSTALL_RPATH_USE_LINK_PATH TRUE
109-
)
110-
else()
107+
set_target_properties(${name}
108+
PROPERTIES
109+
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/xSTUDIO.app/Contents/Frameworks"
110+
INSTALL_RPATH "@executable_path/../Frameworks"
111+
INSTALL_RPATH_USE_LINK_PATH TRUE
112+
)
113+
elseif(UNIX)
111114
set_target_properties(${name}
112115
PROPERTIES
113116
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/lib"
114117
)
118+
else()
119+
set_target_properties(${name}
120+
PROPERTIES
121+
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
122+
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
123+
)
115124
endif()
125+
116126
endmacro()
117127
118128
macro(default_options name)
@@ -203,7 +213,7 @@ macro(default_plugin_options name)
203213
add_custom_command(
204214
TARGET ${PROJECT_NAME}
205215
POST_BUILD
206-
COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:${PROJECT_NAME}>" "${CMAKE_CURRENT_BINARY_DIR}/plugin"
216+
COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:${PROJECT_NAME}>" "${CMAKE_BINARY_DIR}/share/xstudio/plugin"
207217
)
208218
endif()
209219
@@ -227,9 +237,15 @@ macro(add_plugin_qml name _dir)
227237
foreach(DIR ${DIRS})
228238
if(IS_DIRECTORY ${DIR})
229239
cmake_path(GET DIR FILENAME dirname)
230-
add_custom_command(TARGET ${name}_COPY_QML POST_BUILD
231-
COMMAND ${CMAKE_COMMAND} -E
232-
copy_directory ${DIR} ${CMAKE_BINARY_DIR}/bin/plugin/qml/${dirname})
240+
if (WIN32)
241+
add_custom_command(TARGET ${name}_COPY_QML POST_BUILD
242+
COMMAND ${CMAKE_COMMAND} -E
243+
copy_directory ${DIR} ${CMAKE_BINARY_DIR}/share/xstudio/plugin/qml/${dirname})
244+
else()
245+
add_custom_command(TARGET ${name}_COPY_QML POST_BUILD
246+
COMMAND ${CMAKE_COMMAND} -E
247+
copy_directory ${DIR} ${CMAKE_BINARY_DIR}/bin/plugin/qml/${dirname})
248+
endif()
233249
install(DIRECTORY ${DIR} DESTINATION share/xstudio/plugin/qml)
234250
endif()
235251
endforeach()
@@ -504,9 +520,15 @@ macro(add_preference name path target)
504520
505521
else()
506522
507-
add_custom_command(TARGET ${target} POST_BUILD
523+
if (WIN32)
524+
add_custom_command(TARGET ${target} POST_BUILD
525+
COMMAND ${CMAKE_COMMAND} -E copy ${path}/${name}
526+
${CMAKE_BINARY_DIR}/share/xstudio/preference/${name})
527+
else()
528+
add_custom_command(TARGET ${target} POST_BUILD
508529
COMMAND ${CMAKE_COMMAND} -E copy ${path}/${name}
509530
${CMAKE_BINARY_DIR}/bin/preference/${name})
531+
endif()
510532
511533
if(INSTALL_XSTUDIO)
512534
install(FILES

docs/Doxyfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ PROJECT_LOGO =
5858
# entered, it will be relative to the location where doxygen was started. If
5959
# left blank the current directory will be used.
6060

61-
OUTPUT_DIRECTORY = "_build/doxygen"
61+
OUTPUT_DIRECTORY = "/user_data/ted/xstudio/__build2/docs/docs/doxygen"
6262

6363
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
6464
# directories (in 2 levels) under the output directory of each output format and
@@ -731,7 +731,7 @@ WARN_FORMAT = "$file:$line: $text"
731731
# messages should be written. If left blank the output is written to standard
732732
# error (stderr).
733733

734-
WARN_LOGFILE = "_build/doxygen/log.txt
734+
WARN_LOGFILE = "/user_data/ted/xstudio/__build2/docs/docs/doxygen/log.txt
735735

736736
#---------------------------------------------------------------------------
737737
# Configuration options related to the input files
@@ -743,9 +743,9 @@ WARN_LOGFILE = "_build/doxygen/log.txt
743743
# spaces.
744744
# Note: If this tag is empty the current directory is searched.
745745

746-
INPUT = "../include/" \
747-
"../src/" \
748-
"../python/src/"
746+
INPUT = "/user_data/ted/xstudio/include/" \
747+
"/user_data/ted/xstudio/src/" \
748+
"/user_data/ted/xstudio/python/src/"
749749

750750
# This tag can be used to specify the character encoding of the source files
751751
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
breathe_default_project = "xStudio"
5353
breathe_projects = {
54-
"xStudio": "_build/doxygen/xml"
54+
"xStudio": "/user_data/ted/xstudio/__build2/docs/docs/doxygen/xml"
5555
}
5656

5757

include/xstudio/module/module.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ namespace module {
339339
// top/bottom of the viewport
340340
Attribute *register_viewport_dockable_widget(
341341
const std::string &widget_name,
342-
const std::string &button_icon_qrc_path,
342+
const std::string &button_icon_qrc_path_or_custom_button_qml,
343343
const std::string &button_tooltip,
344344
const float button_position,
345345
const bool enabled,

include/xstudio/ui/viewport/video_output_plugin.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,12 @@ namespace ui {
166166

167167
caf::actor offscreen_viewport() const { return offscreen_viewport_; }
168168

169+
// Access the colour pipeline actor of your viewport. You can send it messages
170+
// to request or set attributes that control the OCIO colour management
171+
// for media in the video output. See blackmagic_decklink/src/decklink_colour_pipeline.cpp
172+
// for an example of this.
173+
caf::actor colour_pipeline() const { return offscreen_colour_pipeline_; }
174+
169175
protected:
170176
caf::message_handler message_handler_extensions() override {
171177
return message_handler_extensions_;
@@ -192,6 +198,7 @@ namespace ui {
192198
caf::actor audio_output_;
193199
caf::actor offscreen_viewport_;
194200
caf::actor main_viewport_;
201+
caf::actor offscreen_colour_pipeline_;
195202
caf::message_handler message_handler_extensions_;
196203
FitMode previous_fit_mode_ = {FitMode::Best};
197204
int video_delay_millisecs_ = {0};

python/src/xstudio/testbed/client.py

100755100644
File mode changed.

python/src/xstudio/testbed/server.py

100755100644
File mode changed.

python/src/xstudio/testbed/session.py

100755100644
File mode changed.

0 commit comments

Comments
 (0)