Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

MPVDataSinkBase Class Reference

#include <pv_plugin_interfaces.h>

Inheritance diagram for MPVDataSinkBase:

MPVDataSink MPVDataSourceAndSink

Public Methods

 MPVDataSinkBase (TUid aType)
virtual ~MPVDataSinkBase ()
virtual void EmptyBufferL (CMMFBuffer *aBuffer, MPVDataSourceBase *aSupplier, TMediaId)=0
virtual void BufferFilledL (CMMFBuffer *aBuffer)=0
virtual TBool CanCreateSinkBuffer ()=0
virtual CMMFBuffer * CreateSinkBufferL (TMediaId, TBool &)
virtual TInt SinkThreadLogon (MAsyncEventHandler &)
virtual void SinkThreadLogoff ()
virtual TInt SinkPrimeL ()
virtual TInt SinkPlayL ()
virtual TInt SinkPauseL ()
virtual TInt SinkStopL ()

Detailed Description

MPVDataSourceBase Class

Base class for data sinks


Constructor & Destructor Documentation

MPVDataSinkBase::MPVDataSinkBase TUid    aType [inline]
 

virtual MPVDataSinkBase::~MPVDataSinkBase   [inline, virtual]
 


Member Function Documentation

virtual void MPVDataSinkBase::BufferFilledL CMMFBuffer *    aBuffer [pure virtual]
 

Method called by a data source to pass back an filled buffer to the sink

This is a pure virtual function that each derived class must implement. This method is used as the callback when the data sink actively requests a supplier ie a data source to fill a buffer by calling the data sources FillBufferL. When the data sink gets this callback it knows that the buffer has been filled and is ready to be emptied

Parameters:
aBuffer  The buffer that has been filled by a data source and is now available for processing

virtual TBool MPVDataSinkBase::CanCreateSinkBuffer   [pure virtual]
 

Method to indicate whether the data sink can create a buffer.

This is a pure virtual function that each derived class must implement.

Returns:
ETrue if the data sink can create a buffer else EFalse

virtual CMMFBuffer* MPVDataSinkBase::CreateSinkBufferL TMediaId   ,
TBool &   
[inline, virtual]
 

Returns a buffer created by the data sink

This is a pure virtual function that each derived class must implement.

Parameters:
aMediaId  This identifies the type of media eg audio or video and the stream id. This parameter is required in cases where the source can supply data of more than one media type and/or multiple strams of data.
aReference  This must be written to by the method to indicate whether the created buffer is a 'reference' buffer. A 'reference' buffer is a buffer that is owned by the sink and should be used in preference to the source buffer provided the source buffer is also not a reference buffer.
Returns:
The created buffer

virtual void MPVDataSinkBase::EmptyBufferL CMMFBuffer *    aBuffer,
MPVDataSourceBase   aSupplier,
TMediaId   
[pure virtual]
 

Method called by a MDataSource to request the data sink to empty aBuffer of data.

This is a pure virtual function that each derived class must implement. This method is used when a data sink is passively waiting for requests from a supplier ie a data source to empty a buffer. The data sink must call the BufferEmptiedL member on aSupplier when it has emptied the buffer of it's data - the data sink can either make this callback synchronously or asynchronously.

Parameters:
aBuffer  The full buffer that needs emptying of it's data
aSupplier  The data source that supplied the data. The data sink needs this to make the BufferEmptiedL callback on aSupplier to indicate to the data source that the data sink has finished with the buffer.
aMediaId  This identifies the type of media eg audio or video and the stream id. This parameter is required in cases where the source can supply data of more than one media type and/or multiple strams of data

virtual TInt MPVDataSinkBase::SinkPauseL   [inline, virtual]
 

Method to 'pause' the data sink

This is a virtual function that a derrived data sink can implement if any data sink specific action is required to 'pause'

virtual TInt MPVDataSinkBase::SinkPlayL   [inline, virtual]
 

Method to 'play' the data sink

This is a virtual function that a derrived data sink can implement if any data sink specific action is required prior to 'playing'ie the start of data transfer

virtual TInt MPVDataSinkBase::SinkPrimeL   [inline, virtual]
 

Method to 'prime' the data sink

This is a virtual function that a derrived data sink can implement if any data sink specific 'priming' is required

virtual TInt MPVDataSinkBase::SinkStopL   [inline, virtual]
 

Method to 'stop' the data sink

This is a virtual function that a derrived data sink can implement if any data sink specific action is required to 'stop'

virtual void MPVDataSinkBase::SinkThreadLogoff   [inline, virtual]
 

Method to 'logoff' the data sink from the same thread that sink consumes data in.

This method may be required as the thread that the data sink is deleted in may not be the same thread that the data transfer took place in. Therefore any thread specific releasing of resources needs to be performed in the SinkThreadLogoff rather than in the destructor

This is a virtual function that a derrived data sink can implement if any thread specific releasing of resources is required.

virtual TInt MPVDataSinkBase::SinkThreadLogon MAsyncEventHandler &    [inline, virtual]
 

Method to 'logon' the data sink to the same thread that sink will be consuming data in.

This method may be required as the thread that the data sink was created in is not always the same thread that the data transfer will take place in. Therefore any thread specific initialisation needs to be performed in the SinkThreadLogon rather than in the creation of the data sink.

This is a virtual function that a derrived data sink can implement if any thread specific initialisation is required and/or the data sink can create any asynchronous events.

Parameters:
aEventHandler  This is an MAsyncEventHandler to handle asynchronous events that occur during the transfer of multimedia data. The event handler must be in the same thread as the data transfer thread - hence the reason it is passed in the SinkThreadLogon as opposed to say the constructor.
Returns:
KErrNone if successful, otherwise a system wide error code.


The documentation for this class was generated from the following file:
PV Author Engine
Posting Version: OPENCORE_20090310