Re: DXR3 and subtitles in 1.5.x

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

 



Hi Luca!

2008/3/6, Luca Olivetti <luca@xxxxxxxxxxx>:
> En/na Luca Olivetti ha escrit:
>
>
>  >> ... and this went away when I changed the cDxr3SubpictureOsd constructor
>  >> to call the cOsd with proper level. Unless I'm missing something - and I
>  >> bet I am - the system seems to be working smoothly now.
>  >
>  > Mmh, it should be already doing it, look at line 39
>  >
>  > http://dxr3plugin.cvs.sourceforge.net/dxr3plugin/dxr3/dxr3osd_subpicture.c?revision=1.1.2.18&view=markup&pathrev=vdr-dxr3-0-2
>
>
> (slaps on head), ok, that's calling it with 0, in my local copy I'm
>  calling it with Level (probably the problem was introduced when I made
>  the patch for the cvs version supporting older vdr releases).
>  Sorry for all the trouble.
>
>  Ville, are you listening? ;-)

If you meant me then yes I am =) I made the change locally here too
and now it works correctly! Has been bugging me a long time but I've
lived with it ;)

Sami, I believe you already have it almost in order. I've been using
the development VDR all the time, and the only problem has been that
the OSD hijacked the OSD (and is now gone thanks to the osdlevel
patch). Though, if you get the problem that the OSD doesn't clear
between subtitles, then see the 2. patch I'm attaching for vdr-dxr3
plugin (though it could be in the CVS now, I'm using a tarball of the
CVS that is somewhat aged now).

For reference I'm attaching here all the patches I need to apply to
VDR (1.5.15 but probably works with older ones too) and dxr3-vdr
plugin on my setup to get it working properly. Are the Gentoo overlay
guys listening? These could go into the overlay (but the VDR patch
should of course only activate if the dxr3 use flag is set).


 -  Ville

-- 
Ville Aakko - ville.aakko@xxxxxxxxx
diff -Naur vdr-1.5.10/dvbsubtitle.c vdr-1.5.10-new/dvbsubtitle.c
--- vdr-1.5.10/dvbsubtitle.c	2007-10-14 17:02:35.000000000 +0300
+++ vdr-1.5.10-new/dvbsubtitle.c	2007-11-04 13:17:19.000000000 +0200
@@ -982,13 +982,13 @@
      return;
   tArea *Areas = Page->GetAreas();
   int NumAreas = Page->regions.Count();
-  int Bpp = 8;
+  int Bpp = 4;
   bool Reduced = false;
-  while (osd->CanHandleAreas(Areas, NumAreas) != oeOk) {
+//  while (osd->CanHandleAreas(Areas, NumAreas) != oeOk) {
         int HalfBpp = Bpp / 2;
         if (HalfBpp >= 2) {
            for (int i = 0; i < NumAreas; i++) {
-               if (Areas[i].bpp >= Bpp) {
+               while (Areas[i].bpp >= Bpp) {
                   Areas[i].bpp = HalfBpp;
                   Reduced = true;
                   }
@@ -997,7 +997,7 @@
            }
         else
            return; // unable to draw bitmaps
-        }
+//        }
   if (Reduced) {
      for (int i = 0; i < NumAreas; i++) {
          cSubtitleRegion *sr = Page->regions.Get(i);
--- dxr3osd_subpicture.c.old	2008-03-06 19:30:14.000000000 +0200
+++ dxr3osd_subpicture.c	2008-03-06 19:30:23.000000000 +0200
@@ -37,7 +37,7 @@
 cDxr3SubpictureOsd::cDxr3SubpictureOsd(int Left, int Top) : cOsd(Left, Top)
 #else
 cDxr3SubpictureOsd::cDxr3SubpictureOsd(int Left, int Top, uint Level)
-    : cOsd(Left, Top, 0)
+    : cOsd(Left, Top, Level)
 #endif
 {
     shown = false;
diff --unified -r1.1.2.17 dxr3osd_subpicture.c
--- dxr3osd_subpicture.c	3 Sep 2007 20:24:51 -0000	1.1.2.17
+++ dxr3osd_subpicture.c	23 Nov 2007 00:01:08 -0000
@@ -117,6 +117,15 @@
     return Result;
 }
 
+eOsdError cDxr3SubpictureOsd::SetAreas(const tArea *Areas, int NumAreas)
+{
+  if (shown) {
+     Spu->Clear();
+     shown = false;
+     }
+  return cOsd::SetAreas(Areas, NumAreas);
+}
+
 // ==================================
 void cDxr3SubpictureOsd::Flush()
 {
diff --unified -r1.1.2.15 dxr3osd_subpicture.h
--- dxr3osd_subpicture.h	3 Sep 2007 20:24:51 -0000	1.1.2.15
+++ dxr3osd_subpicture.h	23 Nov 2007 00:01:08 -0000
@@ -26,7 +26,7 @@
     ~cDxr3SubpictureOsd();
 
     eOsdError CanHandleAreas(const tArea *Areas, int NumAreas);
-
+    eOsdError SetAreas(const tArea *Areas, int NumAreas);
     void Flush();
 };
 

_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux