25
|
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".
|
19
|
8 |
*
|
25
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: StreamInformation Itf Adaptation Source
|
|
15 |
*
|
|
16 |
*/
|
19
|
17 |
|
|
18 |
#include "xadebug.h"
|
|
19 |
#include "xathreadsafety.h"
|
|
20 |
#include "xaadaptationgst.h"
|
|
21 |
#include "xamediaplayeradaptctx.h"
|
|
22 |
#include "xastreaminformationitfadaptation.h"
|
|
23 |
#include "xaplayitfadaptation.h"
|
|
24 |
|
|
25 |
/* local functions */
|
|
26 |
XAresult GetDomainTypeFromCodecBinSrcPads(
|
|
27 |
GList *sourcePads,
|
|
28 |
XAuint32 containerType,
|
|
29 |
XAuint32 streamIndex,
|
|
30 |
XAuint32 *domain);
|
|
31 |
|
|
32 |
XAresult GetAudioStreamInfoFromPads(
|
|
33 |
GstPad *srcPad,
|
|
34 |
XAuint32 *channels,
|
|
35 |
XAuint32 *sampleRate,
|
|
36 |
XAuint32 *bitRate);
|
|
37 |
|
|
38 |
XAresult GetVideoStreamInfoFromPads(
|
|
39 |
GstPad *srcPad,
|
|
40 |
XAuint32 *width,
|
|
41 |
XAuint32 *height,
|
|
42 |
XAuint32 *frameRate,
|
|
43 |
XAuint32 *bitRate);
|
|
44 |
|
|
45 |
XAresult GetImageStreamInfoFromPads(
|
|
46 |
GstPad *srcPad,
|
|
47 |
XAuint32 *width,
|
|
48 |
XAuint32 *height);
|
|
49 |
|
|
50 |
/*
|
|
51 |
* XAStreamInformationItfAdapt_QueryMediaContainerInformation(
|
|
52 |
* XAAdaptationBaseCtx *adaptCtx,
|
|
53 |
* XAMediaContainerInformation *info);
|
|
54 |
* Description: Obtains media container information
|
|
55 |
*/
|
|
56 |
XAresult XAStreamInformationItfAdapt_QueryMediaContainerInformation(
|
|
57 |
XAAdaptationBaseCtx *adaptCtx,
|
|
58 |
XAuint32 *containerType,
|
|
59 |
XAmillisecond *mediaDuration,
|
|
60 |
XAuint32 *numStreams)
|
|
61 |
{
|
|
62 |
XAresult ret = XA_RESULT_SUCCESS;
|
|
63 |
XADataSource *xaDataSource = NULL;
|
|
64 |
GstElement *codecbin = NULL;
|
|
65 |
|
|
66 |
DEBUG_API("->XAStreamInformationItfAdapt_QueryMediaContainerInformation");
|
|
67 |
/* Both Media Player and Metadata Extractor objec uses the same ctxId */
|
|
68 |
if( !adaptCtx ||
|
|
69 |
(adaptCtx->ctxId != XAMediaPlayerAdaptation) )
|
|
70 |
/* !((adaptCtx->ctxId == XAMediaPlayerAdaptation) ||
|
|
71 |
(adaptCtx->ctxId == XAMDAdaptation) ) )
|
|
72 |
*/
|
|
73 |
{
|
|
74 |
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
|
|
75 |
DEBUG_API("-<XAStreamInformationItfAdapt_QueryMediaContainerInformation");
|
|
76 |
return XA_RESULT_PARAMETER_INVALID;
|
|
77 |
}
|
|
78 |
|
|
79 |
/* Get media container type */
|
21
|
80 |
DEBUG_INFO_A1("Adaptation Context- ID is [%u] ",
|
|
81 |
(unsigned int)adaptCtx->ctxId );
|
19
|
82 |
|
|
83 |
/* Initialize to unspecified */
|
|
84 |
*containerType = XA_CONTAINERTYPE_UNSPECIFIED;
|
|
85 |
xaDataSource = ((XAMediaPlayerAdaptationCtx*) adaptCtx)->xaSource;
|
|
86 |
/* DEBUG_INFO("Obtained handle to xaDataSource");*/
|
|
87 |
if ( xaDataSource &&
|
|
88 |
xaDataSource->pFormat &&
|
|
89 |
( (*(XAuint32*)xaDataSource->pFormat ) == XA_DATAFORMAT_MIME) )
|
|
90 |
{
|
|
91 |
*containerType = ((XADataFormat_MIME*)(xaDataSource->pFormat))->containerType;
|
|
92 |
DEBUG_INFO_A1("Container type obtained from xaDataSource->pFormat is [%u]", (unsigned int)(*containerType));
|
|
93 |
}
|
|
94 |
else
|
|
95 |
{
|
|
96 |
DEBUG_INFO("Container type unspecified");
|
|
97 |
}
|
|
98 |
|
|
99 |
/* Get media duration */
|
|
100 |
ret = XAPlayItfAdaptGST_GetDuration((XAAdaptationGstCtx*)adaptCtx, mediaDuration);
|
|
101 |
if ( ret != XA_RESULT_SUCCESS )
|
|
102 |
return ret;
|
|
103 |
|
|
104 |
/* Determine number of streams */
|
|
105 |
codecbin = ((XAMediaPlayerAdaptationCtx*) adaptCtx)->codecbin;
|
|
106 |
if ( codecbin == NULL )
|
|
107 |
{
|
|
108 |
DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
|
|
109 |
DEBUG_API("-<XAStreamInformationItfAdapt_QueryMediaContainerInformation");
|
|
110 |
return XA_RESULT_INTERNAL_ERROR;
|
|
111 |
}
|
|
112 |
*numStreams = codecbin->numsrcpads;
|
|
113 |
|
|
114 |
DEBUG_API("-<XAStreamInformationItfAdapt_QueryMediaContainerInformation");
|
|
115 |
return XA_RESULT_SUCCESS;
|
|
116 |
}
|
|
117 |
|
|
118 |
/*
|
|
119 |
* XAresult XAStreamInformationItfAdapt_QueryStreamType(
|
|
120 |
* XAAdaptationBaseCtx *adaptCtx,
|
|
121 |
* XAuint32 streamIndex,
|
|
122 |
* XAuint32 *domain)
|
|
123 |
* Description: Obtains stream type information
|
|
124 |
*/
|
|
125 |
XAresult XAStreamInformationItfAdapt_QueryStreamType(
|
|
126 |
XAAdaptationBaseCtx *adaptCtx,
|
|
127 |
XAuint32 streamIndex,
|
|
128 |
XAuint32 *domain)
|
|
129 |
{
|
|
130 |
XAresult ret;
|
|
131 |
XAuint32 containerType;
|
|
132 |
XAmillisecond mediaDuration;
|
|
133 |
XAuint32 numStreams;
|
|
134 |
XADataSource *xaDataSource = NULL;
|
|
135 |
|
|
136 |
|
|
137 |
DEBUG_API("->XAStreamInformationItfAdapt_QueryStreamType");
|
|
138 |
|
|
139 |
ret = XAStreamInformationItfAdapt_QueryMediaContainerInformation(
|
|
140 |
adaptCtx, &containerType, &mediaDuration, &numStreams);
|
|
141 |
if (ret != XA_RESULT_SUCCESS)
|
|
142 |
{
|
|
143 |
DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);
|
|
144 |
DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamType");
|
|
145 |
return ret;
|
|
146 |
}
|
|
147 |
|
|
148 |
/* validate stream index */
|
|
149 |
if ( streamIndex > numStreams )
|
|
150 |
{
|
|
151 |
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
|
|
152 |
DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamType");
|
|
153 |
return XA_RESULT_PARAMETER_INVALID;
|
|
154 |
}
|
|
155 |
|
|
156 |
/* if format type is raw image */
|
|
157 |
xaDataSource = ((XAMediaPlayerAdaptationCtx*) adaptCtx)->xaSource;
|
|
158 |
if( xaDataSource->pFormat &&
|
|
159 |
( (*(XAuint32*)xaDataSource->pFormat ) == XA_DATAFORMAT_RAWIMAGE) )
|
|
160 |
{
|
|
161 |
*domain = XA_DOMAINTYPE_IMAGE;
|
|
162 |
return XA_RESULT_SUCCESS;
|
|
163 |
}
|
|
164 |
else
|
|
165 |
{
|
|
166 |
GstElement *codecbin = ((XAMediaPlayerAdaptationCtx*) adaptCtx)->codecbin;
|
|
167 |
if ( codecbin == NULL )
|
|
168 |
{
|
|
169 |
DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
|
|
170 |
DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamType");
|
|
171 |
return XA_RESULT_INTERNAL_ERROR;
|
|
172 |
}
|
|
173 |
|
|
174 |
GST_OBJECT_LOCK( codecbin );
|
|
175 |
ret = GetDomainTypeFromCodecBinSrcPads(
|
|
176 |
codecbin->srcpads,
|
|
177 |
containerType,
|
|
178 |
streamIndex,
|
|
179 |
domain);
|
|
180 |
GST_OBJECT_UNLOCK( codecbin );
|
|
181 |
}
|
|
182 |
|
|
183 |
DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamType");
|
|
184 |
return ret;
|
|
185 |
}
|
|
186 |
|
|
187 |
/*
|
|
188 |
* XAresult XAStreamInformationItfAdapt_QueryStreamInformation(
|
|
189 |
* XAAdaptationBaseCtx *adaptCtx,
|
|
190 |
* XAuint32 streamIndex,
|
|
191 |
* void * info)
|
|
192 |
* Description: Obtains stream information
|
|
193 |
*/
|
|
194 |
XAresult XAStreamInformationItfAdapt_QueryStreamInformation(
|
|
195 |
XAAdaptationBaseCtx *adaptCtx,
|
|
196 |
XAuint32 streamIndex,
|
|
197 |
void * info)
|
|
198 |
{
|
|
199 |
XAresult ret = XA_RESULT_SUCCESS;
|
|
200 |
XAuint32 domain;
|
|
201 |
XAuint32 codecId = 0;
|
|
202 |
XAuint32 channels;
|
|
203 |
XAmilliHertz sampleRate;
|
|
204 |
XAuint32 bitRate;
|
|
205 |
XAmillisecond duration;
|
|
206 |
XAuint32 width;
|
|
207 |
XAuint32 height;
|
|
208 |
XAuint32 frameRate;
|
|
209 |
/*TODO fix this call below in capabilitymgr*/
|
|
210 |
/*XACapsType filter;*/
|
|
211 |
GstElement *codecbin = NULL;
|
|
212 |
|
|
213 |
DEBUG_API("->XAStreamInformationItfAdapt_QueryStreamInformation");
|
|
214 |
|
|
215 |
/* stream index is validated in XAStreamInformationItfAdapt_QueryStreamType */
|
|
216 |
ret = XAStreamInformationItfAdapt_QueryStreamType(
|
|
217 |
adaptCtx, streamIndex, &domain);
|
|
218 |
|
|
219 |
if (ret != XA_RESULT_SUCCESS)
|
|
220 |
{
|
|
221 |
DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);
|
|
222 |
DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamInformation");
|
|
223 |
return ret;
|
|
224 |
}
|
|
225 |
if ( domain == XA_DOMAINTYPE_UNKNOWN )
|
|
226 |
{
|
|
227 |
DEBUG_ERR("XA_RESULT_CONTENT_UNSUPPORTED");
|
|
228 |
DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamInformation");
|
|
229 |
return XA_RESULT_CONTENT_UNSUPPORTED;
|
|
230 |
}
|
|
231 |
|
|
232 |
codecbin = ((XAMediaPlayerAdaptationCtx*) adaptCtx)->codecbin;
|
|
233 |
if ( codecbin == NULL )
|
|
234 |
{
|
|
235 |
DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
|
|
236 |
DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamInformation");
|
|
237 |
return XA_RESULT_INTERNAL_ERROR;
|
|
238 |
}
|
|
239 |
|
|
240 |
/* For midi none of the properties can be queried from gstreamer */
|
|
241 |
if ( domain != XA_DOMAINTYPE_MIDI )
|
|
242 |
{
|
|
243 |
GstPad* srcPad = NULL;
|
|
244 |
gchar* codecbinFactoryName = NULL;
|
|
245 |
|
|
246 |
GST_OBJECT_LOCK( codecbin );
|
|
247 |
srcPad = (GstPad*) g_list_nth_data(codecbin->srcpads, (streamIndex -1 ));
|
|
248 |
DEBUG_INFO_A1("Obtaining SrcPad%u from Decode bin", (unsigned int)(streamIndex-1));
|
|
249 |
if (srcPad == NULL)
|
|
250 |
{
|
|
251 |
GST_OBJECT_UNLOCK( codecbin );
|
|
252 |
DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
|
|
253 |
DEBUG_API("-<QueryStreamInformation");
|
|
254 |
return XA_RESULT_INTERNAL_ERROR;
|
|
255 |
}
|
|
256 |
switch (domain)
|
|
257 |
{
|
|
258 |
/*TODO fix this call below in capabilitymgr*/
|
|
259 |
/*case XA_DOMAINTYPE_AUDIO:
|
|
260 |
filter = XACAP_AUDIO;
|
|
261 |
break;
|
|
262 |
case XA_DOMAINTYPE_VIDEO:
|
|
263 |
filter = XACAP_VIDEO;
|
|
264 |
break;
|
|
265 |
case XA_DOMAINTYPE_IMAGE:
|
|
266 |
filter = XACAP_IMAGE;
|
|
267 |
break;*/
|
|
268 |
};
|
|
269 |
|
|
270 |
codecbinFactoryName = gst_element_get_name(gst_element_get_factory (codecbin));
|
|
271 |
/* decode bin has the sink pads ghosted from targetPad.
|
|
272 |
So retreive the name of the original decoder element*/
|
|
273 |
if ( strcmp(codecbinFactoryName, "decodebin") == 0 )
|
|
274 |
{
|
|
275 |
GstPad* targetPad = NULL;
|
|
276 |
gchar* decoderElementName = NULL; /* for retreiving codec id*/
|
|
277 |
|
|
278 |
DEBUG_INFO("Decodebin: Obtaining target pad of SrcPad");
|
|
279 |
targetPad = gst_ghost_pad_get_target ((GstGhostPad*)srcPad);
|
|
280 |
decoderElementName = gst_element_get_name(gst_element_get_factory (gst_pad_get_parent_element(targetPad)));
|
|
281 |
/*TODO fix this call below in capabilitymgr*/
|
|
282 |
/*
|
|
283 |
ret = XAStaticCapsAdapt_GetCodecIDByPluginName(
|
|
284 |
filter,
|
|
285 |
(XAchar*)decoderElementName,
|
|
286 |
&codecId);
|
|
287 |
*/
|
|
288 |
gst_object_unref(targetPad);
|
|
289 |
g_free(decoderElementName);
|
|
290 |
}
|
|
291 |
else /* for identity, audioparse and videoparse elements */
|
|
292 |
{
|
|
293 |
DEBUG_INFO("Not decode bin, but a passthru element");
|
|
294 |
/*TODO fix this call below in capabilitymgr*/
|
|
295 |
/* ret = XAStaticCapsAdapt_GetCodecIDByPluginName(
|
|
296 |
filter,
|
|
297 |
(XAchar*)codecbinFactoryName,
|
|
298 |
&codecId);*/
|
|
299 |
}
|
|
300 |
g_free(codecbinFactoryName);
|
|
301 |
if ( ret == XA_RESULT_SUCCESS )
|
|
302 |
{
|
|
303 |
/* retreive srcPad properties before releasing lock on codecbin */
|
|
304 |
switch(domain)
|
|
305 |
{
|
|
306 |
case XA_DOMAINTYPE_AUDIO:
|
|
307 |
DEBUG_INFO("Getting Audio Stream Info from SrcPad");
|
|
308 |
ret = GetAudioStreamInfoFromPads(
|
|
309 |
srcPad,
|
|
310 |
&channels,
|
|
311 |
&sampleRate,
|
|
312 |
&bitRate);
|
|
313 |
break;
|
|
314 |
case XA_DOMAINTYPE_VIDEO:
|
|
315 |
DEBUG_INFO("Getting Video Stream Info from SrcPad");
|
|
316 |
ret = GetVideoStreamInfoFromPads(
|
|
317 |
srcPad,
|
|
318 |
&width,
|
|
319 |
&height,
|
|
320 |
&frameRate,
|
|
321 |
&bitRate);
|
|
322 |
break;
|
|
323 |
case XA_DOMAINTYPE_IMAGE:
|
|
324 |
DEBUG_INFO("Getting Image Stream Info from SrcPad");
|
|
325 |
ret = GetImageStreamInfoFromPads(
|
|
326 |
srcPad,
|
|
327 |
&width,
|
|
328 |
&height
|
|
329 |
);
|
|
330 |
break;
|
|
331 |
default:
|
|
332 |
break;
|
|
333 |
};
|
|
334 |
}
|
|
335 |
/* Now unlock the bin */
|
|
336 |
GST_OBJECT_UNLOCK( codecbin );
|
|
337 |
} /*if ( domain != XA_DOMAIN_TYPE_MIDI )*/
|
|
338 |
|
|
339 |
if ( ret == XA_RESULT_SUCCESS)
|
|
340 |
{
|
|
341 |
DEBUG_INFO("Getting media duration");
|
|
342 |
ret = XAPlayItfAdaptGST_GetDuration((XAAdaptationGstCtx*)adaptCtx, &duration);
|
|
343 |
}
|
|
344 |
|
|
345 |
/* Now assign properties to data structure */
|
|
346 |
if ( ret == XA_RESULT_SUCCESS)
|
|
347 |
{
|
|
348 |
switch(domain)
|
|
349 |
{
|
|
350 |
case XA_DOMAINTYPE_AUDIO:
|
|
351 |
{
|
|
352 |
XAAudioStreamInformation* streamInfo = (XAAudioStreamInformation*)info;
|
|
353 |
DEBUG_INFO("Assigning values for XAAudioStreamInformation");
|
|
354 |
streamInfo->codecId = codecId;
|
|
355 |
streamInfo->channels = channels;
|
|
356 |
streamInfo->sampleRate = sampleRate;
|
|
357 |
streamInfo->bitRate = bitRate;
|
|
358 |
streamInfo->langCountry[0] = '\0';
|
|
359 |
streamInfo->duration = duration;
|
|
360 |
}
|
|
361 |
break;
|
|
362 |
case XA_DOMAINTYPE_MIDI:
|
|
363 |
{
|
|
364 |
XAMIDIStreamInformation* streamInfo = (XAMIDIStreamInformation*)info;
|
|
365 |
DEBUG_INFO("Assigning values for XAMIDIStreamInformation");
|
|
366 |
/*currently there is no way to get these information from gstreamer*/
|
|
367 |
streamInfo->channels = XA_MIDI_UNKNOWN;
|
|
368 |
streamInfo->tracks = XA_MIDI_UNKNOWN;
|
|
369 |
streamInfo->bankType = XA_MIDIBANK_DEVICE;
|
|
370 |
/*streamInfo->bitRate = 0;*/
|
|
371 |
streamInfo->langCountry[0] = '\0';
|
|
372 |
streamInfo->duration = duration;
|
|
373 |
}
|
|
374 |
break;
|
|
375 |
case XA_DOMAINTYPE_VIDEO:
|
|
376 |
{
|
|
377 |
XAVideoStreamInformation* streamInfo = (XAVideoStreamInformation*)info;
|
|
378 |
DEBUG_INFO("Assigning values for XAVideoStreamInformation");
|
|
379 |
streamInfo->codecId = codecId;
|
|
380 |
streamInfo->width = width;
|
|
381 |
streamInfo->height = height;
|
|
382 |
streamInfo->bitRate = bitRate;
|
|
383 |
streamInfo->duration = duration;
|
|
384 |
}
|
|
385 |
break;
|
|
386 |
case XA_DOMAINTYPE_IMAGE:
|
|
387 |
{
|
|
388 |
XAImageStreamInformation* streamInfo = (XAImageStreamInformation*)info;
|
|
389 |
DEBUG_INFO("Assigning values for XAImageStreamInformation");
|
|
390 |
streamInfo->codecId = codecId;
|
|
391 |
streamInfo->width = width;
|
|
392 |
streamInfo->height = height;
|
|
393 |
streamInfo->presentationDuration = duration;
|
|
394 |
}
|
|
395 |
break;
|
|
396 |
default:
|
|
397 |
break;
|
|
398 |
};
|
|
399 |
} /*if ( ret == XA_RESULT_SUCCESS)*/
|
|
400 |
|
|
401 |
DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamInformation");
|
|
402 |
return ret;
|
|
403 |
}
|
|
404 |
|
|
405 |
/*
|
|
406 |
* XAresult XAStreamInformationItfAdapt_QueryStreamName(
|
|
407 |
* XAAdaptationBaseCtx *adaptCtx,
|
|
408 |
* XAuint32 streamIndex,
|
|
409 |
* XAuint16 * pNameSize,
|
|
410 |
* XAchar * pName)
|
|
411 |
* Description: Obtains stream name
|
|
412 |
*/
|
|
413 |
XAresult XAStreamInformationItfAdapt_QueryStreamName(
|
|
414 |
XAAdaptationBaseCtx *adaptCtx,
|
|
415 |
XAuint32 streamIndex,
|
|
416 |
XAuint16 * pNameSize,
|
|
417 |
XAchar * pName)
|
|
418 |
{
|
|
419 |
XAresult ret = XA_RESULT_SUCCESS;
|
|
420 |
XAuint32 numStreams;
|
|
421 |
GstElement *codecbin = NULL;
|
|
422 |
|
|
423 |
DEBUG_API("->XAStreamInformationItfAdapt_QueryStreamName");
|
|
424 |
/* Both Media Player and Metadata Extractor objec uses the same ctxId */
|
|
425 |
if( !adaptCtx ||
|
|
426 |
(adaptCtx->ctxId != XAMediaPlayerAdaptation) )
|
|
427 |
{
|
|
428 |
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
|
|
429 |
DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamName");
|
|
430 |
return XA_RESULT_PARAMETER_INVALID;
|
|
431 |
}
|
|
432 |
|
|
433 |
/* validate stream index */
|
|
434 |
codecbin = ((XAMediaPlayerAdaptationCtx*) adaptCtx)->codecbin;
|
|
435 |
if ( codecbin == NULL )
|
|
436 |
{
|
|
437 |
DEBUG_INFO("Unable to get codec bin");
|
|
438 |
DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
|
|
439 |
DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamName");
|
|
440 |
return XA_RESULT_INTERNAL_ERROR;
|
|
441 |
}
|
|
442 |
numStreams = codecbin->numsrcpads;
|
|
443 |
|
|
444 |
/* validate stream index */
|
|
445 |
if ( streamIndex > numStreams )
|
|
446 |
{
|
|
447 |
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
|
|
448 |
DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamName");
|
|
449 |
return XA_RESULT_PARAMETER_INVALID;
|
|
450 |
}
|
|
451 |
|
|
452 |
/* TODO there is no straight way to retreive stream name from gstreamer*/
|
|
453 |
/*XAuint16 inputNameSize = *pNameSize;*/
|
|
454 |
*pNameSize = 0; /* Replace this with actual size*/
|
|
455 |
if ( pName )
|
|
456 |
{
|
|
457 |
/* TODO copy stream name into pName taking into account inputNameSize */
|
|
458 |
}
|
|
459 |
|
|
460 |
DEBUG_API("-<XAStreamInformationItfAdapt_QueryStreamName");
|
|
461 |
return ret;
|
|
462 |
}
|
|
463 |
|
|
464 |
/*
|
|
465 |
* XAresult XAStreamInformationItfAdapt_QueryActiveStreams(
|
|
466 |
* XAAdaptationBaseCtx *adaptCtx,
|
|
467 |
* XAuint32 *numStreams,
|
|
468 |
* XAboolean *activeStreams);
|
|
469 |
* Description: Obtains active stream information
|
|
470 |
*/
|
|
471 |
XAresult XAStreamInformationItfAdapt_QueryActiveStreams(
|
|
472 |
XAAdaptationBaseCtx *adaptCtx,
|
|
473 |
XAuint32 *numStreams,
|
|
474 |
XAboolean *activeStreams)
|
|
475 |
{
|
|
476 |
XAuint32 inputNumStreams;
|
|
477 |
GstElement *codecbin;
|
|
478 |
|
|
479 |
DEBUG_API("->XAStreamInformationItfAdapt_QueryActiveStreams");
|
|
480 |
|
|
481 |
/* Both Media Player and Metadata Extractor objec uses the same ctxId */
|
|
482 |
if( !adaptCtx ||
|
|
483 |
(adaptCtx->ctxId != XAMediaPlayerAdaptation) )
|
|
484 |
{
|
|
485 |
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
|
|
486 |
DEBUG_API("-<XAStreamInformationItfAdapt_QueryActiveStreams");
|
|
487 |
return XA_RESULT_PARAMETER_INVALID;
|
|
488 |
}
|
|
489 |
|
|
490 |
if( adaptCtx->ctxId == XAMDAdaptation)
|
|
491 |
{
|
|
492 |
DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
|
|
493 |
DEBUG_API("-<XAStreamInformationItfAdapt_QueryActiveStreams");
|
|
494 |
return XA_RESULT_PRECONDITIONS_VIOLATED;
|
|
495 |
}
|
|
496 |
|
|
497 |
inputNumStreams = *numStreams;
|
|
498 |
|
|
499 |
/* Determine number of streams */
|
|
500 |
codecbin = ((XAMediaPlayerAdaptationCtx*) adaptCtx)->codecbin;
|
|
501 |
if ( codecbin == NULL )
|
|
502 |
{
|
|
503 |
DEBUG_INFO("Unable to get codec bin");
|
|
504 |
DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
|
|
505 |
DEBUG_API("-<XAStreamInformationItfAdapt_QueryActiveStreams");
|
|
506 |
return XA_RESULT_INTERNAL_ERROR;
|
|
507 |
}
|
|
508 |
*numStreams = codecbin->numsrcpads;
|
|
509 |
|
|
510 |
if ( activeStreams )
|
|
511 |
{
|
|
512 |
XAuint32 loopIndex;
|
|
513 |
if (inputNumStreams < *numStreams )
|
|
514 |
{
|
|
515 |
DEBUG_INFO("numStreams param value is smaller than number of streams");
|
|
516 |
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
|
|
517 |
DEBUG_API("-<XAStreamInformationItfAdapt_QueryActiveStreams");
|
|
518 |
return XA_RESULT_PARAMETER_INVALID;
|
|
519 |
}
|
|
520 |
for (loopIndex = 0; loopIndex < *numStreams; loopIndex++)
|
|
521 |
{
|
|
522 |
/* TODO currently gstreamer doesn't allow multiple dynamic streams
|
|
523 |
* all streams are active streams */
|
|
524 |
activeStreams[loopIndex] = XA_BOOLEAN_TRUE;
|
|
525 |
}
|
|
526 |
}
|
|
527 |
|
|
528 |
DEBUG_API("->XAStreamInformationItfAdapt_QueryActiveStreams");
|
|
529 |
return XA_RESULT_SUCCESS;
|
|
530 |
}
|
|
531 |
|
|
532 |
XAresult XAStreamInformationItfAdapt_SetActiveStream(
|
|
533 |
XAAdaptationBaseCtx *adaptCtx,
|
|
534 |
XAuint32 streamNum,
|
|
535 |
XAboolean active,
|
|
536 |
XAboolean commitNow)
|
|
537 |
{
|
|
538 |
XAresult ret = XA_RESULT_SUCCESS;
|
|
539 |
XAuint32 numStreams;
|
|
540 |
GstElement *codecbin;
|
|
541 |
|
|
542 |
DEBUG_API("->XAStreamInformationItfAdapt_SetActiveStream");
|
|
543 |
|
|
544 |
/* Both Media Player and Metadata Extractor objec uses the same ctxId */
|
|
545 |
if( !adaptCtx ||
|
|
546 |
(adaptCtx->ctxId != XAMediaPlayerAdaptation) )
|
|
547 |
{
|
|
548 |
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
|
|
549 |
DEBUG_API("-<XAStreamInformationItfAdapt_SetActiveStream");
|
|
550 |
return XA_RESULT_PARAMETER_INVALID;
|
|
551 |
}
|
|
552 |
|
|
553 |
if( adaptCtx->ctxId == XAMDAdaptation)
|
|
554 |
{
|
|
555 |
DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
|
|
556 |
DEBUG_API("-<XAStreamInformationItfAdapt_SetActiveStream");
|
|
557 |
return XA_RESULT_PRECONDITIONS_VIOLATED;
|
|
558 |
}
|
|
559 |
|
|
560 |
/* Determine number of streams */
|
|
561 |
codecbin = ((XAMediaPlayerAdaptationCtx*) adaptCtx)->codecbin;
|
|
562 |
if ( codecbin == NULL )
|
|
563 |
{
|
|
564 |
DEBUG_INFO("Unable to get codec bin");
|
|
565 |
DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
|
|
566 |
DEBUG_API("-<XAStreamInformationItfAdapt_SetActiveStream");
|
|
567 |
return XA_RESULT_INTERNAL_ERROR;
|
|
568 |
}
|
|
569 |
numStreams = codecbin->numsrcpads;
|
|
570 |
|
|
571 |
/* validate stream index */
|
|
572 |
if ( streamNum > numStreams )
|
|
573 |
{
|
|
574 |
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
|
|
575 |
DEBUG_API("-<XAStreamInformationItfAdapt_SetActiveStream");
|
|
576 |
return XA_RESULT_PARAMETER_INVALID;
|
|
577 |
}
|
|
578 |
|
|
579 |
ret = XA_RESULT_FEATURE_UNSUPPORTED;
|
|
580 |
|
|
581 |
DEBUG_API("->XAStreamInformationItfAdapt_SetActiveStream");
|
|
582 |
return ret;
|
|
583 |
}
|
|
584 |
|
|
585 |
/* local functions */
|
|
586 |
|
|
587 |
XAresult GetDomainTypeFromCodecBinSrcPads(
|
|
588 |
GList *sourcePads,
|
|
589 |
XAuint32 containerType,
|
|
590 |
XAuint32 streamIndex,
|
|
591 |
XAuint32 *domain)
|
|
592 |
{
|
|
593 |
GstPad* srcPad;
|
|
594 |
GstCaps* negotiatedCaps;
|
|
595 |
const GstStructure* gstStruct;
|
|
596 |
const gchar *mime;
|
|
597 |
|
|
598 |
DEBUG_API("->GetDomainTypeFromCodecBinSrcPads");
|
|
599 |
|
|
600 |
|
|
601 |
srcPad = (GstPad*) g_list_nth_data(sourcePads, (streamIndex -1 ));
|
|
602 |
if (srcPad == NULL)
|
|
603 |
{
|
|
604 |
DEBUG_INFO_A1("Error obtaining SrcPad%u", (unsigned int)streamIndex);
|
|
605 |
DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
|
|
606 |
DEBUG_API("-<GetDomainTypeFromCodecBinSrcPads");
|
|
607 |
return XA_RESULT_INTERNAL_ERROR;
|
|
608 |
}
|
|
609 |
DEBUG_INFO_A1("Obtained SrcPad%u from SrcPads list", (unsigned int)(streamIndex-1));
|
|
610 |
|
|
611 |
negotiatedCaps = gst_pad_get_negotiated_caps(srcPad);
|
|
612 |
if ( negotiatedCaps == NULL )
|
|
613 |
{
|
|
614 |
DEBUG_INFO("Obtaining allowed caps from SrcPad.");
|
|
615 |
negotiatedCaps = gst_pad_get_allowed_caps (srcPad);
|
|
616 |
}
|
|
617 |
|
|
618 |
if ( negotiatedCaps == NULL )
|
|
619 |
{
|
|
620 |
DEBUG_INFO("Unable to obtain negotiated and allowed caps from SrcPad");
|
|
621 |
DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
|
|
622 |
DEBUG_API("-<GetDomainTypeFromCodecBinSrcPads");
|
|
623 |
return XA_RESULT_INTERNAL_ERROR;
|
|
624 |
}
|
|
625 |
|
|
626 |
DEBUG_INFO("Obtained negotiated/allowed GstCaps from SrcPad");
|
|
627 |
|
|
628 |
gstStruct = gst_caps_get_structure (negotiatedCaps, 0);
|
|
629 |
if ( gstStruct == NULL )
|
|
630 |
{
|
|
631 |
gst_object_unref (negotiatedCaps);
|
|
632 |
DEBUG_INFO("Error getting GstStructure from GstCaps");
|
|
633 |
DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
|
|
634 |
DEBUG_API("-<GetDomainTypeFromCodecBinSrcPads");
|
|
635 |
return XA_RESULT_INTERNAL_ERROR;
|
|
636 |
}
|
|
637 |
DEBUG_INFO("Obtained GstStructure from GstCaps");
|
|
638 |
|
|
639 |
mime = gst_structure_get_name (gstStruct);
|
|
640 |
|
|
641 |
DEBUG_INFO_A1("MimeType associated with SrcPad is [%s]", mime);
|
|
642 |
|
|
643 |
*domain = XA_DOMAINTYPE_UNKNOWN;
|
|
644 |
if (strncmp (mime, "audio", 5) == 0)
|
|
645 |
{
|
|
646 |
gchar* elementFactoryName = NULL;
|
|
647 |
|
|
648 |
*domain = XA_DOMAINTYPE_AUDIO;
|
|
649 |
|
|
650 |
/*check if it is midi or not by checking the sink pad's mime-type*/
|
|
651 |
/* this should done by checking the sinkpad's mime-type of parent element */
|
|
652 |
elementFactoryName = gst_element_get_name(gst_element_get_factory (gst_pad_get_parent_element(srcPad)));
|
|
653 |
|
|
654 |
/*printf("Element factory name [%s]\n", elementFactoryName);*/
|
|
655 |
|
|
656 |
/* decode bin has the sink pads ghosted from targetPad.
|
|
657 |
So retreive the name of the original decoder element*/
|
|
658 |
if ( strcmp(elementFactoryName, "decodebin") == 0 )
|
|
659 |
{
|
|
660 |
GstPad* targetPad = NULL;
|
|
661 |
gchar* decoderElementName = NULL;
|
|
662 |
|
|
663 |
DEBUG_INFO("Decodebin: Obtaining target pad of SrcPad");
|
|
664 |
targetPad = gst_ghost_pad_get_target ((GstGhostPad*)srcPad);
|
|
665 |
|
|
666 |
decoderElementName = gst_element_get_name (gst_element_get_factory (gst_pad_get_parent_element (targetPad)));
|
|
667 |
/* better solution would be to get mime-type from decoder and decide based on that */
|
|
668 |
/* currently we cannot retrieive sinkpad's caps. Perhaps a bug in gstreamer. We need */
|
|
669 |
/* to revisit this when we move to newer version of gstreamer */
|
|
670 |
if ( strcmp(decoderElementName, "wildmidi") == 0 )
|
|
671 |
{
|
|
672 |
*domain = XA_DOMAINTYPE_MIDI;
|
|
673 |
}
|
|
674 |
g_free(decoderElementName);
|
|
675 |
gst_object_unref(targetPad);
|
|
676 |
}
|
|
677 |
g_free(elementFactoryName);
|
|
678 |
|
|
679 |
}
|
|
680 |
else if (strncmp (mime, "video", 5) == 0)
|
|
681 |
{
|
|
682 |
switch(containerType)
|
|
683 |
{
|
|
684 |
case XA_CONTAINERTYPE_BMP:
|
|
685 |
case XA_CONTAINERTYPE_JPG:
|
|
686 |
case XA_CONTAINERTYPE_JPG2000:
|
|
687 |
*domain = XA_DOMAINTYPE_IMAGE;
|
|
688 |
break;
|
|
689 |
default:
|
|
690 |
*domain = XA_DOMAINTYPE_VIDEO;
|
|
691 |
break;
|
|
692 |
};
|
|
693 |
}
|
|
694 |
/* TODO find out why this causes assertion failure */
|
|
695 |
/*gst_object_unref (negotiatedCaps);*/
|
|
696 |
|
|
697 |
DEBUG_API("-<GetDomainTypeFromCodecBinSrcPads");
|
|
698 |
|
|
699 |
return XA_RESULT_SUCCESS;
|
|
700 |
}
|
|
701 |
|
|
702 |
XAresult GetAudioStreamInfoFromPads(
|
|
703 |
GstPad *srcPad,
|
|
704 |
XAuint32 *channels,
|
|
705 |
XAuint32 *sampleRate,
|
|
706 |
XAuint32 *bitRate)
|
|
707 |
{
|
|
708 |
GstCaps* negotiatedCaps;
|
|
709 |
const GstStructure* gstStruct;
|
|
710 |
gint negotiated_sampleRate;
|
|
711 |
gint negotiated_channels;
|
|
712 |
gint negotiated_bitRate;
|
|
713 |
|
|
714 |
DEBUG_API("->GetAudioStreamInfoFromPads");
|
|
715 |
|
|
716 |
negotiatedCaps = gst_pad_get_negotiated_caps(srcPad);
|
|
717 |
if ( negotiatedCaps == NULL )
|
|
718 |
{
|
|
719 |
DEBUG_INFO("Obtaining allowed caps from SrcPad.");
|
|
720 |
negotiatedCaps = gst_pad_get_allowed_caps (srcPad);
|
|
721 |
}
|
|
722 |
|
|
723 |
if ( negotiatedCaps == NULL )
|
|
724 |
{
|
|
725 |
DEBUG_INFO("Unable to obtain negotiated and allowed caps from SrcPad");
|
|
726 |
DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
|
|
727 |
DEBUG_API("-<GetAudioStreamInfoFromPads");
|
|
728 |
return XA_RESULT_INTERNAL_ERROR;
|
|
729 |
}
|
|
730 |
|
|
731 |
DEBUG_INFO("Obtained negotiated/allowed GstCaps from SrcPad");
|
|
732 |
|
|
733 |
gstStruct = gst_caps_get_structure (negotiatedCaps, 0);
|
|
734 |
if ( gstStruct == NULL )
|
|
735 |
{
|
|
736 |
gst_object_unref (negotiatedCaps);
|
|
737 |
DEBUG_INFO("Error getting GstStructure from GstCaps");
|
|
738 |
DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
|
|
739 |
DEBUG_API("-<GetAudioStreamInfoFromPads");
|
|
740 |
return XA_RESULT_INTERNAL_ERROR;
|
|
741 |
}
|
|
742 |
DEBUG_INFO("Obtained GstStructure from GstCaps");
|
|
743 |
|
|
744 |
*channels = 0;
|
|
745 |
*sampleRate = 0;
|
|
746 |
*bitRate = 0;
|
|
747 |
|
|
748 |
gst_structure_get_int (gstStruct, "channels", &negotiated_channels);
|
|
749 |
gst_structure_get_int (gstStruct, "rate", &negotiated_sampleRate);
|
|
750 |
gst_structure_get_int (gstStruct, "bitrate", &negotiated_bitRate);
|
|
751 |
|
|
752 |
*channels = negotiated_channels;
|
|
753 |
*sampleRate = (XAmilliHertz) negotiated_sampleRate * 1000;
|
|
754 |
*bitRate = negotiated_bitRate;
|
|
755 |
|
|
756 |
DEBUG_INFO_A1("channels[%u]", (unsigned int)*channels);
|
|
757 |
DEBUG_INFO_A1("sampleRate[%u]", (unsigned int)*sampleRate);
|
|
758 |
DEBUG_INFO_A1("bitRate[%u]", (unsigned int)*bitRate);
|
|
759 |
/* TODO find out why this is causing assertion failure
|
|
760 |
gst_object_unref (negotiatedCaps);*/
|
|
761 |
|
|
762 |
DEBUG_API("-<GetAudioStreamInfoFromPads");
|
|
763 |
|
|
764 |
return XA_RESULT_SUCCESS;
|
|
765 |
}
|
|
766 |
|
|
767 |
XAresult GetVideoStreamInfoFromPads(
|
|
768 |
GstPad *srcPad,
|
|
769 |
XAuint32 *width,
|
|
770 |
XAuint32 *height,
|
|
771 |
XAuint32 *frameRate,
|
|
772 |
XAuint32 *bitRate)
|
|
773 |
{
|
|
774 |
GstCaps* negotiatedCaps;
|
|
775 |
const GstStructure* gstStruct;
|
|
776 |
gint negotiated_width;
|
|
777 |
gint negotiated_height;
|
|
778 |
gint negotiated_frameRate_numerator;
|
|
779 |
gint negotiated_frameRate_denominator;
|
|
780 |
gint negotiated_bitRate;
|
|
781 |
|
|
782 |
DEBUG_API("->GetVideoStreamInfoFromPads");
|
|
783 |
|
|
784 |
negotiatedCaps = gst_pad_get_negotiated_caps(srcPad);
|
|
785 |
if ( negotiatedCaps == NULL )
|
|
786 |
{
|
|
787 |
DEBUG_INFO("Obtaining allowed caps from SrcPad.");
|
|
788 |
negotiatedCaps = gst_pad_get_allowed_caps (srcPad);
|
|
789 |
}
|
|
790 |
|
|
791 |
if ( negotiatedCaps == NULL )
|
|
792 |
{
|
|
793 |
DEBUG_INFO("Unable to obtain negotiated and allowed caps from SrcPad");
|
|
794 |
DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
|
|
795 |
DEBUG_API("-<GetVideoStreamInfoFromPads");
|
|
796 |
return XA_RESULT_INTERNAL_ERROR;
|
|
797 |
}
|
|
798 |
|
|
799 |
DEBUG_INFO("Obtained negotiated/allowed GstCaps from SrcPad");
|
|
800 |
|
|
801 |
gstStruct = gst_caps_get_structure (negotiatedCaps, 0);
|
|
802 |
if ( gstStruct == NULL )
|
|
803 |
{
|
|
804 |
gst_object_unref (negotiatedCaps);
|
|
805 |
DEBUG_INFO("Error getting GstStructure from GstCaps");
|
|
806 |
DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
|
|
807 |
DEBUG_API("-<GetVideoStreamInfoFromPads");
|
|
808 |
return XA_RESULT_INTERNAL_ERROR;
|
|
809 |
}
|
|
810 |
DEBUG_INFO("Obtained GstStructure from GstCaps");
|
|
811 |
|
|
812 |
*width = 0;
|
|
813 |
*height = 0;
|
|
814 |
*frameRate = 0;
|
|
815 |
*bitRate = 0;
|
|
816 |
|
|
817 |
gst_structure_get_int (gstStruct, "width", &negotiated_width);
|
|
818 |
gst_structure_get_int (gstStruct, "height", &negotiated_height);
|
|
819 |
gst_structure_get_fraction (gstStruct, "framerate",
|
|
820 |
&negotiated_frameRate_numerator,
|
|
821 |
&negotiated_frameRate_denominator);
|
|
822 |
gst_structure_get_int (gstStruct, "bitrate", &negotiated_bitRate);
|
|
823 |
|
|
824 |
*width = negotiated_width;
|
|
825 |
*height = negotiated_height;
|
|
826 |
*bitRate = negotiated_bitRate;
|
|
827 |
|
|
828 |
DEBUG_INFO_A1("width[%u]", (unsigned int)*width);
|
|
829 |
DEBUG_INFO_A1("height[%u]", (unsigned int)*height);
|
|
830 |
DEBUG_INFO_A2("framerate[%u/%u]", (unsigned int)negotiated_frameRate_numerator, (unsigned int)negotiated_frameRate_denominator);
|
|
831 |
DEBUG_INFO_A1("bitrate[%u]", (unsigned int)*bitRate);
|
|
832 |
/* TODO find out why this is causing assertion failure
|
|
833 |
gst_object_unref (negotiatedCaps);*/
|
|
834 |
|
|
835 |
DEBUG_API("-<GetVideoStreamInfoFromPads");
|
|
836 |
|
|
837 |
return XA_RESULT_SUCCESS;
|
|
838 |
}
|
|
839 |
|
|
840 |
|
|
841 |
XAresult GetImageStreamInfoFromPads(
|
|
842 |
GstPad *srcPad,
|
|
843 |
XAuint32 *width,
|
|
844 |
XAuint32 *height)
|
|
845 |
{
|
|
846 |
GstCaps* negotiatedCaps;
|
|
847 |
const GstStructure* gstStruct;
|
|
848 |
gint negotiated_width;
|
|
849 |
gint negotiated_height;
|
|
850 |
|
|
851 |
DEBUG_API("->GetImageStreamInfoFromPads");
|
|
852 |
|
|
853 |
negotiatedCaps = gst_pad_get_negotiated_caps(srcPad);
|
|
854 |
if ( negotiatedCaps == NULL )
|
|
855 |
{
|
|
856 |
DEBUG_INFO("Obtaining allowed caps from SrcPad.");
|
|
857 |
negotiatedCaps = gst_pad_get_allowed_caps (srcPad);
|
|
858 |
}
|
|
859 |
|
|
860 |
if ( negotiatedCaps == NULL )
|
|
861 |
{
|
|
862 |
DEBUG_INFO("Unable to obtain negotiated and allowed caps from SrcPad");
|
|
863 |
DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
|
|
864 |
DEBUG_API("-<GetImageStreamInfoFromPads");
|
|
865 |
return XA_RESULT_INTERNAL_ERROR;
|
|
866 |
}
|
|
867 |
|
|
868 |
DEBUG_INFO("Obtained negotiated/allowed GstCaps from SrcPad");
|
|
869 |
|
|
870 |
gstStruct = gst_caps_get_structure (negotiatedCaps, 0);
|
|
871 |
if ( gstStruct == NULL )
|
|
872 |
{
|
|
873 |
gst_object_unref (negotiatedCaps);
|
|
874 |
DEBUG_INFO("Error getting GstStructure from GstCaps");
|
|
875 |
DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
|
|
876 |
DEBUG_API("-<GetImageStreamInfoFromPads");
|
|
877 |
return XA_RESULT_INTERNAL_ERROR;
|
|
878 |
}
|
|
879 |
DEBUG_INFO("Obtained GstStructure from GstCaps");
|
|
880 |
|
|
881 |
*width = 0;
|
|
882 |
*height = 0;
|
|
883 |
|
|
884 |
gst_structure_get_int (gstStruct, "width", &negotiated_width);
|
|
885 |
gst_structure_get_int (gstStruct, "height", &negotiated_height);
|
|
886 |
|
|
887 |
*width = negotiated_width;
|
|
888 |
*height = negotiated_height;
|
|
889 |
|
|
890 |
DEBUG_INFO_A1("width[%u]", (unsigned int)*width);
|
|
891 |
DEBUG_INFO_A1("height[%u]", (unsigned int)*height);
|
|
892 |
/* TODO find out why this is causing assertion failure
|
|
893 |
gst_object_unref (negotiatedCaps);*/
|
|
894 |
|
|
895 |
DEBUG_API("-<GetImageStreamInfoFromPads");
|
|
896 |
|
|
897 |
return XA_RESULT_SUCCESS;
|
|
898 |
}
|
|
899 |
|