summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthlo <smarttv640@gmail.com>2013-11-30 14:00:45 +0100
committerthlo <smarttv640@gmail.com>2013-11-30 14:00:45 +0100
commit823ce3ed7d0060e08955c8c6379f634c0f4539e8 (patch)
tree5e205142c9b98704471903386f2978affda3f141
parent7097c31865716ba90374b761481370f15738b8fb (diff)
downloadvdr-plugin-smarttvweb-823ce3ed7d0060e08955c8c6379f634c0f4539e8.tar.gz
vdr-plugin-smarttvweb-823ce3ed7d0060e08955c8c6379f634c0f4539e8.tar.bz2
Fixed Pcr method.
-rw-r--r--responselive.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/responselive.c b/responselive.c
index 690789d..6204cc2 100644
--- a/responselive.c
+++ b/responselive.c
@@ -146,6 +146,7 @@ cResponseLive::cResponseLive(cHttpResource* req, string chan_id) : cResponseBase
sendHeaders(200, "OK", NULL, "video/mpeg", -1, -1);
}
else {
+ *(mLog->log()) << DEBUGPREFIX << " cResponseLive::cResponseLive - Constructor - sending Error" << endl;
sendError(404, "Not Found.", NULL, "004 Resource Busy");
}
}
@@ -174,6 +175,20 @@ bool cResponseLive::InitRelay(string channel_id) {
char buf [40];
snprintf(buf, 40, "%s", *(channel->GetChannelID()).ToString());
+ *(mLog->log()) << DEBUGPREFIX
+ << " vpid= " << channel->Vpid()
+ << " vtype= " << channel->Vtype()
+ << " ppid= " << channel->Ppid()
+ << endl;
+
+ if (channel->Vpid() == 0) {
+ mStartThreshold= 10 * 188;
+
+ *(mLog->log()) << DEBUGPREFIX << " cResponseLive::InitRelay Audio Only service detected. mStartThreshold is " << mStartThreshold
+ << " (" << mStartThreshold/188 << " Pkts)" << endl;
+ mInStartPhase = true;
+ }
+
if (channel->Vpid() != 0) {
mVpid = channel->Vpid();
mVtype = channel->Vtype();
@@ -252,8 +267,13 @@ int cResponseLive::fillDataBlk() {
break;
case 2:
return fillDataBlk_iframe();
- break;
+ break;
};
+
+ *(mLog->log()) << DEBUGPREFIX
+ << " cResponseLive::fillDataBlk() - ERROR: should not be here " << endl;
+
+ return ERROR;
}
int cResponseLive::fillDataBlk_pcr() {
@@ -288,8 +308,11 @@ int cResponseLive::fillDataBlk_pcr() {
if (pcr != -1) {
// pcr pkt found
if ((r - (offset+188)) < threshold) {
+ *(mLog->log()) << DEBUGPREFIX
+ << " cResponseLive::fillDataBlk() - PCR found but not sufficient data "
+ << pcr << endl;
already_deleted = true;
- mRelay->mRingBuffer->Del(offset + 188);
+ mRelay->mRingBuffer->Del(offset);
break;
}
*(mLog->log()) << DEBUGPREFIX