RE: webcam preview works, capture card is not working, black preview b
- From: Joe Domoto <joe_domoto@xxxxxxxxxxxx(spammenot)>
- Date: Fri, 23 Jun 2006 23:28:01 -0700
Which model Winnov Videum card are you using? What driver version?
--
------------------------------------------
Joe Domoto
donboco...multi-media made simple
www.donboco.com
"speedkills20@xxxxxxxxx" wrote:
I'm doing some final alpha testing for a free live broadcasting service.
that Vidiac.com will be offering soon.
We wrote an app that shows a preview and postview of the camera
connected to it and then broadcasts to a remote server.
Long story short, I run the program on my laptop, works perfect with
the built-in webcam. I get preview and postview, broadcasts fine, etc.
I run the program on my PC with a Winnov Videum capture card and I get
black for both preview and postview (it does broadcast correctly, just
black). If I run Windows Media Encoder on that PC I do see both preview
and postview.
What is WME doing that is different from the SDK in this regard? I save
the name of the video and audio source in the registry and I verified
on that PC that it is storing and retrieving the correct name.
Here's the relavent code that I'm using and as I said, it does work on
my laptop.
using WMEncoderLib;
using WMPREVIEWLib;
try
{
int port =
Convert.ToInt16(Application.UserAppDataRegistry.GetValue("Port_number"));
IWMEncSourceGroupCollection SrcGrpColl;
IWMEncSourceGroup SrcGrp;
SrcGrpColl = Encoder.SourceGroupCollection;
SrcGrp = SrcGrpColl.Add("SG_1");
IWMEncSource SrcAud;
IWMEncSource SrcVid;
IWMEncSource SrcScript;
SrcVid = SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_VIDEO);
SrcAud = SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_AUDIO);
SrcScript = SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_SCRIPT);
SrcScript.SetInput("", "UserScript", "");
SrcAud.SetInput(Convert.ToString(AudioSourceReg), "Device", "");
SrcVid.SetInput(Convert.ToString(VideoSourceReg), "Device", "");
SrcGrp.set_Profile("C:\\default.prx");
IWMEncDataViewCollection DVColl_preview =
SrcVid.PreviewCollection;
IWMEncDataViewCollection DVColl_postview =
SrcVid.PostviewCollection;
WMEncDataView Preview = new WMEncDataView();
WMEncDataView Postview = new WMEncDataView();
int lpreviewStream = DVColl_preview.Add(Preview);
int lpostviewStream = DVColl_postview.Add(Postview);
IWMEncBroadcast BrdCst = Encoder.Broadcast;
if (Application.UserAppDataRegistry.GetValue("Port_number") !=
null &
Convert.ToString(Application.UserAppDataRegistry.GetValue("Port_number")).Length
0){
BrdCst.set_PortNumber
(WMENC_BROADCAST_PROTOCOL.WMENC_PROTOCOL_HTTP, port);
}
else
{
BrdCst.set_PortNumber
(WMENC_BROADCAST_PROTOCOL.WMENC_PROTOCOL_HTTP, 8080);
}
Encoder.PrepareToEncode(true);
Encoder.Start();
Preview.SetViewProperties(lpreviewStream,
(int)Panel_Preview.Handle);
Preview.StartView (lpreviewStream);
Postview.SetViewProperties(lpostviewStream,
(int)Panel_Postview.Handle);
Postview.StartView (lpostviewStream);
- References:
- Prev by Date: RE: Remote desktop and WMEncoder 9
- Next by Date: Re: newbie: trying to learn about scripts in wme9
- Previous by thread: webcam preview works, capture card is not working, black preview but only with SDK
- Next by thread: Re: encoder error: not implemented 0x80004001
- Index(es):