🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.multimedia
Article #1003

Re: Video Capture

#1003
From: Corey Murtagh
Date: Fri, 26 Apr 2002 00:28
34 lines
1951 bytes
Hi Mike,

"Mike Browne" <mfbrowne@netcom.ca> wrote in message
news:3cc8807a$1_1@dnews...
> Can anyone point me to some  sample code that would show me how to capture
a
> frame from a video camera in jpg format. I have been using the
> capFileSaveDIB but I would like to save in a jpg format instead of a BMP
> format.
>
> Thanks for any help

Sorry, no sample code.  But...

You can get the video driver to send frames to a callback function using
capSetCallbackOnFrame.  The callback function is defined as:

LRESULT CALLBACK capVideoStreamCallback(
  HWND hWnd,
  LPVIDEOHDR lpVHdr
);

All the data you should need on the frame is in the VIDEOHDR struct,
including whether it's a keyframe, the locked memory area it's in, how big,
etc.  From memory (it's been a while) the frame data is in whatever capture
format your camera uses, so you might have to decode that back to bitmap
before you encode to jpeg.

Let us know how you get on anyway.

--
Corey Murtagh
The Electric Monk
"Quidquid latine dictum sit, altum viditur."
Technical Details
Message-ID: <3cc89f18_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!sunqbc.risq.qc.ca!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews
References: <3cc8807a$1_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d0fc,4437681415401718
X-Google-Attributes: gid10d0fc,public
X-Google-ArrivalTime: 2002-04-25 17:31:29 PST
From: "Corey Murtagh" <no_uce_emonk@slingshot.co.nz>
Newsgroups: borland.public.cppbuilder.multimedia
References: <3cc8807a$1_1@dnews>
Subject: Re: Video Capture
Date: Fri, 26 Apr 2002 12:28:51 +1200
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
NNTP-Posting-Host: 202.180.79.214
Message-ID: <3cc89f18_1@dnews>
X-Trace: dnews 1019780888 202.180.79.214 (25 Apr 2002 17:28:08 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!sunqbc.risq.qc.ca!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews