1 /* |
1 /* |
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
88 TRACE_FUNC_ENTRY; |
95 TRACE_FUNC_ENTRY; |
89 |
96 |
90 User::LeaveIfError( iWsSession.Connect() ); |
97 User::LeaveIfError( iWsSession.Connect() ); |
91 |
98 |
92 iScreen = new(ELeave) CWsScreenDevice( iWsSession ); |
99 iScreen = new(ELeave) CWsScreenDevice( iWsSession ); |
93 iScreen->Construct(); |
100 User::LeaveIfError( iScreen->Construct() ); |
94 |
101 |
95 RWindowGroup wg( iWsSession ); |
102 iRootWindow = RWindowGroup(iWsSession); |
96 User::LeaveIfError( wg.Construct(reinterpret_cast<TUint32>(&wg), EFalse) ); |
103 User::LeaveIfError( iRootWindow.Construct(reinterpret_cast<TUint32>(&iWsSession), EFalse) ); |
97 CleanupClosePushL( wg ); |
104 |
98 |
105 iWindow = new(ELeave) RWindow( iWsSession ); |
99 CWindowGc* gc; |
106 User::LeaveIfError( iWindow->Construct(iRootWindow, reinterpret_cast<TUint32>(&iRootWindow) + 1) ); |
100 User::LeaveIfError( iScreen->CreateContext(gc) ); |
|
101 CleanupStack::PushL(gc); |
|
102 |
|
103 RWindow window( iWsSession ); |
|
104 User::LeaveIfError( window.Construct(wg, reinterpret_cast<TUint32>(&wg) + 1) ); |
|
105 CleanupClosePushL( window ); |
|
106 |
107 |
107 TRect temp(0,0,320,240); // dummy parameter |
108 TRect temp(0,0,320,240); // dummy parameter |
108 iVideoUtil = CVideoPlayerUtility::NewL(*this, EMdaPriorityNormal, EMdaPriorityPreferenceNone, iWsSession, *(iScreen), window, temp, temp); |
109 iVideoUtil = CVideoPlayerUtility::NewL(*this, EMdaPriorityNormal, EMdaPriorityPreferenceNone, iWsSession, *iScreen, *iWindow, temp, temp); |
109 |
|
110 CleanupStack::PopAndDestroy( &window ); |
|
111 CleanupStack::PopAndDestroy( gc ); |
|
112 CleanupStack::PopAndDestroy( &wg ); |
|
113 |
110 |
114 iTimeOut = CSconTimeOut::NewL( *this ); |
111 iTimeOut = CSconTimeOut::NewL( *this ); |
115 |
112 |
116 TRACE_FUNC_EXIT; |
113 TRACE_FUNC_EXIT; |
117 } |
114 } |