/*
- Copyright (C) 2010 Paul Davis
- Author: Robin Gareus <robin@gareus.org>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
+ * Copyright (C) 2013-2017 Paul Davis <paul@linuxaudiosystems.com>
+ * Copyright (C) 2013-2018 Robin Gareus <robin@gareus.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
#ifndef __ardour_video_timeline_h__
#define __ardour_video_timeline_h__
void toggle_offset_locked ();
bool is_offset_locked () { return video_offset_lock; }
+ ARDOUR::sampleoffset_t get_video_start_offset() { return video_start_offset; }
+
void open_video_monitor ();
void close_video_monitor ();
void control_video_monitor (int, int);
void terminated_video_monitor ();
- void manual_seek_video_monitor (framepos_t pos);
+ void manual_seek_video_monitor (samplepos_t pos);
void parameter_changed (std::string const & p);
void set_video_server_url (std::string);
void close_session ();
void sync_session_state (); /* video-monitor does not actively report window/pos changes, query it */
float get_apv(); /* audio samples per video frame; */
- ARDOUR::framecnt_t get_duration () { return video_duration;}
- ARDOUR::frameoffset_t get_offset () { return video_offset;}
- ARDOUR::frameoffset_t quantify_frames_to_apv (ARDOUR::frameoffset_t offset) { return rint(offset/get_apv())*get_apv(); }
- void set_offset (ARDOUR::frameoffset_t offset) { video_offset = quantify_frames_to_apv(offset); } // this function does not update video_offset_p, call save_undo() to finalize changes to this! - this fn is currently only used from editor_drag.cc
+ ARDOUR::samplecnt_t get_duration () { return video_duration;}
+ ARDOUR::sampleoffset_t get_offset () { return video_offset;}
+ ARDOUR::sampleoffset_t quantify_samples_to_apv (ARDOUR::sampleoffset_t offset) { return rint(offset/get_apv())*get_apv(); }
+ void set_offset (ARDOUR::sampleoffset_t offset) { video_offset = quantify_samples_to_apv(offset); } // this function does not update video_offset_p, call save_undo() to finalize changes to this! - this fn is currently only used from editor_drag.cc
protected:
std::string _xjadeo_bin;
void find_xjadeo ();
+ void find_harvid ();
- ARDOUR::frameoffset_t video_start_offset; /**< unit: audio-samples - video-file */
- ARDOUR::frameoffset_t video_offset; /**< unit: audio-samples - session */
- ARDOUR::frameoffset_t video_offset_p; /**< used for undo from editor_drag.cc */
- framepos_t video_duration; /**< unit: audio-samples */
+ ARDOUR::sampleoffset_t video_start_offset; /**< unit: audio-samples - video-file */
+ ARDOUR::sampleoffset_t video_offset; /**< unit: audio-samples - session */
+ ARDOUR::sampleoffset_t video_offset_p; /**< used for undo from editor_drag.cc */
+ samplepos_t video_duration; /**< unit: audio-samples */
std::string video_filename;
bool local_file;
double video_aspect_ratio;
std::string server_docroot;
void xjadeo_readversion (std::string d, size_t s);
+ void harvid_readversion (std::string d, size_t s);
std::string xjadeo_version;
+ std::string harvid_version;
typedef std::list<VideoImageFrame*> VideoFrames;
VideoFrames video_frames;
- VideoImageFrame *get_video_frame (framepos_t vfn, int cut=0, int rightend = -1);
- bool flush_frames;
- void remove_frames ();
+ VideoImageFrame* get_video_frame (samplepos_t vfn, int cut=0, int rightend = -1);
+
+ void remove_frames ();
+ bool _flush_frames;
std::string translated_filename ();