started frontend for effect keyframes

This commit is contained in:
itsmattkc
2018-08-18 20:35:19 +10:00
parent 2dde8bde77
commit 2b3d9636db
44 changed files with 1541 additions and 1203 deletions
-26
View File
@@ -121,32 +121,6 @@ void Clip::refresh() {
}
}
void Clip::run_video_pre_effect_stack(long playhead, int* anchor_x, int* anchor_y) {
for (int j=0;j<effects.size();j++) {
if (effects.at(j)->enable_pre_gl && effects.at(j)->is_enabled()) effects.at(j)->process_gl(anchor_x, anchor_y);
}
if (opening_transition != NULL) {
int transition_progress = playhead - timeline_in;
if (transition_progress < opening_transition->length) {
opening_transition->process_transition((double)transition_progress/(double)opening_transition->length);
}
}
if (closing_transition != NULL) {
int transition_progress = closing_transition->length - (playhead - timeline_in - getLength() + closing_transition->length);
if (transition_progress < closing_transition->length) {
closing_transition->process_transition((double)transition_progress/(double)closing_transition->length);
}
}
}
void Clip::run_video_post_effect_stack() {
for (int j=0;j<effects.size();j++) {
if (effects.at(j)->enable_post_gl && effects.at(j)->is_enabled()) effects.at(j)->post_gl();
}
}
Clip::~Clip() {
if (open) {
close_clip(this);
+5 -6
View File
@@ -44,9 +44,7 @@ struct Clip
Clip* copy(Sequence* s);
void reset_audio();
void reset();
void refresh();
void run_video_pre_effect_stack(long playhead, int *anchor_x, int *anchor_y);
void run_video_post_effect_stack();
void refresh();
// timeline variables
Sequence* sequence;
@@ -80,8 +78,9 @@ struct Clip
AVCodec* codec;
AVCodecContext* codecCtx;
AVPacket* pkt;
AVFrame* frame;
AVFrame* sws_frame;
AVFrame* frame;
uchar* comp_frame;
int comp_frame_size;
// ffmpeg filters
AVFilterGraph* filter_graph;
@@ -105,7 +104,7 @@ struct Clip
QMutex open_lock;
// video playback variables
SwsContext* sws_ctx;
//SwsContext* sws_ctx;
QOpenGLTexture* texture;
long texture_frame;
+1 -1
View File
@@ -12,7 +12,7 @@
#include "panels/effectcontrols.h"
#include "playback/playback.h"
#include "ui/sourcetable.h"
#include "effects/effects.h"
#include "effects/effect.h"
#include "io/media.h"
#include "playback/cacher.h"
#include "effects/transition.h"