Skip to content

Commit

Permalink
gl: GST_EXPORT -> GST_GL_API
Browse files Browse the repository at this point in the history
We need different export decorators for the different libs.
For now no actual change though, just rename before the release,
and add prelude headers to define the new decorator to GST_EXPORT.
  • Loading branch information
tp-m committed Mar 13, 2018
1 parent 8821515 commit c5b5ef1
Show file tree
Hide file tree
Showing 36 changed files with 361 additions and 325 deletions.
1 change: 1 addition & 0 deletions gst-libs/gst/gl/Makefile.am
Expand Up @@ -67,6 +67,7 @@ libgstgl_@GST_API_VERSION@include_HEADERS = \
gstglquery.h \
gstgl_fwd.h \
gstgl_enums.h \
gl-prelude.h \
gl.h

noinst_HEADERS = \
Expand Down
3 changes: 2 additions & 1 deletion gst-libs/gst/gl/egl/gstegl.h
Expand Up @@ -22,6 +22,7 @@
#define _GST_EGL_H_

#include <gst/gl/gstglconfig.h>
#include <gst/gl/gl-prelude.h>

#if GST_GL_HAVE_WINDOW_DISPMANX && defined(__GNUC__)
#ifndef __VCCOREVER__
Expand Down Expand Up @@ -51,7 +52,7 @@
typedef gintptr EGLAttrib;
#endif

GST_EXPORT
GST_GL_API
const gchar * gst_egl_get_error_string (EGLint err);

#endif /* _GST_EGL_H_ */
12 changes: 6 additions & 6 deletions gst-libs/gst/gl/egl/gsteglimage.h
Expand Up @@ -28,7 +28,7 @@

G_BEGIN_DECLS

GST_EXPORT GType gst_egl_image_get_type (void);
GST_GL_API GType gst_egl_image_get_type (void);

#define GST_TYPE_EGL_IMAGE (gst_egl_image_get_type())
#define GST_IS_EGL_IMAGE(obj) (GST_IS_MINI_OBJECT_TYPE(obj, GST_TYPE_EGL_IMAGE))
Expand Down Expand Up @@ -68,27 +68,27 @@ struct _GstEGLImage
gpointer _padding[GST_PADDING];
};

GST_EXPORT
GST_GL_API
GstEGLImage * gst_egl_image_new_wrapped (GstGLContext * context,
gpointer image,
GstGLFormat format,
gpointer user_data,
GstEGLImageDestroyNotify user_data_destroy);
GST_EXPORT
GST_GL_API
gpointer gst_egl_image_get_image (GstEGLImage * image);

GST_EXPORT
GST_GL_API
GstEGLImage * gst_egl_image_from_texture (GstGLContext * context,
GstGLMemory * gl_mem,
guintptr * attribs);
#if GST_GL_HAVE_DMABUF
GST_EXPORT
GST_GL_API
GstEGLImage * gst_egl_image_from_dmabuf (GstGLContext * context,
gint dmabuf,
GstVideoInfo * in_info,
gint plane,
gsize offset);
GST_EXPORT
GST_GL_API
gboolean gst_egl_image_export_dmabuf (GstEGLImage *image, int *fd, gint *stride, gsize *offset);
#endif

Expand Down
10 changes: 5 additions & 5 deletions gst-libs/gst/gl/egl/gstgldisplay_egl.h
Expand Up @@ -25,7 +25,7 @@

G_BEGIN_DECLS

GST_EXPORT
GST_GL_API
GType gst_gl_display_egl_get_type (void);

#define GST_TYPE_GL_DISPLAY_EGL (gst_gl_display_egl_get_type())
Expand Down Expand Up @@ -63,16 +63,16 @@ struct _GstGLDisplayEGLClass
gpointer _padding[GST_PADDING];
};

GST_EXPORT
GST_GL_API
GstGLDisplayEGL *gst_gl_display_egl_new (void);

GST_EXPORT
GST_GL_API
GstGLDisplayEGL *gst_gl_display_egl_new_with_egl_display (gpointer display);

GST_EXPORT
GST_GL_API
GstGLDisplayEGL *gst_gl_display_egl_from_gl_display (GstGLDisplay * display);

GST_EXPORT
GST_GL_API
gpointer gst_gl_display_egl_get_from_native (GstGLDisplayType type, guintptr display);

#define GST_GL_DISPLAY_EGL_NAME "gst.gl.display.egl"
Expand Down
10 changes: 5 additions & 5 deletions gst-libs/gst/gl/egl/gstglmemoryegl.h
Expand Up @@ -30,7 +30,7 @@
G_BEGIN_DECLS

#define GST_TYPE_GL_MEMORY_EGL_ALLOCATOR (gst_gl_memory_egl_allocator_get_type())
GST_EXPORT GType gst_gl_memory_egl_allocator_get_type(void);
GST_GL_API GType gst_gl_memory_egl_allocator_get_type(void);

#define GST_IS_GL_MEMORY_EGL_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR))
#define GST_IS_GL_MEMORY_EGL_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR))
Expand Down Expand Up @@ -61,16 +61,16 @@ struct _GstGLMemoryEGL
*/
#define GST_GL_MEMORY_EGL_ALLOCATOR_NAME "GLMemoryEGL"

GST_EXPORT
GST_GL_API
void gst_gl_memory_egl_init_once (void);

GST_EXPORT
GST_GL_API
gboolean gst_is_gl_memory_egl (GstMemory * mem);

GST_EXPORT
GST_GL_API
gpointer gst_gl_memory_egl_get_image (GstGLMemoryEGL * mem);

GST_EXPORT
GST_GL_API
gpointer gst_gl_memory_egl_get_display (GstGLMemoryEGL * mem);

/**
Expand Down
31 changes: 31 additions & 0 deletions gst-libs/gst/gl/gl-prelude.h
@@ -0,0 +1,31 @@
/* GStreamer GL Library
* Copyright (C) 2018 GStreamer developers
*
* gl-prelude.h: prelude include header for gst-gl library
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/

#ifndef __GST_GL_PRELUDE_H__
#define __GST_GL_PRELUDE_H__

#include <gst/gst.h>

#ifndef GST_GL_API
#define GST_GL_API GST_EXPORT
#endif

#endif /* __GST_GL_PRELUDE_H__ */
9 changes: 5 additions & 4 deletions gst-libs/gst/gl/gstglapi.h
Expand Up @@ -22,6 +22,7 @@
#define __GST_GL_API_H__

#include <gst/gl/gstglconfig.h>
#include <gst/gl/gl-prelude.h>

#include <gst/gst.h>

Expand Down Expand Up @@ -98,14 +99,14 @@ typedef enum
GST_GL_PLATFORM_ANY = G_MAXUINT32
} GstGLPlatform;

GST_EXPORT
GST_GL_API
gchar * gst_gl_api_to_string (GstGLAPI api);
GST_EXPORT
GST_GL_API
GstGLAPI gst_gl_api_from_string (const gchar * api_s);

GST_EXPORT
GST_GL_API
gchar * gst_gl_platform_to_string (GstGLPlatform platform);
GST_EXPORT
GST_GL_API
GstGLPlatform gst_gl_platform_from_string (const gchar * platform_s);

G_END_DECLS
Expand Down
2 changes: 1 addition & 1 deletion gst-libs/gst/gl/gstglbasefilter.h
Expand Up @@ -29,7 +29,7 @@

G_BEGIN_DECLS

GST_EXPORT
GST_GL_API
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
30 changes: 15 additions & 15 deletions gst-libs/gst/gl/gstglbasememory.h
Expand Up @@ -36,11 +36,11 @@ G_BEGIN_DECLS
* from the #GstGLBaseMemoryError enumeration
*/
#define GST_TYPE_GL_BASE_MEMORY (gst_gl_base_memory_get_type())
GST_EXPORT
GST_GL_API
GType gst_gl_base_memory_get_type(void);

#define GST_TYPE_GL_BASE_MEMORY_ALLOCATOR (gst_gl_base_memory_allocator_get_type())
GST_EXPORT
GST_GL_API
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 @@ -52,7 +52,7 @@ GType gst_gl_base_memory_allocator_get_type(void);

#define GST_GL_BASE_MEMORY_CAST(mem) ((GstGLBaseMemory *)mem)

GST_EXPORT
GST_GL_API
GQuark gst_gl_base_memory_error_quark (void);
#define GST_GL_BASE_MEMORY_ERROR (gst_gl_base_memory_error_quark ())

Expand Down Expand Up @@ -148,7 +148,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
GST_GL_API
GType gst_gl_allocation_params_get_type (void);

/**
Expand Down Expand Up @@ -219,7 +219,7 @@ struct _GstGLAllocationParams
gpointer _padding[GST_PADDING];
};

GST_EXPORT
GST_GL_API
gboolean gst_gl_allocation_params_init (GstGLAllocationParams * params,
gsize struct_size,
guint alloc_flags,
Expand All @@ -234,18 +234,18 @@ gboolean gst_gl_allocation_params_init (GstGLAllocationPara
GDestroyNotify notify);

/* free with gst_gl_allocation_params_free */
GST_EXPORT
GST_GL_API
GstGLAllocationParams * gst_gl_allocation_params_copy (GstGLAllocationParams * src);

GST_EXPORT
GST_GL_API
void gst_gl_allocation_params_free (GstGLAllocationParams * params);

/* subclass usage */
GST_EXPORT
GST_GL_API
void gst_gl_allocation_params_free_data (GstGLAllocationParams * params);

/* subclass usage */
GST_EXPORT
GST_GL_API
void gst_gl_allocation_params_copy_data (GstGLAllocationParams * src,
GstGLAllocationParams * dest);

Expand Down Expand Up @@ -387,13 +387,13 @@ struct _GstGLBaseMemoryAllocatorClass
*/
#define GST_GL_BASE_MEMORY_ALLOCATOR_NAME "GLBaseMemory"

GST_EXPORT
GST_GL_API
void gst_gl_base_memory_init_once (void);

GST_EXPORT
GST_GL_API
gboolean gst_is_gl_base_memory (GstMemory * mem);

GST_EXPORT
GST_GL_API
void gst_gl_base_memory_init (GstGLBaseMemory * mem,
GstAllocator * allocator,
GstMemory * parent,
Expand All @@ -403,16 +403,16 @@ void gst_gl_base_memory_init (GstGLBaseMemory * mem,
gpointer user_data,
GDestroyNotify notify);

GST_EXPORT
GST_GL_API
gboolean gst_gl_base_memory_alloc_data (GstGLBaseMemory * gl_mem);

GST_EXPORT
GST_GL_API
gboolean gst_gl_base_memory_memcpy (GstGLBaseMemory * src,
GstGLBaseMemory * dest,
gssize offset,
gssize size);

GST_EXPORT
GST_GL_API
GstGLBaseMemory * gst_gl_base_memory_alloc (GstGLBaseMemoryAllocator * allocator,
GstGLAllocationParams * params);

Expand Down
10 changes: 5 additions & 5 deletions gst-libs/gst/gl/gstglbuffer.h
Expand Up @@ -26,7 +26,7 @@
G_BEGIN_DECLS

#define GST_TYPE_GL_BUFFER_ALLOCATOR (gst_gl_buffer_allocator_get_type())
GST_EXPORT
GST_GL_API
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 @@ -57,7 +57,7 @@ struct _GstGLBuffer
typedef struct _GstGLBufferAllocationParams GstGLBufferAllocationParams;

#define GST_TYPE_GL_BUFFER_ALLOCATION_PARAMS (gst_gl_buffer_allocation_params_get_type())
GST_EXPORT
GST_GL_API
GType gst_gl_buffer_allocation_params_get_type (void);

/**
Expand All @@ -84,7 +84,7 @@ struct _GstGLBufferAllocationParams
gpointer _padding[GST_PADDING];
};

GST_EXPORT
GST_GL_API
GstGLBufferAllocationParams * gst_gl_buffer_allocation_params_new (GstGLContext * context,
gsize alloc_size,
GstAllocationParams * alloc_params,
Expand Down Expand Up @@ -131,9 +131,9 @@ struct _GstGLBufferAllocatorClass
*/
#define GST_GL_BUFFER_ALLOCATOR_NAME "GLBuffer"

GST_EXPORT
GST_GL_API
void gst_gl_buffer_init_once (void);
GST_EXPORT
GST_GL_API
gboolean gst_is_gl_buffer (GstMemory * mem);

G_END_DECLS
Expand Down
8 changes: 4 additions & 4 deletions gst-libs/gst/gl/gstglbufferpool.h
Expand Up @@ -29,7 +29,7 @@
G_BEGIN_DECLS

/* buffer pool functions */
GST_EXPORT
GST_GL_API
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,12 +66,12 @@ struct _GstGLBufferPoolClass
gpointer _padding[GST_PADDING];
};

GST_EXPORT
GST_GL_API
GstBufferPool *gst_gl_buffer_pool_new (GstGLContext * context);

GST_EXPORT
GST_GL_API
GstGLAllocationParams * gst_buffer_pool_config_get_gl_allocation_params (GstStructure * config);
GST_EXPORT
GST_GL_API
void gst_buffer_pool_config_set_gl_allocation_params (GstStructure * config,
GstGLAllocationParams * params);

Expand Down

0 comments on commit c5b5ef1

Please sign in to comment.