Microsoft DirectX 8.1 (C++)

IMSVidCtl::View

This topic applies to Windows XP Home Edition and Windows XP Professional only.

The View method configures an input device for a specified tune request.

Syntax

HRESULT View(
  VARIANT*  pv
);

Parameters

  pv

[in]  Specifies the tune request as a VARIANT type. Currently, this parameter must be a pointer to a valid tune request object that supports the ITuneRequest interface. The tune request must be initialized with all the tuning information required for the particular network type.

Return Values

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

If the Video Control already has an active input device, this method configures the device for the specified tune request. Otherwise, this method locates an input device that can handle the tune request and activates it.

An input device typically corresponds to a source filter. The Video Control determines which filter to use by examining the network type on the tune request. For digital television, the input device will be a BDA Network Provider filter. For analog television, it will be a WDM TV Tuner filter. The specific name and implementation of the filter are device-dependent.

After calling View, build and run the filter graph, using the following methods:

If the filter graph is already built and running, an application can call View to specify a new tune request, either on the same network type or on a different network type.

You can specify a particular input device by calling the IMSVidCtl::put_InputActive method and then calling IMSVidInputDevice::View on the device, instead of calling View on the Video Control. This might be useful if the local system has multiple devices of the same type. The IMSVidCtl::View method is preferred, however, because it automatically locates the correct device type.

Example Code

ITuneRequest *pTuneReq;
/* Obtain the tune request (not shown). */
CComVariant varTuneRequest = pTuneReq;
pVideoControl->View(&varTuneRequest);

See Also