mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 16:31:58 +02:00
plugin: Rework code to use new GL context handler
Create a GL context handler subclass of recently added context handler base class and rework code to use it. This simplifies a lot of things, like: switching of importers at runtime, handling context queries, sharing data between importers, etc.
This commit is contained in:
15
lib/gst/plugin/importers/gstclappergluploader.h
vendored
15
lib/gst/plugin/importers/gstclappergluploader.h
vendored
@@ -19,18 +19,27 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "gstclapperglbaseimporter.h"
|
||||
#include "gst/plugin/gstclapperimporter.h"
|
||||
#include "gst/plugin/handlers/gl/gstclapperglcontexthandler.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_CLAPPER_GL_UPLOADER (gst_clapper_gl_uploader_get_type())
|
||||
G_DECLARE_FINAL_TYPE (GstClapperGLUploader, gst_clapper_gl_uploader, GST, CLAPPER_GL_UPLOADER, GstClapperGLBaseImporter)
|
||||
G_DECLARE_FINAL_TYPE (GstClapperGLUploader, gst_clapper_gl_uploader, GST, CLAPPER_GL_UPLOADER, GstClapperImporter)
|
||||
|
||||
#define GST_CLAPPER_GL_UPLOADER_CAST(obj) ((GstClapperGLUploader *)(obj))
|
||||
|
||||
#define GST_CLAPPER_GL_UPLOADER_GET_LOCK(obj) (&GST_CLAPPER_GL_UPLOADER_CAST(obj)->lock)
|
||||
#define GST_CLAPPER_GL_UPLOADER_LOCK(obj) g_mutex_lock (GST_CLAPPER_GL_UPLOADER_GET_LOCK(obj))
|
||||
#define GST_CLAPPER_GL_UPLOADER_UNLOCK(obj) g_mutex_unlock (GST_CLAPPER_GL_UPLOADER_GET_LOCK(obj))
|
||||
|
||||
struct _GstClapperGLUploader
|
||||
{
|
||||
GstClapperGLBaseImporter parent;
|
||||
GstClapperImporter parent;
|
||||
|
||||
GMutex lock;
|
||||
|
||||
GstClapperGLContextHandler *gl_handler;
|
||||
|
||||
GstGLUpload *upload;
|
||||
GstGLColorConvert *color_convert;
|
||||
|
Reference in New Issue
Block a user