Re: <gstmm.h> include errors



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]