X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavdevice%2Fdecklink_enc.cpp;h=28ab928cd50cd92099b41723085267c48793dde2;hb=061337a073236cb0bc6c56036f50f883d2887681;hp=81df563b3bf6671b7327484210b7ea399844c7aa;hpb=640073ecebc46040f966fe3b52c10f3c5b11d66f;p=ffmpeg diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp index 81df563b3bf..28ab928cd50 100644 --- a/libavdevice/decklink_enc.cpp +++ b/libavdevice/decklink_enc.cpp @@ -162,6 +162,10 @@ static int decklink_setup_video(AVFormatContext *avctx, AVStream *st) return -1; } + if (ff_decklink_set_configs(avctx, DIRECTION_OUT) < 0) { + av_log(avctx, AV_LOG_ERROR, "Could not set output configuration\n"); + return -1; + } if (ff_decklink_set_format(avctx, c->width, c->height, st->time_base.num, st->time_base.den, c->field_order)) { av_log(avctx, AV_LOG_ERROR, "Unsupported video size, framerate or field order!" @@ -317,7 +321,7 @@ static int decklink_write_video_packet(AVFormatContext *avctx, AVPacket *pkt) pthread_mutex_unlock(&ctx->mutex); /* Schedule frame for playback. */ - hr = ctx->dlo->ScheduleVideoFrame((struct IDeckLinkVideoFrame *) frame, + hr = ctx->dlo->ScheduleVideoFrame((class IDeckLinkVideoFrame *) frame, pkt->pts * ctx->bmd_tb_num, ctx->bmd_tb_num, ctx->bmd_tb_den); /* Pass ownership to DeckLink, or release on failure */ @@ -396,14 +400,14 @@ av_cold int ff_decklink_write_header(AVFormatContext *avctx) return AVERROR_EXIT; } - ret = ff_decklink_init_device(avctx, avctx->filename); + ret = ff_decklink_init_device(avctx, avctx->url); if (ret < 0) return ret; /* Get output device. */ if (ctx->dl->QueryInterface(IID_IDeckLinkOutput, (void **) &ctx->dlo) != S_OK) { av_log(avctx, AV_LOG_ERROR, "Could not open output device from '%s'\n", - avctx->filename); + avctx->url); ret = AVERROR(EIO); goto error; }