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
Area 51 - Testing Area
MP1-4777 Additional info for video and audio
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="Sebastiii" data-source="post: 1177376" data-attributes="member: 60104"><p>Yep you revert the change made a long time ago <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite3" alt=":(" title="Frown :(" loading="lazy" data-shortname=":(" /></p><p>For example (but there are other place):</p><p></p><p>Here, it try to not reload it if already loaded :</p><p>[code=csharp]// Set currentMediaInfoFilePlaying for later use if it's the same media to play (it will cache mediainfo data)</p><p> MediaInfoWrapper mInfo = null;</p><p> if (!string.IsNullOrEmpty(g_Player.currentMediaInfoFilePlaying) && (g_Player.currentMediaInfoFilePlaying == strFilenameAndPath))</p><p> {</p><p> mInfo = g_Player._mediaInfo;</p><p> }</p><p> else</p><p> {</p><p> g_Player.currentMediaInfoFilePlaying = strFilenameAndPath;</p><p> mInfo = g_Player._mediaInfo = new MediaInfoWrapper(strFilenameAndPath);</p><p> }[/code]</p><p></p><p>to</p><p></p><p>Now you always read/load mediainfo :</p><p></p><p>[code=csharp] // Set currentMediaInfoFilePlaying for later use if it's the same media to play (it will cache mediainfo data)</p><p> var mediaInfo = new MediaInfoWrapper(strFilenameAndPath);</p><p> if (string.IsNullOrEmpty(g_Player.currentMediaInfoFilePlaying) || g_Player.currentMediaInfoFilePlaying != strFilenameAndPath)</p><p> {</p><p> g_Player.currentMediaInfoFilePlaying = strFilenameAndPath;</p><p> }[/code]</p><p></p><p>I will try to explain what it's needed, the purpose of old code, is to try to load only once the mediainfo.dll and reload it or refresh it if it's really needed.</p><p>So do you think you can do that way too (with your new code) ? And really reload mediainfo if it's really needed.</p></blockquote><p></p>
[QUOTE="Sebastiii, post: 1177376, member: 60104"] Yep you revert the change made a long time ago :( For example (but there are other place): Here, it try to not reload it if already loaded : [code=csharp]// Set currentMediaInfoFilePlaying for later use if it's the same media to play (it will cache mediainfo data) MediaInfoWrapper mInfo = null; if (!string.IsNullOrEmpty(g_Player.currentMediaInfoFilePlaying) && (g_Player.currentMediaInfoFilePlaying == strFilenameAndPath)) { mInfo = g_Player._mediaInfo; } else { g_Player.currentMediaInfoFilePlaying = strFilenameAndPath; mInfo = g_Player._mediaInfo = new MediaInfoWrapper(strFilenameAndPath); }[/code] to Now you always read/load mediainfo : [code=csharp] // Set currentMediaInfoFilePlaying for later use if it's the same media to play (it will cache mediainfo data) var mediaInfo = new MediaInfoWrapper(strFilenameAndPath); if (string.IsNullOrEmpty(g_Player.currentMediaInfoFilePlaying) || g_Player.currentMediaInfoFilePlaying != strFilenameAndPath) { g_Player.currentMediaInfoFilePlaying = strFilenameAndPath; }[/code] I will try to explain what it's needed, the purpose of old code, is to try to load only once the mediainfo.dll and reload it or refresh it if it's really needed. So do you think you can do that way too (with your new code) ? And really reload mediainfo if it's really needed. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Area 51 - Testing Area
MP1-4777 Additional info for video and audio
Contact us
RSS
Top
Bottom