Re: [FFmpeg-devel] [PATCH] lavu: Add DRM hwcontext

2017-09-02 Thread Mark Thompson
On 01/09/17 18:48, Jorge Ramirez wrote: > On 09/01/2017 05:44 PM, LongChair . wrote: >> +static int drm_map_frame(AVHWFramesContext *hwfc, >> + AVFrame *dst, const AVFrame *src, int flags) >> +{ >> +const AVDRMFrameDescriptor*desc = (AVDRMFrameDescriptor*)src->data[0];

Re: [FFmpeg-devel] [PATCH] lavu: Add DRM hwcontext

2017-09-01 Thread Jorge Ramirez
On 09/01/2017 05:44 PM, LongChair . wrote: + * @file + * API-specific header for AV_HWDEVICE_TYPE_DRM. + * + * Internal frame allocation is not currently supported - all frames + * must be allocated by the user. Thus AVHWFramesContext is always + * NULL, though this may change if support for

Re: [FFmpeg-devel] [PATCH] lavu: Add DRM hwcontext

2017-09-01 Thread Jorge Ramirez
On 09/01/2017 05:44 PM, LongChair . wrote: +} + +static int drm_device_create(AVHWDeviceContext *hwdev, const char *device, + AVDictionary *opts, int flags) +{ +AVDRMDeviceContext *hwctx = hwdev->hwctx; +drmVersionPtr version; + +hwctx->fd = open(device,

Re: [FFmpeg-devel] [PATCH] lavu: Add DRM hwcontext

2017-09-01 Thread Jorge Ramirez
On 09/01/2017 05:44 PM, LongChair . wrote: + +static void drm_unmap_frame(AVHWFramesContext *hwfc, +HWMapDescriptor *hwmap) +{ +DRMMapping *map = hwmap->priv; +int i; + +for (i = 0; i < map->nb_regions; i++) { +if (map->address[i]) +

Re: [FFmpeg-devel] [PATCH] lavu: Add DRM hwcontext

2017-09-01 Thread Jorge Ramirez
On 09/01/2017 05:44 PM, LongChair . wrote: +static int drm_map_frame(AVHWFramesContext *hwfc, + AVFrame *dst, const AVFrame *src, int flags) +{ +const AVDRMFrameDescriptor*desc = (AVDRMFrameDescriptor*)src->data[0]; +DRMMapping *map; +int err, i, p, plane; +

Re: [FFmpeg-devel] [PATCH] lavu: Add DRM hwcontext

2017-09-01 Thread wm4
On Fri, 1 Sep 2017 15:44:53 + "LongChair ." wrote: > From: Mark Thompson > > --- > configure | 3 + > libavutil/Makefile | 2 + > libavutil/hwcontext.c | 4 + > libavutil/hwcontext.h | 1 + >

[FFmpeg-devel] [PATCH] lavu: Add DRM hwcontext

2017-09-01 Thread LongChair .
From: Mark Thompson --- configure | 3 + libavutil/Makefile | 2 + libavutil/hwcontext.c | 4 + libavutil/hwcontext.h | 1 + libavutil/hwcontext_drm.c | 294 +