[MPlayer-users] Calling from execl() in slave mode

Javier Castle II forlorn_beast at hotmail.com
Fri Feb 1 22:06:10 CET 2008



----------------------------------------
> Date: Fri, 1 Feb 2008 21:15:33 +0100
> From: Reimar.Doeffinger at stud.uni-karlsruhe.de
> To: mplayer-users at mplayerhq.hu
> Subject: Re: [MPlayer-users] Calling from execl() in slave mode
> 
> Hello,
> On Fri, Feb 01, 2008 at 01:42:33PM -0600, Javier Castle II wrote:
>> Hello everyone, don't now if I just don't have enough experience or am missing something trivial here. I am trying to call 
>mplayer from a program in C and I am using the code execlp("mplayer","-slave",NULL); to call mplayer in the slave mode. It  
>exits showing command list with no file to play. I thought that it would stay open waiting command. It does play when I 
>pass a file to play. But when the file is done, it also exits. Am I passing the parameter incorrectly? or is it something else? 
>Any insight or links to more documentation would be helpful. Thanks.
> 
> You obviously missed the following part of man execl:
> "The first argument, by convention,  should point  to the filename
> associated with the file being executed."
> So you are not passing any arguments at all to MPlayer, you are only
> telling it that its binary is name "-slave" (liar! ;-) ).
> And I think you will also want -idle in addition to -slave.
> And please use proper line breaks in future emails.
> 
> Greetings,
> Reimar Döffinger
> _______________________________________________
> MPlayer-users mailing list
> MPlayer-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users

Well, thanks for pointing out the trivial thing. So I will change it to:
execlp("mplayer","mplayer","-slave","-idle",NULL);
Then I can go ahead and make it play other files with loadfile through the pipe right?
Well, I guess it's back to testing.
P.S. I use hotmail to write these messages but I will use shift+enter to force line breaks in the emails.

Thank you very much
-Fororn
_________________________________________________________________
Need to know the score, the latest news, or you need your Hotmail®-get your "fix".
http://www.msnmobilefix.com/Default.aspx


More information about the MPlayer-users mailing list