... since the TEARDOWN sequence might not have had a chance to even start,
but at least connections should be closed (synchronously) and state cleaned up.
See #632504.
Simplify the command handling; passing a command to thread means we really
want it to get the message, which means to always flush provided the command
can handle being interrupted. Command thread indicates whether command
allows interruption and ensure non-flushing connection as it subsequently
needs it.
In particular, this also makes the TEARDOWN sequence interruptable
and also prevents races where _loop_ could miss a command and would
continue receiving (or at least trying to).
See #632504.
With the async state changes, it is possible that we need to open the stream
before play and pause.
Also make sure we remember a previous open failure so that we don't keep trying
again.
Simplify the command handling, only continue looping when we have not received
another command or when the previous loop was successfull.
Avoid looping on a disconnected socket.
Parse session control attributes when no media control attribute is
present. Threat * control attributes as an empty string, just like the
spec says.
Fixes#646800
... by forcing a state changed to PLAYING, which should otherwise be a
no-op as elements should already be in that state.
In particular, jitterbuffer needs new base_time as soon as possible to perform
proper timing (e.g. eos timeout handling) and can't wait for the new base_time
that will be distributed when the whole pipeline returns to PLAYING.
See bug #646397.
In case server-side fails to perform seek, i.e. PLAY at non-zero requested
position, recovery so far would arrange for streaming to continue, albeit
having lost position tracking in the process. So, query position prior
to seek and use upon failed seek.
Use g_ascii_dtostr() and g_ascii_strtod() to serialise/deserialise
floating point numbers, instead of ugly hacks that switch locale
before and after calling libc functions (which is not a good idea
in a multi-threaded application).
In particular, when streaming interleaved, this arranges for setting a new
timestamp on outgoing buffer so downstream can appropriate reset
to a change in (rtp)time.
Extend the _push_event() function so that it can also send events to the udp
sources when asked.
Implement a custum send_event function that correctly dispatches the downstream
events in TCP mode. This fixes sending EOS to rtspsrc and have it push the EOS
downstream.
Don't reuse sockets but make the udpsrc element fail the state change when the
socket is already in use. If we don't prevent reuse, we might end up using the same
port for different streams in some cases.
Fixes#622017
To support setups with firewall/ipsec, it is useful for an rtsp client to be
able to set the range of ports that can be used for rtp/rtcp reception.
Allows this by adding a "port-range" property to the rtspsrc element.
Fixes#625153
The RTSP server rtspsrc is communicating with, sends a GET_PARAMETER request
periodically as a ping. The code in gst_rtspsrc_handle_request forms an OK
response and sends, but doesn't call gst_rtsp_message_unset to free the memory
after sending the response. This results in a constant slow memory leak.
Fixes#624770