Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: DVD-AC3-Playback




Hello

From: "Klaus Schmidinger" Sent: Sunday, November 25, 2001 5:43 PM
>
> Stephan Schreiber wrote:
> >
> > Hello Klaus,
> >
> > > Can somebody please explicitly verify whether or not Andreas'
> > > suggested modification
> > >
> > >            int written = b[8] + 9; // skips the PES header
> > >            if ((b[written] & 0xF0) == 0x80)
> > >               written += 4;
> > >
> > > actually works for DVDs _and_ DVB recordings? If it doesn't, I'll have
to
> > > add a flag to distinguish between DVD and DVB (which I would like
> > > to avoid...).
> >
> > I did yesterday, and Uwe confirmed my observations.
> > Andreas' modification does not work with my AC3 VDR recordings.
> > Some frames seem to match the condition
> > >            if ((b[written] & 0xF0) == 0x80)
> > so I get stutterings and my amplifier switches back to PCM mode every
few
> > seconds.
> > It stays in 3/2.1 mode most of the time however.
> >
> > The DVD's I tested however work perfectly ever since.
> >
> > That flag you mentioned seems not to be an idea _that_ bad after all, if
> > maybe a little "ugly"....
>
> Well, then just to make sure I don't break anything else, can you please
> try this modification:
>
> --- dvbapi.c    2001/11/24 14:45:58
> +++ dvbapi.c    2001/11/25 16:38:09
> @@ -710,6 +710,7 @@
>    int readIndex, writeIndex;
>    bool canDoTrickMode;
>    bool canToggleAudioTrack;
> +  bool skipAC3bytes;
>    uchar audioTrack;
>    void TrickSpeed(int Increment);
>    virtual void Empty(bool Block = false);
> @@ -752,6 +753,7 @@
>    readIndex = writeIndex = -1;
>    canDoTrickMode = false;
>    canToggleAudioTrack = false;
> +  skipAC3bytes = false;
>    audioTrack = 0xC0;
>    if (cDvbApi::AudioCommand()) {
>       if (!dolbyDev.Open(cDvbApi::AudioCommand(), "w"))
> @@ -769,7 +771,7 @@
>       if (b[0] == 0x00 && b[1] == 0x00 && b[2] == 0x01) {
>          if (b[3] == 0xBD) { // dolby
>             int l = b[4] * 256 + b[5] + 6;
> -           int written = b[8] + 9; // skips the PES header
> +           int written = b[8] + (skipAC3bytes ? 13 : 9); // skips the PES
header
>             int n = min(l - written, MaxLength);
>             while (n > 0) {
>                   int w = fwrite(&b[written], 1, n, dolbyDev);
> @@ -1545,6 +1547,7 @@
>    canToggleAudioTrack = true;//XXX determine from cDVD!
>    data = new uchar[1024 * DVD_VIDEO_LB_LEN];
>    canDoTrickMode = true;
> +  skipAC3bytes = true;
>    dvbApi->SetModeReplay();
>    Start();
>  }
>

Yea, its works. Very good. :-)

No "** CRC failed - skipping frame **" by playing VDR-AC3-Files
and DVD-AC3-Films(all Language).
(Sometimes "** CRC failed - skipping frame **" by rewind and forward Film.)

MFG ... Uwe

>
> Maybe the line numbers don't match exactly, but this is such a small
> modification that you should even be able to do it manually.
>
> Can you confirm that this now replays DVD _and_ DVB external AC3 sound
> correctly?
>
> Klaus
> --
> _______________________________________________________________
>
> Klaus Schmidinger                       Phone: +49-8635-6989-10
> CadSoft Computer GmbH                   Fax:   +49-8635-6989-40
> Hofmark 2                               Email:   kls@cadsoft.de
> D-84568 Pleiskirchen, Germany           URL:     www.cadsoft.de
> _______________________________________________________________
>
>





Home | Main Index | Thread Index