equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Abstract base class for FramePositioningControl |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include <logger.h> |
|
21 #include <e32base.h> |
|
22 |
|
23 #include "cmmaplayer.h" |
|
24 #include "cmmaframepositioningcontrol.h" |
|
25 |
|
26 CMMAFramePositioningControl::CMMAFramePositioningControl(CMMAPlayer* aPlayer) |
|
27 : iPlayer(aPlayer) |
|
28 { |
|
29 LOG(EJavaMMAPI, EInfo, "MMA:CMMAFramePositioningControl::CMMAFramePositioningControl"); |
|
30 } |
|
31 |
|
32 CMMAFramePositioningControl::~CMMAFramePositioningControl() |
|
33 { |
|
34 LOG(EJavaMMAPI, EInfo, "MMA:CMMAFramePositioningControl::~CMMAFramePositioningControl"); |
|
35 } |
|
36 |
|
37 const TDesC& CMMAFramePositioningControl::ClassName() const |
|
38 { |
|
39 LOG(EJavaMMAPI, EInfo, "MMA:CMMAFramePositioningControl::ClassName"); |
|
40 return KMMAFramePositioningControlName; |
|
41 } |
|
42 |
|
43 TInt CMMAFramePositioningControl::ClampMediaTime(TInt64& aMediaTime) |
|
44 { |
|
45 TInt64 duration = 0; |
|
46 iPlayer->GetDuration(&duration); |
|
47 if (duration < 0) |
|
48 { |
|
49 return KErrNotFound; |
|
50 } |
|
51 |
|
52 if (aMediaTime > duration) |
|
53 { |
|
54 aMediaTime = duration; |
|
55 } |
|
56 else if (aMediaTime < 0) |
|
57 { |
|
58 aMediaTime = 0; |
|
59 } |
|
60 return KErrNone; |
|
61 } |
|
62 |
|
63 // END OF FILE |