Re: gstreamermm option group does not init
- From: Marcus Brinkmann <marcus brinkmann ruhr-uni-bochum de>
- To: Murray Cumming <murrayc murrayc com>
- Cc: gtkmm-list gnome org
- Subject: Re: gstreamermm option group does not init
- Date: Thu, 19 Jun 2008 13:56:03 +0200
At Thu, 19 Jun 2008 13:31:03 +0200,
Murray Cumming <murrayc murrayc com> wrote:
> > > Returns a Glib::OptionGroup with GStreamer's argument specifications.
> > >
> > > The group is set up to use standard GOption callbacks, so when using
> > > this group in combination with GOption parsing methods, all argument
> > > parsing and initialization is automated.
> > > ...
> > >
> > > If you read carefully, I think you'll see that the word `initialization'
> > > refers to argument initialization and not gstreamermm initialization.
> >
> > I respectfully disagree. I think it is pretty clear that
> > "initialization" in the gstreamer documentation of
> > gst_init_get_option_group to mean gstreamer itself.
>
> Does gstreamer require any initialization? For instance, do you need to
> call any init() function when not using GOption? If not, then it's
> unlikely that the documentation means this.
You need to call gst_init(&argc, &argv) or gst_init_check(&argc, &argv)
if not using GOption.
> Note that we probably can hook into the GOption stuff if necessary.
I think that would be best. It must be possible, the question is what
is the simplest solution. How about something like this:
class GstOptionGroup : public Glib::OptionGroup
{
GstOptionGroup (GOptionGroup* castitem)
: Glib::OptionGroup (castitem) { }
virtual on_pre_parse (OptionContext& context, OptionGroup& group)
{
Glib::OptionGroup::on_pre_parse (context, group);
init_pre (); /* Appropriate refactorization of Gst::init() */
}
virtual on_post_parse (OptionContext& context, OptionGroup& group)
{
Glib::OptionGroup::on_post_parse (context, group);
init_post (); /* Appropriate refactorization of Gst::init() */
}
};
Glib::OptionGroup Gst::get_option_group()
{
return GstOptionGroup (gst_init_get_option_group());
}
Thanks,
Marcus
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]