From d8b0c8ec383dd33a109644670b0e7da06a96c7af Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Thu, 19 Jul 2012 17:55:00 +0200 Subject: [PATCH] Use standard G_GNUC_INTERNAL keyword instead of attribute_hidden. --- configure.ac | 26 -------- gst-libs/gst/vaapi/gstvaapicodec_objects.h | 32 ++++++---- gst-libs/gst/vaapi/gstvaapidecoder_dpb.h | 27 ++++---- gst-libs/gst/vaapi/gstvaapidecoder_objects.h | 30 +++++---- gst-libs/gst/vaapi/gstvaapidecoder_priv.h | 26 +++++--- gst-libs/gst/vaapi/gstvaapisurface_priv.h | 7 +- gst-libs/gst/vaapi/gstvaapiutils.h | 35 +++++----- gst-libs/gst/vaapi/gstvaapiutils_glx.h | 95 ++++++++++++++-------------- gst-libs/gst/vaapi/gstvaapiutils_x11.h | 17 +++-- 9 files changed, 144 insertions(+), 151 deletions(-) diff --git a/configure.ac b/configure.ac index ccca88c..a4c3e2c 100644 --- a/configure.ac +++ b/configure.ac @@ -113,32 +113,6 @@ AC_ARG_ENABLE(vaapisink-glx, [enable OpenGL/X11 to vaapisink @<:@default=yes@:>@]), [], [enable_vaapisink_glx="no"]) -dnl Check for __attribute__((visibility())) -AC_CACHE_CHECK([whether __attribute__((visibility())) is supported], - vaapi_cv_visibility_attribute, - [cat > conftest.c </dev/null 2>&1; then - if grep '\.hidden.*foo' conftest.s >/dev/null; then - if grep '\.protected.*bar' conftest.s >/dev/null; then - vaapi_cv_visibility_attribute=yes - fi - fi - fi - rm -f conftest.[cs] -]) -if test $vaapi_cv_visibility_attribute = yes; then - vaapi_cv_visibility_attribute_hidden="__attribute__((visibility(\"hidden\")))" -else - vaapi_cv_visibility_attribute_hidden="" -fi -AC_DEFINE_UNQUOTED([attribute_hidden], - [$vaapi_cv_visibility_attribute_hidden], - [Define the "hidden" visibility attribute]) - dnl Check for basic libraries AC_CHECK_LIB(m, tan) diff --git a/gst-libs/gst/vaapi/gstvaapicodec_objects.h b/gst-libs/gst/vaapi/gstvaapicodec_objects.h index f1e846d..c70f34f 100644 --- a/gst-libs/gst/vaapi/gstvaapicodec_objects.h +++ b/gst-libs/gst/vaapi/gstvaapicodec_objects.h @@ -109,10 +109,11 @@ struct _GstVaapiCodecObjectClass { const GstVaapiCodecObjectConstructorArgs *args); }; +G_GNUC_INTERNAL GType -gst_vaapi_codec_object_get_type(void) G_GNUC_CONST - attribute_hidden; +gst_vaapi_codec_object_get_type(void) G_GNUC_CONST; +G_GNUC_INTERNAL GstVaapiCodecObject * gst_vaapi_codec_object_new( GType type, @@ -121,13 +122,14 @@ gst_vaapi_codec_object_new( guint param_size, gconstpointer data, guint data_size -) attribute_hidden; +); +G_GNUC_INTERNAL gboolean gst_vaapi_codec_object_construct( GstVaapiCodecObject *obj, const GstVaapiCodecObjectConstructorArgs *args -) attribute_hidden; +); /* ------------------------------------------------------------------------- */ /* --- Inverse Quantization Matrices --- */ @@ -184,16 +186,17 @@ struct _GstVaapiIqMatrixClass { GstVaapiCodecObjectClass parent_class; }; +G_GNUC_INTERNAL GType -gst_vaapi_iq_matrix_get_type(void) G_GNUC_CONST - attribute_hidden; +gst_vaapi_iq_matrix_get_type(void) G_GNUC_CONST; +G_GNUC_INTERNAL GstVaapiIqMatrix * gst_vaapi_iq_matrix_new( GstVaapiDecoder *decoder, gconstpointer param, guint param_size -) attribute_hidden; +); /* ------------------------------------------------------------------------- */ /* --- VC-1 Bit Planes --- */ @@ -250,13 +253,13 @@ struct _GstVaapiBitPlaneClass { GstVaapiCodecObjectClass parent_class; }; +G_GNUC_INTERNAL GType -gst_vaapi_bitplane_get_type(void) G_GNUC_CONST - attribute_hidden; +gst_vaapi_bitplane_get_type(void) G_GNUC_CONST; +G_GNUC_INTERNAL GstVaapiBitPlane * -gst_vaapi_bitplane_new(GstVaapiDecoder *decoder, guint8 *data, guint data_size) - attribute_hidden; +gst_vaapi_bitplane_new(GstVaapiDecoder *decoder, guint8 *data, guint data_size); /* ------------------------------------------------------------------------- */ /* --- JPEG Huffman Tables --- */ @@ -313,16 +316,17 @@ struct _GstVaapiHuffmanTableClass { GstVaapiCodecObjectClass parent_class; }; +G_GNUC_INTERNAL GType -gst_vaapi_huffman_table_get_type(void) G_GNUC_CONST - attribute_hidden; +gst_vaapi_huffman_table_get_type(void) G_GNUC_CONST; +G_GNUC_INTERNAL GstVaapiHuffmanTable * gst_vaapi_huffman_table_new( GstVaapiDecoder *decoder, guint8 *data, guint data_size -) attribute_hidden; +); /* ------------------------------------------------------------------------- */ /* --- Helpers to create codec-dependent objects --- */ diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_dpb.h b/gst-libs/gst/vaapi/gstvaapidecoder_dpb.h index db43811..3cbaa48 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_dpb.h +++ b/gst-libs/gst/vaapi/gstvaapidecoder_dpb.h @@ -91,21 +91,21 @@ struct _GstVaapiDpbClass { gboolean (*add) (GstVaapiDpb *dpb, GstVaapiPicture *picture); }; +G_GNUC_INTERNAL GType -gst_vaapi_dpb_get_type(void) G_GNUC_CONST - attribute_hidden; +gst_vaapi_dpb_get_type(void) G_GNUC_CONST; +G_GNUC_INTERNAL void -gst_vaapi_dpb_flush(GstVaapiDpb *dpb) - attribute_hidden; +gst_vaapi_dpb_flush(GstVaapiDpb *dpb); +G_GNUC_INTERNAL gboolean -gst_vaapi_dpb_add(GstVaapiDpb *dpb, GstVaapiPicture *picture) - attribute_hidden; +gst_vaapi_dpb_add(GstVaapiDpb *dpb, GstVaapiPicture *picture); +G_GNUC_INTERNAL guint -gst_vaapi_dpb_size(GstVaapiDpb *dpb) - attribute_hidden; +gst_vaapi_dpb_size(GstVaapiDpb *dpb); static inline gpointer gst_vaapi_dpb_ref(gpointer ptr) @@ -170,21 +170,22 @@ struct _GstVaapiDpbMpeg2Class { GstVaapiDpbClass parent_class; }; +G_GNUC_INTERNAL GType -gst_vaapi_dpb_mpeg2_get_type(void) G_GNUC_CONST - attribute_hidden; +gst_vaapi_dpb_mpeg2_get_type(void) G_GNUC_CONST; +G_GNUC_INTERNAL GstVaapiDpb * -gst_vaapi_dpb_mpeg2_new(void) - attribute_hidden; +gst_vaapi_dpb_mpeg2_new(void); +G_GNUC_INTERNAL void gst_vaapi_dpb_mpeg2_get_references( GstVaapiDpb *dpb, GstVaapiPicture *picture, GstVaapiPicture **prev_picture_ptr, GstVaapiPicture **next_picture_ptr -) attribute_hidden; +); G_END_DECLS diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_objects.h b/gst-libs/gst/vaapi/gstvaapidecoder_objects.h index 0e33f07..f7a7ea6 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_objects.h +++ b/gst-libs/gst/vaapi/gstvaapidecoder_objects.h @@ -163,32 +163,33 @@ struct _GstVaapiPictureClass { GstVaapiCodecObjectClass parent_class; }; +G_GNUC_INTERNAL GType -gst_vaapi_picture_get_type(void) G_GNUC_CONST - attribute_hidden; +gst_vaapi_picture_get_type(void) G_GNUC_CONST; +G_GNUC_INTERNAL GstVaapiPicture * gst_vaapi_picture_new( GstVaapiDecoder *decoder, gconstpointer param, guint param_size -) attribute_hidden; +); +G_GNUC_INTERNAL GstVaapiPicture * -gst_vaapi_picture_new_field(GstVaapiPicture *picture) - attribute_hidden; +gst_vaapi_picture_new_field(GstVaapiPicture *picture); +G_GNUC_INTERNAL void -gst_vaapi_picture_add_slice(GstVaapiPicture *picture, GstVaapiSlice *slice) - attribute_hidden; +gst_vaapi_picture_add_slice(GstVaapiPicture *picture, GstVaapiSlice *slice); +G_GNUC_INTERNAL gboolean -gst_vaapi_picture_decode(GstVaapiPicture *picture) - attribute_hidden; +gst_vaapi_picture_decode(GstVaapiPicture *picture); +G_GNUC_INTERNAL gboolean -gst_vaapi_picture_output(GstVaapiPicture *picture) - attribute_hidden; +gst_vaapi_picture_output(GstVaapiPicture *picture); static inline gpointer gst_vaapi_picture_ref(gpointer ptr) @@ -262,10 +263,11 @@ struct _GstVaapiSliceClass { GstVaapiCodecObjectClass parent_class; }; +G_GNUC_INTERNAL GType -gst_vaapi_slice_get_type(void) G_GNUC_CONST - attribute_hidden; +gst_vaapi_slice_get_type(void) G_GNUC_CONST; +G_GNUC_INTERNAL GstVaapiSlice * gst_vaapi_slice_new( GstVaapiDecoder *decoder, @@ -273,7 +275,7 @@ gst_vaapi_slice_new( guint param_size, const guchar *data, guint data_size -) attribute_hidden; +); /* ------------------------------------------------------------------------- */ /* --- Helpers to create codec-dependent objects --- */ diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_priv.h b/gst-libs/gst/vaapi/gstvaapidecoder_priv.h index 6e153e5..66646d3 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_priv.h +++ b/gst-libs/gst/vaapi/gstvaapidecoder_priv.h @@ -128,31 +128,35 @@ struct _GstVaapiDecoderPrivate { guint is_interlaced : 1; }; +G_GNUC_INTERNAL void gst_vaapi_decoder_set_picture_size( GstVaapiDecoder *decoder, guint width, guint height -) attribute_hidden; +); +G_GNUC_INTERNAL void gst_vaapi_decoder_set_framerate( GstVaapiDecoder *decoder, guint fps_n, guint fps_d -) attribute_hidden; +); +G_GNUC_INTERNAL void gst_vaapi_decoder_set_pixel_aspect_ratio( GstVaapiDecoder *decoder, guint par_n, guint par_d -) attribute_hidden; +); +G_GNUC_INTERNAL void -gst_vaapi_decoder_set_interlaced(GstVaapiDecoder *decoder, gboolean interlaced) - attribute_hidden; +gst_vaapi_decoder_set_interlaced(GstVaapiDecoder *decoder, gboolean interlaced); +G_GNUC_INTERNAL gboolean gst_vaapi_decoder_ensure_context( GstVaapiDecoder *decoder, @@ -160,25 +164,27 @@ gst_vaapi_decoder_ensure_context( GstVaapiEntrypoint entrypoint, guint width, guint height -) attribute_hidden; +); +G_GNUC_INTERNAL gboolean gst_vaapi_decoder_push_buffer_sub( GstVaapiDecoder *decoder, GstBuffer *buffer, guint offset, guint size -) attribute_hidden; +); +G_GNUC_INTERNAL void gst_vaapi_decoder_push_surface_proxy( GstVaapiDecoder *decoder, GstVaapiSurfaceProxy *proxy -) attribute_hidden; +); +G_GNUC_INTERNAL GstVaapiDecoderStatus -gst_vaapi_decoder_check_status(GstVaapiDecoder *decoder) - attribute_hidden; +gst_vaapi_decoder_check_status(GstVaapiDecoder *decoder); G_END_DECLS diff --git a/gst-libs/gst/vaapi/gstvaapisurface_priv.h b/gst-libs/gst/vaapi/gstvaapisurface_priv.h index a7eeda9..0817b29 100644 --- a/gst-libs/gst/vaapi/gstvaapisurface_priv.h +++ b/gst-libs/gst/vaapi/gstvaapisurface_priv.h @@ -25,14 +25,15 @@ #include #include +G_GNUC_INTERNAL void gst_vaapi_surface_set_parent_context( GstVaapiSurface *surface, GstVaapiContext *context -) attribute_hidden; +); +G_GNUC_INTERNAL GstVaapiContext * -gst_vaapi_surface_get_parent_context(GstVaapiSurface *surface) - attribute_hidden; +gst_vaapi_surface_get_parent_context(GstVaapiSurface *surface); #endif /* GST_VAAPI_SURFACE_PRIV_H */ diff --git a/gst-libs/gst/vaapi/gstvaapiutils.h b/gst-libs/gst/vaapi/gstvaapiutils.h index cf5fcc3..5c75c8d 100644 --- a/gst-libs/gst/vaapi/gstvaapiutils.h +++ b/gst-libs/gst/vaapi/gstvaapiutils.h @@ -33,21 +33,22 @@ #endif /** Check VA status for success or print out an error */ +G_GNUC_INTERNAL gboolean -vaapi_check_status(VAStatus status, const char *msg) - attribute_hidden; +vaapi_check_status(VAStatus status, const char *msg); /** Maps VA buffer */ +G_GNUC_INTERNAL void * -vaapi_map_buffer(VADisplay dpy, VABufferID buf_id) - attribute_hidden; +vaapi_map_buffer(VADisplay dpy, VABufferID buf_id); /** Unmaps VA buffer */ +G_GNUC_INTERNAL void -vaapi_unmap_buffer(VADisplay dpy, VABufferID buf_id, void **pbuf) - attribute_hidden; +vaapi_unmap_buffer(VADisplay dpy, VABufferID buf_id, void **pbuf); /** Creates and maps VA buffer */ +G_GNUC_INTERNAL gboolean vaapi_create_buffer( VADisplay dpy, @@ -57,27 +58,27 @@ vaapi_create_buffer( gconstpointer data, VABufferID *buf_id, gpointer *mapped_data -) attribute_hidden; +); /** Destroy VA buffer */ +G_GNUC_INTERNAL void -vaapi_destroy_buffer(VADisplay dpy, VABufferID *buf_id) - attribute_hidden; +vaapi_destroy_buffer(VADisplay dpy, VABufferID *buf_id); /** Return a string representation of a VAProfile */ -const char *string_of_VAProfile(VAProfile profile) - attribute_hidden; +G_GNUC_INTERNAL +const char *string_of_VAProfile(VAProfile profile); /** Return a string representation of a VAEntrypoint */ -const char *string_of_VAEntrypoint(VAEntrypoint entrypoint) - attribute_hidden; +G_GNUC_INTERNAL +const char *string_of_VAEntrypoint(VAEntrypoint entrypoint); +G_GNUC_INTERNAL guint -from_GstVaapiSurfaceRenderFlags(guint flags) - attribute_hidden; +from_GstVaapiSurfaceRenderFlags(guint flags); +G_GNUC_INTERNAL guint -to_GstVaapiSurfaceStatus(guint va_flags) - attribute_hidden; +to_GstVaapiSurfaceStatus(guint va_flags); #endif /* GST_VAAPI_UTILS_H */ diff --git a/gst-libs/gst/vaapi/gstvaapiutils_glx.h b/gst-libs/gst/vaapi/gstvaapiutils_glx.h index 80e76f1..c9a4983 100644 --- a/gst-libs/gst/vaapi/gstvaapiutils_glx.h +++ b/gst-libs/gst/vaapi/gstvaapiutils_glx.h @@ -45,33 +45,33 @@ typedef void (*PFNGLXDESTROYPIXMAPPROC)(Display *, GLXPixmap); #define GL_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING_EXT #endif +G_GNUC_INTERNAL const char * -gl_get_error_string(GLenum error) - attribute_hidden; +gl_get_error_string(GLenum error); +G_GNUC_INTERNAL void -gl_purge_errors(void) - attribute_hidden; +gl_purge_errors(void); +G_GNUC_INTERNAL gboolean -gl_check_error(void) - attribute_hidden; +gl_check_error(void); +G_GNUC_INTERNAL gboolean -gl_get_param(GLenum param, guint *pval) - attribute_hidden; +gl_get_param(GLenum param, guint *pval); +G_GNUC_INTERNAL gboolean -gl_get_texture_param(GLenum target, GLenum param, guint *pval) - attribute_hidden; +gl_get_texture_param(GLenum target, GLenum param, guint *pval); +G_GNUC_INTERNAL void -gl_set_bgcolor(guint32 color) - attribute_hidden; +gl_set_bgcolor(guint32 color); +G_GNUC_INTERNAL void -gl_resize(guint width, guint height) - attribute_hidden; +gl_resize(guint width, guint height); typedef struct _GLContextState GLContextState; struct _GLContextState { @@ -82,25 +82,25 @@ struct _GLContextState { guint swapped_buffers : 1; }; +G_GNUC_INTERNAL GLContextState * -gl_create_context(Display *dpy, int screen, GLContextState *parent) - attribute_hidden; +gl_create_context(Display *dpy, int screen, GLContextState *parent); +G_GNUC_INTERNAL void -gl_destroy_context(GLContextState *cs) - attribute_hidden; +gl_destroy_context(GLContextState *cs); +G_GNUC_INTERNAL void -gl_get_current_context(GLContextState *cs) - attribute_hidden; +gl_get_current_context(GLContextState *cs); +G_GNUC_INTERNAL gboolean -gl_set_current_context(GLContextState *new_cs, GLContextState *old_cs) - attribute_hidden; +gl_set_current_context(GLContextState *new_cs, GLContextState *old_cs); +G_GNUC_INTERNAL void -gl_swap_buffers(GLContextState *cs) - attribute_hidden; +gl_swap_buffers(GLContextState *cs); typedef struct _GLTextureState GLTextureState; struct _GLTextureState { @@ -110,17 +110,17 @@ struct _GLTextureState { guint was_bound : 1; }; +G_GNUC_INTERNAL gboolean -gl_bind_texture(GLTextureState *ts, GLenum target, GLuint texture) - attribute_hidden; +gl_bind_texture(GLTextureState *ts, GLenum target, GLuint texture); +G_GNUC_INTERNAL void -gl_unbind_texture(GLTextureState *ts) - attribute_hidden; +gl_unbind_texture(GLTextureState *ts); +G_GNUC_INTERNAL GLuint -gl_create_texture(GLenum target, GLenum format, guint width, guint height) - attribute_hidden; +gl_create_texture(GLenum target, GLenum format, guint width, guint height); typedef struct _GLVTable GLVTable; struct _GLVTable { @@ -152,9 +152,9 @@ struct _GLVTable { guint has_multitexture : 1; }; +G_GNUC_INTERNAL GLVTable * -gl_get_vtable(void) - attribute_hidden; +gl_get_vtable(void); typedef struct _GLPixmapObject GLPixmapObject; struct _GLPixmapObject { @@ -169,21 +169,21 @@ struct _GLPixmapObject { guint is_bound : 1; }; +G_GNUC_INTERNAL GLPixmapObject * -gl_create_pixmap_object(Display *dpy, guint width, guint height) - attribute_hidden; +gl_create_pixmap_object(Display *dpy, guint width, guint height); +G_GNUC_INTERNAL void -gl_destroy_pixmap_object(GLPixmapObject *pixo) - attribute_hidden; +gl_destroy_pixmap_object(GLPixmapObject *pixo); +G_GNUC_INTERNAL gboolean -gl_bind_pixmap_object(GLPixmapObject *pixo) - attribute_hidden; +gl_bind_pixmap_object(GLPixmapObject *pixo); +G_GNUC_INTERNAL gboolean -gl_unbind_pixmap_object(GLPixmapObject *pixo) - attribute_hidden; +gl_unbind_pixmap_object(GLPixmapObject *pixo); typedef struct _GLFramebufferObject GLFramebufferObject; struct _GLFramebufferObject { @@ -194,24 +194,25 @@ struct _GLFramebufferObject { guint is_bound : 1; }; +G_GNUC_INTERNAL GLFramebufferObject * gl_create_framebuffer_object( GLenum target, GLuint texture, guint width, guint height -) attribute_hidden; +); +G_GNUC_INTERNAL void -gl_destroy_framebuffer_object(GLFramebufferObject *fbo) - attribute_hidden; +gl_destroy_framebuffer_object(GLFramebufferObject *fbo); +G_GNUC_INTERNAL gboolean -gl_bind_framebuffer_object(GLFramebufferObject *fbo) - attribute_hidden; +gl_bind_framebuffer_object(GLFramebufferObject *fbo); +G_GNUC_INTERNAL gboolean -gl_unbind_framebuffer_object(GLFramebufferObject *fbo) - attribute_hidden; +gl_unbind_framebuffer_object(GLFramebufferObject *fbo); #endif /* GST_VAAPI_UTILS_GLX_H */ diff --git a/gst-libs/gst/vaapi/gstvaapiutils_x11.h b/gst-libs/gst/vaapi/gstvaapiutils_x11.h index f925087..090b403 100644 --- a/gst-libs/gst/vaapi/gstvaapiutils_x11.h +++ b/gst-libs/gst/vaapi/gstvaapiutils_x11.h @@ -26,16 +26,19 @@ #include #include -void x11_trap_errors(void) - attribute_hidden; +G_GNUC_INTERNAL +void +x11_trap_errors(void); -int x11_untrap_errors(void) - attribute_hidden; +G_GNUC_INTERNAL +int +x11_untrap_errors(void); +G_GNUC_INTERNAL Window -x11_create_window(Display *dpy, guint w, guint h, Visual *vis, Colormap cmap) - attribute_hidden; +x11_create_window(Display *dpy, guint w, guint h, Visual *vis, Colormap cmap); +G_GNUC_INTERNAL gboolean x11_get_geometry( Display *dpy, @@ -44,6 +47,6 @@ x11_get_geometry( gint *py, guint *pwidth, guint *pheight -) attribute_hidden; +); #endif /* GST_VAAPI_UTILS_X11_H */ -- 2.7.4