gst-player error handling



Hi,

I've been looking over the gst-player sources.  Right now, we still do 
asserts and stuff to make sure plug-ins can be made, which is bad for 
users.  Even though the assert can be informative enough, assert should be 
used for programming errors only anyway and users should get a dialog box 
popping up and telling them what's wrong and how to fix it.

So I wanted to add GError stuff to libgstplay which then should be handled 
by libgstplayer (which does the GUI bits), but some things are preventing
me from doing this right, and I'm not quite sure how to solve this.

First of all, any app that plays using libgstplayer starts by getting a
GstMediaPlay object through gst_media_play_new.

This calls a number of methods on the underlying objects, which finally 
set up the right pipeline.  It is in this pipeline that errors should 
probably be generated  and passed down (for instance, can't find the 
volume plug-in).

The problem is, I don't know if it's a sane idea to change
gst_media_play_new
to
GstMediaPlay* gst_media_play_new (GError **error) ;)

I've looked at some gnome modules.  Some seemed to put a GError in the
object's private struct and then provide either an accessor function to
get at it or through property inspection, but that looks like a 
hackish workaround.

I'd like some feedback from others to know what to try here, especially on 
what other Gnome projects do in this case.

Thanks,
Thomas

-- 

The Dave/Dina Project : future TV today ! - http://davedina.apestaart.org/
<-*-                      -*->
Oh, baby, give me one more chance
<-*- thomas apestaart org -*->
URGent, the best radio on the Internet - 24/7 ! - http://urgent.rug.ac.be/





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