TV-Server Version: 1.0-SVN rev 21374
TvCardAnalog.SetupCaptureFormat() immediately returns if (_pinCapture == null).
Isn't this always the case with software encoding cards (needing AddXXXCompressor to get _pinCapture)?
Suggestion: test against _filterCapture instead.
This way, analog software encoding cards get set up with correct PAL format just like hardware cards.
Unless this breaks anything else, this could help some people until mistedD gets time to implement his improvements for analog cards.
Have done a quick test on my Asus MyCinema 7131 Hybrid (which defaults to 320X?? resolution), seems to work.
Current code:
Suggested change
TvCardAnalog.SetupCaptureFormat() immediately returns if (_pinCapture == null).
Isn't this always the case with software encoding cards (needing AddXXXCompressor to get _pinCapture)?
Suggestion: test against _filterCapture instead.
This way, analog software encoding cards get set up with correct PAL format just like hardware cards.
Unless this breaks anything else, this could help some people until mistedD gets time to implement his improvements for analog cards.
Have done a quick test on my Asus MyCinema 7131 Hybrid (which defaults to 320X?? resolution), seems to work.
Current code:
Code:
private void SetupCaptureFormat()
{
if (_pinCapture == null)
return;
Log.Log.Info("VideoCaptureDevice:get Video stream control interface (IAMStreamConfig)");
DsGuid cat = new DsGuid(PinCategory.Capture);
Guid iid = typeof(IAMStreamConfig).GUID;
object o;
int hr = _capBuilder.FindInterface(cat, null, _filterCapture, iid, out o);
if (hr == 0)
{
_interfaceStreamConfigVideoCapture = o as IAMStreamConfig;
if (_interfaceStreamConfigVideoCapture != null)
{
SetFrameRate(25d);
SetFrameSize(new Size(720, 576));
Size size = GetFrameSize();
if (size.Width != 720 || size.Height != 576)
{
SetFrameSize(new Size(640, 480));
}
}
}
return;
}
Suggested change
Code:
private void SetupCaptureFormat()
{
if (_filterCapture == null) // tanstaafl: was _pinCapture, change to allow setup of SW encoding cards.
return;
Log.Log.Info("VideoCaptureDevice:get Video stream control interface (IAMStreamConfig)");
DsGuid cat = new DsGuid(PinCategory.Capture);
Guid iid = typeof(IAMStreamConfig).GUID;
object o;
int hr = _capBuilder.FindInterface(cat, null, _filterCapture, iid, out o);
if (hr == 0)
{
_interfaceStreamConfigVideoCapture = o as IAMStreamConfig;
if (_interfaceStreamConfigVideoCapture != null)
{
SetFrameRate(25d);
SetFrameSize(new Size(720, 576));
Size size = GetFrameSize();
if (size.Width != 720 || size.Height != 576)
{
SetFrameSize(new Size(640, 480));
}
}
}
return;
}