Re: <gstmm.h> include errors



Yes ObjectBase would be valid of course as Gst::Object is derived from
Glib::Object.

While your latter test proves _something_, i'm not conviced this is
really helpful (it's really a little convoluted); when+if i get the
time today later on i'll try to gdb this down myself, the problem
seems to be indeed inside wrap() (for now) but your modified version
of wrap() is too complex to be really helpful (sorry.. :")

-- Milosz

2007/11/19, José Alburquerque <jaalburquerque cox net>:
> José Alburquerque wrote:
> > namespace Gst
> > {
> >
> > Glib::RefPtr<Gst::Element> wrap(GstElement* object, bool take_copy)
> > {
> >   Glib::ObjectBase* objBase =Glib::wrap_auto ((GObject*)(object),
> > take_copy);
> >   Gst::Element* e = dynamic_cast<Gst::Element*>(objBase);
> >   std::cout << typeid(*e).name() << std::endl;
> >   Glib::RefPtr<Gst::Element> element = Glib::RefPtr<Gst::Element>(
> > dynamic_cast<Gst::Element*>(e) );
> >   return element;
> >   //We use dynamic_cast<> in case of multiple inheritance.
> > }
> >
> > } /* namespace Gst */
> >
>
> I forgot to mention that Glib::wrap_auto() returns a valid
> Glib:ObjectBase pointer so objBase is valid.
>
> -Jose
>


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