15 * information which may not be disclosed to others without the |
15 * information which may not be disclosed to others without the |
16 * prior written consent of Nokia. |
16 * prior written consent of Nokia. |
17 * ============================================================================= |
17 * ============================================================================= |
18 */ |
18 */ |
19 |
19 |
20 // INCLUDE FILES |
|
21 #include <kernel/kernel.h> |
20 #include <kernel/kernel.h> |
22 #include <assp.h> |
21 #include <assp.h> |
23 |
22 |
24 #include "virtualvideohwchannel.h" |
23 #include <graphics/virtualvideohwchannel.h> |
25 #include "virtualvideohwdeviceinterface.h" |
24 #include <graphics/virtualvideohwdeviceinterface.h> |
26 #include "platsimvideodriverprotocol.h" |
25 #include <graphics/guestvideodriverprotocol.h> |
27 #include "platsimvideodrivercommon.h" |
26 #include <graphics/guestvideodrivercommon.h> |
28 #include "devicereqhandler.h" |
27 #include <graphics/devicereqhandler.h> |
|
28 |
29 #include "serializedfunctioncall.h" |
29 #include "serializedfunctioncall.h" |
30 |
|
31 |
|
32 // CONSTANTS |
|
33 // ============================ MEMBER FUNCTIONS =============================== |
|
34 |
30 |
35 // ----------------------------------------------------------------------------- |
31 // ----------------------------------------------------------------------------- |
36 // DVirtualVideoHwChannel::DVirtualVideoHwChannel |
32 // DVirtualVideoHwChannel::DVirtualVideoHwChannel |
37 // ----------------------------------------------------------------------------- |
33 // ----------------------------------------------------------------------------- |
38 // |
34 // |
111 // DVirtualVideoHwChannel::DoCreate |
107 // DVirtualVideoHwChannel::DoCreate |
112 // ----------------------------------------------------------------------------- |
108 // ----------------------------------------------------------------------------- |
113 // |
109 // |
114 TInt DVirtualVideoHwChannel::DoCreate( TInt /*aUnit*/, const TDesC* /*aInfo*/, const TVersion& aVer ) |
110 TInt DVirtualVideoHwChannel::DoCreate( TInt /*aUnit*/, const TDesC* /*aInfo*/, const TVersion& aVer ) |
115 { |
111 { |
116 using namespace PlatsimVideoDriver; |
112 using namespace GuestVideoDriver; |
117 TInt err = KErrNone; |
113 TInt err = KErrNone; |
118 |
114 |
119 if ( ! Kern::QueryVersionSupported( |
115 if ( ! Kern::QueryVersionSupported( |
120 TVersion( |
116 TVersion( |
121 KMajorVer, |
117 KMajorVer, |
174 return err; |
170 return err; |
175 } |
171 } |
176 |
172 |
177 |
173 |
178 |
174 |
|
175 #ifdef FAISALMEMON_S4_SGIMAGE |
179 TInt DVirtualVideoHwChannel::GetSgImageMetaData(TSgImageMetaData& aSgInfo, const TUint64 aId) |
176 TInt DVirtualVideoHwChannel::GetSgImageMetaData(TSgImageMetaData& aSgInfo, const TUint64 aId) |
180 { |
177 { |
181 VVHW_TRACE("DVirtualVideoHwChannel::OpenSgImageMetaData 0x%lx", aId ); |
178 VVHW_TRACE("DVirtualVideoHwChannel::OpenSgImageMetaData 0x%lx", aId ); |
182 DSgResource* sgResource = NULL; |
179 DSgResource* sgResource = NULL; |
183 TInt metaDataErr = SgExtension::FindAndOpenResource( aId, sgResource );//Open the sgimage resource |
180 TInt metaDataErr = SgExtension::FindAndOpenResource( aId, sgResource );//Open the sgimage resource |
240 err = KErrGeneral; |
238 err = KErrGeneral; |
241 } |
239 } |
242 } |
240 } |
243 break; |
241 break; |
244 } |
242 } |
|
243 #ifdef FAISALMEMON_S4_SGIMAGE |
245 case ERequestSgHandles: |
244 case ERequestSgHandles: |
246 { |
245 { |
247 VVHW_TRACE("DVirtualVideoHwChannel::DoControl - ERequestSgHandles" ); |
246 VVHW_TRACE("DVirtualVideoHwChannel::DoControl - ERequestSgHandles" ); |
248 TPckgBuf<TUint64> sgId; |
247 TPckgBuf<TUint64> sgId; |
249 err = Kern::ThreadDesRead( aUserThread, a1, sgId, 0, 0 ); |
248 err = Kern::ThreadDesRead( aUserThread, a1, sgId, 0, 0 ); |