News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
FLTK and ffmpeg
Author Message
Juergen
Member
***


Posts: 81
Group: Registered
Joined: May 2007
Status: Offline
Reputation: 0
Post: #1
RE: FLTK and ffmpeg

dvw86 Wrote:
Juergen,
You have my attention. I would be quite happy to use xine and have it display in an FLTK window. I'll play around with that. Thanks


This is a primitive mplayer example. The problem is that with the primitive Lua IO model, I can't read the output from mplayer reliably, because I have no Idea how much lines are in the buffer and when I call read() on an empty buffer it will block. When this is solved, it would be no problem to easily script mplayer.

Code:
#!/usr/bin/env murgaLua
function my_cb(self)
        if not initialized then
                os.execute("mkfifo /tmp/mpfifo")
                mpout=io.popen("LANG=C mplayer -quiet -input file=/tmp/mpfifo -wid "..fltk.fl_xid(group).." "..arg[1].." &","r")
                mpin=io.open("/tmp/mpfifo","w")
                initialized=1
        end
        mpin:write("seek 10\n")
        mpin:flush()
end

w=fltk.Fl_Double_Window(640,510,"Mpayer Gui")
w:size_range(32,20,Fl:w(),Fl:h())
button1=fltk.Fl_Button(0,495,70,15,"Press Me!")
group=fltk.Fl_Window(0,0,640,480)
w:resizable(group)
button1:callback(my_cb)
w:show()
Fl:run()


Juergen

This post was last modified: 04-07-2008 07:13 AM by Juergen.

04-07-2008 03:13 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
FLTK and ffmpeg - dvw86 - 04-06-2008, 04:25 AM
RE: FLTK and ffmpeg - mikshaw - 04-06-2008, 11:21 AM
RE: FLTK and ffmpeg - Juergen - 04-07-2008, 01:06 AM
RE: FLTK and ffmpeg - dvw86 - 04-07-2008, 02:31 AM
RE: FLTK and ffmpeg - Juergen - 04-07-2008 03:13 AM
RE: FLTK and ffmpeg - mikshaw - 04-08-2008, 12:20 AM
RE: FLTK and ffmpeg - dvw86 - 04-08-2008, 02:33 AM
RE: FLTK and ffmpeg - Juergen - 04-08-2008, 03:27 AM
RE: FLTK and ffmpeg - Juergen - 04-08-2008, 03:44 AM
RE: FLTK and ffmpeg - mikshaw - 04-08-2008, 04:38 AM
RE: FLTK and ffmpeg - dvw86 - 04-08-2008, 09:30 AM
RE: FLTK and ffmpeg - Juergen - 04-08-2008, 11:01 PM
RE: FLTK and ffmpeg - Juergen - 04-08-2008, 11:18 PM
RE: FLTK and ffmpeg - JohnMurga - 04-09-2008, 07:25 AM
RE: FLTK and ffmpeg - JohnMurga - 04-10-2008, 06:53 AM
RE: FLTK and ffmpeg - Juergen - 04-10-2008, 07:39 AM
RE: FLTK and ffmpeg - JohnMurga - 04-12-2008, 05:01 AM
RE: FLTK and ffmpeg - JohnMurga - 04-10-2008, 10:48 PM
RE: FLTK and ffmpeg - dvw86 - 04-11-2008, 04:32 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: