Re: gstmm add element to pipeline test
- From: Murray Cumming <murrayc murrayc com>
- To: José Alburquerque <jaalburquerque cox net>
- Cc: gtkmm-list gnome org
- Subject: Re: gstmm add element to pipeline test
- Date: Tue, 04 Dec 2007 09:44:06 +0100
On Mon, 2007-12-03 at 23:51 -0500, José Alburquerque wrote:
> Glib::RefPtr<Pipeline> Pipeline::create(const std::string& name)
> {
> - GstElement* pipeline = gst_pipeline_new(name.c_str());
> - return Glib::wrap((GstPipeline*) pipeline);
> + GstElement* gstPipeline = gst_pipeline_new(name.c_str());
> + Glib::RefPtr<Pipeline> pipeline = Glib::wrap((GstPipeline*)
> gstPipeline);
> + Glib::RefPtr<Bus> bus = pipeline->get_bus();
> + gst_bus_add_signal_watch(bus->gobj());
> + bus->unreference();
> + return pipeline;
> }
What is happening here? You should never need to do a manual
reference(). And you should add a comment near the extra
gst_bus_add_signal_watch() because we can't otherwise know what is
happening.
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]