Remove frame conversion for MidiRegionView::note_in_region_range(), speed up tempo...
[ardour.git] / libs / ardour / ardour / session_playlists.h
index 4ca67bdee8b7b478e13982feef1760e4c7843727..cc6d301b3166bdbcb5214d37d897ca5406812f29 100644 (file)
@@ -23,7 +23,7 @@
 #include <set>
 #include <vector>
 #include <string>
-#include <glibmm/thread.h>
+#include <glibmm/threads.h>
 #include <boost/shared_ptr.hpp>
 #include <boost/function.hpp>
 
@@ -32,7 +32,7 @@
 class XMLNode;
 
 namespace PBD {
-        class ID;
+       class ID;
 }
 
 namespace ARDOUR {
@@ -41,30 +41,36 @@ class Playlist;
 class Region;
 class Source;
 class Session;
-class Crossfade;       
-       
-class SessionPlaylists : public PBD::ScopedConnectionList
+class Crossfade;
+class Track;
+
+class LIBARDOUR_API SessionPlaylists : public PBD::ScopedConnectionList
 {
 public:
        ~SessionPlaylists ();
-       
+
        boost::shared_ptr<Playlist> by_name (std::string name);
        boost::shared_ptr<Playlist> by_id (const PBD::ID&);
        uint32_t source_use_count (boost::shared_ptr<const Source> src) const;
+       uint32_t region_use_count (boost::shared_ptr<Region> region) const;
        template<class T> void foreach (T *obj, void (T::*func)(boost::shared_ptr<Playlist>));
-       void get (std::vector<boost::shared_ptr<Playlist> >&);
+       void foreach (boost::function<void(boost::shared_ptr<const Playlist>)> functor);
+       void get (std::vector<boost::shared_ptr<Playlist> >&) const;
        void unassigned (std::list<boost::shared_ptr<Playlist> > & list);
-        void destroy_region (boost::shared_ptr<Region>);
+       void destroy_region (boost::shared_ptr<Region>);
        boost::shared_ptr<Crossfade> find_crossfade (const PBD::ID &);
+       void sync_all_regions_with_regions ();
+       std::vector<boost::shared_ptr<Playlist> > playlists_for_track (boost::shared_ptr<Track>) const;
+       uint32_t n_playlists() const;
 
 private:
        friend class Session;
-       
+
        bool add (boost::shared_ptr<Playlist>);
        void remove (boost::shared_ptr<Playlist>);
+       void remove_weak (boost::weak_ptr<Playlist>);
        void track (bool, boost::weak_ptr<Playlist>);
-       
-       uint32_t n_playlists() const;
+
        void find_equivalent_playlist_regions (boost::shared_ptr<Region>, std::vector<boost::shared_ptr<Region> >& result);
        void update_after_tempo_map_change ();
        void add_state (XMLNode *, bool);
@@ -72,8 +78,8 @@ private:
        int load (Session &, const XMLNode&);
        int load_unused (Session &, const XMLNode&);
        boost::shared_ptr<Playlist> XMLPlaylistFactory (Session &, const XMLNode&);
-        
-       mutable Glib::Mutex lock;
+
+       mutable Glib::Threads::Mutex lock;
        typedef std::set<boost::shared_ptr<Playlist> > List;
        List playlists;
        List unused_playlists;