video: sprinkle some G_GNUC_CONST
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 27 May 2011 22:31:27 +0000 (23:31 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sat, 28 May 2011 11:29:46 +0000 (12:29 +0100)
Mark functions that have no effect besides their return value and
only inspect their input arguments with G_GNUC_CONST. (We just
ignore the g_return_val_if_fail() guards for this)

gst-libs/gst/video/video.h

index 73a8f19..52e0fea 100644 (file)
@@ -494,45 +494,45 @@ GstCaps *      gst_video_format_new_template_caps (GstVideoFormat format);
 
 /* format properties */
 
-GstVideoFormat gst_video_format_from_fourcc (guint32 fourcc);
+GstVideoFormat gst_video_format_from_fourcc (guint32 fourcc) G_GNUC_CONST;
 
-guint32        gst_video_format_to_fourcc (GstVideoFormat format);
+guint32        gst_video_format_to_fourcc (GstVideoFormat format) G_GNUC_CONST;
 
-gboolean       gst_video_format_is_rgb    (GstVideoFormat format);
+gboolean       gst_video_format_is_rgb    (GstVideoFormat format) G_GNUC_CONST;
 
-gboolean       gst_video_format_is_yuv    (GstVideoFormat format);
+gboolean       gst_video_format_is_yuv    (GstVideoFormat format) G_GNUC_CONST;
 
-gboolean       gst_video_format_is_gray   (GstVideoFormat format);
+gboolean       gst_video_format_is_gray   (GstVideoFormat format) G_GNUC_CONST;
 
-gboolean       gst_video_format_has_alpha (GstVideoFormat format);
+gboolean       gst_video_format_has_alpha (GstVideoFormat format) G_GNUC_CONST;
 
 
 int            gst_video_format_get_component_depth  (GstVideoFormat format,
-                                                      int            component);
+                                                      int            component) G_GNUC_CONST;
 
 int            gst_video_format_get_row_stride       (GstVideoFormat format,
                                                       int            component,
-                                                      int            width);
+                                                      int            width) G_GNUC_CONST;
 
 int            gst_video_format_get_pixel_stride     (GstVideoFormat format,
-                                                      int            component);
+                                                      int            component) G_GNUC_CONST;
 
 int            gst_video_format_get_component_width  (GstVideoFormat format,
                                                       int            component,
-                                                      int            width);
+                                                      int            width) G_GNUC_CONST;
 
 int            gst_video_format_get_component_height (GstVideoFormat format,
                                                       int            component,
-                                                      int            height);
+                                                      int            height) G_GNUC_CONST;
 
 int            gst_video_format_get_component_offset (GstVideoFormat format,
                                                       int            component,
                                                       int            width,
-                                                      int            height);
+                                                      int            height) G_GNUC_CONST;
 
 int            gst_video_format_get_size             (GstVideoFormat format,
                                                       int            width,
-                                                      int            height);
+                                                      int            height) G_GNUC_CONST;
 
 gboolean       gst_video_get_size_from_caps (const GstCaps * caps, gint * size);