Open triwav opened 10 years ago
You can probably do this via the SDK regardless of OS. Using BMDIdleVideoOutputOperation (bmdDeckLinkConfigVideoOutputIdleOperation).
Thanks for the suggestion. I was thinking this was something in the SDK as well. I think that's actually referring to something else though. I haven't had a chance to test it but I believe bmdcapture is actually making its own bars. If you look here: https://github.com/lu-zero/bmdtools/blob/master/bmdcapture.cpp#L384-L395 you'll notice it makes a bars array and then iterates over the video frame size. The one thing I can't figure out is it iterates over every height by one but it seems like it skips every other width. I'm not a C++ programmer so I'm not sure why that is. It looks the variable p is a reference to frameBytes which perhaps is an array or some other structure I'm not familiar with. I'll do some experimenting though and see what I can figure out.
I can update it to do that, thanks for the idea =)
I appreciate it. I was able to figure out the black video pretty easily by just doing
for (int y = 0; y < height; y++) { for (int x = 0; x < width; x += 2) *p++ = 0x10801080; }
(although if you just don't do anything it also appears to be black. What I couldn't figure out is how to show the last valid frame which is the ideal one for me. I tried assigning a reference to frameBytes and iterating forward and backward on the memory pointer to try and repeat but it always ended up being black. Thanks for your help on this.
So right now when the input gets dropped, it immediately switches to color bars. I know in the Mac and Windows software there is any option to change this to either black or the last frame of video. I'm not sure if the Linux SDK has something similar that could be tapped into to bring this about.