Lines Matching refs:videoFrame
589 static void handle_klv(AVFormatContext *avctx, decklink_ctx *ctx, IDeckLinkVideoInputFrame *videoFrame, int64_t pts)
604 if (videoFrame->QueryInterface(IID_IDeckLinkVideoFrameAncillaryPackets, (void**)&packets) != S_OK)
738 static int64_t get_pkt_pts(IDeckLinkVideoInputFrame *videoFrame,
756 if (videoFrame)
757 res = videoFrame->GetStreamTime(&bmd_pts, &bmd_duration, time_base.den);
760 if (videoFrame)
761 res = videoFrame->GetHardwareReferenceTimestamp(time_base.den, &bmd_pts, &bmd_duration);
792 static int get_bmd_timecode(AVFormatContext *avctx, AVTimecode *tc, AVRational frame_rate, BMDTimecodeFormat tc_format, IDeckLinkVideoInputFrame *videoFrame)
801 if (videoFrame->GetTimecode(tc_format, &timecode) == S_OK) {
814 static int get_frame_timecode(AVFormatContext *avctx, decklink_ctx *ctx, AVTimecode *tc, IDeckLinkVideoInputFrame *videoFrame)
824 ret = get_bmd_timecode(avctx, tc, frame_rate, bmdTimecodeRP188HighFrameRate, videoFrame);
827 ret = get_bmd_timecode(avctx, tc, frame_rate, bmdTimecodeRP188VITC1, videoFrame);
829 ret = get_bmd_timecode(avctx, tc, frame_rate, bmdTimecodeRP188VITC2, videoFrame);
831 ret = get_bmd_timecode(avctx, tc, frame_rate, bmdTimecodeRP188LTC, videoFrame);
833 ret = get_bmd_timecode(avctx, tc, frame_rate, ctx->tc_format, videoFrame);
839 IDeckLinkVideoInputFrame *videoFrame, IDeckLinkAudioInputPacket *audioFrame)
849 if (videoFrame && !(videoFrame->GetFlags() & bmdFrameHasNoInputSource) &&
874 if (videoFrame) {
881 videoFrame->GetRowBytes() * videoFrame->GetHeight(),
885 videoFrame->GetBytes(&frameBytes);
886 videoFrame->GetStreamTime(&frameTime, &frameDuration,
889 if (videoFrame->GetFlags() & bmdFrameHasNoInputSource) {
890 if (ctx->draw_bars && videoFrame->GetPixelFormat() == bmdFormat8BitYUV) {
894 int width = videoFrame->GetWidth();
895 int height = videoFrame->GetHeight();
919 if (get_frame_timecode(avctx, ctx, &tcr, videoFrame) >= 0) {
963 pkt.pts = get_pkt_pts(videoFrame, audioFrame, wallclock, abs_wallclock, ctx->video_pts_source, ctx->video_st->time_base, &initial_video_pts, cctx->copyts);
971 pkt.size = videoFrame->GetRowBytes() *
972 videoFrame->GetHeight();
982 handle_klv(avctx, ctx, videoFrame, pkt.pts);
985 if (videoFrame->GetAncillaryData(&vanc) == S_OK) {
994 av_assert0(videoFrame->GetWidth() == 720);
1008 if (vanc_format == bmdFormat10BitYUV && videoFrame->GetWidth() <= MAX_WIDTH_VANC) {
1014 size_t vanc_size = videoFrame->GetWidth();
1015 if (ctx->bmd_mode == bmdModeNTSC && videoFrame->GetWidth() * 2 <= MAX_WIDTH_VANC) {
1017 unpack_v210(vanc, buf, videoFrame->GetWidth());
1019 extract_luma_from_v210(vanc, buf, videoFrame->GetWidth());
1048 pkt.buf = av_buffer_create(pkt.data, pkt.size, decklink_object_free, videoFrame, 0);
1050 videoFrame->AddRef();
1066 pkt.pts = get_pkt_pts(videoFrame, audioFrame, wallclock, abs_wallclock, ctx->audio_pts_source, ctx->audio_st->time_base, &initial_audio_pts, cctx->copyts);