solve some bugs

This commit is contained in:
2026-01-05 18:01:13 +08:00
parent 6b64abb1fa
commit 8ed5660faf
17 changed files with 203 additions and 79 deletions
+40
View File
@@ -28,6 +28,8 @@
#include "node/block/transition/transition.h"
#include "node/project.h"
#include "rendermanager.h"
#include "render/opengl/openglrenderer.h"
#include "render/plugin/pluginrenderer.h"
#include "pluginSupport/OliveClip.h"
#include "pluginSupport/OliveHost.h"
@@ -606,6 +608,44 @@ void RenderProcessor::ProcessFrameGeneration(TexturePtr destination,
destination->Upload(frame->data(), frame->linesize_pixels());
}
TexturePtr RenderProcessor::ProcessPluginJob(TexturePtr texture,
TexturePtr destination,
const Node *node)
{
(void)node;
if (!render_ctx_ || !texture || !destination) {
return destination;
}
auto *plugin_job =
dynamic_cast<plugin::PluginJob *>(texture->job());
if (!plugin_job) {
return destination;
}
if (!plugin_renderer_) {
auto *gl = dynamic_cast<OpenGLRenderer *>(render_ctx_);
if (!gl || !gl->context()) {
return destination;
}
plugin_renderer_ = std::make_unique<plugin::PluginRenderer>();
plugin_renderer_->Init(gl->context());
plugin_renderer_->PostInit();
}
plugin_renderer_->RenderPlugin(
texture,
*plugin_job,
destination.get(),
destination->params(),
true,
false);
return destination;
}
TexturePtr RenderProcessor::ProcessVideoCacheJob(const CacheJob *val)
{
FramePtr frame = FrameHashCache::LoadCacheFrame(val->GetFilename());