diff options
Diffstat (limited to 'src/XvMC.c')
-rw-r--r-- | src/XvMC.c | 76 |
1 files changed, 38 insertions, 38 deletions
@@ -82,8 +82,8 @@ XvMCQueryVersion(Display *dpy, int *major, int *minor) SyncHandle(); return BadImplementation; } - *major = rep.major; - *minor = rep.minor; + *major = (int) rep.major; + *minor = (int) rep.minor; UnlockDisplay(dpy); SyncHandle(); return Success; @@ -103,7 +103,7 @@ XvMCListSurfaceTypes(Display *dpy, XvPortID port, int *num) LockDisplay(dpy); XvMCGetReq(ListSurfaceTypes, req); - req->port = port; + req->port = (CARD32) port; if (!_XReply(dpy, (xReply *) &rep, 0, xFalse)) { UnlockDisplay(dpy); SyncHandle(); @@ -115,13 +115,13 @@ XvMCListSurfaceTypes(Display *dpy, XvPortID port, int *num) surface_info = Xmalloc(rep.num * sizeof(XvMCSurfaceInfo)); if (surface_info) { - *num = rep.num; + *num = (int) rep.num; for (CARD32 i = 0; i < rep.num; i++) { xvmcSurfaceInfo sinfo; _XRead(dpy, (char *) &sinfo, sizeof(xvmcSurfaceInfo)); - surface_info[i].surface_type_id = sinfo.surface_type_id; + surface_info[i].surface_type_id = (int) sinfo.surface_type_id; surface_info[i].chroma_format = sinfo.chroma_format; surface_info[i].max_width = sinfo.max_width; surface_info[i].max_height = sinfo.max_height; @@ -129,8 +129,8 @@ XvMCListSurfaceTypes(Display *dpy, XvPortID port, int *num) sinfo.subpicture_max_width; surface_info[i].subpicture_max_height = sinfo.subpicture_max_height; - surface_info[i].mc_type = sinfo.mc_type; - surface_info[i].flags = sinfo.flags; + surface_info[i].mc_type = (int) sinfo.mc_type; + surface_info[i].flags = (int) sinfo.flags; } } else @@ -159,8 +159,8 @@ XvMCListSubpictureTypes(Display *dpy, LockDisplay(dpy); XvMCGetReq(ListSubpictureTypes, req); - req->port = port; - req->surface_type_id = surface_type_id; + req->port = (CARD32) port; + req->surface_type_id = (CARD32) surface_type_id; if (!_XReply(dpy, (xReply *) &rep, 0, xFalse)) { UnlockDisplay(dpy); SyncHandle(); @@ -172,13 +172,13 @@ XvMCListSubpictureTypes(Display *dpy, ret = Xmalloc(rep.num * sizeof(XvImageFormatValues)); if (ret) { - *count_return = rep.num; + *count_return = (int) rep.num; for (CARD32 i = 0; i < rep.num; i++) { xvImageFormatInfo Info; _XRead(dpy, (char *) (&Info), sz_xvImageFormatInfo); - ret[i].id = Info.id; + ret[i].id = (int) Info.id; ret[i].type = Info.type; ret[i].byte_order = Info.byte_order; memcpy(&(ret[i].guid[0]), &(Info.guid[0]), 16); @@ -250,12 +250,12 @@ _xvmc_create_context(Display *dpy, LockDisplay(dpy); XvMCGetReq(CreateContext, req); context->context_id = XAllocID(dpy); - req->context_id = context->context_id; - req->port = context->port; - req->surface_type_id = context->surface_type_id; + req->context_id = (CARD32) context->context_id; + req->port = (CARD32) context->port; + req->surface_type_id = (CARD32) context->surface_type_id; req->width = context->width; req->height = context->height; - req->flags = context->flags; + req->flags = (CARD32) context->flags; if (!_XReply(dpy, (xReply *) &rep, 0, xFalse)) { UnlockDisplay(dpy); SyncHandle(); @@ -263,14 +263,14 @@ _xvmc_create_context(Display *dpy, } context->width = rep.width_actual; context->height = rep.height_actual; - context->flags = rep.flags_return; + context->flags = (int) rep.flags_return; if (rep.length) { if (rep.length < (INT_MAX >> 2)) *priv_data = Xmalloc(rep.length << 2); if (*priv_data) { _XRead(dpy, (char *) (*priv_data), rep.length << 2); - *priv_count = rep.length; + *priv_count = (int) rep.length; } else _XEatDataWords(dpy, rep.length); @@ -291,7 +291,7 @@ _xvmc_destroy_context(Display *dpy, XvMCContext *context) LockDisplay(dpy); XvMCGetReq(DestroyContext, req); - req->context_id = context->context_id; + req->context_id = (CARD32) context->context_id; UnlockDisplay(dpy); SyncHandle(); return Success; @@ -336,8 +336,8 @@ _xvmc_create_surface(Display *dpy, surface->width = context->width; surface->height = context->height; - req->surface_id = surface->surface_id; - req->context_id = surface->context_id; + req->surface_id = (CARD32) surface->surface_id; + req->context_id = (CARD32) surface->context_id; if (!_XReply(dpy, (xReply *) &rep, 0, xFalse)) { UnlockDisplay(dpy); SyncHandle(); @@ -349,7 +349,7 @@ _xvmc_create_surface(Display *dpy, *priv_data = Xmalloc(rep.length << 2); if (*priv_data) { _XRead(dpy, (char *) (*priv_data), rep.length << 2); - *priv_count = rep.length; + *priv_count = (int) rep.length; } else _XEatDataWords(dpy, rep.length); @@ -370,7 +370,7 @@ _xvmc_destroy_surface(Display *dpy, XvMCSurface *surface) LockDisplay(dpy); XvMCGetReq(DestroySurface, req); - req->surface_id = surface->surface_id; + req->surface_id = (CARD32) surface->surface_id; UnlockDisplay(dpy); SyncHandle(); return Success; @@ -413,9 +413,9 @@ _xvmc_create_subpicture(Display *dpy, subpicture->subpicture_id = XAllocID(dpy); subpicture->context_id = context->context_id; - req->subpicture_id = subpicture->subpicture_id; - req->context_id = subpicture->context_id; - req->xvimage_id = subpicture->xvimage_id; + req->subpicture_id = (CARD32) subpicture->subpicture_id; + req->context_id = (CARD32) subpicture->context_id; + req->xvimage_id = (CARD32) subpicture->xvimage_id; req->width = subpicture->width; req->height = subpicture->height; if (!_XReply(dpy, (xReply *) &rep, 0, xFalse)) { @@ -428,17 +428,17 @@ _xvmc_create_subpicture(Display *dpy, subpicture->height = rep.height_actual; subpicture->num_palette_entries = rep.num_palette_entries; subpicture->entry_bytes = rep.entry_bytes; - subpicture->component_order[0] = rep.component_order[0]; - subpicture->component_order[1] = rep.component_order[1]; - subpicture->component_order[2] = rep.component_order[2]; - subpicture->component_order[3] = rep.component_order[3]; + subpicture->component_order[0] = (char) rep.component_order[0]; + subpicture->component_order[1] = (char) rep.component_order[1]; + subpicture->component_order[2] = (char) rep.component_order[2]; + subpicture->component_order[3] = (char) rep.component_order[3]; if (rep.length) { if (rep.length < (INT_MAX >> 2)) *priv_data = Xmalloc(rep.length << 2); if (*priv_data) { _XRead(dpy, (char *) (*priv_data), rep.length << 2); - *priv_count = rep.length; + *priv_count = (int) rep.length; } else _XEatDataWords(dpy, rep.length); @@ -459,7 +459,7 @@ _xvmc_destroy_subpicture(Display *dpy, XvMCSubpicture *subpicture) LockDisplay(dpy); XvMCGetReq(DestroySubpicture, req); - req->subpicture_id = subpicture->subpicture_id; + req->subpicture_id = (CARD32) subpicture->subpicture_id; UnlockDisplay(dpy); SyncHandle(); return Success; @@ -489,7 +489,7 @@ XvMCGetDRInfo(Display *dpy, XvPortID port, LockDisplay(dpy); XvMCGetReq(GetDRInfo, req); - req->port = port; + req->port = (CARD32) port; req->magic = 0; #ifdef HAVE_SHMAT shmKey = shmget(IPC_PRIVATE, 1024, IPC_CREAT | 0600); @@ -525,7 +525,7 @@ XvMCGetDRInfo(Display *dpy, XvPortID port, } } else { - req->shmKey = -1; + req->shmKey = (CARD32) -1; shmKey = -1; } } @@ -564,7 +564,7 @@ XvMCGetDRInfo(Display *dpy, XvPortID port, } if (*name && *busID && tmpBuf) { - _XRead(dpy, tmpBuf, realSize); + _XRead(dpy, tmpBuf, (long) realSize); strncpy(*name, tmpBuf, rep.nameLen); (*name)[rep.nameLen == 0 ? 0 : rep.nameLen - 1] = '\0'; strncpy(*busID, tmpBuf + rep.nameLen, rep.busIDLen); @@ -588,12 +588,12 @@ XvMCGetDRInfo(Display *dpy, XvPortID port, UnlockDisplay(dpy); SyncHandle(); - *major = rep.major; - *minor = rep.minor; - *patchLevel = rep.patchLevel; + *major = (int) rep.major; + *minor = (int) rep.minor; + *patchLevel = (int) rep.patchLevel; #ifdef HAVE_SHMAT if (shmKey >= 0) - *isLocal = rep.isLocal; + *isLocal = (int) rep.isLocal; else #endif *isLocal = 1; |