#include "localsession.h"
#include "plugin.h"
#include "mainsession.h"
-#include "nestededls.h"
+#include "strack.h"
#include "trackcanvas.h"
#include "tracks.h"
#include "transition.h"
user_title[0] = 0;
nested_edl = 0;
is_plugin = 0;
+ hard_left = 0;
+ hard_right = 0;
}
Indexable* Edit::get_source()
file->tag.set_property("STARTSOURCE", startsource_in_selection);
file->tag.set_property("CHANNEL", (int64_t)channel);
file->tag.set_property("LENGTH", length_in_selection);
+ file->tag.set_property("HARD_LEFT", hard_left);
+ file->tag.set_property("HARD_RIGHT", hard_right);
if(user_title[0]) file->tag.set_property("USER_TITLE", user_title);
//printf("Edit::copy 5\n");
int Edit::silence()
{
- return asset || nested_edl ? 0 : 1;
+ return (track->data_type != TRACK_SUBTITLE ?
+ asset || nested_edl :
+ *((SEdit *)this)->get_text()) ? 0 : 1;
}
void Edit::copy_from(Edit *edit)
{
- this->nested_edl = edl->nested_edls->get_copy(edit->nested_edl);
+ this->nested_edl = edl->nested_edls.get_nested(edit->nested_edl);
this->asset = edl->assets->update(edit->asset);
this->startsource = edit->startsource;
this->startproject = edit->startproject;
this->length = edit->length;
+ this->hard_left = edit->hard_left;
+ this->hard_right = edit->hard_right;
strcpy (this->user_title, edit->user_title);
if(edit->transition)
this->startsource == edit.startsource &&
this->startproject == edit.startproject &&
this->length == edit.length &&
+ this->hard_left == edit.hard_left &&
+ this->hard_right == edit.hard_right &&
this->transition == edit.transition &&
this->channel == edit.channel);
return result;
fprintf(fp," TRANSITION %p\n", transition);
transition->dump(fp);
}
- fprintf(fp," startsource %jd startproject %jd length %jd\n",
- startsource, startproject, length); fflush(fp);
+ fprintf(fp," startsource %jd startproject %jd hard lt/rt %d/%d length %jd\n",
+ startsource, startproject, hard_left, hard_right, length); fflush(fp);
return 0;
}
{
startsource = file->tag.get_property("STARTSOURCE", (int64_t)0);
length = file->tag.get_property("LENGTH", (int64_t)0);
+ hard_left = file->tag.get_property("HARD_LEFT", (int64_t)0);
+ hard_right = file->tag.get_property("HARD_RIGHT", (int64_t)0);
user_title[0] = 0;
file->tag.get_property("USER_TITLE", user_title);
this->startproject = startproject;
startproject -= cut_length;
startsource -= cut_length;
length += cut_length;
-printf("Edit::shift_start_out 2\n");
}
else
{ // Clear entire previous edit
next->startproject += cut_length;
next->startsource += cut_length;
next->length -= cut_length;
-//printf("Edit::shift_end_out 2 %d\n", cut_length);
+//printf("Edit::shift_end_out %d cut_length=%d\n", __LINE__, cut_length);
}
else
{
+//printf("Edit::shift_end_out %d cut_length=%d next->length=%d\n", __LINE__, cut_length, next->length);
cut_length = next->length;
+ next->startproject += next->length;
+ next->startsource += next->length;
next->length = 0;
length += cut_length;
+//track->dump();
}
}
else
return 0;
}
+void Edit::get_title(char *title)
+{
+ if( user_title[0] ) {
+ strcpy(title, user_title);
+ return;
+ }
+ Indexable *idxbl = asset ? (Indexable*)asset : (Indexable*)nested_edl;
+ if( !idxbl ) {
+ title[0] = 0;
+ return;
+ }
+ FileSystem fs;
+ fs.extract_name(title, idxbl->path);
+ if( asset || track->data_type == TRACK_AUDIO ) {
+ char number[BCSTRLEN];
+ sprintf(number, " #%d", channel + 1);
+ strcat(title, number);
+ }
+}
+