summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorphintuka <phintuka>2007-01-07 09:45:48 +0000
committerphintuka <phintuka>2007-01-07 09:45:48 +0000
commit29d8b75ced36f48b4554d41973fac2cd2fc3045e (patch)
tree148acae7eb7990e680992a735535b7282c71119e /tools
parent1b033c7e9376fc2e9244f31fa1a1aee827ebe185 (diff)
downloadxineliboutput-29d8b75ced36f48b4554d41973fac2cd2fc3045e.tar.gz
xineliboutput-29d8b75ced36f48b4554d41973fac2cd2fc3045e.tar.bz2
cHttpStreamer needs whole HTTP request, not only request range
Diffstat (limited to 'tools')
-rw-r--r--tools/http.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/http.h b/tools/http.h
index 63aa434c..2adcf8e3 100644
--- a/tools/http.h
+++ b/tools/http.h
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: http.h,v 1.4 2007-01-07 05:28:36 phintuka Exp $
+ * $Id: http.h,v 1.5 2007-01-07 09:45:48 phintuka Exp $
*
*/
@@ -19,6 +19,16 @@
"Connection: Close\r\n" \
"\r\n"
+#define HTTP_REPLY_404 \
+ "HTTP/1.1 404 Not Found\r\n" \
+ "Connection: Close\r\n" \
+ "\r\n"
+
+#define HTTP_REPLY_416 \
+ "HTTP/1.1 416 Requested Range Not Satisfiable\r\n" \
+ "Connection: Close\r\n" \
+ "\r\n"
+
#define HTTP_REPLY_200_PRIMARY \
"HTTP/1.1 200 OK\r\n" \
"Content-Type: video/mpeg\r\n" \
@@ -104,7 +114,7 @@ class cConnState : public cHttpReq
class cHttpStreamer : protected cListObject, cThread
{
public:
- cHttpStreamer(int fd_http, const char *filename, const char *Range=NULL);
+ cHttpStreamer(int fd_http, const char *filename, cConnState *Request);
virtual ~cHttpStreamer();
static void CloseAll(bool OnlyFinished = false);
@@ -127,6 +137,7 @@ class cHttpStreamer : protected cListObject, cThread
virtual void Action(void);
+ bool ParseRequest(void);
void ParseRange(const char *Range);
bool ReadPipelined(void);
bool Seek(void);