Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Video capturing

Video capturing

Scheduled Pinned Locked Moved C / C++ / MFC
helpdelphidebuggingtutorialquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jump_Around
    wrote on last edited by
    #1

    I have a problem with video capturing. When I call create function everything goes fine, it means capDriver is loaded succesfully, setting callback function goes fine.... . What i see on the cap window is just the first image which has been grabed. The problem is that the call back function is not called. How to change the code if I want to use frame callback function? Please help typedef LRESULT (CALLBACK *FRAMECALLBACK)(HWND , LPVIDEOHDR); LRESULT PASCAL _grabber_CallbackProc(HWND hWnd, LPVIDEOHDR lpVHdr); BOOL CCaptureVideo::Create(DWORD dwStyle, const RECT& rect, HWND pParentWnd) { hCaptureWnd=capCreateCaptureWindow("AviCap_Basic", dwStyle, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, pParentWnd, AVICAP_WINDOW_ID); if(!hCaptureWnd) { TRACE("CAviCap Window creation failed\n"); //iLastError=CAP_WINCREATION_FAILED; return FALSE; } if( capDriverConnect(hCaptureWnd, DEFAULT_CAPTURE_DRIVER) ) { AfxMessageBox("cap Driver connect ok"); } if (capSetCallbackOnFrame(hCaptureWnd, _grabber_CallbackProc) ) { AfxMessageBox("Callback ok"); } if( capPreview(hCaptureWnd, FALSE)) { AfxMessageBox("Preview ok"); } return TRUE; } LRESULT PASCAL _grabber_CallbackProc(HWND hWnd, LPVIDEOHDR lpVHdr) { AfxMessageBox("grab"); return 0; }

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups