projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
change composer to chroma only - no src alpha blend, resize about pref, new expanders...
[goodguy/history.git]
/
cinelerra-5.1
/
cinelerra
/
track.C
diff --git
a/cinelerra-5.1/cinelerra/track.C
b/cinelerra-5.1/cinelerra/track.C
index 05bb50365446eeaddbda67a3b00b8273ac6a4445..bac9abd68050bed5c1f8908fa9e92e239f8e4b7d 100644
(file)
--- a/
cinelerra-5.1/cinelerra/track.C
+++ b/
cinelerra-5.1/cinelerra/track.C
@@
-66,6
+66,7
@@
Track::Track(EDL *edl, Tracks *tracks) : ListItem<Track>()
track_w = edl->session->output_w;
track_h = edl->session->output_h;
id = EDL::next_id();
track_w = edl->session->output_w;
track_h = edl->session->output_h;
id = EDL::next_id();
+ mixer_id = -1;
}
Track::~Track()
}
Track::~Track()
@@
-87,6
+88,7
@@
int Track::copy_settings(Track *track)
this->gang = track->gang;
this->record = track->record;
this->nudge = track->nudge;
this->gang = track->gang;
this->record = track->record;
this->nudge = track->nudge;
+ this->mixer_id = track->mixer_id;
this->play = track->play;
this->track_w = track->track_w;
this->track_h = track->track_h;
this->play = track->play;
this->track_w = track->track_w;
this->track_h = track->track_h;
@@
-216,16
+218,13
@@
printf("Track::operator= 1\n");
int Track::vertical_span(Theme *theme)
{
int result = 0;
int Track::vertical_span(Theme *theme)
{
int result = 0;
- if(expand_view)
- result = edl->local_session->zoom_track +
- plugin_set.total *
- theme->get_image("plugin_bg_data")->get_h();
- else
- result = edl->local_session->zoom_track;
-
- if(edl->session->show_titles)
+ if( show_titles() )
result += theme->get_image("title_bg_data")->get_h();
result += theme->get_image("title_bg_data")->get_h();
-
+ if( show_assets() )
+ result += edl->local_session->zoom_track;
+ if( expand_view )
+ result += plugin_set.total * theme->get_image("plugin_bg_data")->get_h();
+ result = MAX(result, theme->title_h);
return result;
}
return result;
}
@@
-282,7
+281,20
@@
int Track::has_speed()
return 0;
}
return 0;
}
+int Track::show_assets()
+{
+ return expand_view || edl->session->show_assets ? 1 : 0;
+}
+int Track::show_titles()
+{
+ return expand_view || edl->session->show_titles ? 1 : 0;
+}
+
+int Track::show_transitions()
+{
+ return expand_view || edl->session->auto_conf->transitions ? 1 : 0;
+}
void Track::get_source_dimensions(double position, int &w, int &h)
{
void Track::get_source_dimensions(double position, int &w, int &h)
{
@@
-321,6
+333,7
@@
int Track::load(FileXML *file, int track_offset, uint32_t load_flags)
gang = file->tag.get_property("GANG", gang);
draw = file->tag.get_property("DRAW", draw);
nudge = file->tag.get_property("NUDGE", nudge);
gang = file->tag.get_property("GANG", gang);
draw = file->tag.get_property("DRAW", draw);
nudge = file->tag.get_property("NUDGE", nudge);
+ mixer_id = file->tag.get_property("MIXER_ID", mixer_id);
expand_view = file->tag.get_property("EXPAND", expand_view);
track_w = file->tag.get_property("TRACK_W", track_w);
track_h = file->tag.get_property("TRACK_H", track_h);
expand_view = file->tag.get_property("EXPAND", expand_view);
track_w = file->tag.get_property("TRACK_W", track_w);
track_h = file->tag.get_property("TRACK_H", track_h);
@@
-339,7
+352,10
@@
int Track::load(FileXML *file, int track_offset, uint32_t load_flags)
else
if(file->tag.title_is("TITLE"))
{
else
if(file->tag.title_is("TITLE"))
{
- result = file->skip_tag();
+ XMLBuffer data;
+ file->read_text_until("/TITLE", &data);
+ memset(title, 0, sizeof(title));
+ strncpy(title, data.cstr(), sizeof(title)-1);
}
else
if(load_flags && automation->load(file)
}
else
if(load_flags && automation->load(file)
@@
-1068,6
+1084,7
@@
int Track::copy(double start,
file->tag.set_title("TRACK");
file->tag.set_property("RECORD", record);
file->tag.set_property("NUDGE", nudge);
file->tag.set_title("TRACK");
file->tag.set_property("RECORD", record);
file->tag.set_property("NUDGE", nudge);
+ file->tag.set_property("MIXER_ID", mixer_id);
file->tag.set_property("PLAY", play);
file->tag.set_property("GANG", gang);
file->tag.set_property("DRAW", draw);
file->tag.set_property("PLAY", play);
file->tag.set_property("GANG", gang);
file->tag.set_property("DRAW", draw);
@@
-1149,18
+1166,19
@@
int Track::copy_assets(double start,
return 0;
}
return 0;
}
+int Track::blade(double position)
+{
+ int64_t start = to_units(position, 0);
+ Edit *edit = edits->split_edit(start);
+ if( !edit ) return 1;
+ edit->hard_left = 1;
+ if( edit->previous ) edit->previous->hard_right = 1;
+ return 0;
+}
-
-
-
-int Track::clear(double start,
- double end,
- int edit_edits,
- int edit_labels,
- int edit_plugins,
- int edit_autos,
- int convert_units,
- Edits *trim_edits)
+int Track::clear(double start, double end,
+ int edit_edits, int edit_labels, int edit_plugins,
+ int edit_autos, int convert_units, Edits *trim_edits)
{
// Edits::move_auto calls this routine after the units are converted to the track
// format.
{
// Edits::move_auto calls this routine after the units are converted to the track
// format.
@@
-1851,6
+1869,13
@@
double Track::from_units(int64_t position)
return (double)position;
}
return (double)position;
}
+int64_t Track::frame_align(int64_t position, int round)
+{
+ if( data_type != TRACK_VIDEO && edl->session->cursor_on_frames )
+ position = to_units(edl->align_to_frame(from_units(position), round), round);
+ return position;
+}
+
int Track::plugin_exists(Plugin *plugin)
{
for(int number = 0; number < plugin_set.size(); number++)
int Track::plugin_exists(Plugin *plugin)
{
for(int number = 0; number < plugin_set.size(); number++)
@@
-1874,3
+1899,14
@@
int Track::plugin_exists(Plugin *plugin)
return 0;
}
return 0;
}
+int Track::get_mixer_id()
+{
+ if( mixer_id < 0 ) {
+ int v = 0;
+ for( Track *track=tracks->first; track!=0; track=track->next )
+ if( track->mixer_id > v ) v = track->mixer_id;
+ mixer_id = v + 1;
+ }
+ return mixer_id;
+}
+