Decklink changing output resolution sometimes fails

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

Russ Srole

  • Posts: 5
  • Joined: Wed Jun 13, 2018 10:06 pm
  • Real Name: Russ Srole

Decklink changing output resolution sometimes fails

PostWed Jun 13, 2018 10:12 pm

Using a Decklink Duo 2. Code is in C#
I wrote a program that gets frames or audio and video from NDI. Let's say I'm getting 1080i 59.94 and outputting on channel 0. If the user changes source and the new source is a different resolution then currently used, sometimes EnableVideoOutput fails. If I use channel 1 then it's ok. And if I shutdown the output and try on channel 0 again, it will succeed. It almost looks like some sort of timing thing, where the Duo needs a bit of time to accept the new EnableVideoOutput. This little program is only getting 720p 59.94 and 1080i 59.94 so I know those are supported. I do the drill to check, but, of course that never fails. Any ideas?
Offline

Cameron Nichols

Blackmagic Design

  • Posts: 442
  • Joined: Mon Sep 04, 2017 4:05 am

Re: Decklink changing output resolution sometimes fails

PostMon Jun 18, 2018 3:37 am

Hi Russ,

Are you able to share your test application? Please can you send to the developer support email found in the Overview section of the DeckLink SDK Manual.

Thanks
Cameron
Offline

Russ Srole

  • Posts: 5
  • Joined: Wed Jun 13, 2018 10:06 pm
  • Real Name: Russ Srole

Re: Decklink changing output resolution sometimes fails

PostThu Aug 02, 2018 6:29 pm

Cameron,

Thanks for replying. I got busy on other things and didn't have time to deal with this problem. I'm back on it now. I can't post the code, but after playing around a bit I've found that _deckLinkOutput.DisableVideoOutput(); and _deckLinkOutput.DisableAudioOutput(); fail pretty consistently after outputting audio and video. I have an Init flag that is set false when trying to change or reset the outputs, so that no video or audio is written to the outputs, while trying to disable them. I wait 100ms before trying the above to make sure we're not in the middle of writing to the outputs.

Just to give you more info: let's say I'm outputting at 720p 59.94 and just shut down sdi output, wait a bit and then try and restart it. Most of the time the disables will fail, but the 1st time I retry to enable audio and video, it will succeed. But if I try again, using the same method, the diables will fail and so will the enables. Of course, in real life, once it's set at a resolution, it will probably stay that way for a good long while. But I'd like to get it so that changes don't fail.

I updated the drivers to 10.11.1 this morning to see if that helped, but no luck.

Any ideas?

thanks
Russ
Offline

Cameron Nichols

Blackmagic Design

  • Posts: 442
  • Joined: Mon Sep 04, 2017 4:05 am

Re: Decklink changing output resolution sometimes fails

PostTue Aug 14, 2018 4:20 am

Hi Russ,

If you are scheduling your output video, you should call IDeckLinkOutput::StopScheduledPlayback, then wait until IDeckLinkVideoOutputCallback::ScheduledPlaybackHasStopped callback before calling DisableVideoOutput, otherwise this call will fail. You should use synchronization (eg mutex) to signal between callback and thread that shutdowns output.

What HRESULT are you getting on DisableVideoOutput call?

Regards
Cameron

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 12 guests