On Mon, 30 Jan 2017 11:20:38 +0000 Mark Thompson <[email protected]> wrote:
> On 30/01/17 09:35, wm4 wrote: > > On Sun, 29 Jan 2017 19:58:37 +0000 > > Mark Thompson <[email protected]> wrote: > > > >> --- > >> Other than the log messages, this file no longer has any vaapi dependency > >> at all :) > >> > >> > >> avconv_vaapi.c | 132 > >> ++++++++------------------------------------------------- > >> 1 file changed, 17 insertions(+), 115 deletions(-) > >> > >> diff --git a/avconv_vaapi.c b/avconv_vaapi.c > >> index 584b8b4df..de9e67bd0 100644 > >> --- a/avconv_vaapi.c > >> +++ b/avconv_vaapi.c > >> @@ -26,41 +26,15 @@ > >> #include "avconv.h" > >> > >> > >> -static AVClass vaapi_class = { > >> - .class_name = "vaapi", > >> - .item_name = av_default_item_name, > >> - .version = LIBAVUTIL_VERSION_INT, > >> -}; > >> - > >> -#define DEFAULT_SURFACES 20 > >> - > >> -typedef struct VAAPIDecoderContext { > >> - const AVClass *class; > >> - > >> - AVBufferRef *device_ref; > >> - AVHWDeviceContext *device; > >> - AVBufferRef *frames_ref; > >> - AVHWFramesContext *frames; > >> - > >> - // The output need not have the same format, width and height as the > >> - // decoded frames - the copy for non-direct-mapped access is actually > >> - // a whole vpp instance which can do arbitrary scaling and format > >> - // conversion. > >> - enum AVPixelFormat output_format; > >> -} VAAPIDecoderContext; > >> - > >> - > >> static int vaapi_get_buffer(AVCodecContext *avctx, AVFrame *frame, int > >> flags) > >> { > >> - InputStream *ist = avctx->opaque; > >> - VAAPIDecoderContext *ctx = ist->hwaccel_ctx; > >> int err; > >> > >> - err = av_hwframe_get_buffer(ctx->frames_ref, frame, 0); > >> + err = av_hwframe_get_buffer(avctx->hw_frames_ctx, frame, 0); > >> if (err < 0) { > >> - av_log(ctx, AV_LOG_ERROR, "Failed to allocate decoder > >> surface.\n"); > >> + av_log(avctx, AV_LOG_ERROR, "Failed to allocate decoder > >> surface.\n"); > >> } else { > >> - av_log(ctx, AV_LOG_DEBUG, "Decoder given surface %#x.\n", > >> + av_log(avctx, AV_LOG_DEBUG, "Decoder given surface %#x.\n", > >> (unsigned int)(uintptr_t)frame->data[3]); > >> } > >> return err; > > > > Shouldn't it be possible to simply remove this function now? (And was > > probably possible before? > > Yes. I find the debug helpful when tracking where surfaces are going, but I > guess noone else will. I'll leave it for now unless you feel strongly about > it? (I intend to follow up by eliminating this file entirely with better > device support in avconv, anyway.) No, should be fine as it is. Especially if it'll be removed anyway in the future. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
