video: fix return type of _get_palette() and add since markers to docs
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 6 Feb 2013 12:36:19 +0000 (12:36 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 6 Feb 2013 12:43:51 +0000 (12:43 +0000)
'const gpointer' is not the same as 'gconstpointer', see
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35928.

gst-libs/gst/video/video-format.c
gst-libs/gst/video/video-format.h
gst/videoconvert/videoconvert.c
gst/videotestsrc/gstvideotestsrc.c

index d7e4316..15b9cc6 100644 (file)
@@ -1032,7 +1032,7 @@ unpack_RGB8P (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
   }
 }
 
-static guint32 std_palette_RGB8P[] = {
+static const guint32 std_palette_RGB8P[] = {
   0xff000000, 0xff000033, 0xff000066, 0xff000099, 0xff0000cc, 0xff0000ff,
   0xff003300, 0xff003333, 0xff003366, 0xff003399, 0xff0033cc, 0xff0033ff,
   0xff006600, 0xff006633, 0xff006666, 0xff006699, 0xff0066cc, 0xff0066ff,
@@ -2328,8 +2328,10 @@ gst_video_format_get_info (GstVideoFormat format)
  *
  * Returns: the default palette of @format or %NULL when @format does not have a
  * palette.
+ *
+ * Since: 1.2
  */
-const gpointer
+gconstpointer
 gst_video_format_get_palette (GstVideoFormat format, gsize * size)
 {
   g_return_val_if_fail (format < G_N_ELEMENTS (formats), NULL);
index afeda49..e5a878f 100644 (file)
@@ -231,7 +231,7 @@ typedef enum
  *   in the least significant bits of the destination.
  * @GST_VIDEO_PACK_FLAG_INTERLACED: The source is interlaced. The unpacked
  *   format will be interlaced as well with each line containing
- *   information from alternating fields.
+ *   information from alternating fields. (Since 1.2)
  *
  * The different flags that can be used when packing and unpacking.
  */
@@ -436,7 +436,7 @@ const gchar *  gst_video_format_to_string            (GstVideoFormat format) G_G
 const GstVideoFormatInfo *
                gst_video_format_get_info             (GstVideoFormat format) G_GNUC_CONST;
 
-const gpointer gst_video_format_get_palette          (GstVideoFormat format, gsize *size);
+gconstpointer  gst_video_format_get_palette          (GstVideoFormat format, gsize *size);
 
 #define GST_VIDEO_SIZE_RANGE "(int) [ 1, max ]"
 #define GST_VIDEO_FPS_RANGE "(fraction) [ 0, max ]"
index 1136428..1bcd3db 100644 (file)
@@ -391,7 +391,7 @@ videoconvert_convert_generic (VideoConvert * convert, GstVideoFrame * dest,
   int i, j;
   gint width, height;
   guint in_bits, out_bits;
-  gpointer pal;
+  gconstpointer pal;
   gsize palsize;
 
   height = convert->height;
index 28f6c31..4f2ddd2 100644 (file)
@@ -817,7 +817,7 @@ gst_video_test_src_fill (GstPushSrc * psrc, GstBuffer * buffer)
   GstVideoTestSrc *src;
   GstClockTime next_time;
   GstVideoFrame frame;
-  gpointer pal;
+  gconstpointer pal;
   gsize palsize;
 
   src = GST_VIDEO_TEST_SRC (psrc);