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.
--
Regards,
René Stadler
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief surveys -
and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
|