mirror of
https://projects.vdr-developer.org/git/vdr-plugin-streamdev.git
synced 2023-10-10 19:16:51 +02:00
server_connectionVTP-new-data.patch by Petri Hintukainen
- Add new data (LiveFilterStreamer and LiveFilterSocket) - Misc cleanup Modified Files: server/connectionVTP.c server/connectionVTP.h
This commit is contained in:
parent
ac4c391c43
commit
a0dfe7b20a
@ -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");
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user