Mailing List archive

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

[linux-dvb] Re: VDR 0.80pre8



Ralph Metzler wrote:
> 
> Klaus Schmidinger writes:
>  > > adjusted the buffer until the dropouts went away. If they still occur
>  > > I will have to reclaim more memory.
>  >
>  > Arghh, that's too bad. The OSD is already quite a compromise as it is.
>  > Making it even smaller will hurt VDR quite a bit.
>  >
>  > I know you at convergence have no need for the OSD, but I wouldn't want
>  > to miss it because I want to use the DVB card's own A/V-out. So I would
>  > really appreciate if there were an other solution to this problem...
> 
> I'll see what I can do but don't be surprised if you see a module
> parameter "VDR" in the future which will change the firmware memory
> config.

If that parameter switches between "error free replay - but small OSD" and
"normal OSD - but errors in replay" then I guess it makes no sense. Audio/Video
quality has top priority - even at the cost of a smaller OSD...

>  > The actual data must be ok, since it play fine in normal replay.
>  > Meanwhile I have an idea what might cause this: in the old VDR version (0.72)
>  > I explicitly removed the audio packets before sending the data to the driver
>  > in fast forward/back mode. In the new version there are the AV_SYNC and AUDIO_MUTE
>  > calls, which I though would make the driver ignore any incoming audio packets,
>  > so I no longer remove any audio packets in fast forward/back modes. I'll try to
>  > remove them again tonight and will let you know if that helped.
> 
> That could be the problem.
> If it is, this will also be resolved by the move of the trickmode
> switching in the firmware which also involves the sync control.
> But it is better if you still only send video packets.

That did it! Stripping the audio packets results in a smooth fast forward/back
operation :-)

Here's my quick hack against VDR 0.80pre8's dvbapi.c (I'll need to add more
range checks, but for the moment this appears to work just fine):

--------------------------------------------------------------------------------
--- x.051/dvbapi.c      Sun May 27 13:13:07 2001
+++ dvbapi.c    Mon May 28 18:26:53 2001
@@ -670,6 +670,24 @@
   delete index;
 }
 
+//XXX
+void StripAudioPackets(uchar *b, int Length)
+{
+  for (int i = 0; i < Length; i++) {
+      if (b[i] == 0x00 && b[i + 1] == 0x00 && b[i + 2] == 0x01) {
+         switch (b[i + 3]) {
+           case 0xC0 ... 0xDF: // audio
+                for (int n = b[i + 4] * 256 + b[i + 5]; n--; )
+                    b[i + n] = 0x00;
+                break;
+           case 0xE0 ... 0xEF: // video
+                i += b[i + 4] * 256 + b[i + 5];
+                break;
+           }
+         }
+      }
+}
+
 void cReplayBuffer::Input(void)
 {
   dsyslog(LOG_INFO, "input thread started (pid=%d)", getpid());
@@ -701,6 +719,7 @@
                  }
               lastIndex = Index;
               r = ReadFrame(b, Length, sizeof(b));
+              StripAudioPackets(b, Length);//XXX
               }
            else {
               lastIndex = -1;
--------------------------------------------------------------------------------

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