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 2
Plugin Development
Plugin: RefreshRateChanger
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="Lightning303" data-source="post: 1120421" data-attributes="member: 97876"><p>Had another look at this. The AtmoLight errors result from the source surface being null between refreshrate changes.</p><p>This is the code im using:</p><p></p><p>[code] if (ServiceRegistration.Get<IPlayerContextManager>().IsVideoContextActive)</p><p> {</p><p> player = ServiceRegistration.Get<IPlayerContextManager>().PrimaryPlayerContext.CurrentPlayer as ISharpDXVideoPlayer;</p><p> surfaceSource = player.Surface;</p><p> }</p><p> else</p><p> {</p><p> surfaceSource = SkinContext.Device.GetRenderTarget(0);</p><p> }[/code]</p><p></p><p>At the point where the error happens the else clause is used and </p><p></p><p>[code]SkinContext.Device.GetRenderTarget(0)[/code]</p><p></p><p>returns null instead of a surface.</p><p>I would add a check and if it returns null just return the method if you dont have any better solution. But im not sure how this would influence the refreshrate changer or other parts of mp2. If this happens right now, the exception gets catched and the method returns alrady, just with an error message in the logs.</p><p>Btw. i could only see this error come up on video start not on video end or stop.</p></blockquote><p></p>
[QUOTE="Lightning303, post: 1120421, member: 97876"] Had another look at this. The AtmoLight errors result from the source surface being null between refreshrate changes. This is the code im using: [code] if (ServiceRegistration.Get<IPlayerContextManager>().IsVideoContextActive) { player = ServiceRegistration.Get<IPlayerContextManager>().PrimaryPlayerContext.CurrentPlayer as ISharpDXVideoPlayer; surfaceSource = player.Surface; } else { surfaceSource = SkinContext.Device.GetRenderTarget(0); }[/code] At the point where the error happens the else clause is used and [code]SkinContext.Device.GetRenderTarget(0)[/code] returns null instead of a surface. I would add a check and if it returns null just return the method if you dont have any better solution. But im not sure how this would influence the refreshrate changer or other parts of mp2. If this happens right now, the exception gets catched and the method returns alrady, just with an error message in the logs. Btw. i could only see this error come up on video start not on video end or stop. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
Plugin: RefreshRateChanger
Contact us
RSS
Top
Bottom