libs: declare _get_type() functions as const.
authorJavier Jardón <jjardon@gnome.org>
Fri, 29 Jun 2012 06:19:51 +0000 (15:19 +0900)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 19 Jul 2012 13:19:17 +0000 (15:19 +0200)
Declaring a function as const enables better optimization of calls
to the function.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
32 files changed:
gst-libs/gst/vaapi/gstvaapicodec_objects.h
gst-libs/gst/vaapi/gstvaapicontext.h
gst-libs/gst/vaapi/gstvaapidecoder.h
gst-libs/gst/vaapi/gstvaapidecoder_dpb.h
gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.h
gst-libs/gst/vaapi/gstvaapidecoder_h264.h
gst-libs/gst/vaapi/gstvaapidecoder_jpeg.h
gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.h
gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.h
gst-libs/gst/vaapi/gstvaapidecoder_objects.h
gst-libs/gst/vaapi/gstvaapidecoder_vc1.h
gst-libs/gst/vaapi/gstvaapidisplay.h
gst-libs/gst/vaapi/gstvaapidisplay_glx.h
gst-libs/gst/vaapi/gstvaapidisplay_x11.h
gst-libs/gst/vaapi/gstvaapiimage.h
gst-libs/gst/vaapi/gstvaapiimagepool.h
gst-libs/gst/vaapi/gstvaapiobject.h
gst-libs/gst/vaapi/gstvaapiparamspecs.h
gst-libs/gst/vaapi/gstvaapisubpicture.h
gst-libs/gst/vaapi/gstvaapisurface.h
gst-libs/gst/vaapi/gstvaapisurfacepool.h
gst-libs/gst/vaapi/gstvaapisurfaceproxy.h
gst-libs/gst/vaapi/gstvaapitexture.h
gst-libs/gst/vaapi/gstvaapivalue.h
gst-libs/gst/vaapi/gstvaapivideobuffer.h
gst-libs/gst/vaapi/gstvaapivideobuffer_glx.h
gst-libs/gst/vaapi/gstvaapivideoconverter_glx.h
gst-libs/gst/vaapi/gstvaapivideopool.h
gst-libs/gst/vaapi/gstvaapivideosink.h
gst-libs/gst/vaapi/gstvaapiwindow.h
gst-libs/gst/vaapi/gstvaapiwindow_glx.h
gst-libs/gst/vaapi/gstvaapiwindow_x11.h

index 8fb0c15..f1e846d 100644 (file)
@@ -110,7 +110,7 @@ struct _GstVaapiCodecObjectClass {
 };
 
 GType
-gst_vaapi_codec_object_get_type(void)
+gst_vaapi_codec_object_get_type(void) G_GNUC_CONST
     attribute_hidden;
 
 GstVaapiCodecObject *
@@ -185,7 +185,7 @@ struct _GstVaapiIqMatrixClass {
 };
 
 GType
-gst_vaapi_iq_matrix_get_type(void)
+gst_vaapi_iq_matrix_get_type(void) G_GNUC_CONST
     attribute_hidden;
 
 GstVaapiIqMatrix *
@@ -251,7 +251,7 @@ struct _GstVaapiBitPlaneClass {
 };
 
 GType
-gst_vaapi_bitplane_get_type(void)
+gst_vaapi_bitplane_get_type(void) G_GNUC_CONST
     attribute_hidden;
 
 GstVaapiBitPlane *
@@ -314,7 +314,7 @@ struct _GstVaapiHuffmanTableClass {
 };
 
 GType
-gst_vaapi_huffman_table_get_type(void)
+gst_vaapi_huffman_table_get_type(void) G_GNUC_CONST
     attribute_hidden;
 
 GstVaapiHuffmanTable *
index 78f9b28..1187c40 100644 (file)
@@ -82,7 +82,7 @@ struct _GstVaapiContextClass {
 };
 
 GType
-gst_vaapi_context_get_type(void);
+gst_vaapi_context_get_type(void) G_GNUC_CONST;
 
 GstVaapiContext *
 gst_vaapi_context_new(
index 910dfc5..f365b93 100644 (file)
@@ -115,7 +115,7 @@ struct _GstVaapiDecoderClass {
 };
 
 GType
-gst_vaapi_decoder_get_type(void);
+gst_vaapi_decoder_get_type(void) G_GNUC_CONST;
 
 GstCaps *
 gst_vaapi_decoder_get_caps(GstVaapiDecoder *decoder);
index 1a199b8..db43811 100644 (file)
@@ -92,7 +92,7 @@ struct _GstVaapiDpbClass {
 };
 
 GType
-gst_vaapi_dpb_get_type(void)
+gst_vaapi_dpb_get_type(void) G_GNUC_CONST
     attribute_hidden;
 
 void
@@ -171,7 +171,7 @@ struct _GstVaapiDpbMpeg2Class {
 };
 
 GType
-gst_vaapi_dpb_mpeg2_get_type(void)
+gst_vaapi_dpb_mpeg2_get_type(void) G_GNUC_CONST
     attribute_hidden;
 
 GstVaapiDpb *
index 746d16d..01e667f 100644 (file)
@@ -77,7 +77,7 @@ struct _GstVaapiDecoderFfmpegClass {
 };
 
 GType
-gst_vaapi_decoder_ffmpeg_get_type(void);
+gst_vaapi_decoder_ffmpeg_get_type(void) G_GNUC_CONST;
 
 GstVaapiDecoder *
 gst_vaapi_decoder_ffmpeg_new(GstVaapiDisplay *display, GstCaps *caps);
index 5ba4776..79a08f1 100644 (file)
@@ -77,7 +77,7 @@ struct _GstVaapiDecoderH264Class {
 };
 
 GType
-gst_vaapi_decoder_h264_get_type(void);
+gst_vaapi_decoder_h264_get_type(void) G_GNUC_CONST;
 
 GstVaapiDecoder *
 gst_vaapi_decoder_h264_new(GstVaapiDisplay *display, GstCaps *caps);
index 68dab50..cd3b975 100644 (file)
@@ -77,7 +77,7 @@ struct _GstVaapiDecoderJpegClass {
 };
 
 GType
-gst_vaapi_decoder_jpeg_get_type(void);
+gst_vaapi_decoder_jpeg_get_type(void) G_GNUC_CONST;
 
 GstVaapiDecoder *
 gst_vaapi_decoder_jpeg_new(GstVaapiDisplay *display, GstCaps *caps);
index 9836833..e438c39 100644 (file)
@@ -78,7 +78,7 @@ struct _GstVaapiDecoderMpeg2Class {
 };
 
 GType
-gst_vaapi_decoder_mpeg2_get_type(void);
+gst_vaapi_decoder_mpeg2_get_type(void) G_GNUC_CONST;
 
 GstVaapiDecoder *
 gst_vaapi_decoder_mpeg2_new(GstVaapiDisplay *display, GstCaps *caps);
index 753c60d..4c877bb 100644 (file)
@@ -78,7 +78,7 @@ struct _GstVaapiDecoderMpeg4Class {
 };
 
 GType
-gst_vaapi_decoder_mpeg4_get_type(void);
+gst_vaapi_decoder_mpeg4_get_type(void) G_GNUC_CONST;
 
 GstVaapiDecoder *
 gst_vaapi_decoder_mpeg4_new(GstVaapiDisplay *display, GstCaps *caps);
index 56a6fde..0e33f07 100644 (file)
@@ -164,7 +164,7 @@ struct _GstVaapiPictureClass {
 };
 
 GType
-gst_vaapi_picture_get_type(void)
+gst_vaapi_picture_get_type(void) G_GNUC_CONST
     attribute_hidden;
 
 GstVaapiPicture *
@@ -263,7 +263,7 @@ struct _GstVaapiSliceClass {
 };
 
 GType
-gst_vaapi_slice_get_type(void)
+gst_vaapi_slice_get_type(void) G_GNUC_CONST
     attribute_hidden;
 
 GstVaapiSlice *
index f443a49..1bed606 100644 (file)
@@ -78,7 +78,7 @@ struct _GstVaapiDecoderVC1Class {
 };
 
 GType
-gst_vaapi_decoder_vc1_get_type(void);
+gst_vaapi_decoder_vc1_get_type(void) G_GNUC_CONST;
 
 GstVaapiDecoder *
 gst_vaapi_decoder_vc1_new(GstVaapiDisplay *display, GstCaps *caps);
index 33d7a23..7be56ca 100644 (file)
@@ -122,7 +122,7 @@ struct _GstVaapiDisplayClass {
 };
 
 GType
-gst_vaapi_display_get_type(void);
+gst_vaapi_display_get_type(void) G_GNUC_CONST;
 
 GstVaapiDisplay *
 gst_vaapi_display_new_with_display(VADisplay va_display);
index b7135a6..6f115e5 100644 (file)
@@ -77,7 +77,7 @@ struct _GstVaapiDisplayGLXClass {
 };
 
 GType
-gst_vaapi_display_glx_get_type(void);
+gst_vaapi_display_glx_get_type(void) G_GNUC_CONST;
 
 GstVaapiDisplay *
 gst_vaapi_display_glx_new(const gchar *display_name);
index ab6d0ec..a651dd6 100644 (file)
@@ -84,7 +84,7 @@ struct _GstVaapiDisplayX11Class {
 };
 
 GType
-gst_vaapi_display_x11_get_type(void);
+gst_vaapi_display_x11_get_type(void) G_GNUC_CONST;
 
 GstVaapiDisplay *
 gst_vaapi_display_x11_new(const gchar *display_name);
index 3178b68..d0c3cf3 100644 (file)
@@ -121,7 +121,7 @@ struct _GstVaapiImageRaw {
 };
 
 GType
-gst_vaapi_image_get_type(void);
+gst_vaapi_image_get_type(void) G_GNUC_CONST;
 
 GstVaapiImage *
 gst_vaapi_image_new(
index 139a850..2478c47 100644 (file)
@@ -78,7 +78,7 @@ struct _GstVaapiImagePoolClass {
 };
 
 GType
-gst_vaapi_image_pool_get_type(void);
+gst_vaapi_image_pool_get_type(void) G_GNUC_CONST;
 
 GstVaapiVideoPool *
 gst_vaapi_image_pool_new(GstVaapiDisplay *display, GstCaps *caps);
index fbb4aef..913cac8 100644 (file)
@@ -82,7 +82,7 @@ struct _GstVaapiObjectClass {
 };
 
 GType
-gst_vaapi_object_get_type(void);
+gst_vaapi_object_get_type(void) G_GNUC_CONST;
 
 GstVaapiDisplay *
 gst_vaapi_object_get_display(GstVaapiObject *object);
index b22416e..5b20149 100644 (file)
@@ -55,7 +55,7 @@ struct _GstVaapiParamSpecID {
                                 GstVaapiParamSpecID))
 
 GType
-gst_vaapi_param_spec_id_get_type(void);
+gst_vaapi_param_spec_id_get_type(void) G_GNUC_CONST;
 
 GParamSpec *
 gst_vaapi_param_spec_id(
index 7a0dd96..e7a6dbf 100644 (file)
@@ -81,7 +81,7 @@ struct _GstVaapiSubpictureClass {
 };
 
 GType
-gst_vaapi_subpicture_get_type(void);
+gst_vaapi_subpicture_get_type(void) G_GNUC_CONST;
 
 GstVaapiSubpicture *
 gst_vaapi_subpicture_new(GstVaapiImage *image);
index 9057290..9f51caa 100644 (file)
@@ -168,7 +168,7 @@ struct _GstVaapiSurfaceClass {
 };
 
 GType
-gst_vaapi_surface_get_type(void);
+gst_vaapi_surface_get_type(void) G_GNUC_CONST;
 
 GstVaapiSurface *
 gst_vaapi_surface_new(
index 1a7c30a..2bb661c 100644 (file)
@@ -78,7 +78,7 @@ struct _GstVaapiSurfacePoolClass {
 };
 
 GType
-gst_vaapi_surface_pool_get_type(void);
+gst_vaapi_surface_pool_get_type(void) G_GNUC_CONST;
 
 GstVaapiVideoPool *
 gst_vaapi_surface_pool_new(GstVaapiDisplay *display, GstCaps *caps);
index b32458c..35e38f7 100644 (file)
@@ -117,7 +117,7 @@ struct _GstVaapiSurfaceProxyClass {
 };
 
 GType
-gst_vaapi_surface_proxy_get_type(void);
+gst_vaapi_surface_proxy_get_type(void) G_GNUC_CONST;
 
 GstVaapiSurfaceProxy *
 gst_vaapi_surface_proxy_new(GstVaapiContext *context, GstVaapiSurface *surface);
index 1b67a5b..4f8f3ce 100644 (file)
@@ -81,7 +81,7 @@ struct _GstVaapiTextureClass {
 };
 
 GType
-gst_vaapi_texture_get_type(void);
+gst_vaapi_texture_get_type(void) G_GNUC_CONST;
 
 GstVaapiTexture *
 gst_vaapi_texture_new(
index a3834d2..a5a52be 100644 (file)
@@ -45,7 +45,7 @@ G_BEGIN_DECLS
 #define GST_VAAPI_VALUE_HOLDS_ID(x) (G_VALUE_HOLDS((x), GST_VAAPI_TYPE_ID))
 
 GType
-gst_vaapi_id_get_type(void);
+gst_vaapi_id_get_type(void) G_GNUC_CONST;
 
 GstVaapiID
 gst_vaapi_value_get_id(const GValue *value);
index 520191c..04c5ba4 100644 (file)
@@ -83,7 +83,7 @@ struct _GstVaapiVideoBufferClass {
 };
 
 GType
-gst_vaapi_video_buffer_get_type(void);
+gst_vaapi_video_buffer_get_type(void) G_GNUC_CONST;
 
 GstBuffer *
 gst_vaapi_video_buffer_new(GstVaapiDisplay *display);
index 48bf084..af0a05c 100644 (file)
@@ -78,7 +78,7 @@ struct _GstVaapiVideoBufferGLXClass {
     GstVaapiVideoBufferClass parent_class;
 };
 
-GType      gst_vaapi_video_buffer_glx_get_type        (void);
+GType      gst_vaapi_video_buffer_glx_get_type        (void) G_GNUC_CONST;
 GstBuffer *gst_vaapi_video_buffer_glx_new             (GstVaapiDisplayGLX * display);
 GstBuffer *gst_vaapi_video_buffer_glx_new_from_pool   (GstVaapiVideoPool * pool);
 GstBuffer *gst_vaapi_video_buffer_glx_new_from_buffer (GstBuffer * buffer);
index 012bb13..0215444 100644 (file)
@@ -61,7 +61,7 @@ struct _GstVaapiVideoConverterGLXClass {
     GObjectClass parent_class;
 };
 
-GType                 gst_vaapi_video_converter_glx_get_type (void);
+GType                 gst_vaapi_video_converter_glx_get_type (void) G_GNUC_CONST;
 
 GstSurfaceConverter  *gst_vaapi_video_converter_glx_new      (GstSurfaceBuffer *buffer,
                                                               const gchar      *type,
index 1226617..f2fdb5e 100644 (file)
@@ -86,7 +86,7 @@ struct _GstVaapiVideoPoolClass {
 };
 
 GType
-gst_vaapi_video_pool_get_type(void);
+gst_vaapi_video_pool_get_type(void) G_GNUC_CONST;
 
 GstVaapiDisplay *
 gst_vaapi_video_pool_get_display(GstVaapiVideoPool *pool);
index e9a17b4..f33ba49 100644 (file)
@@ -61,7 +61,7 @@ struct _GstVaapiVideoSinkInterface {
 };
 
 GType
-gst_vaapi_video_sink_get_type(void);
+gst_vaapi_video_sink_get_type(void) G_GNUC_CONST;
 
 GstVaapiDisplay *
 gst_vaapi_video_sink_get_display(GstVaapiVideoSink *sink);
index f5b6ee0..5fdaf81 100644 (file)
@@ -104,7 +104,7 @@ struct _GstVaapiWindowClass {
 };
 
 GType
-gst_vaapi_window_get_type(void);
+gst_vaapi_window_get_type(void) G_GNUC_CONST;
 
 GstVaapiDisplay *
 gst_vaapi_window_get_display(GstVaapiWindow *window);
index 96b7f4e..5547355 100644 (file)
@@ -80,7 +80,7 @@ struct _GstVaapiWindowGLXClass {
 };
 
 GType
-gst_vaapi_window_glx_get_type(void);
+gst_vaapi_window_glx_get_type(void) G_GNUC_CONST;
 
 GstVaapiWindow *
 gst_vaapi_window_glx_new(GstVaapiDisplay *display, guint width, guint height);
index 9488703..f1f22d4 100644 (file)
@@ -95,7 +95,7 @@ struct _GstVaapiWindowX11Class {
 };
 
 GType
-gst_vaapi_window_x11_get_type(void);
+gst_vaapi_window_x11_get_type(void) G_GNUC_CONST;
 
 GstVaapiWindow *
 gst_vaapi_window_x11_new(GstVaapiDisplay *display, guint width, guint height);