On 7/10/07, Duncan Webb <[EMAIL PROTECTED]> wrote: > > You can now use a list or a tuple for the VCR_CMD and it will process > the arguments, needs a bit of testing :) So: > > VCR_CMD = [ CONF.mplayer, '-dumpstream', '-dumpfile', '%(filename)s' > 'dvb://%(channel)s' ] > > Should work.
Indeed. However I've realised this is papering over the cracks. childapp.py now never invokes a shell, and tries to split a string, if given to it, into a series of arguments. The problem with VCR_CMD was when it contained quotes which used to be used by the shell to indicate a single argument containing spaces. This never happened though, as the DVB channels was substituted after the split. However, I've just switched to using mplayer for all my playback (including TV) as I've got the openchrome patch successfully applied. tv/plugins/mplayer.py builds up and passes the following to childapp.py for BBC One: /usr/local/bin/mplayer -vo xvmc:bobdeint,xv -ao oss:/dev/dsp -autosync 100 -nolirc -nojoystick -autoq 100 -screenw 800 -screenh 600 -fs -slave "dvb://BBC ONE" -cache 5000 This works fine when pasted into the shell, as the quotes around "dvb://BBC ONE" mean it gets sent as a single argument. childappy.py splits this on whitespace, adding an extra debug line shows the actual arguments then executed: /usr/local/bin/mplayer -vo,xvmc:bobdeint,xv -ao oss:/dev/dsp -autosync 100 -nolirc -nojoystick -autoq,100 -screenw 800 -screenh 600 -fs -slave "dvb://BBC ONE" -cache 5000 Obviously this is wrong. I see three solutions, all quite involved: 1) The right way: change any plugin which invokes childapp.py to pass a tuple and deprecate the string-based interface. 2) The bodge: improve the splitting of strings into arguments to take into account quotes. 3) The ugly hack: if a string is passed to childapp.py, invoke a shell, otherwise invoke the command directly. Any thoughts? Cheers, Andrew -- Andrew Flegg -- mailto:[EMAIL PROTECTED] | http://www.bleb.org/ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel