openglproxy: implemented extra function for loading pre-cached frames into textures

This commit is contained in:
itsmattkc
2020-06-09 02:35:41 +10:00
parent 52ca18d5e1
commit 2fc1ccebf7
2 changed files with 7 additions and 0 deletions
@@ -170,6 +170,11 @@ NodeValue OpenGLProxy::FrameToValue(FramePtr frame, StreamPtr stream, const Vide
return NodeValue(NodeParam::kTexture, QVariant::fromValue(footage_tex_ref));
}
NodeValue OpenGLProxy::PreCachedFrameToValue(FramePtr frame)
{
return NodeValue(NodeParam::kTexture, QVariant::fromValue(texture_cache_.Get(ctx_, frame)));
}
void OpenGLProxy::Close()
{
shader_cache_.clear();
+2
View File
@@ -82,6 +82,8 @@ public slots:
const OLIVE_NAMESPACE::VideoParams &params,
const OLIVE_NAMESPACE::RenderMode::Mode &mode);
OLIVE_NAMESPACE::NodeValue PreCachedFrameToValue(OLIVE_NAMESPACE::FramePtr frame);
private:
QOpenGLContext* ctx_;
QOffscreenSurface surface_;