]> git.sesse.net Git - nageru/blobdiff - clip_list.h
Some refactoring of the player code, and begin working on the playlist.
[nageru] / clip_list.h
index 1cdbf355d7db0410883eb32137d519d9db8d8cfb..ddb4a4a7d862f24e2f91c91a7d078e225675df3e 100644 (file)
 struct Clip {
        int64_t pts_in = -1, pts_out = -1;
        std::vector<std::string> descriptions;  // One per camera.
+       unsigned stream_idx = 0;  // For the playlist only.
 };
 
+// FIXME: This should be split into a separate clip list and play list model.
 class ClipList : public QAbstractTableModel {
        Q_OBJECT
 
 public:
-       enum Column {
+       enum class ListDisplay {
+               CLIP_LIST,
+               PLAY_LIST
+       };
+       ClipList(ListDisplay display_type) : display_type(display_type) {}
+
+       enum class ClipListColumn {
                IN,
                OUT,
                DURATION,
@@ -27,6 +35,14 @@ public:
                CAMERA_4,
                NUM_COLUMNS
        };
+       enum class PlayListColumn {
+               IN,
+               OUT,
+               DURATION,
+               CAMERA,
+               DESCRIPTION,
+               NUM_COLUMNS
+       };
 
        int rowCount(const QModelIndex &parent) const override;
        int columnCount(const QModelIndex &parent) const override;
@@ -66,6 +82,7 @@ public:
 
 private:
        std::vector<Clip> clips;
+       ListDisplay display_type;
 };
 
 #endif  // !defined (_CLIP_LIST_H)