Ardour  8.12
playlist.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2016 David Robillard <d@drobilla.net>
3  * Copyright (C) 2007-2012 Carl Hetherington <carl@carlh.net>
4  * Copyright (C) 2007-2017 Paul Davis <paul@linuxaudiosystems.com>
5  * Copyright (C) 2013 John Emmas <john@creativepost.co.uk>
6  * Copyright (C) 2014-2018 Ben Loftis <ben@harrisonconsoles.com>
7  * Copyright (C) 2015-2019 Robin Gareus <robin@gareus.org>
8  * Copyright (C) 2015 AndrĂ© Nusser <andre.nusser@googlemail.com>
9  * Copyright (C) 2016-2017 Nick Mainsbridge <mainsbridge@gmail.com>
10  * Copyright (C) 2016-2017 Tim Mayberry <mojofunk@gmail.com>
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License along
23  * with this program; if not, write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25  */
26 
27 #ifndef __ardour_playlist_h__
28 #define __ardour_playlist_h__
29 
30 #include <atomic>
31 #include <list>
32 #include <map>
33 #include <memory>
34 #include <set>
35 #include <string>
36 
37 #include <sys/stat.h>
38 
39 #include <boost/optional.hpp>
40 
41 #include <glib.h>
42 
43 #include "pbd/sequence_property.h"
44 #include "pbd/stateful.h"
46 #include "pbd/undo.h"
47 
48 #include "temporal/range.h"
49 
50 #include "ardour/ardour.h"
51 #include "ardour/data_type.h"
52 #include "ardour/region.h"
53 #include "ardour/session_object.h"
54 #include "ardour/thawlist.h"
55 
56 namespace ARDOUR {
57 
58 class Session;
59 class Playlist;
60 class Crossfade;
61 class Track;
62 
63 namespace Properties {
64  /* fake the type, since regions are handled by SequenceProperty which doesn't
65  * care about such things.
66  */
68 }
69 
70 class LIBARDOUR_API RegionListProperty : public PBD::SequenceProperty<std::list<std::shared_ptr<Region> > >
71 {
72 public:
74 
76  void get_content_as_xml (std::shared_ptr<Region>, XMLNode&) const;
77  std::shared_ptr<Region> get_content_from_xml (XMLNode const&) const;
78 
79 private:
81 
82  /* copy construction only by ourselves */
84 
85  friend class Playlist;
86  /* we live and die with our playlist, no lifetime management needed */
88 };
89 
90 class LIBARDOUR_API Playlist : public SessionObject, public Temporal::TimeDomainProvider, public std::enable_shared_from_this<Playlist>
91 {
92 public:
93  static void make_property_quarks ();
94 
95  Playlist (Session&, const XMLNode&, DataType type, bool hidden = false);
96  Playlist (Session&, std::string name, DataType type, bool hidden = false);
97  Playlist (std::shared_ptr<const Playlist>, std::string name, bool hidden = false);
98  Playlist (std::shared_ptr<const Playlist>, timepos_t const & start, timepos_t const & cnt, std::string name, bool hidden = false);
99 
100  virtual ~Playlist ();
101 
102  void update (const RegionListProperty::ChangeRecord&);
104  void rdiff (std::vector<PBD::Command*>&) const;
105 
107 
108  std::shared_ptr<Region> region_by_id (const PBD::ID&) const;
109 
110  uint32_t max_source_level () const;
111 
112  bool set_name (const std::string& str);
114 
115  /*playlist group IDs (pgroup_id) is a group identifier that is implicitly
116  * or explicitly assigned to playlists so they can be associated with each other.
117  *
118  * For example, when you switch a track's playlist, you can choose to
119  * switch other tracks to the same pgroup_id
120  *
121  * pgroup_id's should be unique; currently we use a timestamp to avoid duplicates.
122  * pgroup_id's are human-readable strings; use string comparison to find matches.
123  *
124  * To be useful, we want every playlist to be assigned a sensible pgroup_id
125  * Some examples of pgroup_id's getting assigned *explicitly* include:
126  * when the user makes a new playlist for a track or Track Group
127  * when the user triggers an action like "new playlist for rec-armed tracks"
128  * Some examples of pgroup_id's getting assigned *implicitly* include:
129  * the user makes the first recording pass ("take") in an empty playlist
130  * the user imports tracks.
131  */
132  static std::string generate_pgroup_id();
133  std::string pgroup_id() { return _pgroup_id; }
134  void set_pgroup_id(std::string pgid) { _pgroup_id = pgid; PropertyChanged (Properties::name); }
135 
136  virtual void clear (bool with_signals = true);
137  virtual void dump () const;
138 
139  void use ();
140  void release ();
141 
142  bool empty () const;
143  bool used () const { return _refcnt.load () != 0; }
144  int sort_id () const { return _sort_id; }
145  bool frozen () const { return _frozen; }
146  const DataType& data_type () const { return _type; }
147  bool hidden () const { return _hidden; }
148  bool shared () const { return !_shared_with_ids.empty (); }
149 
150  void set_frozen (bool yn);
151 
156 
157  void share_with (const PBD::ID&);
158  void unshare_with (const PBD::ID&);
159  bool shared_with (const PBD::ID&) const;
160  void reset_shares ();
161 
162  uint32_t n_regions() const;
163  bool all_regions_empty() const;
164  std::pair<timepos_t, timepos_t> get_extent () const;
165  std::pair<timepos_t, timepos_t> get_extent_with_endspace() const;
167 
168  /* Editing operations */
169 
170  void add_region (std::shared_ptr<Region>, timepos_t const & position, float times = 1, bool auto_partition = false);
171  void remove_region (std::shared_ptr<Region>);
172  void get_equivalent_regions (std::shared_ptr<Region>, std::vector<std::shared_ptr<Region> >&);
173 
174  void get_region_list_equivalent_regions (std::shared_ptr<Region>, std::vector<std::shared_ptr<Region> >&);
175  void get_source_equivalent_regions (std::shared_ptr<Region>, std::vector<std::shared_ptr<Region> >&);
176  void replace_region (std::shared_ptr<Region> old, std::shared_ptr<Region> newr, timepos_t const & pos);
177  void split_region (std::shared_ptr<Region>, timepos_t const & position);
178  void split (timepos_t const & at);
179  void shift (timepos_t const & at, timecnt_t const & distance, bool move_intersected);
180  void partition (timepos_t const & start, timepos_t const & end, bool cut = false);
181  void duplicate (std::shared_ptr<Region>, timepos_t & position, float times);
182  void duplicate (std::shared_ptr<Region>, timepos_t & position, timecnt_t const & gap, float times);
183  void duplicate_until (std::shared_ptr<Region>, timepos_t & position, timecnt_t const & gap, timepos_t const & end);
184  void duplicate_range (TimelineRange&, float times);
185  void duplicate_ranges (std::list<TimelineRange>&, float times);
186  void nudge_after (timepos_t const & start, timecnt_t const & distance, bool forwards);
187  virtual std::shared_ptr<Region> combine (const RegionList&, std::shared_ptr<Track>);
188  virtual void uncombine (std::shared_ptr<Region>);
189  void fade_range (std::list<TimelineRange>&);
190  void remove_gaps (timecnt_t const & gap_threshold, timecnt_t const & leave_gap, boost::function<void (timepos_t, timecnt_t)> gap_callback);
191 
192  void shuffle (std::shared_ptr<Region>, int dir);
193 
194  void ripple (timepos_t const & at, timecnt_t const & distance, RegionList *exclude);
195  void ripple (timepos_t const & at, timecnt_t const & distance, std::shared_ptr<Region> exclude) {
196  RegionList el;
197  if (exclude) {
198  el.push_back (exclude);
199  }
200  ripple (at, distance, &el);
201  }
202 
204 
205  std::shared_ptr<Playlist> cut (std::list<TimelineRange>&);
206  std::shared_ptr<Playlist> copy (std::list<TimelineRange>&);
207  int paste (std::shared_ptr<Playlist>, timepos_t const & position, float times);
208 
210  {
211  return regions;
212  }
213 
214  std::shared_ptr<RegionList> region_list ();
215 
216  std::shared_ptr<RegionList> regions_at (timepos_t const & sample);
217  uint32_t count_regions_at (timepos_t const &) const;
218 
223  std::shared_ptr<RegionList> regions_touched (timepos_t const & start, timepos_t const & end);
224  std::shared_ptr<RegionList> regions_with_start_within (Temporal::TimeRange);
225  std::shared_ptr<RegionList> regions_with_end_within (Temporal::TimeRange);
226  std::shared_ptr<RegionList> audible_regions_at (timepos_t const &);
227  uint32_t region_use_count (std::shared_ptr<Region>) const;
228  std::shared_ptr<Region> find_region (const PBD::ID&) const;
229  std::shared_ptr<Region> top_region_at (timepos_t const &);
230  std::shared_ptr<Region> top_unmuted_region_at (timepos_t const &);
231  std::shared_ptr<Region> find_next_region (timepos_t const &, RegionPoint point, int dir);
233  bool region_is_shuffle_constrained (std::shared_ptr<Region>);
234  bool has_region_at (timepos_t const &) const;
235  bool region_is_audible_at (std::shared_ptr<Region>, timepos_t const&);
236 
238 
239  bool uses_source (std::shared_ptr<const Source> src, bool shallow = false) const;
240  void deep_sources (std::set<std::shared_ptr<Source> >&) const;
241 
243 
244  void foreach_region (boost::function<void(std::shared_ptr<Region>)>);
245 
246  XMLNode& get_state () const;
247  virtual int set_state (const XMLNode&, int version);
249 
250  PBD::Signal1<void, bool> InUse;
251  PBD::Signal0<void> ContentsChanged;
252  PBD::Signal1<void, std::weak_ptr<Region> > RegionAdded;
253  PBD::Signal1<void, std::weak_ptr<Region> > RegionRemoved;
254  PBD::Signal0<void> NameChanged;
255  PBD::Signal0<void> LayeringChanged;
256 
258  PBD::Signal2<void,std::list< Temporal::RangeMove> const &, bool> RangesMoved;
259 
263  PBD::Signal1<void,std::list< Temporal::Range> const &> RegionsExtended;
264 
265  static std::string bump_name (std::string old_name, Session&);
266 
267  void freeze ();
268  void thaw (bool from_undo = false);
269 
270  void raise_region (std::shared_ptr<Region>);
271  void lower_region (std::shared_ptr<Region>);
272  void raise_region_to_top (std::shared_ptr<Region>);
273  void lower_region_to_bottom (std::shared_ptr<Region>);
274 
275  void set_orig_track_id (const PBD::ID& did);
276  const PBD::ID& get_orig_track_id () const { return _orig_track_id; }
277 
278  /* destructive editing */
279 
280  virtual bool destroy_region (std::shared_ptr<Region>) = 0;
281 
283 
284  /* special case function used by UI selection objects, which have playlists that actually own the regions
285  within them.
286  */
287 
288  void drop_regions ();
289 
290  virtual std::shared_ptr<Crossfade> find_crossfade (const PBD::ID&) const
291  {
292  return std::shared_ptr<Crossfade> ();
293  }
294 
296  uint32_t combine_ops() const { return _combine_ops; }
297 
298  void set_layer (std::shared_ptr<Region>, double);
299 
301 
305 
306 protected:
307  friend class Session;
308 
309 protected:
310  class RegionReadLock : public Glib::Threads::RWLock::ReaderLock
311  {
312  public:
314  : Glib::Threads::RWLock::ReaderLock (pl->region_lock)
315  {
316  }
318  };
319 
320  class RegionWriteLock : public Glib::Threads::RWLock::WriterLock
321  {
322  public:
323  RegionWriteLock (Playlist* pl, bool do_block_notify = true)
324  : Glib::Threads::RWLock::WriterLock (pl->region_lock)
325  , playlist (pl)
326  , block_notify (do_block_notify)
327  {
328  if (block_notify) {
329  playlist->delay_notifications ();
330  }
331  }
332 
334  {
336  thawlist.release ();
337  if (block_notify) {
338  playlist->release_notifications ();
339  }
340  }
341 
345  };
346 
347  RegionListProperty regions; /* the current list of regions in the playlist */
348  std::set<std::shared_ptr<Region> > all_regions; /* all regions ever added to this playlist */
352  uint32_t _sort_id;
353  mutable std::atomic<int> block_notifications;
354  std::set<std::shared_ptr<Region> > pending_adds;
355  std::set<std::shared_ptr<Region> > pending_removes;
359 
360  std::set<const Region*> _soloSelectedRegions;
361 
367  std::list<Temporal::RangeMove> pending_range_moves;
368 
370  std::list<Temporal::TimeRange> pending_region_extensions;
371 
372  uint32_t in_set_state;
373  bool in_undo;
375  bool _hidden;
376  bool _rippling;
378  bool _nudging;
379  std::atomic<int> _refcnt;
380  bool in_flush;
382  bool _frozen;
384  uint32_t subcnt;
386  uint32_t _combine_ops;
387 
388  std::list<PBD::ID> _shared_with_ids;
389 
390  void init (bool hide);
391 
392  bool holding_state () const
393  {
394  return block_notifications.load () != 0;
395  }
396 
398  void release_notifications (bool from_undo = false);
399  virtual void flush_notifications (bool from_undo = false);
400  void clear_pending ();
401 
402  void _set_sort_id ();
403 
404  std::shared_ptr<RegionList> regions_touched_locked (timepos_t const & start, timepos_t const & end, bool with_tail);
405 
406  void notify_region_removed (std::shared_ptr<Region>);
407  void notify_region_added (std::shared_ptr<Region>);
411  void notify_region_moved (std::shared_ptr<Region>);
412  void notify_region_start_trimmed (std::shared_ptr<Region>);
413  void notify_region_end_trimmed (std::shared_ptr<Region>);
414 
416 
417  void region_changed_proxy (const PBD::PropertyChange&, std::weak_ptr<Region>);
418  virtual bool region_changed (const PBD::PropertyChange&, std::shared_ptr<Region>);
419 
420  void region_bounds_changed (const PBD::PropertyChange&, std::shared_ptr<Region>);
421  void region_deleted (std::shared_ptr<Region>);
422 
423  void sort_regions ();
424 
425  void ripple_locked (timepos_t const & at, timecnt_t const & distance, RegionList *exclude);
426  void ripple_unlocked (timepos_t const & at, timecnt_t const & distance, RegionList *exclude, ThawList& thawlist, bool notify = true);
427 
428  virtual void region_going_away (std::weak_ptr<Region> /*region*/);
429 
430  virtual XMLNode& state (bool) const;
431 
432  bool add_region_internal (std::shared_ptr<Region>, timepos_t const & position, ThawList& thawlist);
433 
434  int remove_region_internal (std::shared_ptr<Region>, ThawList& thawlist);
435  void copy_regions (RegionList&) const;
436 
437  void partition_internal (timepos_t start, timepos_t end, bool cutting, ThawList& thawlist);
438 
439  std::pair<timepos_t, timepos_t> _get_extent() const;
440 
441  std::shared_ptr<Playlist> cut_copy (std::shared_ptr<Playlist> (Playlist::*pmf)(timepos_t const &, timecnt_t const &),
442  std::list<TimelineRange>& ranges);
443  std::shared_ptr<Playlist> cut (timepos_t const & start, timecnt_t const & cnt);
444  std::shared_ptr<Playlist> copy (timepos_t const & start, timecnt_t const & cnt);
445 
446  void relayer ();
447 
448  void begin_undo ();
449  void end_undo ();
450 
451  virtual void _split_region (std::shared_ptr<Region>, timepos_t const & position, ThawList& thawlist);
452 
453  typedef std::pair<std::shared_ptr<Region>, std::shared_ptr<Region> > TwoRegions;
454 
455  /* this is called before we create a new compound region */
456  virtual void pre_combine (std::vector<std::shared_ptr<Region> >&) {}
457  /* this is called before we create a new compound region */
458  virtual void post_combine (std::vector<std::shared_ptr<Region> >&, std::shared_ptr<Region>) {}
459  /* this is called before we remove a compound region and replace it
460  * with its constituent regions
461  */
462  virtual void pre_uncombine (std::vector<std::shared_ptr<Region> >&, std::shared_ptr<Region>) {}
463 
464 private:
465  friend class RegionReadLock;
466  friend class RegionWriteLock;
467 
468  mutable Glib::Threads::RWLock region_lock;
469 
470 private:
472  void coalesce_and_check_crossfades (std::list<Temporal::TimeRange>);
473  std::shared_ptr<RegionList> find_regions_at (timepos_t const &);
474 
475  mutable boost::optional<std::pair<timepos_t, timepos_t> > _cached_extent;
476  timepos_t _end_space; //this is used when we are pasting a range with extra space at the end
478 
479  std::string _pgroup_id; // when we make multiple playlists in one action, they will share the same pgroup_id
480 };
481 
482 } /* namespace ARDOUR */
483 
484 #endif /* __ardour_playlist_h__ */
485 
RegionReadLock(Playlist const *pl)
Definition: playlist.h:313
RegionWriteLock(Playlist *pl, bool do_block_notify=true)
Definition: playlist.h:323
void clear_owned_changes()
void lower_region_to_bottom(std::shared_ptr< Region >)
uint32_t n_regions() const
std::shared_ptr< Playlist > cut(std::list< TimelineRange > &)
std::shared_ptr< RegionList > find_regions_at(timepos_t const &)
bool all_regions_empty() const
void notify_contents_changed()
void duplicate_until(std::shared_ptr< Region >, timepos_t &position, timecnt_t const &gap, timepos_t const &end)
virtual void pre_uncombine(std::vector< std::shared_ptr< Region > > &, std::shared_ptr< Region >)
Definition: playlist.h:462
virtual bool region_changed(const PBD::PropertyChange &, std::shared_ptr< Region >)
PBD::Signal1< void, std::weak_ptr< Region > > RegionRemoved
Definition: playlist.h:253
void time_domain_changed()
const DataType & data_type() const
Definition: playlist.h:146
uint32_t combine_ops() const
Definition: playlist.h:296
timepos_t find_prev_region_start(timepos_t const &sample)
std::shared_ptr< Playlist > copy(timepos_t const &start, timecnt_t const &cnt)
std::shared_ptr< Region > find_next_region(timepos_t const &, RegionPoint point, int dir)
virtual ~Playlist()
void start_domain_bounce(Temporal::DomainBounceInfo &)
void rdiff(std::vector< PBD::Command * > &) const
const RegionListProperty & region_list_property() const
Definition: playlist.h:209
bool holding_state() const
Definition: playlist.h:392
bool _playlist_shift_active
Definition: playlist.h:477
PBD::Signal1< void, std::weak_ptr< Region > > RegionAdded
Definition: playlist.h:252
bool region_is_audible_at(std::shared_ptr< Region >, timepos_t const &)
std::shared_ptr< Region > top_region_at(timepos_t const &)
std::set< std::shared_ptr< Region > > pending_removes
Definition: playlist.h:355
bool SoloSelectedListIncludes(const Region *)
void duplicate_range(TimelineRange &, float times)
bool set_name(const std::string &str)
virtual std::shared_ptr< Crossfade > find_crossfade(const PBD::ID &) const
Definition: playlist.h:290
void setup_layering_indices(RegionList const &)
void raise_region_to_top(std::shared_ptr< Region >)
std::set< const Region * > _soloSelectedRegions
Definition: playlist.h:360
boost::optional< std::pair< timepos_t, timepos_t > > _cached_extent
Definition: playlist.h:475
virtual void clear(bool with_signals=true)
void region_deleted(std::shared_ptr< Region >)
std::pair< timepos_t, timepos_t > get_extent_with_endspace() const
std::shared_ptr< Playlist > cut_copy(std::shared_ptr< Playlist >(Playlist::*pmf)(timepos_t const &, timecnt_t const &), std::list< TimelineRange > &ranges)
bool region_is_shuffle_constrained(std::shared_ptr< Region >)
PBD::Signal2< void, std::list< Temporal::RangeMove > const &, bool > RangesMoved
Definition: playlist.h:258
int paste(std::shared_ptr< Playlist >, timepos_t const &position, float times)
PBD::Signal1< void, bool > InUse
Definition: playlist.h:250
std::set< std::shared_ptr< Region > > all_regions
Definition: playlist.h:348
void notify_region_start_trimmed(std::shared_ptr< Region >)
void update(const RegionListProperty::ChangeRecord &)
void duplicate_ranges(std::list< TimelineRange > &, float times)
std::shared_ptr< Region > region_by_id(const PBD::ID &) const
timepos_t find_next_top_layer_position(timepos_t const &) const
bool frozen() const
Definition: playlist.h:145
virtual std::shared_ptr< Region > combine(const RegionList &, std::shared_ptr< Track >)
timepos_t _end_space
Definition: playlist.h:476
std::shared_ptr< RegionList > regions_with_start_within(Temporal::TimeRange)
bool used() const
Definition: playlist.h:143
void thaw(bool from_undo=false)
void set_frozen(bool yn)
bool add_region_internal(std::shared_ptr< Region >, timepos_t const &position, ThawList &thawlist)
uint32_t region_use_count(std::shared_ptr< Region >) const
bool has_region_at(timepos_t const &) const
bool uses_source(std::shared_ptr< const Source > src, bool shallow=false) const
std::list< Temporal::RangeMove > pending_range_moves
Definition: playlist.h:367
std::list< Temporal::TimeRange > pending_region_extensions
Definition: playlist.h:370
bool empty() const
void delay_notifications()
PBD::Signal0< void > ContentsChanged
Definition: playlist.h:251
void add_region(std::shared_ptr< Region >, timepos_t const &position, float times=1, bool auto_partition=false)
static std::string bump_name(std::string old_name, Session &)
void ripple_unlocked(timepos_t const &at, timecnt_t const &distance, RegionList *exclude, ThawList &thawlist, bool notify=true)
virtual bool destroy_region(std::shared_ptr< Region >)=0
void init(bool hide)
bool pending_contents_change
Definition: playlist.h:357
int remove_region_internal(std::shared_ptr< Region >, ThawList &thawlist)
virtual int set_state(const XMLNode &, int version)
std::list< PBD::ID > _shared_with_ids
Definition: playlist.h:388
PBD::Signal0< void > NameChanged
Definition: playlist.h:254
void notify_region_end_trimmed(std::shared_ptr< Region >)
void remove_gaps(timecnt_t const &gap_threshold, timecnt_t const &leave_gap, boost::function< void(timepos_t, timecnt_t)> gap_callback)
void raise_region(std::shared_ptr< Region >)
std::shared_ptr< RegionList > region_list()
Playlist(std::shared_ptr< const Playlist >, std::string name, bool hidden=false)
int sort_id() const
Definition: playlist.h:144
XMLNode & get_state() const
RegionListProperty regions
Definition: playlist.h:347
void ripple_locked(timepos_t const &at, timecnt_t const &distance, RegionList *exclude)
bool hidden() const
Definition: playlist.h:147
virtual void region_going_away(std::weak_ptr< Region >)
void coalesce_and_check_crossfades(std::list< Temporal::TimeRange >)
void lower_region(std::shared_ptr< Region >)
PBD::Signal1< void, std::list< Temporal::Range > const & > RegionsExtended
Definition: playlist.h:263
virtual void _split_region(std::shared_ptr< Region >, timepos_t const &position, ThawList &thawlist)
XMLNode & get_template()
std::atomic< int > block_notifications
Definition: playlist.h:353
void notify_region_added(std::shared_ptr< Region >)
std::shared_ptr< RegionList > regions_touched(timepos_t const &start, timepos_t const &end)
void split(timepos_t const &at)
void shuffle(std::shared_ptr< Region >, int dir)
void notify_region_removed(std::shared_ptr< Region >)
std::string _pgroup_id
Definition: playlist.h:479
void replace_region(std::shared_ptr< Region > old, std::shared_ptr< Region > newr, timepos_t const &pos)
PBD::ScopedConnectionList region_drop_references_connections
Definition: playlist.h:350
void set_layer(std::shared_ptr< Region >, double)
void copy_regions(RegionList &) const
static void make_property_quarks()
static std::string generate_pgroup_id()
PBD::ScopedConnectionList region_state_changed_connections
Definition: playlist.h:349
bool shared_with(const PBD::ID &) const
void RemoveFromSoloSelectedList(const Region *)
PBD::Signal0< void > LayeringChanged
Definition: playlist.h:255
void split_region(std::shared_ptr< Region >, timepos_t const &position)
Playlist(std::shared_ptr< const Playlist >, timepos_t const &start, timepos_t const &cnt, std::string name, bool hidden=false)
void partition_internal(timepos_t start, timepos_t end, bool cutting, ThawList &thawlist)
std::shared_ptr< Region > find_region(const PBD::ID &) const
const PBD::ID & get_orig_track_id() const
Definition: playlist.h:276
timepos_t find_next_region_boundary(timepos_t const &, int dir)
void sync_all_regions_with_regions()
void release_notifications(bool from_undo=false)
void update_after_tempo_map_change()
bool _capture_insertion_underway
Definition: playlist.h:383
void set_orig_track_id(const PBD::ID &did)
void set_capture_insertion_in_progress(bool yn)
void get_region_list_equivalent_regions(std::shared_ptr< Region >, std::vector< std::shared_ptr< Region > > &)
void remove_region(std::shared_ptr< Region >)
uint32_t count_regions_at(timepos_t const &) const
virtual void uncombine(std::shared_ptr< Region >)
uint32_t subcnt
Definition: playlist.h:384
std::shared_ptr< Region > top_unmuted_region_at(timepos_t const &)
bool first_set_state
Definition: playlist.h:374
void get_source_equivalent_regions(std::shared_ptr< Region >, std::vector< std::shared_ptr< Region > > &)
void region_bounds_changed(const PBD::PropertyChange &, std::shared_ptr< Region >)
std::shared_ptr< Playlist > cut(timepos_t const &start, timecnt_t const &cnt)
void ripple(timepos_t const &at, timecnt_t const &distance, std::shared_ptr< Region > exclude)
Definition: playlist.h:195
void ripple(timepos_t const &at, timecnt_t const &distance, RegionList *exclude)
std::shared_ptr< RegionList > regions_touched_locked(timepos_t const &start, timepos_t const &end, bool with_tail)
std::pair< timepos_t, timepos_t > get_extent() const
void notify_layering_changed()
void duplicate(std::shared_ptr< Region >, timepos_t &position, float times)
RegionList pending_bounds
Definition: playlist.h:356
void notify_state_changed(const PBD::PropertyChange &)
virtual void flush_notifications(bool from_undo=false)
void set_region_ownership()
std::atomic< int > _refcnt
Definition: playlist.h:379
void shift(timepos_t const &at, timecnt_t const &distance, bool move_intersected)
std::shared_ptr< RegionList > regions_with_end_within(Temporal::TimeRange)
std::string pgroup_id()
Definition: playlist.h:133
void region_changed_proxy(const PBD::PropertyChange &, std::weak_ptr< Region >)
std::pair< timepos_t, timepos_t > _get_extent() const
layer_t top_layer() const
Playlist(Session &, std::string name, DataType type, bool hidden=false)
void deep_sources(std::set< std::shared_ptr< Source > > &) const
void duplicate(std::shared_ptr< Region >, timepos_t &position, timecnt_t const &gap, float times)
void foreach_region(boost::function< void(std::shared_ptr< Region >)>)
DataType _type
Definition: playlist.h:351
void partition(timepos_t const &start, timepos_t const &end, bool cut=false)
std::shared_ptr< RegionList > regions_at(timepos_t const &sample)
virtual void dump() const
bool pending_layering
Definition: playlist.h:358
void share_with(const PBD::ID &)
uint32_t max_source_level() const
PBD::ID _orig_track_id
Definition: playlist.h:385
uint32_t in_set_state
Definition: playlist.h:372
void notify_region_moved(std::shared_ptr< Region >)
virtual void post_combine(std::vector< std::shared_ptr< Region > > &, std::shared_ptr< Region >)
Definition: playlist.h:458
uint32_t _combine_ops
Definition: playlist.h:386
virtual XMLNode & state(bool) const
void finish_domain_bounce(Temporal::DomainBounceInfo &)
void nudge_after(timepos_t const &start, timecnt_t const &distance, bool forwards)
uint32_t _sort_id
Definition: playlist.h:352
void set_pgroup_id(std::string pgid)
Definition: playlist.h:134
std::pair< std::shared_ptr< Region >, std::shared_ptr< Region > > TwoRegions
Definition: playlist.h:453
std::set< std::shared_ptr< Region > > pending_adds
Definition: playlist.h:354
void rdiff_and_add_command(Session *)
samplepos_t find_next_transient(timepos_t const &position, int dir)
void mark_session_dirty()
bool shared() const
Definition: playlist.h:148
bool SoloSelectedActive()
Glib::Threads::RWLock region_lock
Definition: playlist.h:468
void get_equivalent_regions(std::shared_ptr< Region >, std::vector< std::shared_ptr< Region > > &)
void fade_range(std::list< TimelineRange > &)
virtual void pre_combine(std::vector< std::shared_ptr< Region > > &)
Definition: playlist.h:456
std::shared_ptr< RegionList > audible_regions_at(timepos_t const &)
void AddToSoloSelectedList(const Region *)
std::shared_ptr< Playlist > copy(std::list< TimelineRange > &)
void unshare_with(const PBD::ID &)
Playlist(Session &, const XMLNode &, DataType type, bool hidden=false)
RegionListProperty * clone() const
void get_content_as_xml(std::shared_ptr< Region >, XMLNode &) const
RegionListProperty * create() const
RegionListProperty(RegionListProperty const &p)
std::shared_ptr< Region > get_content_from_xml(XMLNode const &) const
Definition: id.h:35
Definition: xml++.h:114
GtkImageIconNameData name
Definition: gtkimage.h:6
#define LIBARDOUR_API
PBD::PropertyDescriptor< bool > hidden
PBD::PropertyDescriptor< std::string > name
PBD::PropertyDescriptor< bool > regions
PBD::PropertyDescriptor< timepos_t > start
std::list< std::shared_ptr< Region > > RegionList
Temporal::samplepos_t samplepos_t
uint32_t layer_t
DebugBits Threads
DebugBits Properties