update openjpeg and fix timecode shortcut
authorGood Guy <[email protected]>
Wed, 18 May 2022 22:55:19 +0000 (16:55 -0600)
committerGood Guy <[email protected]>
Wed, 18 May 2022 22:55:19 +0000 (16:55 -0600)
cinelerra-5.1/cinelerra/mwindowgui.C
cinelerra-5.1/configure.ac
cinelerra-5.1/thirdparty/src/openjpeg-2.5.0.tar.xz [new file with mode: 0644]

index 43b95cbbd57a9db35c247f0e425c5e40bd90b64c..3b939df5bb6fe3459c093d3835a83bb02a01e3a0 100644 (file)
@@ -1238,7 +1238,27 @@ int MWindowGUI::keypress_event()
 
        case '!':
                if( !ctrl_down() || !shift_down() ) break;
-/* code to execute is same as lines 383-401 in editpopup.C */
+               {
+                       if( mwindow->session->current_operation != NO_OPERATION ) return 1;
+                       first_track = mwindow->edl->tracks->first;
+                       double start = mwindow->edl->local_session->get_selectionstart();
+                       int64_t pos = first_track->to_units(start, 0);
+                       Edit *edit=first_track->edits->editof(pos, PLAY_FORWARD, 0);
+                       if( !edit || !edit->asset ) return 1;
+                       Asset *asset = edit->asset;
+                       double timecode = asset->timecode != -2 ? asset->timecode :
+                               FFMPEG::get_timecode(asset->path,
+                                       edit->track->data_type, edit->channel,
+                                       mwindow->edl->session->frame_rate);
+                       asset->timecode = timecode;
+                       if( timecode >= 0 ) {
+                               int64_t pos = edit->startproject + edit->startsource;
+                               double position = edit->track->from_units(pos);
+                               mwindow->set_timecode_offset(timecode - position);
+                       }
+                       else
+                               mwindow->set_timecode_offset(0);
+               }
                result = 1;
                break;
 
index 5ee692fc02ed7871751a10a1b482aa4e08439d0c..1c9f289d0dc5063cc91e0233729ce3e833ee5293 100644 (file)
@@ -296,7 +296,7 @@ PKG_3RD([opus],[auto],
   [ include ])
 
 PKG_3RD([openjpeg],[auto],
-  [openjpeg-2.4.0],
+  [openjpeg-2.5.0],
   [ bin/libopenjp2.a ],
   [ src/lib/openjp2 ])
 
diff --git a/cinelerra-5.1/thirdparty/src/openjpeg-2.5.0.tar.xz b/cinelerra-5.1/thirdparty/src/openjpeg-2.5.0.tar.xz
new file mode 100644 (file)
index 0000000..d1fbd40
Binary files /dev/null and b/cinelerra-5.1/thirdparty/src/openjpeg-2.5.0.tar.xz differ