| |||||||
| Forum Categories |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| MP Donator ![]() Join Date: May 2008 Age: 28
Posts: 1,928
Thanks: 73
Thanked 185 Times in 87 Posts
Country: | Hi! When you have setup Prefer-AC3 but NOT Prefer-AC3 over language and you have a stream with MPEG and AC3 both with correct language MP selects MPEG stream instead of AC3 stream. This is caused by a useless if condition which skips the scanning of additional streams after finding the first one. EDIT: For patch see Post 4 Stefan
__________________ IRSS with full Imon Support (all buttons working) MP Disaster Edition 1.1.0 SVN - NEW recording option weekly everytime on channel X - option to deactivate normal home and use only basic home - comskip network client support - much more Episodescanner: adds series and episodenumbers to your MP EPG or 4TR EPG Last edited by disaster123; 2009-11-23 at 23:53.. |
| | |
| | #2 (permalink) |
| Portal Tester Join Date: Apr 2008
Posts: 221
Thanks: 9
Thanked 15 Times in 15 Posts
Country: | I do not think it's useless because in some cases it's possible that the wrong language is set as preferred language otherwise. For example, you have set up english as first priority language and german as second. Then if the stream includes both these languages with english as stream0 and german as stream1 then without the priority check german or stream1 will be selected because it's also in the preferred list but with higher index in the stream array so it will be selected as the streams array is iterated. I can see that in you're case it's not working correct either but your solution will break it for others, so I think you'll have to come up with another solution. //johnzered |
| | |
| | #3 (permalink) |
| MP Donator ![]() Join Date: May 2008 Age: 28
Posts: 1,928
Thanks: 73
Thanked 185 Times in 87 Posts
Country: | ah OK - it's for the priority in list - but the code is still wrong. Will provide a second patch - haven't thought about that cause i only use "one" language :-)
__________________ IRSS with full Imon Support (all buttons working) MP Disaster Edition 1.1.0 SVN - NEW recording option weekly everytime on channel X - option to deactivate normal home and use only basic home - comskip network client support - much more Episodescanner: adds series and episodenumbers to your MP EPG or 4TR EPG Last edited by disaster123; 2009-11-23 at 22:34.. |
| | |
| | #4 (permalink) |
| MP Donator ![]() Join Date: May 2008 Age: 28
Posts: 1,928
Thanks: 73
Thanked 185 Times in 87 Posts
Country: | Here is a new clean fine working and tested patch. It also keeps now the lang priority.
__________________ IRSS with full Imon Support (all buttons working) MP Disaster Edition 1.1.0 SVN - NEW recording option weekly everytime on channel X - option to deactivate normal home and use only basic home - comskip network client support - much more Episodescanner: adds series and episodenumbers to your MP EPG or 4TR EPG |
| | |
| | #5 (permalink) |
| Portal Developer Join Date: Oct 2006 Location: Aarhus
Posts: 1,209
Thanks: 13
Thanked 153 Times in 87 Posts
Country: | It's tough figuring out what possible side effect(s) changes to this part of the code can have. What we need is some 20-30 unit tests for this specific method. Any volunteers. Then it's just a matter of writing tests for all the different scenarios we know. /gibman
__________________ "It's all a big foodchain. We eat shit and shit eats us." |
| | |
| | #6 (permalink) |
| MP Donator ![]() Join Date: May 2008 Age: 28
Posts: 1,928
Thanks: 73
Thanked 185 Times in 87 Posts
Country: | I think it's really simple to understand what happens if you remove the lines which simply rename a variable to something more meaningful. So this cannot break anything.
__________________ IRSS with full Imon Support (all buttons working) MP Disaster Edition 1.1.0 SVN - NEW recording option weekly everytime on channel X - option to deactivate normal home and use only basic home - comskip network client support - much more Episodescanner: adds series and episodenumbers to your MP EPG or 4TR EPG |
| | |
| | #7 (permalink) |
| Portal Developer Join Date: Oct 2006 Location: Aarhus
Posts: 1,209
Thanks: 13
Thanked 153 Times in 87 Posts
Country: | It might be simple to understand ... but it still handles a lot of different cases. Having a unit test for each of these would be the most optimal thing to do (imho). I wasnt thinking about the renaming part- this should be safe as u say. /gibman
__________________ "It's all a big foodchain. We eat shit and shit eats us." |
| | |
| | #8 (permalink) |
| MP Donator ![]() Join Date: May 2008 Age: 28
Posts: 1,928
Thanks: 73
Thanked 185 Times in 87 Posts
Country: | OK :-) So now we need testers?
__________________ IRSS with full Imon Support (all buttons working) MP Disaster Edition 1.1.0 SVN - NEW recording option weekly everytime on channel X - option to deactivate normal home and use only basic home - comskip network client support - much more Episodescanner: adds series and episodenumbers to your MP EPG or 4TR EPG |
| | |
| | #9 (permalink) |
| Portal Developer Join Date: Oct 2006 Location: Aarhus
Posts: 1,209
Thanks: 13
Thanked 153 Times in 87 Posts
Country: | No not testers but programmers willing to write some unit tests. a unit test is simply code that tests and verifies the correctness of other code (production code). ex. does the GetPreferedAudioStreamIndex return the correct index value based on input params etc. Having a bunch of solid unit tests both for the server and client parts will insure us a more stable product. When modifying existing code that is unit tested gives us the benefit of knowing wether or not the modification broke the already existing unit tests. Simply done by running all unit tests ![]() If they fail, we either introduced a bug, or we need to adapt the existing unit tests to the new change. install : NUnit - Home TestDriven.Net > Home A standalone assembly/project should be created (TvPluginTests) Then we could start by adding a single class to the project called "TvHomeTest.cs" Add a reference to the nunit binaries (nunit.framework.dll) in that TvPluginTests project. Also add a reference to the tvplugin assembly. In the "TvHomeTest" class add ; using NUnit.Framework; Now we're set. The "TvHomeTest" should test all relevant functions within the TvHome class in tvplugin. We want to focus on the GetPreferedAudioStreamIndex function. Lots of tutorials on google. NUnit: A tutorial Selva [Ne0] Samuel /gibman
__________________ "It's all a big foodchain. We eat shit and shit eats us." Last edited by gibman; 2009-11-25 at 13:49.. |
| | |
| | #10 (permalink) |
| MP Donator ![]() Join Date: May 2008 Age: 28
Posts: 1,928
Thanks: 73
Thanked 185 Times in 87 Posts
Country: | Oh sorry i know what a testunit is - but i can't write one in C#. Sorry - no C# expert.
__________________ IRSS with full Imon Support (all buttons working) MP Disaster Edition 1.1.0 SVN - NEW recording option weekly everytime on channel X - option to deactivate normal home and use only basic home - comskip network client support - much more Episodescanner: adds series and episodenumbers to your MP EPG or 4TR EPG |
| | |
![]() |
| Bookmarks |
| Tags |
| audio, selected, stream, tvplugin |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 0002560: TVPlugin: Audio stream is not selected correctly | MediaPortal-Bot | Bugtracker Feed | 0 | 2009-11-26 15:10 |
| 0001277: [TvPlugin] TVService is not available, leaving TVplugin by ESC is not possib | johnzered | 1.0 RC1 and SVN Builds | 3 | 2008-06-04 22:43 |
| BUG: Audio not restored between Radio Stream and TV Stream | AmenRa | Television (MyTV frontend and TV-Server) | 0 | 2007-12-07 00:34 |
| TvPlugin: Preferred audio stream setting | gemx | MediaPortal 1 Talk | 15 | 2007-07-15 18:01 |