|
1 /* |
|
2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Definition of the S60 Audio Stream Source custom command msg cods. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __S60STREAMINGSOURCE_H__ |
|
20 #define __S60STREAMINGSOURCE_H__ |
|
21 |
|
22 // Standard EPOC32 includes required by this header file |
|
23 #include <e32base.h> |
|
24 #include <e32std.h> |
|
25 // DevSound includes |
|
26 //#include <d32snd.h> |
|
27 #include <e32hal.h> |
|
28 #include <e32svr.h> |
|
29 #include <implementationproxy.h> // ECom |
|
30 |
|
31 #include "S60StreamingSourceUIDs.hrh" |
|
32 |
|
33 // Public Media Server includes |
|
34 #include <mmfdatasink.h> |
|
35 #include <mmfdatasource.h> |
|
36 #include <mmfdatapath.h> |
|
37 #include <mmfdatasourcesink.hrh> |
|
38 #include <mmfaudioiointerfaceuids.hrh> |
|
39 |
|
40 #include <mmffourcc.h> |
|
41 |
|
42 // FORWARD DECLARATIONS |
|
43 class CDataBufferQueueItem; |
|
44 class CReadRequest; |
|
45 |
|
46 // CLASS DECLARATION |
|
47 |
|
48 class CS60StreamingSource : public MDataSource |
|
49 { |
|
50 public: |
|
51 IMPORT_C static CS60StreamingSource* NewL(TUid aType); |
|
52 IMPORT_C static CS60StreamingSource* NewLC(TUid aType); |
|
53 |
|
54 virtual void ConstructSourceL( const TDesC8& /*aInitData */); |
|
55 |
|
56 virtual TUid DataSourceType() const; |
|
57 virtual TFourCC SourceDataTypeCode(TMediaId /*aMediaId*/); |
|
58 virtual TInt SetSourceDataTypeCode(TFourCC /*aSourceFourCC*/, TMediaId /*aMediaId*/); |
|
59 virtual void FillBufferL(CMMFBuffer* /*aBuffer*/, MDataSink* /*aConsumer*/,TMediaId /*aMediaId*/); |
|
60 virtual void BufferEmptiedL(CMMFBuffer* /*aBuffer*/); //called by MDataSink to pass back emptied buffer to the source |
|
61 virtual TBool CanCreateSourceBuffer(); |
|
62 virtual CMMFBuffer* CreateSourceBufferL(TMediaId /*aMediaId*/, TBool &/*aReference*/); |
|
63 |
|
64 virtual CMMFBuffer* CreateSourceBufferL(TMediaId aMediaId, CMMFBuffer& /*aSinkBuffer*/, TBool &aReference); |
|
65 |
|
66 |
|
67 virtual void SourceStopL(); |
|
68 |
|
69 virtual void SourceCustomCommand(TMMFMessage& aMessage); |
|
70 |
|
71 void HandleFillBuffer(CMMFBuffer* aBuffer, MDataSink* aConsumer); |
|
72 |
|
73 IMPORT_C TBool IsSeekingSupported(); |
|
74 |
|
75 IMPORT_C TBool IsRandomSeekingSupported(); |
|
76 |
|
77 private: |
|
78 CS60StreamingSource(TUid aType); |
|
79 ~CS60StreamingSource(void); |
|
80 void ConstructL (void); |
|
81 |
|
82 private: // Data |
|
83 |
|
84 // Queue of data buffers to be processed |
|
85 TSglQue<CDataBufferQueueItem>* iDataBufferQueue; |
|
86 |
|
87 TSglQue<CReadRequest>* iReadRequestQueue; |
|
88 |
|
89 TBool iHandlingRequest; |
|
90 CReadRequest* iCurrentRequest; |
|
91 |
|
92 CDataBufferQueueItem* iSrcBuffer; |
|
93 }; |
|
94 |
|
95 #endif // __S60STREAMINGSOURCE_H__ |
|
96 |
|
97 // End of File |