diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-10-27 08:17:58 +0530 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2017-12-09 19:32:23 +0000 |
commit | 6106816f5018e21a661fcea21bdd92e2f0f03fec (patch) | |
tree | df5cebb052603d350d06d51e96662ab22cb75999 /gst-libs/gst/gl | |
parent | c7c2a68de2ae53ace30a97d45fa7bfb07babeed9 (diff) |
gstgl: Add GST_EXPORT to all symbols used on Windows
This is a requirement for those symbols to be exported in gstgl-1.0.dll
when building with the MSVC compiler
Diffstat (limited to 'gst-libs/gst/gl')
27 files changed, 300 insertions, 6 deletions
diff --git a/gst-libs/gst/gl/gstglapi.h b/gst-libs/gst/gl/gstglapi.h index 43e6d4a68..fd8d9a648 100644 --- a/gst-libs/gst/gl/gstglapi.h +++ b/gst-libs/gst/gl/gstglapi.h @@ -174,10 +174,14 @@ typedef struct _GstGLFuncs #undef GST_GL_EXT_FUNCTION #undef GST_GL_EXT_END +GST_EXPORT gchar * gst_gl_api_to_string (GstGLAPI api); +GST_EXPORT GstGLAPI gst_gl_api_from_string (const gchar * api_s); +GST_EXPORT gchar * gst_gl_platform_to_string (GstGLPlatform platform); +GST_EXPORT GstGLPlatform gst_gl_platform_from_string (const gchar * platform_s); G_END_DECLS diff --git a/gst-libs/gst/gl/gstglbasefilter.h b/gst-libs/gst/gl/gstglbasefilter.h index f893127ad..aa5b94693 100644 --- a/gst-libs/gst/gl/gstglbasefilter.h +++ b/gst-libs/gst/gl/gstglbasefilter.h @@ -31,6 +31,7 @@ G_BEGIN_DECLS +GST_EXPORT GType gst_gl_base_filter_get_type(void); #define GST_TYPE_GL_BASE_FILTER (gst_gl_base_filter_get_type()) #define GST_GL_BASE_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_BASE_FILTER,GstGLBaseFilter)) diff --git a/gst-libs/gst/gl/gstglbasememory.h b/gst-libs/gst/gl/gstglbasememory.h index 22129d0f3..980eb403a 100644 --- a/gst-libs/gst/gl/gstglbasememory.h +++ b/gst-libs/gst/gl/gstglbasememory.h @@ -30,6 +30,7 @@ G_BEGIN_DECLS #define GST_TYPE_GL_BASE_MEMORY_ALLOCATOR (gst_gl_base_memory_allocator_get_type()) +GST_EXPORT GType gst_gl_base_memory_allocator_get_type(void); #define GST_IS_GL_BASE_MEMORY_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GL_BASE_MEMORY_ALLOCATOR)) @@ -41,6 +42,7 @@ GType gst_gl_base_memory_allocator_get_type(void); #define GST_GL_BASE_MEMORY_CAST(mem) ((GstGLBaseMemory *)mem) +GST_EXPORT GQuark gst_gl_base_memory_error_quark (void); #define GST_GL_BASE_MEMORY_ERROR (gst_gl_base_memory_error_quark ()) @@ -136,6 +138,7 @@ typedef void (*GstGLAllocationParamsCopyFunc) (GstGLAllocationParams * src typedef void (*GstGLAllocationParamsFreeFunc) (gpointer params); #define GST_TYPE_GL_ALLOCATION_PARAMS (gst_gl_allocation_params_get_type()) +GST_EXPORT GType gst_gl_allocation_params_get_type (void); #define GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_ALLOC (1 << 0) @@ -195,12 +198,16 @@ gboolean gst_gl_allocation_params_init (GstGLAllocationPara GDestroyNotify notify); /* free with gst_gl_allocation_params_free */ +GST_EXPORT GstGLAllocationParams * gst_gl_allocation_params_copy (GstGLAllocationParams * src); +GST_EXPORT void gst_gl_allocation_params_free (GstGLAllocationParams * params); /* subclass usage */ +GST_EXPORT void gst_gl_allocation_params_free_data (GstGLAllocationParams * params); /* subclass usage */ +GST_EXPORT void gst_gl_allocation_params_copy_data (GstGLAllocationParams * src, GstGLAllocationParams * dest); @@ -345,9 +352,12 @@ struct _GstGLBaseMemoryAllocatorClass */ #define GST_GL_BASE_MEMORY_ALLOCATOR_NAME "GLBaseMemory" +GST_EXPORT void gst_gl_base_memory_init_once (void); +GST_EXPORT gboolean gst_is_gl_base_memory (GstMemory * mem); +GST_EXPORT void gst_gl_base_memory_init (GstGLBaseMemory * mem, GstAllocator * allocator, GstMemory * parent, @@ -357,12 +367,15 @@ void gst_gl_base_memory_init (GstGLBaseMemory * mem, gpointer user_data, GDestroyNotify notify); +GST_EXPORT gboolean gst_gl_base_memory_alloc_data (GstGLBaseMemory * gl_mem); +GST_EXPORT gboolean gst_gl_base_memory_memcpy (GstGLBaseMemory * src, GstGLBaseMemory * dest, gssize offset, gssize size); +GST_EXPORT GstGLBaseMemory * gst_gl_base_memory_alloc (GstGLBaseMemoryAllocator * allocator, GstGLAllocationParams * params); diff --git a/gst-libs/gst/gl/gstglbuffer.h b/gst-libs/gst/gl/gstglbuffer.h index e481536e9..c6ef6a5a8 100644 --- a/gst-libs/gst/gl/gstglbuffer.h +++ b/gst-libs/gst/gl/gstglbuffer.h @@ -30,6 +30,7 @@ G_BEGIN_DECLS #define GST_TYPE_GL_BUFFER_ALLOCATOR (gst_gl_buffer_allocator_get_type()) +GST_EXPORT GType gst_gl_buffer_allocator_get_type(void); #define GST_IS_GL_BUFFER_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GL_ALLOCATOR)) @@ -79,6 +80,7 @@ struct _GstGLBufferAllocationParams gpointer _padding[GST_PADDING]; }; +GST_EXPORT GstGLBufferAllocationParams * gst_gl_buffer_allocation_params_new (GstGLContext * context, gsize alloc_size, GstAllocationParams * alloc_params, @@ -120,9 +122,12 @@ struct _GstGLBufferAllocatorClass */ #define GST_GL_BUFFER_ALLOCATOR_NAME "GLBuffer" +GST_EXPORT void gst_gl_buffer_init_once (void); +GST_EXPORT gboolean gst_is_gl_buffer (GstMemory * mem); +GST_EXPORT GstGLBuffer * gst_gl_buffer_alloc (GstGLContext * context, guint gl_target, guint gl_usage, diff --git a/gst-libs/gst/gl/gstglbufferpool.h b/gst-libs/gst/gl/gstglbufferpool.h index a13695517..bfe5371c7 100644 --- a/gst-libs/gst/gl/gstglbufferpool.h +++ b/gst-libs/gst/gl/gstglbufferpool.h @@ -30,6 +30,7 @@ G_BEGIN_DECLS /* buffer pool functions */ +GST_EXPORT GType gst_gl_buffer_pool_get_type (void); #define GST_TYPE_GL_BUFFER_POOL (gst_gl_buffer_pool_get_type()) #define GST_IS_GL_BUFFER_POOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GL_BUFFER_POOL)) @@ -66,9 +67,12 @@ struct _GstGLBufferPoolClass gpointer _padding[GST_PADDING]; }; +GST_EXPORT GstBufferPool *gst_gl_buffer_pool_new (GstGLContext * context); +GST_EXPORT GstGLAllocationParams * gst_buffer_pool_config_get_gl_allocation_params (GstStructure * config); +GST_EXPORT void gst_buffer_pool_config_set_gl_allocation_params (GstStructure * config, GstGLAllocationParams * params); diff --git a/gst-libs/gst/gl/gstglcolorconvert.h b/gst-libs/gst/gl/gstglcolorconvert.h index d978e7ed9..efae55e32 100644 --- a/gst-libs/gst/gl/gstglcolorconvert.h +++ b/gst-libs/gst/gl/gstglcolorconvert.h @@ -28,6 +28,7 @@ G_BEGIN_DECLS +GST_EXPORT GType gst_gl_color_convert_get_type (void); #define GST_TYPE_GL_COLOR_CONVERT (gst_gl_color_convert_get_type()) #define GST_GL_COLOR_CONVERT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_COLOR_CONVERT,GstGLColorConvert)) @@ -112,22 +113,28 @@ struct _GstGLColorConvertClass "framerate = " GST_VIDEO_FPS_RANGE ", " \ "texture-target = (string) { 2D, rectangle, external-oes }" +GST_EXPORT GstGLColorConvert * gst_gl_color_convert_new (GstGLContext * context); +GST_EXPORT GstCaps * gst_gl_color_convert_transform_caps (GstGLContext * convert, GstPadDirection direction, GstCaps * caps, GstCaps * filter); +GST_EXPORT GstCaps * gst_gl_color_convert_fixate_caps (GstGLContext * convert, GstPadDirection direction, GstCaps * caps, GstCaps * other); +GST_EXPORT gboolean gst_gl_color_convert_set_caps (GstGLColorConvert * convert, GstCaps * in_caps, GstCaps * out_caps); +GST_EXPORT gboolean gst_gl_color_convert_decide_allocation (GstGLColorConvert * convert, GstQuery * query); +GST_EXPORT GstBuffer * gst_gl_color_convert_perform (GstGLColorConvert * convert, GstBuffer * inbuf); G_END_DECLS diff --git a/gst-libs/gst/gl/gstglcontext.h b/gst-libs/gst/gl/gstglcontext.h index 83e159d0d..699a73f72 100644 --- a/gst-libs/gst/gl/gstglcontext.h +++ b/gst-libs/gst/gl/gstglcontext.h @@ -33,9 +33,11 @@ G_BEGIN_DECLS #define GST_IS_GL_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_CONTEXT)) #define GST_IS_GL_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_CONTEXT)) #define GST_GL_CONTEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_CONTEXT, GstGLContextClass)) +GST_EXPORT GType gst_gl_context_get_type (void); #define GST_GL_CONTEXT_ERROR (gst_gl_context_error_quark ()) +GST_EXPORT GQuark gst_gl_context_error_quark (void); /** @@ -115,45 +117,71 @@ struct _GstGLContextClass { /* methods */ +GST_EXPORT GstGLContext * gst_gl_context_new (GstGLDisplay *display); +GST_EXPORT GstGLContext * gst_gl_context_new_wrapped (GstGLDisplay *display, guintptr handle, GstGLPlatform context_type, GstGLAPI available_apis); +GST_EXPORT gboolean gst_gl_context_activate (GstGLContext *context, gboolean activate); +GST_EXPORT GThread * gst_gl_context_get_thread (GstGLContext *context); +GST_EXPORT GstGLContext * gst_gl_context_get_current (void); +GST_EXPORT GstGLDisplay * gst_gl_context_get_display (GstGLContext *context); +GST_EXPORT gpointer gst_gl_context_get_proc_address (GstGLContext *context, const gchar *name); +GST_EXPORT GstGLPlatform gst_gl_context_get_gl_platform (GstGLContext *context); +GST_EXPORT GstGLAPI gst_gl_context_get_gl_api (GstGLContext *context); +GST_EXPORT guintptr gst_gl_context_get_gl_context (GstGLContext *context); +GST_EXPORT gboolean gst_gl_context_can_share (GstGLContext * context, GstGLContext *other_context); +GST_EXPORT gboolean gst_gl_context_create (GstGLContext *context, GstGLContext *other_context, GError ** error); +GST_EXPORT void gst_gl_context_destroy (GstGLContext *context); +GST_EXPORT gpointer gst_gl_context_default_get_proc_address (GstGLAPI gl_api, const gchar *name); +GST_EXPORT gpointer gst_gl_context_get_proc_address_with_platform (GstGLPlatform context_type, GstGLAPI gl_api, const gchar *name); +GST_EXPORT gboolean gst_gl_context_set_window (GstGLContext *context, GstGLWindow *window); +GST_EXPORT GstGLWindow * gst_gl_context_get_window (GstGLContext *context); +GST_EXPORT void gst_gl_context_get_gl_version (GstGLContext *context, gint *maj, gint *min); +GST_EXPORT gboolean gst_gl_context_check_gl_version (GstGLContext * context, GstGLAPI api, gint maj, gint min); +GST_EXPORT gboolean gst_gl_context_check_feature (GstGLContext *context, const gchar *feature); +GST_EXPORT guintptr gst_gl_context_get_current_gl_context (GstGLPlatform context_type); +GST_EXPORT GstGLAPI gst_gl_context_get_current_gl_api (GstGLPlatform platform, guint *major, guint *minor); +GST_EXPORT gboolean gst_gl_context_is_shared (GstGLContext * context); +GST_EXPORT void gst_gl_context_set_shared_with (GstGLContext * context, GstGLContext * share); +GST_EXPORT gboolean gst_gl_context_fill_info (GstGLContext * context, GError ** error); /* FIXME: remove */ +GST_EXPORT void gst_gl_context_thread_add (GstGLContext * context, GstGLContextThreadFunc func, gpointer data); diff --git a/gst-libs/gst/gl/gstglcontrolbindingproxy.h b/gst-libs/gst/gl/gstglcontrolbindingproxy.h index b3a931078..8a205a8f1 100644 --- a/gst-libs/gst/gl/gstglcontrolbindingproxy.h +++ b/gst-libs/gst/gl/gstglcontrolbindingproxy.h @@ -25,6 +25,7 @@ G_BEGIN_DECLS +GST_EXPORT GType gst_gl_control_binding_proxy_get_type (void); #define GST_TYPE_GL_CONTROL_BINDING_PROXY (gst_gl_control_binding_proxy_get_type()) @@ -44,11 +45,13 @@ struct _GstGLControlBindingProxyClass GstControlBindingClass parent_class; }; +GST_EXPORT GstControlBinding * gst_gl_control_binding_proxy_new (GstObject * object, const gchar * property_name, GstObject * ref_object, const gchar * ref_property_name); +GST_EXPORT void gst_gl_object_add_control_binding_proxy (GstObject * object, GstObject * ref_object, const gchar * prop); diff --git a/gst-libs/gst/gl/gstgldebug.h b/gst-libs/gst/gl/gstgldebug.h index f131428ea..36ba3a68d 100644 --- a/gst-libs/gst/gl/gstgldebug.h +++ b/gst-libs/gst/gl/gstgldebug.h @@ -55,11 +55,17 @@ struct _GstGLAsyncDebug gpointer _padding[GST_PADDING]; }; +GST_EXPORT GstGLAsyncDebug * gst_gl_async_debug_new (void); +GST_EXPORT void gst_gl_async_debug_free (GstGLAsyncDebug * ad); +GST_EXPORT void gst_gl_async_debug_init (GstGLAsyncDebug * ad); +GST_EXPORT void gst_gl_async_debug_unset (GstGLAsyncDebug * ad); +GST_EXPORT void gst_gl_async_debug_freeze (GstGLAsyncDebug * ad); +GST_EXPORT void gst_gl_async_debug_thaw (GstGLAsyncDebug * ad); /** @@ -113,9 +119,12 @@ GST_GL_ASYNC_CAT_LEVEL_LOG(GstGLAsyncDebug * ad, GstDebugCategory * cat, #if !defined(GST_DISABLE_GST_DEBUG) +GST_EXPORT void gst_gl_insert_debug_marker (GstGLContext * context, const gchar * format, ...) G_GNUC_PRINTF (2, 3); +GST_EXPORT void gst_gl_async_debug_output_log_msg (GstGLAsyncDebug * ad); +GST_EXPORT void gst_gl_async_debug_store_log_msg (GstGLAsyncDebug * ad, GstDebugCategory * cat, GstDebugLevel level, @@ -124,6 +133,7 @@ void gst_gl_async_debug_store_log_msg (GstGLAsyncDebug * ad, gint line, GObject * object, const gchar * format, ...) G_GNUC_PRINTF (8, 9); +GST_EXPORT void gst_gl_async_debug_store_log_msg_valist (GstGLAsyncDebug * ad, GstDebugCategory * cat, GstDebugLevel level, diff --git a/gst-libs/gst/gl/gstgldisplay.h b/gst-libs/gst/gl/gstgldisplay.h index bc00b6802..a02e90433 100644 --- a/gst-libs/gst/gl/gstgldisplay.h +++ b/gst-libs/gst/gl/gstgldisplay.h @@ -30,6 +30,7 @@ G_BEGIN_DECLS +GST_EXPORT GType gst_gl_display_get_type (void); #define GST_TYPE_GL_DISPLAY (gst_gl_display_get_type()) @@ -90,26 +91,37 @@ struct _GstGLDisplayClass gpointer _padding[GST_PADDING]; }; +GST_EXPORT GstGLDisplay *gst_gl_display_new (void); #define gst_gl_display_lock(display) GST_OBJECT_LOCK (display) #define gst_gl_display_unlock(display) GST_OBJECT_UNLOCK (display) +GST_EXPORT guintptr gst_gl_display_get_handle (GstGLDisplay * display); +GST_EXPORT GstGLDisplayType gst_gl_display_get_handle_type (GstGLDisplay * display); +GST_EXPORT void gst_gl_display_filter_gl_api (GstGLDisplay * display, GstGLAPI gl_api); +GST_EXPORT GstGLAPI gst_gl_display_get_gl_api (GstGLDisplay * display); +GST_EXPORT GstGLAPI gst_gl_display_get_gl_api_unlocked (GstGLDisplay * display); #define GST_GL_DISPLAY_CONTEXT_TYPE "gst.gl.GLDisplay" +GST_EXPORT void gst_context_set_gl_display (GstContext * context, GstGLDisplay * display); +GST_EXPORT gboolean gst_context_get_gl_display (GstContext * context, GstGLDisplay ** display); +GST_EXPORT gboolean gst_gl_display_create_context (GstGLDisplay * display, GstGLContext * other_context, GstGLContext ** p_context, GError **error); +GST_EXPORT GstGLContext * gst_gl_display_get_gl_context_for_thread (GstGLDisplay * display, GThread * thread); +GST_EXPORT gboolean gst_gl_display_add_context (GstGLDisplay * display, GstGLContext * context); diff --git a/gst-libs/gst/gl/gstglfeature.h b/gst-libs/gst/gl/gstglfeature.h index f1ae1428b..b75c3e13d 100644 --- a/gst-libs/gst/gl/gstglfeature.h +++ b/gst-libs/gst/gl/gstglfeature.h @@ -94,7 +94,7 @@ struct _GstGLFeatureData const GstGLFeatureFunction *functions; }; -gboolean +GST_EXPORT gboolean gst_gl_check_extension (const char *name, const gchar * ext); G_GNUC_INTERNAL gboolean diff --git a/gst-libs/gst/gl/gstglfilter.h b/gst-libs/gst/gl/gstglfilter.h index cdebe57db..6538abdcb 100644 --- a/gst-libs/gst/gl/gstglfilter.h +++ b/gst-libs/gst/gl/gstglfilter.h @@ -30,6 +30,7 @@ G_BEGIN_DECLS +GST_EXPORT GType gst_gl_filter_get_type(void); #define GST_TYPE_GL_FILTER (gst_gl_filter_get_type()) #define GST_GL_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_FILTER,GstGLFilter)) @@ -120,16 +121,20 @@ struct _GstGLFilterClass gpointer _padding[GST_PADDING]; }; +GST_EXPORT gboolean gst_gl_filter_filter_texture (GstGLFilter * filter, GstBuffer * inbuf, GstBuffer * outbuf); +GST_EXPORT gboolean gst_gl_filter_render_to_target (GstGLFilter *filter, GstGLMemory * input, GstGLMemory * output, GstGLFilterRenderFunc func, gpointer data); +GST_EXPORT void gst_gl_filter_draw_fullscreen_quad (GstGLFilter *filter); +GST_EXPORT void gst_gl_filter_render_to_target_with_shader (GstGLFilter * filter, GstGLMemory * input, GstGLMemory * output, diff --git a/gst-libs/gst/gl/gstglformat.h b/gst-libs/gst/gl/gstglformat.h index e4e6e3769..9bcb302e0 100644 --- a/gst-libs/gst/gl/gstglformat.h +++ b/gst-libs/gst/gl/gstglformat.h @@ -97,21 +97,31 @@ typedef enum GST_GL_DEPTH24_STENCIL8 = 0x88F0, } GstGLFormat; +GST_EXPORT guint gst_gl_format_type_n_bytes (guint format, guint type); +GST_EXPORT guint gst_gl_texture_type_n_bytes (GstVideoGLTextureType tex_format); +GST_EXPORT guint gst_gl_format_from_gl_texture_type (GstVideoGLTextureType tex_format); +GST_EXPORT GstVideoGLTextureType gst_gl_texture_type_from_format (GstGLContext * context, GstVideoFormat v_format, guint plane); +GST_EXPORT guint gst_gl_sized_gl_format_from_gl_format_type (GstGLContext * context, guint format, guint type); +GST_EXPORT GstGLTextureTarget gst_gl_texture_target_from_string (const gchar * str); +GST_EXPORT const gchar * gst_gl_texture_target_to_string (GstGLTextureTarget target); +GST_EXPORT guint gst_gl_texture_target_to_gl (GstGLTextureTarget target); +GST_EXPORT GstGLTextureTarget gst_gl_texture_target_from_gl (guint target); +GST_EXPORT const gchar * gst_gl_texture_target_to_buffer_pool_option (GstGLTextureTarget target); G_END_DECLS diff --git a/gst-libs/gst/gl/gstglframebuffer.h b/gst-libs/gst/gl/gstglframebuffer.h index 6298af160..99ea4ea63 100644 --- a/gst-libs/gst/gl/gstglframebuffer.h +++ b/gst-libs/gst/gl/gstglframebuffer.h @@ -25,6 +25,7 @@ G_BEGIN_DECLS +GST_EXPORT GType gst_gl_framebuffer_get_type (void); #define GST_TYPE_GL_FRAMEBUFFER (gst_gl_framebuffer_get_type()) @@ -67,25 +68,34 @@ struct _GstGLFramebufferClass gpointer _padding[GST_PADDING]; }; +GST_EXPORT GstGLFramebuffer * gst_gl_framebuffer_new (GstGLContext *context); +GST_EXPORT GstGLFramebuffer * gst_gl_framebuffer_new_with_default_depth (GstGLContext *context, guint width, guint height); +GST_EXPORT guint gst_gl_framebuffer_get_id (GstGLFramebuffer * fb); +GST_EXPORT void gst_gl_framebuffer_attach (GstGLFramebuffer * fb, guint attachment_point, GstGLBaseMemory * mem); +GST_EXPORT void gst_gl_framebuffer_bind (GstGLFramebuffer * fb); +GST_EXPORT void gst_gl_context_clear_framebuffer (GstGLContext * context); +GST_EXPORT void gst_gl_framebuffer_get_effective_dimensions (GstGLFramebuffer * fb, guint * width, guint * height); +GST_EXPORT gboolean gst_gl_context_check_framebuffer_status (GstGLContext * context); +GST_EXPORT gboolean gst_gl_framebuffer_draw_to_texture (GstGLFramebuffer * fb, GstGLMemory * mem, GstGLFramebufferFunc cb, diff --git a/gst-libs/gst/gl/gstglmemory.h b/gst-libs/gst/gl/gstglmemory.h index d63256476..6cdcdcea5 100644 --- a/gst-libs/gst/gl/gstglmemory.h +++ b/gst-libs/gst/gl/gstglmemory.h @@ -31,6 +31,7 @@ G_BEGIN_DECLS #define GST_TYPE_GL_MEMORY_ALLOCATOR (gst_gl_memory_allocator_get_type()) +GST_EXPORT GType gst_gl_memory_allocator_get_type(void); #define GST_IS_GL_MEMORY_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GL_MEMORY_ALLOCATOR)) @@ -101,6 +102,7 @@ struct _GstGLVideoAllocationParams gpointer _padding[GST_PADDING]; }; +GST_EXPORT gboolean gst_gl_video_allocation_params_init_full (GstGLVideoAllocationParams * params, gsize struct_size, guint alloc_flags, @@ -117,6 +119,7 @@ gboolean gst_gl_video_allocation_params_init_full (GstGLVideoAlloc gpointer gl_handle, gpointer user_data, GDestroyNotify notify); +GST_EXPORT GstGLVideoAllocationParams * gst_gl_video_allocation_params_new (GstGLContext * context, GstAllocationParams * alloc_params, GstVideoInfo * v_info, @@ -124,6 +127,7 @@ GstGLVideoAllocationParams * gst_gl_video_allocation_params_new (GstGLContext * GstVideoAlignment * valign, GstGLTextureTarget target, GstVideoGLTextureType tex_type); +GST_EXPORT GstGLVideoAllocationParams * gst_gl_video_allocation_params_new_wrapped_data (GstGLContext * context, GstAllocationParams * alloc_params, GstVideoInfo * v_info, @@ -135,6 +139,7 @@ GstGLVideoAllocationParams * gst_gl_video_allocation_params_new_wrapped_data gpointer user_data, GDestroyNotify notify); +GST_EXPORT GstGLVideoAllocationParams * gst_gl_video_allocation_params_new_wrapped_texture (GstGLContext * context, GstAllocationParams * alloc_params, GstVideoInfo * v_info, @@ -146,6 +151,7 @@ GstGLVideoAllocationParams * gst_gl_video_allocation_params_new_wrapped_texture gpointer user_data, GDestroyNotify notify); +GST_EXPORT GstGLVideoAllocationParams * gst_gl_video_allocation_params_new_wrapped_gl_handle (GstGLContext * context, GstAllocationParams * alloc_params, GstVideoInfo * v_info, @@ -158,8 +164,10 @@ GstGLVideoAllocationParams * gst_gl_video_allocation_params_new_wrapped_gl_handl GDestroyNotify notify); /* subclass usage */ +GST_EXPORT void gst_gl_video_allocation_params_free_data (GstGLVideoAllocationParams * params); /* subclass usage */ +GST_EXPORT void gst_gl_video_allocation_params_copy_data (GstGLVideoAllocationParams * src_vid, GstGLVideoAllocationParams * dest_vid); @@ -202,9 +210,12 @@ struct _GstGLMemoryAllocatorClass */ #define GST_GL_MEMORY_ALLOCATOR_NAME "GLMemory" +GST_EXPORT void gst_gl_memory_init_once (void); +GST_EXPORT gboolean gst_is_gl_memory (GstMemory * mem); +GST_EXPORT void gst_gl_memory_init (GstGLMemory * mem, GstAllocator * allocator, GstMemory * parent, @@ -218,12 +229,14 @@ void gst_gl_memory_init (GstGLMemory * mem, gpointer user_data, GDestroyNotify notify); +GST_EXPORT gboolean gst_gl_memory_copy_into (GstGLMemory *gl_mem, guint tex_id, GstGLTextureTarget target, GstVideoGLTextureType tex_type, gint width, gint height); +GST_EXPORT gboolean gst_gl_memory_copy_teximage (GstGLMemory * src, guint tex_id, GstGLTextureTarget out_target, @@ -231,18 +244,26 @@ gboolean gst_gl_memory_copy_teximage (GstGLMemory * src, gint width, gint height); +GST_EXPORT gboolean gst_gl_memory_read_pixels (GstGLMemory * gl_mem, gpointer read_pointer); +GST_EXPORT void gst_gl_memory_texsubimage (GstGLMemory * gl_mem, gpointer read_pointer); /* accessors */ +GST_EXPORT gint gst_gl_memory_get_texture_width (GstGLMemory * gl_mem); +GST_EXPORT gint gst_gl_memory_get_texture_height (GstGLMemory * gl_mem); +GST_EXPORT GstVideoGLTextureType gst_gl_memory_get_texture_type (GstGLMemory * gl_mem); +GST_EXPORT GstGLTextureTarget gst_gl_memory_get_texture_target (GstGLMemory * gl_mem); +GST_EXPORT guint gst_gl_memory_get_texture_id (GstGLMemory * gl_mem); +GST_EXPORT gboolean gst_gl_memory_setup_buffer (GstGLMemoryAllocator * allocator, GstBuffer * buffer, GstGLVideoAllocationParams * params, @@ -250,6 +271,7 @@ gboolean gst_gl_memory_setup_buffer (GstGLMemoryAllocato gpointer *wrapped_data, gsize n_wrapped_pointers); +GST_EXPORT GstGLMemoryAllocator * gst_gl_memory_allocator_get_default (GstGLContext *context); G_END_DECLS diff --git a/gst-libs/gst/gl/gstglmemorypbo.h b/gst-libs/gst/gl/gstglmemorypbo.h index 830c0f42a..66ee6b8db 100644 --- a/gst-libs/gst/gl/gstglmemorypbo.h +++ b/gst-libs/gst/gl/gstglmemorypbo.h @@ -32,6 +32,7 @@ G_BEGIN_DECLS #define GST_TYPE_GL_MEMORY_PBO_ALLOCATOR (gst_gl_memory_pbo_allocator_get_type()) +GST_EXPORT GType gst_gl_memory_pbo_allocator_get_type(void); #define GST_IS_GL_MEMORY_PBO_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GL_MEMORY_PBO_ALLOCATOR)) @@ -64,12 +65,17 @@ struct _GstGLMemoryPBO */ #define GST_GL_MEMORY_PBO_ALLOCATOR_NAME "GLMemoryPBO" +GST_EXPORT void gst_gl_memory_pbo_init_once (void); +GST_EXPORT gboolean gst_is_gl_memory_pbo (GstMemory * mem); +GST_EXPORT void gst_gl_memory_pbo_download_transfer (GstGLMemoryPBO * gl_mem); +GST_EXPORT void gst_gl_memory_pbo_upload_transfer (GstGLMemoryPBO * gl_mem); +GST_EXPORT gboolean gst_gl_memory_pbo_copy_into_texture (GstGLMemoryPBO *gl_mem, guint tex_id, GstGLTextureTarget target, diff --git a/gst-libs/gst/gl/gstgloverlaycompositor.h b/gst-libs/gst/gl/gstgloverlaycompositor.h index dc8434a86..0f4f1b282 100644 --- a/gst-libs/gst/gl/gstgloverlaycompositor.h +++ b/gst-libs/gst/gl/gstgloverlaycompositor.h @@ -33,6 +33,7 @@ G_BEGIN_DECLS +GST_EXPORT GType gst_gl_overlay_compositor_get_type (void); /** @@ -71,15 +72,20 @@ struct _GstGLOverlayCompositorClass gpointer _padding[GST_PADDING]; }; +GST_EXPORT GstGLOverlayCompositor *gst_gl_overlay_compositor_new (GstGLContext * context); +GST_EXPORT void gst_gl_overlay_compositor_free_overlays (GstGLOverlayCompositor * compositor); +GST_EXPORT void gst_gl_overlay_compositor_upload_overlays (GstGLOverlayCompositor * compositor, GstBuffer * buf); +GST_EXPORT void gst_gl_overlay_compositor_draw_overlays (GstGLOverlayCompositor * compositor); +GST_EXPORT GstCaps * gst_gl_overlay_compositor_add_caps(GstCaps * caps); G_END_DECLS diff --git a/gst-libs/gst/gl/gstglquery.h b/gst-libs/gst/gl/gstglquery.h index 33777d4e9..c364a0b7b 100644 --- a/gst-libs/gst/gl/gstglquery.h +++ b/gst-libs/gst/gl/gstglquery.h @@ -47,17 +47,25 @@ struct _GstGLQuery gpointer _padding[GST_PADDING]; }; +GST_EXPORT void gst_gl_query_init (GstGLQuery * query, GstGLContext * context, GstGLQueryType query_type); +GST_EXPORT void gst_gl_query_unset (GstGLQuery * query); +GST_EXPORT GstGLQuery * gst_gl_query_new (GstGLContext * context, GstGLQueryType query_type); +GST_EXPORT void gst_gl_query_free (GstGLQuery * query); +GST_EXPORT void gst_gl_query_start (GstGLQuery * query); +GST_EXPORT void gst_gl_query_end (GstGLQuery * query); +GST_EXPORT void gst_gl_query_counter (GstGLQuery * query); +GST_EXPORT guint64 gst_gl_query_result (GstGLQuery * query); #define gst_gl_query_start_log_valist(query,cat,level,object,format,varargs) \ diff --git a/gst-libs/gst/gl/gstglshader.h b/gst-libs/gst/gl/gstglshader.h index 2164f2128..96ad48b61 100644 --- a/gst-libs/gst/gl/gstglshader.h +++ b/gst-libs/gst/gl/gstglshader.h @@ -26,6 +26,7 @@ G_BEGIN_DECLS +GST_EXPORT GType gst_gl_shader_get_type (void); #define GST_GL_TYPE_SHADER (gst_gl_shader_get_type()) #define GST_GL_SHADER(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_SHADER, GstGLShader)) @@ -51,60 +52,104 @@ struct _GstGLShaderClass { GstObjectClass parent_class; }; +GST_EXPORT GstGLShader * gst_gl_shader_new (GstGLContext *context); +GST_EXPORT GstGLShader * gst_gl_shader_new_with_stages (GstGLContext * context, GError ** error, ...); +GST_EXPORT GstGLShader * gst_gl_shader_new_link_with_stages (GstGLContext * context, GError ** error, ...); +GST_EXPORT GstGLShader * gst_gl_shader_new_default (GstGLContext * context, GError ** error); +GST_EXPORT gboolean gst_gl_shader_attach (GstGLShader * shader, GstGLSLStage * stage); +GST_EXPORT gboolean gst_gl_shader_attach_unlocked (GstGLShader * shader, GstGLSLStage * stage); +GST_EXPORT void gst_gl_shader_detach (GstGLShader * shader, GstGLSLStage * stage); +GST_EXPORT void gst_gl_shader_detach_unlocked (GstGLShader * shader, GstGLSLStage * stage); +GST_EXPORT gboolean gst_gl_shader_compile_attach_stage (GstGLShader * shader, GstGLSLStage *stage, GError ** error); +GST_EXPORT gboolean gst_gl_shader_link (GstGLShader * shader, GError ** error); +GST_EXPORT gboolean gst_gl_shader_is_linked (GstGLShader *shader); +GST_EXPORT int gst_gl_shader_get_program_handle (GstGLShader * shader); +GST_EXPORT void gst_gl_shader_release (GstGLShader *shader); +GST_EXPORT void gst_gl_shader_release_unlocked (GstGLShader * shader); +GST_EXPORT void gst_gl_shader_use (GstGLShader *shader); +GST_EXPORT void gst_gl_context_clear_shader (GstGLContext *context); +GST_EXPORT void gst_gl_shader_set_uniform_1i (GstGLShader *shader, const gchar *name, gint value); +GST_EXPORT void gst_gl_shader_set_uniform_1iv (GstGLShader *shader, const gchar *name, guint count, gint *value); +GST_EXPORT void gst_gl_shader_set_uniform_1f (GstGLShader *shader, const gchar *name, gfloat value); +GST_EXPORT void gst_gl_shader_set_uniform_1fv (GstGLShader *shader, const gchar *name, guint count, gfloat *value); +GST_EXPORT void gst_gl_shader_set_uniform_2i (GstGLShader *shader, const gchar *name, gint v0, gint v1); +GST_EXPORT void gst_gl_shader_set_uniform_2iv (GstGLShader *shader, const gchar *name, guint count, gint *value); +GST_EXPORT void gst_gl_shader_set_uniform_2f (GstGLShader *shader, const gchar *name, gfloat v0, gfloat v1); +GST_EXPORT void gst_gl_shader_set_uniform_2fv (GstGLShader *shader, const gchar *name, guint count, gfloat *value); +GST_EXPORT void gst_gl_shader_set_uniform_3i (GstGLShader *shader, const gchar *name, gint v0, gint v1, gint v2); +GST_EXPORT void gst_gl_shader_set_uniform_3iv (GstGLShader *shader, const gchar *name, guint count, gint * value); +GST_EXPORT void gst_gl_shader_set_uniform_3f (GstGLShader *shader, const gchar *name, gfloat v0, gfloat v1, gfloat v2); +GST_EXPORT void gst_gl_shader_set_uniform_3fv (GstGLShader *shader, const gchar *name, guint count, gfloat *value); +GST_EXPORT void gst_gl_shader_set_uniform_4i (GstGLShader *shader, const gchar *name, gint v0, gint v1, gint v2, gint v3); +GST_EXPORT void gst_gl_shader_set_uniform_4iv (GstGLShader *shader, const gchar *name, guint count, gint *value); +GST_EXPORT void gst_gl_shader_set_uniform_4f (GstGLShader *shader, const gchar *name, gfloat v0, gfloat v1, gfloat v2, gfloat v3); +GST_EXPORT void gst_gl_shader_set_uniform_4fv (GstGLShader *shader, const gchar *name, guint count, gfloat *value); +GST_EXPORT void gst_gl_shader_set_uniform_matrix_2fv (GstGLShader *shader, const gchar *name, gint count, gboolean transpose, const gfloat* value); +GST_EXPORT void gst_gl_shader_set_uniform_matrix_3fv (GstGLShader *shader, const gchar *name, gint count, gboolean transpose, const gfloat* value); +GST_EXPORT void gst_gl_shader_set_uniform_matrix_4fv (GstGLShader *shader, const gchar *name, gint count, gboolean transpose, const gfloat* value); #if GST_GL_HAVE_OPENGL +GST_EXPORT void gst_gl_shader_set_uniform_matrix_2x3fv (GstGLShader *shader, const gchar *name, gint count, gboolean transpose, const gfloat* value); +GST_EXPORT void gst_gl_shader_set_uniform_matrix_2x4fv (GstGLShader *shader, const gchar *name, gint count, gboolean transpose, const gfloat* value); +GST_EXPORT void gst_gl_shader_set_uniform_matrix_3x2fv (GstGLShader *shader, const gchar *name, gint count, gboolean transpose, const gfloat* value); +GST_EXPORT void gst_gl_shader_set_uniform_matrix_3x4fv (GstGLShader *shader, const gchar *name, gint count, gboolean transpose, const gfloat* value); +GST_EXPORT void gst_gl_shader_set_uniform_matrix_4x2fv (GstGLShader *shader, const gchar *name, gint count, gboolean transpose, const gfloat* value); +GST_EXPORT void gst_gl_shader_set_uniform_matrix_4x3fv (GstGLShader *shader, const gchar *name, gint count, gboolean transpose, const gfloat* value); #endif +GST_EXPORT gint gst_gl_shader_get_attribute_location (GstGLShader *shader, const gchar *name); +GST_EXPORT void gst_gl_shader_bind_attribute_location (GstGLShader * shader, guint index, const gchar * name); +GST_EXPORT void gst_gl_shader_bind_frag_data_location (GstGLShader * shader, guint index, const gchar * name); G_END_DECLS diff --git a/gst-libs/gst/gl/gstglshaderstrings.h b/gst-libs/gst/gl/gstglshaderstrings.h index 89d88b000..0e56471c3 100644 --- a/gst-libs/gst/gl/gstglshaderstrings.h +++ b/gst-libs/gst/gl/gstglshaderstrings.h @@ -25,12 +25,17 @@ G_BEGIN_DECLS -extern const gchar *gst_gl_shader_string_vertex_default; -extern const gchar *gst_gl_shader_string_fragment_default; +GST_EXPORT +const gchar *gst_gl_shader_string_vertex_default; +GST_EXPORT +const gchar *gst_gl_shader_string_fragment_default; -extern const gchar *gst_gl_shader_string_vertex_mat4_texture_transform; -extern const gchar *gst_gl_shader_string_vertex_mat4_vertex_transform; -extern const gchar *gst_gl_shader_string_fragment_external_oes_default; +GST_EXPORT +const gchar *gst_gl_shader_string_vertex_mat4_texture_transform; +GST_EXPORT +const gchar *gst_gl_shader_string_vertex_mat4_vertex_transform; +GST_EXPORT +const gchar *gst_gl_shader_string_fragment_external_oes_default; G_END_DECLS diff --git a/gst-libs/gst/gl/gstglsl.h b/gst-libs/gst/gl/gstglsl.h index 9f051f65d..097fea254 100644 --- a/gst-libs/gst/gl/gstglsl.h +++ b/gst-libs/gst/gl/gstglsl.h @@ -25,6 +25,7 @@ G_BEGIN_DECLS +GST_EXPORT GQuark gst_glsl_error_quark (void); #define GST_GLSL_ERROR (gst_glsl_error_quark ()) @@ -70,23 +71,32 @@ typedef enum GST_GLSL_PROFILE_ANY = -1, } GstGLSLProfile; +GST_EXPORT GstGLSLVersion gst_glsl_version_from_string (const gchar * string); +GST_EXPORT const gchar * gst_glsl_version_to_string (GstGLSLVersion version); +GST_EXPORT GstGLSLProfile gst_glsl_profile_from_string (const gchar * string); +GST_EXPORT const gchar * gst_glsl_profile_to_string (GstGLSLProfile profile); +GST_EXPORT gchar * gst_glsl_version_profile_to_string (GstGLSLVersion version, GstGLSLProfile profile); +GST_EXPORT gboolean gst_glsl_version_profile_from_string (const gchar * string, GstGLSLVersion * version, GstGLSLProfile * profile); +GST_EXPORT gboolean gst_glsl_string_get_version_profile (const gchar *s, GstGLSLVersion * version, GstGLSLProfile * profile); +GST_EXPORT GstGLSLVersion gst_gl_version_to_glsl_version (GstGLAPI gl_api, gint maj, gint min); +GST_EXPORT gboolean gst_gl_context_supports_glsl_profile_version (GstGLContext * context, GstGLSLVersion version, GstGLSLProfile profile); diff --git a/gst-libs/gst/gl/gstglslstage.h b/gst-libs/gst/gl/gstglslstage.h index 3521e2270..b01100639 100644 --- a/gst-libs/gst/gl/gstglslstage.h +++ b/gst-libs/gst/gl/gstglslstage.h @@ -62,13 +62,17 @@ struct _GstGLSLStageClass gpointer _padding[GST_PADDING]; }; +GST_EXPORT GType gst_glsl_stage_get_type (void); +GST_EXPORT GstGLSLStage * gst_glsl_stage_new (GstGLContext * context, guint type); +GST_EXPORT GstGLSLStage * gst_glsl_stage_new_with_string (GstGLContext * context, guint type, GstGLSLVersion version, GstGLSLProfile profile, const gchar * str); +GST_EXPORT GstGLSLStage * gst_glsl_stage_new_with_strings (GstGLContext * context, guint type, GstGLSLVersion version, @@ -76,18 +80,26 @@ GstGLSLStage * gst_glsl_stage_new_with_strings (GstGLContext * context, gint n_strings, const gchar ** str); +GST_EXPORT GstGLSLStage * gst_glsl_stage_new_default_fragment (GstGLContext * context); +GST_EXPORT GstGLSLStage * gst_glsl_stage_new_default_vertex (GstGLContext * context); +GST_EXPORT guint gst_glsl_stage_get_handle (GstGLSLStage * stage); +GST_EXPORT GstGLSLProfile gst_glsl_stage_get_profile (GstGLSLStage * stage); +GST_EXPORT GstGLSLVersion gst_glsl_stage_get_version (GstGLSLStage * stage); +GST_EXPORT guint gst_glsl_stage_get_shader_type (GstGLSLStage * stage); +GST_EXPORT gboolean gst_glsl_stage_set_strings (GstGLSLStage * stage, GstGLSLVersion version, GstGLSLProfile profile, gint n_strings, const gchar ** str); +GST_EXPORT gboolean gst_glsl_stage_compile (GstGLSLStage * stage, GError ** error); diff --git a/gst-libs/gst/gl/gstglsyncmeta.h b/gst-libs/gst/gl/gstglsyncmeta.h index e5eb17b30..f9800641e 100644 --- a/gst-libs/gst/gl/gstglsyncmeta.h +++ b/gst-libs/gst/gl/gstglsyncmeta.h @@ -49,16 +49,23 @@ struct _GstGLSyncMeta { void (*free_gl) (GstGLSyncMeta * sync, GstGLContext * context); }; +GST_EXPORT GType gst_gl_sync_meta_api_get_type (void); +GST_EXPORT const GstMetaInfo * gst_gl_sync_meta_get_info (void); #define gst_buffer_get_gl_sync_meta(b) ((GstGLSyncMeta*)gst_buffer_get_meta((b),GST_GL_SYNC_META_API_TYPE)) +GST_EXPORT GstGLSyncMeta * gst_buffer_add_gl_sync_meta (GstGLContext * context, GstBuffer *buffer); +GST_EXPORT GstGLSyncMeta * gst_buffer_add_gl_sync_meta_full (GstGLContext * context, GstBuffer * buffer, gpointer data); +GST_EXPORT void gst_gl_sync_meta_set_sync_point (GstGLSyncMeta * sync, GstGLContext * context); +GST_EXPORT void gst_gl_sync_meta_wait (GstGLSyncMeta * sync, GstGLContext * context); +GST_EXPORT void gst_gl_sync_meta_wait_cpu (GstGLSyncMeta * sync, GstGLContext * context); G_END_DECLS diff --git a/gst-libs/gst/gl/gstglupload.h b/gst-libs/gst/gl/gstglupload.h index 3e0029897..7b94929a1 100644 --- a/gst-libs/gst/gl/gstglupload.h +++ b/gst-libs/gst/gl/gstglupload.h @@ -27,6 +27,7 @@ G_BEGIN_DECLS +GST_EXPORT GType gst_gl_upload_get_type (void); #define GST_TYPE_GL_UPLOAD (gst_gl_upload_get_type()) #define GST_GL_UPLOAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_UPLOAD,GstGLUpload)) @@ -82,28 +83,36 @@ struct _GstGLUploadClass gpointer _padding[GST_PADDING]; }; +GST_EXPORT GstCaps * gst_gl_upload_get_input_template_caps (void); +GST_EXPORT GstGLUpload * gst_gl_upload_new (GstGLContext * context); +GST_EXPORT void gst_gl_upload_set_context (GstGLUpload * upload, GstGLContext * context); +GST_EXPORT GstCaps * gst_gl_upload_transform_caps (GstGLUpload * upload, GstGLContext * context, GstPadDirection direction, GstCaps * caps, GstCaps * filter); +GST_EXPORT gboolean gst_gl_upload_set_caps (GstGLUpload * upload, GstCaps * in_caps, GstCaps * out_caps); +GST_EXPORT void gst_gl_upload_get_caps (GstGLUpload * upload, GstCaps ** in_caps, GstCaps ** out_caps); +GST_EXPORT void gst_gl_upload_propose_allocation (GstGLUpload * upload, GstQuery * decide_query, GstQuery * query); +GST_EXPORT GstGLUploadReturn gst_gl_upload_perform_with_buffer (GstGLUpload * upload, GstBuffer * buffer, GstBuffer ** outbuf_ptr); diff --git a/gst-libs/gst/gl/gstglutils.h b/gst-libs/gst/gl/gstglutils.h index a7147593c..297e462fc 100644 --- a/gst-libs/gst/gl/gstglutils.h +++ b/gst-libs/gst/gl/gstglutils.h @@ -28,33 +28,47 @@ G_BEGIN_DECLS +GST_EXPORT gboolean gst_gl_context_gen_shader (GstGLContext * context, const gchar * shader_vertex_source, const gchar * shader_fragment_source, GstGLShader ** shader); +GST_EXPORT void gst_gl_context_del_shader (GstGLContext * context, GstGLShader * shader); +GST_EXPORT gboolean gst_gl_ensure_element_data (gpointer element, GstGLDisplay **display_ptr, GstGLContext ** other_context_ptr); +GST_EXPORT gboolean gst_gl_handle_set_context (GstElement * element, GstContext * context, GstGLDisplay ** display, GstGLContext ** other_context); +GST_EXPORT gboolean gst_gl_handle_context_query (GstElement * element, GstQuery * query, GstGLDisplay ** display, GstGLContext ** other_context); +GST_EXPORT gboolean gst_gl_run_query (GstElement * element, GstQuery * query, GstPadDirection direction); +GST_EXPORT gsize gst_gl_get_plane_data_size (GstVideoInfo * info, GstVideoAlignment * align, guint plane); +GST_EXPORT gsize gst_gl_get_plane_start (GstVideoInfo * info, GstVideoAlignment * valign, guint plane); +GST_EXPORT GstCaps * gst_gl_caps_replace_all_caps_features (const GstCaps * caps, const gchar * feature_name); +GST_EXPORT gboolean gst_gl_value_set_texture_target_from_mask (GValue * value, GstGLTextureTarget target_mask); +GST_EXPORT gboolean gst_gl_value_set_texture_target (GValue * value, GstGLTextureTarget target); +GST_EXPORT GstGLTextureTarget gst_gl_value_get_texture_target_mask (const GValue * value); +GST_EXPORT void gst_gl_multiply_matrix4 (const gfloat * a, const gfloat * b, gfloat * result); +GST_EXPORT void gst_gl_get_affine_transformation_meta_as_ndc (GstVideoAffineTransformationMeta * meta, gfloat * matrix); diff --git a/gst-libs/gst/gl/gstglviewconvert.h b/gst-libs/gst/gl/gstglviewconvert.h index 4783dd1c4..8f3ee8a19 100644 --- a/gst-libs/gst/gl/gstglviewconvert.h +++ b/gst-libs/gst/gl/gstglviewconvert.h @@ -33,6 +33,7 @@ G_BEGIN_DECLS #define GST_GL_VIEW_CONVERT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_GL_VIEW_CONVERT,GstGLViewConvertClass)) #define GST_TYPE_GL_STEREO_DOWNMIX_MODE_TYPE gst_gl_stereo_downmix_mode_get_type() +GST_EXPORT GType gst_gl_stereo_downmix_mode_get_type (void); enum _GstGLStereoDownmix { @@ -84,21 +85,31 @@ struct _GstGLViewConvertClass gpointer _padding[GST_PADDING]; }; +GST_EXPORT GType gst_gl_view_convert_get_type (void); +GST_EXPORT GstGLViewConvert * gst_gl_view_convert_new (void); +GST_EXPORT gboolean gst_gl_view_convert_set_caps (GstGLViewConvert * viewconvert, GstCaps * in_caps, GstCaps * out_caps); +GST_EXPORT GstCaps * gst_gl_view_convert_transform_caps (GstGLViewConvert * viewconvert, GstPadDirection direction, GstCaps * caps, GstCaps * filter); +GST_EXPORT GstCaps * gst_gl_view_convert_fixate_caps (GstGLViewConvert *viewconvert, GstPadDirection direction, GstCaps * caps, GstCaps * othercaps); +GST_EXPORT GstFlowReturn gst_gl_view_convert_submit_input_buffer (GstGLViewConvert *viewconvert, gboolean is_discont, GstBuffer * input); +GST_EXPORT GstFlowReturn gst_gl_view_convert_get_output (GstGLViewConvert *viewconvert, GstBuffer ** outbuf_ptr); +GST_EXPORT GstBuffer * gst_gl_view_convert_perform (GstGLViewConvert * viewconvert, GstBuffer *inbuf); +GST_EXPORT void gst_gl_view_convert_reset (GstGLViewConvert * viewconvert); +GST_EXPORT void gst_gl_view_convert_set_context (GstGLViewConvert *viewconvert, GstGLContext * context); G_END_DECLS diff --git a/gst-libs/gst/gl/gstglwindow.h b/gst-libs/gst/gl/gstglwindow.h index 1cf5c3e9c..730be00dc 100644 --- a/gst-libs/gst/gl/gstglwindow.h +++ b/gst-libs/gst/gl/gstglwindow.h @@ -140,55 +140,73 @@ struct _GstGLWindowClass { gpointer _reserved[GST_PADDING]; }; +GST_EXPORT GQuark gst_gl_window_error_quark (void); +GST_EXPORT GType gst_gl_window_get_type (void); +GST_EXPORT GstGLWindow * gst_gl_window_new (GstGLDisplay *display); /* callbacks */ +GST_EXPORT void gst_gl_window_set_draw_callback (GstGLWindow *window, GstGLWindowCB callback, gpointer data, GDestroyNotify destroy_notify); +GST_EXPORT void gst_gl_window_set_resize_callback (GstGLWindow *window, GstGLWindowResizeCB callback, gpointer data, GDestroyNotify destroy_notify); +GST_EXPORT void gst_gl_window_set_close_callback (GstGLWindow *window, GstGLWindowCB callback, gpointer data, GDestroyNotify destroy_notify); +GST_EXPORT void gst_gl_window_set_window_handle (GstGLWindow *window, guintptr handle); +GST_EXPORT guintptr gst_gl_window_get_window_handle (GstGLWindow *window); /* loop/events */ +GST_EXPORT void gst_gl_window_run (GstGLWindow *window); +GST_EXPORT void gst_gl_window_quit (GstGLWindow *window); +GST_EXPORT gboolean gst_gl_window_is_running (GstGLWindow *window); +GST_EXPORT void gst_gl_window_send_message (GstGLWindow *window, GstGLWindowCB callback, gpointer data); +GST_EXPORT void gst_gl_window_send_message_async (GstGLWindow *window, GstGLWindowCB callback, gpointer data, GDestroyNotify destroy); /* navigation */ +GST_EXPORT void gst_gl_window_handle_events (GstGLWindow * window, gboolean handle_events); +GST_EXPORT void gst_gl_window_send_key_event (GstGLWindow * window, const char * event_type, const char * key_str); +GST_EXPORT void gst_gl_window_send_key_event_async (GstGLWindow * window, const char * event_type, const char * key_str); +GST_EXPORT void gst_gl_window_send_mouse_event (GstGLWindow * window, const char * event_type, int button, double posx, double posy); +GST_EXPORT void gst_gl_window_send_mouse_event_async (GstGLWindow * window, const char * event_type, int button, @@ -196,15 +214,21 @@ void gst_gl_window_send_mouse_event_async (GstGLWindow * window, double posy); /* surfaces/rendering */ +GST_EXPORT void gst_gl_window_queue_resize (GstGLWindow *window); +GST_EXPORT void gst_gl_window_draw (GstGLWindow *window); +GST_EXPORT void gst_gl_window_show (GstGLWindow *window); +GST_EXPORT void gst_gl_window_set_preferred_size (GstGLWindow * window, gint width, gint height); +GST_EXPORT void gst_gl_window_get_surface_dimensions (GstGLWindow * window, guint * width, guint * height); +GST_EXPORT gboolean gst_gl_window_set_render_rectangle (GstGLWindow * window, gint x, gint y, @@ -212,9 +236,12 @@ gboolean gst_gl_window_set_render_rectangle (GstGLWindow * window, gint height); /* subclass usage only */ +GST_EXPORT void gst_gl_window_resize (GstGLWindow *window, guint width, guint height); +GST_EXPORT GstGLContext * gst_gl_window_get_context (GstGLWindow *window); +GST_EXPORT guintptr gst_gl_window_get_display (GstGLWindow *window); GST_DEBUG_CATEGORY_EXTERN (gst_gl_window_debug); |