|
1 /* |
|
2 * Copyright (c) 2004 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: DisplaySink subsystem. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CDISPLAYSINKDP_H |
|
22 #define CDISPLAYSINKDP_H |
|
23 |
|
24 // INCLUDE FILES |
|
25 |
|
26 #include "CDisplaySink.h" |
|
27 #include "TDisplaySinkParamsDP.h" |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Displaysink implementation for Display Posting. |
|
33 * |
|
34 * @lib displaysink.lib |
|
35 * @since Series 60 3.1 |
|
36 */ |
|
37 NONSHARABLE_CLASS( CDisplaySinkDP ) : public CDisplaySink |
|
38 { |
|
39 public: // static constructor |
|
40 |
|
41 /** |
|
42 * Static constructor that may leave. |
|
43 */ |
|
44 static CDisplaySinkDP* NewL( TDisplaySinkParams& aParams, |
|
45 const TDesC8& aInitData ); |
|
46 |
|
47 private: // constructors and destructor |
|
48 |
|
49 /** |
|
50 * C++ default constructor. |
|
51 */ |
|
52 CDisplaySinkDP(); |
|
53 |
|
54 /** |
|
55 * destructor |
|
56 */ |
|
57 ~CDisplaySinkDP(); |
|
58 |
|
59 private: // from CDisplaySink |
|
60 |
|
61 /** |
|
62 * @see CDisplaySink::BaseConstructL |
|
63 */ |
|
64 void BaseConstructL( TDisplaySinkParams& aParams, |
|
65 const TDesC8& aInitData ); |
|
66 |
|
67 /** |
|
68 * @see CDisplaySink::BaseConvert |
|
69 */ |
|
70 TBool BaseConvert( const TVtMMFDataBuffer& aBuffer ); |
|
71 |
|
72 /** |
|
73 * @see CDisplaySink::BaseSinkThreadLogonL |
|
74 */ |
|
75 void BaseSinkThreadLogonL(); |
|
76 |
|
77 /** |
|
78 * @see CDisplaySink::BaseSinkThreadLogoff |
|
79 */ |
|
80 void BaseSinkThreadLogoff(); |
|
81 |
|
82 /** |
|
83 * @see CDisplaySink::BaseUpdateSinkParamsL |
|
84 */ |
|
85 void BaseUpdateSinkParamsL( const TDisplaySinkParams& aParams ); |
|
86 |
|
87 /** |
|
88 * @see CDisplaySink::BaseDoUpdateParamsL |
|
89 */ |
|
90 void BaseDoUpdateParamsL(); |
|
91 |
|
92 /** |
|
93 * @see CDisplaySink::BaseDoUpdateParamsL |
|
94 */ |
|
95 void BaseSetVideoFrameSizeL( const TSize& aSize ); |
|
96 |
|
97 /** |
|
98 * @see CDisplaySink::BaseSizesMatch |
|
99 */ |
|
100 TBool BaseSizesMatch( const TSize& aSize ); |
|
101 |
|
102 /** |
|
103 * @see CDisplaySink::BitmapEntry |
|
104 */ |
|
105 TBitmapEntry& BitmapEntry( TInt aIndex ); |
|
106 |
|
107 /** |
|
108 * @see CDisplaySink::BaseEmptyBufferL |
|
109 */ |
|
110 void BaseEmptyBufferL( TVtMMFDataBuffer& aVTMMFBuffer ); |
|
111 |
|
112 /** |
|
113 * @see CDisplaySink::BaseSetBitmapAvailable |
|
114 */ |
|
115 void BaseSetBitmapAvailable( TBitmapNo aBitmapNo ); |
|
116 |
|
117 /** |
|
118 * @see CDisplaySink::BaseVideoFrameSizeChangedL |
|
119 */ |
|
120 void BaseVideoFrameSizeChangedL( const TSize& aNewSize ); |
|
121 |
|
122 private: // MDisplaySink |
|
123 |
|
124 /** |
|
125 * @see MDisplaySink::NextFrame |
|
126 */ |
|
127 void NextFrame(); |
|
128 |
|
129 private: // new methods |
|
130 |
|
131 /** |
|
132 * Updates expected frame size. |
|
133 * @exception May leave with KErrNotSupported, if bitmap sizes do not match. |
|
134 */ |
|
135 void UpdateExpectedFrameSizeL(); |
|
136 |
|
137 private: // new classes |
|
138 |
|
139 // Class posting buffer related data |
|
140 class TBitmapEntryDP : public TBitmapEntry |
|
141 { |
|
142 public: // data |
|
143 |
|
144 // Pointer to Posting Buffer pointer |
|
145 CPostingSurface::TPostingBuff** iBuffer; |
|
146 }; |
|
147 |
|
148 private: // data |
|
149 |
|
150 // Array of bitmap related structures |
|
151 TBitmapEntryDP iBitmapTable[ KBitmapTableCount ]; |
|
152 |
|
153 // Store for saving new parameters in UpdateSinkParamsL() call |
|
154 TDisplaySinkParamsDP iNewParams; |
|
155 }; |
|
156 |
|
157 #endif // CDISPLAYSINKDP_H |
|
158 |
|
159 // End of File |