Ardour  9.0-pre0-582-g084a23a80d
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 #pragma once
28 
29 #include <atomic>
30 #include <list>
31 #include <map>
32 #include <memory>
33 #include <set>
34 #include <string>
35 
36 #include <sys/stat.h>
37 
38 #include <optional>
39 
40 #include <glib.h>
41 
42 #include "pbd/sequence_property.h"
43 #include "pbd/stateful.h"
45 #include "pbd/undo.h"
46 
47 #include "temporal/range.h"
48 
49 #include "ardour/ardour.h"
50 #include "ardour/data_type.h"
51 #include "ardour/region.h"
52 #include "ardour/session_object.h"
53 #include "ardour/thawlist.h"
54 
55 namespace ARDOUR {
56 
57 class Session;
58 class Playlist;
59 class Crossfade;
60 class Track;
61 
62 namespace Properties {
63  /* fake the type, since regions are handled by SequenceProperty which doesn't
64  * care about such things.
65  */
67 }
68 
69 class LIBARDOUR_API RegionListProperty : public PBD::SequenceProperty<std::list<std::shared_ptr<Region> > >
70 {
71 public:
73 
75  void get_content_as_xml (std::shared_ptr<Region>, XMLNode&) const;
76  std::shared_ptr<Region> get_content_from_xml (XMLNode const&) const;
77 
78 private:
80 
81  /* copy construction only by ourselves */
83 
84  friend class Playlist;
85  /* we live and die with our playlist, no lifetime management needed */
87 };
88 
89 class LIBARDOUR_API Playlist : public SessionObject, public Temporal::TimeDomainProvider, public std::enable_shared_from_this<Playlist>
90 {
91 public:
92  static void make_property_quarks ();
93 
94  Playlist (Session&, const XMLNode&, DataType type, bool hidden = false);
95  Playlist (Session&, std::string name, DataType type, bool hidden = false);
96  Playlist (std::shared_ptr<const Playlist>, std::string name, bool hidden = false);
97  Playlist (std::shared_ptr<const Playlist>, timepos_t const & start, timepos_t const & cnt, std::string name, bool hidden = false);
98 
99  virtual ~Playlist ();
100 
101  void update (const RegionListProperty::ChangeRecord&);
103  void rdiff (std::vector<PBD::Command*>&) const;
104 
106 
107  std::shared_ptr<Region> region_by_id (const PBD::ID&) const;
108 
109  uint32_t max_source_level () const;
110 
111  bool set_name (const std::string& str);
113 
114  /*playlist group IDs (pgroup_id) is a group identifier that is implicitly
115  * or explicitly assigned to playlists so they can be associated with each other.
116  *
117  * For example, when you switch a track's playlist, you can choose to
118  * switch other tracks to the same pgroup_id
119  *
120  * pgroup_id's should be unique; currently we use a timestamp to avoid duplicates.
121  * pgroup_id's are human-readable strings; use string comparison to find matches.
122  *
123  * To be useful, we want every playlist to be assigned a sensible pgroup_id
124  * Some examples of pgroup_id's getting assigned *explicitly* include:
125  * when the user makes a new playlist for a track or Track Group
126  * when the user triggers an action like "new playlist for rec-armed tracks"
127  * Some examples of pgroup_id's getting assigned *implicitly* include:
128  * the user makes the first recording pass ("take") in an empty playlist
129  * the user imports tracks.
130  */
131  static std::string generate_pgroup_id();
132  std::string pgroup_id() { return _pgroup_id; }
133  void set_pgroup_id(std::string pgid) { _pgroup_id = pgid; PropertyChanged (Properties::name); }
134 
135  virtual void clear (bool with_signals = true);
136  virtual void dump () const;
137 
138  void use ();
139  void release ();
140 
141  bool empty () const;
142  bool used () const { return _refcnt.load () != 0; }
143  int sort_id () const { return _sort_id; }
144  bool frozen () const { return _frozen; }
145  const DataType& data_type () const { return _type; }
146  bool hidden () const { return _hidden; }
147  bool shared () const { return !_shared_with_ids.empty (); }
148 
149  void set_frozen (bool yn);
150 
155 
156  void share_with (const PBD::ID&);
157  void unshare_with (const PBD::ID&);
158  bool shared_with (const PBD::ID&) const;
159  void reset_shares ();
160 
161  uint32_t n_regions() const;
162  bool all_regions_empty() const;
163  std::pair<timepos_t, timepos_t> get_extent () const;
164  std::pair<timepos_t, timepos_t> get_extent_with_endspace() const;
166 
167  /* Editing operations */
168 
169  void add_region (std::shared_ptr<Region>, timepos_t const & position, float times = 1, bool auto_partition = false);
170  void remove_region (std::shared_ptr<Region>);
171  void get_equivalent_regions (std::shared_ptr<Region>, std::vector<std::shared_ptr<Region> >&);
172 
173  void get_region_list_equivalent_regions (std::shared_ptr<Region>, std::vector<std::shared_ptr<Region> >&);
174  void get_source_equivalent_regions (std::shared_ptr<Region>, std::vector<std::shared_ptr<Region> >&);
175  void replace_region (std::shared_ptr<Region> old, std::shared_ptr<Region> newr, timepos_t const & pos);
176  void split_region (std::shared_ptr<Region>, timepos_t const & position);
177  void split (timepos_t const & at);
178  void shift (timepos_t const & at, timecnt_t const & distance, bool move_intersected);
179  void partition (timepos_t const & start, timepos_t const & end, bool cut = false);
180  void duplicate (std::shared_ptr<Region>, timepos_t & position, float times);
181  void duplicate (std::shared_ptr<Region>, timepos_t & position, timecnt_t const & gap, float times);
182  void duplicate_until (std::shared_ptr<Region>, timepos_t & position, timecnt_t const & gap, timepos_t const & end);
183  void duplicate_range (TimelineRange&, float times);
184  void duplicate_ranges (std::list<TimelineRange>&, float times);
185  void nudge_after (timepos_t const & start, timecnt_t const & distance, bool forwards);
186  virtual std::shared_ptr<Region> combine (const RegionList&, std::shared_ptr<Track>);
187  virtual void uncombine (std::shared_ptr<Region>);
188  void fade_range (std::list<TimelineRange>&);
189  void remove_gaps (timecnt_t const & gap_threshold, timecnt_t const & leave_gap, std::function<void (timepos_t, timecnt_t)> gap_callback);
190 
191  void shuffle (std::shared_ptr<Region>, int dir);
192 
193  void ripple (timepos_t const & at, timecnt_t const & distance, RegionList *exclude);
194  void ripple (timepos_t const & at, timecnt_t const & distance, std::shared_ptr<Region> exclude) {
195  RegionList el;
196  if (exclude) {
197  el.push_back (exclude);
198  }
199  ripple (at, distance, &el);
200  }
201 
203 
204  std::shared_ptr<Playlist> cut (std::list<TimelineRange>&);
205  std::shared_ptr<Playlist> copy (std::list<TimelineRange>&);
206  int paste (std::shared_ptr<Playlist>, timepos_t const & position, float times);
207 
209  {
210  return regions;
211  }
212 
213  std::shared_ptr<RegionList> region_list ();
214 
215  std::shared_ptr<RegionList> regions_at (timepos_t const & sample);
216  uint32_t count_regions_at (timepos_t const &) const;
217 
222  std::shared_ptr<RegionList> regions_touched (timepos_t const & start, timepos_t const & end);
223  std::shared_ptr<RegionList> regions_with_start_within (Temporal::TimeRange);
224  std::shared_ptr<RegionList> regions_with_end_within (Temporal::TimeRange);
225  std::shared_ptr<RegionList> audible_regions_at (timepos_t const &);
226  uint32_t region_use_count (std::shared_ptr<Region>) const;
227  std::shared_ptr<Region> find_region (const PBD::ID&) const;
228  std::shared_ptr<Region> top_region_at (timepos_t const &);
229  std::shared_ptr<Region> top_unmuted_region_at (timepos_t const &);
230  std::shared_ptr<Region> find_next_region (timepos_t const &, RegionPoint point, int dir);
232  bool region_is_shuffle_constrained (std::shared_ptr<Region>);
233  bool has_region_at (timepos_t const &) const;
234  bool region_is_audible_at (std::shared_ptr<Region>, timepos_t const&);
235 
237 
238  bool uses_source (std::shared_ptr<const Source> src, bool shallow = false) const;
239  void deep_sources (std::set<std::shared_ptr<Source> >&) const;
240 
242 
243  void foreach_region (std::function<void(std::shared_ptr<Region>)>);
244 
245  XMLNode& get_state () const;
246  virtual int set_state (const XMLNode&, int version);
248 
249  PBD::Signal<void(bool)> InUse;
251  PBD::Signal<void(std::weak_ptr<Region> )> RegionAdded;
252  PBD::Signal<void(std::weak_ptr<Region> )> RegionRemoved;
255 
257  PBD::Signal<void(std::list< Temporal::RangeMove> const &, bool)> RangesMoved;
258 
262  PBD::Signal<void(std::list< Temporal::Range> const &)> RegionsExtended;
263 
264  static std::string bump_name (std::string old_name, Session&);
265 
266  void freeze ();
267  void thaw (bool from_undo = false);
268 
269  void raise_region (std::shared_ptr<Region>);
270  void lower_region (std::shared_ptr<Region>);
271  void raise_region_to_top (std::shared_ptr<Region>);
272  void lower_region_to_bottom (std::shared_ptr<Region>);
273 
274  void set_orig_track_id (const PBD::ID& did);
275  const PBD::ID& get_orig_track_id () const { return _orig_track_id; }
276 
277  /* destructive editing */
278 
279  virtual bool destroy_region (std::shared_ptr<Region>) = 0;
280 
282 
283  /* special case function used by UI selection objects, which have playlists that actually own the regions
284  within them.
285  */
286 
287  void drop_regions ();
288 
289  virtual std::shared_ptr<Crossfade> find_crossfade (const PBD::ID&) const
290  {
291  return std::shared_ptr<Crossfade> ();
292  }
293 
295  uint32_t combine_ops() const { return _combine_ops; }
296 
297  void set_layer (std::shared_ptr<Region>, double);
298 
300 
304 
305 protected:
306  friend class Session;
307 
308 protected:
309  class RegionReadLock : public Glib::Threads::RWLock::ReaderLock
310  {
311  public:
313  : Glib::Threads::RWLock::ReaderLock (pl->region_lock)
314  {
315  }
317  };
318 
319  class RegionWriteLock : public Glib::Threads::RWLock::WriterLock
320  {
321  public:
322  RegionWriteLock (Playlist* pl, bool do_block_notify = true)
323  : Glib::Threads::RWLock::WriterLock (pl->region_lock)
324  , playlist (pl)
325  , block_notify (do_block_notify)
326  {
327  if (block_notify) {
328  playlist->delay_notifications ();
329  }
330  }
331 
333  {
335  thawlist.release ();
336  if (block_notify) {
337  playlist->release_notifications ();
338  }
339  }
340 
344  };
345 
346  RegionListProperty regions; /* the current list of regions in the playlist */
347  std::set<std::shared_ptr<Region> > all_regions; /* all regions ever added to this playlist */
351  uint32_t _sort_id;
352  mutable std::atomic<int> block_notifications;
353  std::set<std::shared_ptr<Region> > pending_adds;
354  std::set<std::shared_ptr<Region> > pending_removes;
358 
359  std::set<const Region*> _soloSelectedRegions;
360 
366  std::list<Temporal::RangeMove> pending_range_moves;
367 
369  std::list<Temporal::TimeRange> pending_region_extensions;
370 
371  uint32_t in_set_state;
372  bool in_undo;
374  bool _hidden;
375  bool _rippling;
377  bool _nudging;
378  std::atomic<int> _refcnt;
379  bool in_flush;
381  bool _frozen;
383  uint32_t subcnt;
385  uint32_t _combine_ops;
386 
387  std::list<PBD::ID> _shared_with_ids;
388 
389  void init (bool hide);
390 
391  bool holding_state () const
392  {
393  return block_notifications.load () != 0;
394  }
395 
397  void release_notifications (bool from_undo = false);
398  virtual void flush_notifications (bool from_undo = false);
399  void clear_pending ();
400 
401  void _set_sort_id ();
402 
403  std::shared_ptr<RegionList> regions_touched_locked (timepos_t const & start, timepos_t const & end, bool with_tail);
404 
405  void notify_region_removed (std::shared_ptr<Region>);
406  void notify_region_added (std::shared_ptr<Region>);
410  void notify_region_moved (std::shared_ptr<Region>);
411  void notify_region_start_trimmed (std::shared_ptr<Region>);
412  void notify_region_end_trimmed (std::shared_ptr<Region>);
413 
415 
416  void region_changed_proxy (const PBD::PropertyChange&, std::weak_ptr<Region>);
417  virtual bool region_changed (const PBD::PropertyChange&, std::shared_ptr<Region>);
418 
419  void region_bounds_changed (const PBD::PropertyChange&, std::shared_ptr<Region>);
420  void region_deleted (std::shared_ptr<Region>);
421 
422  void sort_regions ();
423 
424  void ripple_locked (timepos_t const & at, timecnt_t const & distance, RegionList *exclude);
425  void ripple_unlocked (timepos_t const & at, timecnt_t const & distance, RegionList *exclude, ThawList& thawlist, bool notify = true);
426 
427  virtual void region_going_away (std::weak_ptr<Region> /*region*/);
428 
429  virtual XMLNode& state (bool) const;
430 
431  bool add_region_internal (std::shared_ptr<Region>, timepos_t const & position, ThawList& thawlist);
432 
433  int remove_region_internal (std::shared_ptr<Region>, ThawList& thawlist);
434  void copy_regions (RegionList&) const;
435 
436  void partition_internal (timepos_t start, timepos_t end, bool cutting, ThawList& thawlist);
437 
438  std::pair<timepos_t, timepos_t> _get_extent() const;
439 
440  std::shared_ptr<Playlist> cut_copy (std::shared_ptr<Playlist> (Playlist::*pmf)(timepos_t const &, timecnt_t const &),
441  std::list<TimelineRange>& ranges);
442  std::shared_ptr<Playlist> cut (timepos_t const & start, timecnt_t const & cnt);
443  std::shared_ptr<Playlist> copy (timepos_t const & start, timecnt_t const & cnt);
444 
445  void relayer ();
446 
447  void begin_undo ();
448  void end_undo ();
449 
450  virtual void _split_region (std::shared_ptr<Region>, timepos_t const & position, ThawList& thawlist);
451 
452  typedef std::pair<std::shared_ptr<Region>, std::shared_ptr<Region> > TwoRegions;
453 
454  /* this is called before we create a new compound region */
455  virtual void pre_combine (std::vector<std::shared_ptr<Region> >&) {}
456  /* this is called before we create a new compound region */
457  virtual void post_combine (std::vector<std::shared_ptr<Region> >&, std::shared_ptr<Region>) {}
458  /* this is called before we remove a compound region and replace it
459  * with its constituent regions
460  */
461  virtual void pre_uncombine (std::vector<std::shared_ptr<Region> >&, std::shared_ptr<Region>) {}
462 
463 private:
464  friend class RegionReadLock;
465  friend class RegionWriteLock;
466 
467  mutable Glib::Threads::RWLock region_lock;
468 
469 private:
471  void coalesce_and_check_crossfades (std::list<Temporal::TimeRange>);
472  std::shared_ptr<RegionList> find_regions_at (timepos_t const &);
473 
474  mutable std::optional<std::pair<timepos_t, timepos_t> > _cached_extent;
475  timepos_t _end_space; //this is used when we are pasting a range with extra space at the end
477 
478  std::string _pgroup_id; // when we make multiple playlists in one action, they will share the same pgroup_id
479 };
480 
481 } /* namespace ARDOUR */
482 
483 
RegionReadLock(Playlist const *pl)
Definition: playlist.h:312
RegionWriteLock(Playlist *pl, bool do_block_notify=true)
Definition: playlist.h:322
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:461
virtual bool region_changed(const PBD::PropertyChange &, std::shared_ptr< Region >)
void time_domain_changed()
const DataType & data_type() const
Definition: playlist.h:145
uint32_t combine_ops() const
Definition: playlist.h:295
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)
void foreach_region(std::function< void(std::shared_ptr< Region >)>)
virtual ~Playlist()
void start_domain_bounce(Temporal::DomainBounceInfo &)
void rdiff(std::vector< PBD::Command * > &) const
const RegionListProperty & region_list_property() const
Definition: playlist.h:208
bool holding_state() const
Definition: playlist.h:391
bool _playlist_shift_active
Definition: playlist.h:476
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:354
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:289
void setup_layering_indices(RegionList const &)
void raise_region_to_top(std::shared_ptr< Region >)
std::set< const Region * > _soloSelectedRegions
Definition: playlist.h:359
virtual void clear(bool with_signals=true)
PBD::Signal< void(bool)> InUse
Definition: playlist.h:249
PBD::Signal< void(std::list< Temporal::RangeMove > const &, bool)> RangesMoved
Definition: playlist.h:257
void region_deleted(std::shared_ptr< Region >)
PBD::Signal< void(std::list< Temporal::Range > const &)> RegionsExtended
Definition: playlist.h:262
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 >)
int paste(std::shared_ptr< Playlist >, timepos_t const &position, float times)
std::set< std::shared_ptr< Region > > all_regions
Definition: playlist.h:347
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:144
virtual std::shared_ptr< Region > combine(const RegionList &, std::shared_ptr< Track >)
timepos_t _end_space
Definition: playlist.h:475
std::shared_ptr< RegionList > regions_with_start_within(Temporal::TimeRange)
bool used() const
Definition: playlist.h:142
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:366
std::list< Temporal::TimeRange > pending_region_extensions
Definition: playlist.h:369
bool empty() const
void delay_notifications()
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:356
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:387
void notify_region_end_trimmed(std::shared_ptr< Region >)
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:143
XMLNode & get_state() const
RegionListProperty regions
Definition: playlist.h:346
PBD::Signal< void(std::weak_ptr< Region >)> RegionAdded
Definition: playlist.h:251
void ripple_locked(timepos_t const &at, timecnt_t const &distance, RegionList *exclude)
bool hidden() const
Definition: playlist.h:146
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 >)
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:352
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:478
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:349
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:348
bool shared_with(const PBD::ID &) const
void RemoveFromSoloSelectedList(const Region *)
void split_region(std::shared_ptr< Region >, timepos_t const &position)
PBD::Signal< void()> NameChanged
Definition: playlist.h:253
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:275
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:382
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:383
std::shared_ptr< Region > top_unmuted_region_at(timepos_t const &)
bool first_set_state
Definition: playlist.h:373
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:194
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:355
std::optional< std::pair< timepos_t, timepos_t > > _cached_extent
Definition: playlist.h:474
void notify_state_changed(const PBD::PropertyChange &)
virtual void flush_notifications(bool from_undo=false)
void set_region_ownership()
PBD::Signal< void(std::weak_ptr< Region >)> RegionRemoved
Definition: playlist.h:252
std::atomic< int > _refcnt
Definition: playlist.h:378
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:132
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)
DataType _type
Definition: playlist.h:350
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:357
void share_with(const PBD::ID &)
uint32_t max_source_level() const
PBD::ID _orig_track_id
Definition: playlist.h:384
PBD::Signal< void()> LayeringChanged
Definition: playlist.h:254
uint32_t in_set_state
Definition: playlist.h:371
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:457
uint32_t _combine_ops
Definition: playlist.h:385
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:351
void set_pgroup_id(std::string pgid)
Definition: playlist.h:133
void remove_gaps(timecnt_t const &gap_threshold, timecnt_t const &leave_gap, std::function< void(timepos_t, timecnt_t)> gap_callback)
std::pair< std::shared_ptr< Region >, std::shared_ptr< Region > > TwoRegions
Definition: playlist.h:452
std::set< std::shared_ptr< Region > > pending_adds
Definition: playlist.h:353
void rdiff_and_add_command(Session *)
samplepos_t find_next_transient(timepos_t const &position, int dir)
PBD::Signal< void()> ContentsChanged
Definition: playlist.h:250
void mark_session_dirty()
bool shared() const
Definition: playlist.h:147
bool SoloSelectedActive()
Glib::Threads::RWLock region_lock
Definition: playlist.h:467
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:455
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:34
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