[gst-devel] problem with filesink
littleblueb at gmail.com
Fri Feb 29 11:08:24 CET 2008
On 2/29/08, Florent <fthiery at gmail.com> wrote:
> > I want to find out an element which works like filesink but need to
> > file location (file name) frequently. I tried filesink firstly, but it
> can only setlocation before the specified
> > file opened and can not setlocation to it after it got EOS.
> AFAIK, this is a known limitation. The only workaround i could found
> sofar is blocking the pads of the filesink, switching it to a
> fakesink, creating a new filesink with new location and linking it
> back. However, this worked only on simple pipelines (videotestsrc,
> single video pipeline), not complex ones (muxed ones).
> I'd be glad to know more as well. What's the proper way to emit an
> arbitrary EOS signal ?
What my solution is:
gst_element_set_state (gstFileSink, GST_STATE_NULL);
if(gst_element_get_state(gstFileSink, NULL, NULL, -1) == GST_STATE_NULL)
g_object_set( G_OBJECT(gstFileSink), "location",
pFileSinkPad = gst_element_get_pad (gstFileSink,
gstBaseSink = GST_BASE_SINK_CAST(gstFileSink);
baseSinkPriv = (_MMCamcorderBaseSinkPrivCast*
baseSinkPriv->m_ReceivedEOS = FALSE;
Here I cast the filesink to basesink to access its member. Really, it is
very bad solution I think.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gstreamer-devel