home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
[Patch] MultiTuner Bug with different PVR cards
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="FlipGer" data-source="post: 30967" data-attributes="member: 10293"><p>Hi frodo,</p><p></p><p>thanks for looking into the code.</p><p></p><p>Ok, let me explain, what happens on my machine without the patch.</p><p></p><p>1) PVR 350 standalone (150 taken out of comp)</p><p>- works fine</p><p></p><p>2) PVR 150 standalone (350 taken out of comp)</p><p>- works fine</p><p></p><p>3) PVR 150 together with PVR 350</p><p>- PVR 150 works fine</p><p>- PVR 350 does not work. I get a black picture and an error message in error.log:</p><p>23.11.2005 23:14:39 SinkGraph:FAILED to connect Encoder->mpeg2 demuxer:80040217</p><p></p><p><strong>Looking at the graphs i can see that MP picks the filters of the PVR 150 for the PVR 350.</strong></p><p></p><p>Moniker of PVR 150:</p><p>ven_4444&amp;<strong>dev_0016</strong>&amp;subsys_88010070&amp;rev_01</p><p>Moniker of PVR 350:</p><p>ven_4444&amp;<strong>dev_0803</strong>&amp;subsys_40000070&amp;rev_01</p><p></p><p>Taking a look into the mediaportal.log I can see that MP takes the 150-moniker as unique filter for the PVR 350.</p><p>(sorry no log here, i am at work)</p><p></p><p>This is because the foreach-loop is simply wrong. (In my eyes <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" />)</p><p>[code]foreach (string key in AvailableFilters.Filters.Keys)[/code]</p><p>- This loop takes all available filter, so far so good. I have two of them (150/350).</p><p>[code]filter = al[0] as Filter; // TAKES the first filter</p><p>string filterMoniker = filter.MonikerString;</p><p>int posTmp = filterMoniker.LastIndexOf("#");</p><p>if (posTmp >= 0) filterMoniker = filterMoniker.Substring(0, posTmp);[/code]</p><p>- In this part the very first filter-moniker is read in. In my case PVR 150, because it is the first in the list. This code part does not make sense.</p><p></p><p>Why? In the following for-loop this filter-moniker is compared to the first filter-moniker. So it will be compared to itself! MP will always find the unique filter in the first run of the for-loop. It reads the first filter and compares it to its own...</p><p></p><p>[code]string moniker = FindUniqueFilter(filterMoniker, Instance);</p><p>for (int filterInst = 0; filterInst < al.Count; ++filterInst)</p><p>{</p><p> filter = al[filterInst] as Filter; // TAKES the first filter</p><p> string tmpMoniker = filter.MonikerString.Replace(@"\", "#");</p><p> tmpMoniker = tmpMoniker.Replace(@"/", "#");</p><p> // COMPARES first filter with first filter -> always TRUE</p><p> if (tmpMoniker.ToLower().IndexOf(moniker.ToLower()) >= 0)</p><p> {</p><p> Log.Write("use unique filter moniker:{0}", filter.MonikerString);</p><p> filterFound = true; </p><p> break;</p><p> }</p><p>}[/code]</p><p></p><p>If I use this code</p><p>[code]string moniker = FindUniqueFilter(captureDeviceDeviceName, Instance);[/code]</p><p>this comparision</p><p>[code]if (tmpMoniker.ToLower().IndexOf(moniker.ToLower()) >= 0)[/code]</p><p>will only be true if the filter-moniker is the same like the given one in the CaptureCardsDefinition.xml</p><p></p><p>I do not know, if this will cause problems with TwinHan cards, but I do not think so. The code will still compare the moniker of the definition file with the moniker of the filter.</p><p></p><p>But I know, that the current code does not work with multiple PVR cards. My patch does work. <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p>Hopefully this makes sense. Just ask back, if there are any questions left. I will try to go on IRC this evening. Have to go back to work now... <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" /></p><p></p><p>Flip.</p></blockquote><p></p>
[QUOTE="FlipGer, post: 30967, member: 10293"] Hi frodo, thanks for looking into the code. Ok, let me explain, what happens on my machine without the patch. 1) PVR 350 standalone (150 taken out of comp) - works fine 2) PVR 150 standalone (350 taken out of comp) - works fine 3) PVR 150 together with PVR 350 - PVR 150 works fine - PVR 350 does not work. I get a black picture and an error message in error.log: 23.11.2005 23:14:39 SinkGraph:FAILED to connect Encoder->mpeg2 demuxer:80040217 [b]Looking at the graphs i can see that MP picks the filters of the PVR 150 for the PVR 350.[/b] Moniker of PVR 150: ven_4444&[b]dev_0016[/b]&subsys_88010070&rev_01 Moniker of PVR 350: ven_4444&[b]dev_0803[/b]&subsys_40000070&rev_01 Taking a look into the mediaportal.log I can see that MP takes the 150-moniker as unique filter for the PVR 350. (sorry no log here, i am at work) This is because the foreach-loop is simply wrong. (In my eyes ;)) [code]foreach (string key in AvailableFilters.Filters.Keys)[/code] - This loop takes all available filter, so far so good. I have two of them (150/350). [code]filter = al[0] as Filter; // TAKES the first filter string filterMoniker = filter.MonikerString; int posTmp = filterMoniker.LastIndexOf("#"); if (posTmp >= 0) filterMoniker = filterMoniker.Substring(0, posTmp);[/code] - In this part the very first filter-moniker is read in. In my case PVR 150, because it is the first in the list. This code part does not make sense. Why? In the following for-loop this filter-moniker is compared to the first filter-moniker. So it will be compared to itself! MP will always find the unique filter in the first run of the for-loop. It reads the first filter and compares it to its own... [code]string moniker = FindUniqueFilter(filterMoniker, Instance); for (int filterInst = 0; filterInst < al.Count; ++filterInst) { filter = al[filterInst] as Filter; // TAKES the first filter string tmpMoniker = filter.MonikerString.Replace(@"\", "#"); tmpMoniker = tmpMoniker.Replace(@"/", "#"); // COMPARES first filter with first filter -> always TRUE if (tmpMoniker.ToLower().IndexOf(moniker.ToLower()) >= 0) { Log.Write("use unique filter moniker:{0}", filter.MonikerString); filterFound = true; break; } }[/code] If I use this code [code]string moniker = FindUniqueFilter(captureDeviceDeviceName, Instance);[/code] this comparision [code]if (tmpMoniker.ToLower().IndexOf(moniker.ToLower()) >= 0)[/code] will only be true if the filter-moniker is the same like the given one in the CaptureCardsDefinition.xml I do not know, if this will cause problems with TwinHan cards, but I do not think so. The code will still compare the moniker of the definition file with the moniker of the filter. But I know, that the current code does not work with multiple PVR cards. My patch does work. :) Hopefully this makes sense. Just ask back, if there are any questions left. I will try to go on IRC this evening. Have to go back to work now... ;) Flip. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
[Patch] MultiTuner Bug with different PVR cards
Contact us
RSS
Top
Bottom