Rename RTSP_STATE_PLAYING to _STREAMING, since that better covers the

future use of the rtsp* codebase for RTSP muxing.

Patch by Martin Storsjö <$firstname $firstname st>.

Originally committed as revision 21896 to svn://svn.ffmpeg.org/ffmpeg/trunk
release/0.6
Martin Storsjö 15 years ago committed by Ronald S. Bultje
parent aa170ed625
commit c02fd3d2e8
  1. 12
      libavformat/rtsp.c
  2. 2
      libavformat/rtsp.h

@ -1249,7 +1249,7 @@ static int rtsp_read_play(AVFormatContext *s)
return -1; return -1;
} }
} }
rt->state = RTSP_STATE_PLAYING; rt->state = RTSP_STATE_STREAMING;
return 0; return 0;
} }
@ -1488,7 +1488,7 @@ static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
rtsp_read_reply(s, &reply, NULL, 0); rtsp_read_reply(s, &reply, NULL, 0);
/* XXX: parse message */ /* XXX: parse message */
if (rt->state != RTSP_STATE_PLAYING) if (rt->state != RTSP_STATE_STREAMING)
return 0; return 0;
} }
#endif #endif
@ -1516,7 +1516,7 @@ redo:
if (ret == 1) /* received '$' */ if (ret == 1) /* received '$' */
break; break;
/* XXX: parse message */ /* XXX: parse message */
if (rt->state != RTSP_STATE_PLAYING) if (rt->state != RTSP_STATE_STREAMING)
return 0; return 0;
} }
ret = url_read_complete(rt->rtsp_hd, buf, 3); ret = url_read_complete(rt->rtsp_hd, buf, 3);
@ -1667,7 +1667,7 @@ static int rtsp_read_packet(AVFormatContext *s, AVPacket *pkt)
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
rt->need_subscription = 0; rt->need_subscription = 0;
if (rt->state == RTSP_STATE_PLAYING) if (rt->state == RTSP_STATE_STREAMING)
rtsp_read_play (s); rtsp_read_play (s);
} }
} }
@ -1702,7 +1702,7 @@ static int rtsp_read_pause(AVFormatContext *s)
rt = s->priv_data; rt = s->priv_data;
if (rt->state != RTSP_STATE_PLAYING) if (rt->state != RTSP_STATE_STREAMING)
return 0; return 0;
else if (!(rt->server_type == RTSP_SERVER_REAL && rt->need_subscription)) { else if (!(rt->server_type == RTSP_SERVER_REAL && rt->need_subscription)) {
snprintf(cmd, sizeof(cmd), snprintf(cmd, sizeof(cmd),
@ -1729,7 +1729,7 @@ static int rtsp_read_seek(AVFormatContext *s, int stream_index,
default: default:
case RTSP_STATE_IDLE: case RTSP_STATE_IDLE:
break; break;
case RTSP_STATE_PLAYING: case RTSP_STATE_STREAMING:
if (rtsp_read_pause(s) != 0) if (rtsp_read_pause(s) != 0)
return -1; return -1;
rt->state = RTSP_STATE_SEEKING; rt->state = RTSP_STATE_SEEKING;

@ -158,7 +158,7 @@ typedef struct RTSPMessageHeader {
*/ */
enum RTSPClientState { enum RTSPClientState {
RTSP_STATE_IDLE, /**< not initialized */ RTSP_STATE_IDLE, /**< not initialized */
RTSP_STATE_PLAYING, /**< initialized and receiving data */ RTSP_STATE_STREAMING, /**< initialized and sending/receiving data */
RTSP_STATE_PAUSED, /**< initialized, but not receiving data */ RTSP_STATE_PAUSED, /**< initialized, but not receiving data */
RTSP_STATE_SEEKING, /**< initialized, requesting a seek */ RTSP_STATE_SEEKING, /**< initialized, requesting a seek */
}; };

Loading…
Cancel
Save