Microsoft DirectX 9.0

IAMStreamControl::StartAt

The StartAt method informs the pin when to start delivering data.

Syntax

HRESULT StartAt(
  const REFERENCE_TIME *ptStart,
  DWORD dwCookie
);

Parameters

ptStart

[in] Pointer to a REFERENCE_TIME value that specifies when the pin should start delivering data. If the value is MAXLONGLONG (0x7FFFFFFFFFFFFFFF), the method cancels the previous start request. If psStart is NULL, the pin starts immediately when the graph runs. 

For preview pins, only the values NULL and MAXLONGLONG are valid, because preview pins do not time stamp the samples they deliver.

dwCookie

[in] Specifies a value to send along with the start notification. See Remarks.

Return Values

If the method succeeds, the return value is S_OK. Otherwise, returns an HRESULT value indicating the cause of the failure.

Remarks

By default, the pin delivers data as soon as the filter graph runs. The StartAt method causes the pin to wait until a specified time after the graph runs, before the pin begins delivering data.

If the dwCookie parameter is non-zero, the pin will send an EC_STREAM_CONTROL_STARTED event when it starts to deliver data. The first event parameter is a pointer to the pin's IPin interface, and the second is the value of dwCookie.

This method implements the following special cases:

This method also handles the following boundary conditions:

MAXLONGLONG is the largest possible REFERENCE_TIME value. In the base class library, it is also defined as the constant MAX_TIME.

See Also