BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Initializing 2 USB camera

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Multimedia
View previous topic :: View next topic  
Author Message
CCorax
Guest





PostPosted: Sat Mar 31, 2007 4:42 am    Post subject: Initializing 2 USB camera Reply with quote



I have got 2 identical USB camera.When I connect to them the 2nd
allways pops up the videosource window.I have to choose manually the
2nd videosource.How can I eliminate it?

var
F_main: TF_main;
capwnd : array of hwnd;
video: array of TF_child;


procedure TF_main.Prepare1Click(Sender: TObject);
var
Index : integer;
numDrivers : Integer;

begin
numDrivers:=2;
SetLength(capwnd, numDrivers);
SetLength(video, numDrivers);
For Index := 0 To numDrivers-1 do Begin
video[index] := TF_Child.Create(nil); //MDI Child form will show
the video
video[index].ClientWidth:=320;
video[index].ClientHeight:=200;
capwnd[index] := capCreateCaptureWindow('Avicap',ws_Visible or
ws_Child,0,0,video[index].ClientWidth,video[index].ClientHeight,
video[index].Handle ,126);
if SendMessage (CapWnd[index], WM_CAP_DRIVER_CONNECT, 0, 0) <> 0
then video[index].Caption:='OK'
else video[index].Caption:='NOK';
capPreviewRate(CapWnd[index], 66);// '15 FPS 66 default
capPreview(CapWnd[index],true);
SendMessage(CapWnd[index], WM_CAP_SET_Preview, 1, 0);
end;
end;
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.