mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
module-raop-sink: Drop the RTSP FLUSH request
The RTSP FLUSH request does not seem to be required. This change also fixes an issue where another RECORD request is erroneously sent when the stream switches back from paused to streaming by only setting `impl->streaming = false` in `rtsp_do_teardown()`.
This commit is contained in:
parent
e8d6407c4e
commit
d063dbdb62
1 changed files with 2 additions and 24 deletions
|
|
@ -953,27 +953,6 @@ static int rtsp_log_reply_status(void *data, int status, const struct spa_dict *
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rtsp_do_flush(struct impl *impl)
|
|
||||||
{
|
|
||||||
int res;
|
|
||||||
|
|
||||||
if (!impl->recording)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
pw_properties_set(impl->headers, "Range", "npt=0-");
|
|
||||||
pw_properties_setf(impl->headers, "RTP-Info",
|
|
||||||
"seq=%u;rtptime=%u", impl->seq, impl->rtptime);
|
|
||||||
|
|
||||||
impl->recording = false;
|
|
||||||
|
|
||||||
res = rtsp_send(impl, "FLUSH", NULL, NULL, rtsp_log_reply_status);
|
|
||||||
|
|
||||||
pw_properties_set(impl->headers, "Range", NULL);
|
|
||||||
pw_properties_set(impl->headers, "RTP-Info", NULL);
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int rtsp_send_volume(struct impl *impl)
|
static int rtsp_send_volume(struct impl *impl)
|
||||||
{
|
{
|
||||||
if (!impl->recording)
|
if (!impl->recording)
|
||||||
|
|
@ -1647,9 +1626,6 @@ static void stream_state_changed(void *d, enum pw_stream_state old,
|
||||||
case PW_STREAM_STATE_UNCONNECTED:
|
case PW_STREAM_STATE_UNCONNECTED:
|
||||||
pw_impl_module_schedule_destroy(impl->module);
|
pw_impl_module_schedule_destroy(impl->module);
|
||||||
break;
|
break;
|
||||||
case PW_STREAM_STATE_PAUSED:
|
|
||||||
rtsp_do_flush(impl);
|
|
||||||
break;
|
|
||||||
case PW_STREAM_STATE_STREAMING:
|
case PW_STREAM_STATE_STREAMING:
|
||||||
rtsp_do_record(impl);
|
rtsp_do_record(impl);
|
||||||
break;
|
break;
|
||||||
|
|
@ -1701,6 +1677,8 @@ static int rtsp_teardown_reply(void *data, int status, const struct spa_dict *he
|
||||||
|
|
||||||
static int rtsp_do_teardown(struct impl *impl)
|
static int rtsp_do_teardown(struct impl *impl)
|
||||||
{
|
{
|
||||||
|
impl->recording = false;
|
||||||
|
|
||||||
if (!impl->ready)
|
if (!impl->ready)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue