vtl: do not lock audio [to video] when extracting audio-only.
This commit is contained in:
parent
d98c5f7aee
commit
dc7878760d
|
@ -3565,7 +3565,8 @@ ARDOUR_UI::add_video (Gtk::Window* float_window)
|
|||
if (!transcode_video_dialog->get_audiofile().empty()) {
|
||||
editor->embed_audio_from_video(
|
||||
transcode_video_dialog->get_audiofile(),
|
||||
video_timeline->get_offset()
|
||||
video_timeline->get_offset(),
|
||||
(transcode_video_dialog->import_option() != VTL_IMPORT_NO_VIDEO)
|
||||
);
|
||||
}
|
||||
switch (transcode_video_dialog->import_option()) {
|
||||
|
|
|
@ -1449,7 +1449,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
void toggle_video_timeline_locked ();
|
||||
void set_video_timeline_locked (const bool);
|
||||
void queue_visual_videotimeline_update ();
|
||||
void embed_audio_from_video (std::string, framepos_t n = 0);
|
||||
void embed_audio_from_video (std::string, framepos_t n = 0, bool lock_position_to_video = true);
|
||||
|
||||
PBD::Signal0<void> EditorFreeze;
|
||||
PBD::Signal0<void> EditorThaw;
|
||||
|
|
|
@ -93,13 +93,10 @@ Editor::toggle_video_timeline_locked ()
|
|||
}
|
||||
|
||||
void
|
||||
Editor::embed_audio_from_video (std::string path, framepos_t n)
|
||||
Editor::embed_audio_from_video (std::string path, framepos_t n, bool lock_position_to_video)
|
||||
{
|
||||
vector<std::string> paths;
|
||||
paths.push_back(path);
|
||||
#if 0
|
||||
do_import (paths, Editing::ImportDistinctFiles, Editing::ImportAsTrack, ARDOUR::SrcBest, n);
|
||||
#else
|
||||
current_interthread_info = &import_status;
|
||||
import_status.current = 1;
|
||||
import_status.total = paths.size ();
|
||||
|
@ -111,13 +108,14 @@ Editor::embed_audio_from_video (std::string path, framepos_t n)
|
|||
boost::shared_ptr<ARDOUR::Track> track;
|
||||
bool ok = (import_sndfiles (paths, Editing::ImportDistinctFiles, Editing::ImportAsTrack, ARDOUR::SrcBest, n, 1, 1, track, false) == 0);
|
||||
if (ok && track) {
|
||||
boost::shared_ptr<ARDOUR::Playlist> pl = track->playlist();
|
||||
pl->find_next_region(n, ARDOUR::End, 0)->set_video_locked(true);
|
||||
if (lock_position_to_video) {
|
||||
boost::shared_ptr<ARDOUR::Playlist> pl = track->playlist();
|
||||
pl->find_next_region(n, ARDOUR::End, 0)->set_video_locked(true);
|
||||
}
|
||||
_session->save_state ("");
|
||||
}
|
||||
|
||||
import_status.all_done = true;
|
||||
#endif
|
||||
unlink(path.c_str());
|
||||
}
|
||||
|
||||
|
|
|
@ -299,7 +299,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible, publi
|
|||
virtual void set_xjadeo_sensitive (bool onoff) = 0;
|
||||
virtual int get_videotl_bar_height () const = 0;
|
||||
virtual void set_video_timeline_height (const int h) = 0;
|
||||
virtual void embed_audio_from_video (std::string, framepos_t n = 0) = 0;
|
||||
virtual void embed_audio_from_video (std::string, framepos_t n = 0, bool lock_position_to_video = true) = 0;
|
||||
virtual void export_video (bool range = false) = 0;
|
||||
|
||||
virtual RouteTimeAxisView* get_route_view_by_route_id (const PBD::ID& id) const = 0;
|
||||
|
|
Loading…
Reference in New Issue