My AVStream driver is having problems with capturing when using AMCap.
I can see the preview with no problems, but when I start capturing,
the resulting file only has one frame in it. I've gone back and tested
the avshws sample and it is doing the same thing as well. Is there
something missing to support capturing video?

Thanks,
Matt

Re: Capturing with Amcap and AVStream driver by Tim

Tim
Wed Oct 17 22:06:16 PDT 2007

phatmatt <phatmatt142@gmail.com> wrote:
>
>My AVStream driver is having problems with capturing when using AMCap.
>I can see the preview with no problems, but when I start capturing,
>the resulting file only has one frame in it. I've gone back and tested
>the avshws sample and it is doing the same thing as well. Is there
>something missing to support capturing video?

Have you checked the time limit dialog to make sure you haven't
accidentally set a very short time limit?
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Re: Capturing with Amcap and AVStream driver by Matt

Matt
Thu Oct 18 10:22:38 PDT 2007

"Tim Roberts" <timr@probo.com> wrote in message
news:cdqdh3ddetp4hd70e80q3vsft0oc8uacfu@4ax.com...
> phatmatt <phatmatt142@gmail.com> wrote:
>>
>>My AVStream driver is having problems with capturing when using AMCap.
>>I can see the preview with no problems, but when I start capturing,
>>the resulting file only has one frame in it. I've gone back and tested
>>the avshws sample and it is doing the same thing as well. Is there
>>something missing to support capturing video?
>
> Have you checked the time limit dialog to make sure you haven't
> accidentally set a very short time limit?
> --
> Tim Roberts, timr@probo.com
> Providenza & Boekelheide, Inc.

Tim,

No, that's not the problem. If I capture audio and video, the playback time
will be correct, and the audio captures fine (it's not using my driver). But
I still end up with only one frame from my camera. Also while capturing I
can see the preview window with updated images - so the os is getting the
right frames. I have tried capturing with preview off (thinking maybe
preview was stealing the frames from capture?), but there was no change in
the captured file.

Thanks for all your suggestions,
Matt



Re: Capturing with Amcap and AVStream driver by Tim

Tim
Sat Oct 20 16:31:24 PDT 2007

"Matt" <phatmatt142@gmail.com> wrote:
>
>No, that's not the problem. If I capture audio and video, the playback time
>will be correct, and the audio captures fine (it's not using my driver). But
>I still end up with only one frame from my camera. Also while capturing I
>can see the preview window with updated images - so the os is getting the
>right frames. I have tried capturing with preview off (thinking maybe
>preview was stealing the frames from capture?), but there was no change in
>the captured file.

Ah, now that begins to sound very much like a timestamp issue. Preview
ignores timestamps. Capture cares. How are you timestamping the frames in
your driver?
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Re: Capturing with Amcap and AVStream driver by Matt

Matt
Tue Oct 23 09:26:20 PDT 2007

"Tim Roberts" <timr@probo.com> wrote in message
news:5t3lh3hj9ob7b0e9sagovu21hlfln2f4r9@4ax.com...
> "Matt" <phatmatt142@gmail.com> wrote:
>>
>>No, that's not the problem. If I capture audio and video, the playback
>>time
>>will be correct, and the audio captures fine (it's not using my driver).
>>But
>>I still end up with only one frame from my camera. Also while capturing I
>>can see the preview window with updated images - so the os is getting the
>>right frames. I have tried capturing with preview off (thinking maybe
>>preview was stealing the frames from capture?), but there was no change in
>>the captured file.
>
> Ah, now that begins to sound very much like a timestamp issue. Preview
> ignores timestamps. Capture cares. How are you timestamping the frames
> in
> your driver?
> --
> Tim Roberts, timr@probo.com
> Providenza & Boekelheide, Inc.

I found the issue - it was because the avshws sample does not include
if(Leading->StreamHeader->Size >= sizeof(KSSTREAM_HEADER) +
sizeof(KS_FRAME_INFO))

{

PKS_FRAME_INFO FrameInfo = reinterpret_cast
<PKS_FRAME_INFO>(Leading->StreamHeader + 1);


FrameInfo->ExtendedHeaderSize = sizeof (KS_FRAME_INFO);

FrameInfo->PictureNumber = m_Device->QueryFrameNumber();

FrameInfo->DropCount = m_Device->QueryDroppedFrames();

}



Once I included this in the area where I set the time stamp, the capture
started working correctly.



Also, I noticed that both of the AVStream samples are using the wrong
function to set the

PresentationTime.Time value. Instead of using GetTime() you need to use

GetCorrelatedTime.



Thanks again for the help,

Matt