export: fixed bug that failed to export video if using a different export resolution
This commit is contained in:
@@ -516,7 +516,7 @@ ExportParams ExportDialog::GenerateParams() const
|
||||
|
||||
AudioRenderingParams audio_render_params(audio_tab_->sample_rate_combobox()->currentData().toInt(),
|
||||
audio_tab_->channel_layout_combobox()->currentData().toULongLong(),
|
||||
SampleFormat::GetConfiguredFormatForMode(render_mode));
|
||||
SampleFormat::kInternalFormat);
|
||||
|
||||
ExportParams params;
|
||||
params.SetFilename(filename_edit_->text());
|
||||
@@ -533,9 +533,7 @@ ExportParams ExportDialog::GenerateParams() const
|
||||
|
||||
video_tab_->GetCodecSection()->AddOpts(¶ms);
|
||||
|
||||
params.set_ocio_output(video_tab_->CurrentOCIODisplay(),
|
||||
video_tab_->CurrentOCIOView(),
|
||||
video_tab_->CurrentOCIOLook());
|
||||
params.set_color_transform(video_tab_->CurrentOCIOColorSpace());
|
||||
}
|
||||
|
||||
if (audio_enabled_->isChecked()) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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_;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user