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="popy" data-source="post: 1126672" data-attributes="member: 114134"><p>Hey guys.</p><p></p><p>I have made some patches (to core & atmolight plugin) so also when a video is running minimized the UI frame data could be captured. So its a better user experience for atmolight users. What you see on tv will be expanded by atmolight in any situation <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" /></p><p>One patch is for mediaportal 1.11pre (master branch) & the other for atmolight plugin itself.</p><p>On my HTPC the patch is working like it should -> when the video is minimized, now the gui frame data is used <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><strong><span style="font-size: 18px">Core Patch:</span></strong></p><p>I have extended the event handler "NewFrameHandler" of the framegrabber with an new FrameSource Parameter.</p><p>The event handler "NewFrameHandler" gets called when:</p><ul> <li data-xf-list-type="ul">no video is playing -> event will be raised with GUI data and FrameSource.GUI as flag</li> <li data-xf-list-type="ul">video is playing in fullscreen -> event will be raised with video data and FrameSource.Video as flag</li> <li data-xf-list-type="ul">video is playing minimized -> two events will be raised, one with video data and FrameSource.Video as flag and the second one with GUI data and FrameSource.GUI as flag</li> <li data-xf-list-type="ul"><strong>!! VideoModeSwitcher ALWAYS just gets the video frame data. It does'nt depends on video is minimized or fullscreen !!</strong></li> </ul><p>So a plugin (currently just AtmoLight) can decide which types of framedata it wants to use (video or GUI data).</p><p>I have also added null checks (like they where before) so if there is no event subscriber the performance should'nt be affected.</p><p></p><p><strong><span style="font-size: 18px">Atmolight Patch:</span></strong></p><p>The patch subscribes to the extended eventhandler "NewFrame" of the MP core and drops some framesource types on some situations depending on a new user setting "Use GUI data when video is minimized in MediaPortal Live Mode":</p><ul> <li data-xf-list-type="ul">New Setting "true" & video is running minimized -> drop video frames and use GUI frames</li> <li data-xf-list-type="ul">New Setting "false" -> Drop GUI frames when video is playing -> behaviour like in 1.11pre (= legacy option)</li> </ul><p>So the user can decide if he also want to use GUI framedata when video is playing minimized.</p><p></p><p><strong><span style="font-size: 18px">Compatibility:</span></strong></p><p>Its nessacary to use the new patched core and patched Atmolight plugin.</p><p>So when this patch finds its way into a new MP version ALL users must use new Atmolight version.</p><p>I have gone this way because its a CLEANER way of implementation and from performance view.</p><p>So there is NO legacy support for older MP version from Atmolights view and the other way round.</p><p></p><p><strong><span style="font-size: 18px">Installation/Test of patched binarys:</span></strong></p><p><strong></strong></p><p><strong>Prerequisites:</strong></p><ul> <li data-xf-list-type="ul">You must have 1.11pre Mediaportal with Atmolight 1.15.1.0 up and running<br /> </li> <li data-xf-list-type="ul">If you are using my previous patch, just reinstall AtmoLight plugin within extension manager and revert the ProcessPlugins.dll to the original from 1.11pre (also attached in zip "ProcessPlugins.dll_v1.11pre (Original).zip")</li> </ul><p><strong>Installation:</strong></p><p></p><p><strong>!! Dont forget to backup all files from your current Installation !!</strong></p><p></p><p>Extract <strong>"Atmolight_DEV_gui_capture_v5_patched_bin.zip"</strong> and copy the files in the following directorys:</p><ul> <li data-xf-list-type="ul">AtmoLight.MediaPortal1.dll & AtmoLight.Core.dll -> C:\Program Files (x86)\Team MediaPortal\MediaPortal\plugins\process</li> <li data-xf-list-type="ul">*.xml -> C:\ProgramData\Team MediaPortal\MediaPortal\language\Atmolight</li> </ul><p>Extract <strong>"Mediaportal_1.11pre_gui_capture_v3_patched_bin.zip"</strong> and copy the files in the following directorys:</p><ul> <li data-xf-list-type="ul">Core.dll & Mediaportal.exe -> C:\Program Files (x86)\Team MediaPortal\MediaPortal</li> </ul><p></p><p>[SPOILER="v4 Atmolight Patch (obsolete):"]</p><p><strong><span style="font-size: 18px">Atmolight Patch:</span></strong></p><p>The patch subscribes JUST to the exctended eventhandler "NewFrame" of the MP core and drops some framesource types on some situations depending on a new user setting "Use GUI and video framedata in MPLiveMode (MP 1.12 and up)":</p><ul> <li data-xf-list-type="ul">New Setting "true" & video is running minimized -> drop video frames</li> <li data-xf-list-type="ul">New Setting "false" -> Drop GUI frames</li> </ul><p>So the user can decide if he want to use GUI frame data at all.</p><p>[/SPOILER]</p><p>[SPOILER="v3 Atmolight Patch (obsolete):"]</p><p><strong><span style="font-size: 18px">Atmolight Patch:</span></strong></p><p>The patch subscribes JUST to the exctended eventhandler "NewFrame" of the MP core and drops some framesource types on some situations:</p><ul> <li data-xf-list-type="ul">drop gui frames when video is minimized and users has set the menu effect "MPLiveView"</li> <li data-xf-list-type="ul">Drop GUI frames when menu effect is NOT "MPLiveView", so just video frames will pass when video effect is also set to "MediaPortalLiveMode"</li> </ul><p>v3 Atmolight download: <a href="http://www60.zippyshare.com/v/6eWHQJr3/file.html" target="_blank">http://www60.zippyshare.com/v/6eWHQJr3/file.html</a></p><p></p><p>[/SPOILER]</p><p>[SPOILER="v2 Patch (obsolete):"]</p><p><strong><span style="font-size: 18px">Core Patch:</span></strong></p><p>I have added a new event handler named "NewFrameHandlerWithGUI" to the framegrabber.</p><p></p><p>The new event handler "<strong>NewFrameHandlerWithGUI</strong>" gets called when:</p><ul> <li data-xf-list-type="ul">no video is playing -> GUI data will be used</li> <li data-xf-list-type="ul">fullscreen video is playing -> video data will be used</li> <li data-xf-list-type="ul">video is playing minimized -> GUI data will be used</li> <li data-xf-list-type="ul"><strong>!! VideoModeSwitcher ALWAYS get the video frame data! It doesnt depends on video is minimized or fullscreen.</strong></li> </ul><p>"old" event handler "<strong>NewFrameHandler</strong>" gets called:</p><ul> <li data-xf-list-type="ul">video is playing fullscreen or minimized -> video data will be used (like it was before)</li> </ul><p>So a plugin (AtmoLight) can decide if it/User wants to use JUST video frame data (NewFrameHandler event) or it/User wants to use gui & video frame data (NewFrameHandlerWithGUI event). I have added a user setting to the AtmoLight, so the user can decide (see attached patched plugin).</p><p>I have also added null checks (like they where before) so if there is no event subscriber the performance should'nt be affected.</p><p></p><p><strong><span style="font-size: 18px">Atmolight Patch:</span></strong></p><p>As stated above, i have added a user setting "Use GUI framedata (MP 1.12 and up)" where the user can decide if he wants to JUST use video frame data or also GUI data when video is minimized or not playing. My implementation also checks for compatibility. When the "NewFrameHandlerWithGUI" event exists in core.dll and the user has set the setting "Use GUI framedata (MP 1.12 and up)" the new feature is used <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><strong><span style="font-size: 18px">Compatibility:</span></strong></p><p>I have tested the following combinations:</p><ul> <li data-xf-list-type="ul">patched MP 1.11pre -> patched Atmolight plugin -> works <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" /></li> <li data-xf-list-type="ul">patched MP 1.11pre -> original Atmolight plugin -> works<br /> </li> <li data-xf-list-type="ul">original MP 1.11pre -> patched Atmolight plugin -> works</li> </ul><p>With this implementation there should'nt be compatibility issues.</p><p></p><p><strong><span style="font-size: 18px">Installation/Test of patched binarys:</span></strong></p><p><strong></strong></p><p><strong>Prerequisites:</strong></p><ul> <li data-xf-list-type="ul">You must have 1.11pre Mediaportal with Atmolight 1.15.1.0 up and running<br /> </li> <li data-xf-list-type="ul">If you are using v1 of my patch, just reinstall AtmoLight plugin within extension manager and revert the ProcessPlugins.dll to the original from 1.11pre (also attached in zip "ProcessPlugins.dll_v1.11pre (Original).zip")</li> </ul><p><strong>Installation:</strong></p><p></p><p><strong>!! Dont forget to backup all files from your current Installation !!</strong></p><p></p><p>Extract <strong>"Atmolight_1.15_gui_capture_v2_patched_bin.zip"</strong> and copy the files in the following directorys:</p><ul> <li data-xf-list-type="ul">AtmoLight.MediaPortal1.dll -> C:\Program Files (x86)\Team MediaPortal\MediaPortal\plugins\process<br /> </li> <li data-xf-list-type="ul">*.lng -> C:\ProgramData\Team MediaPortal\MediaPortal\language\Atmolight</li> </ul><p>Extract <strong>"Mediaportal_1.11pre_gui_capture_v2_patched_bin.zip"</strong> and copy the files in the following directorys:</p><ul> <li data-xf-list-type="ul">Core.dll & Mediaportal.exe -> C:\Program Files (x86)\Team MediaPortal\MediaPortal</li> </ul><p>v2 files download: <a href="http://www1.zippyshare.com/v/HRIFuPDr/file.html" target="_blank">http://www1.zippyshare.com/v/HRIFuPDr/file.html</a></p><p></p><p>[/SPOILER]</p><p>[SPOILER="v1 Patch (obsolete):"]</p><p></p><p><strong>VideoModeSwitcher changes and effect for users which doesnt have atmolight plugin installed:</strong>[/B]</p><p>My patch also include changes in VideoModeSwitcher so it doesnt use frame data when video is playing and is minimized -> because without the patch it has switched aspect ratio depending on the GUI frame data.</p><p>Summary: Users which dont have atmolight installed, have just one throwback -> when video is minimized the VideoModeSwitcher dont get current video data and dont switch the aspect ratio until the video is maximized again.</p><p></p><p><strong>Atmolight Patch:</strong></p><p>Why Atmolight patch is needed? -> it isnt really needed BUT i have added the IsFullScreenVideo bool flag to the NewFrameHandler, so when atmolight plugin or any other (new) plugin grabs frame data and want to know if frame data is a fullscreenvideo or is gui frame data. So the plugin can decide itself if it uses the data or drop it.</p><p></p><p><strong>Changelog:</strong></p><ul> <li data-xf-list-type="ul">if video is playing not in fullscreen the current GUI frame data is used for the NewFrameHandler event</li> <li data-xf-list-type="ul">added is "IsFullScreenVideo" bool to Event NewFrameHandler (thats the reason why atmolight plugin needs to be patched)</li> <li data-xf-list-type="ul">VideoModeSwitcher is not using the GUI frame data</li> </ul><p>attached in the zip you can find the patched core.dll, mediaportal.exe, ProcessPlugins.dll & Atmolight plugin which uses the new OnNewFrame handler event. The two unified patches (mediaportal & atmolight plugin) are also attached.</p><p></p><p><strong>Attachments:</strong></p><p><a href="https://forum.team-mediaportal.com/attachments/atmolight-mediaportal1-plugin-patch.161719/" target="_blank">https://forum.team-mediaportal.com/attachments/atmolight-mediaportal1-plugin-patch.161719/</a></p><p><a href="https://forum.team-mediaportal.com/attachments/mediaportal_atmolight_gui-patch.161721/" target="_blank">https://forum.team-mediaportal.com/attachments/mediaportal_atmolight_gui-patch.161721/</a></p><p><a href="https://forum.team-mediaportal.com/attachments/atmolight_patch_1-11pre-zip.161720/" target="_blank">https://forum.team-mediaportal.com/attachments/atmolight_patch_1-11pre-zip.161720/</a></p><p>[/SPOILER]</p><p></p><p>@<a href="https://www.team-mediaportal.de/erweiterungen/owner/lightning303" target="_blank">Lightning303</a> & All: Can you please review the patches and let me know your thinkings.</p><p>Would be nice if the patches are finds its way into the next releases <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" /></p><p></p><p>Have fun</p><p>pOpY</p></blockquote><p></p>
[QUOTE="popy, post: 1126672, member: 114134"] Hey guys. I have made some patches (to core & atmolight plugin) so also when a video is running minimized the UI frame data could be captured. So its a better user experience for atmolight users. What you see on tv will be expanded by atmolight in any situation ;) One patch is for mediaportal 1.11pre (master branch) & the other for atmolight plugin itself. On my HTPC the patch is working like it should -> when the video is minimized, now the gui frame data is used ;) [B][SIZE=5]Core Patch:[/SIZE][/B] I have extended the event handler "NewFrameHandler" of the framegrabber with an new FrameSource Parameter. The event handler "NewFrameHandler" gets called when: [LIST] [*]no video is playing -> event will be raised with GUI data and FrameSource.GUI as flag [*]video is playing in fullscreen -> event will be raised with video data and FrameSource.Video as flag [*]video is playing minimized -> two events will be raised, one with video data and FrameSource.Video as flag and the second one with GUI data and FrameSource.GUI as flag [*][B]!! VideoModeSwitcher ALWAYS just gets the video frame data. It does'nt depends on video is minimized or fullscreen !![/B] [/LIST] So a plugin (currently just AtmoLight) can decide which types of framedata it wants to use (video or GUI data). I have also added null checks (like they where before) so if there is no event subscriber the performance should'nt be affected. [B][SIZE=5]Atmolight Patch:[/SIZE][/B] The patch subscribes to the extended eventhandler "NewFrame" of the MP core and drops some framesource types on some situations depending on a new user setting "Use GUI data when video is minimized in MediaPortal Live Mode": [LIST] [*]New Setting "true" & video is running minimized -> drop video frames and use GUI frames [*]New Setting "false" -> Drop GUI frames when video is playing -> behaviour like in 1.11pre (= legacy option) [/LIST] So the user can decide if he also want to use GUI framedata when video is playing minimized. [B][SIZE=5]Compatibility:[/SIZE][/B] Its nessacary to use the new patched core and patched Atmolight plugin. So when this patch finds its way into a new MP version ALL users must use new Atmolight version. I have gone this way because its a CLEANER way of implementation and from performance view. So there is NO legacy support for older MP version from Atmolights view and the other way round. [B][SIZE=5]Installation/Test of patched binarys:[/SIZE] Prerequisites:[/B] [LIST] [*]You must have 1.11pre Mediaportal with Atmolight 1.15.1.0 up and running [*]If you are using my previous patch, just reinstall AtmoLight plugin within extension manager and revert the ProcessPlugins.dll to the original from 1.11pre (also attached in zip "ProcessPlugins.dll_v1.11pre (Original).zip") [/LIST] [B]Installation:[/B] [B]!! Dont forget to backup all files from your current Installation !![/B] Extract [B]"Atmolight_DEV_gui_capture_v5_patched_bin.zip"[/B] and copy the files in the following directorys: [LIST] [*]AtmoLight.MediaPortal1.dll & AtmoLight.Core.dll -> C:\Program Files (x86)\Team MediaPortal\MediaPortal\plugins\process [*]*.xml -> C:\ProgramData\Team MediaPortal\MediaPortal\language\Atmolight [/LIST] Extract [B]"Mediaportal_1.11pre_gui_capture_v3_patched_bin.zip"[/B] and copy the files in the following directorys: [LIST] [*]Core.dll & Mediaportal.exe -> C:\Program Files (x86)\Team MediaPortal\MediaPortal [/LIST] [SPOILER="v4 Atmolight Patch (obsolete):"] [B][SIZE=5]Atmolight Patch:[/SIZE][/B] The patch subscribes JUST to the exctended eventhandler "NewFrame" of the MP core and drops some framesource types on some situations depending on a new user setting "Use GUI and video framedata in MPLiveMode (MP 1.12 and up)": [LIST] [*]New Setting "true" & video is running minimized -> drop video frames [*]New Setting "false" -> Drop GUI frames [/LIST] So the user can decide if he want to use GUI frame data at all. [/SPOILER] [SPOILER="v3 Atmolight Patch (obsolete):"] [B][SIZE=5]Atmolight Patch:[/SIZE][/B] The patch subscribes JUST to the exctended eventhandler "NewFrame" of the MP core and drops some framesource types on some situations: [LIST] [*]drop gui frames when video is minimized and users has set the menu effect "MPLiveView" [*]Drop GUI frames when menu effect is NOT "MPLiveView", so just video frames will pass when video effect is also set to "MediaPortalLiveMode" [/LIST] v3 Atmolight download: [url]http://www60.zippyshare.com/v/6eWHQJr3/file.html[/url] [/SPOILER] [SPOILER="v2 Patch (obsolete):"] [B][SIZE=5]Core Patch:[/SIZE][/B] I have added a new event handler named "NewFrameHandlerWithGUI" to the framegrabber. The new event handler "[B]NewFrameHandlerWithGUI[/B]" gets called when: [LIST] [*]no video is playing -> GUI data will be used [*]fullscreen video is playing -> video data will be used [*]video is playing minimized -> GUI data will be used [*][B]!! VideoModeSwitcher ALWAYS get the video frame data! It doesnt depends on video is minimized or fullscreen.[/B] [/LIST] "old" event handler "[B]NewFrameHandler[/B]" gets called: [LIST] [*]video is playing fullscreen or minimized -> video data will be used (like it was before) [/LIST] So a plugin (AtmoLight) can decide if it/User wants to use JUST video frame data (NewFrameHandler event) or it/User wants to use gui & video frame data (NewFrameHandlerWithGUI event). I have added a user setting to the AtmoLight, so the user can decide (see attached patched plugin). I have also added null checks (like they where before) so if there is no event subscriber the performance should'nt be affected. [B][SIZE=5]Atmolight Patch:[/SIZE][/B] As stated above, i have added a user setting "Use GUI framedata (MP 1.12 and up)" where the user can decide if he wants to JUST use video frame data or also GUI data when video is minimized or not playing. My implementation also checks for compatibility. When the "NewFrameHandlerWithGUI" event exists in core.dll and the user has set the setting "Use GUI framedata (MP 1.12 and up)" the new feature is used ;) [B][SIZE=5]Compatibility:[/SIZE][/B] I have tested the following combinations: [LIST] [*]patched MP 1.11pre -> patched Atmolight plugin -> works :p [*]patched MP 1.11pre -> original Atmolight plugin -> works [*]original MP 1.11pre -> patched Atmolight plugin -> works [/LIST] With this implementation there should'nt be compatibility issues. [B][SIZE=5]Installation/Test of patched binarys:[/SIZE] Prerequisites:[/B] [LIST] [*]You must have 1.11pre Mediaportal with Atmolight 1.15.1.0 up and running [*]If you are using v1 of my patch, just reinstall AtmoLight plugin within extension manager and revert the ProcessPlugins.dll to the original from 1.11pre (also attached in zip "ProcessPlugins.dll_v1.11pre (Original).zip") [/LIST] [B]Installation:[/B] [B]!! Dont forget to backup all files from your current Installation !![/B] Extract [B]"Atmolight_1.15_gui_capture_v2_patched_bin.zip"[/B] and copy the files in the following directorys: [LIST] [*]AtmoLight.MediaPortal1.dll -> C:\Program Files (x86)\Team MediaPortal\MediaPortal\plugins\process [*]*.lng -> C:\ProgramData\Team MediaPortal\MediaPortal\language\Atmolight [/LIST] Extract [B]"Mediaportal_1.11pre_gui_capture_v2_patched_bin.zip"[/B] and copy the files in the following directorys: [LIST] [*]Core.dll & Mediaportal.exe -> C:\Program Files (x86)\Team MediaPortal\MediaPortal [/LIST] v2 files download: [url]http://www1.zippyshare.com/v/HRIFuPDr/file.html[/url] [/SPOILER] [SPOILER="v1 Patch (obsolete):"] [B]VideoModeSwitcher changes and effect for users which doesnt have atmolight plugin installed:[/B][/B] My patch also include changes in VideoModeSwitcher so it doesnt use frame data when video is playing and is minimized -> because without the patch it has switched aspect ratio depending on the GUI frame data. Summary: Users which dont have atmolight installed, have just one throwback -> when video is minimized the VideoModeSwitcher dont get current video data and dont switch the aspect ratio until the video is maximized again. [B]Atmolight Patch:[/B] Why Atmolight patch is needed? -> it isnt really needed BUT i have added the IsFullScreenVideo bool flag to the NewFrameHandler, so when atmolight plugin or any other (new) plugin grabs frame data and want to know if frame data is a fullscreenvideo or is gui frame data. So the plugin can decide itself if it uses the data or drop it. [B]Changelog:[/B] [LIST] [*]if video is playing not in fullscreen the current GUI frame data is used for the NewFrameHandler event [*]added is "IsFullScreenVideo" bool to Event NewFrameHandler (thats the reason why atmolight plugin needs to be patched) [*]VideoModeSwitcher is not using the GUI frame data [/LIST] attached in the zip you can find the patched core.dll, mediaportal.exe, ProcessPlugins.dll & Atmolight plugin which uses the new OnNewFrame handler event. The two unified patches (mediaportal & atmolight plugin) are also attached. [B]Attachments:[/B] [url]https://forum.team-mediaportal.com/attachments/atmolight-mediaportal1-plugin-patch.161719/[/url] [url]https://forum.team-mediaportal.com/attachments/mediaportal_atmolight_gui-patch.161721/[/url] [url]https://forum.team-mediaportal.com/attachments/atmolight_patch_1-11pre-zip.161720/[/url] [/SPOILER] @[URL='https://www.team-mediaportal.de/erweiterungen/owner/lightning303']Lightning303[/URL] & All: Can you please review the patches and let me know your thinkings. Would be nice if the patches are finds its way into the next releases :p Have fun pOpY [/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