I've experimented with changing AddTvEncoderFilter 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.
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