summaryrefslogtreecommitdiff
path: root/src/XvMC.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/XvMC.c')
-rw-r--r--src/XvMC.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/XvMC.c b/src/XvMC.c
index eb8e7e8..b6f718b 100644
--- a/src/XvMC.c
+++ b/src/XvMC.c
@@ -100,7 +100,7 @@ XvMCSurfaceInfo * XvMCListSurfaceTypes(Display *dpy, XvPortID port, int *num)
*num = 0;
XvMCCheckExtension (dpy, info, NULL);
-
+
LockDisplay (dpy);
XvMCGetReq (ListSurfaceTypes, req);
req->port = port;
@@ -111,7 +111,7 @@ XvMCSurfaceInfo * XvMCListSurfaceTypes(Display *dpy, XvPortID port, int *num)
}
if(rep.num > 0) {
- surface_info =
+ surface_info =
(XvMCSurfaceInfo*)Xmalloc(rep.num * sizeof(XvMCSurfaceInfo));
if(surface_info) {
@@ -126,9 +126,9 @@ XvMCSurfaceInfo * XvMCListSurfaceTypes(Display *dpy, XvPortID port, int *num)
surface_info[i].chroma_format = sinfo.chroma_format;
surface_info[i].max_width = sinfo.max_width;
surface_info[i].max_height = sinfo.max_height;
- surface_info[i].subpicture_max_width =
+ surface_info[i].subpicture_max_width =
sinfo.subpicture_max_width;
- surface_info[i].subpicture_max_height =
+ surface_info[i].subpicture_max_height =
sinfo.subpicture_max_height;
surface_info[i].mc_type = sinfo.mc_type;
surface_info[i].flags = sinfo.flags;
@@ -172,7 +172,7 @@ XvImageFormatValues * XvMCListSubpictureTypes (
}
if(rep.num > 0) {
- ret =
+ ret =
(XvImageFormatValues*)Xmalloc(rep.num * sizeof(XvImageFormatValues));
if(ret) {
@@ -183,19 +183,19 @@ XvImageFormatValues * XvMCListSubpictureTypes (
for(i = 0; i < rep.num; i++) {
_XRead(dpy, (char*)(&Info), sz_xvImageFormatInfo);
- ret[i].id = Info.id;
- ret[i].type = Info.type;
- ret[i].byte_order = Info.byte_order;
+ ret[i].id = Info.id;
+ ret[i].type = Info.type;
+ ret[i].byte_order = Info.byte_order;
memcpy(&(ret[i].guid[0]), &(Info.guid[0]), 16);
- ret[i].bits_per_pixel = Info.bpp;
- ret[i].format = Info.format;
- ret[i].num_planes = Info.num_planes;
- ret[i].depth = Info.depth;
- ret[i].red_mask = Info.red_mask;
- ret[i].green_mask = Info.green_mask;
- ret[i].blue_mask = Info.blue_mask;
- ret[i].y_sample_bits = Info.y_sample_bits;
- ret[i].u_sample_bits = Info.u_sample_bits;
+ ret[i].bits_per_pixel = Info.bpp;
+ ret[i].format = Info.format;
+ ret[i].num_planes = Info.num_planes;
+ ret[i].depth = Info.depth;
+ ret[i].red_mask = Info.red_mask;
+ ret[i].green_mask = Info.green_mask;
+ ret[i].blue_mask = Info.blue_mask;
+ ret[i].y_sample_bits = Info.y_sample_bits;
+ ret[i].u_sample_bits = Info.u_sample_bits;
ret[i].v_sample_bits = Info.v_sample_bits;
ret[i].horz_y_period = Info.horz_y_period;
ret[i].horz_u_period = Info.horz_u_period;
@@ -212,18 +212,18 @@ XvImageFormatValues * XvMCListSubpictureTypes (
UnlockDisplay (dpy);
SyncHandle ();
- return ret;
+ return ret;
}
-/******************************************************************
+/******************************************************************
These are intended as a protocol interface to be used by direct
rendering libraries. They are not intended to be client viewable
functions. These will stay in place until we have a mechanism in
place similar to that of OpenGL with an libXvMCcore library.
-*******************************************************************/
-
-/*
+*******************************************************************/
+
+/*
_xvmc_create_context -
Pass in the context with the surface_type_id, width, height,
@@ -234,7 +234,7 @@ XvImageFormatValues * XvMCListSubpictureTypes (
an array of priv_count CARD32s. This data is allocated by
this function. If returned, the caller is responsible for
freeing it! Generally, such information is only returned if
- an XVMC_DIRECT context was specified.
+ an XVMC_DIRECT context was specified.
*/
@@ -309,14 +309,14 @@ Status _xvmc_destroy_context (
_xvmc_create_surface -
Pass the context and this function will fill out all the
- information in the surface.
+ information in the surface.
The server may return implementation-specific information
back in the priv_data. The size of that information will
an array of priv_count CARD32s. This data is allocated by
this function. If returned, the caller is responsible for
freeing it! Generally, such information is returned only if
the context was a direct context.
-
+
*/
Status _xvmc_create_surface (
@@ -469,15 +469,15 @@ Status _xvmc_destroy_subpicture(
LockDisplay (dpy);
XvMCGetReq (DestroySubpicture, req);
- req->subpicture_id = subpicture->subpicture_id;
+ req->subpicture_id = subpicture->subpicture_id;
UnlockDisplay (dpy);
SyncHandle ();
return Success;
}
Status XvMCGetDRInfo(Display *dpy, XvPortID port,
- char **name, char **busID,
- int *major, int *minor,
+ char **name, char **busID,
+ int *major, int *minor,
int *patchLevel,
int *isLocal)
{
@@ -514,11 +514,11 @@ Status XvMCGetDRInfo(Display *dpy, XvPortID port,
* any complicated data on those pages. Thats the explanation of this
* otherwise stupid-looking pattern algorithm.
*/
-
+
if (req->shmKey >= 0) {
shMem = (CARD32 *) shmat(req->shmKey, NULL, 0);
shmctl( req->shmKey, IPC_RMID, NULL);
- if ( shMem ) {
+ if ( shMem ) {
register volatile CARD32 *shMemC = shMem;
register int i;
@@ -528,7 +528,7 @@ Status XvMCGetDRInfo(Display *dpy, XvPortID port,
req->magic = magic;
i = 1024 / sizeof(CARD32);
while(i--) {
- *shMemC++ = magic;
+ *shMemC++ = magic;
magic = ~magic;
}
} else {
@@ -544,7 +544,7 @@ Status XvMCGetDRInfo(Display *dpy, XvPortID port,
#ifdef HAVE_SHMAT
if ( req->shmKey >= 0) {
shmdt( (const void *) shMem );
- }
+ }
#endif
return -1;
}
@@ -567,7 +567,7 @@ Status XvMCGetDRInfo(Display *dpy, XvPortID port,
}
} else {
XFree(tmpBuf);
- }
+ }
}
if (*name && *busID && tmpBuf) {