diff options
author | schmirl <schmirl> | 2007-04-24 10:43:40 +0000 |
---|---|---|
committer | schmirl <schmirl> | 2007-04-24 10:43:40 +0000 |
commit | d5a38b3213e138b6e74d724198619ab5138242ff (patch) | |
tree | 044abf65357c36b8a782b2f5f3ee1cbba043ec4f /server | |
parent | 0553fce43c696295bd4b291f58397497b59f965b (diff) | |
download | vdr-plugin-streamdev-d5a38b3213e138b6e74d724198619ab5138242ff.tar.gz vdr-plugin-streamdev-d5a38b3213e138b6e74d724198619ab5138242ff.tar.bz2 |
client_device-vdr-1.5.1-fixes.patch by Petri Hintukainen (#219)
- VDR 1.5.0 calls some device members in different order and
streamdev can't currently handle this.
- do not trust in OpenDvr/CloseDvr, instead keep count of active PIDs,
open data connection when it is needed and close it only when there
are no active PIDs
(closing data connection unsubscribes all pids at server end)
- some sanity checks on server side
Modified Files:
client/device.c client/device.h server/connectionVTP.c
Diffstat (limited to 'server')
-rw-r--r-- | server/connectionVTP.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/server/connectionVTP.c b/server/connectionVTP.c index 514c5a0..4776bd5 100644 --- a/server/connectionVTP.c +++ b/server/connectionVTP.c @@ -1,5 +1,5 @@ /* - * $Id: connectionVTP.c,v 1.9 2007/04/16 11:01:02 schmirl Exp $ + * $Id: connectionVTP.c,v 1.10 2007/04/24 10:43:40 schmirl Exp $ */ #include "server/connectionVTP.h" @@ -632,6 +632,10 @@ bool cConnectionVTP::CmdPORT(char *Opts) isyslog("Streamdev: Setting data connection to %s:%d", dataip, dataport); + if(m_LiveSocket && m_LiveStreamer) + m_LiveStreamer->Stop(); + delete m_LiveSocket; + m_LiveSocket = new cTBSocket(SOCK_STREAM); if (!m_LiveSocket->Connect(dataip, dataport)) { esyslog("ERROR: Streamdev: Couldn't open data connection to %s:%d: %s", @@ -640,10 +644,10 @@ bool cConnectionVTP::CmdPORT(char *Opts) return Respond(551, "Couldn't open data connection"); } - if (id == siLive) + if (m_LiveStreamer) m_LiveStreamer->Start(m_LiveSocket); - return Respond(220, "Port command ok, data connection opened"); + return Respond(220, "Port command ok, data connection opened"); } bool cConnectionVTP::CmdTUNE(char *Opts) @@ -664,6 +668,8 @@ bool cConnectionVTP::CmdTUNE(char *Opts) m_LiveStreamer = new cStreamdevLiveStreamer(1); m_LiveStreamer->SetChannel(chan, m_NoTSPIDS ? stTS : stTSPIDS); m_LiveStreamer->SetDevice(dev); + if(m_LiveSocket) + m_LiveStreamer->Start(m_LiveSocket); return Respond(220, "Channel tuned"); } |