From dce49a1a7eb7b2ec5afb547fb346727be9c769d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 6 Feb 2013 12:36:19 +0000 Subject: [PATCH] video: fix return type of _get_palette() and add since markers to docs '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 | 6 ++++-- gst-libs/gst/video/video-format.h | 4 ++-- gst/videoconvert/videoconvert.c | 2 +- gst/videotestsrc/gstvideotestsrc.c | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gst-libs/gst/video/video-format.c b/gst-libs/gst/video/video-format.c index d7e4316adf..15b9cc6ff1 100644 --- a/gst-libs/gst/video/video-format.c +++ b/gst-libs/gst/video/video-format.c @@ -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); diff --git a/gst-libs/gst/video/video-format.h b/gst-libs/gst/video/video-format.h index afeda492c7..e5a878f322 100644 --- a/gst-libs/gst/video/video-format.h +++ b/gst-libs/gst/video/video-format.h @@ -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 ]" diff --git a/gst/videoconvert/videoconvert.c b/gst/videoconvert/videoconvert.c index 1136428a8e..1bcd3db213 100644 --- a/gst/videoconvert/videoconvert.c +++ b/gst/videoconvert/videoconvert.c @@ -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; diff --git a/gst/videotestsrc/gstvideotestsrc.c b/gst/videotestsrc/gstvideotestsrc.c index 28f6c31c63..4f2ddd229b 100644 --- a/gst/videotestsrc/gstvideotestsrc.c +++ b/gst/videotestsrc/gstvideotestsrc.c @@ -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);