Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

MPVDataSourceBase Class Reference

#include <pv_plugin_interfaces.h>

Inheritance diagram for MPVDataSourceBase:

MPVDataSource MPVDataSourceAndSink

Public Methods

 MPVDataSourceBase (TUid aType)
virtual ~MPVDataSourceBase ()
virtual void FillBufferL (CMMFBuffer *aBuffer, MPVDataSinkBase *aConsumer, TMediaId)=0
virtual void BufferEmptiedL (CMMFBuffer *aBuffer)=0
virtual TBool CanCreateSourceBuffer ()=0
virtual CMMFBuffer * CreateSourceBufferL (TMediaId, TBool &)
virtual CMMFBuffer * CreateSourceBufferL (TMediaId, CMMFBuffer &, TBool &)
virtual TInt SourceThreadLogon (MAsyncEventHandler &)
virtual void SourceThreadLogoff ()
virtual TInt SourcePrimeL ()
virtual TInt SourcePlayL ()
virtual TInt SourcePauseL ()
virtual TInt SourceStopL ()

Detailed Description

MPVDataSourceBase Class

Base class for data sources


Constructor & Destructor Documentation

MPVDataSourceBase::MPVDataSourceBase TUid    aType [inline]
 

virtual MPVDataSourceBase::~MPVDataSourceBase   [inline, virtual]
 


Member Function Documentation

virtual void MPVDataSourceBase::BufferEmptiedL CMMFBuffer *    aBuffer [pure virtual]
 

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

This is a pure virtual function that each derived class must implement. This method is used as the callback when the data source actively requests a consumer ie a data sink to empty a buffer by calling the data sinks EmptyBufferL. When the data source gets this callback it knows that the buffer has been emptied and can be reused

Parameters:
aBuffer  The buffer that has been emptied by a data sink and is now available for reuse

virtual TBool MPVDataSourceBase::CanCreateSourceBuffer   [pure virtual]
 

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

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

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

virtual CMMFBuffer* MPVDataSourceBase::CreateSourceBufferL TMediaId   ,
CMMFBuffer &   ,
TBool &   
[inline, virtual]
 

Returns a buffer created by the data source

This is a virtual function that a derived class can implement. This can be used in preference to the above CreateSourceBufferL method in cases where the source buffer creation has a dependancy on the sink buffer

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 eg a multimedia file
aSinkBuffer  The sink buffer the nature of which may influence the creation of the source buffer
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 source and should be used in preference to the sink buffer provided the sink buffer is not a reference buffer
Returns:
The created buffer

virtual CMMFBuffer* MPVDataSourceBase::CreateSourceBufferL TMediaId   ,
TBool &   
[inline, virtual]
 

Returns a buffer created by the data source

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 eg a multimedia file
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 source and should be used in preference to the sink buffer provided the sink buffer is also not a reference buffer
Returns:
The created buffer

virtual void MPVDataSourceBase::FillBufferL CMMFBuffer *    aBuffer,
MPVDataSinkBase   aConsumer,
TMediaId   
[pure virtual]
 

Method called by a MDataSink to request the data source to fill aBuffer with data.

This is a pure virtual function that each derived class must implement. This method is used when a data source is passively waiting for requests from a consumer ie a data sink to fill a buffer. The data source must call the BufferFilledL member on aConsumer when it has filled the buffer with data - the data source can either make this callback synchronously or asynchronously.

Parameters:
aBuffer  The buffer that needs filling with data
aConsumer  The data sink that consumes the data. The data source needs this to make the BufferFilledL callback on aConsumer when the data source has completed filling the aBuffer.
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 eg a multimedia file

virtual TInt MPVDataSourceBase::SourcePauseL   [inline, virtual]
 

Method to 'pause' the data source

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

virtual TInt MPVDataSourceBase::SourcePlayL   [inline, virtual]
 

Method to 'play' the data source

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

virtual TInt MPVDataSourceBase::SourcePrimeL   [inline, virtual]
 

Method to 'prime' the data source

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

virtual TInt MPVDataSourceBase::SourceStopL   [inline, virtual]
 

Method to 'stop' the data source

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

virtual void MPVDataSourceBase::SourceThreadLogoff   [inline, virtual]
 

Method to 'logoff' the data source from the same thread that source supplies data in.

This method may be required as the thread that the data source 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 SourceThreadLogoff rather than in the destructor

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

virtual TInt MPVDataSourceBase::SourceThreadLogon MAsyncEventHandler &    [inline, virtual]
 

Method to 'logon' the data source to the same thread that source will be supplying data in.

This method may be required as the thread that the data source 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 SourceThreadLogon rather than in the creation of the data source.

This is a virtual function that a derrived data source can implement if any thread specific initialisation is required and/or the data source 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 SourceThreadLogon 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