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!)
MP1-4720 Public method to try to fix some loadSkin error from plugin side
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: 1162845" data-attributes="member: 60104"><p>Hi,</p><p></p><p>I have opened a Jira to try to do something to let plugin to be in sync when working with GUI :</p><p><a href="https://issues.team-mediaportal.com/browse/MP1-4720" target="_blank">https://issues.team-mediaportal.com/browse/MP1-4720</a></p><p></p><p>Trying to add a public method that plugin dev can use to loadskin in main thread.</p><p></p><p>public static readonly SynchronizationContext _mainThreadContext = SynchronizationContext.Current;</p><p></p><p>_mainThreadContext will be init on MP main thread, like this plugin can use it to be in sync for ex :</p><p></p><p>if (!_playbackStopped)</p><p> {</p><p> _mainThreadContext.Send(delegate</p><p> {</p><p> g_Player.ShowFullScreenWindow();</p><p> }, null);</p><p> }</p><p></p><p>Like this g_Player.ShowFullScreenWindow(); will be executed in sync with MP main thread.</p><p></p><p>Plugin dev need to ref to core.dll and in plugin when thing need to be sync with MP main thread, it should use like this : </p><p></p><p>[CODE=C#]GUIWindow._mainThreadContext.Send(delegate {</p><p>// code</p><p>// code</p><p>// etc;</p><p>}, null);[/CODE]</p></blockquote><p></p>
[QUOTE="Sebastiii, post: 1162845, member: 60104"] Hi, I have opened a Jira to try to do something to let plugin to be in sync when working with GUI : [URL]https://issues.team-mediaportal.com/browse/MP1-4720[/URL] Trying to add a public method that plugin dev can use to loadskin in main thread. public static readonly SynchronizationContext _mainThreadContext = SynchronizationContext.Current; _mainThreadContext will be init on MP main thread, like this plugin can use it to be in sync for ex : if (!_playbackStopped) { _mainThreadContext.Send(delegate { g_Player.ShowFullScreenWindow(); }, null); } Like this g_Player.ShowFullScreenWindow(); will be executed in sync with MP main thread. Plugin dev need to ref to core.dll and in plugin when thing need to be sync with MP main thread, it should use like this : [CODE=C#]GUIWindow._mainThreadContext.Send(delegate { // code // code // etc; }, null);[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
MP1-4720 Public method to try to fix some loadSkin error from plugin side
Contact us
RSS
Top
Bottom