[MPlayer-dev-eng] embedding mplayer into a gtk widget

Stéphane Konstantaropoulos stephanek at brutele.be
Fri Dec 13 03:36:40 CET 2002


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
      \  \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20021213/dabbc470/attachment.pgp>


More information about the MPlayer-dev-eng mailing list