diff options
-rw-r--r-- | responselive.c | 11 | ||||
-rw-r--r-- | responselive.h | 19 |
2 files changed, 26 insertions, 4 deletions
diff --git a/responselive.c b/responselive.c index 567c6bb..690789d 100644 --- a/responselive.c +++ b/responselive.c @@ -133,7 +133,9 @@ cResponseLive::cResponseLive(cHttpResource* req, string chan_id) : cResponseBase mPatPmtGen(NULL), mInStartPhase(true), mFrameDetector(NULL), mVpid(0), mVtype(0), mPpid(0), mStartThreshold(75*188) { mStartThreshold= mRequest->mFactory->getConfig()->getBuiltInLivePktBuf4Sd() * 188; - *(mLog->log()) << DEBUGPREFIX << " cResponseLive::cResponseLive - Constructor" << endl; + *(mLog->log()) << DEBUGPREFIX << " cResponseLive::cResponseLive - Constructor " + << "mStartThreshold= " << mStartThreshold + << " (" << mStartThreshold/188 << " Pkts)" << endl; if (InitRelay(chan_id)) { mRelay->setNotifRequired(); @@ -181,7 +183,8 @@ bool cResponseLive::InitRelay(string channel_id) { // mStartThreshold = 150 * 188; mStartThreshold= mRequest->mFactory->getConfig()->getBuiltInLivePktBuf4Hd() * 188; - *(mLog->log()) << DEBUGPREFIX << " cResponseLive::InitRelay H.264 detected. mStartThreshold is " << mStartThreshold << endl; + *(mLog->log()) << DEBUGPREFIX << " cResponseLive::InitRelay H.264 detected. mStartThreshold is " << mStartThreshold + << " (" << mStartThreshold/188 << " Pkts)" << endl; } mFrameDetector = new cFrameDetector(channel->Vpid(), channel->Vtype()); @@ -362,7 +365,7 @@ int cResponseLive::fillDataBlk_iframe() { if (mError) return ERROR; - int threshold = (mInStartPhase) ? mStartThreshold : (10*188); + int threshold = (mInStartPhase) ? mStartThreshold : (1*188); if (mRelay->mRingBuffer->Available() >= threshold) { @@ -477,7 +480,7 @@ int cResponseLive::fillDataBlk_straight() { if (mError) return ERROR; - int threshold = (mInStartPhase) ? mStartThreshold : (10*188); + int threshold = (mInStartPhase) ? mStartThreshold : (1*188); if (mRelay->mRingBuffer->Available() >= threshold) { diff --git a/responselive.h b/responselive.h index 4df0d75..dc64519 100644 --- a/responselive.h +++ b/responselive.h @@ -36,6 +36,25 @@ using namespace std; +#if VDRVERSNUM < 10732 +inline int64_t TsGetPcr(const uchar *p) +{ + if (TsHasAdaptationField(p)) { + if (p[4] >= 7 && (p[5] & TS_ADAPT_PCR)) { + return ((((int64_t)p[ 6]) << 25) | + (((int64_t)p[ 7]) << 17) | + (((int64_t)p[ 8]) << 9) | + (((int64_t)p[ 9]) << 1) | + (((int64_t)p[10]) >> 7)) * PCRFACTOR + + (((((int)p[10]) & 0x01) << 8) | + ( ((int)p[11]))); + } + } + return -1; +} +#endif + + //class SmartTvServer; class cPatPmtGenerator; |