Page 1 of 1

Video_splitter component

Posted: Sat Apr 20, 2013 10:52 pm
by Danara
I am quite intrigued by the video_splitter OMX component. Has anybody been able to make this work? I have been unable to locate much of anything in the way of example code for any platform, let alone the RPi. Anybody used this component yet?

Re: Video_splitter component

Posted: Sun Apr 21, 2013 8:04 am
by dickon
Yeah. omxtx can use it when in 'monitor' mode (which basically dumps the output of the decoder into the splitter, and one of its outputs into the renderer). Did it as a bit of fun over christmas.

Re: Video_splitter component

Posted: Sun Apr 21, 2013 3:05 pm
by Danara
It would be nice if we could "fill-out" examples for all the omx components, like the existing ones under Hello_pi. It is much easier to learn how to use them when you have a working example to start with.
Video splitter is one, but there are others I would like to see as well.

Re: Video_splitter component

Posted: Sun Apr 21, 2013 3:54 pm
by dickon
TBH, they're all pretty similar: obtain handle, set ports to Disabled, allocate buffers / sort out tunnels, set ports to Enabled, transition to Executing, feed data / collect data as appropriate.

Really, you just need to read and understand the OpenMAX specification, and the hello_pi/* examples and the likes of the omxplayer source code should help with that. omxtx's monitor mode took me about two hours to implement, once I decided to look into how to do it; I think the resizer was similar (there's only one extra component to worry about with that rather than two), and the deinterlacer similar (because I restructured the tunnelling setup to make it easier to bolt components in and out).

Re: Video_splitter component

Posted: Sun Apr 21, 2013 4:20 pm
by Danara
I've done a lot of that too, but the learning curve for people not familiar with it is pretty steep. The hello_pi examples are very useful for people learning to program on this platform -- I just think it would be helpful if there were more working simple examples covering some of the other components, like the splitter.

Re: Video_splitter component

Posted: Sun Apr 21, 2013 6:40 pm
by dickon
Personally, I think that by the time you're ready to use the splitter -- fairly advanced usage, by any stretch -- you should be fairly clear about what you need to do to drive it.