1 /* |
1 /* |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2009 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". |
8 * |
8 * |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: |
14 * Description: Local timer to update position for recording |
15 * |
15 * |
16 */ |
16 */ |
17 // sfmrlocaltimer.cpp |
|
18 |
17 |
19 #include "sfmrlocaltimer.h" |
18 #include "sfmrlocaltimer.h" |
20 |
19 |
21 extern "C" { |
20 extern "C" |
|
21 { |
22 #include "xarecorditfadaptationmmf.h" |
22 #include "xarecorditfadaptationmmf.h" |
23 } |
23 } |
24 |
24 |
25 #include "cmmfbackendengine.h" |
25 #include "cmmfbackendengine.h" |
26 |
26 |
27 |
27 LocalTimer::LocalTimer(CMMFBackendEngine* parent, void* adaptContext) : |
28 LocalTimer::LocalTimer(CMMFBackendEngine* parent, void* adaptContext) |
28 CActive(CActive::EPriorityStandard), iTime(0) |
29 :CActive(CActive::EPriorityStandard), |
|
30 iTime(0) |
|
31 { |
29 { |
32 CActiveScheduler::Add(this); |
30 CActiveScheduler::Add(this); |
33 iParent = parent; |
31 iParent = parent; |
34 iAdaptContext = adaptContext; |
32 iAdaptContext = adaptContext; |
35 } |
33 } |
75 |
73 |
76 void LocalTimer::RunL() |
74 void LocalTimer::RunL() |
77 { |
75 { |
78 if (iStatus == KErrNone) |
76 if (iStatus == KErrNone) |
79 { |
77 { |
80 iTime+= iDelay; |
78 iTime += iDelay; |
81 XAuint64 position; |
79 XAuint64 position; |
82 iParent->GetRecordPosition(&position); |
80 iParent->GetRecordPosition(&position); |
83 |
81 |
84 XARecordItfAdaptMMF_PositionUpdate(iAdaptContext,position); |
82 XARecordItfAdaptMMF_PositionUpdate(iAdaptContext, position); |
85 Start(iDelay); |
83 Start(iDelay); |
86 } |
84 } |
87 } |
85 } |
88 |
86 |
89 void LocalTimer::DoCancel() |
87 void LocalTimer::DoCancel() |