[MPlayer-users] I think I met the ''pausing loadfile" in slave mode doesn't pause problem too
Chen Zheng
nkchenz at gmail.com
Mon Sep 29 12:57:54 CEST 2008
Hi Bart,
I think I get it. When you first time start slave mode, or mplayer
has nothing to play, it enters to idle mode, start from
mplayer.c
2672 play_next_file:
2733 while (!(cmd = mp_input_get_cmd(0,1,0))) {
here we get a cmd 'pausing loadfile 1.mp3', in the next swtich we
only process it but did not call run_command, so the context
mpctx->osd_function = OSD_PAUSE is not set.
so idle mode 'pausing loadfile' just doesn't work. If mplayer is
playing something, 'pausing loadfile' works fine, because in
key_events module, run_command is called so the mpctx is right.
3516 while( !brk_cmd && (cmd = mp_input_get_cmd(0,0,0)) != NULL) {
3517 brk_cmd = run_command(mpctx, cmd);
3518 mp_cmd_free(cmd);
Patch attached.
Cheers
Chenz
ps. If there is a command which can load a new file and start playing
from a given offset in idle slave mode, that will be nice and exactly
what I want. using two command loadfile and seek is not desirable,
because there will be unwanted frames played.
2008/9/28 Bart van Deenen <info at vandeenensupport.com>:
> On Sunday 28 September 2008 04:15:29 you wrote:
>> 2008/9/28 Bart van Deenen <info at vandeenensupport.com>:
>> > On Saturday 27 September 2008 14:45:44 you wrote:
>> >> Have you got any solutions?
>> >
>> > Hi Zheng
>> >
>> > I control mplayer from a java application, and immediately after
>> > loadfile, i execute 'pausing get_property length' which forces a pause.
>> > It's not elegant but it works, especially since I start the mplayer in a
>> > hidden window, so that a very short display of one or two frames doesn't
>> > matter.
>> >
>> > Bart
>>
>> Thank you, Bart. It's cute, but unfortunately I'm do something with
>> audio, and even if I set mute on
>> before loadfile, several frames unwanted still can be heard. It looks
>> like loadfile resets volume to default
>> automatically everytime.
> Oops
>
> I haven't verified that yet, and someone else is doing the integration testing.
> I think I'll go have a look in the source code of mplayer, I'm running a
> customized version anyway. I wish there were more comments in the source code!
>
> I'll let you know if I find some solution.
>
> Bart
>
> P.S. am I correct in saying 'hi Zheng'? I believe I've heard asian names show
> first and last names in the opposite order from European names?
>
--
args are passed by ref, but bindings are local, variables are in fact
just a symbol referencing an object
-------------- next part --------------
A non-text attachment was scrubbed...
Name: idle-mode-pausing-loadfile-not-work.patch
Type: text/x-diff
Size: 654 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20080929/bf6acf00/attachment.patch>
More information about the MPlayer-users
mailing list