rtmp2src: no way to know if stream was properly terminated or not on eos
If the RTMP server closes the connection for any reason, rtmp2src
will log the disconnection as INFO, stop its streaming task and return GST_FLOW_EOS
next time gst_rtmp2_src_create()
is called.
EOS
is also returned if the stream has been properly terminated by the server.
I need to have a way to distinguish between these two scenarios in my application. In the first case I want to retry connecting to the RTMP server while it the second I terminate the streaming pipeline. Unfortunately there is currently no way to know the actual reason why EOS
is being returned.
Note that EOS
is also returned because of the idle timeout but I don't actually use that.
The obvious solution would be to return GST_FLOW_ERROR
instead of EOS
on connection error. But I suppose there was a good reason to not do that in the first place? Like some server never properly terminating the stream when it's done?
So maybe this should be controlled using a new property?
@heftig @vivia : you seem to have done some work on this plugin so maybe you know more about why we handle connection error this way?