mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00

Previously, a SocketTimeourException is used to signal the end of the stream that is caused by "no RTP packets received for a while". However, such signaling is inappropriate under TransferRtpDataChannel, or FakeRtpDataChannel in RtspPlaybackTests. Hence, the signaling of end of stream is changed to use RESULT_END_OF_INPUT. The RtpDataChannel implementations will Still block until a set timeout, but will return a C.RESULT_END_OF_INPUT should a timeout occur, instead of throwing a nested SocketTimeoutException. This also allowed customization of the timeout amount, in RtspMediaSource.Factory PiperOrigin-RevId: 380981534