1 /* |
|
2 * Copyright (c) 2009 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: Seek Itf Adaptation MMF |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <glib.h> |
|
19 #include "unistd.h" |
|
20 #include "xamediaplayeradaptctxmmf.h" |
|
21 #include "xaseekitfadaptationmmf.h" |
|
22 #include "cmmfbackendengine.h" |
|
23 |
|
24 /* |
|
25 * XAresult XAPlayItfAdaptMMF_SetPlayState(XAAdaptationBaseCtx *bCtx, XAuint32 state) |
|
26 * Sets play state to GStreamer. |
|
27 * @param XAAdaptationBaseCtx *bCtx - Adaptation context, this will be casted to correct type regarding to contextID |
|
28 * XAuint32 state - Play state to be set |
|
29 * @return XAresult ret - Success value |
|
30 */ |
|
31 XAresult XASeekItfAdaptMMF_SetPosition(XAAdaptationBaseCtx *bCtx, |
|
32 XAmillisecond pos, XAuint32 seekMode) |
|
33 { |
|
34 XAresult ret = XA_RESULT_SUCCESS; |
|
35 XAMediaPlayerAdaptationMMFCtx* mCtx = |
|
36 (XAMediaPlayerAdaptationMMFCtx*) bCtx; |
|
37 |
|
38 DEBUG_API("->XASeekItfAdaptMMF_SetPosition "); |
|
39 ret = mmf_seekitf_set_position(mCtx->mmfContext, pos); |
|
40 /* bCtx and parameter pointer validation happens in the calling function. |
|
41 * We don't need to repeat it here*/ |
|
42 |
|
43 DEBUG_API("<-XASeekItfAdaptMMF_SetPosition"); |
|
44 return ret; |
|
45 } |
|
46 |
|
47 XAresult XASeekItfAdaptMMF_SetLoop(XAAdaptationBaseCtx *bCtx, |
|
48 XAboolean loopEnable, XAmillisecond startPos, XAmillisecond endPos) |
|
49 { |
|
50 XAresult ret = XA_RESULT_SUCCESS; |
|
51 XAMediaPlayerAdaptationMMFCtx* mCtx = |
|
52 (XAMediaPlayerAdaptationMMFCtx*) bCtx; |
|
53 |
|
54 DEBUG_API("->XASeekItfAdaptMMF_SetLoop "); |
|
55 |
|
56 /* bCtx and parameter pointer validation happens in the calling function. |
|
57 * We don't need to repeat it here*/ |
|
58 ret = mmf_seekitf_set_repeats(mCtx->mmfContext, loopEnable); |
|
59 |
|
60 ret = mmf_seekitf_set_playwindow(mCtx->mmfContext, startPos, endPos); |
|
61 |
|
62 DEBUG_API("<-XASeekItfAdaptMMF_SetLoop"); |
|
63 return ret; |
|
64 } |
|