[gst-devel] gst-application stuck at 'gst_object_unref'
Vinayak
vinayak.pane at gmail.com
Mon Jan 22 12:28:49 CET 2007
On 1/19/07, Edward Hervey <bilboed at gmail.com> wrote:
>
> On 1/18/07, Vinayak <vinayak.pane at gmail.com> wrote:
> > Hi,
> >
> > On 1/18/07, ensonic <ensonic at hora-obscura.de> wrote:
> > > hi,
> > >
> > > On 2:10:29 pm 18/01/2007 Vinayak <vinayak.pane at gmail.com> wrote:
> > > >
> > > > Hi Everyone,
> > > > My gst-application gets stuck at gst_object_unref function which is
> > > > called after the main loop is over and pipeline state is set to
> NULL.
> > >
> > > whats happening? a crash? for the refcount related thing you might
> wanna
> > > try http://refdbg.sf.net . You could also attach your source, so that
> we
> > can
> > > look at it.
> >
> > No there is no crash. It doesn't terminate at all , I have to kill
> that
> > process.
>
> hmm... are you shutting down your pipeline from a signal callback and
> not from a bus message by any chance ? It sems like a deadlock because
> you try to shut down the pipeline from a streaming thread.
No, In my application:-
{
. /* created elements */
..
..
bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
gst_bus_add_watch (bus, bus_call, loop);
gst_object_unref (bus);
/* put all elements in a bin */
gst_bin_add_many (GST_BIN (pipeline),
source, encoder, sink, NULL);
gst_element_link (source, encoder);
gst_element_link (encoder, sink);
/* Now set to playing and iterate. */
g_print ("APP: Setting to PLAYING\n");
gst_element_set_state (pipeline, GST_STATE_PLAYING);
g_print ("APP: Running\n");
g_main_loop_run (loop);
/* clean up nicely */
g_print ("APP: Returned, stopping playback\n");
gst_element_set_state (pipeline, GST_STATE_NULL);
g_print ("APP: Deleting pipeline\n");
gst_object_unref (GST_OBJECT (pipeline));
return 0;
}
Here the bus is already unref. The application hangs at last line ==>
gst_object_unref(GST_OBJECT(pipeline))
As mentionned before, seeing your code would be much easier to spot the
> error.
Thanks,
--vinayak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20070122/3bb3e413/attachment.htm>
More information about the gstreamer-devel
mailing list