Jump to content

Recommended Posts

Posted

Viva alguem me sabe dizer como é que atravez do delphi posso ir buscar a imagem da webcam??

Um Abraço

SIGNIFICADOS: WWW: Wait,wait,wait... HTML: Hoje Ta Mais Lento.KEYBOARD: Dispositivo usado para entrada de erros no Computador.

  • 3 months later...
  • 1 year later...
Posted

Boas Pessoal...

Ja testei este componente, e consegui po-lo a funcionar sem problemas...

Agora surgiume foi outro problema, a gravação é feita, o tamanha do video é de 1GB, mas quando o coloco a reproduzir seja no media player, seja no vlc player ou no bsplayer nao reproduz, alguem tem alguma ideia do que possa ser???

Melhor Jogo Online De Sempre....::SYSTEM EMPIRES::.Para quando a nova versao???

  • 10 months later...
Posted

AMIGO SE NAO QUISERES USAR COMPONENTES TENS AQUI UMA ALTERNATIVA

var
  HwebCam: HWND;

  function  capCreateCaptureWindowA(lpszWindowName: pchar; dwStyle: dword; x, y, nWidth, nHeight: word; ParentWin: dword; nId: word): dword; stdcall external 'avicap32.dll';

implementation

Function CapturarWebCam(DestinoCapBMP:string) : Boolean;
const
   WM_WEBCAM = $400;
   WM_CONECTAR_DRIVER_WEBCAM    = WM_WEBCAM + $a;
   WM_DESCONECTAR_DRIVER_WEBCAM = WM_WEBCAM + $b;
   WM_GUARDAR_CAPTURA = WM_WEBCAM + 25;
   WM_FECHAR_WEBCAM = $0010;
begin
if HwebCam = 0 then
  begin                                            //WS_CHILD   //WS_VISIBLE
  HwebCam := capCreateCaptureWindowA('CaptureWindow', $40000000 and $10000000, 0, 0, 0, 0, GetDesktopWindow, 0);
    if SendMessage(HwebCam, WM_CONECTAR_DRIVER_WEBCAM, 0, 0) <> 1 then
    begin
      HwebCam   := 0;
      Result        := False;
    end else begin
      SendMessage(HwebCam, WM_GUARDAR_CAPTURA, wparam(0), lparam(PChar(DestinoCapBMP)));
      SendMessage(HwebCam, WM_FECHAR_WEBCAM, 0, 0);
      SendMessage(HwebCam, WM_FECHAR_WEBCAM, 0, 0);
      HwebCam   := 0;
      Result        := True;
    end;
  end else
  Result := False;
end;

Procedure Capturar;
Const
Captura = 'C:\Users\Joel\Desktop\WebCam Captura.bmp';
begin
if not CapturarWebCam(Captura) then
MessageBox(0,Pchar('Não foi possivél capturar a webcam'#10''),'Erro',16);
end;

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.