Compartilhar via


CMediaSample::CMediaSample (Compact 2013)

3/26/2014

Constructs a CMediaSample object.

Syntax

CMediaSample(
  TCHAR* pName,
  CBaseAllocator* pAllocator,
  HRESULT* phr,
  LPBYTE pBuffer = NULL,
  LONG length = 0 
); 

Parameters

  • pName
    Name of the media sample.
  • pAllocator
    Pointer to the CBaseAllocator object used for memory allocation.
  • phr
    Pointer to the general COM return value. Note that this value is changed only if this function fails.
  • pBuffer
    Pointer to a memory buffer (to be allocated by the pAllocator parameter).
  • length
    Length of the allocated memory buffer.

Return Value

None.

Remarks

The constructor creates an object with the buffer and buffer length set to that of the CBaseAllocator object to which it points.

Requirements

Header

dshow.h,
Streams.h

Library

ole32.lib,
Ole32auth.lib,
Strmbase.lib,
Strmiids.lib,
uuid.lib

See Also

Reference

CMediaSample Class