[Approved] Teletext subtitle page based on Service Information (1 Viewer)

jblomb

Retired Team Member
  • Premium Supporter
  • May 17, 2007
    96
    17
    Sundsvall
    Home Country
    Sweden Sweden
    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. :)
     

    jaobr

    Portal Member
    November 6, 2006
    22
    5
    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.
     

    jblomb

    Retired Team Member
  • Premium Supporter
  • May 17, 2007
    96
    17
    Sundsvall
    Home Country
    Sweden Sweden
    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.
     

    jaobr

    Portal Member
    November 6, 2006
    22
    5
    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.
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Could you post a patch, like this jblomb can you @ it too ?
    Thanks :)
     

    jblomb

    Retired Team Member
  • Premium Supporter
  • May 17, 2007
    96
    17
    Sundsvall
    Home Country
    Sweden Sweden
    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 :)
     
    Last edited:

    jaobr

    Portal Member
    November 6, 2006
    22
    5
    Misstake
     
    Last edited:

    jaobr

    Portal Member
    November 6, 2006
    22
    5
    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()
     

    Users who are viewing this thread

    Top Bottom