X hits on this document

Word document

Designing Hardware and Drivers for the Microsoft® Windows® Family of Operating Systems - page 9 / 13

43 views

0 shares

1 downloads

0 comments

9 / 13

Digital Video Camcorder Support in Windows 9

A raw AV/C command is processed as follows:

1.

A DV camcorder application issues a command.

2.

The COM interface calls the DV camcorder driver to enable the notification event.

3.

The COM layer issues an IOCTL to the driver to set a property of the device.

4.

The MSDV driver receives a stream request block (labeled SRB1 in Figure 1) and creates an IRP, which is used to send the raw AV/C command through the AV/C command layer (not shown) to the device.

5.

The device responds in one of the following ways:

a.

If the device can complete the command within 100 milliseconds, it queues the final result and returns a success result, which the driver maps to STATUS_SUCCESS in the IRP. (Step 8)

b.

If the device requires more than 100 milliseconds to complete the command, it returns an interim result, which the driver maps to STATUS_MORE_ENTRIES in the IRP. (Step 6)

c.

If the device cannot complete the command, it returns an error result, which the driver maps to STATUS_NOT_SUPPORTED in the IRP. (Step 11)

d.

If the device does not respond within 200 milliseconds, the driver sets the IRP status to STATUS_TIMEOUT. (Step 11)

6.

If the device returned an interim result, indicating that it needs more time to complete the command successfully, the driver completes the SRB1 with STATUS_MORE_ENTRIES.

7.

The COM layer waits for the notification event to signal.

8.

When the device returns a final result and a success status (either within the first 100 milliseconds or after previously returning an interim result), the driver completes the IRP with STATUS_SUCCESS.

9.

The MSDV driver processes the final result from the device, queues it in an output buffer, and signals UserEvent.

10.

The COM layer issues an IOCTL to the driver to get a property of the device.

11.

If the device executed the command successfully, the MSDV driver receives another stream request block (labeled SRB2 in the figure), and dequeues the result into the block.

12.

The driver completes this block with STATUS_SUCCESS.

Otherwise, the MSDV driver completes the first SRB with STATUS_NOT_SUPPORTED if the device failed the command or STATUS_TIMEOUT if the device failed to respond.

13.

The COM layer returns status to the application with an appropriate user return value. If the command succeeded, this is NOERROR.

14.

If the command succeeded, the application retrieves the final result from the stream request block.

Registering for Removal Events

An application can request notification when a DV camcorder device is physically removed from the system by registering for a device-removal event, which is signaled if the device is disconnected. The following code fragment shows how to register for a device-removal event.

In this example, m_pDVcrExtTransport is a property page class member previously initialized with a pointer to IAMExtDevice.

HANDLE  hEventDevRemoved = NULL;

// Get an event to detect device removal

hr = m_pDVcrExtTransport->GetStatus(ED_DEV_REMOVED_HEVENT_GET, (long *) &hEventDevRemoved);

September 28, 2001

Document info
Document views43
Page views43
Page last viewedSat Dec 10 15:11:17 UTC 2016
Pages13
Paragraphs288
Words4089

Comments