gst/: A few array const-ifications.

Original commit message from CVS:
* gst/audioconvert/gstaudioconvert.c: (make_lossless_changes),
(gst_audio_convert_transform_caps):
* gst/videotestsrc/videotestsrc.c: (gst_video_test_src_unicolor):
* gst/videotestsrc/videotestsrc.h:
A few array const-ifications.
This commit is contained in:
Tim-Philipp Müller 2006-09-23 15:24:55 +00:00
parent 9181fcfba0
commit f306655319
4 changed files with 15 additions and 7 deletions

View file

@ -1,3 +1,11 @@
2006-09-23 Tim-Philipp Müller <tim at centricular dot net>
* gst/audioconvert/gstaudioconvert.c: (make_lossless_changes),
(gst_audio_convert_transform_caps):
* gst/videotestsrc/videotestsrc.c: (gst_video_test_src_unicolor):
* gst/videotestsrc/videotestsrc.h:
A few array const-ifications.
2006-09-23 Tim-Philipp Müller <tim at centricular dot net>
* tests/check/Makefile.am:

View file

@ -335,8 +335,8 @@ make_lossless_changes (GstStructure * s, gboolean isfloat)
GValue list = { 0 };
GValue val = { 0 };
int i;
gint endian[] = { G_LITTLE_ENDIAN, G_BIG_ENDIAN };
gboolean booleans[] = { TRUE, FALSE };
const gint endian[] = { G_LITTLE_ENDIAN, G_BIG_ENDIAN };
const gboolean booleans[] = { TRUE, FALSE };
g_value_init (&list, GST_TYPE_LIST);
g_value_init (&val, G_TYPE_INT);
@ -424,7 +424,7 @@ gst_audio_convert_transform_caps (GstBaseTransform * base,
GstStructure *s, *structure;
gboolean isfloat;
gint width, depth, channels;
gchar *fields_used[] = {
const gchar *fields_used[] = {
"width", "depth", "rate", "channels", "endianness", "signed"
};
const gchar *structure_name;

View file

@ -204,7 +204,7 @@ enum
COLOR_DARK_GREY
};
static struct vts_color_struct vts_colors[] = {
static const struct vts_color_struct vts_colors[] = {
/* 100% white */
{255, 128, 128, 255, 255, 255},
/* yellow */
@ -380,7 +380,7 @@ struct fourcc_list_struct fourcc_list[] = {
{"RGB ", "xRGB1555", 16, paint_setup_xRGB1555, paint_hline_xRGB1555, 1, 15,
0x00007c00, 0x000003e0, 0x0000001f},
};
int n_fourccs = sizeof (fourcc_list) / sizeof (fourcc_list[0]);
int n_fourccs = G_N_ELEMENTS (fourcc_list);
struct fourcc_list_struct *
paintinfo_find_by_structure (const GstStructure * structure)
@ -692,7 +692,7 @@ gst_video_test_src_snow (GstVideoTestSrc * v, unsigned char *dest, int w, int h)
static void
gst_video_test_src_unicolor (GstVideoTestSrc * v, unsigned char *dest, int w,
int h, struct vts_color_struct *color)
int h, const struct vts_color_struct *color)
{
int i;
paintinfo pi = { NULL, };

View file

@ -41,7 +41,7 @@ struct paintinfo_struct
int vstride;
int width;
int height;
struct vts_color_struct *color;
const struct vts_color_struct *color;
void (*paint_hline) (paintinfo * p, int x, int y, int w);
};