PreviewWindow::DrawFrame painting a white rectangle

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

gavin1965

  • Posts: 4
  • Joined: Tue Oct 30, 2018 11:22 pm
  • Real Name: Gavin Jung

PreviewWindow::DrawFrame painting a white rectangle

PostTue Oct 30, 2018 11:44 pm

I'm sure I've just missed something hopefully simple, but I cannot get any of the samples to render the preview from a camera like the Media Express app. I did however build and successfully save an image in the CaptureStills console app. Any idea why the preview doesn't seem to be working? Calling IDeckLinkVideoFrame::GetBytes(void**) returns a buffer of bytes all with the value 128.
Offline

Cameron Nichols

Blackmagic Design

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

Re: PreviewWindow::DrawFrame painting a white rectangle

PostWed Oct 31, 2018 4:20 am

Hi Gavin,

I'm not aware on any issues with IDeckLinkScreenPreviewCallback::DrawFrame callback. Do you see anything with the CapturePreview/CapturePreviewCSharp samples?

What Desktop Video version, OS, DeckLink card, display mode are you running?

Regards
Cameron
Offline

gavin1965

  • Posts: 4
  • Joined: Tue Oct 30, 2018 11:22 pm
  • Real Name: Gavin Jung

Re: PreviewWindow::DrawFrame painting a white rectangle

PostWed Oct 31, 2018 2:42 pm

I've got an Intensity Pro 4K card in a Windows 7 PC with Desktop Video version 10.9.12.0. Perhaps it's the display mode that I need to get my head around. If auto-detect is checked in the CapturePreview, it selects 1080p59.94 every time. I have not been able to build the C# sample so far; it fails with the error: 'DirectX' does not exist in the namespace 'Microsoft' and to be honest, I haven't gone down that rabbit hole yet since I'm coding support for this card to an existing C++ solution. Everything seems to work fine with regard to discovery of the card, the message handlers are being called, but the image is a solid white rectangle. Forgive my lack of knowledge, I'm a code monkey that's new to this sort of thing.
Offline

gavin1965

  • Posts: 4
  • Joined: Tue Oct 30, 2018 11:22 pm
  • Real Name: Gavin Jung

Re: PreviewWindow::DrawFrame painting a white rectangle

PostWed Oct 31, 2018 8:57 pm

I just got back to this project and realized that if I uncheck "Apply detected input format" then the message "No valid input signal" becomes visible. Please forgive a novice question but am I missing another step to start the camera signal to the capture card? Is there something extra the Media Express application is doing to start the preview?
Offline

Steve Miles

  • Posts: 4
  • Joined: Sat Aug 01, 2015 3:41 pm

Re: PreviewWindow::DrawFrame painting a white rectangle

PostThu Nov 08, 2018 11:34 pm

One thing I like to do when I'm not sure about the input is use MediaExpress to display the incoming signal. Then at least you know you have some input. MediaExpress will adapt to whatever format is coming in. Once you know you have good input, you can then determine if your application is setting the card up to receive the proper format. If there is a mis-match, you will get a blank display. I usually see black, but I suppose the cards could be configured to do something else.

Steve
Offline

gavin1965

  • Posts: 4
  • Joined: Tue Oct 30, 2018 11:22 pm
  • Real Name: Gavin Jung

Re: PreviewWindow::DrawFrame painting a white rectangle

PostFri Nov 16, 2018 6:59 pm

First of all, thanks for your response. I got pulled onto another task for a bit and just getting back to this. MediaExpress displays a preview as does the C# sample, CapturePreviewCSharp. Both appear to auto-select 1080p59.94 and implement DirectX rather than OpenGL. On Cameron's advice, I've switched the CapturePreview to implement IDeckLinkDX9ScreenPreviewHelper and now in DrawFrame I get a black rectangle in the C++ version. I've stepped through both C++ and C# versions and confirmed the exact calls are being made successfully, all callbacks are working, video input modes are identical. I noticed the SDK only ships with examples of DirectX in C#. I wonder if there are known issues with IDeckLinkDX9ScreenPreviewHelper in C++? When you mention the application "setting the card up to receive the proper format", you mean calling EnableVideoInput(displayMode, bmdFormat8BitYUV, videoInputFlags), right? Identical parameters in both C# and C++ result in very different behavior. Unfortunately for me, I need to add support to a legacy C++ application. Thanks again. All suggestions are very much appreciated!

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 36 guests