50
|
1 |
/*
|
|
2 |
|
|
3 |
* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
|
|
4 |
|
|
5 |
* All rights reserved.
|
|
6 |
|
|
7 |
* This component and the accompanying materials are made available
|
|
8 |
|
|
9 |
* under the terms of "Eclipse Public License v1.0"
|
|
10 |
|
|
11 |
* which accompanies this distribution, and is available
|
|
12 |
|
|
13 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
14 |
|
|
15 |
*
|
|
16 |
|
|
17 |
* Initial Contributors:
|
|
18 |
|
|
19 |
* Nokia Corporation - initial contribution.
|
|
20 |
|
|
21 |
*
|
|
22 |
|
|
23 |
* Contributors:
|
|
24 |
|
|
25 |
*
|
|
26 |
|
|
27 |
* Description: Class definition for the frame table functions.
|
|
28 |
|
|
29 |
*
|
|
30 |
|
|
31 |
*/
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
// INCLUDES
|
|
38 |
|
|
39 |
#include "FrameTable.h"
|
|
40 |
|
|
41 |
#include "DebugMacros.h"
|
|
42 |
|
|
43 |
#include <e32debug.h>
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
// CONSTANTS
|
|
48 |
|
|
49 |
const TInt KLowResPeriodMs = 1000; // approximate interval for entries stored in low res table is 1 sec
|
|
50 |
|
|
51 |
const TInt KHighResLengthMs = 5000; // approximate cummulative Length of the enteries stored in the high res table is 5 sec
|
|
52 |
|
|
53 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
54 |
|
|
55 |
|
|
56 |
|
|
57 |
// -----------------------------------------------------------------------------
|
|
58 |
|
|
59 |
// CFrameTable::CFrameTable
|
|
60 |
|
|
61 |
// C++ default constructor can NOT contain any code, that
|
|
62 |
|
|
63 |
// might leave.
|
|
64 |
|
|
65 |
// -----------------------------------------------------------------------------
|
|
66 |
|
|
67 |
//
|
|
68 |
|
|
69 |
CFrameTable::CFrameTable()
|
|
70 |
|
|
71 |
{
|
|
72 |
|
|
73 |
}
|
|
74 |
|
|
75 |
|
|
76 |
|
|
77 |
// -----------------------------------------------------------------------------
|
|
78 |
|
|
79 |
// CFrameTable::ConstructL
|
|
80 |
|
|
81 |
// Symbian 2nd phase constructor can leave.
|
|
82 |
|
|
83 |
// -----------------------------------------------------------------------------
|
|
84 |
|
|
85 |
//
|
|
86 |
|
|
87 |
void CFrameTable::ConstructL()
|
|
88 |
|
|
89 |
{
|
|
90 |
|
|
91 |
DP0(_L("CFrameTable::ConstructL"));
|
|
92 |
|
|
93 |
SetSourceReference(0,0);
|
|
94 |
|
|
95 |
}
|
|
96 |
|
|
97 |
|
|
98 |
|
|
99 |
// -----------------------------------------------------------------------------
|
|
100 |
|
|
101 |
// CFrameTable::NewL
|
|
102 |
|
|
103 |
// Two-phased constructor.
|
|
104 |
|
|
105 |
// -----------------------------------------------------------------------------
|
|
106 |
|
|
107 |
//
|
|
108 |
|
|
109 |
EXPORT_C CFrameTable* CFrameTable::NewL()
|
|
110 |
|
|
111 |
{
|
|
112 |
|
|
113 |
DP0(_L("CFrameTable::NewL"));
|
|
114 |
|
|
115 |
|
|
116 |
|
|
117 |
CFrameTable* self = new(ELeave) CFrameTable;
|
|
118 |
|
|
119 |
CleanupStack::PushL(self);
|
|
120 |
|
|
121 |
self->ConstructL();
|
|
122 |
|
|
123 |
CleanupStack::Pop(self);
|
|
124 |
|
|
125 |
return self;
|
|
126 |
|
|
127 |
}
|
|
128 |
|
|
129 |
|
|
130 |
|
|
131 |
// -----------------------------------------------------------------------------
|
|
132 |
|
|
133 |
// CFrameTable::~CFrameTable
|
|
134 |
|
|
135 |
// -----------------------------------------------------------------------------
|
|
136 |
|
|
137 |
//
|
|
138 |
|
|
139 |
EXPORT_C CFrameTable::~CFrameTable()
|
|
140 |
|
|
141 |
{
|
|
142 |
|
|
143 |
DP0(_L("CFrameTable::~CFrameTable"));
|
|
144 |
|
|
145 |
iFrameTable.Close();
|
|
146 |
|
|
147 |
iLowResFrameTable.Close();
|
|
148 |
|
|
149 |
}
|
|
150 |
|
|
151 |
|
|
152 |
|
|
153 |
// -----------------------------------------------------------------------------
|
|
154 |
|
|
155 |
// CFrameTable::InitFrameTable
|
|
156 |
|
|
157 |
// -----------------------------------------------------------------------------
|
|
158 |
|
|
159 |
//
|
|
160 |
|
|
161 |
EXPORT_C TInt CFrameTable::InitFrameTable(TInt aSampleRate, TInt aSamplesPerFrame)
|
|
162 |
|
|
163 |
{ // this is only intended to be used at the very beginning of play since it clears the table
|
|
164 |
|
|
165 |
DP2(_L("CFrameTable::InitFrameTable aSampleRate[%d], aSamplesPerFrame[%d]"), aSampleRate, aSamplesPerFrame);
|
|
166 |
|
|
167 |
TInt status = KErrNone;
|
|
168 |
|
|
169 |
ResetTable();
|
|
170 |
|
|
171 |
iSampleRate = aSampleRate;
|
|
172 |
|
|
173 |
iSamplesPerFrame = aSamplesPerFrame;
|
|
174 |
|
|
175 |
|
|
176 |
|
|
177 |
if ((iSampleRate> 0) && (iSamplesPerFrame> 0))
|
|
178 |
|
|
179 |
{
|
|
180 |
|
|
181 |
iMsecPerFrame = (iSamplesPerFrame*1000)/iSampleRate;
|
|
182 |
|
|
183 |
iFramesPerLowResInterval = ((iSampleRate*KLowResPeriodMs/1000) / iSamplesPerFrame);
|
|
184 |
|
|
185 |
iLowResIntervalMs = (iSamplesPerFrame*1000*iFramesPerLowResInterval)/iSampleRate;
|
|
186 |
|
|
187 |
}
|
|
188 |
|
|
189 |
else
|
|
190 |
|
|
191 |
{
|
|
192 |
|
|
193 |
status = KErrArgument;
|
|
194 |
|
|
195 |
}
|
|
196 |
|
|
197 |
|
|
198 |
|
|
199 |
return status;
|
|
200 |
|
|
201 |
}
|
|
202 |
|
|
203 |
|
|
204 |
|
|
205 |
// 0 1 2 3 4
|
|
206 |
|
|
207 |
// -----------------------------------------------------------------------------
|
|
208 |
|
|
209 |
// CFrameTable::SubmitTableEntry
|
|
210 |
|
|
211 |
// -----------------------------------------------------------------------------
|
|
212 |
|
|
213 |
//
|
|
214 |
|
|
215 |
// The table will always have contiguous frames in it.
|
|
216 |
|
|
217 |
EXPORT_C TInt CFrameTable::SubmitTableEntry(TUint aPos)
|
|
218 |
|
|
219 |
{
|
|
220 |
|
|
221 |
DP2(_L("CFrameTable::SubmitTableEntry aPos[%u], event pos[%u]"), aPos, iPosEventMs);
|
|
222 |
|
|
223 |
TInt status = KErrNone;
|
|
224 |
|
|
225 |
TBufRefPosEntry lastEntry;
|
|
226 |
|
|
227 |
lastEntry.iPos = 0;
|
|
228 |
|
|
229 |
TBufRefPosEntry bufRefPos;
|
|
230 |
|
|
231 |
TUint frameNum;
|
|
232 |
|
|
233 |
|
|
234 |
|
|
235 |
TUint pos = aPos+iOffset; // pos = absolute position (not including any header)
|
|
236 |
|
|
237 |
|
|
238 |
|
|
239 |
if (aPos> 0)
|
|
240 |
|
|
241 |
{
|
|
242 |
|
|
243 |
iCurrentFrameCount++; // not a total frame count, but count from last reference set
|
|
244 |
|
|
245 |
DP1(_L("CFrameTable::SubmitTableEntry iCurrentFrameCount[%u]"), iCurrentFrameCount);
|
|
246 |
|
|
247 |
}
|
|
248 |
|
|
249 |
|
|
250 |
|
|
251 |
TUint numEntries = iFrameTable.Count(); // this table will stay short - seeking backward resets it
|
|
252 |
|
|
253 |
|
|
254 |
|
|
255 |
if (numEntries == 0)
|
|
256 |
|
|
257 |
{ // table gets reset if seeking in source
|
|
258 |
|
|
259 |
bufRefPos.iPos = pos;
|
|
260 |
|
|
261 |
bufRefPos.iFrameNum = iFrameNum; // first frame num is 0 so calculations for time 0 would point to frame 0
|
|
262 |
|
|
263 |
status = iFrameTable.Append(bufRefPos);
|
|
264 |
|
|
265 |
ASSERT(status == KErrNone);
|
|
266 |
|
|
267 |
numEntries = 1;
|
|
268 |
|
|
269 |
DP2(_L("CFrameTable::SubmitTableEntry init pos[%u] framenum[%u]"), pos, iFrameNum);
|
|
270 |
|
|
271 |
}
|
|
272 |
|
|
273 |
else
|
|
274 |
|
|
275 |
{
|
|
276 |
|
|
277 |
lastEntry = iFrameTable[numEntries-1];
|
|
278 |
|
|
279 |
|
|
280 |
|
|
281 |
if (pos> lastEntry.iPos)
|
|
282 |
|
|
283 |
{
|
|
284 |
|
|
285 |
frameNum = lastEntry.iFrameNum + 1;
|
|
286 |
|
|
287 |
bufRefPos.iPos = pos;
|
|
288 |
|
|
289 |
bufRefPos.iFrameNum = frameNum;
|
|
290 |
|
|
291 |
|
|
292 |
|
|
293 |
DP3 (_L ("CFrameTable::SubmitTableEntry, new entry iPos[%u], iFrameNum[%u], cnt[%u]"), bufRefPos.iPos, bufRefPos.iFrameNum, numEntries+1);
|
|
294 |
|
|
295 |
|
|
296 |
|
|
297 |
status = iFrameTable.Append(bufRefPos);
|
|
298 |
|
|
299 |
ASSERT(status == KErrNone);
|
|
300 |
|
|
301 |
if(!iOkToShrink)
|
|
302 |
{
|
|
303 |
if( iFrameTable.Count() >= ( KHighResLengthMs / iMsecPerFrame ) )
|
|
304 |
{
|
|
305 |
DP0(_L("CFrameTable::SubmitTableEntry iOkToShrink = ETrue now"));
|
|
306 |
iOkToShrink = ETrue;
|
|
307 |
}
|
|
308 |
}
|
|
309 |
else
|
|
310 |
{
|
|
311 |
iFrameTable.Remove(0);
|
|
312 |
}
|
|
313 |
|
|
314 |
}
|
|
315 |
|
|
316 |
else
|
|
317 |
|
|
318 |
{
|
|
319 |
|
|
320 |
status = KErrArgument;
|
|
321 |
|
|
322 |
}
|
|
323 |
|
|
324 |
}
|
|
325 |
|
|
326 |
|
|
327 |
|
|
328 |
if (status == KErrNone)
|
|
329 |
|
|
330 |
{
|
|
331 |
|
|
332 |
SubmitLowResTableEntry(bufRefPos); // do this before events are detected below
|
|
333 |
|
|
334 |
|
|
335 |
|
|
336 |
// total average bitrate - not instantaneous bitrate - used for duration calculation
|
|
337 |
|
|
338 |
if (pos> iLastBytePos)
|
|
339 |
|
|
340 |
{ // don't recalculate if we rewind
|
|
341 |
|
|
342 |
iLastBytePos = pos; // pos is absolute position - relative to the start of actual data content (not file start - no metadata) as set by the user. User maintains metadata offsets.
|
|
343 |
|
|
344 |
TUint totalTimeMs = bufRefPos.iFrameNum*iMsecPerFrame; // total time in the table
|
|
345 |
|
|
346 |
DP1(_L("CFrameTable::SubmitTableEntry totalTimeMs[%u]"), totalTimeMs);
|
|
347 |
|
|
348 |
if (totalTimeMs> 0)
|
|
349 |
|
|
350 |
{
|
|
351 |
|
|
352 |
// cast calculation to TIn64 or it could lose precision
|
|
353 |
|
|
354 |
TUint64 p = pos;
|
|
355 |
|
|
356 |
p = p*8*1000;
|
|
357 |
|
|
358 |
TUint64 t = totalTimeMs;
|
|
359 |
|
|
360 |
iAvgBitrate = p/t;
|
|
361 |
|
|
362 |
}
|
|
363 |
|
|
364 |
}
|
|
365 |
|
|
366 |
}
|
|
367 |
|
|
368 |
|
|
369 |
|
|
370 |
// need to convert current position to time
|
|
371 |
|
|
372 |
TInt currentTimeMs = iCurrentFrameCount*iMsecPerFrame + iTimeRefMs; // current time position being played
|
|
373 |
|
|
374 |
DP3(_L("CFrameTable::SubmitTableEntry current calculated time ms[%u] iCurrentFrameCount[%u] timeref[%u]"), currentTimeMs, iCurrentFrameCount, iTimeRefMs);
|
|
375 |
|
|
376 |
if (iPosEventMs> 0)
|
|
377 |
|
|
378 |
{ // used for seeking
|
|
379 |
|
|
380 |
if (currentTimeMs >= iPosEventMs)
|
|
381 |
|
|
382 |
{
|
|
383 |
|
|
384 |
iPosEventMs = 0;
|
|
385 |
|
|
386 |
DP0(_L("CFrameTable::SubmitTableEntry handle event pos reached"));
|
|
387 |
|
|
388 |
iEventPos = pos;
|
|
389 |
|
|
390 |
iObserver->HandleFrameTableEvent(EPosReached);
|
|
391 |
|
|
392 |
}
|
|
393 |
|
|
394 |
}
|
|
395 |
|
|
396 |
|
|
397 |
|
|
398 |
if (iPlayWindowEndPosEventMs> 0)
|
|
399 |
|
|
400 |
{
|
|
401 |
|
|
402 |
if (currentTimeMs >= iPlayWindowEndPosEventMs)
|
|
403 |
|
|
404 |
{
|
|
405 |
|
|
406 |
iPlayWindowEndPosEventMs = 0;
|
|
407 |
|
|
408 |
DP0(_L("CFrameTable::SubmitTableEntry handle event play window end pos reached"));
|
|
409 |
|
|
410 |
iObserver->HandleFrameTableEvent(EPlayWindowEndPosReached);
|
|
411 |
|
|
412 |
}
|
|
413 |
|
|
414 |
}
|
|
415 |
|
|
416 |
|
|
417 |
|
|
418 |
if (iIntervalEvent> 0)
|
|
419 |
|
|
420 |
{
|
|
421 |
|
|
422 |
if (iIntervalRef == 0)
|
|
423 |
|
|
424 |
{
|
|
425 |
|
|
426 |
iIntervalRef = currentTimeMs;
|
|
427 |
|
|
428 |
}
|
|
429 |
|
|
430 |
|
|
431 |
|
|
432 |
if ((currentTimeMs - iIntervalRef) >= iIntervalEvent)
|
|
433 |
|
|
434 |
{
|
|
435 |
|
|
436 |
iIntervalRef = currentTimeMs;
|
|
437 |
|
|
438 |
iObserver->HandleFrameTableEvent(EDecodeInterval);
|
|
439 |
|
|
440 |
}
|
|
441 |
|
|
442 |
}
|
|
443 |
|
|
444 |
|
|
445 |
|
|
446 |
DP1 (_L ("CFrameTable::SubmitTableEntry, avgBitRate[%u]"), iAvgBitrate);
|
|
447 |
|
|
448 |
return status;
|
|
449 |
|
|
450 |
}
|
|
451 |
|
|
452 |
|
|
453 |
|
|
454 |
TInt CFrameTable::SubmitLowResTableEntry(TBufRefPosEntry& aEntry)
|
|
455 |
|
|
456 |
{
|
|
457 |
|
|
458 |
TInt status = KErrNone;
|
|
459 |
|
|
460 |
TBufRefPosEntry lastEntry;
|
|
461 |
|
|
462 |
|
|
463 |
|
|
464 |
TUint numEntries = iLowResFrameTable.Count();
|
|
465 |
|
|
466 |
if (numEntries == 0)
|
|
467 |
|
|
468 |
{
|
|
469 |
|
|
470 |
status = iLowResFrameTable.Append(aEntry);
|
|
471 |
|
|
472 |
ASSERT(status == KErrNone);
|
|
473 |
|
|
474 |
return status;
|
|
475 |
|
|
476 |
}
|
|
477 |
|
|
478 |
|
|
479 |
|
|
480 |
lastEntry = iLowResFrameTable[numEntries-1];
|
|
481 |
|
|
482 |
|
|
483 |
|
|
484 |
ASSERT(aEntry.iFrameNum <= lastEntry.iFrameNum + iFramesPerLowResInterval);
|
|
485 |
|
|
486 |
// note that 0 position table entries can be submitted to the table before it is initialized.
|
|
487 |
|
|
488 |
// If this happens, iFramesPerLowResInterval would still be 0 and the same entry might be appended again
|
|
489 |
|
|
490 |
// so we have a check to make sure that doesn't happen.
|
|
491 |
|
|
492 |
if ((aEntry.iFrameNum == lastEntry.iFrameNum + iFramesPerLowResInterval) &&
|
|
493 |
|
|
494 |
(iFramesPerLowResInterval != 0))
|
|
495 |
|
|
496 |
{
|
|
497 |
|
|
498 |
DP3 (_L ("CFrameTable::SubmitLowResTableEntry, new entry aEntry.iFrameNum[%u], lastEntry.iFrameNum[%u], iFramesPerLowResInterval[%u]"), aEntry.iFrameNum, lastEntry.iFrameNum, iFramesPerLowResInterval);
|
|
499 |
|
|
500 |
DP3 (_L ("CFrameTable::SubmitLowResTableEntry, new entry iPos[%u], iFrameNum[%u], cnt[%u]"), aEntry.iPos, aEntry.iFrameNum, numEntries+1);
|
|
501 |
|
|
502 |
|
|
503 |
|
|
504 |
status = iLowResFrameTable.Append(aEntry);
|
|
505 |
|
|
506 |
ASSERT(status == KErrNone);
|
|
507 |
|
|
508 |
}
|
|
509 |
|
|
510 |
else
|
|
511 |
|
|
512 |
{
|
|
513 |
|
|
514 |
status = KErrArgument;
|
|
515 |
|
|
516 |
}
|
|
517 |
|
|
518 |
|
|
519 |
|
|
520 |
return status;
|
|
521 |
|
|
522 |
}
|
|
523 |
|
|
524 |
|
|
525 |
|
|
526 |
// -----------------------------------------------------------------------------
|
|
527 |
|
|
528 |
// CFrameTable::FindFramePosFromTime
|
|
529 |
|
|
530 |
// -----------------------------------------------------------------------------
|
|
531 |
|
|
532 |
//
|
|
533 |
|
|
534 |
/*
|
|
535 |
|
|
536 |
Looks in the table for the frame position associated with the given time.
|
|
537 |
|
|
538 |
It will return the position and also the time for that frame.
|
|
539 |
|
|
540 |
If not found, an error will be returned, and the time and position will be
|
|
541 |
|
|
542 |
the closest available in the table.
|
|
543 |
|
|
544 |
*/
|
|
545 |
|
|
546 |
EXPORT_C TInt CFrameTable::FindFramePosFromTime(TUint& aTimeMs, TUint& aPos)
|
|
547 |
|
|
548 |
{
|
|
549 |
|
|
550 |
DP2(_L("CFrameTable::FindFramePosFromTime time[%u], pos[%u]"), aTimeMs, aPos);
|
|
551 |
|
|
552 |
TInt stat = KErrNone;
|
|
553 |
|
|
554 |
// TUint in msec can represent 1193 hours
|
|
555 |
|
|
556 |
TInt tableIndex;
|
|
557 |
|
|
558 |
|
|
559 |
|
|
560 |
// special case for time = 0
|
|
561 |
|
|
562 |
if (aTimeMs == 0)
|
|
563 |
|
|
564 |
{
|
|
565 |
|
|
566 |
aPos = 0;
|
|
567 |
|
|
568 |
DP0(_L("CFrameTable::FindFramePosFromTime time=0 pos=0"));
|
|
569 |
|
|
570 |
return KErrNone;
|
|
571 |
|
|
572 |
}
|
|
573 |
|
|
574 |
|
|
575 |
|
|
576 |
TUint countlr = iLowResFrameTable.Count();
|
|
577 |
|
|
578 |
if ((countlr == 0) || (iMsecPerFrame == 0))
|
|
579 |
|
|
580 |
{
|
|
581 |
|
|
582 |
DP2(_L("CFrameTable::FindFramePosFromTime not ready countlr[%u] iMsecPerFrame[%u]"), countlr, iMsecPerFrame);
|
|
583 |
|
|
584 |
return KErrNotReady;
|
|
585 |
|
|
586 |
}
|
|
587 |
|
|
588 |
TUint frame = aTimeMs/iMsecPerFrame; // calc frame number
|
|
589 |
|
|
590 |
DP1(_L("CFrameTable::FindFramePosFromTime looking for frame[%u]"), frame);
|
|
591 |
|
|
592 |
|
|
593 |
|
|
594 |
// check hi-res table first
|
|
595 |
|
|
596 |
TUint count = iFrameTable.Count();
|
|
597 |
|
|
598 |
if (count == 0)
|
|
599 |
|
|
600 |
{
|
|
601 |
|
|
602 |
stat = KErrNotFound; // use low-res table
|
|
603 |
|
|
604 |
}
|
|
605 |
|
|
606 |
else
|
|
607 |
|
|
608 |
{
|
|
609 |
|
|
610 |
TUint frame0 = iFrameTable[0].iFrameNum; // first frame available (table can shrink)
|
|
611 |
|
|
612 |
DP1(_L("CFrameTable::FindFramePosFromTime frame0[%u]"), frame0);
|
|
613 |
|
|
614 |
if (frame >= frame0) // frame might be in table
|
|
615 |
|
|
616 |
|
|
617 |
|
|
618 |
{
|
|
619 |
|
|
620 |
tableIndex = frame - frame0; // calc index into table
|
|
621 |
|
|
622 |
DP1(_L("CFrameTable::FindFramePosFromTime tableIndex[%u]"), tableIndex);
|
|
623 |
|
|
624 |
if (tableIndex >= count)
|
|
625 |
|
|
626 |
{
|
|
627 |
|
|
628 |
stat = KErrNotFound; // use low-res table
|
|
629 |
|
|
630 |
DP0(_L("CFrameTable::FindFramePosFromTime not found in hi-res"));
|
|
631 |
|
|
632 |
}
|
|
633 |
|
|
634 |
else
|
|
635 |
|
|
636 |
{
|
|
637 |
|
|
638 |
aPos = iFrameTable[tableIndex].iPos;
|
|
639 |
|
|
640 |
iFrameNum = iFrameTable[tableIndex].iFrameNum; // iFrameNum provides frame num after hi-res table is reset
|
|
641 |
|
|
642 |
aTimeMs = iFrameNum * iMsecPerFrame;
|
|
643 |
|
|
644 |
DP4(_L("CFrameTable::FindFramePosFromTime aTimeMs[%u] iFrameNum[%u] iSamplesPerFrame[%u] iSampleRate[%u]"),
|
|
645 |
|
|
646 |
aTimeMs,iFrameNum,iSamplesPerFrame,iSampleRate);
|
|
647 |
|
|
648 |
}
|
|
649 |
|
|
650 |
}
|
|
651 |
|
|
652 |
else
|
|
653 |
|
|
654 |
{
|
|
655 |
|
|
656 |
stat = KErrNotFound; // use low-res table
|
|
657 |
|
|
658 |
}
|
|
659 |
|
|
660 |
}
|
|
661 |
|
|
662 |
if (stat == KErrNotFound)
|
|
663 |
|
|
664 |
{ // check low-res table
|
|
665 |
|
|
666 |
DP0(_L("CFrameTable::FindFramePosFromTime looking in low-res table"));
|
|
667 |
|
|
668 |
if (iFramesPerLowResInterval> 0)
|
|
669 |
|
|
670 |
{ // first frame is always 0 in low res table - don't need to subtract frame[0]
|
|
671 |
|
|
672 |
tableIndex = frame/iFramesPerLowResInterval; // calc index into table
|
|
673 |
|
|
674 |
DP3(_L("CFrameTable::FindFramePosFromTime tableIndex[%d] frame[%u] iFramesPerLowResInterval[%u]"),
|
|
675 |
|
|
676 |
tableIndex,frame,iFramesPerLowResInterval);
|
|
677 |
|
|
678 |
if (tableIndex < countlr)
|
|
679 |
|
|
680 |
{
|
|
681 |
|
|
682 |
aPos = iLowResFrameTable[tableIndex].iPos;
|
|
683 |
|
|
684 |
iFrameNum = iLowResFrameTable[tableIndex].iFrameNum; // iFrameNum provides frame num after hi-res table is reset
|
|
685 |
|
|
686 |
aTimeMs = iFrameNum * iMsecPerFrame;
|
|
687 |
|
|
688 |
stat = KErrNone;
|
|
689 |
|
|
690 |
}
|
|
691 |
|
|
692 |
}
|
|
693 |
|
|
694 |
}
|
|
695 |
|
|
696 |
|
|
697 |
|
|
698 |
if (stat == KErrNotFound)
|
|
699 |
|
|
700 |
{ // use last in low-res table
|
|
701 |
|
|
702 |
aPos = iLowResFrameTable[countlr-1].iPos;
|
|
703 |
|
|
704 |
iFrameNum = iLowResFrameTable[countlr-1].iFrameNum; // iFrameNum provides frame num after hi-res table is reset
|
|
705 |
|
|
706 |
aTimeMs = iFrameNum * iMsecPerFrame;
|
|
707 |
|
|
708 |
}
|
|
709 |
|
|
710 |
DP4(_L("CFrameTable::FindFramePosFromTime time[%u], pos[%u], stat[%d] iFrameNum sync[%u]"), aTimeMs, aPos, stat, iFrameNum);
|
|
711 |
|
|
712 |
return stat;
|
|
713 |
|
|
714 |
}
|
|
715 |
|
|
716 |
|
|
717 |
|
|
718 |
EXPORT_C TInt CFrameTable::FindFrameTimeFromPos(TUint& aTimeMs, TUint& aPos)
|
|
719 |
|
|
720 |
{
|
|
721 |
|
|
722 |
DP1(_L("CFrameTable::FindFrameTimeFromPos pos[%u]"), aPos);
|
|
723 |
|
|
724 |
TInt stat = KErrNotFound;
|
|
725 |
|
|
726 |
// TBufRefPosEntry temp; // used for array search
|
|
727 |
|
|
728 |
// temp.iFrameNum = 0;
|
|
729 |
|
|
730 |
// temp.iPos = aPos;
|
|
731 |
|
|
732 |
|
|
733 |
|
|
734 |
// stat = iFrameTable.SpecificFindInUnsignedKeyOrder(temp, EArrayFindMode_First);
|
|
735 |
|
|
736 |
TUint count = iFrameTable.Count();
|
|
737 |
|
|
738 |
for (TUint i=0; i<count; i++)
|
|
739 |
|
|
740 |
{
|
|
741 |
|
|
742 |
if (iFrameTable[i].iPos >= aPos)
|
|
743 |
|
|
744 |
{
|
|
745 |
|
|
746 |
stat = i;
|
|
747 |
|
|
748 |
DP4(_L("CFrameTable::FindFrameTimeFromPos hi-res first[%u] last[%u] count[%u] stat[%d]"),
|
|
749 |
|
|
750 |
iFrameTable[0].iPos, iFrameTable[count-1].iPos, count, stat);
|
|
751 |
|
|
752 |
break;
|
|
753 |
|
|
754 |
}
|
|
755 |
|
|
756 |
}
|
|
757 |
|
|
758 |
#ifdef _DEBUG
|
|
759 |
|
|
760 |
if(count == 0)
|
|
761 |
|
|
762 |
{
|
|
763 |
|
|
764 |
DP0(_L("CFrameTable::FindFrameTimeFromPos hi-res Frame Table: Empty"));
|
|
765 |
|
|
766 |
}
|
|
767 |
|
|
768 |
#endif
|
|
769 |
|
|
770 |
|
|
771 |
|
|
772 |
if (stat == KErrNotFound)
|
|
773 |
|
|
774 |
{
|
|
775 |
|
|
776 |
// stat = iLowResFrameTable.SpecificFindInUnsignedKeyOrder(temp, EArrayFindMode_First);
|
|
777 |
|
|
778 |
count = iLowResFrameTable.Count();
|
|
779 |
|
|
780 |
for (TUint i=0; i<count; i++)
|
|
781 |
|
|
782 |
{
|
|
783 |
|
|
784 |
if (iLowResFrameTable[i].iPos >= aPos)
|
|
785 |
|
|
786 |
{
|
|
787 |
|
|
788 |
stat = i;
|
|
789 |
|
|
790 |
DP4(_L("CFrameTable::FindFrameTimeFromPos lo-res first[%u] last[%u] count[%u] stat[%d]"),
|
|
791 |
|
|
792 |
iLowResFrameTable[0].iPos, iLowResFrameTable[count-1].iPos, count, stat);
|
|
793 |
|
|
794 |
break;
|
|
795 |
|
|
796 |
}
|
|
797 |
|
|
798 |
}
|
|
799 |
|
|
800 |
#ifdef _DEBUG
|
|
801 |
|
|
802 |
if(count == 0)
|
|
803 |
|
|
804 |
{
|
|
805 |
|
|
806 |
DP0(_L("CFrameTable::FindFrameTimeFromPos lo-res Frame Table: Empty"));
|
|
807 |
|
|
808 |
}
|
|
809 |
|
|
810 |
#endif
|
|
811 |
|
|
812 |
|
|
813 |
|
|
814 |
if (stat != KErrNotFound)
|
|
815 |
|
|
816 |
{
|
|
817 |
|
|
818 |
aPos = iLowResFrameTable[stat].iPos;
|
|
819 |
|
|
820 |
aTimeMs = iLowResFrameTable[stat].iFrameNum * iMsecPerFrame;
|
|
821 |
|
|
822 |
iFrameNum = iLowResFrameTable[stat].iFrameNum; // iFrameNum provides frame num after hi-res table is reset
|
|
823 |
|
|
824 |
DP3(_L("CFrameTable::FindFrameTimeFromPos lo-res iFrameNum[%u] indx[%d] iFrameNum sync[%u]"), iLowResFrameTable[stat].iFrameNum, stat, iFrameNum);
|
|
825 |
|
|
826 |
}
|
|
827 |
|
|
828 |
}
|
|
829 |
|
|
830 |
else
|
|
831 |
|
|
832 |
{
|
|
833 |
|
|
834 |
aPos = iFrameTable[stat].iPos;
|
|
835 |
|
|
836 |
aTimeMs = iFrameTable[stat].iFrameNum * iMsecPerFrame;
|
|
837 |
|
|
838 |
iFrameNum = iFrameTable[stat].iFrameNum; // iFrameNum provides frame num after hi-res table is reset
|
|
839 |
|
|
840 |
DP3(_L("CFrameTable::FindFrameTimeFromPos hi-res iFrameNum[%u] indx[%d] iFrameNum sync[%u]"), iFrameTable[stat].iFrameNum, stat, iFrameNum);
|
|
841 |
|
|
842 |
}
|
|
843 |
|
|
844 |
|
|
845 |
|
|
846 |
DP3(_L("CFrameTable::FindFrameTimeFromPos time[%u] pos[%u] indxstat[%d]"), aTimeMs, aPos, stat);
|
|
847 |
|
|
848 |
if (stat> 0)
|
|
849 |
|
|
850 |
{
|
|
851 |
|
|
852 |
stat = KErrNone;
|
|
853 |
|
|
854 |
}
|
|
855 |
|
|
856 |
return stat;
|
|
857 |
|
|
858 |
}
|
|
859 |
|
|
860 |
|
|
861 |
|
|
862 |
// -----------------------------------------------------------------------------
|
|
863 |
|
|
864 |
// CFrameTable::LastFramePos
|
|
865 |
|
|
866 |
// -----------------------------------------------------------------------------
|
|
867 |
|
|
868 |
//
|
|
869 |
|
|
870 |
EXPORT_C TInt CFrameTable::LastFramePos(TUint& aPos)
|
|
871 |
|
|
872 |
{
|
|
873 |
|
|
874 |
TInt stat = KErrNotFound;
|
|
875 |
|
|
876 |
TInt stat1 = KErrNotFound;
|
|
877 |
|
|
878 |
TInt stat2 = KErrNotFound;
|
|
879 |
|
|
880 |
TUint count;
|
|
881 |
|
|
882 |
TInt pos1 = 0;
|
|
883 |
|
|
884 |
TInt pos2 = 0;
|
|
885 |
|
|
886 |
|
|
887 |
|
|
888 |
count = iFrameTable.Count();
|
|
889 |
|
|
890 |
DP1(_L("CFrameTable::LastFramePos count[%u]"), count);
|
|
891 |
|
|
892 |
if (count> 0)
|
|
893 |
|
|
894 |
{
|
|
895 |
|
|
896 |
pos1 = iFrameTable[count-1].iPos;
|
|
897 |
|
|
898 |
stat1 = KErrNone;
|
|
899 |
|
|
900 |
DP1(_L("CFrameTable::LastFramePos last pos in hi-res[%d]"), pos1);
|
|
901 |
|
|
902 |
}
|
|
903 |
|
|
904 |
|
|
905 |
|
|
906 |
count = iLowResFrameTable.Count();
|
|
907 |
|
|
908 |
DP1(_L("CFrameTable::LastFramePos lr count[%u]"), count);
|
|
909 |
|
|
910 |
if (count> 0)
|
|
911 |
|
|
912 |
{
|
|
913 |
|
|
914 |
pos2 = iLowResFrameTable[count-1].iPos;
|
|
915 |
|
|
916 |
stat2 = KErrNone;
|
|
917 |
|
|
918 |
DP1(_L("CFrameTable::LastFramePos last pos in low-res[%d]"), pos2);
|
|
919 |
|
|
920 |
}
|
|
921 |
|
|
922 |
|
|
923 |
|
|
924 |
if ((stat1 == KErrNone) && (stat2 == KErrNone))
|
|
925 |
|
|
926 |
{
|
|
927 |
|
|
928 |
aPos = Max(pos1, pos2);
|
|
929 |
|
|
930 |
stat = KErrNone;
|
|
931 |
|
|
932 |
}
|
|
933 |
|
|
934 |
else if (stat1 == KErrNone)
|
|
935 |
|
|
936 |
{
|
|
937 |
|
|
938 |
aPos = pos1;
|
|
939 |
|
|
940 |
stat = KErrNone;
|
|
941 |
|
|
942 |
}
|
|
943 |
|
|
944 |
else if (stat2 == KErrNone)
|
|
945 |
|
|
946 |
{
|
|
947 |
|
|
948 |
aPos = pos2;
|
|
949 |
|
|
950 |
stat = KErrNone;
|
|
951 |
|
|
952 |
}
|
|
953 |
|
|
954 |
DP1(_L("CFrameTable::LastFramePos aPos[%d]"), aPos);
|
|
955 |
|
|
956 |
|
|
957 |
|
|
958 |
return stat;
|
|
959 |
|
|
960 |
}
|
|
961 |
|
|
962 |
|
|
963 |
|
|
964 |
// -----------------------------------------------------------------------------
|
|
965 |
|
|
966 |
// CFrameTable::LastFrameTime
|
|
967 |
|
|
968 |
// -----------------------------------------------------------------------------
|
|
969 |
|
|
970 |
//
|
|
971 |
|
|
972 |
EXPORT_C TInt CFrameTable::LastFrameTime(TUint& aTimeMs)
|
|
973 |
|
|
974 |
{
|
|
975 |
|
|
976 |
DP0(_L("CFrameTable::LastFrameTime"));
|
|
977 |
|
|
978 |
TInt stat = KErrNotFound;
|
|
979 |
|
|
980 |
TInt stat1 = KErrNotFound;
|
|
981 |
|
|
982 |
TInt stat2 = KErrNotFound;
|
|
983 |
|
|
984 |
TUint count;
|
|
985 |
|
|
986 |
TUint frameNum = 0;
|
|
987 |
|
|
988 |
TInt frameNum1 = 0;
|
|
989 |
|
|
990 |
TInt frameNum2 = 0;
|
|
991 |
|
|
992 |
|
|
993 |
|
|
994 |
count = iFrameTable.Count();
|
|
995 |
|
|
996 |
if (count> 0)
|
|
997 |
|
|
998 |
{
|
|
999 |
|
|
1000 |
frameNum1 = iFrameTable[count-1].iFrameNum;
|
|
1001 |
|
|
1002 |
stat1 = KErrNone;
|
|
1003 |
|
|
1004 |
}
|
|
1005 |
|
|
1006 |
|
|
1007 |
|
|
1008 |
count = iLowResFrameTable.Count();
|
|
1009 |
|
|
1010 |
if (count> 0)
|
|
1011 |
|
|
1012 |
{
|
|
1013 |
|
|
1014 |
frameNum2 = iLowResFrameTable[count-1].iFrameNum;
|
|
1015 |
|
|
1016 |
stat2 = KErrNone;
|
|
1017 |
|
|
1018 |
}
|
|
1019 |
|
|
1020 |
|
|
1021 |
|
|
1022 |
if ((stat1 == KErrNone) && (stat2 == KErrNone))
|
|
1023 |
|
|
1024 |
{
|
|
1025 |
|
|
1026 |
frameNum = Max(frameNum1, frameNum2);
|
|
1027 |
|
|
1028 |
stat = KErrNone;
|
|
1029 |
|
|
1030 |
}
|
|
1031 |
|
|
1032 |
else if (stat1 == KErrNone)
|
|
1033 |
|
|
1034 |
{
|
|
1035 |
|
|
1036 |
frameNum = frameNum1;
|
|
1037 |
|
|
1038 |
stat = KErrNone;
|
|
1039 |
|
|
1040 |
}
|
|
1041 |
|
|
1042 |
else if (stat2 == KErrNone)
|
|
1043 |
|
|
1044 |
{
|
|
1045 |
|
|
1046 |
frameNum = frameNum2;
|
|
1047 |
|
|
1048 |
stat = KErrNone;
|
|
1049 |
|
|
1050 |
}
|
|
1051 |
|
|
1052 |
|
|
1053 |
|
|
1054 |
aTimeMs = frameNum * iMsecPerFrame;
|
|
1055 |
|
|
1056 |
DP2(_L("CFrameTable::LastFrameTime time[%u] frame[%u]"),aTimeMs,frameNum);
|
|
1057 |
|
|
1058 |
|
|
1059 |
|
|
1060 |
return stat;
|
|
1061 |
|
|
1062 |
}
|
|
1063 |
|
|
1064 |
|
|
1065 |
|
|
1066 |
// -----------------------------------------------------------------------------
|
|
1067 |
|
|
1068 |
// CFrameTable::ResetTable
|
|
1069 |
|
|
1070 |
// -----------------------------------------------------------------------------
|
|
1071 |
|
|
1072 |
//
|
|
1073 |
|
|
1074 |
EXPORT_C void CFrameTable::ResetTable()
|
|
1075 |
|
|
1076 |
{
|
|
1077 |
|
|
1078 |
DP0(_L("CFrameTable::ResetTable"));
|
|
1079 |
|
|
1080 |
|
|
1081 |
|
|
1082 |
iFrameTable.Reset();
|
|
1083 |
|
|
1084 |
iOkToShrink = EFalse;
|
|
1085 |
|
|
1086 |
}
|
|
1087 |
|
|
1088 |
|
|
1089 |
|
|
1090 |
// -----------------------------------------------------------------------------
|
|
1091 |
|
|
1092 |
// CFrameTable::ShrinkTable
|
|
1093 |
|
|
1094 |
// -----------------------------------------------------------------------------
|
|
1095 |
|
|
1096 |
//
|
|
1097 |
|
|
1098 |
EXPORT_C void CFrameTable::ShrinkTable()
|
|
1099 |
|
|
1100 |
{ // gets called from controller decoder when switching to next buffer
|
|
1101 |
//function is no longer required
|
|
1102 |
//decision to start shrinking is now part of CFrameTable itself.
|
|
1103 |
//Not removing this function as it may be needed later on.
|
|
1104 |
}
|
|
1105 |
|
|
1106 |
|
|
1107 |
|
|
1108 |
EXPORT_C TInt CFrameTable::SetSourceReference(TUint aTimeMs, TUint aPos)
|
|
1109 |
|
|
1110 |
{ // if position is unknown it should always be set to 0 as the reference offset and time will be used instead
|
|
1111 |
|
|
1112 |
// This is used to set the offset which is added to future frame positions submitted
|
|
1113 |
|
|
1114 |
// This frame table can get reset when seeking and needs to know where it is in the source
|
|
1115 |
|
|
1116 |
DP2(_L("CFrameTable::SetOffset, aTimeMs[%u], aPos[%u]"), aTimeMs, aPos);
|
|
1117 |
|
|
1118 |
TInt stat = KErrNone;
|
|
1119 |
|
|
1120 |
iTimeRefMs = aTimeMs;
|
|
1121 |
|
|
1122 |
iCurrentFrameCount = 0;
|
|
1123 |
|
|
1124 |
iIntervalRef = 0;
|
|
1125 |
|
|
1126 |
iOffset = aPos;
|
|
1127 |
|
|
1128 |
if (aTimeMs == 0)
|
|
1129 |
|
|
1130 |
{
|
|
1131 |
|
|
1132 |
iFrameNum = 0;
|
|
1133 |
|
|
1134 |
}
|
|
1135 |
|
|
1136 |
if (iFrameTable.Count() == 0)
|
|
1137 |
|
|
1138 |
{ // this is to make sure the table has at least one entry in case playback looks for a position in the buffers after seeking
|
|
1139 |
|
|
1140 |
SubmitTableEntry(0);
|
|
1141 |
|
|
1142 |
// iCurrentFrameCount--; // since this is not a decoded frame
|
|
1143 |
|
|
1144 |
}
|
|
1145 |
|
|
1146 |
return stat;
|
|
1147 |
|
|
1148 |
}
|
|
1149 |
|
|
1150 |
|
|
1151 |
|
|
1152 |
// -----------------------------------------------------------------------------
|
|
1153 |
|
|
1154 |
// CFrameTable::RegisterForEvent
|
|
1155 |
|
|
1156 |
// -----------------------------------------------------------------------------
|
|
1157 |
|
|
1158 |
//
|
|
1159 |
|
|
1160 |
EXPORT_C TInt CFrameTable::RegisterForEvent(TFrameTableEvent aEvent,
|
|
1161 |
|
|
1162 |
MFrameTableEventObserver* aObserver,
|
|
1163 |
|
|
1164 |
TUint aParam)
|
|
1165 |
|
|
1166 |
{
|
|
1167 |
|
|
1168 |
DP2(_L("CFrameTable::RegisterForEvent event[%d] param[%u]"), aEvent, aParam);
|
|
1169 |
|
|
1170 |
|
|
1171 |
|
|
1172 |
TInt status = KErrNone;
|
|
1173 |
|
|
1174 |
iObserver = aObserver;
|
|
1175 |
|
|
1176 |
|
|
1177 |
|
|
1178 |
switch (aEvent)
|
|
1179 |
|
|
1180 |
{
|
|
1181 |
|
|
1182 |
case EPosReached:
|
|
1183 |
|
|
1184 |
iPosEventMs = aParam;
|
|
1185 |
|
|
1186 |
break;
|
|
1187 |
|
|
1188 |
|
|
1189 |
|
|
1190 |
case EPlayWindowEndPosReached:
|
|
1191 |
|
|
1192 |
iPlayWindowEndPosEventMs = aParam;
|
|
1193 |
|
|
1194 |
break;
|
|
1195 |
|
|
1196 |
|
|
1197 |
|
|
1198 |
case EDecodeInterval:
|
|
1199 |
|
|
1200 |
|
|
1201 |
|
|
1202 |
if (aParam> 0) // msec
|
|
1203 |
|
|
1204 |
|
|
1205 |
|
|
1206 |
{
|
|
1207 |
|
|
1208 |
iIntervalRef = 0;
|
|
1209 |
|
|
1210 |
iIntervalEvent = aParam;
|
|
1211 |
|
|
1212 |
}
|
|
1213 |
|
|
1214 |
else
|
|
1215 |
|
|
1216 |
return KErrArgument;
|
|
1217 |
|
|
1218 |
|
|
1219 |
|
|
1220 |
break;
|
|
1221 |
|
|
1222 |
|
|
1223 |
|
|
1224 |
default:
|
|
1225 |
|
|
1226 |
status = KErrUnknown;
|
|
1227 |
|
|
1228 |
break;
|
|
1229 |
|
|
1230 |
}
|
|
1231 |
|
|
1232 |
|
|
1233 |
|
|
1234 |
return status;
|
|
1235 |
|
|
1236 |
}
|
|
1237 |
|
|
1238 |
|
|
1239 |
|
|
1240 |
// -----------------------------------------------------------------------------
|
|
1241 |
|
|
1242 |
// CFrameTable::UnRegisterForEvent
|
|
1243 |
|
|
1244 |
// -----------------------------------------------------------------------------
|
|
1245 |
|
|
1246 |
//
|
|
1247 |
|
|
1248 |
EXPORT_C TInt CFrameTable::UnRegisterForEvent(TFrameTableEvent aEvent, MFrameTableEventObserver* /*aObserver*/)
|
|
1249 |
|
|
1250 |
{
|
|
1251 |
|
|
1252 |
DP1(_L("CFrameTable::UnRegisterForEvent event[%d]"), aEvent);
|
|
1253 |
|
|
1254 |
|
|
1255 |
|
|
1256 |
TInt status = KErrNone;
|
|
1257 |
|
|
1258 |
|
|
1259 |
|
|
1260 |
switch (aEvent)
|
|
1261 |
|
|
1262 |
{
|
|
1263 |
|
|
1264 |
case EPosReached:
|
|
1265 |
|
|
1266 |
iPosEventMs = 0;
|
|
1267 |
|
|
1268 |
break;
|
|
1269 |
|
|
1270 |
|
|
1271 |
|
|
1272 |
case EPlayWindowEndPosReached:
|
|
1273 |
|
|
1274 |
iPlayWindowEndPosEventMs = 0;
|
|
1275 |
|
|
1276 |
break;
|
|
1277 |
|
|
1278 |
|
|
1279 |
|
|
1280 |
case EDecodeInterval:
|
|
1281 |
|
|
1282 |
iIntervalEvent = 0;
|
|
1283 |
|
|
1284 |
break;
|
|
1285 |
|
|
1286 |
|
|
1287 |
|
|
1288 |
default:
|
|
1289 |
|
|
1290 |
status = KErrUnknown;
|
|
1291 |
|
|
1292 |
break;
|
|
1293 |
|
|
1294 |
}
|
|
1295 |
|
|
1296 |
|
|
1297 |
|
|
1298 |
return status;
|
|
1299 |
|
|
1300 |
}
|
|
1301 |
|
|
1302 |
|
|
1303 |
|
|
1304 |
// -----------------------------------------------------------------------------
|
|
1305 |
|
|
1306 |
// CFrameTable::Bitrate
|
|
1307 |
|
|
1308 |
// -----------------------------------------------------------------------------
|
|
1309 |
|
|
1310 |
//
|
|
1311 |
|
|
1312 |
EXPORT_C TInt CFrameTable::Bitrate()
|
|
1313 |
|
|
1314 |
{
|
|
1315 |
|
|
1316 |
return iAvgBitrate;
|
|
1317 |
|
|
1318 |
}
|
|
1319 |
|
|
1320 |
|
|
1321 |
|
|
1322 |
// ========================== OTHER EXPORTED FUNCTIONS =========================
|
|
1323 |
|
|
1324 |
|
|
1325 |
|
|
1326 |
// -----------------------------------------------------------------------------
|
|
1327 |
|
|
1328 |
// CFrameTable::CalcFrameFromTimeMs
|
|
1329 |
|
|
1330 |
// -----------------------------------------------------------------------------
|
|
1331 |
|
|
1332 |
//
|
|
1333 |
|
|
1334 |
TUint CFrameTable::CalcFrameFromTimeMs(TUint aTimeMs)
|
|
1335 |
|
|
1336 |
{ // TUint in msec can represent 1193 hours
|
|
1337 |
|
|
1338 |
TUint frame = 0;
|
|
1339 |
|
|
1340 |
|
|
1341 |
|
|
1342 |
if (iMsecPerFrame > 0)
|
|
1343 |
|
|
1344 |
{
|
|
1345 |
|
|
1346 |
frame = aTimeMs/iMsecPerFrame;
|
|
1347 |
|
|
1348 |
}
|
|
1349 |
|
|
1350 |
|
|
1351 |
|
|
1352 |
return frame;
|
|
1353 |
|
|
1354 |
}
|
|
1355 |
|
|
1356 |
|
|
1357 |
|
|
1358 |
EXPORT_C TInt CFrameTable::IsSeeking(TBool& aIsSeeking)
|
|
1359 |
|
|
1360 |
{
|
|
1361 |
|
|
1362 |
aIsSeeking = (iPosEventMs> 0);
|
|
1363 |
|
|
1364 |
return KErrNone;
|
|
1365 |
|
|
1366 |
}
|
|
1367 |
|
|
1368 |
|
|
1369 |
|
|
1370 |
EXPORT_C TInt CFrameTable::GetLastPosEvent(TUint& aPos)
|
|
1371 |
|
|
1372 |
{
|
|
1373 |
|
|
1374 |
aPos = iEventPos;
|
|
1375 |
|
|
1376 |
return KErrNone;
|
|
1377 |
|
|
1378 |
}
|
|
1379 |
|
|
1380 |
|
|
1381 |
|
|
1382 |
// End of File
|
|
1383 |
|
|
1384 |
|
|
1385 |
|