]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
dont use ffmpeg RTSP status codes
authorAndreas Öman <andreas@lonelycoder.com>
Fri, 2 Nov 2007 22:30:10 +0000 (22:30 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Fri, 2 Nov 2007 22:30:10 +0000 (22:30 +0000)
rtsp.c

diff --git a/rtsp.c b/rtsp.c
index 90b9157768b2ad8f6e51bdcf23777243ecaa4a8e..33aa0ae914fe29efd220c16921bb4b886ed0e2e8 100644 (file)
--- a/rtsp.c
+++ b/rtsp.c
 #include "tcp.h"
 #include "http.h"
 
-#include <ffmpeg/avformat.h>
-#include <ffmpeg/rtspcodes.h>
 #include <ffmpeg/random.h>
 
+#define RTSP_STATUS_OK           200
+#define RTSP_STATUS_UNAUTHORIZED 401
+#define RTSP_STATUS_METHOD       405
+#define RTSP_STATUS_SESSION      454
+#define RTSP_STATUS_TRANSPORT    461
+#define RTSP_STATUS_INTERNAL     500
+#define RTSP_STATUS_SERVICE      503
+
+
+
 #define rcprintf(c, fmt...) tcp_printf(&(rc)->rc_tcp_session, fmt)
 
 static AVRandomState rtsp_rnd;
@@ -218,16 +226,12 @@ rtsp_err2str(int err)
 {
   switch(err) {
   case RTSP_STATUS_OK:              return "OK";
+  case RTSP_STATUS_UNAUTHORIZED:    return "Unauthorized";
   case RTSP_STATUS_METHOD:          return "Method Not Allowed";
-  case RTSP_STATUS_BANDWIDTH:       return "Not Enough Bandwidth";
   case RTSP_STATUS_SESSION:         return "Session Not Found";
-  case RTSP_STATUS_STATE:           return "Method Not Valid in This State";
-  case RTSP_STATUS_AGGREGATE:       return "Aggregate operation not allowed";
-  case RTSP_STATUS_ONLY_AGGREGATE:  return "Only aggregate operation allowed";
   case RTSP_STATUS_TRANSPORT:       return "Unsupported transport";
   case RTSP_STATUS_INTERNAL:        return "Internal Server Error";
   case RTSP_STATUS_SERVICE:         return "Service Unavailable";
-  case RTSP_STATUS_VERSION:         return "RTSP Version not supported";
   default:
     return "Unknown Error";
     break;
@@ -253,6 +257,7 @@ rtsp_reply_error(http_connection_t *hc, int error, const char *errstr)
   http_printf(hc, "\r\n");
 }
 
+
 /*
  * Find a session pointed do by the current connection
  */
@@ -383,7 +388,7 @@ rtsp_cmd_setup(http_connection_t *hc)
   rtsp_session_t *rs;
   th_channel_t *ch;
   struct sockaddr_in dst;
-
+  
   if((ch = rtsp_channel_by_url(hc->hc_url)) == NULL) {
     rtsp_reply_error(hc, RTSP_STATUS_SERVICE, "URL does not resolve");
     return;