List Info

Thread: Stop problems




Stop problems
user name
2007-01-06 12:21:42
Hello,

First I do all the stuff to build the pipeline. Works so
far..

Then I record a stream:

void record (char *file)
{
  g_object_set (G_OBJECT (sink), "location", file,
NULL);
  gst_element_set_state (pipeline, GST_STATE_PLAYING);
}

And I stopt it:

void stop ()
{
  gst_element_set_state (pipeline, GST_STATE_NULL);
}

If I start recording in another file again I get this:

WARNING **: Changing the `location' property on filesink
when a file is
open not supported.

If I unref the complete pipeline at stop() and rebuild it a
record() it
works. But I don't expect this is needed. So what operation
is really
needed to start recording in a new file? Or have I really to
build a
new pipeline?

regards
Andreas

------------------------------------------------------------
-------------
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-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
Stop problems
user name
2007-01-06 14:52:37
Am Samstag, den 06.01.2007, 13:21 +0100 schrieb Andreas
Volz:
> Hello,
> 
> First I do all the stuff to build the pipeline. Works
so far..
> 
> Then I record a stream:
> 
> void record (char *file)
> {
>   g_object_set (G_OBJECT (sink), "location",
file, NULL);
>   gst_element_set_state (pipeline, GST_STATE_PLAYING);
> }
> 
> And I stopt it:
> 
> void stop ()
> {
>   gst_element_set_state (pipeline, GST_STATE_NULL);
> }
> 
> If I start recording in another file again I get this:
> 
> WARNING **: Changing the `location' property on
filesink when a file is
> open not supported.
> 
> If I unref the complete pipeline at stop() and rebuild
it a record() it
> works. But I don't expect this is needed. So what
operation is really
> needed to start recording in a new file? Or have I
really to build a
> new pipeline?
> 
> regards
> Andreas

The filesink must be in the READY or NULL state when you
change the
location (as the file is not opened then).

-- 
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-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
Stop problems
user name
2007-01-07 23:32:49
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

------------------------------------------------------------
-------------
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-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
Stop problems
user name
2007-01-08 00:45:52
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-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )