From 9af6ceb00705470484c4b23cf71f9bb11d2af271 Mon Sep 17 00:00:00 2001 From: schmirl Date: Fri, 16 Jan 2009 11:35:43 +0000 Subject: [PATCH] Commented PES for vdr 1.7.3+ Modified Files: HISTORY common.c common.h remux/ts2ps.h remux/tsremux.h server/connectionHTTP.c server/connectionVTP.c server/livestreamer.c server/livestreamer.h server/menuHTTP.c server/setup.c --- HISTORY | 1 + common.c | 4 +++- common.h | 4 +++- remux/ts2ps.h | 4 ++++ remux/tsremux.h | 4 ++++ server/connectionHTTP.c | 6 +++++- server/connectionVTP.c | 4 +++- server/livestreamer.c | 12 ++++++++++++ server/livestreamer.h | 4 ++++ server/menuHTTP.c | 4 ++++ server/setup.c | 4 ++-- 11 files changed, 45 insertions(+), 6 deletions(-) diff --git a/HISTORY b/HISTORY index 8a58410..93d679c 100644 --- a/HISTORY +++ b/HISTORY @@ -1,6 +1,7 @@ VDR Plugin 'streamdev' Revision History --------------------------------------- +- disabled PES for VDR 1.7.3+ - added Network Media Tank browser support to HTML pages (thanks to Jori Hamalainen) - minor fixes of PAT repacker diff --git a/common.c b/common.c index e3e5d39..dada4a3 100644 --- a/common.c +++ b/common.c @@ -1,5 +1,5 @@ /* - * $Id: common.c,v 1.8 2008/04/08 14:18:15 schmirl Exp $ + * $Id: common.c,v 1.9 2009/01/16 11:35:43 schmirl Exp $ */ #include @@ -14,7 +14,9 @@ const char *VERSION = "0.5.0-pre"; const char *StreamTypes[st_Count] = { "TS", +#if APIVERSNUM < 10703 "PES", +#endif "PS", "ES", "Extern", diff --git a/common.h b/common.h index c6bb0c0..e920c79 100644 --- a/common.h +++ b/common.h @@ -1,5 +1,5 @@ /* - * $Id: common.h,v 1.11 2008/04/07 14:40:39 schmirl Exp $ + * $Id: common.h,v 1.12 2009/01/16 11:35:43 schmirl Exp $ */ #ifndef VDR_STREAMDEV_COMMON_H @@ -51,7 +51,9 @@ const cChannel *ChannelFromString(const char *String, int *Apid = NULL); enum eStreamType { stTS, +#if APIVERSNUM < 10703 stPES, +#endif stPS, stES, stExtern, diff --git a/remux/ts2ps.h b/remux/ts2ps.h index 334215a..f31e025 100644 --- a/remux/ts2ps.h +++ b/remux/ts2ps.h @@ -5,6 +5,10 @@ #include #include +#ifndef MAXTRACKS +#define MAXTRACKS 64 +#endif + class cTS2PS; class cTS2PSRemux: public cTSRemux { diff --git a/remux/tsremux.h b/remux/tsremux.h index f7e4e09..a7fe481 100644 --- a/remux/tsremux.h +++ b/remux/tsremux.h @@ -4,6 +4,10 @@ #include "libdvbmpeg/transform.h" #include +#ifndef NO_PICTURE +#define NO_PICTURE 0 +#endif + #define RESULTBUFFERSIZE KILOBYTE(256) class cTSRemux { diff --git a/server/connectionHTTP.c b/server/connectionHTTP.c index 2e867cf..3b41bf2 100644 --- a/server/connectionHTTP.c +++ b/server/connectionHTTP.c @@ -1,5 +1,5 @@ /* - * $Id: connectionHTTP.c,v 1.14 2008/10/14 11:05:47 schmirl Exp $ + * $Id: connectionHTTP.c,v 1.15 2009/01/16 11:35:44 schmirl Exp $ */ #include @@ -208,8 +208,10 @@ bool cConnectionHTTP::CmdGET(const std::string &Opts) const char* pType = type.c_str(); if (strcasecmp(pType, "PS") == 0) { m_StreamType = stPS; +#if APIVERSNUM < 10703 } else if (strcasecmp(pType, "PES") == 0) { m_StreamType = stPES; +#endif } else if (strcasecmp(pType, "TS") == 0) { m_StreamType = stTS; } else if (strcasecmp(pType, "ES") == 0) { @@ -261,7 +263,9 @@ bool cConnectionHTTP::CmdGET(const std::string &Opts) { case stTS: base += "TS/"; break; case stPS: base += "PS/"; break; +#if APIVERSNUM < 10703 case stPES: base += "PES/"; break; +#endif case stES: base += "ES/"; break; case stExtern: base += "Extern/"; break; default: break; diff --git a/server/connectionVTP.c b/server/connectionVTP.c index 0412d1f..e0edb6e 100644 --- a/server/connectionVTP.c +++ b/server/connectionVTP.c @@ -1,5 +1,5 @@ /* - * $Id: connectionVTP.c,v 1.18 2008/04/07 14:27:30 schmirl Exp $ + * $Id: connectionVTP.c,v 1.19 2009/01/16 11:35:44 schmirl Exp $ */ #include "server/connectionVTP.h" @@ -595,10 +595,12 @@ bool cConnectionVTP::CmdCAPS(char *Opts) return Respond(220, "Capability \"%s\" accepted", Opts); } +#if APIVERSNUM < 10703 if (strcasecmp(Opts, "PES") == 0) { m_StreamType = stPES; return Respond(220, "Capability \"%s\" accepted", Opts); } +#endif if (strcasecmp(Opts, "EXTERN") == 0) { m_StreamType = stExtern; diff --git a/server/livestreamer.c b/server/livestreamer.c index d535819..97dffd7 100644 --- a/server/livestreamer.c +++ b/server/livestreamer.c @@ -329,7 +329,9 @@ cStreamdevLiveStreamer::cStreamdevLiveStreamer(int Priority, std::string Paramet m_Device(NULL), m_Receiver(NULL), m_PatFilter(NULL), +#if APIVERSNUM < 10703 m_PESRemux(NULL), +#endif m_ESRemux(NULL), m_PSRemux(NULL), m_ExtRemux(NULL) @@ -345,7 +347,9 @@ cStreamdevLiveStreamer::~cStreamdevLiveStreamer() DELETENULL(m_PatFilter); } DELETENULL(m_Receiver); +#if APIVERSNUM < 10703 delete m_PESRemux; +#endif delete m_ESRemux; delete m_PSRemux; delete m_ExtRemux; @@ -459,10 +463,12 @@ bool cStreamdevLiveStreamer::SetChannel(const cChannel *Channel, eStreamType Str return SetPids(pid); } +#if APIVERSNUM < 10703 case stPES: m_PESRemux = new cRemux(m_Channel->Vpid(), m_Channel->Apids(), m_Channel->Dpids(), m_Channel->Spids(), false); return SetPids(m_Channel->Vpid(), Apids, Dpids, m_Channel->Spids()); +#endif case stPS: m_PSRemux = new cTS2PSRemux(m_Channel->Vpid(), m_Channel->Apids(), m_Channel->Dpids(), @@ -502,8 +508,10 @@ int cStreamdevLiveStreamer::Put(const uchar *Data, int Count) case stTSPIDS: return cStreamdevStreamer::Put(Data, Count); +#if APIVERSNUM < 10703 case stPES: return m_PESRemux->Put(Data, Count); +#endif case stES: return m_ESRemux->Put(Data, Count); @@ -526,8 +534,10 @@ uchar *cStreamdevLiveStreamer::Get(int &Count) case stTSPIDS: return cStreamdevStreamer::Get(Count); +#if APIVERSNUM < 10703 case stPES: return m_PESRemux->Get(Count); +#endif case stES: return m_ESRemux->Get(Count); @@ -551,9 +561,11 @@ void cStreamdevLiveStreamer::Del(int Count) cStreamdevStreamer::Del(Count); break; +#if APIVERSNUM < 10703 case stPES: m_PESRemux->Del(Count); break; +#endif case stES: m_ESRemux->Del(Count); diff --git a/server/livestreamer.h b/server/livestreamer.h index dee509c..5c4ae8f 100644 --- a/server/livestreamer.h +++ b/server/livestreamer.h @@ -10,7 +10,9 @@ class cTS2PSRemux; class cTS2ESRemux; class cExternRemux; +#if APIVERSNUM < 10703 class cRemux; +#endif class cStreamdevPatFilter; class cStreamdevLiveReceiver; @@ -27,7 +29,9 @@ private: cDevice *m_Device; cStreamdevLiveReceiver *m_Receiver; cStreamdevPatFilter *m_PatFilter; +#if APIVERSNUM < 10703 cRemux *m_PESRemux; +#endif cTS2ESRemux *m_ESRemux; cTS2PSRemux *m_PSRemux; cExternRemux *m_ExtRemux; diff --git a/server/menuHTTP.c b/server/menuHTTP.c index 8d3e404..41b1f10 100644 --- a/server/menuHTTP.c +++ b/server/menuHTTP.c @@ -201,8 +201,10 @@ std::string cHtmlChannelList::StreamTypeMenu() (std::string) "[TS] "); typeMenu += (streamType == stPS ? (std::string) "[PS] " : (std::string) "[PS] "); +#if APIVERSNUM < 10703 typeMenu += (streamType == stPES ? (std::string) "[PES] " : (std::string) "[PES] "); +#endif typeMenu += (streamType == stES ? (std::string) "[ES] " : (std::string) "[ES] "); typeMenu += (streamType == stExtern ? (std::string) "[Extern] " : @@ -341,8 +343,10 @@ std::string cHtmlChannelList::ItemText() switch (streamType) { case stTS: suffix = (std::string) ".ts"; break; case stPS: suffix = (std::string) ".vob"; break; +#if APIVERSNUM < 10703 // for Network Media Tank case stPES: suffix = (std::string) ".vdr"; break; +#endif default: suffix = ""; } line += (std::string) "
  • Number()) + "\">"; diff --git a/server/setup.c b/server/setup.c index 8af8920..6867cdb 100644 --- a/server/setup.c +++ b/server/setup.c @@ -1,5 +1,5 @@ /* - * $Id: setup.c,v 1.4 2008/04/08 14:18:18 schmirl Exp $ + * $Id: setup.c,v 1.5 2009/01/16 11:35:44 schmirl Exp $ */ #include @@ -15,7 +15,7 @@ cStreamdevServerSetup::cStreamdevServerSetup(void) { VTPServerPort = 2004; StartHTTPServer = true; HTTPServerPort = 3000; - HTTPStreamType = stPES; + HTTPStreamType = stTS; SuspendMode = smAlways; AllowSuspend = false; strcpy(VTPBindIP, "0.0.0.0");