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

Function rtsp_cmd_pause

ffserver.c:3249–3272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3247}
3248
3249static void rtsp_cmd_pause(HTTPContext *c, const char *url, RTSPMessageHeader *h)
3250{
3251 HTTPContext *rtp_c;
3252
3253 rtp_c = find_rtp_session_with_url(url, h->session_id);
3254 if (!rtp_c) {
3255 rtsp_reply_error(c, RTSP_STATUS_SESSION);
3256 return;
3257 }
3258
3259 if (rtp_c->state != HTTPSTATE_SEND_DATA &&
3260 rtp_c->state != HTTPSTATE_WAIT_FEED) {
3261 rtsp_reply_error(c, RTSP_STATUS_STATE);
3262 return;
3263 }
3264
3265 rtp_c->state = HTTPSTATE_READY;
3266 rtp_c->first_pts = AV_NOPTS_VALUE;
3267 /* now everything is OK, so we can send the connection parameters */
3268 rtsp_reply_header(c, RTSP_STATUS_OK);
3269 /* session ID */
3270 url_fprintf(c->pb, "Session: %s\r\n", rtp_c->session_id);
3271 url_fprintf(c->pb, "\r\n");
3272}
3273
3274static void rtsp_cmd_teardown(HTTPContext *c, const char *url, RTSPMessageHeader *h)
3275{

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