From patchwork Sun May 11 10:30:27 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Schmidinger X-Patchwork-Id: 12658 Received: from raven.cadsoft.de ([217.7.101.211]) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1Jv8p6-00057Z-9H for vdr@linuxtv.org; Sun, 11 May 2008 12:30:33 +0200 Received: from [192.168.100.10] (hawk.cadsoft.de [192.168.100.10]) by raven.cadsoft.de (8.13.3/8.13.3) with ESMTP id m4BAURZ1006814 for ; Sun, 11 May 2008 12:30:27 +0200 Message-ID: <4826CAC3.1000504@cadsoft.de> Date: Sun, 11 May 2008 12:30:27 +0200 From: Klaus Schmidinger Organization: CadSoft Computer GmbH User-Agent: Thunderbird 2.0.0.12 (X11/20080226) MIME-Version: 1.0 To: vdr@linuxtv.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (raven.cadsoft.de [192.168.1.1]); Sun, 11 May 2008 12:30:28 +0200 (CEST) X-LSpam-Score: -2.1 (--) X-LSpam-Report: No, score=-2.1 required=5.0 tests=AWL=0.449, BAYES_00=-2.599 autolearn=ham Subject: [vdr] Standard AC3 component descriptor handling X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2008 10:30:33 -0000 Status: O X-Status: X-Keywords: X-UID: 16831 I am currently working on making the switch from PES to TS as the VDR recording format, that's why there are currently no new versions of VDR. However, since the German ARD channels are going to start broadcasting the standard AC3 component descriptor some time next week, I'm publishing the attached patch that implements this in VDR 1.7.0. From what I have been told, Premiere was the first provider that actually broadcasted AC3 audio, and they chose not to use the standard stream content value of '4' ("AC-3 audio"), but instead used stream content value '2' with component type '5' ("MPEG-1 Layer 2 audio, surround sound"). And since they "certify" all their receivers, this wrong decision was quickly adopted by other broadcasters, and became a "pseudo standard". Note that this patch is not necessary to receive AC-3 audio on the ARD channels. They will still be broadcasting the old descriptors in parallel with the new ones for about a year, so existing VDRs will work just fine. This is just to let people who like to test this actually do so. The channel MEHRKANALTEST;ARD:12421:hC34M2O0S0:S19.2E:27500:0:2001=deu;2002=deu:0:0:28397:1:1201:0 already broadcasts the new AC3 descriptor and can be used for testing (no video, just audio test tones). Klaus =================================================================== RCS file: ./RCS/eit.c retrieving revision 2.1 diff -u -b -r2.1 ./eit.c --- ./eit.c 2008/04/13 11:27:06 2.1 +++ ./eit.c 2008/05/01 15:33:27 @@ -219,7 +219,7 @@ SI::ComponentDescriptor *cd = (SI::ComponentDescriptor *)d; uchar Stream = cd->getStreamContent(); uchar Type = cd->getComponentType(); - if (1 <= Stream && Stream <= 3 && Type != 0) { // 1=video, 2=audio, 3=subtitles + if (1 <= Stream && Stream <= 4 && Type != 0) { // 1=video, 2=audio, 3=subtitles, 4=AC3 if (!Components) Components = new cComponents; char buffer[Utf8BufSize(256)]; =================================================================== RCS file: ./RCS/epg.c retrieving revision 2.0 diff -u -b -r2.0 ./epg.c --- ./epg.c 2008/02/16 16:09:12 2.0 +++ ./epg.c 2008/05/01 14:53:55 @@ -88,8 +88,10 @@ tComponent *cComponents::GetComponent(int Index, uchar Stream, uchar Type) { for (int i = 0; i < numComponents; i++) { - // In case of an audio stream the 'type' check actually just distinguishes between "normal" and "Dolby Digital": - if (components[i].stream == Stream && (Stream != 2 || (components[i].type < 5) == (Type < 5))) { + if (components[i].stream == Stream && ( + Type == 0 || // don't care about the actual Type + Stream == 2 && (components[i].type < 5) == (Type < 5) // fallback "Dolby" component according to the "Premiere pseudo standard" + )) { if (!Index--) return &components[i]; } =================================================================== RCS file: ./RCS/menu.c retrieving revision 2.1 diff -u -b -r2.1 ./menu.c --- ./menu.c 2008/04/12 11:37:17 2.1 +++ ./menu.c 2008/05/01 14:37:24 @@ -3147,6 +3147,8 @@ break; case 3: cDevice::PrimaryDevice()->SetAvailableTrack(ttSubtitle, indexSubtitle++, 0, LiveChannel ? NULL : p->language, p->description); break; + case 4: cDevice::PrimaryDevice()->SetAvailableTrack(ttDolby, indexDolby++, 0, LiveChannel ? NULL : p->language, p->description); + break; } } } =================================================================== RCS file: ./RCS/recording.c retrieving revision 2.0 diff -u -b -r2.0 ./recording.c --- ./recording.c 2008/02/24 10:28:53 2.0 +++ ./recording.c 2008/05/01 15:33:39 @@ -297,7 +297,9 @@ for (int i = 0; i < MAXDPIDS; i++) { const char *s = Channel->Dlang(i); if (*s) { - tComponent *Component = Components->GetComponent(i, 2, 5); + tComponent *Component = Components->GetComponent(i, 4, 0); // AC3 component according to the DVB standard + if (!Component) + Component = Components->GetComponent(i, 2, 5); // fallback "Dolby" component according to the "Premiere pseudo standard" if (!Component) Components->SetComponent(Components->NumComponents(), 2, 5, s, NULL); else if (strlen(s) > strlen(Component->language)) =================================================================== RCS file: ./RCS/vdr.5 retrieving revision 2.1 diff -u -b -r2.1 ./vdr.5 --- ./vdr.5 2008/04/12 10:46:32 2.1 +++ ./vdr.5 2008/05/01 15:33:49 @@ -652,7 +652,7 @@ @is the title of the event <short text> @is the short text of the event (typically the name of the episode etc.) <description> @is the description of the event (any '|' characters will be interpreted as newlines) -<stream> @is the stream content (1 = video, 2 = audio, 3 = subtitles) +<stream> @is the stream content (1 = video, 2 = audio, 3 = subtitles, 4 = AC3) <type> @is the stream type according to ETSI EN 300 468 <language> @is the three letter language code (optionally two codes, separated by '+') <descr> @is the description of this stream component