New Class TWebCam in FWH 10.9

New Class TWebCam in FWH 10.9

Postby Antonio Linares » Mon Sep 27, 2010 8:22 am

Code: Select all  Expand view
//-------------- --------------------------------------------------------------//
  #include "Fivewin.ch"  
  #include "WebCam.ch"
//----------------------------------------------------------------------------//
  Function Main ()
   Local oWnd, oMenu, oWebCam

   MENU oMenu  2007
      MENUITEM "&Opções"
      MENU
         MENUITEM "Ligar"               ACTION oWebCam:Initialize();
            WHEN !oWebCam:isConnected
         MENUITEM "Desligar"            ACTION oWebCam:Finalize();
               WHEN oWebCam:isConnected
         SEPARATOR
         MENUITEM "Salvar Imagem"       ACTION oWebCam:SaveFile();
               WHEN oWebCam:isConnected
         SEPARATOR
         MENUITEM "Controle de Video"   ACTION oWebCam:VideoControl();
            WHEN oWebCam:isConnected
         MENUITEM "Formatação de Video" ACTION oWebCam:Configuration();
            WHEN oWebCam:isConnected
         SEPARATOR
         MENUITEM "Sair"                ACTION oWnd:End()
      ENDMENU
      MENUITEM "&Option"
      MENU
         MENUITEM "Start"               ACTION oWebCam:Initialize();
            WHEN !oWebCam:isConnected
         MENUITEM "Stop"                ACTION oWebCam:Finalize();
               WHEN oWebCam:isConnected
         SEPARATOR
         MENUITEM "Save Picture"        ACTION oWebCam:SaveFile();
            WHEN oWebCam:isConnected
         SEPARATOR
         MENUITEM "Video Control"       ACTION oWebCam:VideoControl();
            WHEN oWebCam:isConnected
         MENUITEM "Video Format"        ACTION oWebCam:VideoFormat();
            WHEN oWebCam:isConnected
         SEPARATOR
         MENUITEM "Exit"                ACTION oWnd:End()
      ENDMENU
   ENDMENU
   
   DEFINE WINDOW oWnd TITLE "Sample Class TWebCam" MENU oMenu PIXEL
   DEFINE WEBCAM oWebCam FROM 0,0 TO 640,480 OF oWnd

   SET MESSAGE OF oWnd TO oWebCam:cName+Space(6)+oWebCam:cVersion 2007
   ACTIVATE window oWnd Maximized

   oWebCam:Destroy()

  Return Nil
//----------------------------------------------------------------------------//
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New Class TWebCam in FWH 10.9

Postby Silvio » Mon Sep 27, 2010 11:29 am

Antonio is supported th epossibility to link many webcam ?

sample:

I have the net into all house and I have 4 webcam , each cam is on a net port

1 Room
2 Bathroom
3 Garden
4 Office

it is possibil ecreate a dialog with 4 videobox to control all ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: New Class TWebCam in FWH 10.9

Postby Horizon » Mon Sep 27, 2010 11:37 am

Hi,

Code: Select all  Expand view

Type: C >>>xhb.exe -o"test.c" -m -n -p -q -gc0   -I"D:\fwh\include" -I"D:\xHB\include" -I"D:\xHB\include\w32" "test.prg"<<<

xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6726)
Copyright 1999-2010, http://www.xharbour.org http://www.harbour-project.org/
Generating object output to 'test.obj'...

Type: C >>>xlink.exe -NOEXPOBJ -MAP -FORCE:MULTIPLE -NOIMPLIB -subsystem:windows -UNMANGLE -LIBPATH:"D:\fwh\lib" -LIBPATH:"D:\xHB\lib" -LIBPATH:"D:\xHB\c_lib" -LIBPATH:"D:\xHB\c_lib\win"  "test.obj" "FiveHCM.lib" "FiveHMX.lib" "OptG.lib" "xhb.lib" "dbf.lib" "nsx.lib" "ntx.lib" "cdx.lib" "rmdbfcdx.lib" "ct3comm.lib" crt.lib kernel32.lib user32.lib winspool.lib ole32.lib oleaut32.lib odbc32.lib odbccp32.lib uuid.lib wsock32.lib ws2_32.lib wininet.lib advapi32.lib shlwapi.lib msimg32.lib mpr.lib OleDlg.lib version.lib comctl32.lib comdlg32.lib gdi32.lib shell32.lib winmm.lib lz32.lib Netapi32.lib -out:"test.exe"<<<

Creating object: test.EXP

Creating library: test.LIB

xLINK: error: Unresolved external symbol '_capCreateCaptureWindowA referenced from Fivehmx.lib(TWEBCAM.obj)'.

xLINK: error: Unresolved external symbol '_capGetDriverDescriptionA referenced from Fivehmx.lib(TWEBCAM.obj)'.

xLINK: error: Unresolved external symbol '??2@YAPAXI@Z referenced from Fivehcm.lib(ACTX.obj)'.

xLINK: error: Unresolved external symbol '??3@YAXPAX@Z referenced from Fivehcm.lib(ACTX.obj)'.

xLINK: fatal error: 4 unresolved external(s).


Type: C >>>Couldn't build: test.exe<<<


Regards,
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: New Class TWebCam in FWH 10.9

Postby Antonio Linares » Mon Sep 27, 2010 1:08 pm

Hakan,

You have to link avicap32.lib

If your compiler does not provide it, then you have to create it yourself from avicap32.dll
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New Class TWebCam in FWH 10.9

Postby Horizon » Mon Sep 27, 2010 2:11 pm

ok. Thanks
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 107 guests