diff options
author | Frank Schmirler <vdr@schmirler.de> | 2010-12-02 09:00:32 +0100 |
---|---|---|
committer | Frank Schmirler <vdr@schmirler.de> | 2010-12-02 09:00:32 +0100 |
commit | 7576173547027dae57206cfd3d967d5c516fa6b7 (patch) | |
tree | 9b6de3823d222543024cc0244329974b74534bbc /server | |
parent | 5a270cc3ab659a98b4bb674acb77982f7e1ecb14 (diff) | |
download | vdr-plugin-streamdev-7576173547027dae57206cfd3d967d5c516fa6b7.tar.gz vdr-plugin-streamdev-7576173547027dae57206cfd3d967d5c516fa6b7.tar.bz2 |
Snapshot 2007-09-21
Diffstat (limited to 'server')
-rw-r--r-- | server/connectionVTP.c | 28 | ||||
-rw-r--r-- | server/connectionVTP.h | 2 | ||||
-rw-r--r-- | server/streamer.c | 4 |
3 files changed, 25 insertions, 9 deletions
diff --git a/server/connectionVTP.c b/server/connectionVTP.c index c847bf3..5ca2df6 100644 --- a/server/connectionVTP.c +++ b/server/connectionVTP.c @@ -1,5 +1,5 @@ /* - * $Id: connectionVTP.c,v 1.14 2007/05/09 09:12:42 schmirl Exp $ + * $Id: connectionVTP.c,v 1.15 2007/09/21 12:45:31 schmirl Exp $ */ #include "server/connectionVTP.h" @@ -469,7 +469,7 @@ cConnectionVTP::cConnectionVTP(void): m_FilterSocket(NULL), m_FilterStreamer(NULL), m_LastCommand(NULL), - m_NoTSPIDS(false), + m_StreamType(stTSPIDS), m_LSTEHandler(NULL), m_LSTCHandler(NULL), m_LSTTHandler(NULL) @@ -572,13 +572,27 @@ bool cConnectionVTP::Command(char *Cmd) bool cConnectionVTP::CmdCAPS(char *Opts) { if (strcasecmp(Opts, "TS") == 0) { - m_NoTSPIDS = true; - return Respond(220, "Ignored, capability \"%s\" accepted for " - "compatibility", Opts); + m_StreamType = stTS; + return Respond(220, "Capability \"%s\" accepted", Opts); } if (strcasecmp(Opts, "TSPIDS") == 0) { - m_NoTSPIDS = false; + m_StreamType = stTSPIDS; + return Respond(220, "Capability \"%s\" accepted", Opts); + } + + if (strcasecmp(Opts, "PS") == 0) { + m_StreamType = stPS; + return Respond(220, "Capability \"%s\" accepted", Opts); + } + + if (strcasecmp(Opts, "PES") == 0) { + m_StreamType = stPES; + return Respond(220, "Capability \"%s\" accepted", Opts); + } + + if (strcasecmp(Opts, "EXTERN") == 0) { + m_StreamType = stExtern; return Respond(220, "Capability \"%s\" accepted", Opts); } @@ -715,7 +729,7 @@ bool cConnectionVTP::CmdTUNE(char *Opts) delete m_LiveStreamer; m_LiveStreamer = new cStreamdevLiveStreamer(1); - m_LiveStreamer->SetChannel(chan, m_NoTSPIDS ? stTS : stTSPIDS); + m_LiveStreamer->SetChannel(chan, m_StreamType); m_LiveStreamer->SetDevice(dev); if(m_LiveSocket) m_LiveStreamer->Start(m_LiveSocket); diff --git a/server/connectionVTP.h b/server/connectionVTP.h index fffff4f..aa9a90f 100644 --- a/server/connectionVTP.h +++ b/server/connectionVTP.h @@ -23,7 +23,7 @@ private: cStreamdevFilterStreamer *m_FilterStreamer; char *m_LastCommand; - bool m_NoTSPIDS; + eStreamType m_StreamType; // Members adopted for SVDRP cRecordings Recordings; diff --git a/server/streamer.c b/server/streamer.c index 63d2f60..979032a 100644 --- a/server/streamer.c +++ b/server/streamer.c @@ -1,5 +1,5 @@ /* - * $Id: streamer.c,v 1.15 2007/04/02 10:32:34 schmirl Exp $ + * $Id: streamer.c,v 1.16 2007/09/21 11:45:53 schmirl Exp $ */ #include <vdr/ringbuffer.h> @@ -141,6 +141,8 @@ void cStreamdevStreamer::Action(void) int count = Put(block, got); if (count) m_RingBuffer->Del(count); + else + cCondWait::SleepMs(100); } } } |