0

I would like to write a C++ program that outputs color patches to a monitor via a DeckLink card and samples the signal of a camera which is filming that monitor and also connected to the computer via a DeckLink card.

Is there something like a minimal working example for just sending a single solid color patch continuously to a DeckLink output? I've looked through the examples that come with the DeckLink SDK (specifically SignalGenerator and TestPattern), but they seem to contain a lot more code than I actually need.

I've also read the seemingly relevant parts of the SDK documentation, but I'm new to C++ so it's all a little overwhelming to me. I think it would be very helpful if I could just see the absolute minimum amount of code required to output one solid color for as long as the program is running.

Daniel A. White
  • 187,200
  • 47
  • 362
  • 445
  • Welcome to stackoverflow.com. Please take some time to read [the help pages](http://stackoverflow.com/help), especially the sections named ["What topics can I ask about here?"](http://stackoverflow.com/help/on-topic) and ["What types of questions should I avoid asking?"](http://stackoverflow.com/help/dont-ask). Also please take the [tour] and read about [ask] good questions. Lastly please read [this question checklist](https://codeblog.jonskeet.uk/2012/11/24/stack-overflow-question-checklist/). – Some programmer dude Nov 22 '21 at 10:17
  • 2
    And if you're new to C++ (or programming in general) then perhaps this is a little to much? Perhaps you might need to take a step or two back, and learn more first? While it's sometimes good to push a *little* beyond ones circle of knowledge, going too far will just be overwhelming. – Some programmer dude Nov 22 '21 at 10:19

1 Answers1

0

Is there a particular reason to do this in C++? If you're just outputting Colourbars or other trivial things you might be better off using gstreamer. Particulary its gst-launch utility. As far as i'm aware gstreamer has support for blackmagics DeckLink Cards for both input and output of video/audio via it's decklink-plugins.

a simple (and UNTESTED!) example might look like this:

gst-launch-1.0 videotestsrc ! videoconvert ! decklinkvideosink device-number=0 mode=1080p25 

I dont have one of these cards available to me so i can't verify the pipeline above.

mantis
  • 11
  • 1
  • I don't necessarily need to do it in C++, it just seemed like the best option because that's what the Blackmagic SDK documentation refers to (also, I've wanted to learn it for a while). Thanks for the hint with gstreamer! I was able to output a color patch like this: `gst-launch-1.0 videotestsrc pattern=solid-color foreground-color=0xff0000ff ! decklinkvideosink device-number=0 mode=1080p25` I only have an output card available right now, as soon as my capture card arrives I'll be able to test if I can do everything I need with gstreamer. – filmmakerto Nov 22 '21 at 16:29