]> git.sesse.net Git - nageru/commitdiff
Default to two cameras instead of one, since otherwise, the UI looks pretty borked.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 19 Dec 2018 23:22:34 +0000 (00:22 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 19 Dec 2018 23:22:43 +0000 (00:22 +0100)
futatabi/clip_list.h
futatabi/mainwindow.cpp

index a42720b0d49be1c6b20c153f81b37ac13a09ee44..6bd0fbb1274f0cc2b4270270af4768f68bfd4301 100644 (file)
@@ -79,7 +79,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.
        void emit_data_changed(size_t row) override;
 
        bool is_camera_column(int column) const
@@ -92,7 +92,7 @@ signals:
 
 private:
        std::vector<Clip> clips;
-       size_t num_cameras = 1;
+       size_t num_cameras = 2;
 };
 
 class PlayList : public QAbstractTableModel, public DataChangedReceiver {
@@ -145,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;
        }
@@ -160,7 +160,7 @@ private:
        int currently_playing_index = -1;
        double play_progress = 0.0;
        std::map<size_t, double> current_progress;
-       size_t num_cameras = 1;
+       size_t num_cameras = 2;
 };
 
 #endif  // !defined (_CLIP_LIST_H)
index 212c5c4d7733b0b3b04766580e374f7e5e857aee..38a50df371886d4045a31993e5fa93ae19699061 100644 (file)
@@ -181,11 +181,11 @@ MainWindow::MainWindow()
                this, &MainWindow::clip_list_selection_changed);
 
        // Find out how many cameras we have in the existing frames;
-       // if none, we start with a single camera.
-       num_cameras = 1;
+       // if none, we start with two cameras.
+       num_cameras = 2;
        {
                lock_guard<mutex> lock(frame_mu);
-               for (size_t stream_idx = 1; stream_idx < MAX_STREAMS; ++stream_idx) {
+               for (size_t stream_idx = 2; stream_idx < MAX_STREAMS; ++stream_idx) {
                        if (!frames[stream_idx].empty()) {
                                num_cameras = stream_idx + 1;
                        }