author | hgs |
Fri, 28 May 2010 19:26:28 -0500 | |
changeset 21 | 2ed61feeead6 |
parent 19 | 4a629bc82c5e |
child 25 | 6f7ceef7b1d1 |
permissions | -rw-r--r-- |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
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 <assert.h> |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
#include <stdlib.h> |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
#include "xamediaplayeradaptctxmmf.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 "xaobjectitf.h" |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
#include "cmmfbackendengine.h" |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
|
19 | 25 |
#include "cmetadatautilityitf.h" |
26 |
||
27 |
||
12
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 |
/* |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
30 |
* XAMediaPlayerAdaptationMMFCtx* XAMediaPlayerAdapt_Create() |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
31 |
* Allocates memory for Media Player Adaptation Context and makes 1st phase initialization |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
32 |
* @param XADataSource *pDataSrc - pointer to OMX-AL data source |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
33 |
* @param XADataSource *pBankSrc - pointer to instrument bank structure in Mobile DLS, if NULL default will be used. |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
* @param XADataSink *pAudioSnk - pointer to OMX-AL audio sink definition |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
* @param XADataSink *pImageVideoSnk - pointer to OMX-AL image and video sink definition |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
36 |
* @returns XAMediaPlayerAdaptationMMFCtx* - Pointer to created context, NULL if error occurs. |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
37 |
*/ |
19 | 38 |
XAAdaptationBaseCtx* XAMediaPlayerAdaptMMF_Create(XADataSource *pDataSrc, XADataSource *pBankSrc, |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
39 |
XADataSink *pAudioSnk, XADataSink *pImageVideoSnk, |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
40 |
XADataSink *pVibra, XADataSink *pLEDArray) |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
41 |
{ |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
42 |
XAMediaPlayerAdaptationMMFCtx *pSelf = NULL; |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
43 |
XAuint32 locType = 0; |
21 | 44 |
XADataLocator_IODevice *ioDevice; |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
45 |
XAresult res; |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
46 |
DEBUG_API("->XAMediaPlayerAdaptMMF_Create"); |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
47 |
|
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
48 |
pSelf = calloc(1, sizeof(XAMediaPlayerAdaptationMMFCtx)); |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
49 |
if ( pSelf) |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
50 |
{ |
21 | 51 |
if ( pDataSrc ) |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
52 |
{ |
21 | 53 |
locType = *((XAuint32*)(pDataSrc->pLocator)); |
54 |
if ( locType == XA_DATALOCATOR_IODEVICE ) |
|
55 |
{ |
|
56 |
ioDevice = (XADataLocator_IODevice*)(pDataSrc->pLocator); |
|
57 |
if ( ioDevice->deviceType == XA_IODEVICE_RADIO ) |
|
58 |
{ |
|
59 |
return XAMediaPlayerAdaptMMF_CreateRadio(pSelf, pDataSrc, pBankSrc, pAudioSnk, pImageVideoSnk, pVibra, pLEDArray); |
|
60 |
} |
|
61 |
} |
|
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
62 |
} |
21 | 63 |
if( XAAdaptationBaseMMF_Init(&(pSelf->baseObj),XAMediaPlayerAdaptation) != XA_RESULT_SUCCESS ) |
64 |
{ |
|
65 |
DEBUG_ERR("Failed to init base context!!!"); |
|
66 |
free(pSelf); |
|
67 |
pSelf = NULL; |
|
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
68 |
} |
21 | 69 |
else |
19 | 70 |
{ |
21 | 71 |
pSelf->isForRadio = XA_BOOLEAN_FALSE; |
72 |
pSelf->baseObj.baseObj.fwtype = FWMgrFWMMF; |
|
73 |
pSelf->xaSource = pDataSrc; |
|
74 |
pSelf->xaBankSrc = pBankSrc; |
|
75 |
pSelf->xaAudioSink = pAudioSnk; |
|
76 |
pSelf->xaVideoSink = pImageVideoSnk; |
|
77 |
pSelf->xaLEDArray = pLEDArray; |
|
78 |
pSelf->xaVibra = pVibra; |
|
79 |
pSelf->curMirror = XA_VIDEOMIRROR_NONE; |
|
80 |
pSelf->curRotation = 0; |
|
81 |
pSelf->isobjsrc = XA_BOOLEAN_FALSE; |
|
82 |
pSelf->cameraSinkSynced = XA_BOOLEAN_FALSE; |
|
83 |
/*pSelf->waitData = XA_BOOLEAN_FALSE;*/ |
|
84 |
} |
|
85 |
} |
|
86 |
else |
|
87 |
{ |
|
88 |
DEBUG_ERR("Failed to create XAMediaPlayerAdaptationMMFCtx !!!"); |
|
89 |
return NULL; |
|
90 |
} |
|
91 |
if(pSelf) |
|
92 |
{ |
|
93 |
res = mmf_backend_engine_init(&(pSelf->mmfContext)); |
|
94 |
if(!(pSelf->mmfContext) || (res != XA_RESULT_SUCCESS)) |
|
95 |
{ |
|
96 |
/* TODO Check to make sure there is no undeleted MMF objects here*/ |
|
97 |
DEBUG_ERR("Failed to init mmf context!!!"); |
|
98 |
free(pSelf); |
|
99 |
pSelf = NULL; |
|
100 |
return NULL; |
|
101 |
} |
|
19 | 102 |
res = mmf_set_play_adapt_context(pSelf->mmfContext, &(pSelf->baseObj)); |
103 |
if(pDataSrc) |
|
104 |
{ |
|
105 |
pSelf->mmfMetadataContext = mmf_metadata_utility_init((char *)(( (XADataLocator_URI*)(pDataSrc->pLocator))->URI)); |
|
106 |
if(!pSelf->mmfMetadataContext) |
|
107 |
{ |
|
108 |
DEBUG_ERR("Failed to init mmf metadata context!!!"); |
|
109 |
pSelf->mmfMetadataContext = NULL; |
|
110 |
} |
|
111 |
} |
|
112 |
else |
|
113 |
{ |
|
114 |
DEBUG_ERR("Failed to create XAMediaPlayerAdaptationMMFCtx !!!"); |
|
115 |
return NULL; |
|
116 |
} |
|
117 |
} |
|
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
118 |
|
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
119 |
DEBUG_API("<-XAMediaPlayerAdaptMMF_Create"); |
19 | 120 |
return (XAAdaptationBaseCtx*)(&pSelf->baseObj.baseObj); |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
121 |
} |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
122 |
|
21 | 123 |
/* |
124 |
* XAMediaPlayerAdaptationMMFCtx* XAMediaPlayerAdapt_CreateRadio() |
|
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
125 |
|
21 | 126 |
* @returns XAMediaPlayerAdaptationMMFCtx* - Pointer to created context, NULL if error occurs. |
127 |
*/ |
|
128 |
XAAdaptationBaseCtx* XAMediaPlayerAdaptMMF_CreateRadio(XAMediaPlayerAdaptationMMFCtx *pSelf, XADataSource *pDataSrc, XADataSource *pBankSrc, |
|
129 |
XADataSink *pAudioSnk, XADataSink *pImageVideoSnk, |
|
130 |
XADataSink *pVibra, XADataSink *pLEDArray) |
|
131 |
{ |
|
132 |
XAresult res; |
|
133 |
DEBUG_API("->XAMediaPlayerAdaptMMF_CreateRadio"); |
|
134 |
||
135 |
res = XAAdaptationBaseMMF_Init(&(pSelf->baseObj), XARadioAdaptation); |
|
136 |
if (res != XA_RESULT_SUCCESS) |
|
137 |
{ |
|
138 |
DEBUG_ERR("Failed to init base context!!!"); |
|
139 |
free(pSelf); |
|
140 |
pSelf = NULL; |
|
141 |
return NULL; |
|
142 |
} |
|
143 |
||
144 |
pSelf->isForRadio = XA_BOOLEAN_TRUE; |
|
145 |
pSelf->baseObj.baseObj.fwtype = FWMgrFWMMF; |
|
146 |
pSelf->xaSource = pDataSrc; |
|
147 |
pSelf->xaBankSrc = pBankSrc; |
|
148 |
pSelf->xaAudioSink = pAudioSnk; |
|
149 |
pSelf->xaVideoSink = pImageVideoSnk; |
|
150 |
pSelf->xaLEDArray = pLEDArray; |
|
151 |
pSelf->xaVibra = pVibra; |
|
152 |
pSelf->curMirror = XA_VIDEOMIRROR_NONE; |
|
153 |
pSelf->curRotation = 0; |
|
154 |
pSelf->isobjsrc = XA_BOOLEAN_FALSE; |
|
155 |
pSelf->cameraSinkSynced = XA_BOOLEAN_FALSE; |
|
156 |
/*pSelf->waitData = XA_BOOLEAN_FALSE;*/ |
|
157 |
||
158 |
res = mmf_backend_engine_init(&(pSelf->mmfContext)); |
|
159 |
if(!(pSelf->mmfContext) || (res != XA_RESULT_SUCCESS)) |
|
160 |
{ |
|
161 |
/* TODO Check to make sure there is no undeleted MMF objects here*/ |
|
162 |
DEBUG_ERR("Failed to init mmf context!!!"); |
|
163 |
free(pSelf); |
|
164 |
pSelf = NULL; |
|
165 |
return NULL; |
|
166 |
} |
|
167 |
DEBUG_API("<-XAMediaPlayerAdaptMMF_Create"); |
|
168 |
return (XAAdaptationBaseCtx*)(&pSelf->baseObj.baseObj); |
|
169 |
} |
|
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
170 |
|
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
171 |
/* |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
172 |
* XAresult XAMediaPlayerAdaptMMF_PostInit() |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
173 |
* 2nd phase initialization of Media Player Adaptation Context |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
174 |
* @param XAMediaPlayerAdaptationMMFCtx* ctx - pointer to Media Player adaptation context |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
175 |
* @return XAresult - Success value |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
176 |
*/ |
19 | 177 |
XAresult XAMediaPlayerAdaptMMF_PostInit( XAAdaptationMMFCtx* bCtx ) |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
178 |
{ |
19 | 179 |
XAresult ret = XA_RESULT_PRECONDITIONS_VIOLATED; |
180 |
XAMediaPlayerAdaptationMMFCtx *pSelf = (XAMediaPlayerAdaptationMMFCtx*)bCtx; |
|
181 |
||
182 |
DEBUG_API("->XAMediaPlayerAdaptMMF_PostInit"); |
|
183 |
||
184 |
XAAdaptationBaseMMF_PostInit(bCtx); |
|
185 |
||
21 | 186 |
if (pSelf->isForRadio) |
187 |
{ |
|
188 |
DEBUG_API("<-XAMediaPlayerAdaptMMF_PostInit"); |
|
189 |
return XA_RESULT_SUCCESS; |
|
190 |
} |
|
191 |
||
19 | 192 |
if(pSelf->mmfContext) |
193 |
{ |
|
194 |
XADataLocator_URI* tempUri = (XADataLocator_URI*)(pSelf->xaSource->pLocator); |
|
195 |
XADataFormat_MIME* tempFormat = (XADataFormat_MIME*)(pSelf->xaSource->pFormat); |
|
196 |
ret = XA_RESULT_SUCCESS; |
|
197 |
if(pSelf->xaVideoSink) |
|
198 |
{ |
|
199 |
ret = mmf_setup_native_display(pSelf->mmfContext, pSelf->xaVideoSink); |
|
200 |
} |
|
201 |
if (ret == XA_RESULT_SUCCESS) |
|
202 |
{ |
|
203 |
ret = mmf_set_player_uri(pSelf->mmfContext, (char *)(tempUri->URI), tempFormat->containerType); |
|
204 |
} |
|
205 |
} |
|
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
206 |
DEBUG_API("<-XAMediaPlayerAdaptMMF_PostInit"); |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
207 |
return ret; |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
208 |
} |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
209 |
|
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
210 |
/* |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
211 |
* void XAMediaPlayerAdaptMMF_Destroy( XAMediaPlayerAdaptationMMFCtx* ctx ) |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
212 |
* Destroys Media Player Adaptation Context |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
213 |
* @param ctx - Media Player Adaptation context to be destroyed |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
214 |
*/ |
19 | 215 |
void XAMediaPlayerAdaptMMF_Destroy( XAAdaptationMMFCtx* bCtx ) |
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
216 |
{ |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
217 |
XAMediaPlayerAdaptationMMFCtx* ctx = NULL; |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
218 |
|
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
219 |
|
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
220 |
DEBUG_API("->XAMediaPlayerAdaptMMF_Destroy"); |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
221 |
if(bCtx == NULL) |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
222 |
{ |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
223 |
DEBUG_ERR("Invalid parameter!!"); |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
224 |
DEBUG_API("<-XAMediaPlayerAdaptMMF_Destroy"); |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
225 |
return; |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
226 |
} |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
227 |
ctx = (XAMediaPlayerAdaptationMMFCtx*)bCtx; |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
228 |
|
19 | 229 |
if(ctx->mmfContext) |
230 |
{ |
|
231 |
mmf_backend_engine_deinit(ctx->mmfContext); |
|
232 |
} |
|
233 |
||
234 |
if(ctx->mmfMetadataContext) |
|
235 |
{ |
|
236 |
mmf_metadata_utility_destroy(ctx->mmfMetadataContext); |
|
237 |
} |
|
238 |
||
239 |
XAAdaptationBaseMMF_Free( bCtx ); |
|
240 |
||
12
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
241 |
free(ctx); |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
242 |
ctx = NULL; |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
243 |
|
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
244 |
DEBUG_API("<-XAMediaPlayerAdaptMMF_Destroy"); |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
245 |
} |
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
246 |
|
5a06f39ad45b
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
247 |