bmdtools icon indicating copy to clipboard operation
bmdtools copied to clipboard

Change behavior on input change

Open triwav opened this issue 11 years ago • 4 comments

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.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/5403699-change-behavior-on-input-change?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github).

triwav avatar Oct 20 '14 14:10 triwav

You can probably do this via the SDK regardless of OS. Using BMDIdleVideoOutputOperation (bmdDeckLinkConfigVideoOutputIdleOperation).

haakonnessjoen avatar Oct 20 '14 14:10 haakonnessjoen

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.

triwav avatar Oct 20 '14 19:10 triwav

I can update it to do that, thanks for the idea =)

lu-zero avatar Oct 30 '14 23:10 lu-zero

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.

triwav avatar Oct 31 '14 11:10 triwav