Cannot enumerate video sources on osprey 100 capture card
- From: "jfz" <fortin_jon@xxxxxxxxxxx>
- Date: 13 Oct 2006 13:36:48 -0700
Context:
A C# application developped using the Windows Media SDK with the
purpose of controlling an encoder trough a web browser. The application
is functionnal to the point where it can select a video and audio
capture device, apply a profile from the profile collection, and
start/stop the encoder. It can also set the autoarchive property and
save a copy of the stream in a WMV file on the encoder's hard drive.
Problem:
Osprey cards have multiple video inputs, tested with both Osprey 100
and 300 models. I need to use the SVideo input, but the card defaults
to Composite 1.
Using this code from the Windows Media SDK doc on MSDN.
// Create a source group and add the sources.
IWMEncSourceGroupCollection SrcGrpColl;
IWMEncSourceGroup SrcGrp;
IWMEncSource SrcAud;
IWMEncVideoSource2 SrcVid;
SrcGrpColl = oWMEnc.SourceGroupCollection;
SrcGrp = SrcGrpColl.Add("SG_1");
SrcAud = SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_AUDIO);
SrcVid =
(IWMEncVideoSource2)SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_VIDEO);
SrcAud.SetInput("Default_Audio_Device", "Device", "");
SrcVid.SetInput("o100vc.dll - Osprey Video Capture 1", "Device", "");
// Configure the output and profile for the encoding session.
// Initialize the encoding process.
oWMEnc.PrepareToEncode(true);
// Enumerate the type of inputs supported by the TV-tuner capture card.
// Find and select the Video Tuner input.
IWMEncInputCollection InputColl;
InputColl = SrcVid.EnumerateInputs();
for (short x = 0; x < InputColl.Count; x++)
{
if (InputColl.Item(x) == "SVideo")
{
SrcVid.Input = x;
break;
}
}
The SrcVid object is created, but the SrcVid.EnumerateInputs() call
returns an Undefined Error exception. Trying to hardcode the
ScrVid.Input to an index, logically, 0 trough 3 since the card has 4
inputs, returns a Not Implemented exception.
Any input (pun intended) would be apreciated.
.
- Prev by Date: Re: Get keyframe-count or keyframe distance
- Next by Date: sdk for php ?
- Previous by thread: Get keyframe-count or keyframe distance
- Next by thread: sdk for php ?
- Index(es):
Relevant Pages
|