33 #include <sys/types.h>
35 #include <glibmm/threads.h>
64 IsSessionRange = 0x40,
67 IsClockOrigin = 0x200,
82 bool locked()
const {
return _locked; }
101 const std::string&
name()
const {
return _name; }
117 bool is_mark ()
const {
return _flags & IsMark; }
123 bool is_skip()
const {
return _flags & IsSkip; }
125 bool is_skipping()
const {
return (_flags & IsSkip) && (_flags & IsSkipping); }
126 bool is_xrun()
const {
return _flags & IsXrun; }
128 bool is_scene()
const {
return (
bool) _scene_change && _flags & IsScene; }
132 bool is_range()
const {
return _flags & (IsSessionRange | IsRangeMarker | IsAutoLoop | IsAutoPunch | IsCDMarker); }
136 std::shared_ptr<SceneChange>
scene_change()
const {
return _scene_change; }
139 int32_t
cue_id()
const { assert (is_cue_marker());
return _cue; }
193 _l->suspend_signals ();
196 _l->suspend_signals ();
199 _l->resume_signals ();
307 return first_mark_after_flagged (t, include_special_ranges);
310 return first_mark_before_flagged (t, include_special_ranges);
353 Glib::Threads::RWLock::ReaderLock lm (_lock);
364 mutable Glib::Threads::RWLock
_lock;
ChangeSuspender(ChangeSuspender const &other)
ChangeSuspender(Location *l)
void start_domain_bounce(Temporal::DomainBounceInfo &)
void set_is_range_marker(bool yn, void *src)
XMLNode & get_state() const
static PBD::Signal< void(Location *)> time_domain_changed
const std::string & name() const
bool is_cue_marker() const
void set_name(const std::string &str)
void set_time_domain(Temporal::TimeDomain)
int64_t timestamp() const
void set_scene_change(std::shared_ptr< SceneChange >)
Location(Location const &other, bool no_signal)
void actually_emit_signal(Signal)
void set_cue(bool yn, void *src)
PBD::Signal< void()> CueChanged
int move_to(timepos_t const &pos)
void set_cd(bool yn, void *src)
bool operator==(const Location &other)
Location(Location const &)
bool is_session_range() const
static PBD::Signal< void(Location *)> cue_change
void set_auto_punch(bool yn, void *src)
PBD::Signal< void()> SceneChanged
PBD::Signal< void()> NameChanged
static PBD::Signal< void(Location *)> start_changed
bool set_flag_internal(bool yn, Flags flag)
PBD::Signal< void()> FlagsChanged
samplepos_t end_sample() const
std::shared_ptr< SceneChange > _scene_change
Location(Session &, Temporal::timepos_t const &, Temporal::timepos_t const &, const std::string &, Flags bits=Flags(0), int32_t cue_id=0)
static PBD::Signal< void(Location *)> flags_changed
std::shared_ptr< SceneChange > scene_change() const
static PBD::Signal< void(Location *)> changed
void finish_domain_bounce(Temporal::DomainBounceInfo &)
bool is_auto_loop() const
static PBD::Signal< void(Location *)> name_changed
void set_hidden(bool yn, void *src)
Location(Session &, const XMLNode &)
samplecnt_t length_samples() const
bool is_cd_marker() const
samplepos_t start_sample() const
bool is_range_marker() const
static PBD::Signal< void(Location *)> lock_changed
int set_end(timepos_t const &e, bool force=false)
Temporal::TimeDomain position_time_domain() const
PBD::Signal< void()> LockChanged
std::map< std::string, std::string > cd_info
std::set< Signal > _postponed_signals
bool is_auto_punch() const
bool is_clock_origin() const
int set_state(const XMLNode &, int version)
void set_skipping(bool yn)
uint32_t _signals_suspended
static PBD::Signal< void(Location *)> scene_changed
int set(timepos_t const &start, timepos_t const &end)
void set_section(bool yn)
PBD::Signal< void()> TimeDomainChanged
static PBD::Signal< void(Location *)> end_changed
PBD::Signal< void()> Changed
PBD::Signal< void()> StartChanged
void set_position_time_domain(Temporal::TimeDomain)
void set_is_clock_origin(bool yn, void *src)
bool matches(Flags f) const
int set_start(timepos_t const &s, bool force=false)
static XMLNode & cd_info_node(const std::string &, const std::string &)
PBD::Signal< void()> EndChanged
void set_auto_loop(bool yn, void *src)
void time_domain_changed()
Location * add_range(timepos_t const &start, timepos_t const &end)
Location * range_starts_at(timepos_t const &pos, timecnt_t const &slop=timecnt_t(Temporal::AudioTime), bool incl=false) const
PBD::Signal< void(Location *)> current_changed
std::pair< Temporal::timepos_t, Location * > LocationPair
int set_state(const XMLNode &, int version)
Location * current() const
timepos_t first_mark_after_flagged(timepos_t const &, bool include_special_ranges=false, Location::Flags whitelist=Location::Flags(0), Location::Flags blacklist=Location::Flags(0), Location::Flags equalist=Location::Flags(0), Location **retval=nullptr)
void listen_to(Location *)
int next_available_name(std::string &result, std::string base)
Location * auto_loop_location() const
void start_domain_bounce(Temporal::DomainBounceInfo &)
XMLNode & get_state() const
const LocationList & list() const
void finish_domain_bounce(Temporal::DomainBounceInfo &)
Location * next_section(Location *, timepos_t &, timepos_t &) const
void cut_copy_section(timepos_t const &start, timepos_t const &end, timepos_t const &to, SectionOperation const op)
timepos_t first_mark_before_flagged(timepos_t const &, bool include_special_ranges=false, Location::Flags whitelist=Location::Flags(0), Location::Flags blacklist=Location::Flags(0), Location::Flags equalist=Location::Flags(0), Location **retval=nullptr)
timepos_t first_mark_after(timepos_t const &t, bool include_special_ranges=false)
uint32_t num_range_markers() const
Location * get_location_by_id(PBD::ID)
void set_time_domain(Temporal::TimeDomain)
void find_all_between(timepos_t const &start, timepos_t const &end, LocationList &, Location::Flags)
int set_current(Location *, bool want_lock=true)
Location * section_at(timepos_t const &, timepos_t &, timepos_t &) const
Location * clock_origin_location() const
void ripple(timepos_t const &at, timecnt_t const &distance, bool include_locked)
Location * current_location
PBD::Signal< void(Location *)> added
Location * next_section_iter(Location *, timepos_t &, timepos_t &, std::vector< LocationPair > &cache) const
Glib::Threads::RWLock _lock
int set_current_unlocked(Location *)
void location_changed(Location *)
timepos_t first_mark_before(timepos_t const &t, bool include_special_ranges=false)
PBD::Signal< void(Location *)> removed
void marks_either_side(timepos_t const &, timepos_t &, timepos_t &) const
bool clear_cue_markers(samplepos_t start, samplepos_t end)
void set_clock_origin(Location *, void *src)
void apply(T &obj, void(T::*method)(const LocationList &)) const
bool clear_xrun_markers()
std::list< Location * > LocationList
Location * auto_punch_location() const
bool clear_scene_markers(samplepos_t start, samplepos_t end)
Location * mark_at(timepos_t const &, timecnt_t const &slop=timecnt_t::zero(Temporal::AudioTime), Location::Flags flags=Location::Flags(0)) const
void add(Location *, bool make_current=false)
void sorted_section_locations(std::vector< LocationPair > &) const
Location * session_range_location() const
PBD::Signal< void()> changed
static timecnt_t zero(TimeDomain td)
int62_t const & distance() const
PBD::PropertyDescriptor< timepos_t > start
Temporal::samplecnt_t samplecnt_t
Temporal::samplepos_t samplepos_t