Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change behavior on input change #38

Open
triwav opened this issue Oct 20, 2014 · 4 comments
Open

Change behavior on input change #38

triwav opened this issue Oct 20, 2014 · 4 comments

Comments

@triwav
Copy link

triwav commented Oct 20, 2014

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).
@haakonnessjoen
Copy link

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

@triwav
Copy link
Author

triwav commented Oct 20, 2014

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.

@lu-zero
Copy link
Owner

lu-zero commented Oct 30, 2014

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

@triwav
Copy link
Author

triwav commented Oct 31, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants