diff options
author | thlo <smarttv640@gmail.com> | 2013-11-27 20:53:23 +0100 |
---|---|---|
committer | thlo <smarttv640@gmail.com> | 2013-11-27 20:53:23 +0100 |
commit | e42e7e1e66b888d93c3506f424eda9f5f07fd721 (patch) | |
tree | 9b770ffe93106aee79a8a2f24f31af93399249ca /responselive.h | |
parent | 6ca942880db7b3151b226b8719738aa312034b8b (diff) | |
download | vdr-plugin-smarttvweb-e42e7e1e66b888d93c3506f424eda9f5f07fd721.tar.gz vdr-plugin-smarttvweb-e42e7e1e66b888d93c3506f424eda9f5f07fd721.tar.bz2 |
TsGetPcr added for versions smaller 1.7.32
Diffstat (limited to 'responselive.h')
-rw-r--r-- | responselive.h | 19 |
1 files changed, 19 insertions, 0 deletions
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; |