[q-lang-cvs] qcalc/examples mplayer.qcalc,1.1,1.2
Brought to you by:
agraef
From: Albert G. <ag...@us...> - 2007-12-02 02:16:03
|
Update of /cvsroot/q-lang/qcalc/examples In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9576 Modified Files: mplayer.qcalc Log Message: cosmetic changes Index: mplayer.qcalc =================================================================== RCS file: /cvsroot/q-lang/qcalc/examples/mplayer.qcalc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mplayer.qcalc 2 Dec 2007 01:13:19 -0000 1.1 --- mplayer.qcalc 2 Dec 2007 02:15:57 -0000 1.2 *************** *** 1,4 **** ! // qcalc 1.0, created Sun Dec 2 02:12:57 2007 -*-Q-*- -*- coding: UTF-8 -*- ! // [((0,0),("= label \"<h2>MPlayer \\\"in a bottle\\\"</h2><p>This program demonstrates the new taskwindow element which enables you to render graphics, animations, etc. directly into a table cell. To see this in action, please enter a video filename into cell A2 below or use the \\\"Browse\\\" button to select a video file. Then push the \\\"Play\\\" button to start playback. <b>NOTE:</b> You need the mplayer program to make this work.</p>\"",1,2)),((1,1),"= file_browser"),((2,0),("= taskwindow win_task",1,2)),((3,0),("= taskbutton \"Play\" (player_task A2 A3)",1,2))] // [(0,135),(2,283)] // [(0,319),(1,98)] --- 1,4 ---- ! // qcalc 1.0, created Sun Dec 2 03:20:50 2007 -*-Q-*- -*- coding: UTF-8 -*- ! // [((0,0),("= label \"<h2>MPlayer \\\"in a bottle\\\"</h2><p>This program demonstrates the new taskwindow element which enables you to render graphics, animations, etc. directly into a table cell. To see this in action, please enter a video filename into cell A2 below or use the \\\"Browse\\\" button to select a video file. Then push the \\\"Play\\\" button to start playback. <b>NOTE:</b> You need the mplayer program to make this work.</p>\"",1,2)),((1,1),"= file_browser"),((2,0),("= taskwindow ()",1,2)),((3,0),("= taskbutton \"Play\" (player_task A2 A3)",1,2))] // [(0,135),(2,283)] // [(0,319),(1,98)] *************** *** 25,34 **** (getcwd, "All files (*.*)", nil, "Choose a video file"); ! /* The window task only sets the cell value to the window id, the ! actual playback is done by the player_task below. */ ! ! win_task = setval index task_winid; ! ! /* The player task. To be used with the taskbutton element. */ player_task NAME ID --- 25,33 ---- (getcwd, "All files (*.*)", nil, "Choose a video file"); ! /* See cells A3 and A4 for the taskwindow and taskbutton elements which ! are the real gist of this program. Note that the task of the taskwindow ! is trivial in this case, we just take the window id (which is always the ! initial value of a taskwindow cell) and pass it on to the following ! player task which does the actual playback. */ player_task NAME ID *************** *** 55,59 **** start NAME ID = spawn "mplayer" ! ["mplayer","-really-quiet","-wid",str ID,NAME]; stop PID = kill SIGTERM PID || waitpid PID 0 if PID>0; --- 54,58 ---- start NAME ID = spawn "mplayer" ! ["mplayer","-really-quiet","-wid",str ID,NAME] if ID>0; stop PID = kill SIGTERM PID || waitpid PID 0 if PID>0; |