hacked footage viewer playing at wrong frequency
This commit is contained in:
+8
-1
@@ -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
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user