summaryrefslogtreecommitdiff
path: root/server/livestreamer.c
diff options
context:
space:
mode:
authorschmirl <schmirl>2010-07-19 13:50:11 +0000
committerschmirl <schmirl>2010-07-19 13:50:11 +0000
commitfa578940f7770876d884093a57f657b03213cea3 (patch)
tree6b7d56a314e4ed9b90102a8d53f08e769dc7a1e9 /server/livestreamer.c
parenta43455f660040140fcfd9401ceb81f1e13f8bd7d (diff)
downloadvdr-plugin-streamdev-fa578940f7770876d884093a57f657b03213cea3.tar.gz
vdr-plugin-streamdev-fa578940f7770876d884093a57f657b03213cea3.tar.bz2
- using SIGINT in externremux to kill mencoder works better than SIGTERM;
especially x264 still needs a SIGKILL sometimes - added --remove-destination to cp commands installing plugins - updated Italian translation (thanks to Diego Pierotto) - config option "client may suspend" hidden if not applicable - updated and enhanced README - added support for HTTP method HEAD - rewrite of externremux.sh, including support for various URL parameters, logging and improved shutdown - start externremux script in a separate process group - changed HTTP URL path for externremux from EXTERN to EXT (suggested by Rolf Ahrenberg) - HTTP headers now have to be emitted by externremux script - pass channel related information and URL parameters to externremux script through environment - implement CGI like interface for externremux script Modified Files: Tag: v0_4 CONTRIBUTORS HISTORY Makefile README common.c common.h i18n.c remux/extern.c remux/extern.h server/connection.c server/connection.h server/connectionHTTP.c server/connectionHTTP.h server/connectionIGMP.c server/connectionVTP.c server/livestreamer.c server/livestreamer.h server/menuHTTP.c server/setup.c server/setup.h server/streamer.c server/streamer.h streamdev/externremux.sh streamdev/streamdevhosts.conf
Diffstat (limited to 'server/livestreamer.c')
-rw-r--r--server/livestreamer.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/server/livestreamer.c b/server/livestreamer.c
index c894468..ff4f708 100644
--- a/server/livestreamer.c
+++ b/server/livestreamer.c
@@ -343,10 +343,9 @@ void cStreamdevPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, i
// --- cStreamdevLiveStreamer -------------------------------------------------
-cStreamdevLiveStreamer::cStreamdevLiveStreamer(int Priority, std::string Parameter):
- cStreamdevStreamer("streamdev-livestreaming"),
+cStreamdevLiveStreamer::cStreamdevLiveStreamer(int Priority, const cServerConnection *Connection):
+ cStreamdevStreamer("streamdev-livestreaming", Connection),
m_Priority(Priority),
- m_Parameter(Parameter),
m_NumPids(0),
m_StreamType(stTSPIDS),
m_Channel(NULL),
@@ -460,40 +459,38 @@ void cStreamdevLiveStreamer::StartReceiver(void)
}
}
-bool cStreamdevLiveStreamer::SetChannel(const cChannel *Channel, eStreamType StreamType, int Apid)
+bool cStreamdevLiveStreamer::SetChannel(const cChannel *Channel, eStreamType StreamType, const int* Apid, const int *Dpid)
{
Dprintf("Initializing Remuxer for full channel transfer\n");
//printf("ca pid: %d\n", Channel->Ca());
m_Channel = Channel;
m_StreamType = StreamType;
- int apid[2] = { Apid, 0 };
- const int *Apids = Apid ? apid : m_Channel->Apids();
- const int *Dpids = Apid ? NULL : m_Channel->Dpids();
+ const int *Apids = Apid ? Apid : m_Channel->Apids();
+ const int *Dpids = Dpid ? Dpid : m_Channel->Dpids();
switch (m_StreamType) {
case stES:
{
int pid = ISRADIO(m_Channel) ? m_Channel->Apid(0) : m_Channel->Vpid();
- if (Apid != 0)
- pid = Apid;
+ if (Apid && Apid[0])
+ pid = Apid[0];
+ else if (Dpid && Dpid[0])
+ pid = Dpid[0];
m_Remux = new cTS2ESRemux(pid);
return SetPids(pid);
}
case stPES:
- m_Remux = new cTS2PESRemux(m_Channel->Vpid(), m_Channel->Apids(), m_Channel->Dpids(),
- m_Channel->Spids());
+ m_Remux = new cTS2PESRemux(m_Channel->Vpid(), Apids, Dpids, m_Channel->Spids());
return SetPids(m_Channel->Vpid(), Apids, Dpids, m_Channel->Spids());
case stPS:
- m_Remux = new cTS2PSRemux(m_Channel->Vpid(), m_Channel->Apids(), m_Channel->Dpids(),
- m_Channel->Spids());
+ m_Remux = new cTS2PSRemux(m_Channel->Vpid(), Apids, Dpids, m_Channel->Spids());
return SetPids(m_Channel->Vpid(), Apids, Dpids, m_Channel->Spids());
- case stExtern:
- m_Remux = new cExternRemux(m_Channel->Vpid(), m_Channel->Apids(), m_Channel->Dpids(),
- m_Channel->Spids(), m_Parameter);
+ case stEXT:
+ m_Remux = new cExternRemux(Connection(), m_Channel, Apids, Dpids);
// fall through
case stTS:
// This should never happen, but ...