Latest versions:
Server plugin: 0.5.1
MVP dongle: 0.5.2
Raspberry Pi client: 0.5.2
Windows client: 0.5.2-1

Main Menu

Subtitles timeout patch

Started by JTe, October 07, 2012, 19:40:45

Previous topic - Next topic


I see the previous git version did update the subtitles scaling for HD-resolutions. After testing it for few hours it seems to work fine.

Could you please also add the following patch for subtitles timeout as my local provider does not clear the subtitles with a empty page but rather uses the subtitle timeout (at least that is what I figured out). I have been running the following patch (adds the timeout functionality) on my mvp client for two years without problems. It is kind of annoying that without this patch the subtitles stay for ever on the screen (until a new subtitle will replace the old).

I did use timer classes from the vdr to implement this and I did include them in the as the was kind of marked something like going slowly away...

The whole patch is not probably the most elegant solution but it is well tested and works fine.


I am glad that the HDTV subtitle stuff is working, since I did not test it. (Please test with several channels,  programms, because there are several ways to scale the subtitles).
I think you patch looks fine, I will include it.



I will test the patch more and let you know how the scaling works on different channels.

I however found another problem with subtitles when landing on an old 4:3 aspect ratio show on ArteSD subtitled with the subtitles burned on the picture. With the Letterbox option the subtitles are of course chopped off.  With the Chop sides option the sides of the tv-screen are chopped off and replaced with the blue background color of the screen, which is very disturbing. Could you change the background color to black when starting the play/replay and back to blue before displaying menus?

Could it also be possible to add the "Stretch" option aspect ratio menu, and stretch the 3:4 picture to cover whole 16:4 screen?

With the old analog MVP box the TV set took care of stretching the image of "chop sides" 3:4 aspect ratio to 16:4 aspect ratio screen (if you did not want to see the black bars on sides, but wanted to see the subtitles burned on the picture).

With the  raspi vomp client this does not work because the client is not changing aspect ration (the HDMI mode to mode 18), but is just sending a 3:4 picture chopped in 16:4 picture.


See here how to change the color yourself.
I will later change  to black, but for now it is a good tool, if someone reports problems to see on which graphics layer the problem occurs.

If the aspect ratio switching, I tried to implement it, but the firmware ignored my requests for chop sides and letterbox, etc..
Anyway a 16:4 setting is not available. (see for the options, that do not all work)

Also it is not possible to do aspect ratio switching, since I did not find a way to reinitialize the video system after a change.



Ok, I see the difficulties with the firmware, hopefully the situation gets better with the coming updates. I have been testing the subtitles and there seem to be some new problems with clearing the subtitles off the screen with the providers who do not use the timeout. I have to check it but it could be something to do with thread locking or the clear area definitions.

By the way, is there an easy way to check if there are any OSD elements already displayed on the screen?


QuoteBy the way, is there an easy way to check if there are any OSD elements already displayed on the screen?
I do not know about an easy way, accessing the underlying vector surface would not be a good idea.
With the problems regarding the clearing, it might be that the clear rect have to be a bit bigger, because of the emulation of the surface object.

Anyway if there is a problem with thread locking, it could be that threadwait for signal stuff has to be surrounded by threadlock and threadunlock. This caused already some trouble elsewhere.

Btw. with the scaling, if you like you can play in void VideoOMX::updateMode() a bit around with the scaling modes, may be you find a way how to change the modes succssfully.



I have been making some testing and debugging with the subtitles part of the code. The problem of clearing some subtitle areas is linked to following bug:

The patch bellow fixes the problem.

Anyway to make the OSD and subtitles to better coexist on same screen I was thinking of declaring a global variable (in its own namespace?) to hold the state of OSD. That way I would not need to drill in the display objects (which would create quite difficult to read code, etc). This variable would be easy to use everywhere when needed to check if the screen is clear and ready to receive other objects (like subtitles). Again it is not very elegant way, but easy to implement.

When looking at the OSD, it is ok that OSD overwrites subtitle on screen (as it is the user who selects to display the osd) but it is not desirable that the subtitle object overwrites the OSD while user is trying to read the EPG info or change the settings. This situation could avoided if the subtitles would know the OSD state.

Anyway the following small patch should be added to make the subtitles ETSI complient
QuoteDecoders trying to acquire the service can treat a page state of "acquisition point" as if it were "mode change"

--- vompclient-raspi/    2012-10-23 14:03:57.061030680 +0300
+++ vompclient-raspi-nnn/        2012-10-27 10:35:13.651387150 +0300
@@ -226,8 +226,8 @@
   state = s;
   if (state == 1) // Acquisition point - page refresh
-    serviceAcquired = true;
-    regions.clear();
+    if(!serviceAcquired) // Service not acquired lets treat this as mode change
+      state = 2;
   if (state == 2) // Mode change - new epoch
     serviceAcquired = true;