add VU and IEC meter DSP (from jmeters)
[ardour.git] / gtk2_ardour / video_timeline.h
index d352af9faf96bd6fe69cfeb6833fb13946ab3b09..ee682fa05edcebce9ab051392ca2db549ce9ebaf 100644 (file)
@@ -17,8 +17,6 @@
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 */
-#ifdef WITH_VIDEOTIMELINE
-
 #ifndef __ardour_video_timeline_h__
 #define __ardour_video_timeline_h__
 
 #include "ardour/session.h"
 #include "ardour/session_handle.h"
 #include "video_image_frame.h"
-#include "open_video_monitor_dialog.h"
 #include "video_monitor.h"
 #include "pbd/signals.h"
-#include "canvas.h"
+#include "canvas/group.h"
 
 namespace ARDOUR {
        class Session;
@@ -73,12 +70,13 @@ class VideoTimeLine : public sigc::trackable, public ARDOUR::SessionHandlePtr, p
        double get_video_file_fps () { return video_file_fps; }
        void set_update_session_fps (bool v=true) { auto_set_session_fps = v; }
 
-       void set_offset_locked (bool v) { video_offset_lock = v; }
-       void toggle_offset_locked () { video_offset_lock = !video_offset_lock; }
+       void set_offset_locked (bool v);
+       void toggle_offset_locked ();
        bool is_offset_locked () { return video_offset_lock; }
 
-       void open_video_monitor (bool interactive=true);
+       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);
 
@@ -88,12 +86,14 @@ class VideoTimeLine : public sigc::trackable, public ARDOUR::SessionHandlePtr, p
 
        bool found_xjadeo () { return ((_xjadeo_bin.empty())?false:true); }
        bool check_server ();
+       bool check_server_docroot ();
        void flush_local_cache ();
        void vmon_update ();
        void flush_cache ();
        void save_session ();
        void close_session ();
-       float get_apv(); /* audio frames per video frame; */
+       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 floor(offset/get_apv())*get_apv(); }
@@ -102,17 +102,17 @@ class VideoTimeLine : public sigc::trackable, public ARDOUR::SessionHandlePtr, p
        protected:
 
        PublicEditor *editor;
-       ArdourCanvas::Group *videotl_bar_group;
+       ArdourCanvas::Group *videotl_group;
        int bar_height;
 
        std::string _xjadeo_bin;
        void find_xjadeo ();
 
 
-       ARDOUR::frameoffset_t video_start_offset; /**< unit: audio-frames - video-file */
-       ARDOUR::frameoffset_t video_offset; /**< unit: audio-frames - session */
+       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-frames */
+       framepos_t video_duration;     /**< unit: audio-samples */
        std::string video_filename;
        bool        local_file;
        double      video_aspect_ratio;
@@ -132,14 +132,13 @@ class VideoTimeLine : public sigc::trackable, public ARDOUR::SessionHandlePtr, p
        std::string translated_filename ();
 
        VideoMonitor *vmonitor;
-       OpenVideoMonitorDialog *open_video_monitor_dialog;
        bool reopen_vmonitor;
 
        PBD::Signal0<void> VtlUpdate;
        PBD::Signal1<void,std::string> GuiUpdate;
        void gui_update (const std::string &);
+
+       PBD::ScopedConnection sessionsave;
 };
 
 #endif /* __ardour_video_timeline_h__ */
-
-#endif /* WITH_VIDEOTIMELINE */