[MPlayer-G2-dev] Developing a GTK2 GUI

Charles Ezell ardneh2 at hotmail.com
Mon Aug 4 00:11:04 CEST 2003


Hi,

Richard Felker III writes:

> > You're not serious, are you?  I appologize if you are making a joke,
> > I'm new here and still getting to know people.
> >
> > For those who do not know, libglade allows the creation of a GTK window 
>and
> > its
> > controls from an xml file.  It is the exact opposite of code bloat...
>
>Bloat is not just code size. It's also binary size, data size, and
>speed.

I know, I was simply trying the quick answer first. :)
The real answer is that libglade is not bloated because it takes
redundant code out of applications that use it.  LOTS of redundant
code --the creation and layout of windows and their components.

If you think about it this way, you will realize that even _if_ libglade
was twice as large as it needed to be it would still be saving
an order of magnitude more code in applications that use it _and_
it would keep save more every time a new application used it.
Now that is what I call a good deal.

As for speed, that usually comes down to using the correct algorithms
and data structures for the job.
Please see the bottom of the page here: http://xmlsoft.org/
For exactly how fast libxml is in comparison to other xml libs.

>The bloat here is requiring libglade, libxml, etc. for a movie
>player! For goodness sake!!

This really isn't a big deal.  Libxml is a standard GNOME lib.
Please see below.

>Look how massive and slow mozilla is by
>using its horrible gui layout language rather than just coding the gui
>native. I'm sure libglade is nowhere near as bad, but the whole thing

Please never bring up XUL... ;)
Never thought I'd agree with you so quickly.
Libglade is completely different than XUL.  They are not comparable.
(BTW, mozilla is getting much better and you do have the option to
use (wrapped) native controls.  I always build moz with GTK2 support.
Firebird has gotten rid of a ton of the bloat as well.)

>is just dumb in principle. Especially if you have to write the code in
>C already to build a gui from exported config data. WTF is the point
>of writing mplayer config -> xml converter, then using glade to build
>the gui? You could just build the gui direct from the config data...

Yes, you have summed up my argument exactly.
Please see my other posts, I thought I made that clear. :(

I am not going to use libglade for the config code and probably will
not use it for anything else, either.  I do not want win32 users to
have libglade as well as the GTK libs.  I am doing my best to consider
everyone who would be using a GTK UI.  And everyone who might
need to look at my code to write other GUIs.

>Sorry if I sound overly fussy or argumentative. That's not my purpose.

It's not being argumentative that I care about.
It's making broad assumptions about how bloated things are.

>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!

>there, with minimal dependencies and bloat. Unlike xine, cat

Keep in mind, nothing I do is going to change that.
First, the gui really is separate and should be.
Second, using libraries does not make otherwise good code
bloated.
Third, you bring up the real issue below.

>/proc/`pidof mplayer`/maps doesn't spew out 300+ lines... I don't want
>to discourage you from working on this -- myself and many others don't
>care about gui, so it's not our place to control how you write it --
>but at the same time I don't like to see senseless bloat and slowness
>in the gui giving mplayer a bad reputation (like the current G1 gui
>does...)

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

It is not.

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.

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. :)

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.  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.

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.
Maybe even be _the_ GNOME video/media player. (Why not think big?)

Also, even though you don't seem to care about it, I am interested in your
point of view.

As a final note, I'd like to ask everyone to please move the old GUI to the 
back of their
minds, if possible.  I'm glad Pontscho wrote it, especially using GTK, 
because otherwise
I probably wouldn't have started using MPlayer.  And I certainly would not 
be here.
However, we're starting from scratch and we know the old mistakes
--so I don't see why they should come up again.

>Rich

The clarification of your opinion was much appreciated.

Thank you,

-Charles

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail



More information about the MPlayer-G2-dev mailing list