Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Video Capture

Posted on 1998-10-30
5
Medium Priority
?
472 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 800 total points
ID: 1324060
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
ID: 1324061
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
ID: 1324062
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
ID: 1324063
Thanks again!
:-D

0
 

Expert Comment

by:zqian103198
ID: 1324064
You're welcome!
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

916 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