]> git.sesse.net Git - nageru/blobdiff - mainwindow.h
Decode 4:2:2 JPEGs via VA-API if available.
[nageru] / mainwindow.h
index c037c77833b0a67fdd021d20d8da8b326bd6c9c9..24eea609e03bbdf24049018b03cb9193b15cfa38 100644 (file)
@@ -5,6 +5,8 @@
 #include <sys/types.h>
 #include <QMainWindow>
 
+#include "clip_list.h"
+
 namespace Ui {
 class MainWindow;
 }  // namespace Ui
@@ -24,10 +26,43 @@ public:
 private:
        Player *preview_player, *live_player;
 
+       // State when doing a scrub operation on a timestamp with the mouse.
+       bool scrubbing = false;
+       int scrub_x_origin;  // In pixels on the viewport.
+       int64_t scrub_pts_origin;
+
+       // Which element (e.g. pts_in on clip 4) we are scrubbing.
+       enum ScrubType { SCRUBBING_CLIP_LIST, SCRUBBING_PLAYLIST } scrub_type;
+       int scrub_row;
+       int scrub_column;
+
+       // Used to keep track of small mouse wheel motions on the camera index in the playlist.
+       int last_mousewheel_camera_row = -1;
+       int leftover_angle_degrees = 0;
+
+       void cue_in_clicked();
+       void cue_out_clicked();
        void queue_clicked();
        void preview_clicked();
+       void preview_angle_clicked(unsigned stream_idx);
        void play_clicked();
        void live_player_clip_done();
+       void live_player_clip_progress(double played_this_clip, double total_length);
+       void playlist_duplicate();
+       void playlist_remove();
+       void playlist_move(int delta);
+
+       enum Rounding { FIRST_AT_OR_AFTER, LAST_BEFORE };
+       void preview_single_frame(int64_t pts, unsigned stream_idx, Rounding rounding);
+
+       // Also covers when the playlist itself changes.
+       void playlist_selection_changed();
+
+       void resizeEvent(QResizeEvent *event) override;
+       bool eventFilter(QObject *watched, QEvent *event) override;
+
+private slots:
+       void relayout();
 };
 
 extern MainWindow *global_mainwindow;