Skip to content

Commit

Permalink
gstgl: Add GST_EXPORT to all symbols used on Windows
Browse files Browse the repository at this point in the history
This is a requirement for those symbols to be exported in gstgl-1.0.dll
when building with the MSVC compiler
  • Loading branch information
nirbheek authored and tp-m committed Dec 9, 2017
1 parent c7c2a68 commit 6106816
Show file tree
Hide file tree
Showing 27 changed files with 300 additions and 6 deletions.
4 changes: 4 additions & 0 deletions gst-libs/gst/gl/gstglapi.h
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions gst-libs/gst/gl/gstglbasefilter.h
Expand Up @@ -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))
Expand Down
13 changes: 13 additions & 0 deletions gst-libs/gst/gl/gstglbasememory.h
Expand Up @@ -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))
Expand All @@ -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 ())

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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,
Expand All @@ -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);

Expand Down
5 changes: 5 additions & 0 deletions gst-libs/gst/gl/gstglbuffer.h
Expand Up @@ -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))
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions gst-libs/gst/gl/gstglbufferpool.h
Expand Up @@ -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))
Expand Down Expand Up @@ -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);

Expand Down
7 changes: 7 additions & 0 deletions gst-libs/gst/gl/gstglcolorconvert.h
Expand Up @@ -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))
Expand Down Expand Up @@ -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
Expand Down
28 changes: 28 additions & 0 deletions gst-libs/gst/gl/gstglcontext.h
Expand Up @@ -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);

/**
Expand Down Expand Up @@ -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);

Expand Down
3 changes: 3 additions & 0 deletions gst-libs/gst/gl/gstglcontrolbindingproxy.h
Expand Up @@ -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())

Expand All @@ -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);
Expand Down
10 changes: 10 additions & 0 deletions gst-libs/gst/gl/gstgldebug.h
Expand Up @@ -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);

/**
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down
12 changes: 12 additions & 0 deletions gst-libs/gst/gl/gstgldisplay.h
Expand Up @@ -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())
Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion gst-libs/gst/gl/gstglfeature.h
Expand Up @@ -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
Expand Down

0 comments on commit 6106816

Please sign in to comment.