2 #ifdef HAVE_DIX_CONFIG_H
3 #include <dix-config.h>
9 #include <X11/Xproto.h>
12 #include "dixstruct.h"
14 #include "scrnintstr.h"
15 #include "extnsionst.h"
18 #include <X11/Xfuncproto.h>
20 #include <X11/extensions/XvMC.h>
21 #include <X11/extensions/Xvproto.h>
22 #include <X11/extensions/XvMCproto.h>
24 #include "protocol-versions.h"
28 #include <sys/types.h>
30 #endif /* HAS_XVMCSHM */
32 #define DR_CLIENT_DRIVER_NAME_SIZE 48
33 #define DR_BUSID_SIZE 48
35 static DevPrivateKeyRec XvMCScreenKeyRec
;
37 #define XvMCScreenKey (&XvMCScreenKeyRec)
38 static Bool XvMCInUse
;
43 static RESTYPE XvMCRTContext
;
44 static RESTYPE XvMCRTSurface
;
45 static RESTYPE XvMCRTSubpicture
;
47 int (*XvMCScreenInitProc
)(ScreenPtr
, int, XvMCAdaptorPtr
) = NULL
;
51 XvMCAdaptorPtr adaptors
;
52 CloseScreenProcPtr CloseScreen
;
53 char clientDriverName
[DR_CLIENT_DRIVER_NAME_SIZE
];
54 char busID
[DR_BUSID_SIZE
];
58 } XvMCScreenRec
, *XvMCScreenPtr
;
60 #define XVMC_GET_PRIVATE(pScreen) \
61 (XvMCScreenPtr)(dixLookupPrivate(&(pScreen)->devPrivates, XvMCScreenKey))
64 XvMCDestroyContextRes(pointer data
, XID id
)
66 XvMCContextPtr pContext
= (XvMCContextPtr
) data
;
70 if (!pContext
->refcnt
) {
71 XvMCScreenPtr pScreenPriv
= XVMC_GET_PRIVATE(pContext
->pScreen
);
73 (*pScreenPriv
->adaptors
[pContext
->adapt_num
].DestroyContext
) (pContext
);
81 XvMCDestroySurfaceRes(pointer data
, XID id
)
83 XvMCSurfacePtr pSurface
= (XvMCSurfacePtr
) data
;
84 XvMCContextPtr pContext
= pSurface
->context
;
85 XvMCScreenPtr pScreenPriv
= XVMC_GET_PRIVATE(pContext
->pScreen
);
87 (*pScreenPriv
->adaptors
[pContext
->adapt_num
].DestroySurface
) (pSurface
);
90 XvMCDestroyContextRes((pointer
) pContext
, pContext
->context_id
);
96 XvMCDestroySubpictureRes(pointer data
, XID id
)
98 XvMCSubpicturePtr pSubpict
= (XvMCSubpicturePtr
) data
;
99 XvMCContextPtr pContext
= pSubpict
->context
;
100 XvMCScreenPtr pScreenPriv
= XVMC_GET_PRIVATE(pContext
->pScreen
);
102 (*pScreenPriv
->adaptors
[pContext
->adapt_num
].DestroySubpicture
) (pSubpict
);
105 XvMCDestroyContextRes((pointer
) pContext
, pContext
->context_id
);
111 ProcXvMCQueryVersion(ClientPtr client
)
113 xvmcQueryVersionReply rep
= {
115 .sequenceNumber
= client
->sequence
,
117 .major
= SERVER_XVMC_MAJOR_VERSION
,
118 .minor
= SERVER_XVMC_MINOR_VERSION
121 /* REQUEST(xvmcQueryVersionReq); */
122 REQUEST_SIZE_MATCH(xvmcQueryVersionReq
);
124 WriteToClient(client
, sizeof(xvmcQueryVersionReply
), &rep
);
129 ProcXvMCListSurfaceTypes(ClientPtr client
)
133 XvMCScreenPtr pScreenPriv
;
134 xvmcListSurfaceTypesReply rep
;
135 xvmcSurfaceInfo info
;
136 XvMCAdaptorPtr adaptor
= NULL
;
137 XvMCSurfaceInfoPtr surface
;
140 REQUEST(xvmcListSurfaceTypesReq
);
141 REQUEST_SIZE_MATCH(xvmcListSurfaceTypesReq
);
143 VALIDATE_XV_PORT(stuff
->port
, pPort
, DixReadAccess
);
145 if (XvMCInUse
) { /* any adaptors at all */
146 ScreenPtr pScreen
= pPort
->pAdaptor
->pScreen
;
148 if ((pScreenPriv
= XVMC_GET_PRIVATE(pScreen
))) { /* any this screen */
149 for (i
= 0; i
< pScreenPriv
->num_adaptors
; i
++) {
150 if (pPort
->pAdaptor
== pScreenPriv
->adaptors
[i
].xv_adaptor
) {
151 adaptor
= &(pScreenPriv
->adaptors
[i
]);
158 num_surfaces
= (adaptor
) ? adaptor
->num_surfaces
: 0;
159 rep
= (xvmcListSurfaceTypesReply
) {
161 .sequenceNumber
= client
->sequence
,
163 .length
= bytes_to_int32(num_surfaces
* sizeof(xvmcSurfaceInfo
)),
166 WriteToClient(client
, sizeof(xvmcListSurfaceTypesReply
), &rep
);
168 for (i
= 0; i
< num_surfaces
; i
++) {
169 surface
= adaptor
->surfaces
[i
];
170 info
.surface_type_id
= surface
->surface_type_id
;
171 info
.chroma_format
= surface
->chroma_format
;
172 info
.max_width
= surface
->max_width
;
173 info
.max_height
= surface
->max_height
;
174 info
.subpicture_max_width
= surface
->subpicture_max_width
;
175 info
.subpicture_max_height
= surface
->subpicture_max_height
;
176 info
.mc_type
= surface
->mc_type
;
177 info
.flags
= surface
->flags
;
178 WriteToClient(client
, sizeof(xvmcSurfaceInfo
), &info
);
185 ProcXvMCCreateContext(ClientPtr client
)
190 int i
, result
, adapt_num
= -1;
192 XvMCContextPtr pContext
;
193 XvMCScreenPtr pScreenPriv
;
194 XvMCAdaptorPtr adaptor
= NULL
;
195 XvMCSurfaceInfoPtr surface
= NULL
;
196 xvmcCreateContextReply rep
;
198 REQUEST(xvmcCreateContextReq
);
199 REQUEST_SIZE_MATCH(xvmcCreateContextReq
);
201 VALIDATE_XV_PORT(stuff
->port
, pPort
, DixReadAccess
);
203 pScreen
= pPort
->pAdaptor
->pScreen
;
205 if (!XvMCInUse
) /* no XvMC adaptors */
208 if (!(pScreenPriv
= XVMC_GET_PRIVATE(pScreen
))) /* none this screen */
211 for (i
= 0; i
< pScreenPriv
->num_adaptors
; i
++) {
212 if (pPort
->pAdaptor
== pScreenPriv
->adaptors
[i
].xv_adaptor
) {
213 adaptor
= &(pScreenPriv
->adaptors
[i
]);
219 if (adapt_num
< 0) /* none this port */
222 for (i
= 0; i
< adaptor
->num_surfaces
; i
++) {
223 if (adaptor
->surfaces
[i
]->surface_type_id
== stuff
->surface_type_id
) {
224 surface
= adaptor
->surfaces
[i
];
229 /* adaptor doesn't support this suface_type_id */
233 if ((stuff
->width
> surface
->max_width
) ||
234 (stuff
->height
> surface
->max_height
))
237 if (!(pContext
= malloc(sizeof(XvMCContextRec
)))) {
241 pContext
->pScreen
= pScreen
;
242 pContext
->adapt_num
= adapt_num
;
243 pContext
->context_id
= stuff
->context_id
;
244 pContext
->surface_type_id
= stuff
->surface_type_id
;
245 pContext
->width
= stuff
->width
;
246 pContext
->height
= stuff
->height
;
247 pContext
->flags
= stuff
->flags
;
248 pContext
->refcnt
= 1;
250 result
= (*adaptor
->CreateContext
) (pPort
, pContext
, &dwords
, &data
);
252 if (result
!= Success
) {
257 rep
= (xvmcCreateContextReply
) {
259 .sequenceNumber
= client
->sequence
,
261 .width_actual
= pContext
->width
,
262 .height_actual
= pContext
->height
,
263 .flags_return
= pContext
->flags
266 WriteToClient(client
, sizeof(xvmcCreateContextReply
), &rep
);
268 WriteToClient(client
, dwords
<< 2, data
);
269 AddResource(pContext
->context_id
, XvMCRTContext
, pContext
);
277 ProcXvMCDestroyContext(ClientPtr client
)
282 REQUEST(xvmcDestroyContextReq
);
283 REQUEST_SIZE_MATCH(xvmcDestroyContextReq
);
285 rc
= dixLookupResourceByType(&val
, stuff
->context_id
, XvMCRTContext
,
286 client
, DixDestroyAccess
);
290 FreeResource(stuff
->context_id
, RT_NONE
);
296 ProcXvMCCreateSurface(ClientPtr client
)
301 XvMCContextPtr pContext
;
302 XvMCSurfacePtr pSurface
;
303 XvMCScreenPtr pScreenPriv
;
304 xvmcCreateSurfaceReply rep
;
306 REQUEST(xvmcCreateSurfaceReq
);
307 REQUEST_SIZE_MATCH(xvmcCreateSurfaceReq
);
309 result
= dixLookupResourceByType((pointer
*) &pContext
, stuff
->context_id
,
310 XvMCRTContext
, client
, DixUseAccess
);
311 if (result
!= Success
)
314 pScreenPriv
= XVMC_GET_PRIVATE(pContext
->pScreen
);
316 if (!(pSurface
= malloc(sizeof(XvMCSurfaceRec
))))
319 pSurface
->surface_id
= stuff
->surface_id
;
320 pSurface
->surface_type_id
= pContext
->surface_type_id
;
321 pSurface
->context
= pContext
;
324 (*pScreenPriv
->adaptors
[pContext
->adapt_num
].CreateSurface
) (pSurface
,
328 if (result
!= Success
) {
332 rep
= (xvmcCreateSurfaceReply
) {
334 .sequenceNumber
= client
->sequence
,
338 WriteToClient(client
, sizeof(xvmcCreateSurfaceReply
), &rep
);
340 WriteToClient(client
, dwords
<< 2, data
);
341 AddResource(pSurface
->surface_id
, XvMCRTSurface
, pSurface
);
351 ProcXvMCDestroySurface(ClientPtr client
)
356 REQUEST(xvmcDestroySurfaceReq
);
357 REQUEST_SIZE_MATCH(xvmcDestroySurfaceReq
);
359 rc
= dixLookupResourceByType(&val
, stuff
->surface_id
, XvMCRTSurface
,
360 client
, DixDestroyAccess
);
364 FreeResource(stuff
->surface_id
, RT_NONE
);
370 ProcXvMCCreateSubpicture(ClientPtr client
)
372 Bool image_supported
= FALSE
;
374 int i
, result
, dwords
= 0;
375 XvMCContextPtr pContext
;
376 XvMCSubpicturePtr pSubpicture
;
377 XvMCScreenPtr pScreenPriv
;
378 xvmcCreateSubpictureReply rep
;
379 XvMCAdaptorPtr adaptor
;
380 XvMCSurfaceInfoPtr surface
= NULL
;
382 REQUEST(xvmcCreateSubpictureReq
);
383 REQUEST_SIZE_MATCH(xvmcCreateSubpictureReq
);
385 result
= dixLookupResourceByType((pointer
*) &pContext
, stuff
->context_id
,
386 XvMCRTContext
, client
, DixUseAccess
);
387 if (result
!= Success
)
390 pScreenPriv
= XVMC_GET_PRIVATE(pContext
->pScreen
);
392 adaptor
= &(pScreenPriv
->adaptors
[pContext
->adapt_num
]);
394 /* find which surface this context supports */
395 for (i
= 0; i
< adaptor
->num_surfaces
; i
++) {
396 if (adaptor
->surfaces
[i
]->surface_type_id
== pContext
->surface_type_id
) {
397 surface
= adaptor
->surfaces
[i
];
405 /* make sure this surface supports that xvimage format */
406 if (!surface
->compatible_subpictures
)
409 for (i
= 0; i
< surface
->compatible_subpictures
->num_xvimages
; i
++) {
410 if (surface
->compatible_subpictures
->xvimage_ids
[i
] ==
412 image_supported
= TRUE
;
417 if (!image_supported
)
420 /* make sure the size is OK */
421 if ((stuff
->width
> surface
->subpicture_max_width
) ||
422 (stuff
->height
> surface
->subpicture_max_height
))
425 if (!(pSubpicture
= malloc(sizeof(XvMCSubpictureRec
))))
428 pSubpicture
->subpicture_id
= stuff
->subpicture_id
;
429 pSubpicture
->xvimage_id
= stuff
->xvimage_id
;
430 pSubpicture
->width
= stuff
->width
;
431 pSubpicture
->height
= stuff
->height
;
432 pSubpicture
->num_palette_entries
= 0; /* overwritten by DDX */
433 pSubpicture
->entry_bytes
= 0; /* overwritten by DDX */
434 pSubpicture
->component_order
[0] = 0; /* overwritten by DDX */
435 pSubpicture
->component_order
[1] = 0;
436 pSubpicture
->component_order
[2] = 0;
437 pSubpicture
->component_order
[3] = 0;
438 pSubpicture
->context
= pContext
;
441 (*pScreenPriv
->adaptors
[pContext
->adapt_num
].
442 CreateSubpicture
) (pSubpicture
, &dwords
, &data
);
444 if (result
!= Success
) {
448 rep
= (xvmcCreateSubpictureReply
) {
450 .sequenceNumber
= client
->sequence
,
452 .width_actual
= pSubpicture
->width
,
453 .height_actual
= pSubpicture
->height
,
454 .num_palette_entries
= pSubpicture
->num_palette_entries
,
455 .entry_bytes
= pSubpicture
->entry_bytes
,
456 .component_order
[0] = pSubpicture
->component_order
[0],
457 .component_order
[1] = pSubpicture
->component_order
[1],
458 .component_order
[2] = pSubpicture
->component_order
[2],
459 .component_order
[3] = pSubpicture
->component_order
[3]
462 WriteToClient(client
, sizeof(xvmcCreateSubpictureReply
), &rep
);
464 WriteToClient(client
, dwords
<< 2, data
);
465 AddResource(pSubpicture
->subpicture_id
, XvMCRTSubpicture
, pSubpicture
);
475 ProcXvMCDestroySubpicture(ClientPtr client
)
480 REQUEST(xvmcDestroySubpictureReq
);
481 REQUEST_SIZE_MATCH(xvmcDestroySubpictureReq
);
483 rc
= dixLookupResourceByType(&val
, stuff
->subpicture_id
, XvMCRTSubpicture
,
484 client
, DixDestroyAccess
);
488 FreeResource(stuff
->subpicture_id
, RT_NONE
);
494 ProcXvMCListSubpictureTypes(ClientPtr client
)
497 xvmcListSubpictureTypesReply rep
;
498 XvMCScreenPtr pScreenPriv
;
500 XvMCAdaptorPtr adaptor
= NULL
;
501 XvMCSurfaceInfoPtr surface
= NULL
;
502 xvImageFormatInfo info
;
506 REQUEST(xvmcListSubpictureTypesReq
);
507 REQUEST_SIZE_MATCH(xvmcListSubpictureTypesReq
);
509 VALIDATE_XV_PORT(stuff
->port
, pPort
, DixReadAccess
);
511 pScreen
= pPort
->pAdaptor
->pScreen
;
513 if (!dixPrivateKeyRegistered(XvMCScreenKey
))
514 return BadMatch
; /* No XvMC adaptors */
516 if (!(pScreenPriv
= XVMC_GET_PRIVATE(pScreen
)))
517 return BadMatch
; /* None this screen */
519 for (i
= 0; i
< pScreenPriv
->num_adaptors
; i
++) {
520 if (pPort
->pAdaptor
== pScreenPriv
->adaptors
[i
].xv_adaptor
) {
521 adaptor
= &(pScreenPriv
->adaptors
[i
]);
529 for (i
= 0; i
< adaptor
->num_surfaces
; i
++) {
530 if (adaptor
->surfaces
[i
]->surface_type_id
== stuff
->surface_type_id
) {
531 surface
= adaptor
->surfaces
[i
];
539 rep
= (xvmcListSubpictureTypesReply
) {
541 .sequenceNumber
= client
->sequence
,
544 if (surface
->compatible_subpictures
)
545 rep
.num
= surface
->compatible_subpictures
->num_xvimages
;
547 rep
.length
= bytes_to_int32(rep
.num
* sizeof(xvImageFormatInfo
));
549 WriteToClient(client
, sizeof(xvmcListSubpictureTypesReply
), &rep
);
551 for (i
= 0; i
< rep
.num
; i
++) {
553 for (j
= 0; j
< adaptor
->num_subpictures
; j
++) {
554 if (surface
->compatible_subpictures
->xvimage_ids
[i
] ==
555 adaptor
->subpictures
[j
]->id
) {
556 pImage
= adaptor
->subpictures
[j
];
561 return BadImplementation
;
563 info
.id
= pImage
->id
;
564 info
.type
= pImage
->type
;
565 info
.byte_order
= pImage
->byte_order
;
566 memcpy(&info
.guid
, pImage
->guid
, 16);
567 info
.bpp
= pImage
->bits_per_pixel
;
568 info
.num_planes
= pImage
->num_planes
;
569 info
.depth
= pImage
->depth
;
570 info
.red_mask
= pImage
->red_mask
;
571 info
.green_mask
= pImage
->green_mask
;
572 info
.blue_mask
= pImage
->blue_mask
;
573 info
.format
= pImage
->format
;
574 info
.y_sample_bits
= pImage
->y_sample_bits
;
575 info
.u_sample_bits
= pImage
->u_sample_bits
;
576 info
.v_sample_bits
= pImage
->v_sample_bits
;
577 info
.horz_y_period
= pImage
->horz_y_period
;
578 info
.horz_u_period
= pImage
->horz_u_period
;
579 info
.horz_v_period
= pImage
->horz_v_period
;
580 info
.vert_y_period
= pImage
->vert_y_period
;
581 info
.vert_u_period
= pImage
->vert_u_period
;
582 info
.vert_v_period
= pImage
->vert_v_period
;
583 memcpy(&info
.comp_order
, pImage
->component_order
, 32);
584 info
.scanline_order
= pImage
->scanline_order
;
585 WriteToClient(client
, sizeof(xvImageFormatInfo
), &info
);
592 ProcXvMCGetDRInfo(ClientPtr client
)
594 xvmcGetDRInfoReply rep
;
597 XvMCScreenPtr pScreenPriv
;
600 volatile CARD32
*patternP
;
603 REQUEST(xvmcGetDRInfoReq
);
604 REQUEST_SIZE_MATCH(xvmcGetDRInfoReq
);
606 VALIDATE_XV_PORT(stuff
->port
, pPort
, DixReadAccess
);
608 pScreen
= pPort
->pAdaptor
->pScreen
;
609 pScreenPriv
= XVMC_GET_PRIVATE(pScreen
);
611 rep
= (xvmcGetDRInfoReply
) {
613 .sequenceNumber
= client
->sequence
,
614 .major
= pScreenPriv
->major
,
615 .minor
= pScreenPriv
->minor
,
616 .patchLevel
= pScreenPriv
->patchLevel
,
617 .nameLen
= bytes_to_int32(strlen(pScreenPriv
->clientDriverName
) + 1),
618 .busIDLen
= bytes_to_int32(strlen(pScreenPriv
->busID
) + 1),
622 rep
.length
= rep
.nameLen
+ rep
.busIDLen
;
627 * Read back to the client what she has put in the shared memory
628 * segment she prepared for us.
632 patternP
= (CARD32
*) shmat(stuff
->shmKey
, NULL
, SHM_RDONLY
);
633 if (-1 != (long) patternP
) {
634 volatile CARD32
*patternC
= patternP
;
636 CARD32 magic
= stuff
->magic
;
639 i
= 1024 / sizeof(CARD32
);
642 if (*patternC
++ != magic
) {
648 shmdt((char *) patternP
);
650 #endif /* HAS_XVMCSHM */
652 WriteToClient(client
, sizeof(xvmcGetDRInfoReply
), &rep
);
654 WriteToClient(client
, rep
.nameLen
, pScreenPriv
->clientDriverName
);
655 WriteToClient(client
, rep
.busIDLen
, pScreenPriv
->busID
);
660 int (*ProcXvMCVector
[xvmcNumRequest
]) (ClientPtr
) = {
661 ProcXvMCQueryVersion
,
662 ProcXvMCListSurfaceTypes
,
663 ProcXvMCCreateContext
,
664 ProcXvMCDestroyContext
,
665 ProcXvMCCreateSurface
,
666 ProcXvMCDestroySurface
,
667 ProcXvMCCreateSubpicture
,
668 ProcXvMCDestroySubpicture
,
669 ProcXvMCListSubpictureTypes
, ProcXvMCGetDRInfo
};
672 ProcXvMCDispatch(ClientPtr client
)
676 if (stuff
->data
< xvmcNumRequest
)
677 return (*ProcXvMCVector
[stuff
->data
]) (client
);
683 SProcXvMCDispatch(ClientPtr client
)
685 /* We only support local */
686 return BadImplementation
;
690 XvMCExtensionInit(void)
692 ExtensionEntry
*extEntry
;
694 if (!dixPrivateKeyRegistered(XvMCScreenKey
))
697 if (!(XvMCRTContext
= CreateNewResourceType(XvMCDestroyContextRes
,
701 if (!(XvMCRTSurface
= CreateNewResourceType(XvMCDestroySurfaceRes
,
705 if (!(XvMCRTSubpicture
= CreateNewResourceType(XvMCDestroySubpictureRes
,
706 "XvMCRTSubpicture")))
709 extEntry
= AddExtension(XvMCName
, XvMCNumEvents
, XvMCNumErrors
,
710 ProcXvMCDispatch
, SProcXvMCDispatch
,
711 NULL
, StandardMinorOpcode
);
716 XvMCReqCode
= extEntry
->base
;
717 XvMCEventBase
= extEntry
->eventBase
;
718 SetResourceTypeErrorValue(XvMCRTContext
,
719 extEntry
->errorBase
+ XvMCBadContext
);
720 SetResourceTypeErrorValue(XvMCRTSurface
,
721 extEntry
->errorBase
+ XvMCBadSurface
);
722 SetResourceTypeErrorValue(XvMCRTSubpicture
,
723 extEntry
->errorBase
+ XvMCBadSubpicture
);
727 XvMCCloseScreen(ScreenPtr pScreen
)
729 XvMCScreenPtr pScreenPriv
= XVMC_GET_PRIVATE(pScreen
);
731 pScreen
->CloseScreen
= pScreenPriv
->CloseScreen
;
735 return (*pScreen
->CloseScreen
) (pScreen
);
739 XvMCScreenInit(ScreenPtr pScreen
, int num
, XvMCAdaptorPtr pAdapt
)
741 XvMCScreenPtr pScreenPriv
;
743 if (!dixRegisterPrivateKey(&XvMCScreenKeyRec
, PRIVATE_SCREEN
, 0))
746 if (!(pScreenPriv
= malloc(sizeof(XvMCScreenRec
))))
749 dixSetPrivate(&pScreen
->devPrivates
, XvMCScreenKey
, pScreenPriv
);
751 pScreenPriv
->CloseScreen
= pScreen
->CloseScreen
;
752 pScreen
->CloseScreen
= XvMCCloseScreen
;
754 pScreenPriv
->num_adaptors
= num
;
755 pScreenPriv
->adaptors
= pAdapt
;
756 pScreenPriv
->clientDriverName
[0] = 0;
757 pScreenPriv
->busID
[0] = 0;
758 pScreenPriv
->major
= 0;
759 pScreenPriv
->minor
= 0;
760 pScreenPriv
->patchLevel
= 0;
768 XvMCFindXvImage(XvPortPtr pPort
, CARD32 id
)
770 XvImagePtr pImage
= NULL
;
771 ScreenPtr pScreen
= pPort
->pAdaptor
->pScreen
;
772 XvMCScreenPtr pScreenPriv
;
773 XvMCAdaptorPtr adaptor
= NULL
;
776 if (!dixPrivateKeyRegistered(XvMCScreenKey
))
779 if (!(pScreenPriv
= XVMC_GET_PRIVATE(pScreen
)))
782 for (i
= 0; i
< pScreenPriv
->num_adaptors
; i
++) {
783 if (pPort
->pAdaptor
== pScreenPriv
->adaptors
[i
].xv_adaptor
) {
784 adaptor
= &(pScreenPriv
->adaptors
[i
]);
792 for (i
= 0; i
< adaptor
->num_subpictures
; i
++) {
793 if (adaptor
->subpictures
[i
]->id
== id
) {
794 pImage
= adaptor
->subpictures
[i
];
803 xf86XvMCRegisterDRInfo(ScreenPtr pScreen
, char *name
,
804 char *busID
, int major
, int minor
, int patchLevel
)
806 XvMCScreenPtr pScreenPriv
= XVMC_GET_PRIVATE(pScreen
);
808 strlcpy(pScreenPriv
->clientDriverName
, name
, DR_CLIENT_DRIVER_NAME_SIZE
);
809 strlcpy(pScreenPriv
->busID
, busID
, DR_BUSID_SIZE
);
810 pScreenPriv
->major
= major
;
811 pScreenPriv
->minor
= minor
;
812 pScreenPriv
->patchLevel
= patchLevel
;