Location:
mmfformat.h
Link against: mmfserverbaseclasses.lib
class CMMFFormatEncode : public CBase, public MDataSource, public MDataSink;
Base class from which sink formats can be derived from.
The intended usage is for controllers that can support more than one type of format. The class is an MDataSink
as far as the data path is concerned but is an MDataSource
to the clip that is the sink of the actual data. All CMMFFormatEncode plugin DLLs must include interface_uid = KMmfUidPluginInterfaceFormatEncode
in their .rss files.
MDataSink
- Abstract class representing a data sink
MDataSource
- Abstract class representing a data source
CBase
- Base class for all classes to be instantiated on the heap
CMMFFormatEncode
- Base class from which sink formats can be derived from
Defined in CMMFFormatEncode
:
AddMetaDataEntryL()
, BitRate()
, BufferEmptiedL()
, BytesPerSecond()
, CMMFFormatEncode()
, CanCreateSinkBuffer()
, CanCreateSourceBuffer()
, CreateSinkBufferL()
, CreateSourceBufferL()
, CropL()
, Duration()
, EmptyBufferL()
, FrameTimeInterval()
, GetDefaultSampleRate()
, GetNumberOfMetaDataEntriesL()
, GetSupportedBitRatesL()
, GetSupportedDataTypesL()
, GetSupportedNumChannelsL()
, GetSupportedSampleRatesL()
, ImplementationUid()
, MaximumClipSize()
, MetaDataEntryL()
, NewL()
, NewL()
, NewL()
, NewL()
, NumChannels()
, PositionL()
, RemoveMetaDataEntry()
, ReplaceMetaDataEntryL()
, SampleRate()
, SetBitRate()
, SetMaximumClipSizeL()
, SetNumChannels()
, SetPositionL()
, SetSampleRate()
, SinkDataTypeCode()
, SourceDataTypeCode()
, iClip
, iDataPath
, ~CMMFFormatEncode()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
Inherited from MDataSink
:
BufferFilledL()
,
ConstructSinkL()
,
DataSinkType()
,
NegotiateL()
,
NewSinkL()
,
SetSinkDataTypeCode()
,
SetSinkPrioritySettings()
,
SinkCustomCommand()
,
SinkPauseL()
,
SinkPlayL()
,
SinkPrimeL()
,
SinkStopL()
,
SinkThreadLogoff()
,
SinkThreadLogon()
Inherited from MDataSource
:
ConstructSourceL()
,
DataSourceType()
,
FillBufferL()
,
NegotiateSourceL()
,
NewSourceL()
,
SetSourceDataTypeCode()
,
SetSourcePrioritySettings()
,
SourceCustomCommand()
,
SourcePauseL()
,
SourcePlayL()
,
SourcePrimeL()
,
SourceSampleConvert()
,
SourceStopL()
,
SourceThreadLogoff()
,
SourceThreadLogon()
static IMPORT_C CMMFFormatEncode *NewL(TUid aUid, MDataSink *aSink);
Allocates and constructs an ECom format encode object.
|
|
static IMPORT_C CMMFFormatEncode *NewL(const TDesC &aFileName, MDataSink *aSink, const TDesC &aPreferredSupplier);
|
|
static IMPORT_C CMMFFormatEncode *NewL(const TDesC8 &aSourceHeader, MDataSink *aSink, const TDesC &aPreferredSupplier);
Attempts to locate and instantiate a CMMFFormatEncode using data in the specified buffer.
The buffer is expected to contain header data (from a file, stream or descriptor). Signatures (supplied by the plugin registry information) are sought in aSourceHeader.
|
|
static IMPORT_C CMMFFormatEncode *NewL(MDataSink *aSink, const TDesC &aPreferredSupplier);
Attempts to locate and instantiate a CMMFFormatEncode using data from aSink.
The data is expected to contain header data (from a file, stream or descriptor). Signatures (supplied by the plugin registry information) are sought in the source header.
|
|
inline TUid ImplementationUid() const;
Gets the ECom plugin UID of this format.
|
virtual TTimeIntervalMicroSeconds FrameTimeInterval(TMediaId aMediaType) const=0;
Returns the time interval for one frame for the specified media type.
This is a virtual function that each derived class must implement.
|
|
virtual TTimeIntervalMicroSeconds Duration(TMediaId aMediaType) const=0;
Returns the duration of the sink clip for the specified media type.
This is a virtual function that each derived class must implement.
|
|
inline virtual void BufferEmptiedL(CMMFBuffer *aBuffer);
Called by the clip when it has added the data to the file.
|
inline virtual TBool CanCreateSourceBuffer();
Tests whether a source buffer can be created.
The default implementation returns EFalse.
|
inline virtual CMMFBuffer *CreateSourceBufferL(TMediaId aMediaId, TBool &aReference);
Creates a source buffer. The default returns NULL.
|
|
inline virtual TFourCC SourceDataTypeCode(TMediaId aMediaId);
Returns the source data type code for the specified media type ID.
This is a virtual function that each derived class must implement.
|
|
virtual void EmptyBufferL(CMMFBuffer *aBuffer, MDataSource *aSupplier, TMediaId aMediaId)=0;
Adds a buffer to a clip.
Called by CMMFDataPath
. (from MDataSink
- CMMFFormatEncode is a MDataSink
to a CMMFDataPath
)
This is a virtual function that each derived class must implement.
|
inline virtual TBool CanCreateSinkBuffer();
Tests whether a sink buffer can be created.
Format would normally pass its own buffer onto the CMMFClip
, so this may not be required. The default returns ETrue.
|
virtual CMMFBuffer *CreateSinkBufferL(TMediaId aMediaId, TBool &aReference)=0;
Creates a sink buffer for the specified media ID.
This is a virtual function that each derived class must implement.
|
|
virtual TFourCC SinkDataTypeCode(TMediaId aMediaId)=0;
Returns the sink data type code for the specified media type ID.
This would be the same as the source data type four CC although the clip is not going to need this info.
This is a virtual function that each derived class must implement.
|
|
inline virtual void CropL(TTimeIntervalMicroSeconds aPosition, TBool aToEnd=ETrue);
This function is used to truncate the sink ie. a CMMFClip
,
If aToEnd = ETrue the sink is cropped from the aPosition to the end of the clip. If aToEnd = EFalse then the sink is cropped from the start of the clip to aPosition.
This function would be called by the CMMFController
. The default implementation leaves with KErrNotSupported.
|
inline virtual void GetNumberOfMetaDataEntriesL(TInt &aNumberOfEntries);
Gets the number of meta data entries.
The encode format is capable of reading and writing meta data to the clip.
The default implementation leaves with KErrNotSupported.
|
inline virtual CMMFMetaDataEntry *MetaDataEntryL(TInt aIndex);
Returns the specified meta data entry.
The default implementation leaves with KErrNotSupported.
|
|
inline virtual void AddMetaDataEntryL(const CMMFMetaDataEntry &aNewEntry);
Adds the specified meta data entry to the clip.
The default implementation leaves with KErrNotSupported.
|
inline virtual TInt RemoveMetaDataEntry(TInt aIndex);
Removes the specified meta data entry.
The default implementation returns KErrNotSupported.
|
|
inline virtual void ReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry &aNewEntry);
Replaces the specified meta data entry with the entry supplied in aNewEntry.
The default implementation leaves with KErrNotSupported.
|
inline virtual TInt SetNumChannels(TUint aChannels);
Sets the number of channels.
The default implementation returns KErrNotSupported.
|
|
inline virtual TInt SetSampleRate(TUint aSampleRate);
Sets the sample rate.
The default implementation returns KErrNotSupported.
|
|
inline virtual TInt SetBitRate(TUint aBitRate);
Sets the bit rate.
The default implementation returns KErrNotSupported.
|
|
inline virtual TUint NumChannels();
Returns the number of channels.
The default implementation returns 0.
|
inline virtual TUint SampleRate();
Returns the sample rate.
The default implementation returns 0.
|
inline virtual TUint GetDefaultSampleRate();
Returns the default sample rate.
The default returns 0.
|
inline virtual TUint BitRate();
Returns the bit rate.
The default returns 0.
|
inline virtual TInt64 BytesPerSecond();
Returns the bytes per second.
The default returns 0.
|
inline virtual void GetSupportedSampleRatesL(RArray< TUint > &aSampleRates);
Gets the supported sample rates.
The default implementation leaves with KErrNotSupported.
|
inline virtual void GetSupportedBitRatesL(RArray< TUint > &aBitRates);
Gets the supported bit rates.
The default implementation leaves with KErrNotSupported.
|
inline virtual void GetSupportedNumChannelsL(RArray< TUint > &aNumChannels);
Gets the supported number of channels.
The default implementation leaves with KErrNotSupported.
|
inline virtual void GetSupportedDataTypesL(TMediaId aMediaId, RArray< TFourCC > &aDataTypes);
Gets the supported data types for the given media type ID.
The default implementation leaves with KErrNotSupported.
|
inline virtual void SetMaximumClipSizeL(TInt aBytes);
Sets the maximum clip size.
The default implementation leaves with KErrNotSupported.
|
inline virtual TInt MaximumClipSize();
Returns the maximum clip size.
The default returns 0.
|
inline virtual void SetPositionL(const TTimeIntervalMicroSeconds &aPosition);
Used to set the format's position.
Subsequent data reads should ignore the FrameNumber in the CMMFBuffer
and use this setting to determine what data to provide.
The actual position the format sets itself may vary to this setting to ensure that it is aligned to the sample boundaries ensuring consistent data output.
If not supported, positional information should be extracted from the FrameNumber in CMMFBuffer
|
inline virtual TTimeIntervalMicroSeconds PositionL();
Supplies the current position.
Subsequent data reads will commence from this position.
|
protected: MDataSink * iClip;
The clip is the sink for the encode format.