Lines Matching +full:client +full:- +full:id
25 #include <dix-config.h>
59 SWriteQueryExtensionReply(ClientPtr client, xvQueryExtensionReply * rep) in SWriteQueryExtensionReply() argument
61 swaps(&rep->sequenceNumber); in SWriteQueryExtensionReply()
62 swapl(&rep->length); in SWriteQueryExtensionReply()
63 swaps(&rep->version); in SWriteQueryExtensionReply()
64 swaps(&rep->revision); in SWriteQueryExtensionReply()
66 WriteToClient(client, sz_xvQueryExtensionReply, rep); in SWriteQueryExtensionReply()
72 SWriteQueryAdaptorsReply(ClientPtr client, xvQueryAdaptorsReply * rep) in SWriteQueryAdaptorsReply() argument
74 swaps(&rep->sequenceNumber); in SWriteQueryAdaptorsReply()
75 swapl(&rep->length); in SWriteQueryAdaptorsReply()
76 swaps(&rep->num_adaptors); in SWriteQueryAdaptorsReply()
78 WriteToClient(client, sz_xvQueryAdaptorsReply, rep); in SWriteQueryAdaptorsReply()
84 SWriteQueryEncodingsReply(ClientPtr client, xvQueryEncodingsReply * rep) in SWriteQueryEncodingsReply() argument
86 swaps(&rep->sequenceNumber); in SWriteQueryEncodingsReply()
87 swapl(&rep->length); in SWriteQueryEncodingsReply()
88 swaps(&rep->num_encodings); in SWriteQueryEncodingsReply()
90 WriteToClient(client, sz_xvQueryEncodingsReply, rep); in SWriteQueryEncodingsReply()
96 SWriteAdaptorInfo(ClientPtr client, xvAdaptorInfo * pAdaptor) in SWriteAdaptorInfo() argument
98 swapl(&pAdaptor->base_id); in SWriteAdaptorInfo()
99 swaps(&pAdaptor->name_size); in SWriteAdaptorInfo()
100 swaps(&pAdaptor->num_ports); in SWriteAdaptorInfo()
101 swaps(&pAdaptor->num_formats); in SWriteAdaptorInfo()
103 WriteToClient(client, sz_xvAdaptorInfo, pAdaptor); in SWriteAdaptorInfo()
109 SWriteEncodingInfo(ClientPtr client, xvEncodingInfo * pEncoding) in SWriteEncodingInfo() argument
112 swapl(&pEncoding->encoding); in SWriteEncodingInfo()
113 swaps(&pEncoding->name_size); in SWriteEncodingInfo()
114 swaps(&pEncoding->width); in SWriteEncodingInfo()
115 swaps(&pEncoding->height); in SWriteEncodingInfo()
116 swapl(&pEncoding->rate.numerator); in SWriteEncodingInfo()
117 swapl(&pEncoding->rate.denominator); in SWriteEncodingInfo()
118 WriteToClient(client, sz_xvEncodingInfo, pEncoding); in SWriteEncodingInfo()
124 SWriteFormat(ClientPtr client, xvFormat * pFormat) in SWriteFormat() argument
126 swapl(&pFormat->visual); in SWriteFormat()
127 WriteToClient(client, sz_xvFormat, pFormat); in SWriteFormat()
133 SWriteAttributeInfo(ClientPtr client, xvAttributeInfo * pAtt) in SWriteAttributeInfo() argument
135 swapl(&pAtt->flags); in SWriteAttributeInfo()
136 swapl(&pAtt->size); in SWriteAttributeInfo()
137 swapl(&pAtt->min); in SWriteAttributeInfo()
138 swapl(&pAtt->max); in SWriteAttributeInfo()
139 WriteToClient(client, sz_xvAttributeInfo, pAtt); in SWriteAttributeInfo()
145 SWriteImageFormatInfo(ClientPtr client, xvImageFormatInfo * pImage) in SWriteImageFormatInfo() argument
147 swapl(&pImage->id); in SWriteImageFormatInfo()
148 swapl(&pImage->red_mask); in SWriteImageFormatInfo()
149 swapl(&pImage->green_mask); in SWriteImageFormatInfo()
150 swapl(&pImage->blue_mask); in SWriteImageFormatInfo()
151 swapl(&pImage->y_sample_bits); in SWriteImageFormatInfo()
152 swapl(&pImage->u_sample_bits); in SWriteImageFormatInfo()
153 swapl(&pImage->v_sample_bits); in SWriteImageFormatInfo()
154 swapl(&pImage->horz_y_period); in SWriteImageFormatInfo()
155 swapl(&pImage->horz_u_period); in SWriteImageFormatInfo()
156 swapl(&pImage->horz_v_period); in SWriteImageFormatInfo()
157 swapl(&pImage->vert_y_period); in SWriteImageFormatInfo()
158 swapl(&pImage->vert_u_period); in SWriteImageFormatInfo()
159 swapl(&pImage->vert_v_period); in SWriteImageFormatInfo()
161 WriteToClient(client, sz_xvImageFormatInfo, pImage); in SWriteImageFormatInfo()
167 SWriteGrabPortReply(ClientPtr client, xvGrabPortReply * rep) in SWriteGrabPortReply() argument
169 swaps(&rep->sequenceNumber); in SWriteGrabPortReply()
170 swapl(&rep->length); in SWriteGrabPortReply()
172 WriteToClient(client, sz_xvGrabPortReply, rep); in SWriteGrabPortReply()
178 SWriteGetPortAttributeReply(ClientPtr client, xvGetPortAttributeReply * rep) in SWriteGetPortAttributeReply() argument
180 swaps(&rep->sequenceNumber); in SWriteGetPortAttributeReply()
181 swapl(&rep->length); in SWriteGetPortAttributeReply()
182 swapl(&rep->value); in SWriteGetPortAttributeReply()
184 WriteToClient(client, sz_xvGetPortAttributeReply, rep); in SWriteGetPortAttributeReply()
190 SWriteQueryBestSizeReply(ClientPtr client, xvQueryBestSizeReply * rep) in SWriteQueryBestSizeReply() argument
192 swaps(&rep->sequenceNumber); in SWriteQueryBestSizeReply()
193 swapl(&rep->length); in SWriteQueryBestSizeReply()
194 swaps(&rep->actual_width); in SWriteQueryBestSizeReply()
195 swaps(&rep->actual_height); in SWriteQueryBestSizeReply()
197 WriteToClient(client, sz_xvQueryBestSizeReply, rep); in SWriteQueryBestSizeReply()
203 SWriteQueryPortAttributesReply(ClientPtr client, in SWriteQueryPortAttributesReply() argument
206 swaps(&rep->sequenceNumber); in SWriteQueryPortAttributesReply()
207 swapl(&rep->length); in SWriteQueryPortAttributesReply()
208 swapl(&rep->num_attributes); in SWriteQueryPortAttributesReply()
209 swapl(&rep->text_size); in SWriteQueryPortAttributesReply()
211 WriteToClient(client, sz_xvQueryPortAttributesReply, rep); in SWriteQueryPortAttributesReply()
217 SWriteQueryImageAttributesReply(ClientPtr client, in SWriteQueryImageAttributesReply() argument
220 swaps(&rep->sequenceNumber); in SWriteQueryImageAttributesReply()
221 swapl(&rep->length); in SWriteQueryImageAttributesReply()
222 swapl(&rep->num_planes); in SWriteQueryImageAttributesReply()
223 swapl(&rep->data_size); in SWriteQueryImageAttributesReply()
224 swaps(&rep->width); in SWriteQueryImageAttributesReply()
225 swaps(&rep->height); in SWriteQueryImageAttributesReply()
227 WriteToClient(client, sz_xvQueryImageAttributesReply, rep); in SWriteQueryImageAttributesReply()
233 SWriteListImageFormatsReply(ClientPtr client, xvListImageFormatsReply * rep) in SWriteListImageFormatsReply() argument
235 swaps(&rep->sequenceNumber); in SWriteListImageFormatsReply()
236 swapl(&rep->length); in SWriteListImageFormatsReply()
237 swapl(&rep->num_formats); in SWriteListImageFormatsReply()
239 WriteToClient(client, sz_xvListImageFormatsReply, rep); in SWriteListImageFormatsReply()
245 if ((_c)->swapped) SWriteQueryAdaptorsReply(_c, _d); \
249 if ((_c)->swapped) SWriteQueryExtensionReply(_c, _d); \
253 if ((_c)->swapped) SWriteQueryEncodingsReply(_c, _d); \
257 if ((_c)->swapped) SWriteAdaptorInfo(_c, _d); \
261 if ((_c)->swapped) SWriteAttributeInfo(_c, _d); \
265 if ((_c)->swapped) SWriteEncodingInfo(_c, _d); \
269 if ((_c)->swapped) SWriteFormat(_c, _d); \
273 if ((_c)->swapped) SWriteGrabPortReply(_c, _d); \
277 if ((_c)->swapped) SWriteGetPortAttributeReply(_c, _d); \
281 if ((_c)->swapped) SWriteQueryBestSizeReply(_c, _d); \
285 if ((_c)->swapped) SWriteQueryPortAttributesReply(_c, _d); \
289 if ((_c)->swapped) SWriteQueryImageAttributesReply(_c, _d); \
293 if ((_c)->swapped) SWriteListImageFormatsReply(_c, _d); \
297 if ((_c)->swapped) SWriteImageFormatInfo(_c, _d); \
301 ProcXvQueryExtension(ClientPtr client) in ProcXvQueryExtension() argument
305 .sequenceNumber = client->sequence, in ProcXvQueryExtension()
314 _WriteQueryExtensionReply(client, &rep); in ProcXvQueryExtension()
320 ProcXvQueryAdaptors(ClientPtr client) in ProcXvQueryAdaptors() argument
336 rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); in ProcXvQueryAdaptors()
340 pScreen = pWin->drawable.pScreen; in ProcXvQueryAdaptors()
341 pxvs = (XvScreenPtr) dixLookupPrivate(&pScreen->devPrivates, in ProcXvQueryAdaptors()
346 .sequenceNumber = client->sequence, in ProcXvQueryAdaptors()
351 _WriteQueryAdaptorsReply(client, &rep); in ProcXvQueryAdaptors()
358 .sequenceNumber = client->sequence, in ProcXvQueryAdaptors()
359 .num_adaptors = pxvs->nAdaptors in ProcXvQueryAdaptors()
364 totalSize = pxvs->nAdaptors * sz_xvAdaptorInfo; in ProcXvQueryAdaptors()
368 na = pxvs->nAdaptors; in ProcXvQueryAdaptors()
369 pa = pxvs->pAdaptors; in ProcXvQueryAdaptors()
370 while (na--) { in ProcXvQueryAdaptors()
371 totalSize += pad_to_int32(strlen(pa->name)); in ProcXvQueryAdaptors()
372 totalSize += pa->nFormats * sz_xvFormat; in ProcXvQueryAdaptors()
378 _WriteQueryAdaptorsReply(client, &rep); in ProcXvQueryAdaptors()
380 na = pxvs->nAdaptors; in ProcXvQueryAdaptors()
381 pa = pxvs->pAdaptors; in ProcXvQueryAdaptors()
382 while (na--) { in ProcXvQueryAdaptors()
384 ainfo.base_id = pa->base_id; in ProcXvQueryAdaptors()
385 ainfo.num_ports = pa->nPorts; in ProcXvQueryAdaptors()
386 ainfo.type = pa->type; in ProcXvQueryAdaptors()
387 ainfo.name_size = nameSize = strlen(pa->name); in ProcXvQueryAdaptors()
388 ainfo.num_formats = pa->nFormats; in ProcXvQueryAdaptors()
390 _WriteAdaptorInfo(client, &ainfo); in ProcXvQueryAdaptors()
392 WriteToClient(client, nameSize, pa->name); in ProcXvQueryAdaptors()
394 nf = pa->nFormats; in ProcXvQueryAdaptors()
395 pf = pa->pFormats; in ProcXvQueryAdaptors()
396 while (nf--) { in ProcXvQueryAdaptors()
397 format.depth = pf->depth; in ProcXvQueryAdaptors()
398 format.visual = pf->visual; in ProcXvQueryAdaptors()
399 _WriteFormat(client, &format); in ProcXvQueryAdaptors()
411 ProcXvQueryEncodings(ClientPtr client) in ProcXvQueryEncodings() argument
424 VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); in ProcXvQueryEncodings()
428 .sequenceNumber = client->sequence, in ProcXvQueryEncodings()
429 .num_encodings = pPort->pAdaptor->nEncodings in ProcXvQueryEncodings()
434 ne = pPort->pAdaptor->nEncodings; in ProcXvQueryEncodings()
435 pe = pPort->pAdaptor->pEncodings; in ProcXvQueryEncodings()
437 while (ne--) { in ProcXvQueryEncodings()
438 totalSize += pad_to_int32(strlen(pe->name)); in ProcXvQueryEncodings()
444 _WriteQueryEncodingsReply(client, &rep); in ProcXvQueryEncodings()
446 ne = pPort->pAdaptor->nEncodings; in ProcXvQueryEncodings()
447 pe = pPort->pAdaptor->pEncodings; in ProcXvQueryEncodings()
448 while (ne--) { in ProcXvQueryEncodings()
449 einfo.encoding = pe->id; in ProcXvQueryEncodings()
450 einfo.name_size = nameSize = strlen(pe->name); in ProcXvQueryEncodings()
451 einfo.width = pe->width; in ProcXvQueryEncodings()
452 einfo.height = pe->height; in ProcXvQueryEncodings()
453 einfo.rate.numerator = pe->rate.numerator; in ProcXvQueryEncodings()
454 einfo.rate.denominator = pe->rate.denominator; in ProcXvQueryEncodings()
455 _WriteEncodingInfo(client, &einfo); in ProcXvQueryEncodings()
456 WriteToClient(client, nameSize, pe->name); in ProcXvQueryEncodings()
464 ProcXvPutVideo(ClientPtr client) in ProcXvPutVideo() argument
474 VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); in ProcXvPutVideo()
475 VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); in ProcXvPutVideo()
477 if (!(pPort->pAdaptor->type & XvInputMask) || in ProcXvPutVideo()
478 !(pPort->pAdaptor->type & XvVideoMask)) { in ProcXvPutVideo()
479 client->errorValue = stuff->port; in ProcXvPutVideo()
488 return XvdiPutVideo(client, pDraw, pPort, pGC, stuff->vid_x, stuff->vid_y, in ProcXvPutVideo()
489 stuff->vid_w, stuff->vid_h, stuff->drw_x, stuff->drw_y, in ProcXvPutVideo()
490 stuff->drw_w, stuff->drw_h); in ProcXvPutVideo()
494 ProcXvPutStill(ClientPtr client) in ProcXvPutStill() argument
504 VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); in ProcXvPutStill()
505 VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); in ProcXvPutStill()
507 if (!(pPort->pAdaptor->type & XvInputMask) || in ProcXvPutStill()
508 !(pPort->pAdaptor->type & XvStillMask)) { in ProcXvPutStill()
509 client->errorValue = stuff->port; in ProcXvPutStill()
518 return XvdiPutStill(client, pDraw, pPort, pGC, stuff->vid_x, stuff->vid_y, in ProcXvPutStill()
519 stuff->vid_w, stuff->vid_h, stuff->drw_x, stuff->drw_y, in ProcXvPutStill()
520 stuff->drw_w, stuff->drw_h); in ProcXvPutStill()
524 ProcXvGetVideo(ClientPtr client) in ProcXvGetVideo() argument
534 VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixReadAccess); in ProcXvGetVideo()
535 VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); in ProcXvGetVideo()
537 if (!(pPort->pAdaptor->type & XvOutputMask) || in ProcXvGetVideo()
538 !(pPort->pAdaptor->type & XvVideoMask)) { in ProcXvGetVideo()
539 client->errorValue = stuff->port; in ProcXvGetVideo()
548 return XvdiGetVideo(client, pDraw, pPort, pGC, stuff->vid_x, stuff->vid_y, in ProcXvGetVideo()
549 stuff->vid_w, stuff->vid_h, stuff->drw_x, stuff->drw_y, in ProcXvGetVideo()
550 stuff->drw_w, stuff->drw_h); in ProcXvGetVideo()
554 ProcXvGetStill(ClientPtr client) in ProcXvGetStill() argument
564 VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixReadAccess); in ProcXvGetStill()
565 VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); in ProcXvGetStill()
567 if (!(pPort->pAdaptor->type & XvOutputMask) || in ProcXvGetStill()
568 !(pPort->pAdaptor->type & XvStillMask)) { in ProcXvGetStill()
569 client->errorValue = stuff->port; in ProcXvGetStill()
578 return XvdiGetStill(client, pDraw, pPort, pGC, stuff->vid_x, stuff->vid_y, in ProcXvGetStill()
579 stuff->vid_w, stuff->vid_h, stuff->drw_x, stuff->drw_y, in ProcXvGetStill()
580 stuff->drw_w, stuff->drw_h); in ProcXvGetStill()
584 ProcXvSelectVideoNotify(ClientPtr client) in ProcXvSelectVideoNotify() argument
592 rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, in ProcXvSelectVideoNotify()
597 return XvdiSelectVideoNotify(client, pDraw, stuff->onoff); in ProcXvSelectVideoNotify()
601 ProcXvSelectPortNotify(ClientPtr client) in ProcXvSelectPortNotify() argument
608 VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); in ProcXvSelectPortNotify()
610 return XvdiSelectPortNotify(client, pPort, stuff->onoff); in ProcXvSelectPortNotify()
614 ProcXvGrabPort(ClientPtr client) in ProcXvGrabPort() argument
623 VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); in ProcXvGrabPort()
625 status = XvdiGrabPort(client, pPort, stuff->time, &result); in ProcXvGrabPort()
632 .sequenceNumber = client->sequence, in ProcXvGrabPort()
637 _WriteGrabPortReply(client, &rep); in ProcXvGrabPort()
643 ProcXvUngrabPort(ClientPtr client) in ProcXvUngrabPort() argument
650 VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); in ProcXvUngrabPort()
652 return XvdiUngrabPort(client, pPort, stuff->time); in ProcXvUngrabPort()
656 ProcXvStopVideo(ClientPtr client) in ProcXvStopVideo() argument
665 VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); in ProcXvStopVideo()
667 ret = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixWriteAccess); in ProcXvStopVideo()
671 return XvdiStopVideo(client, pPort, pDraw); in ProcXvStopVideo()
675 ProcXvSetPortAttribute(ClientPtr client) in ProcXvSetPortAttribute() argument
683 VALIDATE_XV_PORT(stuff->port, pPort, DixSetAttrAccess); in ProcXvSetPortAttribute()
685 if (!ValidAtom(stuff->attribute)) { in ProcXvSetPortAttribute()
686 client->errorValue = stuff->attribute; in ProcXvSetPortAttribute()
691 XvdiSetPortAttribute(client, pPort, stuff->attribute, stuff->value); in ProcXvSetPortAttribute()
694 client->errorValue = stuff->attribute; in ProcXvSetPortAttribute()
696 client->errorValue = stuff->value; in ProcXvSetPortAttribute()
702 ProcXvGetPortAttribute(ClientPtr client) in ProcXvGetPortAttribute() argument
712 VALIDATE_XV_PORT(stuff->port, pPort, DixGetAttrAccess); in ProcXvGetPortAttribute()
714 if (!ValidAtom(stuff->attribute)) { in ProcXvGetPortAttribute()
715 client->errorValue = stuff->attribute; in ProcXvGetPortAttribute()
719 status = XvdiGetPortAttribute(client, pPort, stuff->attribute, &value); in ProcXvGetPortAttribute()
721 client->errorValue = stuff->attribute; in ProcXvGetPortAttribute()
727 .sequenceNumber = client->sequence, in ProcXvGetPortAttribute()
732 _WriteGetPortAttributeReply(client, &rep); in ProcXvGetPortAttribute()
738 ProcXvQueryBestSize(ClientPtr client) in ProcXvQueryBestSize() argument
747 VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); in ProcXvQueryBestSize()
749 (*pPort->pAdaptor->ddQueryBestSize) (pPort, stuff->motion, in ProcXvQueryBestSize()
750 stuff->vid_w, stuff->vid_h, in ProcXvQueryBestSize()
751 stuff->drw_w, stuff->drw_h, in ProcXvQueryBestSize()
756 .sequenceNumber = client->sequence, in ProcXvQueryBestSize()
762 _WriteQueryBestSizeReply(client, &rep); in ProcXvQueryBestSize()
768 ProcXvQueryPortAttributes(ClientPtr client) in ProcXvQueryPortAttributes() argument
779 VALIDATE_XV_PORT(stuff->port, pPort, DixGetAttrAccess); in ProcXvQueryPortAttributes()
783 .sequenceNumber = client->sequence, in ProcXvQueryPortAttributes()
784 .num_attributes = pPort->pAdaptor->nAttributes, in ProcXvQueryPortAttributes()
788 for (i = 0, pAtt = pPort->pAdaptor->pAttributes; in ProcXvQueryPortAttributes()
789 i < pPort->pAdaptor->nAttributes; i++, pAtt++) { in ProcXvQueryPortAttributes()
790 rep.text_size += pad_to_int32(strlen(pAtt->name) + 1); in ProcXvQueryPortAttributes()
793 rep.length = (pPort->pAdaptor->nAttributes * sz_xvAttributeInfo) in ProcXvQueryPortAttributes()
797 _WriteQueryPortAttributesReply(client, &rep); in ProcXvQueryPortAttributes()
799 for (i = 0, pAtt = pPort->pAdaptor->pAttributes; in ProcXvQueryPortAttributes()
800 i < pPort->pAdaptor->nAttributes; i++, pAtt++) { in ProcXvQueryPortAttributes()
801 size = strlen(pAtt->name) + 1; /* pass the NULL */ in ProcXvQueryPortAttributes()
802 Info.flags = pAtt->flags; in ProcXvQueryPortAttributes()
803 Info.min = pAtt->min_value; in ProcXvQueryPortAttributes()
804 Info.max = pAtt->max_value; in ProcXvQueryPortAttributes()
807 _WriteAttributeInfo(client, &Info); in ProcXvQueryPortAttributes()
809 WriteToClient(client, size, pAtt->name); in ProcXvQueryPortAttributes()
816 ProcXvPutImage(ClientPtr client) in ProcXvPutImage() argument
828 VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); in ProcXvPutImage()
829 VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); in ProcXvPutImage()
831 if (!(pPort->pAdaptor->type & XvImageMask) || in ProcXvPutImage()
832 !(pPort->pAdaptor->type & XvInputMask)) { in ProcXvPutImage()
833 client->errorValue = stuff->port; in ProcXvPutImage()
842 for (i = 0; i < pPort->pAdaptor->nImages; i++) { in ProcXvPutImage()
843 if (pPort->pAdaptor->pImages[i].id == stuff->id) { in ProcXvPutImage()
844 pImage = &(pPort->pAdaptor->pImages[i]); in ProcXvPutImage()
852 width = stuff->width; in ProcXvPutImage()
853 height = stuff->height; in ProcXvPutImage()
854 size = (*pPort->pAdaptor->ddQueryImageAttributes) (pPort, pImage, &width, in ProcXvPutImage()
859 if ((width < stuff->width) || (height < stuff->height)) in ProcXvPutImage()
862 if (client->req_len < size) in ProcXvPutImage()
865 return XvdiPutImage(client, pDraw, pPort, pGC, stuff->src_x, stuff->src_y, in ProcXvPutImage()
866 stuff->src_w, stuff->src_h, stuff->drw_x, stuff->drw_y, in ProcXvPutImage()
867 stuff->drw_w, stuff->drw_h, pImage, in ProcXvPutImage()
869 stuff->width, stuff->height); in ProcXvPutImage()
875 ProcXvShmPutImage(ClientPtr client) in ProcXvShmPutImage() argument
888 VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); in ProcXvShmPutImage()
889 VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); in ProcXvShmPutImage()
891 if (!(pPort->pAdaptor->type & XvImageMask) || in ProcXvShmPutImage()
892 !(pPort->pAdaptor->type & XvInputMask)) { in ProcXvShmPutImage()
893 client->errorValue = stuff->port; in ProcXvShmPutImage()
902 for (i = 0; i < pPort->pAdaptor->nImages; i++) { in ProcXvShmPutImage()
903 if (pPort->pAdaptor->pImages[i].id == stuff->id) { in ProcXvShmPutImage()
904 pImage = &(pPort->pAdaptor->pImages[i]); in ProcXvShmPutImage()
912 status = dixLookupResourceByType((void **) &shmdesc, stuff->shmseg, in ProcXvShmPutImage()
917 width = stuff->width; in ProcXvShmPutImage()
918 height = stuff->height; in ProcXvShmPutImage()
919 size_needed = (*pPort->pAdaptor->ddQueryImageAttributes) (pPort, pImage, in ProcXvShmPutImage()
922 if ((size_needed + stuff->offset) > shmdesc->size) in ProcXvShmPutImage()
925 if ((width < stuff->width) || (height < stuff->height)) in ProcXvShmPutImage()
928 status = XvdiPutImage(client, pDraw, pPort, pGC, stuff->src_x, stuff->src_y, in ProcXvShmPutImage()
929 stuff->src_w, stuff->src_h, stuff->drw_x, in ProcXvShmPutImage()
930 stuff->drw_y, stuff->drw_w, stuff->drw_h, pImage, in ProcXvShmPutImage()
931 (unsigned char *) shmdesc->addr + stuff->offset, in ProcXvShmPutImage()
932 stuff->send_event, stuff->width, stuff->height); in ProcXvShmPutImage()
934 if ((status == Success) && stuff->send_event) { in ProcXvShmPutImage()
937 .drawable = stuff->drawable, in ProcXvShmPutImage()
940 .shmseg = stuff->shmseg, in ProcXvShmPutImage()
941 .offset = stuff->offset in ProcXvShmPutImage()
943 WriteEventsToClient(client, 1, (xEvent *) &ev); in ProcXvShmPutImage()
950 ProcXvShmPutImage(ClientPtr client) in ProcXvShmPutImage() argument
961 ProcXvQueryImageAttributes(ClientPtr client) in ProcXvQueryImageAttributes() argument
976 VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); in ProcXvQueryImageAttributes()
978 for (i = 0; i < pPort->pAdaptor->nImages; i++) { in ProcXvQueryImageAttributes()
979 if (pPort->pAdaptor->pImages[i].id == stuff->id) { in ProcXvQueryImageAttributes()
980 pImage = &(pPort->pAdaptor->pImages[i]); in ProcXvQueryImageAttributes()
987 pImage = XvMCFindXvImage(pPort, stuff->id); in ProcXvQueryImageAttributes()
993 num_planes = pImage->num_planes; in ProcXvQueryImageAttributes()
999 width = stuff->width; in ProcXvQueryImageAttributes()
1000 height = stuff->height; in ProcXvQueryImageAttributes()
1002 size = (*pPort->pAdaptor->ddQueryImageAttributes) (pPort, pImage, in ProcXvQueryImageAttributes()
1008 .sequenceNumber = client->sequence, in ProcXvQueryImageAttributes()
1016 _WriteQueryImageAttributesReply(client, &rep); in ProcXvQueryImageAttributes()
1017 if (client->swapped) in ProcXvQueryImageAttributes()
1019 WriteToClient(client, planeLength << 2, offsets); in ProcXvQueryImageAttributes()
1027 ProcXvListImageFormats(ClientPtr client) in ProcXvListImageFormats() argument
1039 VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); in ProcXvListImageFormats()
1043 .sequenceNumber = client->sequence, in ProcXvListImageFormats()
1044 .num_formats = pPort->pAdaptor->nImages, in ProcXvListImageFormats()
1046 bytes_to_int32(pPort->pAdaptor->nImages * sz_xvImageFormatInfo) in ProcXvListImageFormats()
1049 _WriteListImageFormatsReply(client, &rep); in ProcXvListImageFormats()
1051 pImage = pPort->pAdaptor->pImages; in ProcXvListImageFormats()
1053 for (i = 0; i < pPort->pAdaptor->nImages; i++, pImage++) { in ProcXvListImageFormats()
1054 info.id = pImage->id; in ProcXvListImageFormats()
1055 info.type = pImage->type; in ProcXvListImageFormats()
1056 info.byte_order = pImage->byte_order; in ProcXvListImageFormats()
1057 memcpy(&info.guid, pImage->guid, 16); in ProcXvListImageFormats()
1058 info.bpp = pImage->bits_per_pixel; in ProcXvListImageFormats()
1059 info.num_planes = pImage->num_planes; in ProcXvListImageFormats()
1060 info.depth = pImage->depth; in ProcXvListImageFormats()
1061 info.red_mask = pImage->red_mask; in ProcXvListImageFormats()
1062 info.green_mask = pImage->green_mask; in ProcXvListImageFormats()
1063 info.blue_mask = pImage->blue_mask; in ProcXvListImageFormats()
1064 info.format = pImage->format; in ProcXvListImageFormats()
1065 info.y_sample_bits = pImage->y_sample_bits; in ProcXvListImageFormats()
1066 info.u_sample_bits = pImage->u_sample_bits; in ProcXvListImageFormats()
1067 info.v_sample_bits = pImage->v_sample_bits; in ProcXvListImageFormats()
1068 info.horz_y_period = pImage->horz_y_period; in ProcXvListImageFormats()
1069 info.horz_u_period = pImage->horz_u_period; in ProcXvListImageFormats()
1070 info.horz_v_period = pImage->horz_v_period; in ProcXvListImageFormats()
1071 info.vert_y_period = pImage->vert_y_period; in ProcXvListImageFormats()
1072 info.vert_u_period = pImage->vert_u_period; in ProcXvListImageFormats()
1073 info.vert_v_period = pImage->vert_v_period; in ProcXvListImageFormats()
1074 memcpy(&info.comp_order, pImage->component_order, 32); in ProcXvListImageFormats()
1075 info.scanline_order = pImage->scanline_order; in ProcXvListImageFormats()
1076 _WriteImageFormatInfo(client, &info); in ProcXvListImageFormats()
1103 ProcXvDispatch(ClientPtr client) in ProcXvDispatch() argument
1109 if (stuff->data >= xvNumRequests) { in ProcXvDispatch()
1113 return XvProcVector[stuff->data] (client); in ProcXvDispatch()
1119 SProcXvQueryExtension(ClientPtr client) in SProcXvQueryExtension() argument
1123 swaps(&stuff->length); in SProcXvQueryExtension()
1124 return XvProcVector[xv_QueryExtension] (client); in SProcXvQueryExtension()
1128 SProcXvQueryAdaptors(ClientPtr client) in SProcXvQueryAdaptors() argument
1132 swaps(&stuff->length); in SProcXvQueryAdaptors()
1133 swapl(&stuff->window); in SProcXvQueryAdaptors()
1134 return XvProcVector[xv_QueryAdaptors] (client); in SProcXvQueryAdaptors()
1138 SProcXvQueryEncodings(ClientPtr client) in SProcXvQueryEncodings() argument
1142 swaps(&stuff->length); in SProcXvQueryEncodings()
1143 swapl(&stuff->port); in SProcXvQueryEncodings()
1144 return XvProcVector[xv_QueryEncodings] (client); in SProcXvQueryEncodings()
1148 SProcXvGrabPort(ClientPtr client) in SProcXvGrabPort() argument
1152 swaps(&stuff->length); in SProcXvGrabPort()
1153 swapl(&stuff->port); in SProcXvGrabPort()
1154 swapl(&stuff->time); in SProcXvGrabPort()
1155 return XvProcVector[xv_GrabPort] (client); in SProcXvGrabPort()
1159 SProcXvUngrabPort(ClientPtr client) in SProcXvUngrabPort() argument
1163 swaps(&stuff->length); in SProcXvUngrabPort()
1164 swapl(&stuff->port); in SProcXvUngrabPort()
1165 swapl(&stuff->time); in SProcXvUngrabPort()
1166 return XvProcVector[xv_UngrabPort] (client); in SProcXvUngrabPort()
1170 SProcXvPutVideo(ClientPtr client) in SProcXvPutVideo() argument
1174 swaps(&stuff->length); in SProcXvPutVideo()
1175 swapl(&stuff->port); in SProcXvPutVideo()
1176 swapl(&stuff->drawable); in SProcXvPutVideo()
1177 swapl(&stuff->gc); in SProcXvPutVideo()
1178 swaps(&stuff->vid_x); in SProcXvPutVideo()
1179 swaps(&stuff->vid_y); in SProcXvPutVideo()
1180 swaps(&stuff->vid_w); in SProcXvPutVideo()
1181 swaps(&stuff->vid_h); in SProcXvPutVideo()
1182 swaps(&stuff->drw_x); in SProcXvPutVideo()
1183 swaps(&stuff->drw_y); in SProcXvPutVideo()
1184 swaps(&stuff->drw_w); in SProcXvPutVideo()
1185 swaps(&stuff->drw_h); in SProcXvPutVideo()
1186 return XvProcVector[xv_PutVideo] (client); in SProcXvPutVideo()
1190 SProcXvPutStill(ClientPtr client) in SProcXvPutStill() argument
1194 swaps(&stuff->length); in SProcXvPutStill()
1195 swapl(&stuff->port); in SProcXvPutStill()
1196 swapl(&stuff->drawable); in SProcXvPutStill()
1197 swapl(&stuff->gc); in SProcXvPutStill()
1198 swaps(&stuff->vid_x); in SProcXvPutStill()
1199 swaps(&stuff->vid_y); in SProcXvPutStill()
1200 swaps(&stuff->vid_w); in SProcXvPutStill()
1201 swaps(&stuff->vid_h); in SProcXvPutStill()
1202 swaps(&stuff->drw_x); in SProcXvPutStill()
1203 swaps(&stuff->drw_y); in SProcXvPutStill()
1204 swaps(&stuff->drw_w); in SProcXvPutStill()
1205 swaps(&stuff->drw_h); in SProcXvPutStill()
1206 return XvProcVector[xv_PutStill] (client); in SProcXvPutStill()
1210 SProcXvGetVideo(ClientPtr client) in SProcXvGetVideo() argument
1214 swaps(&stuff->length); in SProcXvGetVideo()
1215 swapl(&stuff->port); in SProcXvGetVideo()
1216 swapl(&stuff->drawable); in SProcXvGetVideo()
1217 swapl(&stuff->gc); in SProcXvGetVideo()
1218 swaps(&stuff->vid_x); in SProcXvGetVideo()
1219 swaps(&stuff->vid_y); in SProcXvGetVideo()
1220 swaps(&stuff->vid_w); in SProcXvGetVideo()
1221 swaps(&stuff->vid_h); in SProcXvGetVideo()
1222 swaps(&stuff->drw_x); in SProcXvGetVideo()
1223 swaps(&stuff->drw_y); in SProcXvGetVideo()
1224 swaps(&stuff->drw_w); in SProcXvGetVideo()
1225 swaps(&stuff->drw_h); in SProcXvGetVideo()
1226 return XvProcVector[xv_GetVideo] (client); in SProcXvGetVideo()
1230 SProcXvGetStill(ClientPtr client) in SProcXvGetStill() argument
1234 swaps(&stuff->length); in SProcXvGetStill()
1235 swapl(&stuff->port); in SProcXvGetStill()
1236 swapl(&stuff->drawable); in SProcXvGetStill()
1237 swapl(&stuff->gc); in SProcXvGetStill()
1238 swaps(&stuff->vid_x); in SProcXvGetStill()
1239 swaps(&stuff->vid_y); in SProcXvGetStill()
1240 swaps(&stuff->vid_w); in SProcXvGetStill()
1241 swaps(&stuff->vid_h); in SProcXvGetStill()
1242 swaps(&stuff->drw_x); in SProcXvGetStill()
1243 swaps(&stuff->drw_y); in SProcXvGetStill()
1244 swaps(&stuff->drw_w); in SProcXvGetStill()
1245 swaps(&stuff->drw_h); in SProcXvGetStill()
1246 return XvProcVector[xv_GetStill] (client); in SProcXvGetStill()
1250 SProcXvPutImage(ClientPtr client) in SProcXvPutImage() argument
1254 swaps(&stuff->length); in SProcXvPutImage()
1255 swapl(&stuff->port); in SProcXvPutImage()
1256 swapl(&stuff->drawable); in SProcXvPutImage()
1257 swapl(&stuff->gc); in SProcXvPutImage()
1258 swapl(&stuff->id); in SProcXvPutImage()
1259 swaps(&stuff->src_x); in SProcXvPutImage()
1260 swaps(&stuff->src_y); in SProcXvPutImage()
1261 swaps(&stuff->src_w); in SProcXvPutImage()
1262 swaps(&stuff->src_h); in SProcXvPutImage()
1263 swaps(&stuff->drw_x); in SProcXvPutImage()
1264 swaps(&stuff->drw_y); in SProcXvPutImage()
1265 swaps(&stuff->drw_w); in SProcXvPutImage()
1266 swaps(&stuff->drw_h); in SProcXvPutImage()
1267 swaps(&stuff->width); in SProcXvPutImage()
1268 swaps(&stuff->height); in SProcXvPutImage()
1269 return XvProcVector[xv_PutImage] (client); in SProcXvPutImage()
1274 SProcXvShmPutImage(ClientPtr client) in SProcXvShmPutImage() argument
1278 swaps(&stuff->length); in SProcXvShmPutImage()
1279 swapl(&stuff->port); in SProcXvShmPutImage()
1280 swapl(&stuff->drawable); in SProcXvShmPutImage()
1281 swapl(&stuff->gc); in SProcXvShmPutImage()
1282 swapl(&stuff->shmseg); in SProcXvShmPutImage()
1283 swapl(&stuff->id); in SProcXvShmPutImage()
1284 swapl(&stuff->offset); in SProcXvShmPutImage()
1285 swaps(&stuff->src_x); in SProcXvShmPutImage()
1286 swaps(&stuff->src_y); in SProcXvShmPutImage()
1287 swaps(&stuff->src_w); in SProcXvShmPutImage()
1288 swaps(&stuff->src_h); in SProcXvShmPutImage()
1289 swaps(&stuff->drw_x); in SProcXvShmPutImage()
1290 swaps(&stuff->drw_y); in SProcXvShmPutImage()
1291 swaps(&stuff->drw_w); in SProcXvShmPutImage()
1292 swaps(&stuff->drw_h); in SProcXvShmPutImage()
1293 swaps(&stuff->width); in SProcXvShmPutImage()
1294 swaps(&stuff->height); in SProcXvShmPutImage()
1295 return XvProcVector[xv_ShmPutImage] (client); in SProcXvShmPutImage()
1302 SProcXvSelectVideoNotify(ClientPtr client) in SProcXvSelectVideoNotify() argument
1306 swaps(&stuff->length); in SProcXvSelectVideoNotify()
1307 swapl(&stuff->drawable); in SProcXvSelectVideoNotify()
1308 return XvProcVector[xv_SelectVideoNotify] (client); in SProcXvSelectVideoNotify()
1312 SProcXvSelectPortNotify(ClientPtr client) in SProcXvSelectPortNotify() argument
1316 swaps(&stuff->length); in SProcXvSelectPortNotify()
1317 swapl(&stuff->port); in SProcXvSelectPortNotify()
1318 return XvProcVector[xv_SelectPortNotify] (client); in SProcXvSelectPortNotify()
1322 SProcXvStopVideo(ClientPtr client) in SProcXvStopVideo() argument
1326 swaps(&stuff->length); in SProcXvStopVideo()
1327 swapl(&stuff->port); in SProcXvStopVideo()
1328 swapl(&stuff->drawable); in SProcXvStopVideo()
1329 return XvProcVector[xv_StopVideo] (client); in SProcXvStopVideo()
1333 SProcXvSetPortAttribute(ClientPtr client) in SProcXvSetPortAttribute() argument
1337 swaps(&stuff->length); in SProcXvSetPortAttribute()
1338 swapl(&stuff->port); in SProcXvSetPortAttribute()
1339 swapl(&stuff->attribute); in SProcXvSetPortAttribute()
1340 swapl(&stuff->value); in SProcXvSetPortAttribute()
1341 return XvProcVector[xv_SetPortAttribute] (client); in SProcXvSetPortAttribute()
1345 SProcXvGetPortAttribute(ClientPtr client) in SProcXvGetPortAttribute() argument
1349 swaps(&stuff->length); in SProcXvGetPortAttribute()
1350 swapl(&stuff->port); in SProcXvGetPortAttribute()
1351 swapl(&stuff->attribute); in SProcXvGetPortAttribute()
1352 return XvProcVector[xv_GetPortAttribute] (client); in SProcXvGetPortAttribute()
1356 SProcXvQueryBestSize(ClientPtr client) in SProcXvQueryBestSize() argument
1360 swaps(&stuff->length); in SProcXvQueryBestSize()
1361 swapl(&stuff->port); in SProcXvQueryBestSize()
1362 swaps(&stuff->vid_w); in SProcXvQueryBestSize()
1363 swaps(&stuff->vid_h); in SProcXvQueryBestSize()
1364 swaps(&stuff->drw_w); in SProcXvQueryBestSize()
1365 swaps(&stuff->drw_h); in SProcXvQueryBestSize()
1366 return XvProcVector[xv_QueryBestSize] (client); in SProcXvQueryBestSize()
1370 SProcXvQueryPortAttributes(ClientPtr client) in SProcXvQueryPortAttributes() argument
1374 swaps(&stuff->length); in SProcXvQueryPortAttributes()
1375 swapl(&stuff->port); in SProcXvQueryPortAttributes()
1376 return XvProcVector[xv_QueryPortAttributes] (client); in SProcXvQueryPortAttributes()
1380 SProcXvQueryImageAttributes(ClientPtr client) in SProcXvQueryImageAttributes() argument
1384 swaps(&stuff->length); in SProcXvQueryImageAttributes()
1385 swapl(&stuff->port); in SProcXvQueryImageAttributes()
1386 swapl(&stuff->id); in SProcXvQueryImageAttributes()
1387 swaps(&stuff->width); in SProcXvQueryImageAttributes()
1388 swaps(&stuff->height); in SProcXvQueryImageAttributes()
1389 return XvProcVector[xv_QueryImageAttributes] (client); in SProcXvQueryImageAttributes()
1393 SProcXvListImageFormats(ClientPtr client) in SProcXvListImageFormats() argument
1397 swaps(&stuff->length); in SProcXvListImageFormats()
1398 swapl(&stuff->port); in SProcXvListImageFormats()
1399 return XvProcVector[xv_ListImageFormats] (client); in SProcXvListImageFormats()
1423 SProcXvDispatch(ClientPtr client) in SProcXvDispatch() argument
1429 if (stuff->data >= xvNumRequests) { in SProcXvDispatch()
1433 return SXvProcVector[stuff->data] (client); in SProcXvDispatch()
1438 XineramaXvStopVideo(ClientPtr client) in XineramaXvStopVideo() argument
1446 result = dixLookupResourceByClass((void **) &draw, stuff->drawable, in XineramaXvStopVideo()
1447 XRC_DRAWABLE, client, DixWriteAccess); in XineramaXvStopVideo()
1451 result = dixLookupResourceByType((void **) &port, stuff->port, in XineramaXvStopVideo()
1452 XvXRTPort, client, DixReadAccess); in XineramaXvStopVideo()
1457 if (port->info[i].id) { in XineramaXvStopVideo()
1458 stuff->drawable = draw->info[i].id; in XineramaXvStopVideo()
1459 stuff->port = port->info[i].id; in XineramaXvStopVideo()
1460 result = ProcXvStopVideo(client); in XineramaXvStopVideo()
1468 XineramaXvSetPortAttribute(ClientPtr client) in XineramaXvSetPortAttribute() argument
1476 result = dixLookupResourceByType((void **) &port, stuff->port, in XineramaXvSetPortAttribute()
1477 XvXRTPort, client, DixReadAccess); in XineramaXvSetPortAttribute()
1482 if (port->info[i].id) { in XineramaXvSetPortAttribute()
1483 stuff->port = port->info[i].id; in XineramaXvSetPortAttribute()
1484 result = ProcXvSetPortAttribute(client); in XineramaXvSetPortAttribute()
1492 XineramaXvShmPutImage(ClientPtr client) in XineramaXvShmPutImage() argument
1502 send_event = stuff->send_event; in XineramaXvShmPutImage()
1504 result = dixLookupResourceByClass((void **) &draw, stuff->drawable, in XineramaXvShmPutImage()
1505 XRC_DRAWABLE, client, DixWriteAccess); in XineramaXvShmPutImage()
1509 result = dixLookupResourceByType((void **) &gc, stuff->gc, in XineramaXvShmPutImage()
1510 XRT_GC, client, DixReadAccess); in XineramaXvShmPutImage()
1514 result = dixLookupResourceByType((void **) &port, stuff->port, in XineramaXvShmPutImage()
1515 XvXRTPort, client, DixReadAccess); in XineramaXvShmPutImage()
1519 isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; in XineramaXvShmPutImage()
1521 x = stuff->drw_x; in XineramaXvShmPutImage()
1522 y = stuff->drw_y; in XineramaXvShmPutImage()
1525 if (port->info[i].id) { in XineramaXvShmPutImage()
1526 stuff->drawable = draw->info[i].id; in XineramaXvShmPutImage()
1527 stuff->port = port->info[i].id; in XineramaXvShmPutImage()
1528 stuff->gc = gc->info[i].id; in XineramaXvShmPutImage()
1529 stuff->drw_x = x; in XineramaXvShmPutImage()
1530 stuff->drw_y = y; in XineramaXvShmPutImage()
1532 stuff->drw_x -= screenInfo.screens[i]->x; in XineramaXvShmPutImage()
1533 stuff->drw_y -= screenInfo.screens[i]->y; in XineramaXvShmPutImage()
1535 stuff->send_event = (send_event && !i) ? 1 : 0; in XineramaXvShmPutImage()
1537 result = ProcXvShmPutImage(client); in XineramaXvShmPutImage()
1547 XineramaXvPutImage(ClientPtr client) in XineramaXvPutImage() argument
1556 result = dixLookupResourceByClass((void **) &draw, stuff->drawable, in XineramaXvPutImage()
1557 XRC_DRAWABLE, client, DixWriteAccess); in XineramaXvPutImage()
1561 result = dixLookupResourceByType((void **) &gc, stuff->gc, in XineramaXvPutImage()
1562 XRT_GC, client, DixReadAccess); in XineramaXvPutImage()
1566 result = dixLookupResourceByType((void **) &port, stuff->port, in XineramaXvPutImage()
1567 XvXRTPort, client, DixReadAccess); in XineramaXvPutImage()
1571 isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; in XineramaXvPutImage()
1573 x = stuff->drw_x; in XineramaXvPutImage()
1574 y = stuff->drw_y; in XineramaXvPutImage()
1577 if (port->info[i].id) { in XineramaXvPutImage()
1578 stuff->drawable = draw->info[i].id; in XineramaXvPutImage()
1579 stuff->port = port->info[i].id; in XineramaXvPutImage()
1580 stuff->gc = gc->info[i].id; in XineramaXvPutImage()
1581 stuff->drw_x = x; in XineramaXvPutImage()
1582 stuff->drw_y = y; in XineramaXvPutImage()
1584 stuff->drw_x -= screenInfo.screens[i]->x; in XineramaXvPutImage()
1585 stuff->drw_y -= screenInfo.screens[i]->y; in XineramaXvPutImage()
1588 result = ProcXvPutImage(client); in XineramaXvPutImage()
1595 XineramaXvPutVideo(ClientPtr client) in XineramaXvPutVideo() argument
1604 result = dixLookupResourceByClass((void **) &draw, stuff->drawable, in XineramaXvPutVideo()
1605 XRC_DRAWABLE, client, DixWriteAccess); in XineramaXvPutVideo()
1609 result = dixLookupResourceByType((void **) &gc, stuff->gc, in XineramaXvPutVideo()
1610 XRT_GC, client, DixReadAccess); in XineramaXvPutVideo()
1614 result = dixLookupResourceByType((void **) &port, stuff->port, in XineramaXvPutVideo()
1615 XvXRTPort, client, DixReadAccess); in XineramaXvPutVideo()
1619 isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; in XineramaXvPutVideo()
1621 x = stuff->drw_x; in XineramaXvPutVideo()
1622 y = stuff->drw_y; in XineramaXvPutVideo()
1625 if (port->info[i].id) { in XineramaXvPutVideo()
1626 stuff->drawable = draw->info[i].id; in XineramaXvPutVideo()
1627 stuff->port = port->info[i].id; in XineramaXvPutVideo()
1628 stuff->gc = gc->info[i].id; in XineramaXvPutVideo()
1629 stuff->drw_x = x; in XineramaXvPutVideo()
1630 stuff->drw_y = y; in XineramaXvPutVideo()
1632 stuff->drw_x -= screenInfo.screens[i]->x; in XineramaXvPutVideo()
1633 stuff->drw_y -= screenInfo.screens[i]->y; in XineramaXvPutVideo()
1636 result = ProcXvPutVideo(client); in XineramaXvPutVideo()
1643 XineramaXvPutStill(ClientPtr client) in XineramaXvPutStill() argument
1652 result = dixLookupResourceByClass((void **) &draw, stuff->drawable, in XineramaXvPutStill()
1653 XRC_DRAWABLE, client, DixWriteAccess); in XineramaXvPutStill()
1657 result = dixLookupResourceByType((void **) &gc, stuff->gc, in XineramaXvPutStill()
1658 XRT_GC, client, DixReadAccess); in XineramaXvPutStill()
1662 result = dixLookupResourceByType((void **) &port, stuff->port, in XineramaXvPutStill()
1663 XvXRTPort, client, DixReadAccess); in XineramaXvPutStill()
1667 isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; in XineramaXvPutStill()
1669 x = stuff->drw_x; in XineramaXvPutStill()
1670 y = stuff->drw_y; in XineramaXvPutStill()
1673 if (port->info[i].id) { in XineramaXvPutStill()
1674 stuff->drawable = draw->info[i].id; in XineramaXvPutStill()
1675 stuff->port = port->info[i].id; in XineramaXvPutStill()
1676 stuff->gc = gc->info[i].id; in XineramaXvPutStill()
1677 stuff->drw_x = x; in XineramaXvPutStill()
1678 stuff->drw_y = y; in XineramaXvPutStill()
1680 stuff->drw_x -= screenInfo.screens[i]->x; in XineramaXvPutStill()
1681 stuff->drw_y -= screenInfo.screens[i]->y; in XineramaXvPutStill()
1684 result = ProcXvPutStill(client); in XineramaXvPutStill()
1693 return (pAdapt->type & XvImageMask) && (pAdapt->nImages > 0); in isImageAdaptor()
1701 for (i = 0; i < pAdapt->nAttributes; i++) in hasOverlay()
1702 if (!strcmp(pAdapt->pAttributes[i].name, "XV_COLORKEY")) in hasOverlay()
1712 dixLookupPrivate(&pScreen->devPrivates, XvGetScreenKey()); in matchAdaptor()
1718 for (i = 0; i < xvsp->nAdaptors; i++) { in matchAdaptor()
1719 XvAdaptorPtr pAdapt = xvsp->pAdaptors + i; in matchAdaptor()
1721 if (!strcmp(refAdapt->name, pAdapt->name)) in matchAdaptor()
1729 /* prefer overlay/overlay non-overlay/non-overlay pairing */ in matchAdaptor()
1730 for (i = 0; i < xvsp->nAdaptors; i++) { in matchAdaptor()
1731 XvAdaptorPtr pAdapt = xvsp->pAdaptors + i; in matchAdaptor()
1738 for (i = 0; i < xvsp->nAdaptors; i++) { in matchAdaptor()
1739 XvAdaptorPtr pAdapt = xvsp->pAdaptors + i; in matchAdaptor()
1751 dixLookupPrivate(&screenInfo.screens[0]->devPrivates, XvGetScreenKey()); in XineramifyXv()
1761 for (i = 0; i < xvsp0->nAdaptors; i++) { in XineramifyXv()
1763 XvAdaptorPtr refAdapt = xvsp0->pAdaptors + i; in XineramifyXv()
1765 if (!(refAdapt->type & XvInputMask)) in XineramifyXv()
1775 for (j = 0; j < refAdapt->nPorts; j++) { in XineramifyXv()
1782 if (MatchingAdaptors[k] && (MatchingAdaptors[k]->nPorts > j)) in XineramifyXv()
1783 port->info[k].id = MatchingAdaptors[k]->base_id + j; in XineramifyXv()
1785 port->info[k].id = 0; in XineramifyXv()
1787 AddResource(port->info[0].id, XvXRTPort, port); in XineramifyXv()