Article View: borland.public.cppbuilder.nativeapi
Article #2322Re: Multi-Thread HDC and video display
From: Jonathan Benedicto
Date: Mon, 12 Mar 2007 20:15
Date: Mon, 12 Mar 2007 20:15
31 lines
2404 bytes
2404 bytes
Robert G. Hoover wrote: > Sorry this had morphed into a video app discussion.... No problem. I've done work with multi-threading video applications, so I'm somewhat familiar with it :-) > I commented out the Display() routine and there is no noticeable lag. :) > But, > now how do I display my video without using > SendDIBitsToDevice(ShellForm->Handle)? I use GetDC to get the DC of the > window > instead of using ShellForm->Canvas->Handle. Can I get the handle to the > window > in such a way that gets around the TApplication like this? This Display() > function is just for quick splashing of video, meant to be as fast as > possible. > That's why I'm calling low-level Win32 API call SendDIBitsToDevice instead > of > using something like ShellForm->Canvas->Draw(0, 0, MyTBitmap). Should I be > doing > this instead? SetDIBitsToDevice is not a thread-safe function. I'd suggest looking up the DrawDib functions for simplicity because you'd need to convert your DIB to a DDB before blitting it to the screen. The VCL draw functions aren't thread-safe either. HTH Jon
Technical Details
Message-ID:
<45f5b4dc$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45f57403@newsgroups.borland.com> <45f59433$1@newsgroups.borland.com> <45f5973e$1@newsgroups.borland.com> <45f598bf$1@newsgroups.borland.com> <45f59c41$1@newsgroups.borland.com> <45f59e8e$1@newsgroups.borland.com> <45f5aca4@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,411b13b57e2ea81a X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Jonathan Benedicto" <invalid@nobody.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <45f57403@newsgroups.borland.com> <45f59433$1@newsgroups.borland.com> <45f5973e$1@newsgroups.borland.com> <45f598bf$1@newsgroups.borland.com> <45f59c41$1@newsgroups.borland.com> <45f59e8e$1@newsgroups.borland.com> <45f5aca4@newsgroups.borland.com> In-Reply-To: <45f5aca4@newsgroups.borland.com> Subject: Re: Multi-Thread HDC and video display Date: Mon, 12 Mar 2007 16:15:57 -0400 Lines: 32 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6000.16386 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16386 NNTP-Posting-Host: 74.115.18.89 Message-ID: <45f5b4dc$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1173730524 74.115.18.89 (12 Mar 2007 13:15:24 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail