CMediaSample Class Reference

#include <amfilter.h>

Inheritance diagram for CMediaSample:

CImageSample

List of all members.

Public Member Functions

 CMediaSample (TCHAR *pName, CBaseAllocator *pAllocator, HRESULT *phr, LPBYTE pBuffer=NULL, LONG length=0)
virtual ~CMediaSample ()
STDMETHODIMP QueryInterface (REFIID riid, void **ppv)
 STDMETHODIMP_ (ULONG) AddRef()
 STDMETHODIMP_ (ULONG) Release()
HRESULT SetPointer (BYTE *ptr, LONG cBytes)
STDMETHODIMP GetPointer (BYTE **ppBuffer)
 STDMETHODIMP_ (LONG) GetSize(void)
STDMETHODIMP GetTime (REFERENCE_TIME *pTimeStart, REFERENCE_TIME *pTimeEnd)
STDMETHODIMP SetTime (REFERENCE_TIME *pTimeStart, REFERENCE_TIME *pTimeEnd)
STDMETHODIMP IsSyncPoint (void)
STDMETHODIMP SetSyncPoint (BOOL bIsSyncPoint)
STDMETHODIMP IsPreroll (void)
STDMETHODIMP SetPreroll (BOOL bIsPreroll)
 STDMETHODIMP_ (LONG) GetActualDataLength(void)
STDMETHODIMP SetActualDataLength (LONG lActual)
STDMETHODIMP GetMediaType (AM_MEDIA_TYPE **ppMediaType)
STDMETHODIMP SetMediaType (AM_MEDIA_TYPE *pMediaType)
STDMETHODIMP IsDiscontinuity (void)
STDMETHODIMP SetDiscontinuity (BOOL bDiscontinuity)
STDMETHODIMP GetMediaTime (LONGLONG *pTimeStart, LONGLONG *pTimeEnd)
STDMETHODIMP SetMediaTime (LONGLONG *pTimeStart, LONGLONG *pTimeEnd)
STDMETHODIMP GetProperties (DWORD cbProperties, BYTE *pbProperties)
STDMETHODIMP SetProperties (DWORD cbProperties, const BYTE *pbProperties)

Public Attributes

LONG m_cRef

Protected Types

enum  {
  Sample_SyncPoint = 0x01, Sample_Preroll = 0x02, Sample_Discontinuity = 0x04, Sample_TypeChanged = 0x08,
  Sample_TimeValid = 0x10, Sample_MediaTimeValid = 0x20, Sample_TimeDiscontinuity = 0x40, Sample_StopValid = 0x100,
  Sample_ValidFlags = 0x1FF
}

Protected Attributes

DWORD m_dwFlags
DWORD m_dwTypeSpecificFlags
LPBYTE m_pBuffer
LONG m_lActual
LONG m_cbBuffer
CBaseAllocatorm_pAllocator
CMediaSamplem_pNext
REFERENCE_TIME m_Start
REFERENCE_TIME m_End
LONGLONG m_MediaStart
LONG m_MediaEnd
AM_MEDIA_TYPE * m_pMediaType
DWORD m_dwStreamId

Friends

class CBaseAllocator


Detailed Description

Definition at line 1021 of file amfilter.h.


Member Enumeration Documentation

anonymous enum [protected]

Enumerator:
Sample_SyncPoint 
Sample_Preroll 
Sample_Discontinuity 
Sample_TypeChanged 
Sample_TimeValid 
Sample_MediaTimeValid 
Sample_TimeDiscontinuity 
Sample_StopValid 
Sample_ValidFlags 

Definition at line 1029 of file amfilter.h.


Constructor & Destructor Documentation

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

Definition at line 2367 of file amfilter.cpp.

References ASSERT.

CMediaSample::~CMediaSample (  )  [virtual]

Definition at line 2411 of file amfilter.cpp.

References DeleteMediaType(), and m_pMediaType.


Member Function Documentation

STDMETHODIMP CMediaSample::QueryInterface ( REFIID  riid,
void **  ppv 
)

Definition at line 2420 of file amfilter.cpp.

References E_NOINTERFACE, and GetInterface().

CMediaSample::STDMETHODIMP_ ( ULONG   ) 

CMediaSample::STDMETHODIMP_ ( ULONG   ) 

HRESULT CMediaSample::SetPointer ( BYTE ptr,
LONG  cBytes 
)

Definition at line 2472 of file amfilter.cpp.

References m_cbBuffer, m_lActual, m_pBuffer, and S_OK.

STDMETHODIMP CMediaSample::GetPointer ( BYTE **  ppBuffer  ) 

Definition at line 2482 of file amfilter.cpp.

References ASSERT, m_pBuffer, and ValidateReadWritePtr.

CMediaSample::STDMETHODIMP_ ( LONG   ) 

STDMETHODIMP CMediaSample::GetTime ( REFERENCE_TIME *  pTimeStart,
REFERENCE_TIME *  pTimeEnd 
)

STDMETHODIMP CMediaSample::SetTime ( REFERENCE_TIME *  pTimeStart,
REFERENCE_TIME *  pTimeEnd 
)

STDMETHODIMP CMediaSample::IsSyncPoint ( void   ) 

Definition at line 2593 of file amfilter.cpp.

References m_dwFlags, S_FALSE, S_OK, and Sample_SyncPoint.

STDMETHODIMP CMediaSample::SetSyncPoint ( BOOL  bIsSyncPoint  ) 

Definition at line 2603 of file amfilter.cpp.

References m_dwFlags, and Sample_SyncPoint.

STDMETHODIMP CMediaSample::IsPreroll ( void   ) 

Definition at line 2636 of file amfilter.cpp.

References m_dwFlags, S_FALSE, S_OK, and Sample_Preroll.

STDMETHODIMP CMediaSample::SetPreroll ( BOOL  bIsPreroll  ) 

Definition at line 2646 of file amfilter.cpp.

References m_dwFlags, and Sample_Preroll.

CMediaSample::STDMETHODIMP_ ( LONG   ) 

STDMETHODIMP CMediaSample::SetActualDataLength ( LONG  lActual  ) 

Definition at line 2663 of file amfilter.cpp.

References ASSERT, m_cbBuffer, and m_lActual.

STDMETHODIMP CMediaSample::GetMediaType ( AM_MEDIA_TYPE **  ppMediaType  ) 

STDMETHODIMP CMediaSample::SetMediaType ( AM_MEDIA_TYPE *  pMediaType  ) 

STDMETHODIMP CMediaSample::IsDiscontinuity ( void   ) 

Definition at line 2614 of file amfilter.cpp.

References m_dwFlags, S_FALSE, S_OK, and Sample_Discontinuity.

STDMETHODIMP CMediaSample::SetDiscontinuity ( BOOL  bDiscontinuity  ) 

Definition at line 2624 of file amfilter.cpp.

References m_dwFlags, S_OK, and Sample_Discontinuity.

STDMETHODIMP CMediaSample::GetMediaTime ( LONGLONG pTimeStart,
LONGLONG pTimeEnd 
)

STDMETHODIMP CMediaSample::SetMediaTime ( LONGLONG pTimeStart,
LONGLONG pTimeEnd 
)

STDMETHODIMP CMediaSample::GetProperties ( DWORD  cbProperties,
BYTE pbProperties 
)

HRESULT CMediaSample::SetProperties ( DWORD  cbProperties,
const BYTE pbProperties 
)


Friends And Related Function Documentation

friend class CBaseAllocator [friend]

Definition at line 1026 of file amfilter.h.


Member Data Documentation

DWORD CMediaSample::m_dwFlags [protected]

Definition at line 1044 of file amfilter.h.

Referenced by GetProperties(), and SetProperties().

LPBYTE CMediaSample::m_pBuffer [protected]

Definition at line 1045 of file amfilter.h.

Referenced by GetPointer(), GetProperties(), SetPointer(), and SetProperties().

Definition at line 1046 of file amfilter.h.

Referenced by GetProperties(), SetActualDataLength(), SetPointer(), and SetProperties().

Definition at line 1047 of file amfilter.h.

Referenced by GetProperties(), SetActualDataLength(), SetPointer(), and SetProperties().

Definition at line 1048 of file amfilter.h.

Definition at line 1049 of file amfilter.h.

Referenced by CBaseAllocator::NextSample().

REFERENCE_TIME CMediaSample::m_Start [protected]

Definition at line 1050 of file amfilter.h.

Referenced by GetProperties(), GetTime(), SetProperties(), and SetTime().

REFERENCE_TIME CMediaSample::m_End [protected]

Definition at line 1051 of file amfilter.h.

Referenced by GetProperties(), GetTime(), SetProperties(), and SetTime().

Definition at line 1052 of file amfilter.h.

Referenced by GetMediaTime(), and SetMediaTime().

Definition at line 1053 of file amfilter.h.

Referenced by GetMediaTime(), and SetMediaTime().

AM_MEDIA_TYPE* CMediaSample::m_pMediaType [protected]

Definition at line 1054 of file amfilter.h.

Referenced by GetMediaType(), GetProperties(), SetMediaType(), SetProperties(), and ~CMediaSample().

DWORD CMediaSample::m_dwStreamId [protected]

Definition at line 1055 of file amfilter.h.

Referenced by GetProperties(), and SetProperties().

Definition at line 1057 of file amfilter.h.

Referenced by CBaseAllocator::GetBuffer().


The documentation for this class was generated from the following files:

Generated on Sun May 25 00:20:49 2008 by  doxygen 1.5.6