[Approved] - Teletext subtitle page based on Service Information | Page 3

Discussion in 'Archive' started by jblomb, January 26, 2012.

    • Team MediaPortal

    jblomb Thread Starter Development Group

    Thanks for sorting this out. I haven't been able to look in to this for some time now, and now I am travelling to Ireland for a week. :)
    • Like Like x 1
    • Team MediaPortal

    Wbunaarf Test Group

    System Specs
    Oh, I'm pretty sure Internet has reached Ireland as well! :)

    //W
    • Team MediaPortal

    Wbunaarf Test Group

    System Specs
    This patch is included in 1.2.3.

    //W
  1. jaobr Portal Member

    I belive this is a very complicated patch for a simple bug. The reason for sometimes showing wrong subtitles is that the langinfo dictionary in TeletextMagazine is not cleared at channel change.
    • Team MediaPortal

    jblomb Thread Starter Development Group

    It's not just the TeletextMagazine langinfo that should decide which subs to show, since several channels can share the same teletext stream. In those cases the teletext stream contains subtitling for several channels and the only way to select the correct one is to look at the info in the SI packets.
    See the Subtitle descriptor info in document ETSI EN 300 468.

    However, thanks for your message. That bug can be the cause of some subtitles not showing after changing channel. I'll look into it.
    • Like Like x 1
  2. jaobr Portal Member

    If langinfo is cleared at channel change langinfo will only contain the languages and pages sent in subtitle descriptor. Only pages in langinfo get a language (realLang) set when added to pageEntries in SubtitleSelector all other pages get a empty string language and consequently CheckForPreferedLanguage will return only pages available in the subtitle descriptor.

    I have used a quick fix for this by declaring langinfo public and clearing it in OnSubtitleReset.
    • Like Like x 2
    • Team MediaPortal

    Sebastiii Development Group

    System Specs
    Could you post a patch, like this jblomb can you @ it too ?
    Thanks :)
    • Team MediaPortal

    jblomb Thread Starter Development Group

    Sounds interesting, but if I remember correctly language info was only taken from the teletext stream and the service information packets were not used at all before this patch. If it can be resolved in an easier way, and especially not involving Mediaportal.xml - like my patch does, I'll be very happy :)
  3. jaobr Portal Member

  4. jaobr Portal Member

    I don't have a patch file but it's just a couple of code lines needed.

    Add this method to TeletextMagazine:
    public static void ClearLangInfo()
    {
    langInfo.Clear();
    }

    Add a call to the method in OnSubtitleReset in SubtitleSelector:

    private int OnSubtitleReset(int count, IntPtr pOpts, ref int selected_bitmap_index)
    {
    Log.Debug("OnSubtitleReset");
    Log.Debug("selected_bitmap_index " + selected_bitmap_index);
    lock (syncLock)
    {
    bitmapSubtitleCache.Clear();
    pageEntries.Clear();
    TeletextMagazine.ClearLangInfo()
    • Like Like x 1

Share This Page

Users Viewing Thread (Users: 0, Guests: 0)

Running the latest version?

V1.3.0 FINAL - released March 2013
Releasenews | Download
Changelog
 | Requirements
HTPC
Team-MediaPortal
 
About
Contact |  Press
Partners