| 3221 | } |
| 3222 | |
| 3223 | static void rtsp_cmd_play(HTTPContext *c, const char *url, RTSPMessageHeader *h) |
| 3224 | { |
| 3225 | HTTPContext *rtp_c; |
| 3226 | |
| 3227 | rtp_c = find_rtp_session_with_url(url, h->session_id); |
| 3228 | if (!rtp_c) { |
| 3229 | rtsp_reply_error(c, RTSP_STATUS_SESSION); |
| 3230 | return; |
| 3231 | } |
| 3232 | |
| 3233 | if (rtp_c->state != HTTPSTATE_SEND_DATA && |
| 3234 | rtp_c->state != HTTPSTATE_WAIT_FEED && |
| 3235 | rtp_c->state != HTTPSTATE_READY) { |
| 3236 | rtsp_reply_error(c, RTSP_STATUS_STATE); |
| 3237 | return; |
| 3238 | } |
| 3239 | |
| 3240 | rtp_c->state = HTTPSTATE_SEND_DATA; |
| 3241 | |
| 3242 | /* now everything is OK, so we can send the connection parameters */ |
| 3243 | rtsp_reply_header(c, RTSP_STATUS_OK); |
| 3244 | /* session ID */ |
| 3245 | url_fprintf(c->pb, "Session: %s\r\n", rtp_c->session_id); |
| 3246 | url_fprintf(c->pb, "\r\n"); |
| 3247 | } |
| 3248 | |
| 3249 | static void rtsp_cmd_pause(HTTPContext *c, const char *url, RTSPMessageHeader *h) |
| 3250 | { |
no test coverage detected