Solved

Video Capture

Posted on 1998-10-30
5
436 Views
Last Modified: 2013-11-20
Hi,

I want to write a little capture program for my video board
(Intel SmartVideo Pro).
Can anyone tell me what MCI commands do I have to send?
All I want to get is a single frame.

Thanks in advance,

Bernardo.
0
Comment
Question by:bsw
  • 3
  • 2
5 Comments
 

Accepted Solution

by:
zqian103198 earned 200 total points
Comment Utility
Two easy ways to use standard Video Capture
MCI string :
pass the following strings to mciSendString      
"open overlay alias tester"  // open video overlay with // alias "tester"
"put tester client at 100 100 300 200"
"put tester destination at 0 0 300 200"
"put tester video at 100 100 300 200"
"window tester state show text my_tester_example" // show video //overlay window
"freeze tester" // stop for one frame
"close tester"
=======================================
or you can try vfw as
      hWndC = capCreateCaptureWindow (
      (LPSTR) "My Capture Window", // window name if pop-up
      WS_CHILD | WS_VISIBLE,       // window style
      0 , 0, 320, 240,              // window position and //dimensions
      m_hWnd,  
      0 );

      if ( ! capDriverConnect( hWndC , 0) )
      {
            MessageBox("Sorroy , not able connect video                 driver") ;
            return ;
      }
// .
// .
// .
      capGetStatus(hWndC, &CapStatus, sizeof (CAPSTATUS));
      ::SetWindowPos(hWndC, NULL, 0, 0, CapStatus.uiImageWidth,
            CapStatus.uiImageHeight, SWP_NOZORDER |         SWP_NOMOVE);

capDriverGetCaps(hWndC, &CapDrvCaps, sizeof (CAPDRIVERCAPS));
if (CapDrvCaps.fHasOverlay)
    capOverlay(hWndC, TRUE); // start video capture overlay
      
     capOverlay(hWndC, FALSE) ;  // stop at current frame
      
      capGrabFrame(hWndC) ; // grab one frame
// note :don't forget  vfw.h and vfw32.lib
0
 

Author Comment

by:bsw
Comment Utility
Do you know how I can use these functions from delphi without having to write a DLL in C?
Thank you very much for your help!
:-D

0
 

Expert Comment

by:zqian103198
Comment Utility
Hi, No need to write C DLL. Just call mciSendString or capCreateCaptureWindow etc. in your Delphi application. MCI and VFW are windows95's feature. You can find their support from Win32 SDK.
0
 

Author Comment

by:bsw
Comment Utility
Thanks again!
:-D

0
 

Expert Comment

by:zqian103198
Comment Utility
You're welcome!
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now