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!)
AutoCropper plugin
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="ziphnor" data-source="post: 93494" data-attributes="member: 14215"><p>Today i decided to try another approach, forgetting about the whole filter thing.</p><p></p><p>I instead created a method that takes a C# bitmap and finds the bounds. I then added an 'Auto' aspect ratio (or 'zoom mode' if you like) which for starters does a screen grab and determines bounds from that. It works very well, and took perhaps 1% of the time required for the DS filter to implement <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>However, working with a screen grab is a really bad idea because it will also catch any OSD being displayed as well as any added black bars from the current zoom mode. However, i know that MP uses VMR9 renderless, and as far as i can tell that means MP gets a handle to a Direct3D surface with the video rendered in order to render the OSD etc. (as an aside if this approach works out i might crop by updating the 'static' crop settings instead of using a new aspect ratio)</p><p></p><p>Now, if i can just get a handle on the Direct3D surface, i should be able to use SurfaceLoader to produce a C# bitmap, and everything is good. The biggest issue now is to find out where i can grab a handle on this surface. Seems like it might be PlaneScene.cs ( <a href="http://mediaportal.svn.sourceforge.net/viewvc/mediaportal/trunk/mediaportal/Core/Player/PlaneScene.cs?view=markup" target="_blank">http://mediaportal.svn.sourceforge.net/viewvc/mediaportal/trunk/mediaportal/Core/Player/PlaneScene.cs?view=markup</a> ).</p><p></p><p>Hopefully i will figure that out tomorrow. But please if you read this and have an understanding of VMR9 Renderless and how it is integrated with MP, please dont hesitate to point me in the right direction!</p><p></p><p>PS: One could read this as saying i just wasted alot of time on the directshow filter, but thats not entirely correct since i managed to learn quite alot about directshow which is going to be useful when im going to try to add teletext subtitles (the next project in my personal development queue <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" /></p></blockquote><p></p>
[QUOTE="ziphnor, post: 93494, member: 14215"] Today i decided to try another approach, forgetting about the whole filter thing. I instead created a method that takes a C# bitmap and finds the bounds. I then added an 'Auto' aspect ratio (or 'zoom mode' if you like) which for starters does a screen grab and determines bounds from that. It works very well, and took perhaps 1% of the time required for the DS filter to implement ;) However, working with a screen grab is a really bad idea because it will also catch any OSD being displayed as well as any added black bars from the current zoom mode. However, i know that MP uses VMR9 renderless, and as far as i can tell that means MP gets a handle to a Direct3D surface with the video rendered in order to render the OSD etc. (as an aside if this approach works out i might crop by updating the 'static' crop settings instead of using a new aspect ratio) Now, if i can just get a handle on the Direct3D surface, i should be able to use SurfaceLoader to produce a C# bitmap, and everything is good. The biggest issue now is to find out where i can grab a handle on this surface. Seems like it might be PlaneScene.cs ( [url]http://mediaportal.svn.sourceforge.net/viewvc/mediaportal/trunk/mediaportal/Core/Player/PlaneScene.cs?view=markup[/url] ). Hopefully i will figure that out tomorrow. But please if you read this and have an understanding of VMR9 Renderless and how it is integrated with MP, please dont hesitate to point me in the right direction! PS: One could read this as saying i just wasted alot of time on the directshow filter, but thats not entirely correct since i managed to learn quite alot about directshow which is going to be useful when im going to try to add teletext subtitles (the next project in my personal development queue ;) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
AutoCropper plugin
Contact us
RSS
Top
Bottom