[MPlayer-dev-eng] embedding mplayer into a gtk widget
D Richard Felker III
dalias at aerifal.cx
Fri Dec 13 03:53:35 CET 2002
Why not just make the widget run an external mplayer process with the
-wid option to put mplayer in its window?
Rich
On Fri, Dec 13, 2002 at 03:36:40AM +0100, Stéphane Konstantaropoulos wrote:
> Hello,
>
> I am trying to embed mplayer into a gtk widget.
>
> For this, I created a custom widget for the video output by embedding an
> sdl surface into a gtk widget.
>
> another widget, the player, has a callback function that starts playing.
> This function is merely a copy of mplayer's "main" so far, a bit
> simplified though.
>
> When the "play" callback is fired, I create a new thread (I need one, in
> order to keep control on the GUI), this thread runs mplayer's main
> modified.
>
> It starts fine, detects the file format then crashes in "demux_open2".
> I spent some time debugging to see what actually happens, and I see that
> the open_stream() does not return a valid stream, the demux_open()
> returns an invalid demuxer too then.
>
> The problem seems to be that the stream is returned with a 0 value for
> end_pos ???
>
> How strange is that, I went through all the steps of open_stream() with
> the debugger and it seemed that it found the length of the file but when
> it returns, end_pos is set to 0.
>
> Anybody wishing to help??
>
> My goal is to integrate in a gnome application.
> Still it would be cool to have mplayer as a gtkwidegt just like mozilla,
> lots of things could be done there, we are forced to use SDL as output
> though, or OpenGL, but that's not best.
>
> Thanks,
>
> Hey, I am a beginner with C!
> --
> _ _ _
> / \ \ \
> / / \ \ \ (el greco)
> \/_ | S \ Muy Mano,
> | \/ / Muy Presa.
> \_ K / http://users.aber.ac.uk/ssk01
> \ \
More information about the MPlayer-dev-eng
mailing list