VideoTestSource

所属分类:DirextX编程
开发工具:Visual C++
文件大小:41KB
下载次数:78
上传日期:2009-04-03 09:07:03
上 传 者davidleelee
说明:  实现了directshow中的一个source filter,可以捕捉采集的视频,输入支持PAL制式和NTSC制式,输出支持RGB和YUV格式。
(Directshow implementation of a source filter, can capture video collection, input support PAL and NTSC standard formats, support for RGB and YUV output format.)

文件列表:
VideoTestSource\ColorBars.cpp (4132, 2008-04-20)
VideoTestSource\ColorBars.h (1152, 2008-04-20)
VideoTestSource\ColorRect.cpp (3474, 2008-04-20)
VideoTestSource\ColorRect.h (1277, 2008-04-20)
VideoTestSource\DrawHelpers.cpp (6836, 2008-04-20)
VideoTestSource\DrawHelpers.h (4539, 2008-04-20)
VideoTestSource\FormatHelpers.cpp (10384, 2008-04-20)
VideoTestSource\FormatHelpers.h (937, 2008-04-20)
VideoTestSource\FrameGen.cpp (15898, 2008-04-20)
VideoTestSource\FrameGen.h (9419, 2008-04-20)
VideoTestSource\MediaBuffer.h (4302, 2008-04-20)
VideoTestSource\resource.h (2110, 2008-04-20)
VideoTestSource\setup.cpp (2722, 2008-04-20)
VideoTestSource\stdafx.h (636, 2008-04-20)
VideoTestSource\Timestamp.cpp (6828, 2008-04-20)
VideoTestSource\Timestamp.h (1054, 2008-04-20)
VideoTestSource\VideoProp.cpp (10235, 2008-04-20)
VideoTestSource\VideoProp.h (1692, 2008-04-20)
VideoTestSource\VideoSource.idl (2975, 2008-04-20)
VideoTestSource\VideoTestSource.cpp (13187, 2008-04-20)
VideoTestSource\VideoTestSource.def (503, 2008-04-20)
VideoTestSource\VideoTestSource.h (3473, 2008-04-20)
VideoTestSource\VideoTestSource.rc (4408, 2008-04-20)
VideoTestSource\VideoTestSource.sln (894, 2008-04-20)
VideoTestSource\VideoTestSource.vcproj (6101, 2008-04-20)
VideoTestSource\VideoTestSourceGuids.h (835, 2008-04-20)

Source filter for generating video frames in a variety of formats. Applications can use the IVideoSourceFilter interface to initialize the filter. Video Formats ------------- The filter produces a limited set of video formats. These are defined by the SurfaceParameters structure. The application sets the type on the filter via the IVideoSourceFilter::SetSurfaceParameters method, and the filter rejects any media types that do not match that format. This approach makes it easier to guarantee a correct media type; rather than allow the application to fill in an AM_MEDIA_TYPE structure and then attempting to validate all possible combinations. The filter also provides a property page so that you can set the video format in GraphEdit. The property page also supports some "preset" formats for standard-definition NTSC and PAL video. Currently the filter does not support dynamic pin reconnection or changing the format while the filter is running. FrameGenerator -------------- Internally, the work of drawing the video frames is handled by the FrameGenerator class. This class is also rigistered as a standalone COM object with its own CLSID, which may be useful for generating video frames outside of DirectShow. The FrameGenerator class, in turn, uses a list of "surface painter" objects to draw regions within the video frame. These object expose the ISurfacePainter interface. Currently the list of surface painters is not configurable at run- time. However, this design makes it fairly easy to modify the FrameGenerator class (simply by implementing a new surface painter). For ease of imlementation, the surface painters always work in a 32-bpp color format: - RGB 32 if the output format is RGB - AYUV if the output format is YUV After each surface painter has finished drawing its portion of the frame, the resulting image is converted to the target format. For interlaced video, the surface painters are asked to draw two progressive images per video frame. The FrameGenerator class then produces top and bottom fields for an interlaced picture. This is not the most efficient approach possible, but simplifies the implementation of the surface painters. LIMITATIONS ----------- - Does not support dynamic pin connections or format changes - Does not support seeking

近期下载者

相关文件


收藏者