Re: designing a wrapper lib



On Wed, 2002-09-18 at 17:09, Wim Taymans wrote:
> On Wed, 2002-09-18 at 22:27, Joe Shaw wrote:
> > On Wed, 2002-09-18 at 16:02, Wim Taymans wrote:
> > > Jorn, you're designing an app.
> > > 
> > > Allow me to make this little analogy (with flaws, as with all analogies,
> > > but you'll get the point).
> > > 
> > > pretend: GStreamer~=GDK/GTK
> > > 
> > > Are you saying that my (one of my mid-term goals) VirtualDub clone
> > > should use that single library of yours? I can give you some of my
> > > requirements then... Are you also saying that my (one of my long-term
> > > goals) NLE library should use that single library of yours too? 
> > 
> > We don't need a single all-singing, all-dancing wrapper library, but we
> > do need wrappers for something as simple as, say "play a sound".  I
> > don't want to have to deal with sinks and pipelines and all that.  I
> > just want to play a .wav file or a .ogg file or whatever when a user
> > clicks a button.
> > 
> > It would be nice if we had a nice generic video widget so all I had to
> > do would be:
> > 
> >         GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
> >         GtkWidget *video = gnome_video_new ("pants.mpg");
> >         
> >         gtk_container_add (GTK_CONTAINER (window), video);
> >         gtk_widget_show_all (window);
> >         
> >         gnome_video_play (GNOME_VIDEO (video));
> >         
> >         gtk_main ();
> 
> as taken from main.c of the gst-player:
> 
>         GstMediaPlay *mplay;
>         GtkWidget *window;
> 
>         gst_init (&argc, &argv);
>         gnome_init (PACKAGE, VERSION, argc, argv);
> 
>         window = gnome_app_new ("gst-player", "GStreamer Player");
> 
>         mplay = gst_media_play_new ();
>         gnome_app_set_contents (GNOME_APP (window), GTK_WIDGET(mplay));
> 
>         gst_media_play_set_location (mplay, "pants.mpg");
> 
>         gtk_widget_show_all (window);
> 
>         gst_media_play_set_state (mplay, GST_STATE_PLAYING);
> 
>         gtk_main ();
> 
> Granted, this thing has a seekbar and play/pause/stop buttons too in the
> widget (that can be disabled). GstMediaPlay is build on top of GstPlay,
> which is just a GObject, so it requires a GtkPlug to embed the window
> (but allows for a KDE/Qt based player). 

It's just missing a way to always show the video (with a logo when no
files are loaded) and fancy goom vis when playing music :)

Disclaimer: I didn't look very closely at the API, there are probably
other things missing in there for use in Totem.

Cheers

-- 
/Bastien Nocera
http://hadess.net

Attachment: signature.asc
Description: This is a digitally signed message part



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