summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmirl <schmirl>2007-04-24 11:03:41 +0000
committerschmirl <schmirl>2007-04-24 11:03:41 +0000
commita0dfe7b20ae894240da179bfe76cf31b935bb606 (patch)
treedcc5310daa9408c7bd95d57567ab56a346f9c765
parentac4c391c43f993f51ff8f34eaf9eec7e15166fb8 (diff)
downloadvdr-plugin-streamdev-a0dfe7b20ae894240da179bfe76cf31b935bb606.tar.gz
vdr-plugin-streamdev-a0dfe7b20ae894240da179bfe76cf31b935bb606.tar.bz2
server_connectionVTP-new-data.patch by Petri Hintukainen
- Add new data (LiveFilterStreamer and LiveFilterSocket) - Misc cleanup Modified Files: server/connectionVTP.c server/connectionVTP.h
-rw-r--r--server/connectionVTP.c17
-rw-r--r--server/connectionVTP.h18
2 files changed, 20 insertions, 15 deletions
diff --git a/server/connectionVTP.c b/server/connectionVTP.c
index 4776bd5..88eb0f3 100644
--- a/server/connectionVTP.c
+++ b/server/connectionVTP.c
@@ -1,5 +1,5 @@
/*
- * $Id: connectionVTP.c,v 1.10 2007/04/24 10:43:40 schmirl Exp $
+ * $Id: connectionVTP.c,v 1.11 2007/04/24 11:03:41 schmirl Exp $
*/
#include "server/connectionVTP.h"
@@ -466,6 +466,8 @@ cConnectionVTP::cConnectionVTP(void):
cServerConnection("VTP"),
m_LiveSocket(NULL),
m_LiveStreamer(NULL),
+ m_FilterSocket(NULL),
+ m_FilterStreamer(NULL),
m_LastCommand(NULL),
m_NoTSPIDS(false),
m_LSTEHandler(NULL),
@@ -485,6 +487,11 @@ cConnectionVTP::~cConnectionVTP()
delete m_LSTEHandler;
}
+inline bool cConnectionVTP::Abort(void) const
+{
+ return m_LiveStreamer && m_LiveStreamer->Abort();
+}
+
void cConnectionVTP::Welcome(void)
{
Respond(220, "Welcome to Video Disk Recorder (VTP)");
@@ -547,8 +554,8 @@ bool cConnectionVTP::Command(char *Cmd)
else if (strcasecmp(Cmd, "ADDF") == 0) return CmdADDF(param);
else if (strcasecmp(Cmd, "DELF") == 0) return CmdDELF(param);
else if (strcasecmp(Cmd, "ABRT") == 0) return CmdABRT(param);
- else if (strcasecmp(Cmd, "QUIT") == 0) return CmdQUIT(param);
- else if (strcasecmp(Cmd, "SUSP") == 0) return CmdSUSP(param);
+ else if (strcasecmp(Cmd, "QUIT") == 0) return CmdQUIT();
+ else if (strcasecmp(Cmd, "SUSP") == 0) return CmdSUSP();
// Commands adopted from SVDRP
//else if (strcasecmp(Cmd, "DELR") == 0) return CmdDELR(param);
else if (strcasecmp(Cmd, "MODT") == 0) return CmdMODT(param);
@@ -777,13 +784,13 @@ bool cConnectionVTP::CmdABRT(char *Opts)
return Respond(220, "Data connection closed");
}
-bool cConnectionVTP::CmdQUIT(char *Opts)
+bool cConnectionVTP::CmdQUIT(void)
{
DeferClose();
return Respond(221, "Video Disk Recorder closing connection");
}
-bool cConnectionVTP::CmdSUSP(char *Opts)
+bool cConnectionVTP::CmdSUSP(void)
{
if (StreamdevServerSetup.SuspendMode == smAlways || cSuspendCtl::IsActive())
return Respond(220, "Server is suspended");
diff --git a/server/connectionVTP.h b/server/connectionVTP.h
index c6ab223..fffff4f 100644
--- a/server/connectionVTP.h
+++ b/server/connectionVTP.h
@@ -2,9 +2,10 @@
#define VDR_STREAMDEV_SERVERS_CONNECTIONVTP_H
#include "server/connection.h"
-#include "server/livestreamer.h"
class cTBSocket;
+class cStreamdevLiveStreamer;
+class cStreamdevFilterStreamer;
class cLSTEHandler;
class cLSTCHandler;
class cLSTTHandler;
@@ -16,8 +17,10 @@ class cConnectionVTP: public cServerConnection {
using cServerConnection::Respond;
private:
- cTBSocket *m_LiveSocket;
- cStreamdevLiveStreamer *m_LiveStreamer;
+ cTBSocket *m_LiveSocket;
+ cStreamdevLiveStreamer *m_LiveStreamer;
+ cTBSocket *m_FilterSocket;
+ cStreamdevFilterStreamer *m_FilterStreamer;
char *m_LastCommand;
bool m_NoTSPIDS;
@@ -53,8 +56,8 @@ public:
bool CmdADDF(char *Opts);
bool CmdDELF(char *Opts);
bool CmdABRT(char *Opts);
- bool CmdQUIT(char *Opts);
- bool CmdSUSP(char *Opts);
+ bool CmdQUIT(void);
+ bool CmdSUSP(void);
// Thread-safe implementations of SVDRP commands
bool CmdLSTE(char *Opts);
@@ -73,9 +76,4 @@ public:
__attribute__ ((format (printf, 3, 4)));
};
-inline bool cConnectionVTP::Abort(void) const
-{
- return m_LiveStreamer && m_LiveStreamer->Abort();
-}
-
#endif // VDR_STREAMDEV_SERVERS_CONNECTIONVTP_H