better ]shared transitions, dock tabs, effects panel name
This commit is contained in:
+10
-2
@@ -123,7 +123,7 @@ void Clip::refresh() {
|
||||
effects.at(i)->refresh();
|
||||
}
|
||||
|
||||
recalculateMaxLength();
|
||||
recalculateMaxLength();
|
||||
}
|
||||
|
||||
void Clip::queue_clear() {
|
||||
@@ -178,6 +178,14 @@ Clip::~Clip() {
|
||||
av_packet_free(&pkt);
|
||||
}
|
||||
|
||||
long Clip::get_clip_in_with_transition() {
|
||||
if (get_opening_transition() != NULL && get_opening_transition()->secondary_clip != NULL) {
|
||||
// we must be the secondary clip, so return (timeline in - length)
|
||||
return clip_in - get_opening_transition()->length;
|
||||
}
|
||||
return clip_in;
|
||||
}
|
||||
|
||||
long Clip::get_timeline_in_with_transition() {
|
||||
if (get_opening_transition() != NULL && get_opening_transition()->secondary_clip != NULL) {
|
||||
// we must be the secondary clip, so return (timeline in - length)
|
||||
@@ -189,7 +197,7 @@ long Clip::get_timeline_in_with_transition() {
|
||||
long Clip::get_timeline_out_with_transition() {
|
||||
if (get_closing_transition() != NULL && get_closing_transition()->secondary_clip != NULL) {
|
||||
// we must be the primary clip, so return (timeline out + length2)
|
||||
return timeline_out + get_closing_transition()->length2;
|
||||
return timeline_out + get_closing_transition()->length;
|
||||
} else {
|
||||
return timeline_out;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ struct Clip
|
||||
void reset_audio();
|
||||
void reset();
|
||||
void refresh();
|
||||
long get_clip_in_with_transition();
|
||||
long get_timeline_in_with_transition();
|
||||
long get_timeline_out_with_transition();
|
||||
long getLength();
|
||||
|
||||
+1
-1
@@ -782,7 +782,7 @@ void Effect::process_shader(double timecode, GLTextureCoords&) {
|
||||
}
|
||||
}
|
||||
|
||||
void Effect::process_coords(double, GLTextureCoords&) {}
|
||||
void Effect::process_coords(double, GLTextureCoords&, int data) {}
|
||||
|
||||
GLuint Effect::process_superimpose(double timecode) {
|
||||
bool recreate_texture = false;
|
||||
|
||||
+1
-7
@@ -71,11 +71,6 @@ extern QMutex effects_loaded;
|
||||
#define KEYFRAME_TYPE_SMOOTH 1
|
||||
#define KEYFRAME_TYPE_BEZIER 2
|
||||
|
||||
#define TRAN_TYPE_OPEN 1
|
||||
#define TRAN_TYPE_CLOSE 2
|
||||
#define TRAN_TYPE_OPENWLINK 3
|
||||
#define TRAN_TYPE_CLOSEWLINK 4
|
||||
|
||||
struct GLTextureCoords {
|
||||
int grid_size;
|
||||
|
||||
@@ -111,7 +106,6 @@ public:
|
||||
Clip* parent_clip;
|
||||
const EffectMeta* meta;
|
||||
long length; // used only for transitions
|
||||
long length2; // used only for transitions
|
||||
int id;
|
||||
QString name;
|
||||
CollapsibleWidget* container;
|
||||
@@ -147,7 +141,7 @@ public:
|
||||
const char* ffmpeg_filter;
|
||||
|
||||
virtual void process_shader(double timecode, GLTextureCoords&);
|
||||
virtual void process_coords(double timecode, GLTextureCoords& coords);
|
||||
virtual void process_coords(double timecode, GLTextureCoords& coords, int data);
|
||||
virtual GLuint process_superimpose(double timecode);
|
||||
virtual void process_audio(double timecode_start, double timecode_end, quint8* samples, int nb_bytes, int channel_count);
|
||||
public slots:
|
||||
|
||||
@@ -22,6 +22,13 @@ int Transition::copy(Clip *c, Clip* s) {
|
||||
return copy_index;
|
||||
}
|
||||
|
||||
long Transition::get_length() {
|
||||
if (secondary_clip != NULL) {
|
||||
return length * 2;
|
||||
}
|
||||
return length;
|
||||
}
|
||||
|
||||
Transition* get_transition_from_meta(Clip* c, Clip* s, const EffectMeta* em) {
|
||||
if (!em->filename.isEmpty()) {
|
||||
// load effect from file
|
||||
|
||||
@@ -20,6 +20,7 @@ public:
|
||||
Transition(Clip* c, Clip* s, const EffectMeta* em);
|
||||
int copy(Clip* c, Clip* s);
|
||||
Clip* secondary_clip;
|
||||
long get_length();
|
||||
};
|
||||
|
||||
#endif // TRANSITION_H
|
||||
|
||||
+6
-2
@@ -243,11 +243,15 @@ void AddTransitionCommand::redo() {
|
||||
if (type == TA_OPENING_TRANSITION) {
|
||||
clip->opening_transition = create_transition(clip, secondary, transition);
|
||||
if (secondary != NULL) secondary->closing_transition = clip->opening_transition;
|
||||
if (length > 0) clip->get_opening_transition()->length = length;
|
||||
if (length > 0) {
|
||||
clip->get_opening_transition()->length = length;
|
||||
}
|
||||
} else {
|
||||
clip->closing_transition = create_transition(clip, secondary, transition);
|
||||
if (secondary != NULL) secondary->opening_transition = clip->closing_transition;
|
||||
if (length > 0) clip->get_closing_transition()->length = length;
|
||||
if (length > 0) {
|
||||
clip->get_closing_transition()->length = length;
|
||||
}
|
||||
}
|
||||
mainWindow->setWindowModified(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user