summaryrefslogtreecommitdiff
path: root/remux.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2010-06-05 13:50:56 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2010-06-05 13:50:56 +0200
commit9377d831b3db032990dd71b1969713b8e361860a (patch)
tree88e5edba613906c74ddbdd848a2eead12dfcd3c5 /remux.c
parent174eaaffbd056de9cfc63d2077b8cc996dbb618e (diff)
downloadvdr-9377d831b3db032990dd71b1969713b8e361860a.tar.gz
vdr-9377d831b3db032990dd71b1969713b8e361860a.tar.bz2
Added full handling of the stream types of Dolby Digital pids
Diffstat (limited to 'remux.c')
-rw-r--r--remux.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/remux.c b/remux.c
index 558cfbfd..52065444 100644
--- a/remux.c
+++ b/remux.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: remux.c 2.46 2010/05/16 12:23:12 kls Exp $
+ * $Id: remux.c 2.47 2010/06/05 13:32:15 kls Exp $
*/
#include "remux.h"
@@ -188,10 +188,10 @@ int cPatPmtGenerator::MakeStream(uchar *Target, uchar Type, int Pid)
return i;
}
-int cPatPmtGenerator::MakeAC3Descriptor(uchar *Target)
+int cPatPmtGenerator::MakeAC3Descriptor(uchar *Target, uchar Type)
{
int i = 0;
- Target[i++] = SI::AC3DescriptorTag;
+ Target[i++] = Type;
Target[i++] = 0x01; // length
Target[i++] = 0x00;
IncEsInfoLength(i);
@@ -327,7 +327,7 @@ void cPatPmtGenerator::GeneratePmt(const cChannel *Channel)
}
for (int n = 0; Channel->Dpid(n); n++) {
i += MakeStream(buf + i, 0x06, Channel->Dpid(n));
- i += MakeAC3Descriptor(buf + i);
+ i += MakeAC3Descriptor(buf + i, Channel->Dtype(n));
i += MakeLanguageDescriptor(buf + i, Channel->Dlang(n));
}
for (int n = 0; Channel->Spid(n); n++) {
@@ -552,13 +552,16 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
case 0x06: // STREAMTYPE_13818_PES_PRIVATE
{
int dpid = 0;
+ int dtype = 0;
char lang[MAXLANGCODE1] = "";
SI::Descriptor *d;
for (SI::Loop::Iterator it; (d = stream.streamDescriptors.getNext(it)); ) {
switch (d->getDescriptorTag()) {
case SI::AC3DescriptorTag:
+ case SI::EnhancedAC3DescriptorTag:
dbgpatpmt(" AC3");
dpid = stream.getPid();
+ dtype = d->getDescriptorTag();
break;
case SI::SubtitlingDescriptorTag:
dbgpatpmt(" subtitling");
@@ -605,7 +608,7 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
if (dpid) {
if (NumDpids < MAXDPIDS) {
dpids[NumDpids] = dpid;
- dtypes[NumDpids] = stream.getStreamType();
+ dtypes[NumDpids] = dtype;
strn0cpy(dlangs[NumDpids], lang, sizeof(dlangs[NumDpids]));
if (updatePrimaryDevice && Setup.UseDolbyDigital)
cDevice::PrimaryDevice()->SetAvailableTrack(ttDolby, NumDpids, dpid, lang);