allow setting of pixel format/ocio method/sample format in preferences

Implementation isn't perfect yet, viewer/renderer doesn't update yet when
the preference is changed so a sequence needs to be re-opened for the change to
take effect.
This commit is contained in:
itsmattkc
2020-01-18 03:37:36 +11:00
parent e6b45c75c3
commit 1101b58ee8
30 changed files with 421 additions and 380 deletions
+3 -3
View File
@@ -192,7 +192,7 @@ const char *VideoRenderBackend::GetCachedFrame(const rational &time)
QByteArray frame_hash = frame_cache_.TimeToHash(time);
if (!frame_hash.isEmpty()) {
QString fn = frame_cache_.CachePathName(frame_hash);
QString fn = frame_cache_.CachePathName(frame_hash, params_.format());
if (QFileInfo::exists(fn)) {
auto in = OIIO::ImageInput::open(fn.toStdString());
@@ -304,7 +304,7 @@ void VideoRenderBackend::ThreadCompletedDownload(NodeDependency dep, qint64 job_
// Register frame with the disk manager
if (operating_mode_ & VideoRenderWorker::kDownloadOnly) {
DiskManager::instance()->CreatedFile(frame_cache()->CachePathName(hash), hash);
DiskManager::instance()->CreatedFile(frame_cache()->CachePathName(hash, params_.format()), hash);
}
QList<rational> hashes_with_time = frame_cache()->FramesWithHash(hash);
@@ -322,7 +322,7 @@ void VideoRenderBackend::ThreadSkippedFrame(NodeDependency dep, qint64 job_time,
SetWorkerBusyState(static_cast<RenderWorker*>(sender()), false);
if (SetFrameHash(dep, hash, job_time)
&& frame_cache_.HasHash(hash)) {
&& frame_cache_.HasHash(hash, params_.format())) {
emit CachedTimeReady(dep.in(), job_time);
}