diff options
author | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2012-07-19 17:55:00 +0200 |
---|---|---|
committer | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2012-07-19 17:55:00 +0200 |
commit | b06a921d6b648da838f72279a24a657f27b93abf (patch) | |
tree | 4c1f46e96a511940e4600904722a9d729fc38a8f | |
parent | abea4b37577399db2a5d1b1c152bc234e4244163 (diff) | |
download | gstreamer-vaapi-b06a921d6b648da838f72279a24a657f27b93abf.tar.gz |
Use standard G_GNUC_INTERNAL keyword instead of attribute_hidden.
-rw-r--r-- | configure.ac | 30 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapicodec_objects.h | 25 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapidecoder_dpb.h | 27 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapidecoder_objects.h | 30 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapidecoder_priv.h | 26 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapisurface_priv.h | 7 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapiutils.h | 35 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapiutils_glx.h | 95 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapiutils_x11.h | 17 |
9 files changed, 142 insertions, 150 deletions
diff --git a/configure.ac b/configure.ac index 14ffc202..0bcbc1bd 100644 --- a/configure.ac +++ b/configure.ac @@ -11,8 +11,8 @@ m4_append([gst_vaapi_version], gst_vaapi_pre_version, [.pre]) # glib version number m4_define([glib_major_version], [2]) -m4_define([glib_minor_version], [4]) -m4_define([glib_micro_version], [0]) +m4_define([glib_minor_version], [5]) +m4_define([glib_micro_version], [2]) m4_define([glib_major_minor_version], [glib_major_version.glib_minor_version]) m4_define([glib_version], @@ -123,32 +123,6 @@ AC_ARG_ENABLE(codecparsers, [enable adhoc bitstream parsers from GStreamer @<:@default=yes@:>@]), [], [enable_codecparsers="yes"]) -dnl Check for __attribute__((visibility())) -AC_CACHE_CHECK([whether __attribute__((visibility())) is supported], - vaapi_cv_visibility_attribute, - [cat > conftest.c <<EOF -int foo __attribute__ ((visibility ("hidden"))) = 1; -int bar __attribute__ ((visibility ("protected"))) = 1; -EOF - vaapi_cv_visibility_attribute=no - if ${CC-cc} -Werror -S conftest.c -o conftest.s >/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 236088f1..77adc3a9 100644 --- a/gst-libs/gst/vaapi/gstvaapicodec_objects.h +++ b/gst-libs/gst/vaapi/gstvaapicodec_objects.h @@ -107,10 +107,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, @@ -119,13 +120,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 --- */ @@ -182,16 +184,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 --- */ @@ -248,13 +251,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); /* ------------------------------------------------------------------------- */ /* --- 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 db43811e..3cbaa48e 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 ebc80df9..571d2138 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_objects.h +++ b/gst-libs/gst/vaapi/gstvaapidecoder_objects.h @@ -162,32 +162,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) @@ -261,10 +262,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, @@ -272,7 +274,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 6e153e59..66646d3d 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 a7eeda91..0817b291 100644 --- a/gst-libs/gst/vaapi/gstvaapisurface_priv.h +++ b/gst-libs/gst/vaapi/gstvaapisurface_priv.h @@ -25,14 +25,15 @@ #include <gst/vaapi/gstvaapicontext.h> #include <gst/vaapi/gstvaapisurface.h> +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 cf5fcc32..5c75c8d7 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 80e76f1d..c9a49833 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 f9250878..090b4037 100644 --- a/gst-libs/gst/vaapi/gstvaapiutils_x11.h +++ b/gst-libs/gst/vaapi/gstvaapiutils_x11.h @@ -26,16 +26,19 @@ #include <X11/Xlib.h> #include <glib.h> -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 */ |