Mailing List archive

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

[linux-dvb] Re: Antwort: Re: AW: Antwort: AW: Re: VDR: first step towards AC3sound



Klaus Schmidinger wrote:
> 
> Stefan.Hagendorn@lindy.cc wrote:
> >
> > Maybe we find the difference from Pro7 to Premiere World in the PES Header
> > ....
> >
> > maybe pro7 sends the pes header in a way ac3dec recognize hem and strips
> > them ...  Klaus can you make a testoutput with striped pes header from
> > Premiere World to send it to ac3dec ... (or maybe a small tool to strip the
> > headers after having the stream in a file)
> 
> Locate function cReplayBuffer::StripAudioPackets() in dvbapi.c and make the
> following change to strip the PES headers:
> 
>            case 0xBD: // dolby
>                 if (Except && dolbyDev) {
> ---                int written = 0;
> +++                int written = b[i + 8] + 9;
>                    int n = l;
>                    while (n > 0) {
>                          int w = fwrite(&b[i + written], 1, n, dolbyDev);
>                          if (w < 0) {
>                             LOG_ERROR;
>                             break;
>                             }
>                          n -= w;
>                          written += w;
>                          }
>                    }
>                 // continue with deleting the data - otherwise it disturbs DVB replay
> 
> I hope I've got it right, haven't tested it...

Argggghhhh....

Of course 'n' has to be reduced as well, so the complete patch is

           case 0xBD: // dolby
                if (Except && dolbyDev) {
---                int written = 0;
---                int n = l;
+++                int written = b[i + 8] + 9;
+++                int n = l - written;
                   while (n > 0) {
                         int w = fwrite(&b[i + written], 1, n, dolbyDev);
                         if (w < 0) {
                            LOG_ERROR;
                            break;
                            }
                         n -= w;
                         written += w;
                         }
                   }
                // continue with deleting the data - otherwise it disturbs DVB replay

Sorry 'bout that - it's late already...

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
_______________________________________________________________


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index