PDA

View Full Version : Video over Video



Wolfgang P.
May 28, 2006, 23:34:59
Dear Support,

I am evaluatuing your control and this looks very promising.

Using VB6 under Windows XP I would like to do the following:

I have two devices delivering videostreams and I want to overlay one, smaller videostream over the main stream to be able to in the end, once an event has halted both streams, save the last picture with the combined frames.

I had considered using the imageavailable event of the smaller stream to grab the frame of the smaller video and then place it onto the overlay of the main video. That would have to be done such that this overlay would be visible on the screen but also on the saved image.

Is that the best way to do it?

Or would it be better having both streams frozen seperately and THEN combine the bitmaps to display and save them?

Regards and thanks in advance

Wolfgang

Stefan Geissler
May 29, 2006, 15:29:47
Wolfgang,

Your first approach is correct. In the ImageAvailabe event sub of the smaller stream you can get a pointer to the image data with the ImageBuffer.ImageDataPtr property. This long pointer value can be passed to the GDI StretchDIBits function, that "blits" (copies) the image into an HDC. This HDC can be retrieved from the OverlayBitmap of the second stream with ICImagingControl1.Overlay.GetDC().
You may have a look to
http://www.imagingcontrol.com/ic/docs/html/activex/meth_descOverlayBitmap_GetDC.htm
In the sample the BitBlt() GDI function is used. You would need the StretchDIBits() funktion. The OverlayBitmap is copied on the frames directly, so if you would save an image from the second stream, the image of the Ovleray would be saved inside visible of it.

wapaw
May 31, 2006, 14:20:35
Stefan,

thank you for the information. It worked out nicely. I still use the BitBlt function because the smaller stream does not have to be scaled to match the larger stream.

I purchased the Control today after having evaluated it during the last week. I'd like to mention that your support was the final element in making the decision to buy this SDK. I've been looking for something like this for several years.

Regards

Wolfgang

Stefan Geissler
May 31, 2006, 14:36:05
Wolfgang.

Thank you for your feedback! :-)

sgwood
March 11, 2008, 11:16:25
Hello Support,

the above mentioned sample code apears to be not active:
http://www.imagingcontrol.com/ic/docs/html/activex/meth_descOverlayBitmap_GetDC.htm

Could you please repost the above example.

many thanks

acanicio
March 11, 2008, 11:22:37
Hi,

Try this link instead :

http://www.imagingcontrol.com/support/documentation/activex/meth_descOverlayBitmap_GetDC.htm


Cheers
Axel

Stefan Geissler
March 11, 2008, 12:30:25
Parts of the server are currently down. We are working on this issue.