X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=futatabi%2Fclip_list.h;h=6bd0fbb1274f0cc2b4270270af4768f68bfd4301;hb=80f3360f2b3bbe8230bdf96d4de9682d8a4d86f6;hp=6fe30966a5e01a89ed68551d6b5c0119d0534299;hpb=6e3e839e23309b1214ff8d9954e97e6194db61a8;p=nageru diff --git a/futatabi/clip_list.h b/futatabi/clip_list.h index 6fe3096..6bd0fbb 100644 --- a/futatabi/clip_list.h +++ b/futatabi/clip_list.h @@ -13,8 +13,11 @@ struct Clip { int64_t pts_in = -1, pts_out = -1; // pts_in is inclusive, pts_out is exclusive. std::string descriptions[MAX_STREAMS]; - unsigned stream_idx = 0; // For the playlist only. - double fade_time_seconds = 0.5; // For the playlist only. + + // These are for the playlist only. + unsigned stream_idx = 0; + double fade_time_seconds = 0.5; + double speed = 0.5; }; class DataChangedReceiver { @@ -76,12 +79,12 @@ public: ClipListProto serialize() const; - void change_num_cameras(size_t num_cameras); // Defaults to 1. Cannot decrease. + void change_num_cameras(size_t num_cameras); // Defaults to 2. Cannot decrease. void emit_data_changed(size_t row) override; bool is_camera_column(int column) const { - return (column >= int(Column::CAMERA_1) && column < int(Column::CAMERA_1) + num_cameras); + return (column >= int(Column::CAMERA_1) && column < int(Column::CAMERA_1) + int(num_cameras)); } signals: @@ -89,7 +92,7 @@ signals: private: std::vector clips; - size_t num_cameras = 1; + size_t num_cameras = 2; }; class PlayList : public QAbstractTableModel, public DataChangedReceiver { @@ -106,6 +109,7 @@ public: CAMERA, DESCRIPTION, FADE_TIME, + SPEED, NUM_COLUMNS }; @@ -141,7 +145,7 @@ public: ClipListProto serialize() const; - void change_num_cameras(size_t num_cameras) // Defaults to 1. Cannot decrease. + void change_num_cameras(size_t num_cameras) // Defaults to 2. Cannot decrease. { this->num_cameras = num_cameras; } @@ -156,7 +160,7 @@ private: int currently_playing_index = -1; double play_progress = 0.0; std::map current_progress; - size_t num_cameras = 1; + size_t num_cameras = 2; }; #endif // !defined (_CLIP_LIST_H)