[Pending] - (Patch) AC3 Lang select when no MPEG audio.

Discussion in 'Submit: code patches (MediaPortal/TV-Server/etc.)' started by jblomb, January 26, 2012.

  1. jblomb
    • Premium Supporter

    jblomb Retired Team Member

    Joined:
    May 17, 2007
    Messages:
    96
    Likes Received:
    17
    Gender:
    Male
    Location:
    Sundsvall
    Ratings:
    +17 / 0
    Home Country:
    Sweden Sweden
    Hi

    This patch adds the possibility to have the correct language AC3 stream if PreferAC3 is false and there are no MPEG-streams available.

    I have the setting "Prefer AC-3 sound" set to false for several reasons. When there are several MPEG streams available, the TVPlugin chooses the correct stream based on language preferences. This works as expected. However, Eurosport HD does not have any MPEG streams, but instead has four AC3 streams with different languages. Right now the TVPlugin fails to find the correct language, and since PreferAC3 is false, it just sets the default language to stream 0 - Finnish. Since I am swedish, it makes it hard to understand :)

    The patch gets the index of the correct AC3 stream, and keeps it. If PreferAC3 is false and the plugin can't set the correct MPEG language, it uses the index of the correct AC3 stream instead of stream 0. And Voila - Swedish is heard automagically. :)



    The patch is made against TVPlugin git 1.2.0.142.
     

    Attached Files:

    • TVHome.diff
      File size:
      2.9 KB
      Uploaded:
      January 29, 2012
      Views:
      128
    • Like Like x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Wbunaarf
    • Team MediaPortal

    Wbunaarf Test Group

    Joined:
    December 9, 2005
    Messages:
    534
    Likes Received:
    89
    Location:
    Sweden
    Ratings:
    +98 / 0
    Home Country:
    Sweden Sweden
    Show System Specs
    I can confirm the issue. With Prefer AC3 enabled the correct (in this case stream 3, Swedish) stream is selected but with it disabled it indeed selects the wrong (Stream 0, Finnish, in this case) one.

    I have applied this patch. It does solve the problem when there's only AC3 streams available, but it introduces another issue.

    In config Prefer AC3 is disabled and as preferred languages only Swedish is set. With this patch, on a channel (tested on C+ Hits HD) with both MPEG2 (stream 0) and AC3 (stream 1) in English the AC3 one is chosen. Without the patch the MPEG2 stream is picked.

    //W
     
  4. jblomb
    • Premium Supporter

    jblomb Retired Team Member

    Joined:
    May 17, 2007
    Messages:
    96
    Likes Received:
    17
    Gender:
    Male
    Location:
    Sundsvall
    Ratings:
    +17 / 0
    Home Country:
    Sweden Sweden
    Thanks for testing and finding that issue :) I hadn't tested it enough. New patch on the way during the weekend.
     
  5. jblomb
    • Premium Supporter

    jblomb Retired Team Member

    Joined:
    May 17, 2007
    Messages:
    96
    Likes Received:
    17
    Gender:
    Male
    Location:
    Sundsvall
    Ratings:
    +17 / 0
    Home Country:
    Sweden Sweden
  6. Wbunaarf
    • Team MediaPortal

    Wbunaarf Test Group

    Joined:
    December 9, 2005
    Messages:
    534
    Likes Received:
    89
    Location:
    Sweden
    Ratings:
    +98 / 0
    Home Country:
    Sweden Sweden
    Show System Specs
  7. elliottmc
    • Premium Supporter

    elliottmc Retired Team Member

    Joined:
    August 7, 2005
    Messages:
    14,927
    Likes Received:
    4,011
    Gender:
    Male
    Location:
    Cardiff, UK
    Ratings:
    +5,503 / 13
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Do we have confirmation that the new issue is fixed with the new patch?

    Mark
     
  8. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,270
    Likes Received:
    6,221
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,229 / 9
    Home Country:
    France France
    Show System Specs
    A branch was created :)
     
    • Like Like x 1
  9. Wbunaarf
    • Team MediaPortal

    Wbunaarf Test Group

    Joined:
    December 9, 2005
    Messages:
    534
    Likes Received:
    89
    Location:
    Sweden
    Ratings:
    +98 / 0
    Home Country:
    Sweden Sweden
    Show System Specs
    I'm sorry, but I still have this issue (both with the patch in the first post and with the pull request). I again tried with C+ Hits HD and as above stream 1, AC3, was picked rather than stream 0, MPEG2. Do you want some logs?

    //W
     
  10. jblomb
    • Premium Supporter

    jblomb Retired Team Member

    Joined:
    May 17, 2007
    Messages:
    96
    Likes Received:
    17
    Gender:
    Male
    Location:
    Sundsvall
    Ratings:
    +17 / 0
    Home Country:
    Sweden Sweden
  11. gibman
    • Premium Supporter

    gibman Retired Team Member

    Joined:
    October 4, 2006
    Messages:
    2,998
    Likes Received:
    1,321
    Occupation:
    Developer
    Location:
    Aarhus
    Ratings:
    +1,372 / 0
    Home Country:
    Denmark Denmark
    FYI: this part of the code has several unit tests (located in the unit tests project for the tv-client).
    please run the tests to make sure that nothing is broken.
    also the proper thing would be to add a few unit tests for this particular scenario.

    /gibman
     
Loading...

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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!