Need help with new Engine

Discuss issues related to PS3 Media Server development (only for programmers)

Need help with new Engine

Postby nexzus » Fri Oct 12, 2012 9:33 pm

Hi,

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[0]) 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.
nexzus
 
Posts: 5
Joined: Tue Sep 11, 2012 11:03 pm

Re: Need help with new Engine

Postby chocolateboy » Sat Oct 13, 2012 5:05 am

nexzus wrote: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.


There are easier ways to do this:


If you still prefer to write your own, then take a look at the PMSEncoder code for an example of how to implement a player plugin.

Still not sure of the purpose of the finalizeTranscoderArgs function.


viewtopic.php?f=11&t=11282
chocolateboy
Project Member
 
Posts: 2579
Joined: Wed Sep 16, 2009 10:05 am


Return to Developers

Who is online

Users browsing this forum: No registered users and 4 guests