summaryrefslogtreecommitdiff
path: root/httpresource.h
diff options
context:
space:
mode:
authorthlo <smarttv640@gmail.com>2013-04-04 21:05:33 +0200
committerthlo <t.lohmar@gmx.de>2013-04-04 21:05:33 +0200
commit4c2f508b616652c05288aef8c11cfe10c9502d24 (patch)
treed79396cb2cfb4bde345a4c8339d38098ff5b3eb0 /httpresource.h
parentafb4d3bebf5e4ecbaba0cee23a66bd745e07ef4c (diff)
downloadvdr-plugin-smarttvweb-4c2f508b616652c05288aef8c11cfe10c9502d24.tar.gz
vdr-plugin-smarttvweb-4c2f508b616652c05288aef8c11cfe10c9502d24.tar.bz2
New urls manager for YouTube URLs. New http client class. Various bug fixes.
Diffstat (limited to 'httpresource.h')
-rwxr-xr-xhttpresource.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/httpresource.h b/httpresource.h
index fbbab4d..c563b3c 100755
--- a/httpresource.h
+++ b/httpresource.h
@@ -27,6 +27,7 @@
#include <cstring>
#include <pthread.h>
#include "log.h"
+#include "httpresource_base.h"
using namespace std;
@@ -71,7 +72,7 @@ sFileEntry(string n, string l, int s) : sName(n), sPath(l), sStart(s) {
class SmartTvServer;
class cResumeEntry;
-class cHttpResource {
+class cHttpResource : public cHttpResourceBase {
public:
cHttpResource(int, int, int, SmartTvServer*);
@@ -79,20 +80,20 @@ class cHttpResource {
int handleRead();
int handleWrite();
-
int checkStatus();
int readFromClient();
+
void threadLoop();
int run();
private:
- SmartTvServer* mFactory;
+ // SmartTvServer* mFactory;
Log* mLog;
- int mServerPort;
- int mFd;
- int mReqId;
+ // int mServerPort;
+ // int mFd;
+ // int mReqId;
time_t mConnTime;
int mHandleReadCount;
@@ -146,14 +147,21 @@ class cHttpResource {
int sendChannelsXml (struct stat *statbuf);
int sendResumeXml ();
int sendVdrStatusXml (struct stat *statbuf);
+ int sendYtBookmarkletJs();
+ int sendBmlInstHtml();
+
int sendEpgXml (struct stat *statbuf);
+ int sendUrlsXml ();
int sendMediaXml (struct stat *statbuf);
-
+
+ void handleClients();
+
int sendManifest (struct stat *statbuf, bool is_hls = true);
int receiveResume();
int deleteRecording();
+ int receiveYtUrl();
void writeM3U8(double duration, int bitrate, float seg_dur, int end_seg);
void writeMPD(double duration, int bitrate, float seg_dur, int end_seg);