bmdDeckLinkConfigClockTimingAdjustment and GetHardwareRefere

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

Paweł Kołodziej

  • Posts: 5
  • Joined: Tue Sep 08, 2015 8:09 am
  • Location: Poland

bmdDeckLinkConfigClockTimingAdjustment and GetHardwareRefere

PostMon Oct 18, 2021 1:18 pm

I am using SDK to output frames decoded previously from live tv mpeg-ts.
In order to keep synchronization between input signal and SDI I keep track of PCR and compare it with clock provided by SDK using GetHardwareReferenceClock() method. The resulting difference is fed into bmdDeckLinkConfigClockTimingAdjustment().

Unfortunatelly, for quite a while I have issues with adjusting the output timing, which results in lack of synchronization and buffer over or underflow.

Today I have made a bunch of tests and find out that upgrading from desktopvideo_11.3a7_amd64.deb to desktopvideo_11.4a14_amd64.deb is the cause of the issues.

There was a change made in 11.4 that may be the cause of the problem:
Code: Select all
Changes in Blackmagic DeckLink SDK 11.4
   - Updated Interfaces
      - IDeckLinkOutput
         - The base time for GetHardwareReferenceClock hardware reference time output has changed for consistency with GetFrameCompletionReferenceTimestamp method


Can anyone elaborate about the change, especially if it requires any changes in the source of the application?

I see two possible issues:
1) bmdDeckLinkConfigClockTimingAdjustment() not working at all,
2) GetHardwareReferenceClock() returning a time which is no longer affected by bmdDeckLinkConfigClockTimingAdjustment() and thus providing wrong PCR_offset calculation.

Bellow are two graphs showing relation between the adjustment and PCR_offset.
The adjustment is detached from the regulation mechanism and is alternatively switch every 2 minutes from -127 to 127.
As you can see there is no relation in 11.4.

desktopvideo_11.3a7_amd64.deb
decklink_adjustment_11.3.png
decklink_adjustment_11.3.png (44.64 KiB) Viewed 1544 times


desktopvideo_11.4a14_amd64.deb
decklink_adjustment_11.4.png
decklink_adjustment_11.4.png (42.09 KiB) Viewed 1544 times


Does anyone have any idea how to fix it?
Offline

Cameron Nichols

Blackmagic Design

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

Re: bmdDeckLinkConfigClockTimingAdjustment and GetHardwareRe

PostFri Oct 29, 2021 4:32 am

Hi Pawel,

With IDeckLinkOutput::GetHardwareReferenceClock issue, please update to Desktop Video 12.2.

For configuration item bmdDeckLinkConfigClockTimingAdjustment, are you checking attribute flag BMDDeckLinkSupportsClockTimingAdjustment to ensure that this feature is supported?

Regards
Cameron

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 11 guests