|
1 /* |
|
2 * Copyright (c) 2007 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MCCANYSINK_H |
|
21 #define MCCANYSINK_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32std.h> |
|
25 #include "mccdatasink.h" |
|
26 #include "mmccevents.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 |
|
30 /** |
|
31 * |
|
32 */ |
|
33 class CMccAnySink : public CMccDataSink |
|
34 { |
|
35 public: // Methods called internally or by the controller |
|
36 |
|
37 /** |
|
38 * Two-phased constructor. |
|
39 */ |
|
40 static MDataSink* NewSinkL( TUid aImplementationUid, |
|
41 const TDesC8& aInitData ); |
|
42 |
|
43 void ConstructSinkL ( const TDesC8& aInitData ); |
|
44 |
|
45 virtual ~CMccAnySink(); |
|
46 |
|
47 public: // From MDataSink |
|
48 |
|
49 TFourCC SinkDataTypeCode( TMediaId /*aMediaId*/ ); |
|
50 |
|
51 TInt SetSinkDataTypeCode( TFourCC aCodec, |
|
52 TMediaId aMedia ); |
|
53 |
|
54 void BufferEmptiedL( CMMFBuffer* aBuffer ); |
|
55 |
|
56 TBool CanCreateSinkBuffer(); |
|
57 |
|
58 CMMFBuffer* CreateSinkBufferL( TMediaId, |
|
59 TBool& aReference ); |
|
60 |
|
61 TInt SinkThreadLogon( MAsyncEventHandler& aEventHandler ); |
|
62 |
|
63 void SinkThreadLogoff(); |
|
64 |
|
65 void SinkPrimeL(); |
|
66 |
|
67 void SinkPlayL(); |
|
68 |
|
69 void SinkPauseL(); |
|
70 |
|
71 void SinkStopL(); |
|
72 |
|
73 void EmptyBufferL( CMMFBuffer* aBuffer, |
|
74 MDataSource* aProvider, |
|
75 TMediaId aMediaId ); |
|
76 |
|
77 void BufferFilledL( CMMFBuffer* aBuffer ); |
|
78 |
|
79 private: |
|
80 |
|
81 CMccAnySink(); |
|
82 |
|
83 void SendStreamEventToClient( const TMccEventType& aEventType, |
|
84 TInt aError = KErrNone ); |
|
85 |
|
86 |
|
87 private: |
|
88 |
|
89 MAsyncEventHandler* iAsyncEventHandler; |
|
90 TBool iPaused; |
|
91 TFourCC iFourCC; |
|
92 |
|
93 #ifdef EUNIT_TEST |
|
94 friend class UT_CMccAnySink; |
|
95 #endif |
|
96 }; |
|
97 |
|
98 |
|
99 #endif |
|
100 |
|
101 |
|
102 // End of file |
|
103 |