Windows Media Format SDK banner art
PreviousNext

IWMWriterAdvanced::WriteStreamSample

The WriteStreamSample method writes a stream sample directly into a Windows Media file, bypassing the normal compression procedures.

Syntax

HRESULT WriteStreamSample(
  WORD  wStreamNum,
  QWORD  cnsSampleTime,
  DWORD  msSampleSendTime,
  QWORD  cnsSampleDuration,
  DWORD  dwFlags,
  INSSBuffer*  pSample
);

Parameters

  wStreamNum

[in]  Word containing the stream number.

  cnsSampleTime

[in]  QWORD containing the sample time.

  msSampleSendTime

[in]  Double word containing the sample send time.

  cnsSampleDuration

[in]  QWORD containing the sample duration.

  dwFlags

[in]  Double word containing the relevant flags.

  pSample

[in]  Pointer to an INSSBuffer interface containing the sample.

Return Values

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

Return code Meaning
NS_E_INVALID_STATE The writer cannot currently be run.

Remarks

Normally the user provides samples to an input file on the IWMWriter interface, and the samples are then compressed, and possibly put into a MEB stream. However, the user can use this interface to put the samples directly into the Windows Media file, without compressing or otherwise modifying them.

Stream numbers may only be in the range of 1-64.

See Also

PreviousNext


© 1999 Microsoft Corporation. All rights reserved.