2

I am looking for a way to use my webcam in delphi, primary for grabbing a picture, by some reason I cannot use TWAIN drivers.

Plastkort
  • 957
  • 1
  • 26
  • 40
  • See [this question on SO](https://stackoverflow.com/questions/3454688/getting-a-snapshot-from-a-webcam-with-delphi) and [my answer with some working code](https://stackoverflow.com/questions/3454688/getting-a-snapshot-from-a-webcam-with-delphi/3455652#3455652). See if it works for you... – Francesca Sep 16 '10 at 23:06

2 Answers2

4

Try these resources

DSPack

DSPack is a set of Components and class to write Multimedia Applications using MS Direct Show and DirectX technologies. DSPack 2.3 is designed to work with DirectX 9 on Win9X, ME, 2000, and Windows XP operating systems using Delphi 5,6,7 and BCB6.

or

capCreateCaptureWindow function (sample code)

The capCreateCaptureWindow function creates a capture window.

Syntax C++

HWND VFWAPI capCreateCaptureWindow(
  LPCTSTR lpszWindowName,
  DWORD dwStyle,
  int x,
  int y,
  int nWidth,
  int nHeight,
  HWND hWnd,
  int nID
);
Community
  • 1
  • 1
Trinidad
  • 2,756
  • 2
  • 25
  • 43
3

I was typing this in a comment to Trinidad's answer, but the message became to long.

2 years ago I've tried all of the Delphi solutions that I could find to grab video.

My requirements were:

  • Needs to be free (as in beer), (or very cheap + easy payment method)
  • Needs to be stable
  • Needs to be easy to use
  • Needs to have sufficient example code
  • Needs to work in Delphi 2009/2010

To tell the truth, the overall results were disappointing. None of the solutions met all of the above the requirements.

DsPack scored the best on all points, but I could only make it work in Delphi7, until I found an "unofficial" port on this page: http://www.songbeamer.com/delphi/

Nowadays it works like a charm, in Delphi 2010.

I'm a very happy user, so let me take this opportunity to thank the creators of dsPack and Sebastian Zierer who ported the code to the modern Delphi's!

Wouter van Nifterick
  • 23,603
  • 7
  • 78
  • 122