author | hgs |
Tue, 21 Sep 2010 11:38:43 -0500 | |
changeset 53 | eabc8c503852 |
parent 48 | a493a607b5bf |
permissions | -rw-r--r-- |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
25 | 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: Play Itf Adapt MMF |
|
15 |
* |
|
16 |
*/ |
|
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
#include "unistd.h" |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
#include "xamediaplayeradaptctxmmf.h" |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
#include "xaplayitfadaptationmmf.h" |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
#include "xaadaptationmmf.h" |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
#include "cmmfbackendengine.h" |
21 | 23 |
#include "cmmfradiobackendengine.h" |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
#include <glib.h> |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
|
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
26 |
/*forward declaration of position updater callback*/ |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
27 |
gboolean XAPlayItfAdapt_PositionUpdate(gpointer ctx); |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
28 |
|
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
29 |
/* |
19 | 30 |
* XAresult XAPlayItfAdaptMMF_SetPlayState(XAAdaptationBaseCtx *bCtx, XAuint32 state) |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
31 |
* Sets play state to GStreamer. |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
32 |
* @param XAAdaptationBaseCtx *bCtx - Adaptation context, this will be casted to correct type regarding to contextID |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
33 |
* XAuint32 state - Play state to be set |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
* @return XAresult ret - Success value |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
*/ |
25 | 36 |
XAresult XAPlayItfAdaptMMF_SetPlayState(XAAdaptationBaseCtx *bCtx, |
37 |
XAuint32 state) |
|
38 |
{ |
|
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
39 |
XAresult ret = XA_RESULT_SUCCESS; |
25 | 40 |
XAMediaPlayerAdaptationMMFCtx* mCtx; |
41 |
if (!bCtx) |
|
42 |
{ |
|
43 |
ret = XA_RESULT_PARAMETER_INVALID; |
|
44 |
return ret; |
|
45 |
} |
|
46 |
||
47 |
mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx; |
|
48 |
||
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
49 |
|
53 | 50 |
DEBUG_API_A1_STR("->XAPlayItfAdaptMMF_SetPlayState %s",PLAYSTATENAME(state)); |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
51 |
|
19 | 52 |
/* bCtx and parameter pointer validation happens in the calling function. |
53 |
* We don't need to repeat it here*/ |
|
25 | 54 |
switch (state) |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
55 |
{ |
25 | 56 |
case XA_PLAYSTATE_STOPPED: |
57 |
{ |
|
58 |
if (bCtx->ctxId == XARadioAdaptation) |
|
59 |
{ |
|
48 | 60 |
stop_radio(cmmfradiobackendengine_init(), bCtx); |
25 | 61 |
} |
62 |
else |
|
63 |
{ |
|
64 |
ret = mmf_playitf_stop_playback(mCtx->mmfContext); |
|
65 |
} |
|
66 |
break; |
|
67 |
} |
|
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
68 |
case XA_PLAYSTATE_PAUSED: |
19 | 69 |
ret = mmf_playitf_pause_playback(mCtx->mmfContext); |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
70 |
break; |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
71 |
case XA_PLAYSTATE_PLAYING: |
25 | 72 |
{ |
73 |
if (bCtx->ctxId == XARadioAdaptation) |
|
74 |
{ |
|
48 | 75 |
play_radio(cmmfradiobackendengine_init(), bCtx); |
25 | 76 |
} |
77 |
else |
|
78 |
{ |
|
79 |
ret = mmf_playitf_resume_playback(mCtx->mmfContext); |
|
80 |
} |
|
81 |
break; |
|
82 |
} |
|
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
83 |
default: |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
84 |
ret = XA_RESULT_PARAMETER_INVALID; |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
85 |
break; |
25 | 86 |
} |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
87 |
|
19 | 88 |
DEBUG_API("<-XAPlayItfAdaptMMF_SetPlayState"); |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
89 |
return ret; |
25 | 90 |
} |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
91 |
|
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
92 |
/* |
19 | 93 |
* XAresult XAPlayItfAdaptMMF_GetPlayState(XAAdaptationBaseCtx *bCtx, XAuint32 *pState) |
94 |
* @param XAAdaptationBaseCtx *bCtx - Adaptation context, this will be casted to correct type regarding to contextID |
|
95 |
* XAuint32 *state - XAmillisecond *pMsec - Pointer where to store play state |
|
96 |
* @return XAresult ret - Success value |
|
97 |
*/ |
|
25 | 98 |
XAresult XAPlayItfAdaptMMF_GetPlayState(XAAdaptationBaseCtx *bCtx, |
99 |
XAuint32 *pState) |
|
19 | 100 |
{ |
101 |
XAresult ret = XA_RESULT_SUCCESS; |
|
25 | 102 |
XAMediaPlayerAdaptationMMFCtx* pSelf; |
103 |
if (!bCtx || !pState) |
|
104 |
{ |
|
105 |
ret = XA_RESULT_PARAMETER_INVALID; |
|
106 |
return ret; |
|
107 |
} |
|
108 |
||
109 |
pSelf = (XAMediaPlayerAdaptationMMFCtx*) bCtx; |
|
19 | 110 |
|
111 |
DEBUG_API("->XAPlayItfAdaptMMF_GetPlayState"); |
|
112 |
||
113 |
/* If playhead reaches eof, state will transition to paused. |
|
114 |
* This object does not have visibility to callback*/ |
|
25 | 115 |
ret = mmf_playitf_get_play_state(pSelf->mmfContext, pState); |
19 | 116 |
|
117 |
DEBUG_API("<-XAPlayItfAdaptMMF_GetPlayState"); |
|
118 |
return ret; |
|
119 |
||
120 |
} |
|
121 |
||
122 |
/* |
|
123 |
* XAresult XAPlayItfAdaptMMF_GetDuration(XAAdaptationBaseCtx *bCtx, XAmillisecond *pMsec) |
|
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
124 |
* @param XAAdaptationBaseCtx *bCtx - Adaptation context, this will be casted to correct type regarding to contextID |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
125 |
* XAmillisecond *pMsec - Pointer where to store duration of stream. |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
126 |
* @return XAresult ret - Success value |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
127 |
*/ |
25 | 128 |
XAresult XAPlayItfAdaptMMF_GetDuration(XAAdaptationBaseCtx *bCtx, |
129 |
XAmillisecond *pMsec) |
|
130 |
{ |
|
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
131 |
XAresult ret = XA_RESULT_SUCCESS; |
25 | 132 |
XAMediaPlayerAdaptationMMFCtx* pSelf; |
133 |
if (!bCtx || !pMsec) |
|
134 |
{ |
|
135 |
ret = XA_RESULT_PARAMETER_INVALID; |
|
136 |
return ret; |
|
137 |
} |
|
138 |
||
139 |
pSelf = (XAMediaPlayerAdaptationMMFCtx*) bCtx; |
|
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
140 |
|
19 | 141 |
DEBUG_API("->XAPlayItfAdaptMMF_GetDuration"); |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
142 |
|
25 | 143 |
ret = mmf_playitf_get_duration(pSelf->mmfContext, pMsec); |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
144 |
|
19 | 145 |
DEBUG_API("<-XAPlayItfAdaptMMF_GetDuration"); |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
146 |
return ret; |
25 | 147 |
} |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
148 |
|
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
149 |
/* |
19 | 150 |
* XAresult XAPlayItfAdaptMMF_GetPosition(XAAdaptationBaseCtx *bCtx, XAmillisecond *pMsec) |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
151 |
* @param XAAdaptationBaseCtx *bCtx - Adaptation context, this will be casted to correct type regarding to contextID value |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
152 |
* XAmillisecond *pMsec - Pointer where to store current position in stream. |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
153 |
* @return XAresult ret - Success value |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
154 |
*/ |
25 | 155 |
XAresult XAPlayItfAdaptMMF_GetPosition(XAAdaptationBaseCtx *bCtx, |
156 |
XAmillisecond *pMsec) |
|
157 |
{ |
|
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
158 |
XAresult ret = XA_RESULT_SUCCESS; |
25 | 159 |
XAMediaPlayerAdaptationMMFCtx* pSelf; |
160 |
if (!bCtx || !pMsec) |
|
161 |
{ |
|
162 |
ret = XA_RESULT_PARAMETER_INVALID; |
|
163 |
return ret; |
|
164 |
} |
|
165 |
||
166 |
pSelf = (XAMediaPlayerAdaptationMMFCtx*) bCtx; |
|
19 | 167 |
|
168 |
DEBUG_API("->XAPlayItfAdaptMMF_GetPosition"); |
|
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
169 |
|
25 | 170 |
ret = mmf_playitf_get_position(pSelf->mmfContext, pMsec); |
19 | 171 |
|
172 |
DEBUG_API("<-XAPlayItfAdaptMMF_GetPosition"); |
|
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
173 |
return ret; |
25 | 174 |
} |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
175 |
|
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
176 |
/* |
19 | 177 |
* XAresult XAPlayItfAdaptMMF_RegisterCallback(XAAdaptationBaseCtx *bCtx, xaPlayCallback callback) |
178 |
* Description: Sets the playback callback function. |
|
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
179 |
*/ |
25 | 180 |
XAresult XAPlayItfAdaptMMF_RegisterCallback(XAAdaptationBaseCtx *bCtx, |
181 |
xaPlayCallback callback) |
|
182 |
{ |
|
19 | 183 |
XAresult ret = XA_RESULT_SUCCESS; |
25 | 184 |
XAMediaPlayerAdaptationMMFCtx* pSelf; |
185 |
if (!bCtx) |
|
186 |
{ |
|
187 |
ret = XA_RESULT_PARAMETER_INVALID; |
|
188 |
return ret; |
|
189 |
} |
|
190 |
||
191 |
pSelf = (XAMediaPlayerAdaptationMMFCtx*) bCtx; |
|
19 | 192 |
|
193 |
DEBUG_API("->XAPlayItfAdaptMMF_RegisterCallback"); |
|
194 |
||
25 | 195 |
ret = mmf_playitf_register_callback(pSelf->mmfContext, callback); |
19 | 196 |
|
197 |
DEBUG_API("<-XAPlayItfAdaptMMF_RegisterCallback"); |
|
198 |
return ret; |
|
25 | 199 |
} |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
200 |
|
19 | 201 |
/** |
202 |
* XAresult XAPlayItfAdaptMMF_SetCallbackEventsMask(XAAdaptationBaseCtx *bCtx, XAuint32 eventFlags) |
|
203 |
* Description: Enables/disables notification of playback events. |
|
204 |
**/ |
|
25 | 205 |
XAresult XAPlayItfAdaptMMF_SetCallbackEventsMask(XAAdaptationBaseCtx *bCtx, |
206 |
XAuint32 eventFlags) |
|
207 |
{ |
|
19 | 208 |
XAresult ret = XA_RESULT_SUCCESS; |
25 | 209 |
XAMediaPlayerAdaptationMMFCtx* pSelf; |
210 |
if (!bCtx) |
|
211 |
{ |
|
212 |
ret = XA_RESULT_PARAMETER_INVALID; |
|
213 |
return ret; |
|
214 |
} |
|
215 |
||
216 |
pSelf = (XAMediaPlayerAdaptationMMFCtx*) bCtx; |
|
19 | 217 |
|
218 |
DEBUG_API("->XAPlayItfAdaptMMF_SetCallbackEventsMask"); |
|
219 |
||
25 | 220 |
ret = mmf_playitf_set_callback_events_mask(pSelf->mmfContext, eventFlags); |
19 | 221 |
|
222 |
DEBUG_API("<-XAPlayItfAdaptMMF_SetCallbackEventsMask"); |
|
223 |
return ret; |
|
25 | 224 |
} |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
225 |
|
19 | 226 |
/** |
227 |
* XAresult XAPlayItfAdaptMMF_SetMarkerPosition(XAAdaptationBaseCtx *bCtx, XAmillisecond mSec) |
|
228 |
* Description: Sets marker position. |
|
229 |
**/ |
|
25 | 230 |
XAresult XAPlayItfAdaptMMF_SetMarkerPosition(XAAdaptationBaseCtx *bCtx, |
231 |
XAmillisecond mSec) |
|
232 |
{ |
|
19 | 233 |
XAresult ret = XA_RESULT_SUCCESS; |
25 | 234 |
XAMediaPlayerAdaptationMMFCtx* pSelf; |
235 |
if (!bCtx) |
|
236 |
{ |
|
237 |
ret = XA_RESULT_PARAMETER_INVALID; |
|
238 |
return ret; |
|
239 |
} |
|
240 |
||
241 |
pSelf = (XAMediaPlayerAdaptationMMFCtx*) bCtx; |
|
19 | 242 |
|
243 |
DEBUG_API("->XAPlayItfAdaptMMF_SetMarkerPosition"); |
|
244 |
||
25 | 245 |
ret = mmf_playitf_set_marker_position(pSelf->mmfContext, mSec); |
19 | 246 |
|
247 |
DEBUG_API("<-XAPlayItfAdaptMMF_SetMarkerPosition"); |
|
248 |
return ret; |
|
25 | 249 |
} |
19 | 250 |
|
251 |
/** |
|
252 |
* XAresult XAPlayItfAdaptMMF_SetCallbackEventsMask(XAAdaptationBaseCtx *bCtx, XAuint32 eventFlags) |
|
253 |
* Description: Clears marker position. |
|
254 |
**/ |
|
255 |
XAresult XAPlayItfAdaptMMF_ClearMarkerPosition(XAAdaptationBaseCtx *bCtx) |
|
25 | 256 |
{ |
19 | 257 |
XAresult ret = XA_RESULT_SUCCESS; |
25 | 258 |
XAMediaPlayerAdaptationMMFCtx* pSelf; |
259 |
if (!bCtx) |
|
260 |
{ |
|
261 |
ret = XA_RESULT_PARAMETER_INVALID; |
|
262 |
return ret; |
|
263 |
} |
|
264 |
||
265 |
pSelf = (XAMediaPlayerAdaptationMMFCtx*) bCtx; |
|
19 | 266 |
|
267 |
DEBUG_API("->XAPlayItfAdaptMMF_ClearMarkerPosition"); |
|
268 |
||
25 | 269 |
ret = mmf_playitf_clear_marker_position(pSelf->mmfContext); |
19 | 270 |
|
271 |
DEBUG_API("<-XAPlayItfAdaptMMF_ClearMarkerPosition"); |
|
272 |
return ret; |
|
25 | 273 |
} |
19 | 274 |
|
275 |
/** |
|
276 |
* XAPlayItfAdaptMMF_SetPositionUpdatePeriod(XAAdaptationBaseCtx *bCtx, XAmillisecond mSec) |
|
277 |
* Description: Sets position update period. |
|
278 |
**/ |
|
25 | 279 |
XAresult XAPlayItfAdaptMMF_SetPositionUpdatePeriod(XAAdaptationBaseCtx *bCtx, |
280 |
XAmillisecond mSec) |
|
281 |
{ |
|
19 | 282 |
XAresult ret = XA_RESULT_SUCCESS; |
25 | 283 |
XAMediaPlayerAdaptationMMFCtx* pSelf; |
284 |
if (!bCtx) |
|
285 |
{ |
|
286 |
ret = XA_RESULT_PARAMETER_INVALID; |
|
287 |
return ret; |
|
288 |
} |
|
289 |
||
290 |
pSelf = (XAMediaPlayerAdaptationMMFCtx*) bCtx; |
|
19 | 291 |
|
292 |
DEBUG_API("->XAPlayItfAdaptMMF_SetPositionUpdatePeriod"); |
|
293 |
||
25 | 294 |
ret = mmf_playitf_set_position_update_period(pSelf->mmfContext, mSec); |
19 | 295 |
|
296 |
DEBUG_API("<-XAPlayItfAdaptMMF_SetPositionUpdatePeriod"); |
|
297 |
return ret; |
|
25 | 298 |
} |
21 | 299 |