Article View: borland.public.cppbuilder.multimedia
Article #1010Re: Video Capture
From: mafi
Date: Fri, 03 May 2002 12:43
Date: Fri, 03 May 2002 12:43
51 lines
2416 bytes
2416 bytes
Hi ! You need to use the TPicture::RegisterFileFormat function to enable using JPEG. Then use a TJPEGImage instance in a TImage. Copy your BMP picture in the TImage and save it as JPEG with the TJPEGImage class. It should work :) "Corey Murtagh" <no_uce_emonk@slingshot.co.nz> a οΏ½crit dans le message news: 3cc89f18_1@dnews... > 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:
<3cd285e2$1_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3cc8807a$1_1@dnews> <3cc89f18_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10d0fc,4437681415401718 X-Google-Attributes: gid10d0fc,public X-Google-ArrivalTime: 2002-05-03 06:10:55 PST Reply-To: "mafi" <mafi_web@lycos.fr> From: "mafi" <mafi_web@lycos.fr> Newsgroups: borland.public.cppbuilder.multimedia References: <3cc8807a$1_1@dnews> <3cc89f18_1@dnews> Subject: Re: Video Capture Date: Fri, 3 May 2002 14:43:15 +0200 Lines: 53 Organization: gns X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 80.8.18.90 Message-ID: <3cd285e2$1_1@dnews> X-Trace: dnews 1020429794 80.8.18.90 (3 May 2002 05:43:14 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!dnews