diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-08-08 08:17:15 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-08-08 08:26:08 +0100 |
commit | afea9ba0790a951c6a00b57d0d71876dd1ce98c3 (patch) | |
tree | 5d403f9fa7bf9d7bd84cfa4944d946f37009adea /src/sna/sna_video_sprite.c | |
parent | 6f69188cb2959abfb2fcd3f81cd4146aa3876bb5 (diff) |
Prepare for spurious Xv ABI changes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_video_sprite.c')
-rw-r--r-- | src/sna/sna_video_sprite.c | 51 |
1 files changed, 14 insertions, 37 deletions
diff --git a/src/sna/sna_video_sprite.c b/src/sna/sna_video_sprite.c index 80fa43f9..92230f97 100644 --- a/src/sna/sna_video_sprite.c +++ b/src/sna/sna_video_sprite.c @@ -74,9 +74,7 @@ static const XvAttributeRec attribs[] = { { XvSettable | XvGettable, 0, 1, (char *)"XV_ALWAYS_ON_TOP" }, }; -static int sna_video_sprite_stop(ClientPtr client, - XvPortPtr port, - DrawablePtr draw) +static int sna_video_sprite_stop(ddStopVideo_ARGS) { struct sna_video *video = port->devPriv.ptr; struct local_mode_set_plane s; @@ -110,10 +108,7 @@ static int sna_video_sprite_stop(ClientPtr client, return Success; } -static int sna_video_sprite_set_attr(ClientPtr client, - XvPortPtr port, - Atom attribute, - INT32 value) +static int sna_video_sprite_set_attr(ddSetPortAttribute_ARGS) { struct sna_video *video = port->devPriv.ptr; @@ -137,10 +132,7 @@ static int sna_video_sprite_set_attr(ClientPtr client, return Success; } -static int sna_video_sprite_get_attr(ClientPtr client, - XvPortPtr port, - Atom attribute, - INT32 *value) +static int sna_video_sprite_get_attr(ddGetPortAttribute_ARGS) { struct sna_video *video = port->devPriv.ptr; @@ -156,13 +148,7 @@ static int sna_video_sprite_get_attr(ClientPtr client, return Success; } -static int sna_video_sprite_best_size(ClientPtr client, - XvPortPtr port, - CARD8 motion, - CARD16 vid_w, CARD16 vid_h, - CARD16 drw_w, CARD16 drw_h, - unsigned int *p_w, - unsigned int *p_h) +static int sna_video_sprite_best_size(ddQueryBestSize_ARGS) { struct sna_video *video = port->devPriv.ptr; struct sna *sna = video->sna; @@ -382,18 +368,7 @@ sna_video_sprite_show(struct sna *sna, return true; } -static int sna_video_sprite_put_image(ClientPtr client, - DrawablePtr draw, - XvPortPtr port, - GCPtr gc, - INT16 src_x, INT16 src_y, - CARD16 src_w, CARD16 src_h, - INT16 drw_x, INT16 drw_y, - CARD16 drw_w, CARD16 drw_h, - XvImagePtr format, - unsigned char *buf, - Bool sync, - CARD16 width, CARD16 height) +static int sna_video_sprite_put_image(ddPutImage_ARGS) { struct sna_video *video = port->devPriv.ptr; struct sna *sna = video->sna; @@ -565,17 +540,15 @@ off: return Success; err: +#if XORG_XV_VERSION < 2 (void)sna_video_sprite_stop(client, port, draw); +#else + (void)sna_video_sprite_stop(port, draw); +#endif return ret; } -static int sna_video_sprite_query(ClientPtr client, - XvPortPtr port, - XvImagePtr format, - unsigned short *w, - unsigned short *h, - int *pitches, - int *offsets) +static int sna_video_sprite_query(ddQueryImageAttributes_ARGS) { struct sna_video *video = port->devPriv.ptr; struct sna_video_frame frame; @@ -698,8 +671,10 @@ void sna_video_sprite_setup(struct sna *sna, ScreenPtr screen) if (sna->kgem.gen == 071) adaptor->nImages = 4; +#if XORG_XV_VERSION < 2 adaptor->ddAllocatePort = sna_xv_alloc_port; adaptor->ddFreePort = sna_xv_free_port; +#endif adaptor->ddPutVideo = NULL; adaptor->ddPutStill = NULL; adaptor->ddGetVideo = NULL; @@ -745,4 +720,6 @@ void sna_video_sprite_setup(struct sna *sna, ScreenPtr screen) xvColorKey = MAKE_ATOM("XV_COLORKEY"); xvAlwaysOnTop = MAKE_ATOM("XV_ALWAYS_ON_TOP"); xvSyncToVblank = MAKE_ATOM("XV_SYNC_TO_VBLANK"); + + DBG(("%s: '%s' initialized %d ports\n", __FUNCTION__, adaptor->name, adaptor->nPorts)); } |