Not able to able capture video through AmCap!!!! Please help me...

Discussion in 'Windows Vista Drivers' started by darshan.tapdia, Nov 9, 2006.

  1. Hi all,
    I have written AvStream Class Minidriver for USB camera. I tested
    it with Amcap.exe . IT works fine for previewing.
    - > But when i tried to capture through AmCap it doesnt show any
    frames captured. I mean i doesnt capture. Please give some pointers on
    that.
    Waiting for reply.
    Darshan
     
    darshan.tapdia, Nov 9, 2006
    #1
    1. Advertisements

  2. sorry for reposting..by mistake i posted it twice..
    thanks,
    Darshan
     
    darshan.tapdia, Nov 9, 2006
    #2
    1. Advertisements

  3. You must have correct timestamps and dropped/captured frames for each frame.
    See avssamp or testcap examples for reference.
     
    Anatoly Greenblatt, Nov 9, 2006
    #3
  4. Thanks a for helping Anatoly,
    Actually , as this driven r i havent implemeted Master clock,
    but for timestamping i am using.. Mechanism as....
    PresentationTime = PresentSystemTime - StreamStarTime ;
    Where... StreamStartTime , i have stored at RUN State of the pin ,
    which is inturn systemtime at that point of time.For Every sample i
    calculate and do the same.

    Will this approach work.? if not Please,give some more suggestions.

    Please guide me. Waiting for reply.
    Darshan
     
    darshan.tapdia, Nov 9, 2006
    #4
  5. You dont have to implement master clock. Stream clock and system clock is
    not the same thing, so you better find the master clock and query it instead
    of system time. There is also a bunch of parameters to be filled, see
    CVideoCapturePin::CaptureFrame in avssamp for reference.

    Anatoly.
     
    Anatoly Greenblatt, Nov 12, 2006
    #5
  6. Hi Anatoly,
    I have filled all stream header members properly. Do we need to
    fill-up KS_FRAME_INFO structure too????.
    One more behaviour i found out when i tried my driver in
    KsStudio with Sink Capture Test Filter(Avaiable in KsKstudio Test
    filters) is that, after connection, when i start streaming "Log
    Windiow" doesnt show any thing about captured samples, rather it shows
    IOCTL_READ_STREAM....and no pictures come in the preview window.

    When i try to stop the previewing from Sink Capture filter ,
    the streaming never stops unless and untill i manually stop from my
    filter.
    Well, in other sample avsshw(PinCentric Processing as my
    implementation is also pincentric) it works fine.

    Please help , because problems lies as it is. Some more pointer
    would really help./
    Thanks a lot,
    Darshan
     
    darshan.tapdia, Nov 13, 2006
    #6
  7. Hi,
    Addtion to previous mail ,
    I am using KsPinGetReferenceClockInterface to get the
    reference to the available clock. and during intializing the stream
    header..
    If i dont have clock.
    pStreamHeader->PresentationTime.Time = 0
    pStreamHeader->PresentationTime.Numerator = 1;
    pStreamHeader->PresentationTime.Denominator = 1;
    pStreamHeader->Duration =AvgTimePerFrame;

    pStreamHeader->OptionsFlags |=
    KSSTREAM_HEADER_OPTIONSF_DURATIONVALID;

    pStreamHeader->DataUsed = FRAME_SIZE

    Please review and let me know,
    Thanks ,
    Darshan
     
    darshan.tapdia, Nov 13, 2006
    #7
  8. darshan.tapdia

    Max Paklin Guest

    Does the file you capture grow at size over time while you capture?
    Do you see a single frame from the file you captured?

    You might want to check if you generate correct stream for the format of the
    data that you negotiate during connection for the _capture_ case.
    Also see what format gets negotiated for the playback case and then disable
    all formats other than that one and see if you can capture anything.

    I am fairly certain that wrong time stamps is not the source of your
    problem. If timestamps were off you'd still be able to see some video.

    -- Max.
     
    Max Paklin, Nov 16, 2006
    #8
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.