[MPlayer-G2-dev] Developing a GTK2 GUI

Arpi arpi at thot.banki.hu
Mon Aug 4 00:50:53 CEST 2003


Hi,

> >But mplayer does things a lot different than the other players out
> 
> Yes, mplayer works.  I don't use xine because 1) when I was first looking
> for a movie player years ago (geez, has it been that long?) all xine did was
> crash and  2) now, Totem, a GTK2 ui for libxine, doesn't start unless I 
> delete one
> of its config files and sometimes I even have to use gconf!

lol :)

I've tried xine a year ago, and it look good, until i pressed play :)
I liked its preferences window, it build Xvideo config dialog at runtime,
by querying Xv attribs (like xvinfo) and used them to setup bars.
(at least it looked so, i'm not 100% sure it was really runtime built
or they were just tricky again, as usual...)
It gave me the idea of runtime built config windows...

> I think the basic problem here is that you and others
> are concerned the GTK2 GUI is going to be like the first one.

I really hope it won't.

> I spent over a week porting that to GTK2 and it became
> very clear that a lot of things were done that didn't need to be.
> It could have been much smaller, simpler and more portable.

Ok, time to tell teh big secret to you :)

The original Gui (in v0.50) of g1 did not use gtk at all!
It used Xlib only, and Pontscho wrote a skinned toolkit-like thing
for it. If you look at old g1 skins, you'll see even the popup menus
pre-drawn in .png. It worked for a while, until things like dinamically
changed menus (like audio/vidoe ID, dvd title selectable in menu),
and fileselector requirement came up. Ponstcho didn't want to code a
so complex toolkit for his skin engine, so he started to hack gtk
support in. Afair there wasn't gtk2 yet that times.
Later more and more parts of his skinned stuff was replaced by gtk
functions, and the things got more messy and ugly... you see the result.

I think, if he start with gtk at first day, or he implements complex
toolkit elements in his xlib-based skinned engine, it woudl be better,
than this mixed gtk+xlib hack.

To make things even worse, he wanted it to look very good (which wasn't
possible with gtk1 afaik, i mean non-rectangular gui window etc), but
the gui development was sponsored for a while by UHU Linux, given a
deadline. So he had no time to mess more with xlib, he used gtk...

> Part of the reason I am here is to make sure no one gets desparate and tries
> to use that for G2.  I know, now, that I need never have worried.

:)

> You don't have a chance of discouraging me. :)

Nice to hear!

I've never wanted g1's gui to be ported to g2, and as i'm not a gui
coder (and i don't even want to be), i designed g2 to be ui-independent,
so that many ppl who started coding guis/frontends for g1 (and failed
due to g1's monolitic design) can do it now.

Btw I have some crazy(?) ideas for the g2 gtk2 gui, for example a mode
when it starts without a gui window, like the commandline player
(and even gets options/filenames etc from commandline) but some mouse
click or hotkey can bring up config windows/preferences so filters,
plugins can be configured runtime in an user-friendly interface, even
for commandline-liker users like me or Rich.
(Rich: it's quite hard to control (and display) a 24-band audio equalizer
from commandline...)
I think with a well-written layered gui it's easily doable.


> MPlayer is the best movie player I have used on any platform.

:)

> It might not have a fancy playlist editor (yet) but it does
> what's important: it plays just about every type of video file and it
> plays them well.

And it does it a lot better in G2.
The A-V sync engine improved a lot, and i'll code better demuxers for G2,
including AVI demuxer which allows seeking without index, correct
mpeg vs. mp3 detection (done), native .ogg demuxer (done) and so on.
Actually decoding multiple streams at the same time, or stream/codec
switching without stopping/restarting playback is possible with g2.

> On windows you have to install lots of codec packs
> to even come close to playing what mplayer does --and then you still end up
> using multiple players.

I've recently "installed" (unpacked to a dir) mplayer for a friend, and
since that he is only using that for any file :)
And it doesn't even have a gui (on win32)...

> My goal is to write a maintainable, portable, featureful, fast and good looking
> GUI to show off MPlayer-G2 and to encourage others to use it in their programs
> instead of choosing some other library / framework.

Great!


A'rpi / Astral & ESP-team

--
Developer of MPlayer G2, the Movie Framework for all - http://www.MPlayerHQ.hu



More information about the MPlayer-G2-dev mailing list