我现在用一块视频采集卡(PCI接口的,它本身已经实现了数据的采集和压缩)来实现视频功能,但是没有SDK,是否是找到相应的设备,在从它的缓冲内读得数据。请问是否是这样的呢?如是是怎么样实现的,如不是又是怎么样实现的?请尽可能的说清楚些,如能给出一部分函数或代码则更好了。

解决方案 »

  1.   

    没有SDK不好办。
    支持DirectShow不?用DirectShow吧。
      

  2.   

    VFW吧,老技术,稳定,可靠,我一直都用,而且试过DirectShow,虽然灵活,但是感觉效果还没VFW好(自己的感觉)About Video Capture
    AVICap supports streaming video capture and single-frame capture in real-time. In addition, AVICap provides control of video sources that are Media Control Interface (MCI) devices so the user can control (through an application) the start and stop positions of a video source, and augment the capture operation to include step frame capture.The windows you create by using the AVICap window class can perform the following tasks: Capture audio and video streams to an audo-video interleaved (AVI) file. 
    Connect and disconnect video and audio input devices dynamically. 
    View a live incoming video signal by using the overlay or preview methods. 
    Specify a file to use when capturing and copy the contents of the capture file to another file. 
    Set the capture rate. 
    Display dialog boxes that control the video source and format. 
    Create, save, and load palettes. 
    Copy images and palettes to the clipboard. 
    Capture and save a single image as a device-independent bitmap (DIB). 
      

  3.   

    只要有采集设备,有驱动程序就可以做采集了, 不需要一定有sdk。
    windows提供了标准的视频采集方法: vfw 和 direct show, 具体你看看msdn吧, vfw是传统的c接口, 上手比较简单;用dshow的话要牵扯到很多com和dx的知识, 你要是有大把时间可以好好研究一下
      

  4.   

    小弟我用如下代码:
      ghCapWnd=capCreateCaptureWindow("Mycapture",WS_CHILD|WS_VISIBLE,0,0, 500,
     500,hmainhand, 0) ;
       capDriverConnect(ghCapWnd,0);
      capSetCallbackOnVideoStream(ghCapWnd,capVideoStream); //捕获一个视频流
        capSetCallbackOnError(ghCapWnd,capError); //得到一个设备错误
        capSetCallbackOnStatus(ghCapWnd,capStatus);//得到一个设备状态
       capPreviewScale(ghCapWnd,1);
        capPreviewRate(ghCapWnd,66);
    capCaptureSequenceNoFile(ghCapWnd);
    capOverlay(ghCapWnd,0);
        capPreview(ghCapWnd,1);这些代码只能得到USB接口的视频,而我用视频卡采集的视频却不能得到,它在第二步就已经出错了——capDriverConnect(ghCapWnd,0)与相应的驱动程序相关联,返回的就是0了,这是怎么回事呢?如果我的步骤有错,还请各位大侠多多指点啊,小弟急用,请各们多多回答。
      

  5.   

    这个参数应该不是问题的,MSDN中说是从0---9,这些值我都一一试过,结果都是一样的。还是找不到相应的设备。
      

  6.   

    定~呵呵..看看芯片类型 在到网上搜搜.
    不行就只有硬来了..或者从驱动入手\或者用 direct show.