author | Sampo Huttunen <sampo.huttunen@nokia.com> |
Wed, 03 Nov 2010 11:45:09 +0200 | |
branch | IOP_Improvements |
changeset 40 | 08b5eae9f9ff |
permissions | -rw-r--r-- |
40
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
1 |
/* |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2007,2009 Nokia Corporation and/or its subsidiary(-ies). |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
8 |
* |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
11 |
* |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
13 |
* |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
14 |
* Description: Calculates playback time for rendering state machine |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
15 |
* |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
17 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
18 |
#ifndef UPNPRENDERINGPLAYTIMECALCULATOR_H |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
19 |
#define UPNPRENDERINGPLAYTIMECALCULATOR_H |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
20 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
21 |
// INCLUDES |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
22 |
#include <e32base.h> |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
23 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
24 |
// FORWARD DECLARATIONS |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
25 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
26 |
// CLASS DECLARATION |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
27 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
28 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
29 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
30 |
* A class that keeps track of playback time by setting a timestamp at given |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
31 |
* play, pause, resume and stop events and maybe also comparing that to given |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
32 |
* fixed progress positions along the way. By doing that we will be able to |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
33 |
* tell how long the track has been playing when a stop signal arrives. This |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
34 |
* is important so that we can tell if it is a natural "track complete" stop |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
35 |
* or an "user interrupt" type of stop. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
36 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
37 |
NONSHARABLE_CLASS( CUpnpRenderingPlaytimeCalculator ) |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
38 |
{ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
39 |
public: // the interface |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
40 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
41 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
42 |
* Default constructor |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
43 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
44 |
CUpnpRenderingPlaytimeCalculator(); |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
45 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
46 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
47 |
* Marks START timestamp. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
48 |
* Calling Start() will reset the calculator. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
49 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
50 |
void Start(); |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
51 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
52 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
53 |
* Marks PAUSE timestamp. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
54 |
* Can be called multiple times, ceach Pause will replace previous mark. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
55 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
56 |
void Pause(); |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
57 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
58 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
59 |
* Marks RESUME timestamp. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
60 |
* Can NOT be called multiple times. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
61 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
62 |
void Resume(); |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
63 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
64 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
65 |
* Marks STOP timestamp. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
66 |
* Can be called multiple times. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
67 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
68 |
void Stop(); |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
69 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
70 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
71 |
* Sets the track duration as it is represented in the media server. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
72 |
* This method should be used to set the initial duration so that |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
73 |
* the calculator works even if renderer NEVER sends position info. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
74 |
* @param aDuration track duration in milliseconds |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
75 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
76 |
void SetDuration( TInt aDuration ); |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
77 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
78 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
79 |
* Returns the track duration if it is known, otherwise KErrNotFound. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
80 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
81 |
TInt Duration() const; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
82 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
83 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
84 |
* Acknowledges track duration and position info that was received from |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
85 |
* the renderer. Following things are done here: |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
86 |
* 1. The renderer's understanding of duration might be different from |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
87 |
* media server's understanding. If it is, we MAY modify it. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
88 |
* 2. The position is compared to the calculated position and if it is |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
89 |
* different, an offset is calculated and used in future Position calls. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
90 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
91 |
void AcknowledgePositionInfo( TInt aDuration, TInt aPosition ); |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
92 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
93 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
94 |
* Estimates position now, or returns total playtime of previous track. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
95 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
96 |
TInt Position() const; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
97 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
98 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
99 |
* returns true if last track track playtime would indicate that it was |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
100 |
* played back entirely. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
101 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
102 |
TBool IsTrackComplete() const; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
103 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
104 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
105 |
* Returns true if calculator is in playing state. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
106 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
107 |
TBool IsPlaying() const; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
108 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
109 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
110 |
* Adjust the start mark according to the new postion; use case is seek |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
111 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
112 |
void RestartAt( TInt aNewPosition ); |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
113 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
114 |
private: |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
115 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
116 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
117 |
* calculates playtime estimate starting from PLAY mark until given time, |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
118 |
* tacking in account all time spent in PAUSE and also cinsidering offset. |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
119 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
120 |
TInt PositionAt( TTime& aTime ) const; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
121 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
122 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
123 |
* calculates time spent in pause |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
124 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
125 |
TInt PausetimeAt( TTime& aTime ) const; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
126 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
127 |
/** |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
128 |
* calculates the offset from current time and the position |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
129 |
*/ |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
130 |
TInt OffsetFromNow( TInt aPosition ) const; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
131 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
132 |
private: |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
133 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
134 |
// duration of the track |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
135 |
TInt iDuration; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
136 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
137 |
// the start timestamp |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
138 |
TTime iStartMark; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
139 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
140 |
// the stop timestamp |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
141 |
TTime iStopMark; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
142 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
143 |
// the pause mark |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
144 |
TTime iPauseMark; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
145 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
146 |
// total time spent in pause |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
147 |
TInt iPauseTime; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
148 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
149 |
// the offset to real position |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
150 |
TInt iOffset; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
151 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
152 |
// is a track playing |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
153 |
TBool iPlaying; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
154 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
155 |
// is track paused |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
156 |
TBool iPaused; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
157 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
158 |
}; |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
159 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
160 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
161 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
162 |
#endif // UPNPRENDERINGPLAYTIMECALCULATOR_H |
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
163 |
|
08b5eae9f9ff
merge from Nokia's internal development branch
Sampo Huttunen <sampo.huttunen@nokia.com>
parents:
diff
changeset
|
164 |
// End of File |