mirror of
https://github.com/albfan/miraclecast.git
synced 2025-03-09 23:38:56 +00:00
miracle-wfdctl: add timeout value and Range header to the reply of PLAY request
This commit is contained in:
parent
d4cdaf9bca
commit
643b023225
1 changed files with 12 additions and 1 deletions
|
@ -405,6 +405,7 @@ static int wfd_out_session_handle_play_request(struct wfd_session *s,
|
||||||
enum wfd_session_state *new_state,
|
enum wfd_session_state *new_state,
|
||||||
enum rtsp_message_id *next_request)
|
enum rtsp_message_id *next_request)
|
||||||
{
|
{
|
||||||
|
_shl_free_ char *v;
|
||||||
_rtsp_message_unref_ struct rtsp_message *m = NULL;
|
_rtsp_message_unref_ struct rtsp_message *m = NULL;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
@ -416,7 +417,17 @@ static int wfd_out_session_handle_play_request(struct wfd_session *s,
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
r = rtsp_message_append(m, "<u>", "Session", (uint32_t) s->id);
|
r = asprintf(&v, "%d;timeout=30", s->stream.id);
|
||||||
|
if(0 > r) {
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
r = rtsp_message_append(m, "<s>", "Session", v);
|
||||||
|
if(0 > r) {
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
r = rtsp_message_append(m, "<s>", "Range", "ntp=now-");
|
||||||
if(0 > r) {
|
if(0 > r) {
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue