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
Submit: code patches (MediaPortal/TV-Server/etc.)
Framegrabber improvement - Capture from UI when Video is minimized or running in Mini-display
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: 1128750" data-attributes="member: 97876"><p>I played around a bit and tried my hand with overloading the AtmolightPlugin_OnNewFrame method. However it seems that the enum crashes MP when its not present (MP before your changes) in MP. Not sure if this can be worked around. But if we/you would to use an int instead of an enum in the FrameGrabber as you said in your post, its not a big problem to implement.</p><p></p><p>[code] private void AtmolightPlugin_OnNewFrame(short width, short height, short arWidth, short arHeight, uint pSurface, int FrameSource)</p><p> {</p><p> if (coreObject.GetCurrentEffect() != ContentEffect.MediaPortalLiveMode || !coreObject.IsConnected() || !coreObject.IsAtmoLightOn() || width == 0 || height == 0)</p><p> {</p><p> return;</p><p> }</p><p></p><p> //Drop any frames?</p><p> if (Settings.trueGrabbing)</p><p> {</p><p> //GUI grabbing while video is minimized activated</p><p> if (g_Player.Playing && (!GUIGraphicsContext.IsFullScreenVideo) && (FrameSource == 1))</p><p> {</p><p> //Drop Video frames when user has set TrueGrabbing & video is playing minimized -> just GUI frames will pass</p><p> return;</p><p> }</p><p> }</p><p> else</p><p> {</p><p> //GUI grabbing while video is minimized deactivated</p><p> if ((g_Player.Playing) && (FrameSource == 0))</p><p> {</p><p> //Drop GUI frames when user has NOT set TrueGrabbing & video is playing -> just video frames will pass</p><p> </p><p> return;</p><p> }</p><p> }</p><p> AtmolightPlugin_OnNewFrame(width, height, arWidth, arHeight, pSurface);</p><p> }[/code]</p><p></p><p>The original AtmolightPlugin_OnNewFrame stays untouched (no FrameSource parameter and no frame elimination code). Then new MP versions will use the above method that will forward the frames to the old method, and old MP versions will directly use the old method as before.</p></blockquote><p></p>
[QUOTE="Lightning303, post: 1128750, member: 97876"] I played around a bit and tried my hand with overloading the AtmolightPlugin_OnNewFrame method. However it seems that the enum crashes MP when its not present (MP before your changes) in MP. Not sure if this can be worked around. But if we/you would to use an int instead of an enum in the FrameGrabber as you said in your post, its not a big problem to implement. [code] private void AtmolightPlugin_OnNewFrame(short width, short height, short arWidth, short arHeight, uint pSurface, int FrameSource) { if (coreObject.GetCurrentEffect() != ContentEffect.MediaPortalLiveMode || !coreObject.IsConnected() || !coreObject.IsAtmoLightOn() || width == 0 || height == 0) { return; } //Drop any frames? if (Settings.trueGrabbing) { //GUI grabbing while video is minimized activated if (g_Player.Playing && (!GUIGraphicsContext.IsFullScreenVideo) && (FrameSource == 1)) { //Drop Video frames when user has set TrueGrabbing & video is playing minimized -> just GUI frames will pass return; } } else { //GUI grabbing while video is minimized deactivated if ((g_Player.Playing) && (FrameSource == 0)) { //Drop GUI frames when user has NOT set TrueGrabbing & video is playing -> just video frames will pass return; } } AtmolightPlugin_OnNewFrame(width, height, arWidth, arHeight, pSurface); }[/code] The original AtmolightPlugin_OnNewFrame stays untouched (no FrameSource parameter and no frame elimination code). Then new MP versions will use the above method that will forward the frames to the old method, and old MP versions will directly use the old method as before. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
Submit: code patches (MediaPortal/TV-Server/etc.)
Framegrabber improvement - Capture from UI when Video is minimized or running in Mini-display
Contact us
RSS
Top
Bottom