some timeline refactoring, preparing for rewrites
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
namespace olive {
|
||||
|
||||
class Block;
|
||||
class TrackOutput;
|
||||
class Track;
|
||||
|
||||
class Timeline {
|
||||
public:
|
||||
@@ -38,18 +38,10 @@ public:
|
||||
kTrimOut
|
||||
};
|
||||
|
||||
enum TrackType {
|
||||
kTrackTypeNone = -1,
|
||||
kTrackTypeVideo,
|
||||
kTrackTypeAudio,
|
||||
kTrackTypeSubtitle,
|
||||
kTrackTypeCount
|
||||
};
|
||||
|
||||
static bool IsATrimMode(MovementMode mode) {return mode == kTrimIn || mode == kTrimOut;}
|
||||
|
||||
struct EditToInfo {
|
||||
TrackOutput* track;
|
||||
Track* track;
|
||||
rational nearest_time;
|
||||
Block* nearest_block;
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
namespace olive {
|
||||
|
||||
TimelineCoordinate::TimelineCoordinate() :
|
||||
track_(Timeline::kTrackTypeNone, 0)
|
||||
track_(Track::kNone, 0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ TimelineCoordinate::TimelineCoordinate(const rational &frame, const TrackReferen
|
||||
{
|
||||
}
|
||||
|
||||
TimelineCoordinate::TimelineCoordinate(const rational &frame, const Timeline::TrackType &track_type, const int &track_index) :
|
||||
TimelineCoordinate::TimelineCoordinate(const rational &frame, const Track::Type &track_type, const int &track_index) :
|
||||
frame_(frame),
|
||||
track_(track_type, track_index)
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ class TimelineCoordinate
|
||||
public:
|
||||
TimelineCoordinate();
|
||||
TimelineCoordinate(const rational& frame, const TrackReference& track);
|
||||
TimelineCoordinate(const rational& frame, const Timeline::TrackType& track_type, const int& track_index);
|
||||
TimelineCoordinate(const rational& frame, const Track::Type& track_type, const int& track_index);
|
||||
|
||||
const rational& GetFrame() const;
|
||||
const TrackReference& GetTrack() const;
|
||||
|
||||
@@ -23,18 +23,18 @@
|
||||
namespace olive {
|
||||
|
||||
TrackReference::TrackReference() :
|
||||
type_(Timeline::kTrackTypeNone),
|
||||
type_(Track::kNone),
|
||||
index_(0)
|
||||
{
|
||||
}
|
||||
|
||||
TrackReference::TrackReference(const Timeline::TrackType &type, const int &index) :
|
||||
TrackReference::TrackReference(const Track::Type &type, const int &index) :
|
||||
type_(type),
|
||||
index_(index)
|
||||
{
|
||||
}
|
||||
|
||||
const Timeline::TrackType &TrackReference::type() const
|
||||
const Track::Type &TrackReference::type() const
|
||||
{
|
||||
return type_;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#ifndef TRACKREFERENCE_H
|
||||
#define TRACKREFERENCE_H
|
||||
|
||||
#include "node/output/track/track.h"
|
||||
#include "timeline/timelinecommon.h"
|
||||
|
||||
namespace olive {
|
||||
@@ -30,9 +31,9 @@ class TrackReference
|
||||
public:
|
||||
TrackReference();
|
||||
|
||||
TrackReference(const Timeline::TrackType& type, const int& index);
|
||||
TrackReference(const Track::Type& type, const int& index);
|
||||
|
||||
const Timeline::TrackType& type() const;
|
||||
const Track::Type& type() const;
|
||||
|
||||
const int& index() const;
|
||||
|
||||
@@ -43,7 +44,7 @@ public:
|
||||
bool operator!=(const TrackReference& ref) const;
|
||||
|
||||
private:
|
||||
Timeline::TrackType type_;
|
||||
Track::Type type_;
|
||||
|
||||
int index_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user