summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/setup.c6
-rw-r--r--client/setup.h3
-rw-r--r--client/socket.c50
-rw-r--r--client/socket.h3
4 files changed, 21 insertions, 41 deletions
diff --git a/client/setup.c b/client/setup.c
index f8f53db..8d7b9cb 100644
--- a/client/setup.c
+++ b/client/setup.c
@@ -1,5 +1,5 @@
/*
- * $Id: setup.c,v 1.1 2004/12/30 22:44:03 lordjaxom Exp $
+ * $Id: setup.c,v 1.2 2005/02/08 15:34:38 lordjaxom Exp $
*/
#include <vdr/menuitems.h>
@@ -13,7 +13,6 @@ cStreamdevClientSetup StreamdevClientSetup;
cStreamdevClientSetup::cStreamdevClientSetup(void) {
StartClient = false;
RemotePort = 2004;
- StreamPIDS = true;
#if VDRVERSNUM >= 10300
StreamFilters = false;
#endif
@@ -30,7 +29,6 @@ bool cStreamdevClientSetup::SetupParse(const char *Name, const char *Value) {
strcpy(RemoteIp, Value);
}
else if (strcmp(Name, "RemotePort") == 0) RemotePort = atoi(Value);
- else if (strcmp(Name, "StreamPIDS") == 0) StreamPIDS = atoi(Value);
#if VDRVERSNUM >= 10300
else if (strcmp(Name, "StreamFilters") == 0) StreamFilters = atoi(Value);
#endif
@@ -45,7 +43,6 @@ cStreamdevClientMenuSetupPage::cStreamdevClientMenuSetupPage(void) {
AddBoolEdit (tr("Start Client"), m_NewSetup.StartClient);
AddIpEdit (tr("Remote IP"), m_NewSetup.RemoteIp);
AddShortEdit(tr("Remote Port"), m_NewSetup.RemotePort);
- AddBoolEdit (tr("MultiPID Streaming"), m_NewSetup.StreamPIDS);
#if VDRVERSNUM >= 10300
AddBoolEdit (tr("Filter Streaming"), m_NewSetup.StreamFilters);
#endif
@@ -70,7 +67,6 @@ void cStreamdevClientMenuSetupPage::Store(void) {
else
SetupStore("RemoteIp", m_NewSetup.RemoteIp);
SetupStore("RemotePort", m_NewSetup.RemotePort);
- SetupStore("StreamPIDS", m_NewSetup.StreamPIDS);
#if VDRVERSNUM >= 10300
SetupStore("StreamFilters", m_NewSetup.StreamFilters);
#endif
diff --git a/client/setup.h b/client/setup.h
index fe8e975..b0a1867 100644
--- a/client/setup.h
+++ b/client/setup.h
@@ -1,5 +1,5 @@
/*
- * $Id: setup.h,v 1.1 2004/12/30 22:44:03 lordjaxom Exp $
+ * $Id: setup.h,v 1.2 2005/02/08 15:34:38 lordjaxom Exp $
*/
#ifndef VDR_STREAMDEV_SETUPCLIENT_H
@@ -15,7 +15,6 @@ struct cStreamdevClientSetup {
int StartClient;
char RemoteIp[20];
int RemotePort;
- int StreamPIDS;
#if VDRVERSNUM >= 10300
int StreamFilters;
#endif
diff --git a/client/socket.c b/client/socket.c
index 9e399cb..6b3f860 100644
--- a/client/socket.c
+++ b/client/socket.c
@@ -1,5 +1,5 @@
/*
- * $Id: socket.c,v 1.2 2005/02/08 13:59:16 lordjaxom Exp $
+ * $Id: socket.c,v 1.3 2005/02/08 15:34:38 lordjaxom Exp $
*/
#include <tools/select.h>
@@ -15,22 +15,24 @@
cClientSocket ClientSocket;
-cClientSocket::cClientSocket(void) {
+cClientSocket::cClientSocket(void)
+{
memset(m_DataSockets, 0, sizeof(cTBSocket*) * si_Count);
Reset();
}
-cClientSocket::~cClientSocket() {
+cClientSocket::~cClientSocket()
+{
Reset();
if (IsOpen()) Quit();
}
-void cClientSocket::Reset(void) {
- m_StreamPIDS = false;
-
- for (int it = 0; it < si_Count; ++it)
+void cClientSocket::Reset(void)
+{
+ for (int it = 0; it < si_Count; ++it) {
if (m_DataSockets[it] != NULL)
DELETENULL(m_DataSockets[it]);
+ }
}
cTBSocket *cClientSocket::DataSocket(eSocketId Id) const {
@@ -128,7 +130,7 @@ bool cClientSocket::CheckConnection(void) {
return false;
}
- if (!Command((cTBString)"CAPS TS", 220)) {
+ if (!Command((cTBString)"CAPS TSPIDS", 220)) {
if (errno == 0)
esyslog("ERROR: Streamdev: Couldn't negotiate capabilities on %s:%d",
(const char*)RemoteIp(), RemotePort());
@@ -136,21 +138,8 @@ bool cClientSocket::CheckConnection(void) {
return false;
}
- if (StreamdevClientSetup.StreamPIDS) {
- if (!Command("CAPS TSPIDS", 220)) {
- if (errno != 0) {
- Close();
- return false;
- }
-
- esyslog("ERROR: Streamdev: Server %s:%d isn't capable of PID streaming",
- (const char*)RemoteIp(), RemotePort());
- } else
- m_StreamPIDS = true;
- }
-
- isyslog("Streamdev: Connected to server %s:%d using capabilities TS%s",
- (const char*)RemoteIp(), RemotePort(), m_StreamPIDS ? ", TSPIDS" : "");
+ isyslog("Streamdev: Connected to server %s:%d using capabilities TSPIDS",
+ (const char*)RemoteIp(), RemotePort());
return true;
}
@@ -241,16 +230,13 @@ bool cClientSocket::SetChannelDevice(const cChannel *Channel) {
bool cClientSocket::SetPid(int Pid, bool On) {
if (!CheckConnection()) return false;
- if (m_StreamPIDS) {
- Dprintf("m_StreamPIDS is ON\n");
- CMD_LOCK;
+ CMD_LOCK;
- if (!Command((On ? "ADDP " : "DELP ") + cTBString::Number(Pid), 220)) {
- if (errno == 0)
- esyslog("Streamdev: Pid %d not available from %s:%d", Pid,
- (const char*)LocalIp(), LocalPort());
- return false;
- }
+ if (!Command((On ? "ADDP " : "DELP ") + cTBString::Number(Pid), 220)) {
+ if (errno == 0)
+ esyslog("Streamdev: Pid %d not available from %s:%d", Pid,
+ (const char*)LocalIp(), LocalPort());
+ return false;
}
return true;
}
diff --git a/client/socket.h b/client/socket.h
index d4f360a..a603727 100644
--- a/client/socket.h
+++ b/client/socket.h
@@ -1,5 +1,5 @@
/*
- * $Id: socket.h,v 1.1 2004/12/30 22:44:04 lordjaxom Exp $
+ * $Id: socket.h,v 1.2 2005/02/08 15:34:38 lordjaxom Exp $
*/
#ifndef VDR_STREAMDEV_CLIENT_CONNECTION_H
@@ -19,7 +19,6 @@ class cPES2TSRemux;
class cClientSocket: public cTBSocket {
private:
- bool m_StreamPIDS;
cTBSocket *m_DataSockets[si_Count];
cMutex m_Mutex;