From 1474da7ab7a00d103e8e2974a210564201f51270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Garramu=C3=B1o?= Date: Tue, 24 Oct 2023 05:05:00 -0300 Subject: [PATCH] Bug fixes. Reverted to previous tlRender commit. --- mrv2/CMakeLists.txt | 7 +- mrv2/docs/HISTORY.md | 1 + mrv2/lib/mrvApp/App.cpp | 14 +++- mrv2/lib/mrvEdit/mrvEditCallbacks.cpp | 111 ++++++++++++-------------- mrv2/lib/mrvEdit/mrvEditCallbacks.h | 8 +- mrv2/lib/mrvFl/mrvPreferences.cpp | 28 +++---- mrv2/lib/mrvFl/mrvSession.cpp | 13 ++- mrv2/lib/mrvGL/mrvGLViewport.cpp | 56 +++---------- mrv2/lib/mrvGL/mrvTimelineWidget.cpp | 17 ++-- mrv2/lib/mrvGL/mrvTimelineWidget.h | 2 +- mrv2/lib/mrvNetwork/mrvInsertData.cpp | 26 ++++++ mrv2/lib/mrvNetwork/mrvInsertData.h | 23 ++++++ mrv2/lib/mrvWidgets/mrvVersion.cpp | 5 +- tlRender | 2 +- 14 files changed, 173 insertions(+), 140 deletions(-) create mode 100644 mrv2/lib/mrvNetwork/mrvInsertData.cpp create mode 100644 mrv2/lib/mrvNetwork/mrvInsertData.h diff --git a/mrv2/CMakeLists.txt b/mrv2/CMakeLists.txt index 34b30d344..2185daac3 100644 --- a/mrv2/CMakeLists.txt +++ b/mrv2/CMakeLists.txt @@ -51,7 +51,12 @@ if(FLTK_BUILD_SHARED_LIBS) endif() endif() else() - set(FLTK_LIBRARIES ${CMAKE_INSTALL_PREFIX}/lib/libfltk.lib glu32 comctl32 ws2_32 opengl32 gdiplus) + if (CMAKE_BUILD_TYPE STREQUAL "Debug") + set(FLTK_LIBRARIES ${CMAKE_INSTALL_PREFIX}/lib/libfltkd.lib) + else() + set(FLTK_LIBRARIES ${CMAKE_INSTALL_PREFIX}/lib/libfltk.lib) + endif() + list(APPEND FLTK_LIBRARIES glu32 comctl32 ws2_32 opengl32 gdiplus) set(FLTK_gl_LIBRARY ${FLTK_LIBRARIES} ) endif() else() diff --git a/mrv2/docs/HISTORY.md b/mrv2/docs/HISTORY.md index f5ffb14ed..1bf44d3b8 100644 --- a/mrv2/docs/HISTORY.md +++ b/mrv2/docs/HISTORY.md @@ -42,6 +42,7 @@ v0.8.2 - Fixed a random OpenGL error when creating the color texture in the main viewport. - Fixed EDL creation for movies that did not have audio. +- Fixed selecting the wrong clip when loading a session from the command-line. v0.8.1 diff --git a/mrv2/lib/mrvApp/App.cpp b/mrv2/lib/mrvApp/App.cpp index 145e195d2..6ce759b9a 100644 --- a/mrv2/lib/mrvApp/App.cpp +++ b/mrv2/lib/mrvApp/App.cpp @@ -648,6 +648,8 @@ namespace mrv p.devicesModel->setHDRData(data); } + DBG; + p.logObserver = observer::ListObserver::create( ui->app->getContext()->getLogSystem()->observeLog(), [this](const std::vector& value) @@ -693,9 +695,11 @@ namespace mrv }); #endif + DBG; cacheUpdate(); _audioUpdate(); + DBG; // Open the input files. if (!p.options.fileNames.empty()) { @@ -715,8 +719,6 @@ namespace mrv } } - p.filesModel->setA(0); - if (!p.timelinePlayers.empty() && p.timelinePlayers[0]) { if (p.options.speed > 0.0) @@ -751,13 +753,14 @@ namespace mrv p.filesModel->setB(numFiles - 1, true); } - if (!p.options.fileNames.empty()) + if (!p.options.fileNames.empty() && !p.session) { auto model = filesModel(); if (model->observeFiles()->getSize() > 0) model->setA(0); } + DBG; #ifdef MRV2_NETWORK if (p.options.server) { @@ -784,18 +787,23 @@ namespace mrv } #endif + DBG; ui->uiMain->show(); ui->uiView->take_focus(); + DBG; + if (!p.session) Preferences::open_windows(); ui->uiMain->fill_menu(ui->uiMenuBar); + DBG; if (ui->uiSecondary) { // We raise the secondary window last, so it shows at front ui->uiSecondary->window()->show(); } + DBG; } void App::cleanResources() diff --git a/mrv2/lib/mrvEdit/mrvEditCallbacks.cpp b/mrv2/lib/mrvEdit/mrvEditCallbacks.cpp index 0e8e16b73..0346f0ab8 100644 --- a/mrv2/lib/mrvEdit/mrvEditCallbacks.cpp +++ b/mrv2/lib/mrvEdit/mrvEditCallbacks.cpp @@ -34,7 +34,7 @@ namespace fs = std::filesystem; #include "mrvDraw/Annotation.h" #include "mrvNetwork/mrvTCP.h" -#include "mrvNetwork/mrvMoveData.h" +#include "mrvNetwork/mrvInsertData.h" #include "mrvPanels/mrvPanelsCallbacks.h" @@ -593,6 +593,7 @@ namespace mrv auto duration = time::round( range.duration().rescaled_to(sampleRate)); range = TimeRange(start, duration); + duration = duration.rescaled_to(videoRate); clip->set_source_range(range); } } @@ -1257,7 +1258,7 @@ namespace mrv refresh_file_cache_cb(nullptr, ui); } - void moveAnnotations( + void shiftAnnotations( const otime::TimeRange& range, const otime::RationalTime& insertTime, const bool previous, ViewerUI* ui) { @@ -1794,8 +1795,8 @@ namespace mrv tcp->unlock(); } - void edit_move_clip_annotations( - const std::vector& moves, ViewerUI* ui) + void edit_insert_clip_annotations( + const std::vector& inserts, ViewerUI* ui) { auto player = ui->uiView->getTimelinePlayer(); if (!player) @@ -1813,73 +1814,62 @@ namespace mrv const auto& stack = timeline->tracks(); const auto& tracks = stack->children(); - for (const auto& move : moves) + for (const auto& insert : inserts) { - if (move.fromTrack < 0 || move.fromTrack >= tracks.size() || - move.toTrack < 0 || move.toTrack >= tracks.size()) + const int oldIndex = insert.oldIndex; + const int oldTrackIndex = insert.oldTrackIndex; + if (oldIndex < 0 || oldTrackIndex < 0 || insert.trackIndex < 0 || + insert.trackIndex >= tracks.size()) continue; if (auto track = otio::dynamic_retainer_cast( - stack->children()[move.fromTrack])) + stack->children()[oldTrackIndex])) { if (track->kind() != otio::Track::Kind::video) continue; } - int toIndex = move.toIndex; - if (move.fromTrack == move.toTrack && move.fromIndex < toIndex) + int insertIndex = insert.insertIndex; + if (oldTrackIndex == insert.trackIndex && oldIndex < insertIndex) { - --toIndex; + --insertIndex; } if (auto track = otio::dynamic_retainer_cast( - tracks[move.fromTrack])) + tracks[oldTrackIndex])) { - auto child = track->children()[move.fromIndex]; + auto child = track->children()[oldIndex]; auto item = otio::dynamic_retainer_cast(child); if (!item) continue; - auto fromRange = item->trimmed_range_in_parent().value(); + auto oldRange = item->trimmed_range_in_parent().value(); if (auto track = otio::dynamic_retainer_cast( - tracks[move.toTrack])) + tracks[insert.trackIndex])) { - auto child = track->children()[toIndex]; + auto child = track->children()[insertIndex]; auto item = otio::dynamic_retainer_cast(child); if (!item) continue; - auto toRange = item->trimmed_range_in_parent().value(); + auto insertRange = item->trimmed_range_in_parent().value(); otime::RationalTime insertTime; - bool previous = toIndex > move.fromIndex; + bool previous = insertIndex > oldIndex; if (previous) { - insertTime = - toRange.end_time_exclusive() - fromRange.duration(); + insertTime = insertRange.end_time_exclusive(); } else { - insertTime = toRange.start_time(); + insertTime = insertRange.start_time(); } // // Shift annotations // - // std::cerr << "---------------------------------------" - // << std::endl; - // std::cerr << "IS PREV: " << previous << std::endl; - // std::cerr << " FROM: " << move.fromIndex << " " - // << fromRange << std::endl; - // std::cerr << " TO: " << move.toIndex - // << " RANGE: " << toRange << std::endl; - // std::cerr << "CORR.TO: " << toIndex << " RANGE: " << - // toRange - // << std::endl; - // std::cerr << " PREV: " << previousRange << std::endl; - // std::cerr << " TO: " << insertTime << std::endl; - moveAnnotations(fromRange, insertTime, previous, ui); + shiftAnnotations(oldRange, insertTime, previous, ui); } } } @@ -1887,63 +1877,68 @@ namespace mrv ui->uiTimeline->redraw(); } - void edit_move_clip(const std::vector& moves, ViewerUI* ui) + void + edit_insert_clip(const std::vector& inserts, ViewerUI* ui) { auto player = ui->uiView->getTimelinePlayer(); if (!player) return; - std::vector moveData; + std::vector insertData; const auto& timeline = player->getTimeline(); const auto& stack = timeline->tracks(); const auto& tracks = stack->children(); - for (const auto& move : moves) + for (const auto& insert : inserts) { + const int oldIndex = insert.oldIndex; + const int oldTrackIndex = insert.oldTrackIndex; + if (auto track = otio::dynamic_retainer_cast( - tracks[move.fromTrack])) + tracks[oldTrackIndex])) { - if (auto child = track->children()[move.fromIndex]) + if (auto child = track->children()[oldIndex]) { auto item = otio::dynamic_retainer_cast(child); if (!item) continue; - timeline::MoveData data; - data.fromTrack = move.fromTrack; - data.fromIndex = move.fromIndex; - data.toTrack = move.toTrack; - data.toIndex = move.toIndex; - moveData.push_back(data); + timeline::InsertData data; + data.composable = child; + data.trackIndex = insert.trackIndex; + data.insertIndex = insert.insertIndex; + insertData.push_back(data); } } } - auto otioTimeline = tl::timeline::move(timeline, moveData); + auto otioTimeline = tl::timeline::insert(timeline, insertData); player->player()->getTimeline()->setTimeline(otioTimeline); - edit_move_clip_annotations(moves, ui); + edit_insert_clip_annotations(inserts, ui); } - void edit_move_clip_annotations( - const std::vector& moves, ViewerUI* ui) + void edit_insert_clip_annotations( + const std::vector& inserts, ViewerUI* ui) { auto player = ui->uiView->getTimelinePlayer(); if (!player) return; // Convert tlRender data to mrv2's one. - std::vector networkMoveData; - for (const auto& move : moves) + std::vector networkInsertData; + for (const auto& insert : inserts) { - MoveData networkMove; - networkMove.fromIndex = move.fromIndex; - networkMove.fromTrack = move.fromTrack; - networkMove.toTrack = move.toTrack; - networkMove.toIndex = move.toIndex; - networkMoveData.push_back(networkMove); + const int oldIndex = getIndex(insert.composable); + const int oldTrackIndex = getIndex(insert.composable->parent()); + InsertData networkInsert; + networkInsert.oldIndex = oldIndex; + networkInsert.oldTrackIndex = oldTrackIndex; + networkInsert.trackIndex = insert.trackIndex; + networkInsert.insertIndex = insert.insertIndex; + networkInsertData.push_back(networkInsert); } - edit_move_clip_annotations(networkMoveData, ui); + edit_insert_clip_annotations(networkInsertData, ui); } EditMode editMode = EditMode::kTimeline; diff --git a/mrv2/lib/mrvEdit/mrvEditCallbacks.h b/mrv2/lib/mrvEdit/mrvEditCallbacks.h index 22195778b..a6032baeb 100644 --- a/mrv2/lib/mrvEdit/mrvEditCallbacks.h +++ b/mrv2/lib/mrvEdit/mrvEditCallbacks.h @@ -22,7 +22,7 @@ namespace mrv class TimelinePlayer; using otio::Timeline; - struct MoveData; + struct InsertData; //@{ //! Store timeline in undo queue. @@ -38,12 +38,12 @@ namespace mrv bool edit_has_redo(); //! Handle insert of clip (used in shifting clips around in tlRender). - void edit_move_clip_annotations( - const std::vector& inserts, ViewerUI* ui); + void edit_insert_clip_annotations( + const std::vector& inserts, ViewerUI* ui); //! Handle insert of clip annotations from network. void - edit_move_clip(const std::vector& inserts, ViewerUI* ui); + edit_insert_clip(const std::vector& inserts, ViewerUI* ui); //! Set the temporary EDL for a drag item callback. void toOtioFile(TimelinePlayer*, ViewerUI* ui); diff --git a/mrv2/lib/mrvFl/mrvPreferences.cpp b/mrv2/lib/mrvFl/mrvPreferences.cpp index 2c49f3762..c5979bac0 100644 --- a/mrv2/lib/mrvFl/mrvPreferences.cpp +++ b/mrv2/lib/mrvFl/mrvPreferences.cpp @@ -135,8 +135,7 @@ namespace mrv LOG_INFO(msg); - Fl_Preferences base( - prefspath().c_str(), "filmaura", "mrv2", Fl_Preferences::C_LOCALE); + Fl_Preferences base(prefspath().c_str(), "filmaura", "mrv2"); base.get("version", version, kPreferencesVersion); @@ -163,7 +162,7 @@ namespace mrv value = tmp; break; case 'f': - fltk_settings.get(key, tmpF, 0.0f); + fltk_settings.get(key, tmpF, 0.F); value = tmpF; break; case 'd': @@ -186,6 +185,7 @@ namespace mrv settingsObject->setValue(keyS, value); } } + DBG3; Fl_Preferences recent_files(base, "recentFiles"); num = recent_files.entries(); @@ -207,6 +207,7 @@ namespace mrv } } + DBG3; Fl_Preferences recent_hosts(base, "recentHosts"); num = recent_hosts.entries(); settingsObject->addRecentHost("localhost"); @@ -226,6 +227,7 @@ namespace mrv } } + DBG3; Fl_Preferences python_scripts(base, "pythonScripts"); num = python_scripts.entries(); for (unsigned i = num; i > 0; --i) @@ -249,6 +251,7 @@ namespace mrv settingsObject->reset(); } + DBG3; // // Get ui preferences // @@ -391,6 +394,7 @@ namespace mrv view.get("zoom_speed", tmp, 2); uiPrefs->uiPrefsZoomSpeed->value(tmp); + DBG3; // // ui/colors // @@ -711,8 +715,7 @@ namespace mrv char key[256]; Fl_Preferences path_mapping( - prefspath().c_str(), "filmaura", "mrv2.paths", - Fl_Preferences::C_LOCALE); + prefspath().c_str(), "filmaura", "mrv2.paths"); num = path_mapping.entries(); for (int i = 0; i < num; ++i) { @@ -930,8 +933,7 @@ namespace mrv Fl_Preferences base( prefspath().c_str(), "filmaura", "mrv2", - (Fl_Preferences::Root)( - (int)Fl_Preferences::C_LOCALE | (int)Fl_Preferences::CLEAR)); + (Fl_Preferences::Root)(int)Fl_Preferences::CLEAR); base.set("version", kPreferencesVersion); Fl_Preferences fltk_settings(base, "settings"); @@ -1255,8 +1257,7 @@ namespace mrv char key[256]; Fl_Preferences path_mapping( prefspath().c_str(), "filmaura", "mrv2.paths", - (Fl_Preferences::Root)( - (int)Fl_Preferences::C_LOCALE | (int)Fl_Preferences::CLEAR)); + (Fl_Preferences::Root)((int)Fl_Preferences::CLEAR)); path_mapping.clear(); for (int i = 2; i <= uiPrefs->PathMappings->size(); ++i) { @@ -1305,9 +1306,7 @@ namespace mrv Fl_Preferences keys( prefspath().c_str(), "filmaura", hotkeys_file.c_str(), - (Fl_Preferences::Root)( - (int)Fl_Preferences::C_LOCALE | - (int)Fl_Preferences::CLEAR)); + (Fl_Preferences::Root)((int)Fl_Preferences::CLEAR)); save_hotkeys(keys); msg = tl::string::Format( @@ -1636,6 +1635,8 @@ namespace mrv ui->uiMain->always_on_top(value); } + DBG3; + SecondaryWindow* secondary = ui->uiSecondary; if (secondary) { @@ -1744,8 +1745,7 @@ namespace mrv } } - Fl_Preferences base( - prefspath().c_str(), "filmaura", "mrv2", Fl_Preferences::C_LOCALE); + Fl_Preferences base(prefspath().c_str(), "filmaura", "mrv2"); Fl_Preferences gui(base, "ui"); gui.set("single_instance", uiPrefs->uiPrefsSingleInstance->value()); gui.set( diff --git a/mrv2/lib/mrvFl/mrvSession.cpp b/mrv2/lib/mrvFl/mrvSession.cpp index 2c7d1d180..d9769e526 100644 --- a/mrv2/lib/mrvFl/mrvSession.cpp +++ b/mrv2/lib/mrvFl/mrvSession.cpp @@ -47,6 +47,8 @@ namespace w->show(); else w->hide(); + mrv::App::ui->uiRegion->layout(); + mrv::App::ui->uiViewGroup->layout(); } } // namespace @@ -640,8 +642,15 @@ namespace mrv if (version >= 6) { - EditMode editMode = session["editMode"]; - set_edit_mode_cb(editMode, ui); + if (ui->uiBottomBar->visible()) + { + EditMode editMode = session["editMode"]; + set_edit_mode_cb(editMode, ui); + } + else + { + set_edit_mode_cb(EditMode::kNone, ui); + } } } catch (const std::exception& e) diff --git a/mrv2/lib/mrvGL/mrvGLViewport.cpp b/mrv2/lib/mrvGL/mrvGLViewport.cpp index 26188ca95..6d308a27a 100644 --- a/mrv2/lib/mrvGL/mrvGLViewport.cpp +++ b/mrv2/lib/mrvGL/mrvGLViewport.cpp @@ -201,29 +201,19 @@ namespace mrv bool transparent = p.backgroundOptions.type == timeline::Background::Transparent; - if (renderSize.isValid()) + try { - gl::OffscreenBufferOptions offscreenBufferOptions; - try + if (renderSize.isValid()) { + gl::OffscreenBufferOptions offscreenBufferOptions; offscreenBufferOptions.colorType = image::PixelType::RGBA_F32; if (gl::doCreate( gl.background, renderSize, offscreenBufferOptions)) { gl.background = gl::OffscreenBuffer::create( renderSize, offscreenBufferOptions); - CHECK_GL; } - } - catch (const std::exception& e) - { - LOG_WARNING("Creating background: " << e.what()); - gl.background.reset(); - valid(0); - } - try - { if (!p.displayOptions.empty()) { offscreenBufferOptions.colorFilters = @@ -251,17 +241,8 @@ namespace mrv glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); CHECK_GL; } - } - catch (const std::exception& e) - { - LOG_WARNING("Creating buffer: " << e.what()); - gl.buffer.reset(); - valid(0); - } - if (can_do(FL_STEREO)) - { - try + if (can_do(FL_STEREO)) { if (gl::doCreate( gl.stereoBuffer, renderSize, @@ -272,24 +253,15 @@ namespace mrv CHECK_GL; } } - catch (const std::exception& e) - { - LOG_WARNING("Creating stereo buffer: " << e.what()); - gl.stereoBuffer.reset(); - valid(0); - } } - } - else - { - gl.background.reset(); - gl.buffer.reset(); - gl.stereoBuffer.reset(); - } + else + { + gl.background.reset(); + gl.buffer.reset(); + gl.stereoBuffer.reset(); + } - try - { - if (gl.background && gl.render && !transparent) + if (gl.background && !transparent) { gl::OffscreenBufferBinding binding(gl.background); @@ -357,11 +329,9 @@ namespace mrv } catch (const std::exception& e) { - LOG_ERROR("tlRender internal error: " << e.what()); - gl.background.reset(); + LOG_ERROR(e.what()); gl.buffer.reset(); gl.stereoBuffer.reset(); - valid(0); } glViewport(0, 0, GLsizei(viewportSize.w), GLsizei(viewportSize.h)); @@ -385,7 +355,7 @@ namespace mrv glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); CHECK_GL; - if (gl.background && gl.shader && !transparent && !p.presentation) + if (gl.background && !transparent && !p.presentation) { math::Matrix4x4f mvp; mvp = _createTexturedRectangle(); diff --git a/mrv2/lib/mrvGL/mrvTimelineWidget.cpp b/mrv2/lib/mrvGL/mrvTimelineWidget.cpp index 421eba3a9..a9076d400 100644 --- a/mrv2/lib/mrvGL/mrvTimelineWidget.cpp +++ b/mrv2/lib/mrvGL/mrvTimelineWidget.cpp @@ -178,8 +178,8 @@ namespace mrv p.timelineWidget->setFrameView(true); p.timelineWidget->setScrollBarsVisible(false); p.timelineWidget->setStopOnScrub(false); - p.timelineWidget->setMoveCallback(std::bind( - &mrv::TimelineWidget::moveCallback, this, std::placeholders::_1)); + p.timelineWidget->setInsertCallback(std::bind( + &mrv::TimelineWidget::insertCallback, this, std::placeholders::_1)); p.eventLoop->addWidget(p.timelineWidget); const float devicePixelRatio = pixels_per_unit(); @@ -330,7 +330,6 @@ namespace mrv if (p.thumbnailRequestId) { p.thumbnailCreator->cancelRequests(p.thumbnailRequestId); - p.thumbnailRequestId = 0; } if (fetch) @@ -1223,10 +1222,7 @@ namespace mrv if (p.ui->uiPrefs->uiPrefsTimelineThumbnails->value()) { if (p.thumbnailCreator && p.thumbnailRequestId) - { p.thumbnailCreator->cancelRequests(p.thumbnailRequestId); - p.thumbnailRequestId = 0; - } if (!Fl::has_timeout( (Fl_Timeout_Handler)hideThumbnail_cb, this)) { @@ -1262,10 +1258,7 @@ namespace mrv if (p.ui->uiPrefs->uiPrefsTimelineThumbnails->value()) { if (p.thumbnailCreator && p.thumbnailRequestId) - { p.thumbnailCreator->cancelRequests(p.thumbnailRequestId); - p.thumbnailRequestId = 0; - } if (!Fl::has_timeout( (Fl_Timeout_Handler)hideThumbnail_cb, this)) { @@ -1422,13 +1415,13 @@ namespace mrv redraw(); } - void TimelineWidget::moveCallback( - const std::vector& inserts) + void TimelineWidget::insertCallback( + const std::vector& inserts) { TLRENDER_P(); edit_store_undo(p.player, p.ui); edit_clear_redo(p.ui); - edit_move_clip_annotations(inserts, p.ui); + edit_insert_clip_annotations(inserts, p.ui); } void TimelineWidget::single_thumbnail( diff --git a/mrv2/lib/mrvGL/mrvTimelineWidget.h b/mrv2/lib/mrvGL/mrvTimelineWidget.h index 7b824a8cd..f13831338 100644 --- a/mrv2/lib/mrvGL/mrvTimelineWidget.h +++ b/mrv2/lib/mrvGL/mrvTimelineWidget.h @@ -131,7 +131,7 @@ namespace mrv int keyPressEvent(unsigned key, const int modifiers); int keyReleaseEvent(unsigned key, const int modifiers); - void moveCallback(const std::vector&); + void insertCallback(const std::vector&); protected: void _initializeGL(); diff --git a/mrv2/lib/mrvNetwork/mrvInsertData.cpp b/mrv2/lib/mrvNetwork/mrvInsertData.cpp new file mode 100644 index 000000000..59b54e572 --- /dev/null +++ b/mrv2/lib/mrvNetwork/mrvInsertData.cpp @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: BSD-3-Clause +// mrv2 +// Copyright Contributors to the mrv2 Project. All rights reserved. + +#include + +#include "mrvNetwork/mrvInsertData.h" + +namespace mrv +{ + void to_json(nlohmann::json& j, const InsertData& value) + { + j["oldIndex"] = value.oldIndex; + j["oldTrackIndex"] = value.oldTrackIndex; + j["trackIndex"] = value.trackIndex; + j["insertIndex"] = value.insertIndex; + } + + void from_json(const nlohmann::json& j, InsertData& value) + { + j["oldIndex"].get_to(value.oldIndex); + j["oldTrackIndex"].get_to(value.oldTrackIndex); + j["trackIndex"].get_to(value.trackIndex); + j["insertIndex"].get_to(value.insertIndex); + } +} // namespace mrv diff --git a/mrv2/lib/mrvNetwork/mrvInsertData.h b/mrv2/lib/mrvNetwork/mrvInsertData.h new file mode 100644 index 000000000..014930dff --- /dev/null +++ b/mrv2/lib/mrvNetwork/mrvInsertData.h @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: BSD-3-Clause +// mrv2 +// Copyright Contributors to the mrv2 Project. All rights reserved. + +#pragma once + +#include + +namespace mrv +{ + //! Insert data for mrv2 Network connections. + struct InsertData + { + int oldIndex = 0; + int oldTrackIndex = 0; + int trackIndex = 0; + int insertIndex = 0; + }; + + void to_json(nlohmann::json& j, const InsertData& value); + + void from_json(const nlohmann::json& j, InsertData& value); +} // namespace mrv diff --git a/mrv2/lib/mrvWidgets/mrvVersion.cpp b/mrv2/lib/mrvWidgets/mrvVersion.cpp index f24133a6d..48366bfe7 100644 --- a/mrv2/lib/mrvWidgets/mrvVersion.cpp +++ b/mrv2/lib/mrvWidgets/mrvVersion.cpp @@ -639,7 +639,10 @@ namespace mrv << "http://ffmpeg.mplayerhq.hu/" << endl << "License: " << avcodec_license() << endl << "Copyright (c) 2000-Present Fabrice Bellard, et al." << endl - << "Configuration: " << avcodec_configuration() << endl + << "Configuration: " << endl + << "\tavutil: " << avutil_configuration() << endl + << "\tavcodec: " << avcodec_configuration() << endl + << "\tavformat: " << avformat_configuration() << endl << endl; #endif o << "Flmm Color Picker (modified)" << endl diff --git a/tlRender b/tlRender index 1426c33f6..1e15d415f 160000 --- a/tlRender +++ b/tlRender @@ -1 +1 @@ -Subproject commit 1426c33f68bb8b6b17760994b954530e9a5336a2 +Subproject commit 1e15d415f1a0768a1c07924c9bee8deb067fc7c0