modified for cross compile

This commit is contained in:
gengyue
2020-04-12 18:50:03 +08:00
parent 3cfc964836
commit b074ebf3d7
2 changed files with 7 additions and 3 deletions

View File

@@ -1681,7 +1681,7 @@ static DrmSurfaceBuffer *drm_create_dumb_buffer(DrmVideoData* vdata,
surface_buffer->handle,
surface_buffer->width, surface_buffer->height,
surface_buffer->pitch,
surface_buffer->size, surface_buffer->offset);
(long unsigned int)surface_buffer->size, (long unsigned int)surface_buffer->offset);
/* prepare buffer for memory mapping */
memset(&mreq, 0, sizeof(mreq));
@@ -1810,7 +1810,7 @@ static DrmSurfaceBuffer *drm_create_dumb_buffer_from_prime_fd(DrmVideoData* vdat
return NULL;
}
_DBG_PRINTF("size got by calling lseek: %lu\n", size);
_DBG_PRINTF("size got by calling lseek: %lu\n", (long unsigned int)size);
}
ret = drmPrimeFDToHandle (vdata->dev_fd, prime_fd, &handle);

View File

@@ -3813,6 +3813,10 @@ HDC drmCreateDCFromNameEx (GHANDLE video, uint32_t name, uint32_t drm_format,
return (HDC)pmem_dc;
}
extern GAL_Surface* __drm_create_surface_from_handle (GHANDLE video, uint32_t handle,
unsigned long size, uint32_t drm_format, uint32_t pixels_off,
uint32_t width, uint32_t height, uint32_t pitch);
HDC drmCreateDCFromHandleEx (GHANDLE video, uint32_t handle, size_t size,
uint32_t drm_format, off_t offset,
uint32_t width, uint32_t height, uint32_t pitch)
@@ -3824,7 +3828,7 @@ HDC drmCreateDCFromHandleEx (GHANDLE video, uint32_t handle, size_t size,
return HDC_INVALID;
LOCK (&__mg_gdilock);
surface = __drm_create_surface_from_handle (video, handle, size,
surface = (GAL_Surface *)__drm_create_surface_from_handle (video, handle, size,
drm_format, offset, width, height, pitch);
UNLOCK (&__mg_gdilock);