[FFmpeg-devel] [PATCH] Add input support for DeckLink devices.

Amnon Israely amnonbb at gmail.com
Fri Sep 19 17:53:02 CEST 2014


>
>
> What do you think might be the problem here?
>
>
I changed streams order in deckling_dec.cpp
and Video now on 0:0


/* Setup streams. */

    st = avformat_new_stream(avctx, NULL);

    if (!st) {

        av_log(avctx, AV_LOG_ERROR, "Cannot add stream\n");

        goto error;

    }

    st->codec->codec_type  = AVMEDIA_TYPE_VIDEO;

    st->codec->codec_id    = AV_CODEC_ID_RAWVIDEO;

    st->codec->width       = ctx->bmd_width;

    st->codec->height      = ctx->bmd_height;


    st->codec->pix_fmt     = AV_PIX_FMT_UYVY422;

    st->codec->time_base.den      = ctx->bmd_tb_den;

    st->codec->time_base.num      = ctx->bmd_tb_num;

    st->codec->bit_rate    = avpicture_get_size(st->codec->pix_fmt,
ctx->bmd_width, ctx->bmd_height) * 1/av_q2d(st->codec->time_base) * 8;

    st->codec->codec_tag   = MKTAG('U', 'Y', 'V', 'Y');


    avpriv_set_pts_info(st, 64, 1, 1000000);  /* 64 bits pts in us */


    ctx->video_st=st;


    st = avformat_new_stream(avctx, NULL);

    if (!st) {

        av_log(avctx, AV_LOG_ERROR, "Cannot add stream\n");

        goto error;

    }

    st->codec->codec_type  = AVMEDIA_TYPE_AUDIO;

    st->codec->codec_id    = AV_CODEC_ID_PCM_S16LE;

    st->codec->sample_rate = bmdAudioSampleRate48kHz;

    st->codec->channels    = 8;

    avpriv_set_pts_info(st, 64, 1, 1000000);  /* 64 bits pts in us */

    ctx->audio_st=st;


More information about the ffmpeg-devel mailing list