Trying to create export audio encoders with between 9 and 15 channels
[dcpomatic.git] / src / lib / playlist.cc
index 6d125afa63ba93d592a7bd7f4580d9f1d6e9ea12..b96b0fbe0edf48a809ba93f89c28e87de56a5b08 100644 (file)
@@ -51,6 +51,7 @@ using boost::optional;
 using boost::shared_ptr;
 using boost::weak_ptr;
 using boost::dynamic_pointer_cast;
+using namespace dcpomatic;
 
 Playlist::Playlist ()
        : _sequence (true)
@@ -69,13 +70,6 @@ Playlist::~Playlist ()
 void
 Playlist::content_change (weak_ptr<const Film> weak_film, ChangeType type, weak_ptr<Content> content, int property, bool frequent)
 {
-       /* Make sure we only hear about atomic changes (e.g. a PENDING always with the DONE/CANCELLED)
-          Ignore any DONE/CANCELLED that arrives without a PENDING.
-       */
-       if (_checker.send (type, property)) {
-               return;
-       }
-
        shared_ptr<const Film> film = weak_film.lock ();
        DCPOMATIC_ASSERT (film);
 
@@ -110,8 +104,11 @@ Playlist::content_change (weak_ptr<const Film> weak_film, ChangeType type, weak_
                        }
 
                        if (changed) {
-                               OrderChanged ();
+                               OrderChange ();
                        }
+
+                       /* The length might have changed, and that's good enough for this signal */
+                       LengthChange ();
                }
        }
 
@@ -280,6 +277,8 @@ Playlist::add (shared_ptr<const Film> film, shared_ptr<Content> c)
        }
 
        Change (CHANGE_TYPE_DONE);
+
+       LengthChange ();
 }
 
 void
@@ -311,6 +310,8 @@ Playlist::remove (shared_ptr<Content> c)
        }
 
        /* This won't change order, so it does not need a sort */
+
+       LengthChange ();
 }
 
 void
@@ -333,9 +334,11 @@ Playlist::remove (ContentList c)
                }
        }
 
+       Change (CHANGE_TYPE_DONE);
+
        /* This won't change order, so it does not need a sort */
 
-       Change (CHANGE_TYPE_DONE);
+       LengthChange ();
 }
 
 class FrameRateCandidate