AudRecordLib
Public Member Functions
NullSink Class Reference

#include <nullsink.h>

List of all members.

Public Member Functions

 NullSink (BOOL realTime)
HRESULT WINAPI QueryInterface (REFIID iid, LPVOID *ppv)
ULONG WINAPI AddRef ()
ULONG WINAPI Release ()
HRESULT WINAPI OnHeader (INSSBuffer *pHeader)
HRESULT WINAPI IsRealTime (BOOL *pRealTime)
HRESULT WINAPI AllocateDataUnit (DWORD dataSize, INSSBuffer **ppBuffer)
HRESULT WINAPI OnDataUnit (INSSBuffer *pData)
HRESULT WINAPI OnEndWriting ()

Detailed Description

A dummy sink class that can be added to a IWMWriter session mainly to test that the writer can write.

Nothing is done with the data it is given. It is designed to be allocated on the stack, AddRef and Release do nothing.


Constructor & Destructor Documentation

NullSink::NullSink ( BOOL  realTime)

Constructs either a normal or realtime NullSink instance

Parameters:
realTimeWhether the sink needs realtime samples for writing or not

Member Function Documentation

ULONG WINAPI NullSink::AddRef ( )

Does nothing, the class is meant to be allocated on the stack

Returns:
Always 1
HRESULT WINAPI NullSink::AllocateDataUnit ( DWORD  dataSize,
INSSBuffer **  ppBuffer 
)

Creates a new buffer of the requested size

Parameters:
dataSizeInitial size of the memory buffer
[out]ppBufferPointer that receives the interface pointer of the wrapper around the new buffer
Returns:
S_OK on success, E_OUTOFMEMORY of there is no memory left
HRESULT WINAPI NullSink::IsRealTime ( BOOL *  pRealTime)

Called by the writer to determine if the sink requires realtime packets

Parameters:
pRealTimePointer to a bool that receives the realtime value given to the constructor
Returns:
S_OK if pRealTime was valid, E_POINTER otherwise
HRESULT WINAPI NullSink::OnDataUnit ( INSSBuffer *  pData)

Does nothing, called when their is a new data to write to the stream

Parameters:
pDataBuffer containing data to write
Returns:
S_OK if pData is nonzero, E_POINTER otherwise
HRESULT WINAPI NullSink::OnEndWriting ( )

Does nothing, called when all writing has finishe

Returns:
Always S_OK
HRESULT WINAPI NullSink::OnHeader ( INSSBuffer *  pHeader)

Does nothing, called when their is a new stream header to write

Parameters:
pHeaderBuffer containing a new header to write
Returns:
S_OK if pHeader is nonzero, E_POINTER otherwise
ULONG WINAPI NullSink::Release ( )

Does nothing, the class is meant to be allocated on the stack

Returns:
Always 1

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Defines