|
To do this, you will need to write a custom DirectShow filter that modifies the video stream as it passes through your filter.
First, you will need the latest Platform SDK. Second, you will have to implement what Microsoft calls a "transform in place" filter. Finally, you will have to create a filter graph for the media you want to play, and insert your filter into the graph, which is a non-trivial task.
I think this sounds like an article waiting to be written.
--
Paul
"I drank... WHAT?"
|
|
|
|
|
There is a nice sample in the DirectX 8 sample that show you how to do that. Also, there is a graph builder tool that ship with DirectX that allow you to test and connect the pins between the input, the output and your different filter.
It sounds complex, but I've done one and it took me no time to get it done.
Pat
Where there is a will, there is a way!
|
|
|
|
|
Hi,
I have used the CFrameGrabber Class to capture images from a framegrabber board, but I don't manage to read correctly the information inside the DIB structure to show the image on the screen.
The resolution per pixel is 16 bit, but I don't know the position of the RGB scores.
Could you help me?
Thanks tiziano
Tiziano
|
|
|
|
|
Hi,
There should be 3 palette entries for 16 bit mode, marking the bitmasks for each R,G,B. If not, the default seems to be...
Taken from DIBSectionLite.cpp:
//DCR 4/02/01 If you are dealing with a 16bpp bitmap in PocketPC, you must
// set the 3 DWORD color mask. This mask will be applied to a 16bit value to find the
// RGB components. Blue is lowest 5 bits, then Green, then Red.
dw[0] = 31744; //RED bitmask Bits: 0 11111 00000 00000
dw[1] = 992; //GREEN bitmask Bits 00000 11111 00000
dw[2] = 31; //BLUE bitmask Bits 00000 00000 11111
|
|
|
|
|
I want to capture screen and the operation on it without capture device, such as mouse moving. And save it to a video file. How can I do?
|
|
|
|
|
I use (USB)capture device,while i run AviCapTest Demo
in MSVC 6.0. the driver testing takes a long time and after
that no video was captured. ?
|
|
|
|
|
It's appened also to me, and I don't know why.
Tiziano
|
|
|
|
|
The same for me. Snif....
|
|
|
|
|
Try to download demo project from
http://www.codeguru.com/multimedia/AviCap.shtml
|
|
|
|
|
hello
i have a complex problem i wanna get data from capture window but from a particular region is it possible or some specified area .plz send if it is possible.i am in great need
thanx(bobbies_2001@yahoo.com)
|
|
|
|
|
i was think of saving the bmp in uncompress format so that i could reformat with external image proceessor. can some one please help me turn the compression off?
i mean from Bitmapex class which lines to take or comment out?
thanks plenty
|
|
|
|
|
Here you have the complete information for programming an BMP interface which don't use compression or use.
This help is from a BASIC program
//The quotes are for comments as keyword REM
//Beginning of extract of the file
'bmpinfosize - Is the size of the information header for the bitmap.
' Different bitmap versions have variations in filetypes.
' 40 is a standard windows 3.1 bitmap.
' 12 is for OS/2 bitmaps
'The next routine reads in the appropriate headers and colour tables.
'nbits is the number of bits per pixel - i.e. number of colours
'1 bit = 2 colours, 4 bits = 16 colours, 8 bits = 256 colours, etc.
'the 24 bit mode does not have a palette, its colours are expressed as
'image data
'Design of a windows 3.1 bitmap - Taken from bmp.zip on the
'x2ftp.oulu.fi ftp site under /pub/msdos/programming/formats
'Specifications for a Windows 3.1 bitmap. (.BMP)
'Email any questions/responses to me at zabudsk@ecf.utoronto.ca
'or post to alt.lang.basic or comp.lang.basic.misc.
'normaly, the row are aligned
' | # of |
'Offset | bytes | Function (value)
'-------+--------+--- General Picture information starts here---------
' 0 | 2 | (BM) - Tells us that the picture is in bmp format
' 2 | 4 | Size of the file (without header?)
' 6 | 2 | (0) Reserved1 - Must be zero
' 8 | 2 | (0) Reserved2 - Must be zero
' 10 | 4 | Number of bytes offset of the picture data
'-------+--------+--- Information Header starts here -----------------
' 14 | 4 | (40/12) Size of information header (Win3.1/OS2)
' 18 | 4 | Picture width in pixels
' 22 | 4 | Picture Height in pixels
' 26 | 2 | (1) Number of planes, must be 1
' 28 | 2 | Number of bits per pixel (bpp), must be 1,4,8 or 24
' 30 | 4 | (0) Compression - 0 means no compression, 1,2 are RLEs
' 34 | 4 | Image size in bytes
' 38 | 4 | picture width in pels per metre
' 42 | 4 | picture height in pels per metre
' 46 | 4 | (0) Number of colours used in the picture, 0 means all
' 50 | 4 | (0) Number of important colours, 0 means all
'-------+--------+--- Palette data starts here -----------------------
' 54 | 1 | (b) - blue intensity component, color 0 - range 0 to 255
' 55 | 1 | (g) - green intensity component, color 0 - range 0 to 255
' 56 | 1 | (r) - red intensity component, color 0 - range 0 to 255
' 57 | 1 | (0) - unused
' 58 | 1 | (b) - blue intensity component, color 0 - range 0 to 255
' ... | ... |
' 54 | 4*2^bpp| total range of palette
'-------+--------+--- Image data starts here -------------------------
'54+ | width* | Bitmap data starting at lower left portion of the
'(4*2^n)| height*| image moving from left towards right. Moving up 1
' | (8/bpp)| pixel when at the right hand side of the image, starting
' | | from the left side again, until the top right of the
' | | image is reached
'Note that this format is slightly different for a OS/2 Bitmap.
'The header is the same up to (but not including) bit 30-
'The palette colour values follow at bit 30, with the form...
'1 byte blue intensity
'1 byte green intensity
'1 byte red intensity
'For each colour of the picture.
'Bitmapped image data follows the colour tables
'Special note: When storing 1 bit (2 colour) pictures.
'8 horizontal pixels are packed into 1 byte. Each bit determines
'the colour of one pixel (colour 0 or colour 1)
'4 bit pictures (16 colours) use 2 nibbles (4 bits) for each pixel
'thus there are 2 pixels for each byte of image data.
'8 bit pictures use 1 byte per pixel. Each byte of image data
'represents one of 256 colours.
'24 bit pictures express colour values by using 3 bytes and each has a
'value between 0 and 255. The first byte is for red, the second is for
'green and the third is for blue. Thus (256)^3 or 2^24 of 16777216 different
'colours.
//End of extract of the file
|
|
|
|
|
When I use FrameGrabberDemo Program, blue screen of fatal error occur,
(When I copy and paste the Image, or click the Snapshot button on WebCam)
the error seems relate to "wdm"...
My WebCam is Maxell WebCam but I think the problem do not cause by my WebCam.
Moreover, my OS is Windows 98 second edition.
|
|
|
|
|
hi,
i tried to use CFrameGrabber with a miro video dc30plus-mpegboard. the examples crash totally. this
happens - in my opinion - because the method SetImageData gets (with lpVHdr->lpData) a pointer to
a locked buffer of _compressed_ imagedata. as no uncompress-functionality is implemented, this try
must fail. has anybody an idea to solve this problem?
Daniel Hofman
|
|
|
|
|
the solution is "simple":implement compression/decompression feature!Unfortunately it seems
even more complex than avicap.If anybody could write a wrapper for
the IComp*.* functions we would appreciate.
|
|
|
|
|
hi,
i tried to use CFrameGrabber with a miro video dc30plus-mpegboard. the examples crash totally. this
happens - in my opinion - because the method SetImageData gets (with lpVHdr->lpData) a pointer to
a locked buffer of _compressed_ imagedata. as no uncompress-functionality is implemented, this try
must fail. has anybody an idea to solve this problem?
Daniel Hofman
|
|
|
|
|
Is there a version for Delphi 4 or Delphi 5??
|
|
|
|
|
Ypu can see this article too:
http://www.undu.com/DN970501/00000024.htm
( Video capture in Delphi )
|
|
|
|
|
The demo program works well on my PC with a Quickcam VC.
When I try to compile th eproject with Release options, the program is freezing during initialisation, after the message "Seaching for buffers..." 100 %.
Any idea
|
|
|
|
|
I have the same problem.
It's working fine in debug mode but not in release.
I will try to solve this issue and let you know ...
However, if you have already solve this issue, please inform me.
A+
Thierry
|
|
|
|
|
|
Hi,
I founded the same problem as you using my Geforce4 ti4400 vivo. But I could resolve it choosing to link MFC libraries statically from Project-> settings menu. I don't know why, but this little work around seems to be linked with AMD Athlon systems in several kinds of applications. Hope it will work for you.
Best Regards,
Paulo
|
|
|
|
|
Hi, there,
How will it be happen if I connect two video devices? two capture windows open?
Thanks,
Zhan
|
|
|
|
|
Qidao Zhang wrote:
Hi, there,
How will it be happen if I connect two video devices? two capture windows open?
Thanks,
Zhan
ah, this is a loaded question.
Two different cameras should work correctly under video for windows api.
However two of the same cameras wont work - they will appear as only one camera under windows.
Except, if you use 3com Cameras [www.vistaimaging.com] (and possibly others now..)
you may use multiple instances of the same
camera and they will show up as unique video for windows slots. But keep in mind
3com cameras are now discontinued.
But if you use DirectShow then multiple instances of the same camera at the same time wont work
due to a bug in DirectShow.
-j
|
|
|
|
|
Could you tell me a bit more about the bug in DirectShow that prevents the output of two cameras of the same type to be rendered correctly?
Thanx!
Kurt
|
|
|
|