20 #ifndef __ardour_region_h__
21 #define __ardour_region_h__
24 #include <boost/shared_ptr.hpp>
25 #include <boost/enable_shared_from_this.hpp>
26 #include <boost/utility.hpp>
73 class ExportSpecification;
91 typedef std::vector<boost::shared_ptr<Source> >
SourceList;
100 bool set_name (
const std::string& str);
118 uint32_t max_source_level ()
const;
129 float shift ()
const {
return _shift; }
147 framepos_t earliest_possible_position ()
const;
162 bool muted ()
const {
return _muted; }
170 bool captured ()
const {
return !(_import || _external); }
171 bool can_move ()
const {
return !_position_locked && !_locked; }
174 bool import ()
const {
return _import; }
181 void recompute_position_from_lock_style ();
183 void suspend_property_changes ();
186 return first_frame() <= frame && frame <= last_frame();
207 std::string source_string ()
const;
216 virtual void update_after_tempo_map_change ();
219 bool at_natural_position ()
const;
220 void move_to_natural_position ();
235 void raise_to_top ();
236 void lower_to_bottom ();
239 void clear_sync_position ();
240 void set_hidden (
bool yn);
241 void set_muted (
bool yn);
242 void set_whole_file (
bool yn);
243 void set_automatic (
bool yn);
244 void set_opaque (
bool yn);
245 void set_locked (
bool yn);
246 void set_video_locked (
bool yn);
247 void set_position_locked (
bool yn);
256 bool is_compound ()
const;
261 const SourceList&
sources ()
const {
return _sources; }
264 std::vector<std::string> master_source_names();
265 void set_master_sources (
const SourceList&);
279 virtual int set_state (
const XMLNode&,
int version);
323 void invalidate_transients ();
325 void drop_sources ();
331 Region (
const SourceList& srcs);
354 virtual void set_position_internal (
framepos_t pos,
bool allow_bbt_recompute);
355 virtual void set_length_internal (
framecnt_t);
382 void modify_front (
framepos_t new_position,
bool reset_fade);
383 void modify_end (
framepos_t new_position,
bool reset_fade);
385 void maybe_uncopy ();
390 bool verify_start_mutable (
framepos_t&_start);
393 virtual void recompute_at_start () = 0;
394 virtual void recompute_at_end () = 0;
419 void register_properties ();
421 void use_sources (SourceList
const &);
AnalysisFeatureList _transients
PBD::Property< bool > _automatic
void set_layering_index(uint64_t when)
PBD::Property< bool > _muted
const SourceList & master_sources() const
virtual bool depends_on(boost::shared_ptr< Region >) const
PBD::Property< bool > _position_locked
PBD::Property< framepos_t > _ancestral_start
PBD::Property< bool > _external
Evoral::Range< framepos_t > last_range() const
LIBARDOUR_API PBD::PropertyDescriptor< layer_t > layer
LIBARDOUR_API PBD::PropertyDescriptor< bool > hidden
framepos_t _last_position
LIBARDOUR_API PBD::PropertyDescriptor< framepos_t > ancestral_start
LIBARDOUR_API PBD::PropertyDescriptor< bool > video_locked
bool covers(framepos_t frame) const
const SourceList & sources() const
virtual bool is_dependent() const
bool valid_transients() const
virtual void fade_range(framepos_t, framepos_t)
PBD::Property< bool > _whole_file
PBD::Property< framepos_t > _sync_position
boost::shared_ptr< Source > source(uint32_t n=0) const
LIBARDOUR_API PBD::PropertyDescriptor< framepos_t > start
PBD::Property< bool > _left_of_split
LIBARDOUR_API PBD::PropertyDescriptor< float > stretch
PBD::Property< float > _stretch
framepos_t last_position() const
virtual int separate_by_channel(ARDOUR::Session &, std::vector< boost::shared_ptr< Region > > &) const
PBD::Property< bool > _valid_transients
PBD::Property< bool > _right_of_split
PBD::Property< bool > _locked
AnalysisFeatureList transients()
SourceList _master_sources
const DataType & data_type() const
LIBARDOUR_API PBD::PropertyDescriptor< bool > automatic
PBD::Property< framepos_t > _start
virtual bool can_trim_start_before_source_start() const
virtual int set_transients(AnalysisFeatureList &)
bool video_locked() const
RegionEditState _first_edit
PBD::Property< bool > _sync_marked
std::list< framepos_t > AnalysisFeatureList
framecnt_t ancestral_length() const
LIBARDOUR_API PBD::PropertyDescriptor< float > shift
bool position_locked() const
LIBARDOUR_API PBD::PropertyDescriptor< bool > locked
virtual void add_transient(framepos_t)
std::vector< boost::shared_ptr< Source > > SourceList
PBD::EnumProperty< PositionLockStyle > _position_lock_style
PBD::Property< bool > _opaque
Evoral::OverlapType coverage(framepos_t start, framepos_t end) const
LIBARDOUR_API PBD::PropertyDescriptor< bool > opaque
LIBARDOUR_API void make_property_quarks()
LIBARDOUR_API PBD::PropertyDescriptor< bool > external
LIBARDOUR_API PBD::PropertyDescriptor< bool > right_of_split
virtual int adjust_transients(frameoffset_t)
PositionLockStyle position_lock_style() const
framepos_t position() const
Timecode::BBT_Time _bbt_time
LIBARDOUR_API PBD::PropertyDescriptor< uint64_t > layering_index
virtual void remove_transient(framepos_t)
uint32_t n_channels() const
LIBARDOUR_API PBD::PropertyDescriptor< framepos_t > position
LIBARDOUR_API PBD::PropertyDescriptor< framecnt_t > ancestral_length
LIBARDOUR_API PBD::PropertyDescriptor< framecnt_t > sync_position
uint64_t layering_index() const
framecnt_t last_length() const
OverlapType coverage(T sa, T ea, T sb, T eb)
LIBARDOUR_API PBD::PropertyDescriptor< bool > sync_marked
PBD::Property< float > _shift
framecnt_t length() const
Evoral::Range< framepos_t > range() const
framepos_t first_frame() const
virtual int update_transient(framepos_t, framepos_t)
PBD::Property< bool > _hidden
virtual int get_transients(AnalysisFeatureList &, bool force_new=false)
framepos_t ancestral_start() const
LIBARDOUR_API PBD::PropertyDescriptor< PositionLockStyle > position_lock_style
PBD::Property< framecnt_t > _ancestral_length
static PBD::Signal2< void, boost::shared_ptr< ARDOUR::Region >, const PBD::PropertyChange & > RegionPropertyChanged
LIBARDOUR_API PBD::PropertyDescriptor< bool > valid_transients
PBD::Property< uint64_t > _layering_index
LIBARDOUR_API PBD::PropertyDescriptor< bool > muted
LIBARDOUR_API PBD::PropertyDescriptor< bool > position_locked
LIBARDOUR_API PBD::PropertyDescriptor< bool > whole_file
PBD::Property< bool > _video_locked
PBD::Property< bool > _import
LIBARDOUR_API PBD::PropertyDescriptor< bool > left_of_split
boost::shared_ptr< ARDOUR::Playlist > playlist() const
boost::weak_ptr< ARDOUR::Playlist > _playlist
PBD::Property< framepos_t > _position
PBD::Property< framecnt_t > _length
framepos_t last_frame() const
LIBARDOUR_API PBD::PropertyDescriptor< framecnt_t > length