MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / rtsp_cmd_play

Function rtsp_cmd_play

ffserver.c:3223–3247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3221}
3222
3223static 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
3249static void rtsp_cmd_pause(HTTPContext *c, const char *url, RTSPMessageHeader *h)
3250{

Callers 1

rtsp_parse_requestFunction · 0.85

Calls 4

rtsp_reply_errorFunction · 0.85
rtsp_reply_headerFunction · 0.85
url_fprintfFunction · 0.85

Tested by

no test coverage detected