I'm trying to develop a plugin to control/stream from an HDHomeRun device. After abandoning an attempt to extend MencoderWebVideo to play the UDP stream from the device, I've decided to try and create my own engine, and I just need some help with how this all works together.
The device comes with a commandline program to configure and work with it, including the ability to pipe the stream (MPEG2 video, AC3 over an MPEGTS stream, so it shouldn't need transcoding) directly to stdout. For clarity, a sample instance would be "hdhomerun_config <deviceid> save /tuner# -"
So I created my external Plugin, extended Player with all the needed members overridden, and it's able to register the player, identify the name, etc, and it shows up in the PMS gui. I'm following VideoLanVideoStreaming as its seems closest to what I'm trying to, and is the most clear (ie, least amount of flags and options)
launchTranscode and its associated pipes and processwrappers is what I need some help with.
So I create a new PipeProcess with a name of my choosing (looks like the convention is the name of the engine + epoch time or whatever Java's currentTimeMilliseconds returns) and start the pipe.
So then assign the first element of array attribute input_pipes of the OutputParams argument of launchTranscode (input_pipes) to the pipe I just created.
Question 1: Looks like OutputParams allocates 2 input_pipes. Is this for Encoders that need a separate audio and video pipe?
Then I build up the command list to start the "encoding" executable and add the arguments that I need to it.
Then I pass this command list as a string array into finalizeTranscoderArgs, where it returns itself?
Question 2: Still not sure of the purpose of the finalizeTranscoderArgs function. It would seem to be legacy, as none of the built in encoders, nor indeed really anything, implements FinalizeTranscoderArgsListener
So then I use a ProcessWrapperImpl to actually start my transcoder, and attach my PipeProcess to it.
Question 3: So my process is running and sending its output to the pipe I created. Is ProcessWrapperImpl grabbing the output from the pipe and sending it the PS3? From the looks of it, and how the device program works, I'll need to set keepStdOut to true to capture the stream?
Appreciate any input on this. Thank you.