tcpclient failing to detect EOF/EOS?

Peter Maersk-Moller pmaersk at gmail.com
Mon Aug 26 05:46:12 PDT 2013


Hi Timm-Phillipp

See comments in-line.

On Sun, Aug 25, 2013 at 2:14 PM, Tim-Philipp Müller <t.i.m at zen.co.uk> wrote:

> On Sat, 2013-08-24 at 23:59 +0200, Peter Maersk-Moller wrote:
> Hi,
> > Yes, the prerolling receiver needs a queue that in this case will make
> > the pipeline change to playing after it has prerolled. However, that
> > is mostly besides the point.
> It is not besides the point, because without the pipeline prerolling EOS
> propagation will not work.
>

Right. So what you are saying is this: While a pipeline is prerolling, it
can NOT propagate EOS and later on you write that if a source detects EOF,
it signals to the sink of the pipeline and then the sink may later signal
EOS, when it enters Playing state.

Then I conclude this: If GStreamer has no other way to handle EOF for input
while prerolling, then GStreamer pipelines has a race condition and as such
it can be impossible to determine the exact outcome of a particular
scenario. Now I will not race to conclusion and race condtions can be many
things and even okay if handled properly, but here the pipeline ends up
doing nothing just sitting there and that somehow sounds pretty bad to me.
Don't you think that is a problem?

Somehow the sink needs to detect if it will NOT receive more data from
upstream, and if the pipeline is still prerolled, the sink should send the
EOS upstream. At least that that is the only way I know a pipeline will
terminate.

Am I wrong ?

> Apparently tcpclientsrc fails to make the pipeline terminate upon
> > EOS/EOF if it is in its prerolling state.
>
> It is not the source that terminates the pipeline on EOS. It pushes an
> EOS even into the pipeline, which then needs to filter through to sinks,
> which then post EOS messages on the bus, which the pipeline then
> aggregates.
>

True, but problem still apply.


>
> >  If the tcpserversink disconnects or the connection is disconnected
> > for any other reason while the receiver pipeline with tcpclientsrc is
> > prerolling, the pipeline may never enter playing state and
> > subsequently the pipeline is not terminated even though its source had
> > its conection terminated. or at least that is what I seem to
> > experience.
>
> Does the sink not post an error messages if its connection is
> disconnected by the peer? Shouldn't it?
>

Not sure if it does, but the sink at the end of the pipeline should somehow
detects when it will never leave the prerolling state and terminate.
Otherwise you have the race condition. And that is often pretty bad.

Best regards
Peter Maersk-Moller
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130826/f0455815/attachment.html>


More information about the gstreamer-devel mailing list