X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=futatabi%2Fmainwindow.h;h=2bb880d5ba80e4de3e985b349d61d3d5d997c61c;hb=931727fc4cccafc84023a053a6eff174b5ea8190;hp=798745609b9ca7627aac96aff337f6cc0cae9f5e;hpb=44ee1966fb400dca1085e1e63d6305a5878414b7;p=nageru diff --git a/futatabi/mainwindow.h b/futatabi/mainwindow.h index 7987456..2bb880d 100644 --- a/futatabi/mainwindow.h +++ b/futatabi/mainwindow.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -19,7 +20,10 @@ namespace Ui { class MainWindow; } // namespace Ui +struct FrameOnDisk; +class JPEGFrameView; class Player; +class QPushButton; class QTableView; class MainWindow : public QMainWindow { @@ -32,13 +36,15 @@ public: // HTTP callback. TODO: Does perhaps not belong to MainWindow? std::pair get_queue_status() const; -//private: - Ui::MainWindow *ui; + void display_frame(unsigned stream_idx, const FrameOnDisk &frame); private: + Ui::MainWindow *ui; + QLabel *disk_free_label; std::unique_ptr preview_player, live_player; DB db; + unsigned num_cameras; // State when doing a scrub operation on a timestamp with the mouse. bool scrubbing = false; @@ -76,6 +82,18 @@ private: mutable std::mutex queue_status_mu; std::string queue_status; // Under queue_status_mu. + struct FrameAndDisplay { + QFrame *frame; + JPEGFrameView *display; + QPushButton *preview_btn; + }; + std::vector displays; + + // Used to get tally information, if a tally URL is set. + QNetworkAccessManager http; + QNetworkReply *http_reply = nullptr; + + void change_num_cameras(); void cue_in_clicked(); void cue_out_clicked(); void queue_clicked(); @@ -116,12 +134,16 @@ private: void undo_triggered(); void redo_triggered(); void quality_toggled(int quality, bool checked); + void padding_toggled(double seconds, bool checked); void highlight_camera_input(int stream_idx); template void replace_model(QTableView *view, Model **model, Model *new_model); + void start_tally(); + void tally_received(); + private slots: void relayout(); };