dynamic playback & capture buffer resizing (though transport is stopped first)
[ardour.git] / libs / ardour / ardour / playlist.h
index bc896f35a4cb4b39fd6787fb59b07dee060d57a1..1021b8dba0bff763f3bb6284975dd7315d95cdde 100644 (file)
@@ -66,7 +66,7 @@ class RegionListProperty : public PBD::SequenceProperty<std::list<boost::shared_
         RegionListProperty (Playlist&);
 
         boost::shared_ptr<Region> lookup_id (const PBD::ID& id);
-        void diff (PBD::PropertyList& before, PBD::PropertyList& after) const;
+        void diff (PBD::PropertyList& undo, PBD::PropertyList& redo) const;
 
   private:
         friend class Playlist;
@@ -116,6 +116,7 @@ class Playlist : public SessionObject
        bool used () const { return _refcnt != 0; }
 
        bool set_name (const std::string& str);
+        int sort_id() { return _sort_id; }
 
        const DataType& data_type() const { return _type; }
 
@@ -125,7 +126,7 @@ class Playlist : public SessionObject
        bool hidden() const { return _hidden; }
        bool empty() const;
        uint32_t n_regions() const;
-       framecnt_t get_maximum_extent () const;
+       std::pair<framecnt_t, framecnt_t> get_extent () const;
        layer_t top_layer() const;
 
        EditMode get_edit_mode() const { return _edit_mode; }
@@ -135,6 +136,7 @@ class Playlist : public SessionObject
 
        void add_region (boost::shared_ptr<Region>, framepos_t position, float times = 1, bool auto_partition = false);
        void remove_region (boost::shared_ptr<Region>);
+       void remove_region_by_source (boost::shared_ptr<Source>);
        void get_equivalent_regions (boost::shared_ptr<Region>, std::vector<boost::shared_ptr<Region> >&);
        void get_region_list_equivalent_regions (boost::shared_ptr<Region>, std::vector<boost::shared_ptr<Region> >&);
        void replace_region (boost::shared_ptr<Region> old, boost::shared_ptr<Region> newr, framepos_t pos);
@@ -194,6 +196,7 @@ class Playlist : public SessionObject
 
        uint32_t read_data_count() const { return _read_data_count; }
 
+       /* XXX: use of diskstream here is a little unfortunate */
        const PBD::ID& get_orig_diskstream_id () const { return _orig_diskstream_id; }
        void set_orig_diskstream_id (const PBD::ID& did) { _orig_diskstream_id = did; }
 
@@ -240,6 +243,7 @@ class Playlist : public SessionObject
        std::set<boost::shared_ptr<Region> > all_regions; /* all regions ever added to this playlist */
        PBD::ScopedConnectionList region_state_changed_connections;
        DataType        _type;
+        int             _sort_id;
        mutable gint    block_notifications;
        mutable gint    ignore_state_changes;
        mutable Glib::RecMutex region_lock;
@@ -253,6 +257,7 @@ class Playlist : public SessionObject
        bool             save_on_thaw;
        std::string      last_save_reason;
        uint32_t         in_set_state;
+       bool             in_update;
        bool             first_set_state;
        bool            _hidden;
        bool            _splicing;
@@ -288,6 +293,8 @@ class Playlist : public SessionObject
        virtual void flush_notifications ();
        void clear_pending ();
 
+        void _set_sort_id ();
+
        void notify_region_removed (boost::shared_ptr<Region>);
        void notify_region_added (boost::shared_ptr<Region>);
        void notify_length_changed ();
@@ -328,7 +335,7 @@ class Playlist : public SessionObject
        void copy_regions (RegionList&) const;
        void partition_internal (framepos_t start, framepos_t end, bool cutting, RegionList& thawlist);
 
-       framecnt_t _get_maximum_extent() const;
+       std::pair<framecnt_t, framecnt_t> _get_extent() const;
 
        boost::shared_ptr<Playlist> cut_copy (boost::shared_ptr<Playlist> (Playlist::*pmf)(framepos_t, framecnt_t, bool),
                                              std::list<AudioRange>& ranges, bool result_is_hidden);