Skip to content

Changing format of VideoInput #2103

Answered by Zjaun
Zjaun asked this question in Q&A
Sep 26, 2023 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

Okay I have found a solution for this. I created a custom VideoInputFrameGrabber class that checks if the parameter of setFormat() is formats (VI_NTSC_M, VI_PAL_B, etc) or media subtypes (RGB24, RGB32, RGB555, etc.). I also think that the FrameGrabber class has to be modified as well, since the setFormat() method returns a boolean, whereas the setRequestedMediaSubType() method does not. That must return a boolean so that the custom VideoInputFrameGrabber class that I modified also throws an exception.

This is how I implemented my solution (if you have a better solution, please comment it here!)

public void start(int connection) throws Exception {
        myVideoInput = new videoInput();
 …

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@Zjaun
Comment options

Comment options

You must be logged in to vote
2 replies
@saudet
Comment options

@saudet
Comment options

Answer selected by saudet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants