1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
20 #include <mmf/server/mmfclip.h>
21 #include <mmf/common/mmfutilities.h>
28 Descriptor parameters.
30 Used by CMMFDescriptor::ConstructL().
32 class TMMFDescriptorParams
36 Address of TPr8 describing source descriptor.
38 TAny* iDes ; // Address of TPr8 describing source Descriptor
42 TThreadId iDesThreadId ;
45 This member is internal and not intended for use.
54 typedef TPckgBuf<TMMFDescriptorParams> TMMFDescriptorConfig ;
60 MultiMedia framework class. Represents a client side descriptor.
61 May be source descriptor from which data is read or destination to which data is written
63 class CMMFDescriptor : public CMMFClip
68 virtual TFourCC SourceDataTypeCode( TMediaId aMediaId) ;
69 virtual void FillBufferL(CMMFBuffer* aBuffer, MDataSink* aConsumer,TMediaId aMediaId) ;//called by a MDataSink to request buffer fill
70 virtual void BufferEmptiedL( CMMFBuffer* aBuffer ) ;
71 virtual TBool CanCreateSourceBuffer() ;
72 virtual CMMFBuffer* CreateSourceBufferL(TMediaId aMediaId, TBool &aReference) ;
75 virtual TFourCC SinkDataTypeCode(TMediaId aMediaId) ; //used by data path MDataSource/Sink for codec matching
76 virtual void EmptyBufferL( CMMFBuffer* aBuffer, MDataSource* aSupplier, TMediaId aMediaId ) ;
77 virtual void BufferFilledL( CMMFBuffer* aBuffer ) ;
78 virtual TBool CanCreateSinkBuffer() ;
79 virtual CMMFBuffer* CreateSinkBufferL( TMediaId aMediaId , TBool &aReference) ;
82 virtual void ReadBufferL( TInt aLength, CMMFBuffer* aBuffer, TInt aPosition, MDataSink* aConsumer);
83 virtual void WriteBufferL( TInt aLength, CMMFBuffer* aBuffer, TInt aPosition, MDataSource* aSupplier);
84 virtual void ReadBufferL( CMMFBuffer* aBuffer, TInt aPosition, MDataSink* aConsumer) ;
85 virtual void WriteBufferL( CMMFBuffer* aBuffer, TInt aPosition, MDataSource* aSupplier) ;
86 virtual void ReadBufferL( CMMFBuffer* aBuffer, TInt aPosition) ;
87 virtual void WriteBufferL( CMMFBuffer* aBuffer, TInt aPosition) ;
88 virtual TInt64 BytesFree() ; // amount of space available for the clip
89 virtual TInt Size() ; // length of clip
90 virtual TInt SetSize( TInt aSize ); // sets the size of the clip (used mainly by crop)
93 virtual ~CMMFDescriptor() ;
94 static MDataSource* NewSourceL() ;
95 static MDataSink* NewSinkL() ;
97 void SetTransferBuffer (TBool aTBuffer) ;
98 TBool CanUseTransferBuffer () ;
101 virtual void ConstructSinkL( const TDesC8& aInitData ) ;
102 virtual void ConstructSourceL( const TDesC8& aInitData ) ;
103 void ConstructL( const TDesC8& aInitData ) ;
107 // returns the Maximum length of the descriptor
108 inline TInt MaxLength() { ASSERT( iDes ); return iDes->MaxLength(); }
110 // Need to know about the thread that the descriptor is in.
116 TFourCC iSinkFourCC ;
117 TFourCC iSourceFourCC ;
119 TBool iUseTransferBuffer ;