Add Timecode Display effect
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "effects/internal/transformeffect.h"
|
||||
#include "effects/internal/texteffect.h"
|
||||
#include "effects/internal/timecodeeffect.h"
|
||||
#include "effects/internal/solideffect.h"
|
||||
#include "effects/internal/audionoiseeffect.h"
|
||||
#include "effects/internal/toneeffect.h"
|
||||
@@ -51,6 +52,7 @@ Effect* create_effect(Clip* c, const EffectMeta* em) {
|
||||
switch (em->internal) {
|
||||
case EFFECT_INTERNAL_TRANSFORM: return new TransformEffect(c, em);
|
||||
case EFFECT_INTERNAL_TEXT: return new TextEffect(c, em);
|
||||
case EFFECT_INTERNAL_TIMECODE: return new TimecodeEffect(c, em);
|
||||
case EFFECT_INTERNAL_SOLID: return new SolidEffect(c, em);
|
||||
case EFFECT_INTERNAL_NOISE: return new AudioNoiseEffect(c, em);
|
||||
case EFFECT_INTERNAL_VOLUME: return new VolumeEffect(c, em);
|
||||
@@ -117,6 +119,11 @@ void load_internal_effects() {
|
||||
em.internal = EFFECT_INTERNAL_TEXT;
|
||||
video_effects.append(em);
|
||||
|
||||
em.name = "Timecode";
|
||||
em.category = "Render";
|
||||
em.internal = EFFECT_INTERNAL_TIMECODE;
|
||||
video_effects.append(em);
|
||||
|
||||
em.name = "Solid";
|
||||
em.category = "Render";
|
||||
em.internal = EFFECT_INTERNAL_SOLID;
|
||||
|
||||
+4
-1
@@ -60,6 +60,7 @@ extern QMutex effects_loaded;
|
||||
#define EFFECT_INTERNAL_PAN 5
|
||||
#define EFFECT_INTERNAL_TONE 6
|
||||
#define EFFECT_INTERNAL_SHAKE 7
|
||||
#define EFFECT_INTERNAL_TIMECODE 8
|
||||
|
||||
|
||||
|
||||
@@ -160,6 +161,9 @@ protected:
|
||||
// superimpose effect
|
||||
QImage img;
|
||||
QOpenGLTexture* texture;
|
||||
|
||||
// enable effect to update constantly
|
||||
bool enable_always_update;
|
||||
private:
|
||||
// superimpose effect
|
||||
QString script;
|
||||
@@ -169,7 +173,6 @@ private:
|
||||
QGridLayout* ui_layout;
|
||||
QWidget* ui;
|
||||
bool bound;
|
||||
bool enable_always_update;
|
||||
|
||||
// superimpose functions
|
||||
virtual void redraw(double timecode);
|
||||
|
||||
Reference in New Issue
Block a user