Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

Track Class Reference

#include <track.h>

Inheritance diagram for Track:

ATrack VTrack VTrack List of all members.

Public Member Functions

 Track (EDL *edl, Tracks *tracks)
 Track ()
virtual ~Track ()
int create_objects ()
int get_id ()
virtual int load_defaults (Defaults *defaults)
int load (FileXML *file, int track_offset, uint32_t load_flags)
virtual int save_header (FileXML *file)
virtual int save_derived (FileXML *file)
virtual int load_header (FileXML *file, uint32_t load_flags)
virtual int load_derived (FileXML *file, uint32_t load_flags)
void equivalent_output (Track *track, double *result)
virtual void copy_from (Track *track)
Trackoperator= (Track &track)
virtual PluginSetnew_plugins ()
virtual void synchronize_params (Track *track)
virtual int vertical_span (Theme *theme)
int64_t horizontal_span ()
void resample (double old_rate, double new_rate)
double get_length ()
void get_source_dimensions (double position, int &w, int &h)
void insert_asset (Asset *asset, double length, double position, int track_number)
Plugininsert_effect (char *title, SharedLocation *shared_location, KeyFrame *keyframe, PluginSet *plugin_set, double start, double length, int plugin_type)
void insert_plugin_set (Track *track, double position)
void detach_effect (Plugin *plugin)
void insert_track (Track *track, double position, int replace_default, int edit_plugins)
void optimize ()
int is_muted (int64_t position, int direction)
void move_plugins_up (PluginSet *plugin_set)
void move_plugins_down (PluginSet *plugin_set)
void remove_pluginset (PluginSet *plugin_set)
void remove_asset (Asset *asset)
virtual int64_t to_units (double position, int round)
virtual double to_doubleunits (double position)
virtual double from_units (int64_t position)
virtual int identical (int64_t sample1, int64_t sample2)
Pluginget_current_plugin (double position, int plugin_set, int direction, int convert_units, int use_nudge)
Pluginget_current_transition (double position, int direction, int convert_units, int use_nudge)
void detach_shared_effects (int module)
int is_synthesis (RenderEngine *renderengine, int64_t position, int direction)
virtual int channel_is_playable (int64_t position, int direction, int *do_channel)
virtual int direct_copy_possible (int64_t start, int direction, int use_nudge)
int plugin_used (int64_t position, int64_t direction)
virtual int copy_settings (Track *track)
void shift_keyframes (double position, double length, int convert_units)
void shift_effects (double position, double length, int convert_units)
void change_plugins (SharedLocation &old_location, SharedLocation &new_location, int do_swap)
void change_modules (int old_location, int new_location, int do_swap)
int load_automation (FileXML *file)
int load_edits (FileXML *file)
virtual int change_channels (int oldchannels, int newchannels)
virtual int dump ()
int copy (double start, double end, FileXML *file, char *output_path="")
int copy_assets (double start, double end, ArrayList< Asset * > *asset_list)
virtual int copy_derived (int64_t start, int64_t end, FileXML *file)
virtual int paste_derived (int64_t start, int64_t end, int64_t total_length, FileXML *file, int &current_channel)
int clear (double start, double end, int edit_edits, int edit_labels, int clear_plugins, int convert_units, Edits *trim_edits)
void clear_automation (double selectionstart, double selectionend, int shift_autos, int default_only)
virtual int clear_automation_derived (AutoConf *auto_conf, double selectionstart, double selectionend, int shift_autos=1)
virtual int clear_derived (double start, double end)
int copy_automation (double selectionstart, double selectionend, FileXML *file, int default_only, int autos_only)
virtual int copy_automation_derived (AutoConf *auto_conf, double selectionstart, double selectionend, FileXML *file)
int paste_automation (double selectionstart, double total_length, double frame_rate, int64_t sample_rate, FileXML *file, int default_only)
virtual int paste_automation_derived (double selectionstart, double selectionend, double total_length, FileXML *file, int shift_autos, int &current_pan)
int paste_auto_silence (double start, double end)
virtual int paste_auto_silence_derived (int64_t start, int64_t end)
int scale_time (float rate_scale, int scale_edits, int scale_autos, int64_t start, int64_t end)
virtual int scale_time_derived (float rate_scale, int scale_edits, int scale_autos, int64_t start, int64_t end)
int purge_asset (Asset *asset)
int asset_used (Asset *asset)
int clear_handle (double start, double end, int clear_labels, int clear_plugins, double &distance)
int paste_silence (double start, double end, int edit_plugins)
virtual int select_translation (int cursor_x, int cursor_y)
virtual int update_translation (int cursor_x, int cursor_y, int shift_down)
int select_auto (AutoConf *auto_conf, int cursor_x, int cursor_y)
virtual int select_auto_derived (float zoom_units, float view_start, AutoConf *auto_conf, int cursor_x, int cursor_y)
int move_auto (AutoConf *auto_conf, int cursor_x, int cursor_y, int shift_down)
virtual int move_auto_derived (float zoom_units, float view_start, AutoConf *auto_conf, int cursor_x, int cursor_y, int shift_down)
int release_auto ()
virtual int release_auto_derived ()
int automation_is_used (int64_t start, int64_t end)
virtual int automation_is_used_derived (int64_t start, int64_t end)
int popup_transition (int cursor_x, int cursor_y)
int modify_edithandles (double oldposition, double newposition, int currentend, int handle_mode, int edit_labels, int edit_plugins)
int modify_pluginhandles (double oldposition, double newposition, int currentend, int handle_mode, int edit_labels, Edits *trim_edits)
int select_edit (int cursor_x, int cursor_y, double &new_start, double &new_end)
virtual int end_translation ()
virtual int reset_translation (int64_t start, int64_t end)
int feather_edits (int64_t start, int64_t end, int64_t units)
int64_t get_feather (int64_t selectionstart, int64_t selectionend)
int number_of ()
virtual int get_dimensions (double &view_start, double &view_units, double &zoom_units)
int64_t edit_change_duration (int64_t input_position, int64_t input_length, int reverse, int test_transitions, int use_nudge)
int64_t plugin_change_duration (int64_t input_position, int64_t input_length, int reverse, int use_nudge)
int need_edit (Edit *current, int test_transitions)
int playable_edit (int64_t position, int direction)

Public Attributes

EDLedl
Trackstracks
Editsedits
ArrayList< PluginSet * > plugin_set
Automationautomation
int y_pixel
int expand_view
int draw
int gang
char title [BCTEXTLEN]
int play
int record
int64_t nudge
int data_type
int64_t old_view_start
int pixel
int track_w
int track_h

Private Attributes

int id

Detailed Description

Definition at line 34 of file track.h.


Constructor & Destructor Documentation

Track::Track EDL edl,
Tracks tracks
 

Definition at line 33 of file track.C.

References draw, expand_view, gang, EDL::next_id(), nudge, EDLSession::output_h, EDLSession::output_w, play, record, EDL::session, title, track_h, track_w, and y_pixel.

Track::Track  ) 
 

Definition at line 837 of file track.C.

References y_pixel.

Track::~Track  )  [virtual]
 

Definition at line 50 of file track.C.

References automation, edits, and plugin_set.


Member Function Documentation

int Track::asset_used Asset asset  ) 
 

Definition at line 1431 of file track.C.

References Edit::asset, and edits.

Referenced by Tracks::asset_used().

int Track::automation_is_used int64_t  start,
int64_t  end
 

virtual int Track::automation_is_used_derived int64_t  start,
int64_t  end
[inline, virtual]
 

Definition at line 278 of file track.h.

virtual int Track::change_channels int  oldchannels,
int  newchannels
[inline, virtual]
 

Definition at line 200 of file track.h.

Referenced by Tracks::change_channels().

void Track::change_modules int  old_location,
int  new_location,
int  do_swap
 

Definition at line 1246 of file track.C.

References SharedLocation::module, plugin_set, Plugin::plugin_type, and Plugin::shared_location.

Referenced by Tracks::change_modules().

void Track::change_plugins SharedLocation old_location,
SharedLocation new_location,
int  do_swap
 

Definition at line 1226 of file track.C.

References plugin_set, Plugin::plugin_type, and Plugin::shared_location.

Referenced by Tracks::change_plugins().

int Track::channel_is_playable int64_t  position,
int  direction,
int *  do_channel
[virtual]
 

Reimplemented in VTrack.

Definition at line 1446 of file track.C.

Referenced by PlayableTracks::is_playable().

int Track::clear double  start,
double  end,
int  edit_edits,
int  edit_labels,
int  clear_plugins,
int  convert_units,
Edits trim_edits
 

Definition at line 1108 of file track.C.

References automation, Edits::clear(), Automation::clear(), edits, plugin_set, and to_units().

Referenced by Tracks::clear(), and Edits::clear_recursive().

void Track::clear_automation double  selectionstart,
double  selectionend,
int  shift_autos,
int  default_only
 

Definition at line 986 of file track.C.

References EDLSession::auto_conf, automation, Automation::clear(), edl, plugin_set, AutoConf::plugins, EDL::session, and to_units().

Referenced by Tracks::clear_automation(), and Tracks::clear_default_keyframe().

virtual int Track::clear_automation_derived AutoConf auto_conf,
double  selectionstart,
double  selectionend,
int  shift_autos = 1
[inline, virtual]
 

Definition at line 228 of file track.h.

virtual int Track::clear_derived double  start,
double  end
[inline, virtual]
 

Definition at line 232 of file track.h.

int Track::clear_handle double  start,
double  end,
int  clear_labels,
int  clear_plugins,
double &  distance
 

Definition at line 1140 of file track.C.

References Edits::clear_handle(), and edits.

Referenced by Tracks::clear_handle().

int Track::copy double  start,
double  end,
FileXML file,
char *  output_path = ""
 

Definition at line 1007 of file track.C.

References FileXML::append_newline(), FileXML::append_tag(), FileXML::append_text(), automation, Automation::copy(), Edits::copy(), copy_derived(), draw, edits, expand_view, gang, nudge, play, plugin_set, record, save_derived(), save_header(), AutoConf::set_all(), XMLTag::set_property(), XMLTag::set_title(), FileXML::tag, title, to_units(), track_h, and track_w.

Referenced by Tracks::copy().

int Track::copy_assets double  start,
double  end,
ArrayList< Asset * > *  asset_list
 

Definition at line 1073 of file track.C.

References Edit::asset, Edits::editof(), edits, Edit::startproject, and to_units().

Referenced by EDL::copy_assets().

int Track::copy_automation double  selectionstart,
double  selectionend,
FileXML file,
int  default_only,
int  autos_only
 

Definition at line 879 of file track.C.

References FileXML::append_newline(), FileXML::append_tag(), EDLSession::auto_conf, automation, Automation::copy(), edl, plugin_set, AutoConf::plugins, save_header(), EDL::session, XMLTag::set_title(), FileXML::tag, and to_units().

Referenced by Tracks::copy_automation().

virtual int Track::copy_automation_derived AutoConf auto_conf,
double  selectionstart,
double  selectionend,
FileXML file
[inline, virtual]
 

Definition at line 240 of file track.h.

virtual int Track::copy_derived int64_t  start,
int64_t  end,
FileXML file
[inline, virtual]
 

Reimplemented in VTrack.

Definition at line 213 of file track.h.

Referenced by copy().

void Track::copy_from Track track  )  [virtual]
 

Definition at line 167 of file track.C.

References automation, Automation::copy_from(), PluginSet::copy_from(), Edits::copy_from(), copy_settings(), edits, edl, plugin_set, track_h, and track_w.

Referenced by Tracks::copy_from(), and operator=().

int Track::copy_settings Track track  )  [virtual]
 

Reimplemented in ATrack, and VTrack.

Definition at line 63 of file track.C.

References draw, expand_view, gang, nudge, play, record, title, track_h, and track_w.

Referenced by copy_from(), VTrack::copy_settings(), ATrack::copy_settings(), and insert_track().

int Track::create_objects  ) 
 

Reimplemented in ATrack, and VTrack.

Definition at line 57 of file track.C.

Referenced by VTrack::create_objects(), and ATrack::create_objects().

void Track::detach_effect Plugin plugin  ) 
 

Definition at line 600 of file track.C.

References PluginSet::clear(), Edits::length(), Edit::length, PluginSet::optimize(), Edits::paste_silence(), plugin_set, and Edit::startproject.

Referenced by PluginPopupDetach::handle_event().

void Track::detach_shared_effects int  module  ) 
 

Definition at line 639 of file track.C.

References PluginSet::clear(), Edits::length(), Edit::length, SharedLocation::module, PluginSet::optimize(), Edits::paste_silence(), plugin_set, Plugin::plugin_type, Plugin::shared_location, and Edit::startproject.

Referenced by Tracks::detach_shared_effects().

int Track::direct_copy_possible int64_t  start,
int  direction,
int  use_nudge
[virtual]
 

Reimplemented in VTrack.

Definition at line 1476 of file track.C.

Referenced by PackageRenderer::direct_copy_possible(), and VRender::get_use_vconsole().

int Track::dump  )  [virtual]
 

Definition at line 799 of file track.C.

References automation, data_type, Automation::dump(), Edit::dump(), edits, plugin_set, and title.

Referenced by Tracks::dump(), and Edits::split_edit().

int64_t Track::edit_change_duration int64_t  input_position,
int64_t  input_length,
int  reverse,
int  test_transitions,
int  use_nudge
 

Definition at line 1308 of file track.C.

References Edit::asset, edits, Edits::length(), Edit::length, need_edit(), nudge, Edit::startproject, and Edit::transition.

Referenced by VirtualConsole::test_reconfigure().

virtual int Track::end_translation  )  [inline, virtual]
 

Reimplemented in VTrack.

Definition at line 299 of file track.h.

void Track::equivalent_output Track track,
double *  result
 

Definition at line 88 of file track.C.

References automation, data_type, edits, Edits::equivalent_output(), Automation::equivalent_output(), from_units(), MIN, nudge, play, plugin_set, Edit::startproject, track_h, and track_w.

Referenced by Tracks::equivalent_output().

int Track::feather_edits int64_t  start,
int64_t  end,
int64_t  units
 

double Track::from_units int64_t  position  )  [virtual]
 

Reimplemented in ATrack, and VTrack.

Definition at line 1491 of file track.C.

Referenced by PatchGUI::calculate_nudge_text(), Edits::clear_handle(), TrackCanvas::do_autos(), TrackCanvas::do_edit_handles(), TrackCanvas::do_edits(), TrackCanvas::do_plugin_autos(), TrackCanvas::do_plugin_handles(), TrackCanvas::do_plugins(), TrackCanvas::drag_stop(), IndexFile::draw_index(), TrackCanvas::draw_paste_destination(), TrackCanvas::draw_transitions(), TrackCanvas::edit_dimensions(), equivalent_output(), Edit::frame_w(), Tracks::get_affected_edits(), TrackCanvas::get_drop_position(), get_length(), Edits::modify_handles(), Tracks::move_effect(), TrackCanvas::plugin_dimensions(), TrackCanvas::synchronize_autos(), TransitionPopup::update(), KeyframePopup::update(), TrackCanvas::update_drag_auto(), TrackCanvas::update_drag_floatauto(), TrackCanvas::update_drag_pluginauto(), and TrackCanvas::update_drag_toggleauto().

Plugin * Track::get_current_plugin double  position,
int  plugin_set,
int  direction,
int  convert_units,
int  use_nudge
 

Definition at line 687 of file track.C.

References Edit::length, nudge, Edit::startproject, and to_units().

Referenced by SharedLocation::calculate_title(), Module::create_new_attachments(), PluginDialog::create_objects(), VirtualNode::expand_as_module(), EDL::get_shared_plugins(), insert_effect(), is_synthesis(), Plugin::is_synthesis(), plugin_used(), and Module::test_plugins().

Plugin * Track::get_current_transition double  position,
int  direction,
int  convert_units,
int  use_nudge
 

Definition at line 735 of file track.C.

References edits, Edit::length, nudge, Edit::startproject, to_units(), and Edit::transition.

Referenced by VTrack::direct_copy_possible(), and Module::update_transition().

virtual int Track::get_dimensions double &  view_start,
double &  view_units,
double &  zoom_units
[inline, virtual]
 

Reimplemented in ATrack, and VTrack.

Definition at line 310 of file track.h.

int64_t Track::get_feather int64_t  selectionstart,
int64_t  selectionend
 

int Track::get_id  ) 
 

Definition at line 77 of file track.C.

References id.

Referenced by PatchGUI::PatchGUI(), and PatchBay::update().

double Track::get_length  ) 
 

Definition at line 208 of file track.C.

References automation, edits, from_units(), Automation::get_length(), Edits::length(), and plugin_set.

Referenced by Tracks::concatenate_tracks(), TrackCanvas::drag_stop(), TrackCanvas::draw_highlighting(), horizontal_span(), insert_effect(), MWindow::insert_effects_cwindow(), insert_plugin_set(), insert_track(), Tracks::move_effect(), MWindow::paste_edls(), Tracks::total_length(), Tracks::total_playable_length(), Tracks::total_recordable_length(), and Tracks::total_video_length().

void Track::get_source_dimensions double  position,
int &  w,
int &  h
 

Definition at line 241 of file track.C.

References Edit::asset, edits, Asset::height, Edit::length, Edit::startproject, to_units(), and Asset::width.

Referenced by CWindowCameraBottom::handle_event(), CWindowCameraTop::handle_event(), CWindowCameraRight::handle_event(), and CWindowCameraLeft::handle_event().

int64_t Track::horizontal_span  ) 
 

Definition at line 258 of file track.C.

References edl, get_length(), EDL::local_session, EDLSession::sample_rate, EDL::session, and LocalSession::zoom_sample.

Referenced by EDL::get_tracks_width().

virtual int Track::identical int64_t  sample1,
int64_t  sample2
[inline, virtual]
 

Reimplemented in ATrack, and VTrack.

Definition at line 105 of file track.h.

void Track::insert_asset Asset asset,
double  length,
double  position,
int  track_number
 

Definition at line 341 of file track.C.

References edits, Edits::insert_asset(), and to_units().

Referenced by EDL::insert_asset().

Plugin * Track::insert_effect char *  title,
SharedLocation shared_location,
KeyFrame keyframe,
PluginSet plugin_set,
double  start,
double  length,
int  plugin_type
 

Definition at line 412 of file track.C.

References edl, expand_view, get_current_plugin(), get_length(), LocalSession::get_selectionend(), LocalSession::get_selectionstart(), PluginSet::insert_plugin(), Edit::length, EDL::local_session, SharedLocation::module, SharedLocation::plugin, Edit::startproject, to_units(), and tracks.

Referenced by MWindow::insert_effect(), and Tracks::move_effect().

void Track::insert_plugin_set Track track,
double  position
 

Definition at line 391 of file track.C.

References edl, get_length(), plugin_set, shift_effects(), and to_units().

Referenced by insert_track().

void Track::insert_track Track track,
double  position,
int  replace_default,
int  edit_plugins
 

Definition at line 367 of file track.C.

References automation, copy_settings(), edits, get_length(), Edits::insert_edits(), insert_plugin_set(), Automation::insert_track(), optimize(), and to_units().

Referenced by Tracks::concatenate_tracks(), and MWindow::paste_edls().

int Track::is_muted int64_t  position,
int  direction
 

int Track::is_synthesis RenderEngine renderengine,
int64_t  position,
int  direction
 

Definition at line 144 of file track.C.

References get_current_plugin(), Plugin::is_synthesis(), and plugin_set.

Referenced by PlayableTracks::is_playable(), and Plugin::is_synthesis().

int Track::load FileXML file,
int  track_offset,
uint32_t  load_flags
 

Definition at line 267 of file track.C.

References automation, draw, edits, edl, expand_view, gang, XMLTag::get_property(), PluginSet::load(), Edits::load(), Automation::load(), load_derived(), load_header(), nudge, play, plugin_set, FileXML::read_tag(), FileXML::read_text_until(), record, FileXML::tag, title, XMLTag::title_is(), track_h, and track_w.

Referenced by Tracks::load().

int Track::load_automation FileXML file  ) 
 

int Track::load_defaults Defaults *  defaults  )  [virtual]
 

Reimplemented in ATrack, and VTrack.

Definition at line 83 of file track.C.

Referenced by VTrack::load_defaults(), and ATrack::load_defaults().

virtual int Track::load_derived FileXML file,
uint32_t  load_flags
[inline, virtual]
 

Reimplemented in ATrack, and VTrack.

Definition at line 48 of file track.h.

Referenced by load().

int Track::load_edits FileXML file  ) 
 

virtual int Track::load_header FileXML file,