project: replaced proxy with pre-cache
Removed proxy task and replaced with a true honest-to-god pre-cache for footage. This footage is pre-cached to a sequence and therefore 100% ready for use in it once the task is done.
This commit is contained in:
@@ -28,9 +28,7 @@ OLIVE_NAMESPACE_ENTER
|
||||
|
||||
VideoStream::VideoStream() :
|
||||
start_time_(0),
|
||||
is_image_sequence_(false),
|
||||
is_generating_proxy_(false),
|
||||
using_proxy_(0)
|
||||
is_image_sequence_(false)
|
||||
{
|
||||
set_type(kVideo);
|
||||
}
|
||||
@@ -73,42 +71,7 @@ void VideoStream::set_image_sequence(bool e)
|
||||
is_image_sequence_ = e;
|
||||
}
|
||||
|
||||
bool VideoStream::is_generating_proxy()
|
||||
{
|
||||
QMutexLocker locker(proxy_access_lock());
|
||||
|
||||
return is_generating_proxy_;
|
||||
}
|
||||
|
||||
bool VideoStream::try_start_proxy()
|
||||
{
|
||||
QMutexLocker locker(proxy_access_lock());
|
||||
|
||||
if (is_generating_proxy_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
is_generating_proxy_ = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int VideoStream::using_proxy()
|
||||
{
|
||||
QMutexLocker locker(proxy_access_lock());
|
||||
|
||||
return using_proxy_;
|
||||
}
|
||||
|
||||
void VideoStream::set_proxy(const int ÷r, const QVector<int64_t> &index)
|
||||
{
|
||||
QMutexLocker locker(proxy_access_lock());
|
||||
|
||||
using_proxy_ = divider;
|
||||
frame_index_ = index;
|
||||
is_generating_proxy_ = false;
|
||||
}
|
||||
|
||||
/*
|
||||
int64_t VideoStream::get_closest_timestamp_in_frame_index(const rational &time)
|
||||
{
|
||||
// Get rough approximation of what the timestamp would be in this timebase
|
||||
@@ -143,6 +106,7 @@ int64_t VideoStream::get_closest_timestamp_in_frame_index(int64_t timestamp)
|
||||
|
||||
return -1;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
void VideoStream::clear_frame_index()
|
||||
|
||||
@@ -47,9 +47,10 @@ public:
|
||||
bool is_image_sequence() const;
|
||||
void set_image_sequence(bool e);
|
||||
|
||||
/*
|
||||
int64_t get_closest_timestamp_in_frame_index(const rational& time);
|
||||
int64_t get_closest_timestamp_in_frame_index(int64_t timestamp);
|
||||
/*
|
||||
|
||||
void clear_frame_index();
|
||||
void append_frame_index(const int64_t& ts);
|
||||
bool is_frame_index_ready();
|
||||
@@ -59,24 +60,15 @@ public:
|
||||
bool save_frame_index(const QString& s);
|
||||
*/
|
||||
|
||||
bool is_generating_proxy();
|
||||
bool try_start_proxy();
|
||||
int using_proxy();
|
||||
void set_proxy(const int& divider, const QVector<int64_t>& index);
|
||||
|
||||
private:
|
||||
rational frame_rate_;
|
||||
|
||||
QVector<int64_t> frame_index_;
|
||||
//QVector<int64_t> frame_index_;
|
||||
|
||||
int64_t start_time_;
|
||||
|
||||
bool is_image_sequence_;
|
||||
|
||||
bool is_generating_proxy_;
|
||||
|
||||
int using_proxy_;
|
||||
|
||||
};
|
||||
|
||||
using VideoStreamPtr = std::shared_ptr<VideoStream>;
|
||||
|
||||
Reference in New Issue
Block a user