summaryrefslogtreecommitdiff
path: root/src/sna/sna_video_textured.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-11-13 13:13:03 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-11-13 13:13:03 +0000
commitcac335b979a95e31e201f9766d19d737361e09b2 (patch)
treed967a82132e9a3b80b9593999ba50fe2e17196f5 /src/sna/sna_video_textured.c
parente592eb93dbd7df177993986f01ba6f65c4e20d4a (diff)
sna/video: Constify a couple of attribute arrays
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_video_textured.c')
-rw-r--r--src/sna/sna_video_textured.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/sna/sna_video_textured.c b/src/sna/sna_video_textured.c
index 88a73689..55c78c96 100644
--- a/src/sna/sna_video_textured.c
+++ b/src/sna/sna_video_textured.c
@@ -49,14 +49,13 @@
static Atom xvBrightness, xvContrast, xvSyncToVblank;
#define NUM_FORMATS 3
-
-static XF86VideoFormatRec Formats[NUM_FORMATS] = {
+static const XF86VideoFormatRec Formats[NUM_FORMATS] = {
{15, TrueColor}, {16, TrueColor}, {24, TrueColor}
};
//#define NUM_TEXTURED_ATTRIBUTES 3
#define NUM_TEXTURED_ATTRIBUTES 1
-static XF86AttributeRec TexturedAttributes[] = {
+static const XF86AttributeRec TexturedAttributes[] = {
{XvSettable | XvGettable, -1, 1, "XV_SYNC_TO_VBLANK"},
{XvSettable | XvGettable, -128, 127, "XV_BRIGHTNESS"},
{XvSettable | XvGettable, 0, 255, "XV_CONTRAST"},
@@ -70,7 +69,7 @@ static XF86AttributeRec TexturedAttributes[] = {
#define XVMC_IMAGE 0
#endif
-static XF86ImageRec Images[NUM_IMAGES] = {
+static const XF86ImageRec Images[NUM_IMAGES] = {
XVIMAGE_YUY2,
XVIMAGE_YV12,
XVIMAGE_I420,
@@ -406,7 +405,7 @@ XF86VideoAdaptorPtr sna_video_textured_setup(struct sna *sna,
adaptor->pEncodings[0].rate.numerator = 1;
adaptor->pEncodings[0].rate.denominator = 1;
adaptor->nFormats = NUM_FORMATS;
- adaptor->pFormats = Formats;
+ adaptor->pFormats = (XF86VideoFormatPtr)Formats;
adaptor->nPorts = nports;
adaptor->pPortPrivates = devUnions;
adaptor->nAttributes = NUM_TEXTURED_ATTRIBUTES;
@@ -414,7 +413,7 @@ XF86VideoAdaptorPtr sna_video_textured_setup(struct sna *sna,
memcpy(attrs, TexturedAttributes,
NUM_TEXTURED_ATTRIBUTES * sizeof(XF86AttributeRec));
adaptor->nImages = NUM_IMAGES;
- adaptor->pImages = Images;
+ adaptor->pImages = (XF86ImagePtr)Images;
adaptor->PutVideo = NULL;
adaptor->PutStill = NULL;
adaptor->GetVideo = NULL;