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(),
|
AudioRenderingParams audio_render_params(audio_tab_->sample_rate_combobox()->currentData().toInt(),
|
||||||
audio_tab_->channel_layout_combobox()->currentData().toULongLong(),
|
audio_tab_->channel_layout_combobox()->currentData().toULongLong(),
|
||||||
SampleFormat::GetConfiguredFormatForMode(render_mode));
|
SampleFormat::kInternalFormat);
|
||||||
|
|
||||||
ExportParams params;
|
ExportParams params;
|
||||||
params.SetFilename(filename_edit_->text());
|
params.SetFilename(filename_edit_->text());
|
||||||
@@ -533,9 +533,7 @@ ExportParams ExportDialog::GenerateParams() const
|
|||||||
|
|
||||||
video_tab_->GetCodecSection()->AddOpts(¶ms);
|
video_tab_->GetCodecSection()->AddOpts(¶ms);
|
||||||
|
|
||||||
params.set_ocio_output(video_tab_->CurrentOCIODisplay(),
|
params.set_color_transform(video_tab_->CurrentOCIOColorSpace());
|
||||||
video_tab_->CurrentOCIOView(),
|
|
||||||
video_tab_->CurrentOCIOLook());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (audio_enabled_->isChecked()) {
|
if (audio_enabled_->isChecked()) {
|
||||||
|
|||||||
@@ -69,9 +69,7 @@ Exporter::Exporter(ViewerOutput *viewer_node,
|
|||||||
// Create color processor
|
// Create color processor
|
||||||
color_processor_ = ColorProcessor::Create(color_manager,
|
color_processor_ = ColorProcessor::Create(color_manager,
|
||||||
color_manager->GetReferenceColorSpace(),
|
color_manager->GetReferenceColorSpace(),
|
||||||
params.ocio_display(),
|
params.color_transform());
|
||||||
params.ocio_view(),
|
|
||||||
params.ocio_look());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -326,6 +324,7 @@ void Exporter::VideoHashesComplete()
|
|||||||
// Set video backend to render mode but NOT hash or download
|
// Set video backend to render mode but NOT hash or download
|
||||||
video_backend_->SetOperatingMode(VideoRenderWorker::kRenderOnly);
|
video_backend_->SetOperatingMode(VideoRenderWorker::kRenderOnly);
|
||||||
video_backend_->SetOnlySignalLastFrameRequested(false);
|
video_backend_->SetOnlySignalLastFrameRequested(false);
|
||||||
|
video_backend_->SetFrameGenerationParams(params_.video_params().width(), params_.video_params().height(), transform_);
|
||||||
|
|
||||||
connect(video_backend_, &VideoRenderBackend::GeneratedFrame, this, &Exporter::FrameRendered);
|
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;
|
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;
|
return color_transform_;
|
||||||
ocio_view_ = view;
|
|
||||||
ocio_look_ = look;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString &ExportParams::ocio_display() const
|
void ExportParams::set_color_transform(const ColorTransform &color_transform)
|
||||||
{
|
{
|
||||||
return ocio_display_;
|
color_transform_ = color_transform;
|
||||||
}
|
|
||||||
|
|
||||||
const QString &ExportParams::ocio_view() const
|
|
||||||
{
|
|
||||||
return ocio_view_;
|
|
||||||
}
|
|
||||||
|
|
||||||
const QString &ExportParams::ocio_look() const
|
|
||||||
{
|
|
||||||
return ocio_look_;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OLIVE_NAMESPACE_EXIT
|
OLIVE_NAMESPACE_EXIT
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include "codec/encoder.h"
|
#include "codec/encoder.h"
|
||||||
#include "node/output/viewer/viewer.h"
|
#include "node/output/viewer/viewer.h"
|
||||||
|
#include "render/colortransform.h"
|
||||||
|
|
||||||
OLIVE_NAMESPACE_ENTER
|
OLIVE_NAMESPACE_ENTER
|
||||||
|
|
||||||
@@ -46,10 +47,8 @@ public:
|
|||||||
const VideoScalingMethod& video_scaling_method() const;
|
const VideoScalingMethod& video_scaling_method() const;
|
||||||
void set_video_scaling_method(const VideoScalingMethod& video_scaling_method);
|
void set_video_scaling_method(const VideoScalingMethod& video_scaling_method);
|
||||||
|
|
||||||
const QString& ocio_display() const;
|
const ColorTransform& color_transform() const;
|
||||||
const QString& ocio_view() const;
|
void set_color_transform(const ColorTransform& color_transform);
|
||||||
const QString& ocio_look() const;
|
|
||||||
void set_ocio_output(const QString& display, const QString& view, const QString& look);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString encoder_id_;
|
QString encoder_id_;
|
||||||
@@ -59,9 +58,7 @@ private:
|
|||||||
bool has_custom_range_;
|
bool has_custom_range_;
|
||||||
TimeRange custom_range_;
|
TimeRange custom_range_;
|
||||||
|
|
||||||
QString ocio_display_;
|
ColorTransform color_transform_;
|
||||||
QString ocio_view_;
|
|
||||||
QString ocio_look_;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -450,6 +450,8 @@ void OpenGLProxy::TextureToBuffer(const QVariant &tex_in, int width, int height,
|
|||||||
|
|
||||||
texture->texture()->Bind();
|
texture->texture()->Bind();
|
||||||
|
|
||||||
|
f->glViewport(0, 0, width, height);
|
||||||
|
|
||||||
// Blit to this new texture
|
// Blit to this new texture
|
||||||
OpenGLRenderFunctions::Blit(copy_pipeline_, false, matrix);
|
OpenGLRenderFunctions::Blit(copy_pipeline_, false, matrix);
|
||||||
|
|
||||||
@@ -473,8 +475,8 @@ void OpenGLProxy::TextureToBuffer(const QVariant &tex_in, int width, int height,
|
|||||||
|
|
||||||
f->glReadPixels(0,
|
f->glReadPixels(0,
|
||||||
0,
|
0,
|
||||||
video_params_.effective_width(),
|
width,
|
||||||
video_params_.effective_height(),
|
height,
|
||||||
OpenGLRenderFunctions::GetPixelFormat(video_params_.format()),
|
OpenGLRenderFunctions::GetPixelFormat(video_params_.format()),
|
||||||
OpenGLRenderFunctions::GetPixelType(video_params_.format()),
|
OpenGLRenderFunctions::GetPixelType(video_params_.format()),
|
||||||
buffer);
|
buffer);
|
||||||
|
|||||||
Reference in New Issue
Block a user