Re: GMedia ramblings... (corba!)




> Seeing that I dont' want to use MICO (for reasons which are common to all of
> the Gnome project), and ORBit isn't ready yet, I'll start off with the
> shared library approach. Anyway, you never see the shared library stuff
> anyway. This is an example:
> 
> 	media = gnome_media_new ();
> 	gtk_widget_show (media);
> 	gnome_media_load( media, "my_mod_file.mod" );
> 	gnome_media_play(NULL);
> 	gnome_media_wait();
> 	gnome_media_load( media, "my_movie.mpeg" );
> 	gnome_media_play(NULL);
> 	gnome_media_wait();
> 
> The NULL in gnome_media_play is a callback function which is called when
> the file is finished, because the play function is asynchronous.

How about implementing it as an object/widget using gtk's object
structure?  The top class could be a 'media' class, with lower classes
to handle the different media types (e.g. for example, to implement
the different media 'playing' controls).

It could use signals to notify the application when certain events
took place (such as the end of a play).  Then again, gtk doesn't
multi-thread natively does it (IMHO a major flaw in a modern gui
toolkit) ...

Maybe other events to let the application know when the 'play' button
was pressed etc.  A method of letting the application know the media
type needs room for buttons might be useful too ...

Be a 'piece of piss' to corba-object-ize it afterwards too.

> gnome_media_load automatically takes care of finding a suitable backend,
> loading it, if it wasn't already and setting up useful things.

<little off topic>
Otherwise this sounds a *lot* like Amiga's 'datatypes' system.  Only
not as sophisticated.  I thought gnome was about re-inventing a better
wheel?:)
</i'll go quiet now>

-- 
     ///   `... Thinking is an exercise to which all too few brains
    ///     are accustomed.' - First Lensman, E.E. `Doc' Smith
\\\///  
 \\\/   Michael Zucchi, B.E.                 zucchi@zedzone.box.net.au



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]