577 |
578 |
if (oldstate) {
|
578 |
579 |
setup = 0;
|
579 |
580 |
rs->state = STATE_SETUP;
|
|
581 |
tvhtrace("satips", "Change State to SETUP (1)");
|
|
582 |
}
|
|
583 |
if (setup && (rs->state == STATE_DESCRIBE)) {
|
|
584 |
rs->state = STATE_SETUP;
|
|
585 |
tvhtrace("satips", "Change State to SETUP (2)");
|
580 |
586 |
}
|
581 |
587 |
} else {
|
582 |
588 |
pids:
|
... | ... | |
590 |
596 |
if (rs->used_weight != weight && weight > 0)
|
591 |
597 |
subscription_set_weight(rs->subs, rs->used_weight = weight);
|
592 |
598 |
}
|
593 |
|
if (!setup && rs->state != STATE_PLAY) {
|
|
599 |
if ((!setup && rs->state != STATE_PLAY) || (setup && (rs->state == STATE_SETUP))) {
|
594 |
600 |
if (rs->mux == NULL)
|
595 |
601 |
goto endclean;
|
596 |
602 |
satip_rtp_queue((void *)(intptr_t)rs->stream,
|
... | ... | |
1223 |
1229 |
static void
|
1224 |
1230 |
rtsp_describe_session(session_t *rs, htsbuf_queue_t *q)
|
1225 |
1231 |
{
|
1226 |
|
char buf[4096];
|
|
1232 |
char buf[8192];
|
1227 |
1233 |
|
1228 |
1234 |
htsbuf_qprintf(q, "a=control:stream=%d\r\n", rs->stream);
|
1229 |
1235 |
htsbuf_append_str(q, "a=tool:tvheadend\r\n");
|
... | ... | |
1232 |
1238 |
htsbuf_append_str(q, "c=IN IP6 ::0\r\n");
|
1233 |
1239 |
else
|
1234 |
1240 |
htsbuf_append_str(q, "c=IN IP4 0.0.0.0\r\n");
|
|
1241 |
tvhtrace("satips", "Rtsp_describe_session: rs->state=%i,rs->stream=%i",rs->state,rs->stream);
|
1235 |
1242 |
if (rs->state == STATE_PLAY) {
|
1236 |
1243 |
satip_rtp_status((void *)(intptr_t)rs->stream, buf, sizeof(buf));
|
1237 |
1244 |
htsbuf_qprintf(q, "a=fmtp:33 %s\r\n", buf);
|
1238 |
1245 |
htsbuf_append_str(q, "a=sendonly\r\n");
|
|
1246 |
} else if (rs->state == STATE_SETUP) {
|
|
1247 |
//fixme: send real tuner status (at this point the status is empty!)
|
|
1248 |
htsbuf_append_str(q, "a=fmtp:33 ver=1.0;src=0;tuner=0,240,1,15,,,,,,,,;pids=all\r\n");
|
|
1249 |
htsbuf_append_str(q, "a=sendonly\r\n");
|
1239 |
1250 |
} else {
|
1240 |
1251 |
htsbuf_append_str(q, "a=fmtp:33\r\n");
|
1241 |
1252 |
htsbuf_append_str(q, "a=inactive\r\n");
|