This commit is contained in:
itsmattkc
2019-02-02 23:16:03 +11:00
parent e6db5795a4
commit 3f952b4d6d
22 changed files with 56 additions and 34 deletions
+8 -1
View File
@@ -147,7 +147,14 @@ void Clip::queue_remove_earliest() {
}
}
av_frame_free(&queue[earliest_frame]);
queue.removeAt(earliest_frame);
queue.removeAt(earliest_frame);
}
QVector<Marker> &Clip::get_markers() {
if (media != nullptr && media->get_type() == MEDIA_TYPE_SEQUENCE) {
return media->to_sequence()->markers;
}
return markers;
}
Transition* Clip::get_opening_transition() {
+5 -3
View File
@@ -33,8 +33,8 @@ struct AVFilterContext;
struct AVDictionary;
class QOpenGLTexture;
struct Clip
{
class Clip {
public:
Clip(Sequence* s);
~Clip();
Clip* copy(Sequence* s, bool duplicate_transitions = true);
@@ -76,7 +76,7 @@ struct Clip
bool autoscale;
// markers
QVector<Marker> markers;
QVector<Marker>& get_markers();
// other variables (should be deep copied/duplicated in copy())
QList<Effect*> effects;
@@ -136,6 +136,8 @@ struct Clip
bool audio_reset;
bool audio_just_reset;
long audio_target_frame;
private:
QVector<Marker> markers;
};
#endif // CLIP_H
+1 -1
View File
@@ -17,7 +17,7 @@ class QGridLayout;
class QPushButton;
class QMouseEvent;
struct Clip;
class Clip;
class QXmlStreamReader;
class QXmlStreamWriter;
class Effect;
+1 -1
View File
@@ -16,7 +16,7 @@ enum VideoInterlacingMode {
};
struct Sequence;
struct Clip;
class Clip;
class PreviewGenerator;
class MediaThrobber;
+1 -1
View File
@@ -6,7 +6,7 @@
#include "project/marker.h"
#include "project/selection.h"
struct Clip;
class Clip;
class Transition;
class Media;
+2 -2
View File
@@ -814,7 +814,7 @@ AddMarkerAction::AddMarkerAction(bool is_sequence, void* s, long t, QString n) :
void AddMarkerAction::undo() {
QVector<Marker>& markers = is_sequence_internal ?
static_cast<Sequence*>(target)->markers :
static_cast<Clip*>(target)->markers;
static_cast<Clip*>(target)->get_markers();
if (index == -1) {
markers.removeLast();
@@ -830,7 +830,7 @@ void AddMarkerAction::redo() {
QVector<Marker>& markers = is_sequence_internal ?
static_cast<Sequence*>(target)->markers :
static_cast<Clip*>(target)->markers;
static_cast<Clip*>(target)->get_markers();
for (int i=0;i<markers.size();i++) {
if (markers.at(i).frame == time) {
+1 -1
View File
@@ -10,7 +10,7 @@ class EffectRow;
class EffectField;
class Transition;
class EffectGizmo;
struct Clip;
class Clip;
struct Sequence;
struct Footage;
struct EffectMeta;