began work on exr proxy task
This commit is contained in:
@@ -67,7 +67,7 @@ void AudioStream::set_sample_rate(const int &sample_rate)
|
||||
|
||||
const rational &AudioStream::index_length()
|
||||
{
|
||||
QMutexLocker locker(&index_access_lock_);
|
||||
QMutexLocker locker(index_access_lock());
|
||||
|
||||
return index_length_;
|
||||
}
|
||||
@@ -75,7 +75,7 @@ const rational &AudioStream::index_length()
|
||||
void AudioStream::set_index_length(const rational &index_length)
|
||||
{
|
||||
{
|
||||
QMutexLocker locker(&index_access_lock_);
|
||||
QMutexLocker locker(index_access_lock());
|
||||
|
||||
index_length_ = index_length;
|
||||
}
|
||||
@@ -85,7 +85,7 @@ void AudioStream::set_index_length(const rational &index_length)
|
||||
|
||||
const bool &AudioStream::index_done()
|
||||
{
|
||||
QMutexLocker locker(&index_access_lock_);
|
||||
QMutexLocker locker(index_access_lock());
|
||||
|
||||
return index_done_;
|
||||
}
|
||||
@@ -93,7 +93,7 @@ const bool &AudioStream::index_done()
|
||||
void AudioStream::set_index_done(const bool& index_done)
|
||||
{
|
||||
{
|
||||
QMutexLocker locker(&index_access_lock_);
|
||||
QMutexLocker locker(index_access_lock());
|
||||
|
||||
index_done_ = index_done;
|
||||
}
|
||||
@@ -103,7 +103,7 @@ void AudioStream::set_index_done(const bool& index_done)
|
||||
|
||||
void AudioStream::clear_index()
|
||||
{
|
||||
QMutexLocker locker(&index_access_lock_);
|
||||
QMutexLocker locker(index_access_lock());
|
||||
|
||||
index_done_ = false;
|
||||
index_length_ = 0;
|
||||
@@ -111,7 +111,7 @@ void AudioStream::clear_index()
|
||||
|
||||
bool AudioStream::has_conformed_version(const AudioRenderingParams ¶ms)
|
||||
{
|
||||
QMutexLocker locker(&index_access_lock_);
|
||||
QMutexLocker locker(index_access_lock());
|
||||
|
||||
foreach (const AudioRenderingParams& p, conformed_) {
|
||||
if (p == params) {
|
||||
@@ -125,7 +125,7 @@ bool AudioStream::has_conformed_version(const AudioRenderingParams ¶ms)
|
||||
void AudioStream::append_conformed_version(const AudioRenderingParams ¶ms)
|
||||
{
|
||||
{
|
||||
QMutexLocker locker(&index_access_lock_);
|
||||
QMutexLocker locker(index_access_lock());
|
||||
|
||||
conformed_.append(params);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,6 @@ private:
|
||||
uint64_t layout_;
|
||||
int sample_rate_;
|
||||
|
||||
QMutex index_access_lock_;
|
||||
rational index_length_;
|
||||
bool index_done_;
|
||||
|
||||
|
||||
@@ -139,16 +139,16 @@ QIcon Stream::IconFromType(const Stream::Type &type)
|
||||
return QIcon();
|
||||
}
|
||||
|
||||
/*StreamID Stream::ToID() const
|
||||
{
|
||||
return StreamID(footage_->filename(), index_);
|
||||
}*/
|
||||
|
||||
QMutex* Stream::index_process_lock()
|
||||
{
|
||||
return &index_process_lock_;
|
||||
}
|
||||
|
||||
QMutex *Stream::index_access_lock()
|
||||
{
|
||||
return &index_access_lock_;
|
||||
}
|
||||
|
||||
void Stream::FootageSetEvent(Footage*)
|
||||
{
|
||||
}
|
||||
@@ -162,10 +162,4 @@ void Stream::SaveCustomParameters(QXmlStreamWriter*) const
|
||||
{
|
||||
}
|
||||
|
||||
/*StreamID::StreamID(const QString &filename, const int &stream_index) :
|
||||
filename_(filename),
|
||||
stream_index_(stream_index)
|
||||
{
|
||||
}*/
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
@@ -33,17 +33,6 @@ OLIVE_NAMESPACE_ENTER
|
||||
|
||||
class Footage;
|
||||
|
||||
/*class StreamID {
|
||||
public:
|
||||
StreamID(const QString& filename, const int& stream_index);
|
||||
|
||||
private:
|
||||
QString filename_;
|
||||
|
||||
int stream_index_;
|
||||
|
||||
};*/
|
||||
|
||||
/**
|
||||
* @brief A base class for keeping metadata about a media stream.
|
||||
*
|
||||
@@ -103,9 +92,8 @@ public:
|
||||
|
||||
static QIcon IconFromType(const Type& type);
|
||||
|
||||
//StreamID ToID() const;
|
||||
|
||||
QMutex* index_process_lock();
|
||||
QMutex* index_access_lock();
|
||||
|
||||
protected:
|
||||
virtual void FootageSetEvent(Footage*);
|
||||
@@ -134,6 +122,8 @@ private:
|
||||
|
||||
QMutex index_process_lock_;
|
||||
|
||||
QMutex index_access_lock_;
|
||||
|
||||
};
|
||||
|
||||
using StreamPtr = std::shared_ptr<Stream>;
|
||||
|
||||
@@ -73,6 +73,21 @@ void VideoStream::set_image_sequence(bool e)
|
||||
is_image_sequence_ = e;
|
||||
}
|
||||
|
||||
bool VideoStream::has_proxy(const int ÷r)
|
||||
{
|
||||
QMutexLocker locker(index_access_lock());
|
||||
|
||||
return proxies_.contains(divider);
|
||||
}
|
||||
|
||||
void VideoStream::append_proxy(const int ÷r)
|
||||
{
|
||||
QMutexLocker locker(index_access_lock());
|
||||
|
||||
proxies_.append(divider);
|
||||
}
|
||||
|
||||
/*
|
||||
int64_t VideoStream::get_closest_timestamp_in_frame_index(const rational &time)
|
||||
{
|
||||
// Get rough approximation of what the timestamp would be in this timebase
|
||||
@@ -204,5 +219,6 @@ bool VideoStream::save_frame_index(const QString &s)
|
||||
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
@@ -49,6 +49,7 @@ 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();
|
||||
@@ -58,6 +59,10 @@ public:
|
||||
|
||||
bool load_frame_index(const QString& s);
|
||||
bool save_frame_index(const QString& s);
|
||||
*/
|
||||
|
||||
bool has_proxy(const int& divider);
|
||||
void append_proxy(const int& divider);
|
||||
|
||||
private:
|
||||
rational frame_rate_;
|
||||
@@ -66,10 +71,10 @@ private:
|
||||
|
||||
int64_t start_time_;
|
||||
|
||||
QMutex index_access_lock_;
|
||||
|
||||
bool is_image_sequence_;
|
||||
|
||||
QVector<int> proxies_;
|
||||
|
||||
};
|
||||
|
||||
using VideoStreamPtr = std::shared_ptr<VideoStream>;
|
||||
|
||||
@@ -70,6 +70,22 @@ public:
|
||||
|
||||
bool is_new() const;
|
||||
|
||||
const QString& cache_path() const {
|
||||
return cache_path_;
|
||||
}
|
||||
|
||||
void set_cache_path(const QString& cache_path) {
|
||||
cache_path_ = cache_path;
|
||||
}
|
||||
|
||||
const QString& proxy_path() const {
|
||||
return proxy_path_;
|
||||
}
|
||||
|
||||
void set_proxy_path(const QString& proxy_path) {
|
||||
proxy_path_ = proxy_path;
|
||||
}
|
||||
|
||||
signals:
|
||||
void NameChanged();
|
||||
|
||||
@@ -86,6 +102,10 @@ private:
|
||||
|
||||
bool autorecovery_saved_;
|
||||
|
||||
QString cache_path_;
|
||||
|
||||
QString proxy_path_;
|
||||
|
||||
};
|
||||
|
||||
using ProjectPtr = std::shared_ptr<Project>;
|
||||
|
||||
Reference in New Issue
Block a user