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!)
adding MediaEncoderCategory filters as TvEncoderFilters?
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="tanstaafl" data-source="post: 410215" data-attributes="member: 62622"><p>I've experimented with changing <strong>AddTvEncoderFilter</strong> in </p><p>TvLibrary\Implementations\Analog\Components\Encoder.cs </p><p>so that it searches for encoding filters of FilterCategory.MediaEncoderCategory as well as of AMKSEncoder</p><p>category (relevant code snippet below).</p><p></p><p>I use this to enable "MCE-style" software encoder filter (video/audio input , mpeg2 out in single filter) with my</p><p>analog SW-encoding card, and it works well on my system. </p><p></p><p>I'm aware you want to restrict the use of SW-encoding filters to those known to work, but I'm wondering if there's</p><p>any particular reason SW/HW-filters are treated differently, i.e. HW-filters in AddTvEncoderFilter and SW-filters in</p><p>Add(Audio||Video)Compressor? From the system's point of view, there shouldn't be any difference between the</p><p>two types, should there?</p><p></p><p>To be clear, this is a general question, not really a suggestion for code change.</p><p></p><p>[CODE]</p><p>private bool AddTvEncoderFilter(bool matchPinNames, bool mpeg2ProgramFilter, IFilterGraph2 _graphBuilder, Tuner _tuner, TvAudio _tvAudio, Crossbar _crossbar, Capture _capture)</p><p> {</p><p> Log.Log.WriteFile("analog: AddTvEncoderFilter - MatchPinNames: {0} - MPEG2ProgramFilter: {1}", matchPinNames, mpeg2ProgramFilter);</p><p> bool finished = false;</p><p> DsDevice[] hwDevices;</p><p> DsDevice[] swDevices;</p><p> DsDevice[] devices;</p><p> // first get all hw/sw encoder filters available on this system</p><p> try</p><p> {</p><p> swDevices = DsDevice.GetDevicesOfCat(FilterCategory.MediaEncoderCategory);</p><p> hwDevices = DsDevice.GetDevicesOfCat(AMKSEncoder);</p><p> devices = new DsDevice[hwDevices.Length + swDevices.Length];</p><p> int idx = 0;</p><p> for (int i = 0; i < hwDevices.Length; i++)</p><p> {</p><p> devices[idx] = hwDevices[i];</p><p> idx++;</p><p> }</p><p> for (int i = 0; i < swDevices.Length; i++)</p><p> {</p><p> devices[idx] = swDevices[i];</p><p> idx++;</p><p> }</p><p> </p><p> devices = DeviceSorter.Sort(devices, _tuner.TunerName, _tvAudio.TvAudioName, _crossbar.CrossBarName, _capture.VideoCaptureName, _capture.AudioCaptureName, _videoEncoderDevice, _audioEncoderDevice, _multiplexerDevice);</p><p>// tanstaafl: no changes beyond this point</p><p>[/CODE]</p></blockquote><p></p>
[QUOTE="tanstaafl, post: 410215, member: 62622"] I've experimented with changing [B]AddTvEncoderFilter[/B] in TvLibrary\Implementations\Analog\Components\Encoder.cs so that it searches for encoding filters of FilterCategory.MediaEncoderCategory as well as of AMKSEncoder category (relevant code snippet below). I use this to enable "MCE-style" software encoder filter (video/audio input , mpeg2 out in single filter) with my analog SW-encoding card, and it works well on my system. I'm aware you want to restrict the use of SW-encoding filters to those known to work, but I'm wondering if there's any particular reason SW/HW-filters are treated differently, i.e. HW-filters in AddTvEncoderFilter and SW-filters in Add(Audio||Video)Compressor? From the system's point of view, there shouldn't be any difference between the two types, should there? To be clear, this is a general question, not really a suggestion for code change. [CODE] private bool AddTvEncoderFilter(bool matchPinNames, bool mpeg2ProgramFilter, IFilterGraph2 _graphBuilder, Tuner _tuner, TvAudio _tvAudio, Crossbar _crossbar, Capture _capture) { Log.Log.WriteFile("analog: AddTvEncoderFilter - MatchPinNames: {0} - MPEG2ProgramFilter: {1}", matchPinNames, mpeg2ProgramFilter); bool finished = false; DsDevice[] hwDevices; DsDevice[] swDevices; DsDevice[] devices; // first get all hw/sw encoder filters available on this system try { swDevices = DsDevice.GetDevicesOfCat(FilterCategory.MediaEncoderCategory); hwDevices = DsDevice.GetDevicesOfCat(AMKSEncoder); devices = new DsDevice[hwDevices.Length + swDevices.Length]; int idx = 0; for (int i = 0; i < hwDevices.Length; i++) { devices[idx] = hwDevices[i]; idx++; } for (int i = 0; i < swDevices.Length; i++) { devices[idx] = swDevices[i]; idx++; } devices = DeviceSorter.Sort(devices, _tuner.TunerName, _tvAudio.TvAudioName, _crossbar.CrossBarName, _capture.VideoCaptureName, _capture.AudioCaptureName, _videoEncoderDevice, _audioEncoderDevice, _multiplexerDevice); // tanstaafl: no changes beyond this point [/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
adding MediaEncoderCategory filters as TvEncoderFilters?
Contact us
RSS
Top
Bottom