Re: gstreamermm option group does not init
- From: Marcus Brinkmann <marcus brinkmann ruhr-uni-bochum de>
- To: José Alburquerque <jaalburquerque cox net>
- Cc: Murray Cumming <murrayc murrayc com>, gtkmm-list gnome org
- Subject: Re: gstreamermm option group does not init
- Date: Fri, 20 Jun 2008 03:32:21 +0200
At Thu, 19 Jun 2008 19:38:49 -0400,
José Alburquerque <jaalburquerque cox net> wrote:
> > If there was a function g_option_group_get_parse_hooks, we could use
> > that to get the init_pre and init_post hooks of gstreamer, and replace
> > them with our own function that calls the gstreamer functions and does
> > some extra work.
> >
> > However, to really make this work, we also need to know the user data
> > for the hooks, which is set at g_option_group_new time. For this user
> > data there is no getter and not even a setter function. Both would be
> > needed to complete the wrapping of the parse hooks.
> >
> > So, in summary, what's needed from glib to complete this are:
> >
> > void g_option_group_get_parse_hooks (GOptionGroup *group,
> > GOptionParseFunc *pre_parse_func,
> > GOptionParseFunc *post_parse_func);
> > void g_option_group_set_user_data (GOptionGroup *group, gpointer user_data);
> > gpointer g_option_group_get_user_data (GOptionGroup *group);
>
> You can try. I'm not sure what the result would be. If submitted and
> they like the idea, I think they might accept a patch. For now, there
> are a few other things that need attention, but trying to enhance
> gstreamermm by making it deal appropriately with GStreamer's
> GOptionGroup would certainly be nice.
I hate my idea already. The same user data is also used for the error
hook (not a big problem, but wrapping it requires yet another getter
function), and also for each G_OPTION_ARG_CALLBACK option, and we
definitely don't want to wrap each of those. Bummer. The proper
solution is to have different user data for different purposes, but
that is a slightly bigger change on which the glib people might have
some opinions. This will probably slow things down.
So, here is the work around: After parsing options, I call:
int argc_hack = 0;
char *argv_hack = NULL;
Gst::init (argc_hack, argv_hack);
Which completes initialization. By the way, I didn't get a response
with regards to the discrepancy of initialization calls in Gst::init
vs Gst::init_check. Not that I know much about what these functions
do, but init and init_check look kinda out of sync.
I totally agree that getting GOption integration to work properly is
not a high priority item. I'll wait a couple of days, and if no other
ideas pop up I will add the end result of the discussion plus the work
around to the bug report for reference at a later time.
Thanks,
Marcus
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]