VB.Net DeckLink SDK convert from YUV to RGB

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

Francois Genolini

  • Posts: 3
  • Joined: Tue Feb 10, 2015 11:16 am

VB.Net DeckLink SDK convert from YUV to RGB

PostTue Feb 10, 2015 11:44 am

Hi,

I have an Intensity Shuttle that I needed to program in VB to display the input video in WPF: thanks to the speedy response of tech support and the developer support guys I now have a way forward.

Before I had NTSC video sources and all worked with DirectShow.NET and DirectX.NET.
I then used a PAL composite video (analogue SD) connected to the "VIDEO IN" BNC connector... and the code broke.

It turned out that the open source DirectShow.NET was not setting the video size correctly. After taking example from the Blackmagic Design SDK (DirectShow DeckLink Capture sample), I can now use a PAL video camera in VB.NET using a heavily modified DirectShow.NET and DirectX.NET.

I will clean up my changes and put out a branch of DirectShow.NET and DirectX.NET on my github later on.

Thanks again to all for their help.

Regards,

Francois Genolini
Software Engineer
Aberdeen, Scotland
Offline

Brad Griswold

  • Posts: 4
  • Joined: Wed Feb 11, 2015 6:37 pm

Re: VB.Net DeckLink SDK convert from YUV to RGB

PostWed Feb 11, 2015 6:41 pm

Greetings Francois,

Is your code something you would be willing to link to on GitHub - I too am working in .NET (WPF/C#) on a project and its helpful to have working code to reference as I work on my own solution. Thanks!

-Brad Griswold
Offline

Francois Genolini

  • Posts: 3
  • Joined: Tue Feb 10, 2015 11:16 am

Re: VB.Net DeckLink SDK convert from YUV to RGB

PostThu Feb 12, 2015 10:22 am

Hi,

Thanks for the interest.

The VB.Net code is commercial (interface to a number of sensors, not just cameras, so not of general interest... and copyrighted), but I could put up a reasonably equivalent C# (for .Net 4.5) and WPF up at the same time.

My modifications ended up being limited to DirectX.Capture/VideoCapabilities.cs and DirectX.Capture/Capture.cs

As for my own VB / C# Code, this modification basically let me set the FrameSize (which did not originally work with a Blackmagic Design DeckLink Intensity Shuttle).

My .Net code is now something like:

Code: Select all
DirectX.Capture.Capture capture = new DirectX.Capture.Capture(index_of_DeckLink_device);
capture.FrameSize = new Size(720, 576);


This second statement now works, whereas before it threw an exception because the IAMStreamConfig.SetFormat API was sent data that could never work: only the Width and Height were set, and the AvgTimePerFrame, BitRate, BitCount and other parameters were not correspondingly updated.

I will need to check with my employer if I can put my changes on GitHub, and as soon as I have that reassurance, I will put my modified DirectX.Capture on my GitHub.

Regards,

Francois Genolini
Software Engineer
Aberdeen, Scotland
Offline

Brad Griswold

  • Posts: 4
  • Joined: Wed Feb 11, 2015 6:37 pm

Re: VB.Net DeckLink SDK convert from YUV to RGB

PostTue Feb 17, 2015 9:17 pm

Thanks Francois! Appreciate the consideration!

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 41 guests