Mailing List archive

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

[vdr] AW: AC3 over Soundcard (live and replay) (Was: AC3 5.1 - can someone "fix" -a i



Hallo Werner,

Great :))

I'll try this first thing tonight - thanks :)

Greetings
Christian

> -----Ursprungliche Nachricht-----
> Von: vdr@linuxtv.org [mailto:vdr@linuxtv.org]
> Gesendet: Dienstag, 28. Januar 2003 15:05
> An: vdr@linuxtv.org
> Cc: klaus.schmidinger@cadsoft.de
> Betreff: [vdr] AC3 over Soundcard (live and replay) (Was: AC3 5.1 - can
> someone "fix" -a i
> Wichtigkeit: Niedrig
>
>
>
> On Tue, Jan 28, 2003 at 12:32:37PM +0100, Christian Jacobsen wrote:
> >> Hallo Werner,
> >>
> >> do you have time to write another patch - that would be great :)
> >> I'll be delighted to test that :)
> >>
> >> Hallo @ll,
> >>
> >> is Anybody else working on this ?
> >>
> >> Greetings
> >> Christian
>
> Hi,
>
>      I've done a patch for VDR 1.1.20 and 1.1.22 which is part of
> the tar ball of my bitstreamout plugin for VDR.
>
> The current version of the plugin can be found at
>
>       http://bitstreamout.sourceforge.net/
>
> or
>
>       https://sourceforge.net/projects/bitstreamout/
>
>
> @Klaus:  Please could you apply the patch for 1.1.22 (let's see if this
> can be attached to this mail).  The patch is _required_ for this
> plugin because without that patch the sound card stays open in
> none audio mode after first usage and the audio/video synchrony
> is missed after Pause, FF/FB, and SF/SB.  This patch also speeds up
> the zeroing of unneeded audio data due usage of memset(3).
>
> Short explanation to the plugin:  A sound card supported by ALSA with
> S/P-DIF out is required.  If your sound card has a S/P-DIF in with loop
> through to the S/P-DIF out you may connect the S/P-DIF out of the DVB
> card to it.  If the sound card supports "Slave clock" on this S/P-DIF in
> the activate it to make the sound card audio synchrony with that of
> the DVB card. This avoids under or overruns of the buffer of the
> sound card (whereas the plugin can handle underruns).  If the S/P-DIF out
> of the DVB card is looped through the sound card a mute script can be
> used for muting all audio (see example mute.sh for C-Media PCI CMI8738
> based sound cards).
>
> This plugin doesn't uses the S/P-DIF out of DVB card which reduces the
> load of the ARM ... which should increase the stability of the ARM ;^)
> On the other hand, without the last video PTS the plugin can't not
> guarantee as it will be done with AC3 over DVB.
>
> For more explanation see the manual page vdr-bitstreamout.5 and the
> file PROBLEMS.  E.g. for older ALSA libs a one line change in plugin.c
> of VDR is required due to a bug in the version control of dlopen usage
> of the ALSA lib.
>
>
>      Werner
>
>
> -- Attached file included as plaintext by Listar --
> -- Desc: vdr-1.1.22-audio.dif
>
> --- device.c
> +++ device.c	Tue Jan 28 14:14:26 2003
> @@ -473,10 +473,12 @@
>
>  void cDevice::Play(void)
>  {
> +  Audios.MuteAudio(mute);	// Play Audio if not mute
>  }
>
>  void cDevice::Freeze(void)
>  {
> +  Audios.MuteAudio(true);	// Freezed pictures do not have audio
>  }
>
>  void cDevice::Mute(void)
> @@ -515,6 +517,7 @@
>       player = NULL;
>       SetPlayMode(pmNone);
>       playerDetached = true;
> +     Audios.ClearAudio();
>       }
>  }
>
> --- dvbdevice.c
> +++ dvbdevice.c	Tue Jan 28 14:14:26 2003
> @@ -806,6 +806,7 @@
>       CHECK(ioctl(fd_video, VIDEO_CLEAR_BUFFER));
>    if (fd_audio >= 0)
>       CHECK(ioctl(fd_audio, AUDIO_CLEAR_BUFFER));
> +  cDevice::Clear();
>  }
>
>  void cDvbDevice::Play(void)
> @@ -820,6 +821,7 @@
>       if (fd_video >= 0)
>          CHECK(ioctl(fd_video, VIDEO_CONTINUE));
>       }
> +  cDevice::Play();
>  }
>
>  void cDvbDevice::Freeze(void)
> @@ -834,6 +836,7 @@
>       if (fd_video >= 0)
>          CHECK(ioctl(fd_video, VIDEO_FREEZE));
>       }
> +  cDevice::Freeze();
>  }
>
>  void cDvbDevice::Mute(void)
> @@ -842,6 +845,7 @@
>       CHECK(ioctl(fd_audio, AUDIO_SET_AV_SYNC, false));
>       CHECK(ioctl(fd_audio, AUDIO_SET_MUTE, true));
>       }
> +  cDevice::Mute();
>  }
>
>  void cDvbDevice::StillPicture(const uchar *Data, int Length)
> --- dvbplayer.c
> +++ dvbplayer.c	Tue Jan 28 14:23:39 2003
> @@ -324,11 +324,8 @@
>                case 0xC0 ... 0xC1: // audio
>                     if (c == 0xC1)
>                        canToggleAudioTrack = true;
> -                   if (!Except || c != Except) {
> -                      int n = l;
> -                      for (int j = i; j < Length && n--; j++)
> -                          b[j] = 0x00;
> -                      }
> +                   if (!Except || c != Except)
> +                      memset(&b[i], 0x00, min(l, Length-i));
>                     break;
>                case 0xE0 ... 0xEF: // video
>                     break;
> @@ -478,8 +475,6 @@
>                      }
>                   int r = nonBlockingFileReader->Read(replayFile, b,
> Length);
>                   if (r > 0) {
> -                    if (AudioTrack >= 0)
> -                       StripAudioPackets(b, r, AudioTrack);
>                      readFrame = new cFrame(b, -r, ftUnknown, readIndex);
> // hands over b to the ringBuffer
>                      b = NULL;
>                      }
> @@ -517,6 +512,8 @@
>                   pc = playFrame->Count();
>                   }
>                if (p) {
> +                 if (AudioTrack >= 0)
> +                     StripAudioPackets(playFrame->StripData(), pc,
> AudioTrack);
>                   int w = PlayVideo(p, pc);
>                   if (w > 0) {
>                      p += w;
> --- ringbuffer.h
> +++ ringbuffer.h	Tue Jan 28 14:14:26 2003
> @@ -84,6 +84,7 @@
>      ///< Data. Otherwise it will allocate Count bytes of memory and copy
> Data.
>    ~cFrame();
>    const uchar *Data(void) const { return data; }
> +  uchar *StripData(void) const { return data; }
>    int Count(void) const { return count; }
>    eFrameType Type(void) const { return type; }
>    int Index(void) const { return index; }
>
>
>
> --
> Info:
> To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as
> subject.
>
>



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



Home | Main Index | Thread Index