Lines Matching refs:ctx

125     struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx;
127 int64_t bmd_input = (cfg_id == bmdDeckLinkConfigAudioInputConnection) ? (int64_t)ctx->audio_input : (int64_t)ctx->video_input;
133 res = ctx->attr->GetInt(attr_id, &supported_connections);
142 res = ctx->cfg->SetInt(cfg_id, bmd_input);
167 struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx;
170 if (ctx->duplex_mode) {
175 if (ctx->dl->QueryInterface(IID_IDeckLinkProfileManager, (void **)&manager) == S_OK)
178 if (ctx->attr->GetFlag(BMDDeckLinkSupportsDuplexModeConfiguration, &duplex_supported) != S_OK)
187 if (ctx->duplex_mode < 0 || ctx->duplex_mode >= FF_ARRAY_ELEMS(decklink_profile_id_map))
189 bmd_profile_id = decklink_profile_id_map[ctx->duplex_mode];
197 res = ctx->cfg->SetInt(bmdDeckLinkConfigDuplexMode, ctx->duplex_mode == 2 ? bmdDuplexModeFull : bmdDuplexModeHalf);
202 av_log(avctx, AV_LOG_VERBOSE, "Successfully set duplex mode to %s duplex.\n", ctx->duplex_mode == 2 || ctx->duplex_mode == 4 ? "full" : "half");
217 res = ctx->cfg->SetInt(bmdDeckLinkConfigReferenceInputTimingOffset, cctx->timing_offset);
222 if (direction == DIRECTION_OUT && ctx->link > 0) {
223 res = ctx->cfg->SetInt(bmdDeckLinkConfigSDIOutputLinkConfiguration, ctx->link);
227 av_log(avctx, AV_LOG_VERBOSE, "Successfully set link configuration: 0x%x.\n", ctx->link);
228 if (ctx->link == bmdLinkConfigurationQuadLink && cctx->sqd >= 0) {
229 res = ctx->cfg->SetFlag(bmdDeckLinkConfigQuadLinkSDIVideoOutputSquareDivisionSplit, cctx->sqd);
240 if (ctx->attr->GetFlag(BMDDeckLinkSupportsSMPTELevelAOutput, &level_a_supported) != S_OK)
244 res = ctx->cfg->SetFlag(bmdDeckLinkConfigSMPTELevelAOutput, cctx->level_a);
264 struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx;
279 res = ctx->dli->GetDisplayModeIterator (&itermode);
281 res = ctx->dlo->GetDisplayModeIterator (&itermode);
294 ctx->bmd_mode = bmdModeUnknown;
295 while ((ctx->bmd_mode == bmdModeUnknown) && itermode->Next(&mode) == S_OK) {
310 ctx->bmd_mode = bmd_mode;
311 ctx->bmd_width = bmd_width;
312 ctx->bmd_height = bmd_height;
313 ctx->bmd_tb_den = bmd_tb_den;
314 ctx->bmd_tb_num = bmd_tb_num;
315 ctx->bmd_field_dominance = bmd_field_dominance;
318 (ctx->bmd_field_dominance==bmdLowerFieldFirst || ctx->bmd_field_dominance==bmdUpperFieldFirst)?"(i)":"");
327 if (ctx->bmd_mode == bmdModeUnknown)
332 BMDDisplayMode actualMode = ctx->bmd_mode;
333 if (ctx->dli->DoesSupportVideoMode(ctx->video_input, ctx->bmd_mode, ctx->raw_format,
335 &actualMode, &support) != S_OK || !support || ctx->bmd_mode != actualMode)
338 BMDDisplayMode actualMode = ctx->bmd_mode;
339 if (ctx->dlo->DoesSupportVideoMode(bmdVideoConnectionUnspecified, ctx->bmd_mode, ctx->raw_format,
341 &actualMode, &support) != S_OK || !support || ctx->bmd_mode != actualMode)
347 if (ctx->dli->DoesSupportVideoMode(ctx->video_input, ctx->bmd_mode, ctx->raw_format,
352 BMDDisplayMode actualMode = ctx->bmd_mode;
353 if (ctx->dlo->DoesSupportVideoMode(bmdVideoConnectionUnspecified, ctx->bmd_mode, ctx->raw_format,
355 &actualMode, &support) != S_OK || !support || ctx->bmd_mode != actualMode) {
364 if (ctx->dli->DoesSupportVideoMode(ctx->bmd_mode, ctx->raw_format,
369 if (!ctx->supports_vanc || ctx->dlo->DoesSupportVideoMode(ctx->bmd_mode, ctx->raw_format,
373 if (ctx->dlo->DoesSupportVideoMode(ctx->bmd_mode, ctx->raw_format,
378 ctx->supports_vanc = 0;
490 struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx;
504 res = ctx->dli->GetDisplayModeIterator (&itermode);
506 res = ctx->dlo->GetDisplayModeIterator (&itermode);
541 struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx;
543 if (ctx->dli)
544 ctx->dli->Release();
545 if (ctx->dlo)
546 ctx->dlo->Release();
547 if (ctx->attr)
548 ctx->attr->Release();
549 if (ctx->cfg)
550 ctx->cfg->Release();
551 if (ctx->dl)
552 ctx->dl->Release();
558 struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx;
572 ctx->dl = dl;
580 if (!ctx->dl)
583 if (ctx->dl->QueryInterface(IID_IDeckLinkConfiguration, (void **)&ctx->cfg) != S_OK) {
589 if (ctx->dl->QueryInterface(IID_IDeckLinkProfileAttributes, (void **)&ctx->attr) != S_OK) {