]> git.sesse.net Git - nageru/blobdiff - clip_list.h
Support other streams than the default file.
[nageru] / clip_list.h
index eb1340f2514702046632c7c5317b46e415b14710..66449826cb3cdfd1a3e0743d3350b0c7ab5419b2 100644 (file)
@@ -1,20 +1,19 @@
 #ifndef _CLIP_LIST_H
 #define _CLIP_LIST_H 1
 
-#include <QAbstractTableModel>
+#include "defs.h"
+#include "state.pb.h"
 
+#include <QAbstractTableModel>
 #include <stdint.h>
-
-#include <vector>
 #include <string>
-
-#include "defs.h"
-#include "state.pb.h"
+#include <vector>
 
 struct Clip {
        int64_t pts_in = -1, pts_out = -1;  // pts_in is inclusive, pts_out is exclusive.
        std::string descriptions[NUM_CAMERAS];
        unsigned stream_idx = 0;  // For the playlist only.
+       double fade_time_seconds = 0.5;  // For the playlist only.
 };
 
 class DataChangedReceiver {
@@ -27,7 +26,8 @@ struct ClipProxy {
 public:
        ClipProxy(Clip &clip, DataChangedReceiver *clip_list, size_t row)
                : clip(clip), clip_list(clip_list), row(row) {}
-       ~ClipProxy() {
+       ~ClipProxy()
+       {
                if (clip_list != nullptr) {
                        clip_list->emit_data_changed(row);
                }
@@ -99,6 +99,7 @@ public:
                DURATION,
                CAMERA,
                DESCRIPTION,
+               FADE_TIME,
                NUM_COLUMNS
        };