[gst-devel] Stop problems

René Stadler mail at renestadler.de
Tue Jan 9 00:58:14 CET 2007


Am Dienstag, den 09.01.2007, 00:32 +0100 schrieb Andreas Volz:
> Am Mon, 08 Jan 2007 01:45:52 +0100 schrieb René Stadler:
> 
> > Am Montag, den 08.01.2007, 00:32 +0100 schrieb Andreas Volz:
> > > Am Sat, 06 Jan 2007 15:52:37 +0100 schrieb René Stadler:
> > > 
> > > > The filesink must be in the READY or NULL state when you change
> > > > the location (as the file is not opened then).
> > > 
> > > Hm, could you tell me how I do this? I tried various commands, but I
> > > get the same error message or a segfault.
> > > 
> > > regards
> > > Andreas
> > 
> > I don't know what you miss, states are set using using
> > gst_element_set_state, and you already seem to know this because you
> > use it just fine.  To elaborate a little bit: The problem you face in
> > your program is how you call your "record" function.  Apparently it
> > is called at some point where the sink is in the PLAYING or PAUSED
> > state.  To fix this, you could unconditionally set the sink's state
> > to READY before setting the location:
> > 
> > void record (char *file)
> > {
> >   gst_element_set_state (sink, GST_STATE_READY);
> >   g_object_set (G_OBJECT (sink), "location", file, NULL);
> >   gst_element_set_state (pipeline, GST_STATE_PLAYING);
> > }
> > 
> > That should make the error go away.
> 
> The application still fails with the same warning. But, I'm getting
> closer to the problem. I tested the *same* source on another Linux
> machine and there it works really nice as expected. Here are the
> machine facts:
> 
> Fails:
> - Ubuntu
> - libgstreamer-10-0 (0.10.6-0ubuntu2)
> - gstreamer0.10-plugins-base (0.10.7-0ubuntu5)
> 
> Works:
> - Gentoo
> - gstreamer-0.10.11
> - gst-plugins-base-0.10.11
> 
> Any ideas why it works on Gentoo, but not on Ubuntu? Is this maybe a
> bug in an older gstreamer version?
> 
> regards
> Andreas

Indeed, it is this bug: http://bugzilla.gnome.org/show_bug.cgi?id=358613

This means that you need to work around it by replacing the sink with a
new instance each time.  Or maybe try using gnomevfssink instead.

-- 
Regards,
  René Stadler





More information about the gstreamer-devel mailing list