export: fixed bug that failed to export video if using a different export resolution

This commit is contained in:
itsmattkc
2020-04-23 02:00:49 +10:00
parent a1ec48b978
commit fef29db754
5 changed files with 16 additions and 32 deletions
+2 -3
View File
@@ -69,9 +69,7 @@ Exporter::Exporter(ViewerOutput *viewer_node,
// Create color processor
color_processor_ = ColorProcessor::Create(color_manager,
color_manager->GetReferenceColorSpace(),
params.ocio_display(),
params.ocio_view(),
params.ocio_look());
params.color_transform());
}
}
@@ -326,6 +324,7 @@ void Exporter::VideoHashesComplete()
// Set video backend to render mode but NOT hash or download
video_backend_->SetOperatingMode(VideoRenderWorker::kRenderOnly);
video_backend_->SetOnlySignalLastFrameRequested(false);
video_backend_->SetFrameGenerationParams(params_.video_params().width(), params_.video_params().height(), transform_);
connect(video_backend_, &VideoRenderBackend::GeneratedFrame, this, &Exporter::FrameRendered);
+4 -16
View File
@@ -64,26 +64,14 @@ void ExportParams::set_video_scaling_method(const ExportParams::VideoScalingMeth
video_scaling_method_ = video_scaling_method;
}
void ExportParams::set_ocio_output(const QString &display, const QString &view, const QString &look)
const ColorTransform &ExportParams::color_transform() const
{
ocio_display_ = display;
ocio_view_ = view;
ocio_look_ = look;
return color_transform_;
}
const QString &ExportParams::ocio_display() const
void ExportParams::set_color_transform(const ColorTransform &color_transform)
{
return ocio_display_;
}
const QString &ExportParams::ocio_view() const
{
return ocio_view_;
}
const QString &ExportParams::ocio_look() const
{
return ocio_look_;
color_transform_ = color_transform;
}
OLIVE_NAMESPACE_EXIT
+4 -7
View File
@@ -23,6 +23,7 @@
#include "codec/encoder.h"
#include "node/output/viewer/viewer.h"
#include "render/colortransform.h"
OLIVE_NAMESPACE_ENTER
@@ -46,10 +47,8 @@ public:
const VideoScalingMethod& video_scaling_method() const;
void set_video_scaling_method(const VideoScalingMethod& video_scaling_method);
const QString& ocio_display() const;
const QString& ocio_view() const;
const QString& ocio_look() const;
void set_ocio_output(const QString& display, const QString& view, const QString& look);
const ColorTransform& color_transform() const;
void set_color_transform(const ColorTransform& color_transform);
private:
QString encoder_id_;
@@ -59,9 +58,7 @@ private:
bool has_custom_range_;
TimeRange custom_range_;
QString ocio_display_;
QString ocio_view_;
QString ocio_look_;
ColorTransform color_transform_;
};
+4 -2
View File
@@ -450,6 +450,8 @@ void OpenGLProxy::TextureToBuffer(const QVariant &tex_in, int width, int height,
texture->texture()->Bind();
f->glViewport(0, 0, width, height);
// Blit to this new texture
OpenGLRenderFunctions::Blit(copy_pipeline_, false, matrix);
@@ -473,8 +475,8 @@ void OpenGLProxy::TextureToBuffer(const QVariant &tex_in, int width, int height,
f->glReadPixels(0,
0,
video_params_.effective_width(),
video_params_.effective_height(),
width,
height,
OpenGLRenderFunctions::GetPixelFormat(video_params_.format()),
OpenGLRenderFunctions::GetPixelType(video_params_.format()),
buffer);