hacked footage viewer playing at wrong frequency

This commit is contained in:
itsmattkc
2018-11-12 15:38:34 +11:00
parent 967a91b8f0
commit 398e1aef43
7 changed files with 34 additions and 16 deletions
+8 -1
View File
@@ -33,6 +33,7 @@
#include "effects/internal/linearfadetransition.h"
#include "effects/internal/exponentialfadetransition.h"
#include "effects/internal/logarithmicfadetransition.h"
#include "effects/internal/cornerpineffect.h"
#include <QCheckBox>
#include <QGridLayout>
@@ -68,6 +69,7 @@ Effect* create_effect(Clip* c, const EffectMeta* em) {
case EFFECT_INTERNAL_LINEARFADE: return new LinearFadeTransition(c, em);
case EFFECT_INTERNAL_EXPONENTIALFADE: return new ExponentialFadeTransition(c, em);
case EFFECT_INTERNAL_LOGARITHMICFADE: return new LogarithmicFadeTransition(c, em);
case EFFECT_INTERNAL_CORNERPIN: return new CornerPinEffect(c, em);
}
} else {
dout << "[ERROR] Invalid effect data";
@@ -117,6 +119,11 @@ void load_internal_effects() {
em.internal = EFFECT_INTERNAL_TRANSFORM;
video_effects.append(em);
em.name = "Corner Pin";
em.category = "Distort";
em.internal = EFFECT_INTERNAL_CORNERPIN;
video_effects.append(em);
em.name = "Text";
em.category = "Render";
em.internal = EFFECT_INTERNAL_TEXT;
@@ -132,7 +139,6 @@ void load_internal_effects() {
em.internal = EFFECT_INTERNAL_SHAKE;
video_effects.append(em);
// internal transitions
em.type = EFFECT_TYPE_TRANSITION;
em.category = "";
@@ -766,6 +772,7 @@ Effect* Effect::copy(Clip* c) {
void Effect::process_shader(double timecode) {
glslProgram->setUniformValue("resolution", parent_clip->getWidth(), parent_clip->getHeight());
glslProgram->setUniformValue("time", (GLfloat) timecode);
for (int i=0;i<rows.size();i++) {
EffectRow* row = rows.at(i);
+2 -1
View File
@@ -71,7 +71,8 @@ extern QMutex effects_loaded;
#define EFFECT_INTERNAL_LINEARFADE 9
#define EFFECT_INTERNAL_EXPONENTIALFADE 10
#define EFFECT_INTERNAL_LOGARITHMICFADE 11
#define EFFECT_INTERNAL_COUNT 12
#define EFFECT_INTERNAL_CORNERPIN 12
#define EFFECT_INTERNAL_COUNT 13
#define KEYFRAME_TYPE_LINEAR 0
#define KEYFRAME_TYPE_SMOOTH 1
+8 -3
View File
@@ -19,9 +19,14 @@ CornerPinEffect::CornerPinEffect(Clip *c, const EffectMeta *em) : Effect(c, em)
bottom_right_x = bottom_right->add_field(EFFECT_FIELD_DOUBLE);
bottom_right_y = bottom_right->add_field(EFFECT_FIELD_DOUBLE);
connect(intensity_val, SIGNAL(changed()), this, SLOT(field_changed()));
connect(rotation_val, SIGNAL(changed()), this, SLOT(field_changed()));
connect(frequency_val, SIGNAL(changed()), this, SLOT(field_changed()));
connect(top_left_x, SIGNAL(changed()), this, SLOT(field_changed()));
connect(top_left_y, SIGNAL(changed()), this, SLOT(field_changed()));
connect(top_right_x, SIGNAL(changed()), this, SLOT(field_changed()));
connect(top_right_y, SIGNAL(changed()), this, SLOT(field_changed()));
connect(bottom_left_x, SIGNAL(changed()), this, SLOT(field_changed()));
connect(bottom_left_y, SIGNAL(changed()), this, SLOT(field_changed()));
connect(bottom_right_x, SIGNAL(changed()), this, SLOT(field_changed()));
connect(bottom_right_y, SIGNAL(changed()), this, SLOT(field_changed()));
}
void CornerPinEffect::process_coords(double timecode, GLTextureCoords &coords) {
+2 -2
View File
@@ -144,13 +144,13 @@ void TransformEffect::process_coords(double timecode, GLTextureCoords& coords) {
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
break;
case BLEND_MODE_OVERLAY:
glBlendFunc(GL_DST_COLOR, GL_SRC_ALPHA);
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
break;
case BLEND_MODE_SCREEN:
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_COLOR);
break;
case BLEND_MODE_MULTIPLY:
glBlendFunc(GL_DST_COLOR, GL_ZERO);
glBlendFunc(GL_DST_COLOR, GL_ONE_MINUS_SRC_ALPHA);
break;
default:
dout << "[ERROR] Invalid blend mode. This is a bug - please contact developers";