Ocean
Loading...
Searching...
No Matches
Ocean::Media::DirectShow::DSSampleSinkFilter::DSInputPin Class Reference

This class implements a base input filter. More...

#include <DSSampleSinkFilter.h>

Inheritance diagram for Ocean::Media::DirectShow::DSSampleSinkFilter::DSInputPin:

Public Member Functions

 DSInputPin (const std::wstring &pinName, HRESULT *phr, DSSampleSinkFilter *filter, const SampleCallback &callback)
 Constructor for the input pin.
 
virtual ~DSInputPin ()
 Destructs a input pin.
 
bool respectPlaybackTime () const
 Returns whether the sink respects the media playback time or whether the samples are provided as fast as possible.
 
bool setRespectPlaybackTime (const bool state)
 Specifies whether the media playback time will be respected or whether the samples are provided as fast as possible.
 
bool specifyMediaType (const AM_MEDIA_TYPE &mediaType)
 Adds a new media type of the input pin.
 

Protected Types

typedef std::vector< CMediaType > MediaTypes
 Definition of a vector holding media types.
 

Protected Member Functions

HRESULT CheckMediaType (const CMediaType *mediaType) override
 Checks if the given media type is supported by the input pin.
 
HRESULT GetMediaType (int position, CMediaType *mediaType) override
 Returns the supported media types of the input pin.
 
STDMETHODIMP Receive (IMediaSample *mediaSample) override
 Receives a media sample from the connected direct show filter.
 
STDMETHODIMP EndOfStream () override
 End of stream event.
 

Protected Attributes

MediaTypes mediaTypes_
 Pattern media types of this pin.
 
SampleCallback sampleCallback_
 Callback function informing about a new media sample.
 
bool respectPlaybackTime_ = true
 True, if the media playback time is respected.
 

Friends

class DSSampleSinkFilter
 

Detailed Description

This class implements a base input filter.

Member Typedef Documentation

◆ MediaTypes

Definition of a vector holding media types.

Constructor & Destructor Documentation

◆ DSInputPin()

Ocean::Media::DirectShow::DSSampleSinkFilter::DSInputPin::DSInputPin ( const std::wstring &  pinName,
HRESULT *  phr,
DSSampleSinkFilter filter,
const SampleCallback callback 
)

Constructor for the input pin.

Parameters
pinNameName of the pin
phrPointer to a result value.
filterPointer to the parent filter.
callbackNew media sample callback function

◆ ~DSInputPin()

virtual Ocean::Media::DirectShow::DSSampleSinkFilter::DSInputPin::~DSInputPin ( )
virtual

Destructs a input pin.

Member Function Documentation

◆ CheckMediaType()

HRESULT Ocean::Media::DirectShow::DSSampleSinkFilter::DSInputPin::CheckMediaType ( const CMediaType *  mediaType)
overrideprotected

Checks if the given media type is supported by the input pin.

Parameters
mediaTypeMedia type to check
Returns
S_OK if succeeded

◆ EndOfStream()

STDMETHODIMP Ocean::Media::DirectShow::DSSampleSinkFilter::DSInputPin::EndOfStream ( )
overrideprotected

End of stream event.

◆ GetMediaType()

HRESULT Ocean::Media::DirectShow::DSSampleSinkFilter::DSInputPin::GetMediaType ( int  position,
CMediaType *  mediaType 
)
overrideprotected

Returns the supported media types of the input pin.

This function is called to connected the input pin with a matching output pin.

Parameters
positionIndex of the media type.
mediaTypeMedia type to receive
Returns
S_OK if succeeded

◆ Receive()

STDMETHODIMP Ocean::Media::DirectShow::DSSampleSinkFilter::DSInputPin::Receive ( IMediaSample *  mediaSample)
overrideprotected

Receives a media sample from the connected direct show filter.

Here the filter a connected with a video encoder.

Parameters
mediaSamplePointer to a media sample with one encoded frame
Returns
S_OK if succeeded

◆ respectPlaybackTime()

bool Ocean::Media::DirectShow::DSSampleSinkFilter::DSInputPin::respectPlaybackTime ( ) const

Returns whether the sink respects the media playback time or whether the samples are provided as fast as possible.

Returns
True, if the media playback time is respected

◆ setRespectPlaybackTime()

bool Ocean::Media::DirectShow::DSSampleSinkFilter::DSInputPin::setRespectPlaybackTime ( const bool  state)

Specifies whether the media playback time will be respected or whether the samples are provided as fast as possible.

Parameters
stateTrue, to respect the playback time
Returns
True, if succeeded

◆ specifyMediaType()

bool Ocean::Media::DirectShow::DSSampleSinkFilter::DSInputPin::specifyMediaType ( const AM_MEDIA_TYPE &  mediaType)

Adds a new media type of the input pin.

The input pin may support more than one media type.

Parameters
mediaTypeMedia type to set
Returns
True, if succeeded

Friends And Related Symbol Documentation

◆ DSSampleSinkFilter

friend class DSSampleSinkFilter
friend

Field Documentation

◆ mediaTypes_

MediaTypes Ocean::Media::DirectShow::DSSampleSinkFilter::DSInputPin::mediaTypes_
protected

Pattern media types of this pin.

◆ respectPlaybackTime_

bool Ocean::Media::DirectShow::DSSampleSinkFilter::DSInputPin::respectPlaybackTime_ = true
protected

True, if the media playback time is respected.

◆ sampleCallback_

SampleCallback Ocean::Media::DirectShow::DSSampleSinkFilter::DSInputPin::sampleCallback_
protected

Callback function informing about a new media sample.


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