Skip to main content

How To Accessing Multi Webcamera (Multi Webcamera Accessing) In Delphi Using DsPack


The DsPack component can be used to access multi web camera (Multi Web camera accessing). In this example, the camera accessing program is conducted toward 3 different brand of camera, in order that there is no conflict or mistake occur in the program reading so that the result of webcam visualization which is appeared is not appropriate with the expectation because of mistaken in choosing the camera variety because same name factor.
P.S.: because of limited camera, we just use 1 camera but basically Multi Webcam Access program (Multi Webcam Accessing) in Borland Delphi 7 using DsPack has been tested and has good result.
Enter the component as follows:



No
Component Name Property Value
1 GroupBox1 Caption Camera
2 GroupBox2 Caption Camera
3 GroupBox3 Caption Camera
4 ComboBox1 Text -
5 ComboBox2 Text -
6 ComboBox3 Text -
7 Filtergraph1 Mode gmCapture
8 Filtergraph2 Mode gmCapture
9 Filtergraph3 Mode gmCapture
10 Filter 1 Filtergraph Filtergraph1
11 Filter 2 Filtergraph Filtergraph2
12 Filter 3 Filtergraph Filtergraph3
13 VideoWindow1 Filtergraph Filtergraph1
14 VideoWindow2 Filtergraph Filtergraph2
15 VideoWindow3 Filtergraph Filtergraph3

The image of the design program is as follows:




Picture1: Visualization program design Multi Webcam Accessing (Multi Webcam Accessing) in Borland Delphi 7 using DsPack

Before type the source code, declare this following global variable



Next, please type the source code:

No Component Name Event Source Code
1 Form1 OnCreate var

i : integer;

begin

CapEnum:= TSysDevEnum.Create(CLSID_VideoInputDeviceCategory);

for i := 0 to CapEnum.CountFilters - 1 do

begin

combobox1.Items.Add(CapEnum.Filters[i].FriendlyName);

combobox2.Items.Add(CapEnum.Filters[i].FriendlyName);

combobox3.Items.Add(CapEnum.Filters[i].FriendlyName);

end;
2 Form1 OnCloseQuery capenum.Free;

FilterGraph1.Stop;

FilterGraph1.ClearGraph;

FilterGraph1.Active := false;

FilterGraph2.Stop;

filtergraph2.ClearGraph;

filtergraph2.Active:=false;

FilterGraph3.Stop;

filtergraph3.ClearGraph;

filtergraph3.Active:=false;
3 ComboBox1 OnChange   FilterGraph1.ClearGraph;

FilterGraph1.Active := false;

Filter1.BaseFilter.Moniker := CapEnum.GetMoniker(combobox1.ItemIndex);

FilterGraph1.Active := true;

with FilterGraph1 as ICaptureGraphBuilder2 do

Renderstream(@PIN_CATEGORY_PREVIEW, nil, Filter1 as IBaseFilter,nil, VideoWindow1 as IbaseFilter);

FilterGraph1.Play;
4 ComboBox2 OnChange   FilterGraph2.ClearGraph;

FilterGraph2.Active := false;

Filter2.BaseFilter.Moniker := CapEnum.GetMoniker(combobox2.ItemIndex);

FilterGraph2.Active := true;

with FilterGraph2 as ICaptureGraphBuilder2 do

Renderstream(@PIN_CATEGORY_PREVIEW, nil, Filter2 as IBaseFilter,nil, VideoWindow2 as IbaseFilter);

FilterGraph2.Play;
5 ComboBox3 OnChange FilterGraph3.ClearGraph;

FilterGraph3.Active := false;

Filter3.BaseFilter.Moniker := CapEnum.GetMoniker(combobox3.ItemIndex);

FilterGraph3.Active := true;

with FilterGraph3 as ICaptureGraphBuilder2 do

Renderstream(@PIN_CATEGORY_PREVIEW, nil, Filter3 as IBaseFilter,nil, VideoWindow3 as IbaseFilter);

FilterGraph3.Play



This Application is limited in webcam presenter,
next can be developed into picture capturer (photo/picture capturer), also video recorder (video capture)

Here is the result using 1 webcamera.
 


Here is the result using 3 webcamera.



The picture above, is created by Mr.Dayat Kurniawan ( http://hanundany.wordpress.com )

 I hope this article can give benefit to the visitors, readers, developer and me. Thanks for visiting and availability for sharing this article by pressing 
Share this on Facebook
or just press like button under this posting

Popular posts from this blog

Login Form Delphi by Connecting to Ms Access Database.

this the step by step  to making application :

Login Form Delphi by Connecting Ms Access Database.

In making/ building application in Delphi, login Form is an important to protect application so that cannot be open by irresponsible person. This login Form is connected with database so that able to keep a lot of username data and password. Before make the application, please create a database as the picture below:
Picture :Login  form Delphi database Microsoft Access
Save the database in the folder which use to save the application


Next step is create the application

Enter the component and the source code as follows.


No Component NameProperties Value1Label1CaptionUsername2Label2CaptionPassword3Edit1Text -4Edit2Text -5Button1CaptionLogin6Adoconnection1--7AdoQuery1ConnectionADOConnection1

Arrange the component as the picture below:


Figure. Login Form Delphi design form



 Create new form



Form properties can be check in the table below
No Component NameProperties Value1Form1CaptionSuccess…

Step by step Accessing SMS With Delphi: Sending SMS Using Borland Delphi 7 Exploit Comport Component (Siemens))

In this example, will present the way how making SMS delivery program with Delphi, basically, data in data communication series between Delphi and mobile phone happen in Format Protocol Data Unit (PDU). The destination number of sending Message and message that will be sent through Delphi program that is made have to be changed into PDU Form first, next is the data will be sent through serial port to mobile phone. To make the send SMS Application , please enter the following component to Form 1.

No Component NameProperties ValueButton1CaptionConnectButton2CaptionDisConnectButton3CaptionConvert to PDUButton4CaptionSend to HPButton5CaptionClearButton6CaptionStart Send SMSButton7CaptionSet PortEdit1Text-Edit2Text<Type The SMS here>Edit3Text-Label1Caption1) Destination Number :Label2Caption2Label3CaptionPDU lengthLabel4CaptionLabel lengthComLed1--Memo1--Memo2--Comport1--Arrange the Component  in such away so that the visualization program is as follows:


Then type the follow…

The Example Using Chart In Borland Delphi 7

The Example Using Chart In Borland Delphi 7




In this writing will discuss about how to use the chart in Delphi 7. In the example that is made by using Delphi 7, chart will appear 2 data in the form of incremental data number, the first data named data 1 and the second data named data 2. Data 1 is incremental data 1 that is begun from 0 until 10; while data 2 is same. Yet, in the beginning condition of data 1 start from 0 while data 2 start from 1.


To make application as the explanation above, please enter the components in the table below into design form.


NoComponentPropertiesValueNote1Form1CaptionThe Chart of Data on Delphi 72GroupBox1CaptionThe Chart of Data on Delphi 73Label1CaptionData 14Label2CaptionData 25Edit1Text06Edit2Text07Button1CaptionShow to Chart8Button2CaptionClose9Timer1EnabledFalse10Chart--Check the NoteNote:

Double click on chart component, set the property of chart as below:


Click on  Add.. Button

Then the following chart gallery will be shown:



Choose the…