pause
Tells the server of a live source that the caller has stopped reading, and says whether the source has any notion of that: true when it has and is now paused, false when it has none, in which case nothing was sent and the source reads on as before.
FFmpeg's av_read_pause does the work on every backend. An RTSP stream sends its server PAUSE, which stops the packets, and an rtmp:// input sends RTMP's pause command. Every other input has no such notion and answers false, a file and a MediaByteSource included.
A server ends a session it has not heard from within its timeout, usually 60 seconds, and a paused session is no exception, while FFmpeg tells an RTSP server the session is still wanted only from inside a read. So while paused, call this again every second or so: on a paused RTSP stream each call sends the server FFmpeg's keepalive, GET_PARAMETER or OPTIONS, once half the session timeout has passed since the last request, and sends nothing before then. An rtmp:// input sends its pause command again on each call. resume lifts the pause.
A read while paused waits for packets the server is no longer sending, so stop reading first. Like a read or a seek, this must not run concurrently with another call on the source or on its PacketReader.
Return
true when the source is paused, false when it has no notion of pausing
Throws
when the server or the connection refuses, for example after the server has ended the session
Tells the server of a live source that the caller has stopped reading, and says whether the source has any notion of that: true when it has and is now paused, false when it has none, in which case nothing was sent and the source reads on as before.
FFmpeg's av_read_pause does the work on every backend. An RTSP stream sends its server PAUSE, which stops the packets, and an rtmp:// input sends RTMP's pause command. Every other input has no such notion and answers false, a file and a MediaByteSource included.
A server ends a session it has not heard from within its timeout, usually 60 seconds, and a paused session is no exception, while FFmpeg tells an RTSP server the session is still wanted only from inside a read. So while paused, call this again every second or so: on a paused RTSP stream each call sends the server FFmpeg's keepalive, GET_PARAMETER or OPTIONS, once half the session timeout has passed since the last request, and sends nothing before then. An rtmp:// input sends its pause command again on each call. resume lifts the pause.
A read while paused waits for packets the server is no longer sending, so stop reading first. Like a read or a seek, this must not run concurrently with another call on the source or on its PacketReader.
Return
true when the source is paused, false when it has no notion of pausing
Throws
when the server or the connection refuses, for example after the server has ended the session
Tells the server of a live source that the caller has stopped reading, and says whether the source has any notion of that: true when it has and is now paused, false when it has none, in which case nothing was sent and the source reads on as before.
FFmpeg's av_read_pause does the work on every backend. An RTSP stream sends its server PAUSE, which stops the packets, and an rtmp:// input sends RTMP's pause command. Every other input has no such notion and answers false, a file and a MediaByteSource included.
A server ends a session it has not heard from within its timeout, usually 60 seconds, and a paused session is no exception, while FFmpeg tells an RTSP server the session is still wanted only from inside a read. So while paused, call this again every second or so: on a paused RTSP stream each call sends the server FFmpeg's keepalive, GET_PARAMETER or OPTIONS, once half the session timeout has passed since the last request, and sends nothing before then. An rtmp:// input sends its pause command again on each call. resume lifts the pause.
A read while paused waits for packets the server is no longer sending, so stop reading first. Like a read or a seek, this must not run concurrently with another call on the source or on its PacketReader.
Return
true when the source is paused, false when it has no notion of pausing
Throws
when the server or the connection refuses, for example after the server has ended the session
Tells the server of a live source that the caller has stopped reading, and says whether the source has any notion of that: true when it has and is now paused, false when it has none, in which case nothing was sent and the source reads on as before.
FFmpeg's av_read_pause does the work on every backend. An RTSP stream sends its server PAUSE, which stops the packets, and an rtmp:// input sends RTMP's pause command. Every other input has no such notion and answers false, a file and a MediaByteSource included.
A server ends a session it has not heard from within its timeout, usually 60 seconds, and a paused session is no exception, while FFmpeg tells an RTSP server the session is still wanted only from inside a read. So while paused, call this again every second or so: on a paused RTSP stream each call sends the server FFmpeg's keepalive, GET_PARAMETER or OPTIONS, once half the session timeout has passed since the last request, and sends nothing before then. An rtmp:// input sends its pause command again on each call. resume lifts the pause.
A read while paused waits for packets the server is no longer sending, so stop reading first. Like a read or a seek, this must not run concurrently with another call on the source or on its PacketReader.
Return
true when the source is paused, false when it has no notion of pausing
Throws
when the server or the connection refuses, for example after the server has ended the session
Tells the server of a live source that the caller has stopped reading, and says whether the source has any notion of that: true when it has and is now paused, false when it has none, in which case nothing was sent and the source reads on as before.
FFmpeg's av_read_pause does the work on every backend. An RTSP stream sends its server PAUSE, which stops the packets, and an rtmp:// input sends RTMP's pause command. Every other input has no such notion and answers false, a file and a MediaByteSource included.
A server ends a session it has not heard from within its timeout, usually 60 seconds, and a paused session is no exception, while FFmpeg tells an RTSP server the session is still wanted only from inside a read. So while paused, call this again every second or so: on a paused RTSP stream each call sends the server FFmpeg's keepalive, GET_PARAMETER or OPTIONS, once half the session timeout has passed since the last request, and sends nothing before then. An rtmp:// input sends its pause command again on each call. resume lifts the pause.
A read while paused waits for packets the server is no longer sending, so stop reading first. Like a read or a seek, this must not run concurrently with another call on the source or on its PacketReader.
Return
true when the source is paused, false when it has no notion of pausing
Throws
when the server or the connection refuses, for example after the server has ended the session