[FFmpeg-cvslog] r21896 - in trunk/libavformat: rtsp.c rtsp.h

rbultje subversion
Fri Feb 19 17:26:21 CET 2010


Author: rbultje
Date: Fri Feb 19 17:26:21 2010
New Revision: 21896

Log:
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>.

Modified:
   trunk/libavformat/rtsp.c
   trunk/libavformat/rtsp.h

Modified: trunk/libavformat/rtsp.c
==============================================================================
--- trunk/libavformat/rtsp.c	Fri Feb 19 15:06:12 2010	(r21895)
+++ trunk/libavformat/rtsp.c	Fri Feb 19 17:26:21 2010	(r21896)
@@ -1249,7 +1249,7 @@ static int rtsp_read_play(AVFormatContex
             return -1;
         }
     }
-    rt->state = RTSP_STATE_PLAYING;
+    rt->state = RTSP_STATE_STREAMING;
     return 0;
 }
 
@@ -1488,7 +1488,7 @@ static int udp_read_packet(AVFormatConte
 
                 rtsp_read_reply(s, &reply, NULL, 0);
                 /* XXX: parse message */
-                if (rt->state != RTSP_STATE_PLAYING)
+                if (rt->state != RTSP_STATE_STREAMING)
                     return 0;
             }
 #endif
@@ -1516,7 +1516,7 @@ redo:
         if (ret == 1) /* received '$' */
             break;
         /* XXX: parse message */
-        if (rt->state != RTSP_STATE_PLAYING)
+        if (rt->state != RTSP_STATE_STREAMING)
             return 0;
     }
     ret = url_read_complete(rt->rtsp_hd, buf, 3);
@@ -1667,7 +1667,7 @@ static int rtsp_read_packet(AVFormatCont
                 return AVERROR_INVALIDDATA;
             rt->need_subscription = 0;
 
-            if (rt->state == RTSP_STATE_PLAYING)
+            if (rt->state == RTSP_STATE_STREAMING)
                 rtsp_read_play (s);
         }
     }
@@ -1702,7 +1702,7 @@ static int rtsp_read_pause(AVFormatConte
 
     rt = s->priv_data;
 
-    if (rt->state != RTSP_STATE_PLAYING)
+    if (rt->state != RTSP_STATE_STREAMING)
         return 0;
     else if (!(rt->server_type == RTSP_SERVER_REAL && rt->need_subscription)) {
         snprintf(cmd, sizeof(cmd),
@@ -1729,7 +1729,7 @@ static int rtsp_read_seek(AVFormatContex
     default:
     case RTSP_STATE_IDLE:
         break;
-    case RTSP_STATE_PLAYING:
+    case RTSP_STATE_STREAMING:
         if (rtsp_read_pause(s) != 0)
             return -1;
         rt->state = RTSP_STATE_SEEKING;

Modified: trunk/libavformat/rtsp.h
==============================================================================
--- trunk/libavformat/rtsp.h	Fri Feb 19 15:06:12 2010	(r21895)
+++ trunk/libavformat/rtsp.h	Fri Feb 19 17:26:21 2010	(r21896)
@@ -158,7 +158,7 @@ typedef struct RTSPMessageHeader {
  */
 enum RTSPClientState {
     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_SEEKING, /**< initialized, requesting a seek */
 };



More information about the ffmpeg-cvslog mailing list