Re: Question about Camera driver with DirectShow

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I honestly don't know what the cause of the failure you're seeing in test
602. Does the test fail consistently?

When starting a video capture, the test calls
ICaptureGraphBuilder::ControlStream which in then calls StartAt and StopAt
on each of the filters in the graph. When the filters finish processing the
StartAt/StopAt they send an EC_STREAM_CONTROL_STARTED or
EC_STREAM_CONTROL_STOPPED event back to the application. There's two
separate captures happening simultaniously, one for audio and one for video.
In this case the test does a ControlStream with the start time and stop time
for a capture, but EC_STREAM_CONTROL_STOPPED event is never returned for the
video capture. The only way this would happen is if the last video frame is
never processed. The test has a timeout of 5 minutes when retrieving the
media event, so it's not a timing issue where the test isn't waiting long
enough, it really is that the event is never being sent.

Have you made any modifications to the NULL driver? Can you give me any
specifications on your device? From the previous posts i've gathered that
it's an ARM processor, what's the processor speed, available RAM, and is the
display driver ddraw enabled? Have you tried the camera application in
pimg.exe? Does there seem to be a long delay for video captures, or do they
go quickly? Are the video files captured playable, and if so are they smooth
or jerky? When you run the test, do you run it after freshly booting it or
are you running other tests before this one?

As for frame buffer allocation, we support three different modes, driver
allocated, DirectShow allocated with a limited number of buffers, and
DirectShow allocated with the ability to add additional buffers as needed.

So, here's some scenarios:
if your camera driver can fill a frame buffer using hardware without
using the CPU then you'll want to use driver allocated buffers. The
advantage here is you won't have to do any memory copies for filling the
video buffers and if your display hardware can access the camera video
memory then you may not need to do any memory copies for rendering the video
to the screen (the Bitblt/flip may be done in hardware).

if your display driver supports overlays, flipping overlays, etc. then
you'll want to use DirectShow limited allocating which will let the
VideoRenderer allocate video memory buffers through DDraw. This has the
advantage of being tear free in the preview and generally uses hardware for
filling the overlay.

if you have no hardware for your display driver and no camera hardware
for filling the video frames, then the DirectShow unlimited buffering is
good because you do one memory copy when filling the buffer within the
driver, and then that buffer is not re-copied within the buffering filter
for post processing (non-realtime encoding). If you were to use limited
buffering then a copy of the buffer would need to be made in order to pass
the original buffer back to the camera driver to be filled again.

Video ports are currently not supported.

Gary Daniels
Windows CE Multimedia and Graphics

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.

"GodzillaHaur" <GodzillaHaur@xxxxxxxxx> wrote in message
news:1120809408.333371.109880@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Mr. Daniels:

(A)
With updating LTK July 1, the null camera driver passed most tests,
except Test ID: 602 in DirectShow Integration. The failed test ID in
"camera test" is the same cases, 1016, 1018, 1025, 1027.

(B)
Do you have any infomation about the frame buffer allocating and the
procedures of preview, capture and still in nullcam driver? Could you
give some advice? Thanks.


The follwing message is the log of Test ID: 602 in DirectShow
Integration.

<TESTCASE ID=602>
*** vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
*** TEST STARTING
***
*** Test Name: ASF writing tests timed stream capture, video/audio
capture, with encoding and renderer.
*** Test ID: 602
*** Library Path: \cameragraphtests.dll
*** Command Line:
*** Random Seed: 13048
*** Thread Count: 0
*** vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
BEGIN TEST: "ASF writing tests timed stream capture, video/audio
capture, with encoding and renderer.", Threads=0, Seed=13048
Testing encoder quality combination 0
Capture length 0 seconds
Extending capture time to minimum
FAIL in
c:\bowqa4\private\test\directx\dshow\camera\framework\captureframework.cpp
at line 1948: CCaptureFramework: Timeout retrieving the MediaEvent.
FAIL in
c:\bowqa4\private\test\directx\dshow\camera\framework\captureframework.cpp
at line 4094: CCaptureFramework: StopStreamCapture - failed to retrieve
even one EC_STREAM_CONTROL_STOPPED event for Video.
FAIL in
c:\bowqa4\private\test\directx\dshow\camera\tests\cameragraphtests\cameragraph.cpp
at line 4528: The stream capture Failed.
Capture length 1 seconds
FAIL in
c:\bowqa4\private\test\directx\dshow\camera\framework\captureframework.cpp
at line 1948: CCaptureFramework: Timeout retrieving the MediaEvent.
FAIL in
c:\bowqa4\private\test\directx\dshow\camera\framework\captureframework.cpp
at line 4094: CCaptureFramework: StopStreamCapture - failed to retrieve
even one EC_STREAM_CONTROL_STOPPED event for Video.
FAIL in
c:\bowqa4\private\test\directx\dshow\camera\tests\cameragraphtests\cameragraph.cpp
at line 4528: The stream capture Failed.
Capture length 2 seconds
FAIL in
c:\bowqa4\private\test\directx\dshow\camera\framework\captureframework.cpp
at line 1948: CCaptureFramework: Timeout retrieving the MediaEvent.
FAIL in
c:\bowqa4\private\test\directx\dshow\camera\framework\captureframework.cpp
at line 4094: CCaptureFramework: StopStreamCapture - failed to retrieve
even one EC_STREAM_CONTROL_STOPPED event for Video.
FAIL in
c:\bowqa4\private\test\directx\dshow\camera\tests\cameragraphtests\cameragraph.cpp
at line 4528: The stream capture Failed.
Capture length 3 seconds
FAIL in
c:\bowqa4\private\test\directx\dshow\camera\framework\captureframework.cpp
at line 1948: CCaptureFramework: Timeout retrieving the MediaEvent.
FAIL in
c:\bowqa4\private\test\directx\dshow\camera\framework\captureframework.cpp
at line 4094: CCaptureFramework: StopStreamCapture - failed to retrieve
even one EC_STREAM_CONTROL_STOPPED event for Video.
FAIL in
c:\bowqa4\private\test\directx\dshow\camera\tests\cameragraphtests\cameragraph.cpp
at line 4528: The stream capture Failed.
Capture length 4 seconds
FAIL in
c:\bowqa4\private\test\directx\dshow\camera\framework\captureframework.cpp
at line 1948: CCaptureFramework: Timeout retrieving the MediaEvent.
FAIL in
c:\bowqa4\private\test\directx\dshow\camera\framework\captureframework.cpp
at line 4094: CCaptureFramework: StopStreamCapture - failed to retrieve
even one EC_STREAM_CONTROL_STOPPED event for Video.
FAIL in
c:\bowqa4\private\test\directx\dshow\camera\tests\cameragraphtests\cameragraph.cpp
at line 4528: The stream capture Failed.
Capture length 7 seconds
FAIL in
c:\bowqa4\private\test\directx\dshow\camera\framework\captureframework.cpp
at line 1948: CCaptureFramework: Timeout retrieving the MediaEvent.
FAIL in
c:\bowqa4\private\test\directx\dshow\camera\framework\captureframework.cpp
at line 4094: CCaptureFramework: StopStreamCapture - failed to retrieve
even one EC_STREAM_CONTROL_STOPPED event for Video.
FAIL in
c:\bowqa4\private\test\directx\dshow\camera\tests\cameragraphtests\cameragraph.cpp
at line 4528: The stream capture Failed.
END TEST: "ASF writing tests timed stream capture, video/audio
capture, with encoding and renderer.", FAILED, Time=3607.718
*** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
*** TEST COMPLETED
***
*** Test Name: ASF writing tests timed stream capture, video/audio
capture, with encoding and renderer.
*** Test ID: 602
*** Library Path: \cameragraphtests.dll
*** Command Line:
*** Result: Failed
*** Random Seed: 13048
*** Thread Count: 1
*** Execution Time: 1:00:07.718
*** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

</TESTCASE RESULT="FAILED">

Gary Daniels [MS] ??:
> In the Null camera driver, the registry settings in InitializeSubDevice
> and
> >


.



Relevant Pages

  • Re: Direct3d Front Buffer Capture
    ... I have been able to capture both the front and the back. ... the back buffer its just a blue jargled screen. ... Actually it even looks like I'm not able to grab the ... (works for the backbuffer but no video, ...
    (microsoft.public.win32.programmer.directx.managed)
  • Re: Jerky Google Earth video, help
    ... to include a piece of video 'Fly To' from Google Earth (I capture ... When I play it in my slide show that video is ... The Google Earth original is at 15 fps and I have tried converting ... Be sure to set the buffer size (in the Google ...
    (rec.video.desktop)
  • Camera and Direct Show Integration Test Fails
    ... Capture length 0 seconds ... at line 1946: CCaptureFramework: Timeout retrieving the MediaEvent. ... Failed to start the stream capture. ...
    (microsoft.public.pocketpc.developer)
  • Camera and Direct Show Integration Test Fails
    ... Capture length 0 seconds ... at line 1946: CCaptureFramework: Timeout retrieving the MediaEvent. ... Failed to start the stream capture. ...
    (microsoft.public.windowsce.embedded)
  • Re: camera and directshow integration tests
    ... PID:e7002e TID:3b3000e Building the capture graph, ... PID:e7002e TID:3b3000e FAIL in ... at line 1030: CCaptureFramework: CoCreateInstance of the video capture failed. ...
    (microsoft.public.windowsce.platbuilder)