equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2005-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". |
59 jint aDocumentHandle) |
59 jint aDocumentHandle) |
60 { |
60 { |
61 M2G_DEBUG_0("JNI ( M2GSVGSVGElement ) _getMediaTime - begin"); |
61 M2G_DEBUG_0("JNI ( M2GSVGSVGElement ) _getMediaTime - begin"); |
62 TReal32 seconds = 0; |
62 TReal32 seconds = 0; |
63 TInt err = KM2GNotOk; |
63 TInt err = KM2GNotOk; |
64 |
64 |
65 M2G_DO_LOCK |
65 M2G_DO_LOCK |
66 if (aSvgProxyHandle) |
66 if (aSvgProxyHandle) |
67 { |
67 { |
68 MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle); |
68 MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle); |
69 TRAP(err, aProxy->GetMediaTimeL(STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle),seconds); ); |
69 TRAP(err, aProxy->GetMediaTimeL(STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle),seconds);); |
70 } |
70 } |
71 M2G_DO_UNLOCK(aJni) |
71 M2G_DO_UNLOCK(aJni) |
72 |
72 |
73 M2GGeneral::CheckErrorCode(aJni, err); |
73 M2GGeneral::CheckErrorCode(aJni, err); |
74 |
74 |
75 M2G_DEBUG_1("JNI ( M2GSVGSVGElement ) _getMediaTime: %f - end", seconds); |
75 M2G_DEBUG_1("JNI ( M2GSVGSVGElement ) _getMediaTime: %f - end", seconds); |
76 return STATIC_CAST(jfloat, seconds); |
76 return STATIC_CAST(jfloat, seconds); |
77 } |
77 } |
78 |
78 |
79 |
79 |
96 jfloat aSeconds |
96 jfloat aSeconds |
97 ) |
97 ) |
98 { |
98 { |
99 M2G_DEBUG_0("JNI ( M2GSVGSVGElement ) _setMediaTime - begin"); |
99 M2G_DEBUG_0("JNI ( M2GSVGSVGElement ) _setMediaTime - begin"); |
100 TInt err = KM2GNotOk; |
100 TInt err = KM2GNotOk; |
101 |
101 |
102 TReal32* lseconds = REINTERPRET_CAST(TReal32*, &aSeconds); |
102 TReal32* lseconds = REINTERPRET_CAST(TReal32*, &aSeconds); |
103 |
103 |
104 M2G_DO_LOCK |
104 M2G_DO_LOCK |
105 if (aSvgProxyHandle) |
105 if (aSvgProxyHandle) |
106 { |
106 { |
107 MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle); |
107 MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle); |
108 TRAP(err, aProxy->SetMediaTimeL( |
108 TRAP(err, aProxy->SetMediaTimeL( |
109 STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle), |
109 STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle), |
110 *lseconds); ); |
110 *lseconds);); |
111 } |
111 } |
112 M2G_DO_UNLOCK(aJni) |
112 M2G_DO_UNLOCK(aJni) |
113 |
113 |
114 M2GGeneral::CheckErrorCode(aJni, err); |
114 M2GGeneral::CheckErrorCode(aJni, err); |
115 |
115 |
116 M2G_DEBUG_1("JNI ( M2GSVGSVGElement ) _setMediaTime: %f - end", aSeconds); |
116 M2G_DEBUG_1("JNI ( M2GSVGSVGElement ) _setMediaTime: %f - end", aSeconds); |
117 } |
117 } |