Re: <gstmm.h> include errors
- From: José Alburquerque <jaalburquerque cox net>
- To: Milosz Derezynski <internalerror gmail com>
- Cc: Murray Cumming <murrayc murrayc com>, gtkmm-list <gtkmm-list gnome org>
- Subject: Re: <gstmm.h> include errors
- Date: Sun, 18 Nov 2007 20:09:32 -0500
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]