Loggytronic Forum

VOMP => VOMP for Raspberry Pi => Topic started by: JTe on November 16, 2012, 17:52:47

Title: Patch to subtitles & OSD
Post by: JTe on November 16, 2012, 17:52:47
Currently when DVB subtitles are in use they do draw sometimes on top of the OSD and vice versa.

Attached patch makes up a global (and a little bit ugly) variable which is protected by mutex locks. Threads drawing OSD components or teletext pages set this variable to value "true" when objects are made visible on the OSD and when clearing the OSD screen it is set to "false".

The dvbsubtitles drawing and clearing routines will always check if the screen is clean (empty) using this variable before making changes to screen. So dvbsubtitles will not draw subtitles neither try to clear screen regions if there are visible OSD components.

After short tests it seems working and subtitles are now more usable as they do not write over on top of OSD objects.

Marten, if the patch looks ok, could you please add it to git?

Title: Re: Patch to subtitles & OSD
Post by: MartenR on November 17, 2012, 09:20:46
QuoteMarten, if the patch looks ok, could you please add it to git?
No, I am sorry, but I do not like the idea of global variables and global mutex.
You have to do it in the following way:

Marten
Title: Re: Patch to subtitles & OSD
Post by: JTe on November 17, 2012, 11:15:59
Ok I will make it the clean way without global variables and using a method on dvbsubtitles to set the subs on or off. I could try to do it without locking, as it should be quite safe.
Title: Re: Patch to subtitles & OSD
Post by: JTe on November 19, 2012, 19:28:07
Ok,

I changed the patch to work the way you told (actually it is much more simple now). I run some preliminary tests and it seems to work fine. The only thing that does not work is the teletext page that keeps wiped out by each subtitle.
Title: Re: Patch to subtitles & OSD
Post by: MartenR on November 20, 2012, 07:34:49
Looks fine, but I do not have time until weekend to apply it.
If it does not appear in git after the weekend remind me.

Marten
Title: Re: Patch to subtitles & OSD
Post by: JTe on November 20, 2012, 13:50:44
Ok, now also teletext pages are detected and subtitles can be turned on when the teletext pages are watched. No subtitles should be displayed while other objects are on the screen. When the screen is empty the subtitles will be displayed (if turned on).

Discard the previous patch and use this instead!
Title: Re: Patch to subtitles & OSD
Post by: MartenR on November 24, 2012, 08:19:44
Is in git now.
Title: Re: Patch to subtitles & OSD
Post by: hondansx on December 25, 2012, 10:27:23
What I noticed is that toggleSubtitles in vvideorec.cc is not working.


case Remote::RECORD: player->toggleSubtitles(); return 2;


If I hit the record button nothing happens. In lifetv it is working.

Could this be fixed?
Title: Re: Patch to subtitles & OSD
Post by: JTe on January 07, 2013, 10:54:11
I will look at that. I need to do some debugging as it seems that the toggleSubtitles method is in place in player.cc as in videolivetv.cc, but just does nothing in record mode.

Do you know, did the toggleSubtitles work with the old MVP vompclient?
Title: Re: Patch to subtitles & OSD
Post by: hondansx on January 11, 2013, 14:41:32
Quote from: JTe on January 07, 2013, 10:54:11
I will look at that. I need to do some debugging as it seems that the toggleSubtitles method is in place in player.cc as in videolivetv.cc, but just does nothing in record mode.

Do you know, did the toggleSubtitles work with the old MVP vompclient?

With my mvp this works, don't know where this got lost in the rasperry branch or maybe I do something wrong.
Thanks for investigating.
Title: Re: Patch to subtitles & OSD
Post by: hondansx on February 25, 2013, 19:55:08
Any progress?
Title: Re: Patch to subtitles & OSD
Post by: JTe on February 28, 2013, 07:57:05
Still in to-do list, just have to find time to set up my test environment!