--- a/khronosfws/openmax_al/group/openmaxal.mmp Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/group/openmaxal.mmp Wed Jun 23 18:47:10 2010 +0300
@@ -41,15 +41,10 @@
SOURCE xaadaptationgst.c
SOURCE xagstcapabilitiesmgr.c
SOURCE xaaudioencoderitfadaptation.c
-SOURCE xacameraadaptctx.c
-SOURCE xacameraitfadaptation.c
SOURCE xadevicevolumeitfadaptation.c
SOURCE xadynamicsourceitfadaptation.c
SOURCE xaengineadaptctx.c
SOURCE xaequalizeritfadaptation.c
-SOURCE xaimagecontrolsitfadaptation.c
-SOURCE xaimageeffectsitfadaptation.c
-SOURCE xaimageencoderitfadaptation.c
SOURCE xaledarrayadaptctx.c
SOURCE xaledarrayitfadaptation.c
SOURCE xamediaplayeradaptctx.c
@@ -60,28 +55,36 @@
SOURCE xaoutputmixitfadaptation.c
SOURCE xaplaybackrateitfadaptation.c
SOURCE xaplayitfadaptation.c
-SOURCE xaradioadaptctx.c
-SOURCE xaradioitfadaptation.c
+
SOURCE xardsitfadaptation.c
SOURCE xarecorditfadaptation.c
SOURCE xaseekitfadaptation.c
-SOURCE xasnapshotitfadaptation.c
-SOURCE xastaticcameracapsadaptation.c
SOURCE xavibraadaptctx.c
SOURCE xavibraitfadaptation.c
+SOURCE xavolumeitfadaptation.c
+SOURCE xastreaminformationitfadaptation.c
+#ifdef OMAX_CAMERABIN
+SOURCE xacameraadaptctx.c
+SOURCE xacameraitfadaptation.c
+SOURCE xaimagecontrolsitfadaptation.c
+SOURCE xaimageeffectsitfadaptation.c
+SOURCE xaimageencoderitfadaptation.c
+SOURCE xasnapshotitfadaptation.c
+SOURCE xastaticcameracapsadaptation.c
SOURCE xavideoencoderitfadaptation.c
SOURCE xavideopostprosessingitfadaptation.c
-SOURCE xavolumeitfadaptation.c
-SOURCE xastreaminformationitfadaptation.c
+#endif
SOURCEPATH ../src/adptcommon
SOURCE xaframeworkmgr.c
SOURCE xacapabilitiesmgr.c
SOURCE xaadptbasectx.c
+#ifdef OMAX_CAMERABIN
SOURCEPATH ../src/camera
SOURCE xacameradevice.c
SOURCE xacameraitf.c
+#endif
SOURCEPATH ../src/common
SOURCE openmaxal.c
@@ -90,35 +93,38 @@
SOURCE xadynamicsourceitf.c
SOURCE xadynintmgmtitf.c
SOURCE xaequalizeritf.c
-SOURCE xaimagecontrolsitf.c
-SOURCE xaimageeffectsitf.c
SOURCE xametadataextractionitf.c
SOURCE xametadatatraversalitf.c
SOURCE xaobjectitf.c
SOURCE xaplatform.c
SOURCE xathreadsafety.c
-SOURCE xavideopostprocessingitf.c
SOURCE xavolumeitf.c
SOURCE xastreaminformationitf.c
SOURCE xanokialinearvolume_iid.c
SOURCE xanokiavolumeext_iid.c
SOURCE xanokialinearvolumeitf.c
SOURCE xanokiavolumeextitf.c
+#ifdef OMAX_CAMERABIN
+SOURCE xaimagecontrolsitf.c
+SOURCE xaimageeffectsitf.c
+SOURCE xavideopostprocessingitf.c
+#endif
SOURCEPATH ../src/engine
SOURCE xaaudiodecodercapabilitiesitf.c
SOURCE xaaudioencodercapabilitiesitf.c
SOURCE xaaudioiodevicecapabilitiesitf.c
-SOURCE xacameracapabilitiesitf.c
SOURCE xadevicevolumeitf.c
SOURCE xaengine.c
SOURCE xaengineitf.c
+SOURCE xathreadsyncitf.c
+#ifdef OMAX_CAMERABIN
+SOURCE xacameracapabilitiesitf.c
SOURCE xaimagedecodercapabilitiesitf.c
SOURCE xaimageencodercapabilitiesitf.c
-SOURCE xathreadsyncitf.c
SOURCE xavideodecodercapabilitiesitf.c
SOURCE xavideoencodercapabilitiesitf.c
-
+#endif
SOURCEPATH ../src/ledarray
SOURCE xaledarraydevice.c
SOURCE xaledarrayitf.c
@@ -132,12 +138,14 @@
SOURCEPATH ../src/mediarecorder
SOURCE xaaudioencoderitf.c
-SOURCE xaimageencoderitf.c
SOURCE xamediarecorder.c
SOURCE xametadatainsertionitf.c
SOURCE xarecorditf.c
+#ifdef OMAX_CAMERABIN
+SOURCE xaimageencoderitf.c
SOURCE xasnapshotitf.c
SOURCE xavideoencoderitf.c
+#endif
SOURCEPATH ../src/metadataextractor
SOURCE xametadataextractor.c
@@ -166,6 +174,9 @@
SOURCE xamediarecorderadaptctxmmf.c
SOURCE xarecorditfadaptationmmf.c
SOURCE sfmrlocaltimer.cpp
+SOURCE xaradioitfadaptation.c
+SOURCE xaradioadaptctx.c
+SOURCE cmmfradiobackendengine.cpp
SOURCE xanokialinearvolumeitfadaptationmmf.c
SOURCE xanokiavolumeextitfadaptationmmf.c
SOURCE xammfcapabilitiesmgr.c
@@ -212,16 +223,20 @@
LIBRARY MMFControllerFramework.lib
LIBRARY mediaclientvideo.lib
LIBRARY AudioInputRouting.lib
+LIBRARY Radio_Utility.lib
+
LIBRARY libgmodule.lib
LIBRARY libgobject.lib
LIBRARY libgstreamer.lib
LIBRARY libgstapp.lib
-LIBRARY libgstphotography.lib
LIBRARY libgstinterfaces.lib
-LIBRARY libgstvideo.lib
LIBRARY libgstbase.lib
LIBRARY libgstcoreelements.lib
LIBRARY libgstcoreindexers.lib
LIBRARY MetaDataUtility.lib
+#ifdef OMAX_CAMERABIN
+LIBRARY libgstphotography.lib
+LIBRARY libgstvideo.lib
+#endif
STATICLIBRARY hxmetadatautil.lib
--- a/khronosfws/openmax_al/inc/openmaxalwrapper.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/inc/openmaxalwrapper.h Wed Jun 23 18:47:10 2010 +0300
@@ -11,7 +11,9 @@
*
* Contributors:
*
-* Description:
+* Description: Internal Header to Include Khronos Headers in One Place.
+* Also redefining the XA_API macro to export the IID value
+* to DEF files.
*
*/
#ifndef _OPENMAXAL_WRAPPER_H_
--- a/khronosfws/openmax_al/inc/profileutilmacro.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/inc/profileutilmacro.h Wed Jun 23 18:47:10 2010 +0300
@@ -11,7 +11,8 @@
*
* Contributors:
*
-* Description:
+* Description: Internal Header to define Performance Profiling macros.
+* The MACROS can be defined in the MMP file to enable profiling.
*
*/
--- a/khronosfws/openmax_al/rom/openmax_al.iby Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/rom/openmax_al.iby Wed Jun 23 18:47:10 2010 +0300
@@ -11,13 +11,9 @@
*
* Contributors:
*
-* Description: OpenMAX AL
+* Description: OpenMAX AL iby file for exporting dll to ROM/ROFS.
*
*/
-/*
- * openmax_al.iby
- *
- */
#ifndef OPENMAX_AL_IBY
#define OPENMAX_AL_IBY
--- a/khronosfws/openmax_al/src/adptcommon/xaadptbasectx.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/adptcommon/xaadptbasectx.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Base Adaptation Initialization Functionality
+ *
+ */
#include <assert.h>
#include <string.h>
@@ -25,175 +25,188 @@
* 1st phase initialization function for Adaptation Base context structure.
* Reserves memory for base context and initializes GStreamer FW.
*/
-XAresult XAAdaptationBase_Init( XAAdaptationBaseCtx* pSelf, XAuint32 ctxId )
-{
+XAresult XAAdaptationBase_Init(XAAdaptationBaseCtx* pSelf, XAuint32 ctxId)
+ {
DEBUG_API("->XAAdaptationBase_Init");
- if ( pSelf )
- {
- if(!pSelf->evtHdlrs)
+ if (pSelf)
{
- pSelf->evtHdlrs = g_array_new (FALSE, FALSE, sizeof (XAAdaptEvtHdlr));
- if(!pSelf->evtHdlrs)
+ if (!pSelf->evtHdlrs)
{
- DEBUG_ERR("Memory allocation failure in Base Ctx.")
- return XA_RESULT_MEMORY_FAILURE;
+ pSelf->evtHdlrs = g_array_new(FALSE, FALSE,
+ sizeof(XAAdaptEvtHdlr));
+ if (!pSelf->evtHdlrs)
+ {
+ DEBUG_ERR("Memory allocation failure in Base Ctx.")
+ return XA_RESULT_MEMORY_FAILURE;
+ }
}
+ pSelf->ctxId = ctxId;
}
- pSelf->ctxId = ctxId;
- }
else
- {
+ {
DEBUG_ERR("Invalid Adaptation Base Context.")
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
DEBUG_API("<-XAAdaptationBase_Init");
return XA_RESULT_SUCCESS;
-}
+ }
/*
* XAresult XAAdaptationBase_PostInit()
* 2nd phase initialization for Adaptation Base.
*/
-XAresult XAAdaptationBase_PostInit( XAAdaptationBaseCtx* ctx )
-{
+XAresult XAAdaptationBase_PostInit(XAAdaptationBaseCtx* ctx)
+ {
XAresult ret = XA_RESULT_SUCCESS;
DEBUG_API("->XAAdaptationBase_PostInit");
DEBUG_API("<-XAAdaptationBase_PostInit");
return ret;
-}
+ }
/*
* void XAAdaptationBase_Free( XAAdaptationBaseCtx* ctx )
* Frees all Base context variables .
*/
-void XAAdaptationBase_Free( XAAdaptationBaseCtx* ctx )
-{
+void XAAdaptationBase_Free(XAAdaptationBaseCtx* ctx)
+ {
g_array_free(ctx->evtHdlrs, TRUE);
ctx->evtHdlrs = NULL;
DEBUG_API("<-XAAdaptationBase_Free");
-}
+ }
/*
* XAresult XAAdaptationBase_AddEventHandler
* Adds event handler for certain event types.
*/
-XAresult XAAdaptationBase_AddEventHandler( XAAdaptationBaseCtx* ctx, xaAdaptEventHandler evtHandler,
- XAuint32 evtTypes, void *pHandlerCtx )
-{
+XAresult XAAdaptationBase_AddEventHandler(XAAdaptationBaseCtx* ctx,
+ xaAdaptEventHandler evtHandler, XAuint32 evtTypes, void *pHandlerCtx)
+ {
XAuint32 i;
XAAdaptEvtHdlr tmp;
DEBUG_API("->XAAdaptationBase_AddEventHandler");
- if(!ctx)
- {
+ if (!ctx)
+ {
DEBUG_ERR("no context");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
- for(i=0; i<ctx->evtHdlrs->len; i++)
- {
- if( (g_array_index(ctx->evtHdlrs, XAAdaptEvtHdlr, i)).handlerfunc == evtHandler )
+ for (i = 0; i < ctx->evtHdlrs->len; i++)
{
+ if ((g_array_index(ctx->evtHdlrs, XAAdaptEvtHdlr, i)).handlerfunc
+ == evtHandler)
+ {
return XA_RESULT_PARAMETER_INVALID;
+ }
}
- }
tmp.handlerfunc = evtHandler;
tmp.handlercontext = pHandlerCtx;
tmp.eventtypes = evtTypes;
g_array_append_val(ctx->evtHdlrs, tmp);
DEBUG_API("<-XAAdaptationBase_AddEventHandler");
return XA_RESULT_SUCCESS;
-}
+ }
/*
* XAresult XAAdaptationBase_RemoveEventHandler
* Removes event handler for certain event types.
*/
-XAresult XAAdaptationBase_RemoveEventHandler( XAAdaptationBaseCtx* ctx, xaAdaptEventHandler evtHandler)
-{
+XAresult XAAdaptationBase_RemoveEventHandler(XAAdaptationBaseCtx* ctx,
+ xaAdaptEventHandler evtHandler)
+ {
XAuint32 i;
DEBUG_API("->XAAdaptationBase_RemoveEventHandler");
- if(!ctx)
- {
+ if (!ctx)
+ {
DEBUG_ERR("no context");
return XA_RESULT_PARAMETER_INVALID;
- }
- for(i=0; i<ctx->evtHdlrs->len; i++)
- {
- if( (g_array_index(ctx->evtHdlrs, XAAdaptEvtHdlr, i)).handlerfunc == evtHandler )
+ }
+ for (i = 0; i < ctx->evtHdlrs->len; i++)
{
+ if ((g_array_index(ctx->evtHdlrs, XAAdaptEvtHdlr, i)).handlerfunc
+ == evtHandler)
+ {
g_array_remove_index(ctx->evtHdlrs, i);
return XA_RESULT_SUCCESS;
+ }
}
- }
DEBUG_API("<-XAAdaptationBase_RemoveEventHandler");
/*did not find, return error*/
return XA_RESULT_PARAMETER_INVALID;
-}
+ }
-void XAAdaptationBase_SendAdaptEvents(XAAdaptationBaseCtx* ctx, XAAdaptEvent* event)
-{
+void XAAdaptationBase_SendAdaptEvents(XAAdaptationBaseCtx* ctx,
+ XAAdaptEvent* event)
+ {
XAuint32 i;
XAAdaptEvtHdlr* tmp;
- for(i=0; i<ctx->evtHdlrs->len; i++)
- {
+ for (i = 0; i < ctx->evtHdlrs->len; i++)
+ {
tmp = &g_array_index(ctx->evtHdlrs, XAAdaptEvtHdlr, i);
- if( tmp->eventtypes & event->eventtype )
- {
+ if (tmp->eventtypes & event->eventtype)
+ {
(tmp->handlerfunc)(tmp->handlercontext, event);
+ }
}
}
-}
/*
* XAresult XAEqualizerItfAdapt_ThreadEntry(XAAdaptationGstCtx *adapCtx)
* Description: Safety thread entry
*/
XAresult XAAdaptationBase_ThreadEntry(XAAdaptationBaseCtx *adaptCtx)
-{
+ {
XAresult res = XA_RESULT_SUCCESS;
DEBUG_API("->XAAdaptationBase_ThreadEntry");
- if(!adaptCtx )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAAdaptationBase_ThreadEntry");
+ if (!adaptCtx)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAAdaptationBase_ThreadEntry");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
+ }
- }
-
- switch(adaptCtx->ctxId)
+ switch (adaptCtx->ctxId)
{
case XAMediaPlayerAdaptation:
- XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaPlayer);
+ XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaPlayer)
+ ;
break;
case XAMediaRecorderAdaptation:
- XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaRecorder);
+ XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaRecorder)
+ ;
break;
case XARadioAdaptation:
- XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
+ XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio)
+ ;
break;
case XACameraAdaptation:
- XA_IMPL_THREAD_SAFETY_ENTRY(XATSCamera);
+ XA_IMPL_THREAD_SAFETY_ENTRY(XATSCamera)
+ ;
break;
case XAOutputMixAdaptation:
- XA_IMPL_THREAD_SAFETY_ENTRY(XATSOutputMix);
+ XA_IMPL_THREAD_SAFETY_ENTRY(XATSOutputMix)
+ ;
break;
case XAVibraAdaptation:
- XA_IMPL_THREAD_SAFETY_ENTRY(XATSVibra);
+ XA_IMPL_THREAD_SAFETY_ENTRY(XATSVibra)
+ ;
break;
case XALedArrayAdaptation:
- XA_IMPL_THREAD_SAFETY_ENTRY(XATSLEDArray);
+ XA_IMPL_THREAD_SAFETY_ENTRY(XATSLEDArray)
+ ;
break;
case XAMDAdaptation:
- XA_IMPL_THREAD_SAFETY_ENTRY(XATSMetaDataExtractor);
+ XA_IMPL_THREAD_SAFETY_ENTRY(XATSMetaDataExtractor)
+ ;
break;
case XAEngineAdaptation:
- XA_IMPL_THREAD_SAFETY_ENTRY(XATSEngine);
+ XA_IMPL_THREAD_SAFETY_ENTRY(XATSEngine)
+ ;
break;
default:
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID")
+ ;
/* invalid parameter */
res = XA_RESULT_PARAMETER_INVALID;
break;
@@ -201,55 +214,63 @@
DEBUG_API("<-XAAdaptationBase_ThreadEntry");
return res;
-}
+ }
/*
* XAresult XAEqualizerItfAdapt_ThreadExit(XAAdaptationGstCtx *adaptCtx)
* Description: Safety thread exit
*/
XAresult XAAdaptationBase_ThreadExit(XAAdaptationBaseCtx *adaptCtx)
-{
+ {
XAresult res = XA_RESULT_SUCCESS;
DEBUG_API("->XAAdaptationBase_ThreadExit");
- if(!adaptCtx )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAAdaptationBase_ThreadExit");
+ if (!adaptCtx)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAAdaptationBase_ThreadExit");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
+ }
- }
-
- switch(adaptCtx->ctxId)
+ switch (adaptCtx->ctxId)
{
case XAMediaPlayerAdaptation:
- XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer);
+ XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer)
+ ;
break;
case XAMediaRecorderAdaptation:
- XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
+ XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder)
+ ;
break;
case XARadioAdaptation:
- XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
+ XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio)
+ ;
break;
case XACameraAdaptation:
- XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera);
+ XA_IMPL_THREAD_SAFETY_EXIT(XATSCamera)
+ ;
break;
case XAOutputMixAdaptation:
- XA_IMPL_THREAD_SAFETY_EXIT(XATSOutputMix);
+ XA_IMPL_THREAD_SAFETY_EXIT(XATSOutputMix)
+ ;
break;
case XAVibraAdaptation:
- XA_IMPL_THREAD_SAFETY_EXIT(XATSVibra);
+ XA_IMPL_THREAD_SAFETY_EXIT(XATSVibra)
+ ;
break;
case XALedArrayAdaptation:
- XA_IMPL_THREAD_SAFETY_EXIT(XATSLEDArray);
+ XA_IMPL_THREAD_SAFETY_EXIT(XATSLEDArray)
+ ;
break;
case XAMDAdaptation:
- XA_IMPL_THREAD_SAFETY_EXIT(XATSMetaDataExtractor);
+ XA_IMPL_THREAD_SAFETY_EXIT(XATSMetaDataExtractor)
+ ;
break;
case XAEngineAdaptation:
- XA_IMPL_THREAD_SAFETY_EXIT(XATSEngine);
+ XA_IMPL_THREAD_SAFETY_EXIT(XATSEngine)
+ ;
break;
default:
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID")
+ ;
/* invalid parameter */
res = XA_RESULT_PARAMETER_INVALID;
break;
@@ -257,4 +278,4 @@
DEBUG_API("<-XAAdaptationBase_ThreadExit");
return res;
-}
+ }
--- a/khronosfws/openmax_al/src/adptcommon/xaadptbasectx.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/adptcommon/xaadptbasectx.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Base Adaptation Macros common between adaptations.
+ *
+ */
#ifndef XAADPTBASECTX_H_
#define XAADPTBASECTX_H_
@@ -27,10 +27,11 @@
/* ENUMERATIONS */
/**
-GLOBAL ENUMERATIONS
+ GLOBAL ENUMERATIONS
*/
-typedef enum {
+typedef enum
+ {
XAMediaPlayerAdaptation = 0,
XAMediaRecorderAdaptation,
XARadioAdaptation,
@@ -40,7 +41,7 @@
XALedArrayAdaptation,
XAMDAdaptation,
XAEngineAdaptation
-}AdaptationContextIDS;
+ } AdaptationContextIDS;
#define XA_ADAPT_PU_INTERVAL 50 /* position update interval */
#define XA_ADAPT_ASYNC_TIMEOUT 3000 /* timeout to wait async events */
@@ -63,13 +64,10 @@
#define RADIO_DEFAULT_FREQ_RANGE XA_FREQRANGE_FMEUROAMERICA
#define RADIO_DEFAULT_FREQ 88000000
-
/* TYPEDEFS */
/* Adaptation device IDs */
-//#define XA_ADAPTID_ALSASRC 0xAD7E5001 //Krishna commented
-#define XA_ADAPTID_DEVSOUNDSRC 0xAD7E5001
-//#define XA_ADAPTID_ALSASINK 0xAD7E5002
+#define XA_ADAPTID_DEVSOUNDSRC 0xAD7E5001
#define XA_ADAPTID_DEVSOUNDSINK 0xAD7E5002
#define XA_ADAPTID_AUTOAUDIOSINK 0xAD7E5003
#define XA_ADAPTID_AUDIOTESTSRC 0xAD7E5004
@@ -86,7 +84,6 @@
#define XA_ADAPTID_RAWVIDEO 0xAD7E500E
-//#define XA_ADAPT_DEFAULTAUDIOOUTPUT XA_ADAPTID_ALSASINK
#define XA_ADAPT_DEFAULTAUDIOOUTPUT XA_ADAPTID_DEVSOUNDSINK
#ifdef XA_USE_TEST_PLUGINS
@@ -95,7 +92,6 @@
#define XA_ADAPT_DEFAULTAUDIOINPUT XA_ADAPTID_DEVSOUNDSRC
#endif
-
#define XA_ADAPT_OGGPROFILE_UNKNOWN 0x1
#define XA_ADAPT_PCMSAMPLEFORMAT_SUPPORTED_8 0x1
@@ -109,18 +105,24 @@
#define XA_ADAPTID_UNINITED 0
-#define XA_ADAPT_VOLUME_VOLUME_CHANGED 0xfb /* volume changed */
-#define XA_ADAPT_VOLUME_MUTE_CHANGED 0xfc /* mute changed */
-#define XA_ADAPT_VULOME_STEREOPOSITION_CHANGED 0xfd
+#define XA_ADAPT_PLAY_STATE_CHANGED 0xf5
+#define XA_ADAPT_RADIO_FREQUENCY_CHANGED 0xf6 /* Radio frequency changed event */
+#define XA_ADAPT_RADIO_FREQUENCY_RANGE_CHANGED 0xf7 /* Radio frequency range changed event */
+#define XA_ADAPT_RADIO_SEEK_COMPLETE 0xf8 /* Radio seek complete changed event */
+#define XA_ADAPT_RADIO_STEREO_STATUS_CHANGED 0xf9 /* Radio stereo status changed */
+#define XA_ADAPT_RADIO_SIGNAL_STRENGTH_CHANGED 0xfa /* Radio signal status changed */
+#define XA_ADAPT_VOLUME_VOLUME_CHANGED 0xfb /* volume changed */
+#define XA_ADAPT_VOLUME_MUTE_CHANGED 0xfc /* mute changed */
+#define XA_ADAPT_VULOME_STEREOPOSITION_CHANGED 0xfd /* stereo position changed */
/* Adaptation event structure */
typedef struct XAAdaptEvent_
-{
- XAAdaptEventTypes eventtype; /* what kind of event, e.g. playitf event */
- XAuint8 eventid; /* eventtype-specific event, e.g. XA_PLAYEVENT macro */
- XAuint32 datasize; /* event data size */
- void* data; /* event data if needed */
-} XAAdaptEvent;
+ {
+ XAAdaptEventTypes eventtype; /* what kind of event, e.g. playitf event */
+ XAuint8 eventid; /* eventtype-specific event, e.g. XA_PLAYEVENT macro */
+ XAuint32 datasize; /* event data size */
+ void* data; /* event data if needed */
+ } XAAdaptEvent;
/* Forward declaration of adaptation basecontext */
typedef struct XAAdaptationBaseCtx_ XAAdaptationBaseCtx;
@@ -130,39 +132,37 @@
* Gst-Adaptation context structures.
*/
typedef struct XAAdaptationBaseCtx_
-{
-/* Common Variables for all adaptation elements */
- XAuint32 ctxId;
- GArray* evtHdlrs; /*array of event handlers */
- FrameworkMap* fwkmapper;
- FWMgrFwType fwtype;
+ {
+ /* Common Variables for all adaptation elements */
+ XAuint32 ctxId;
+ GArray* evtHdlrs; /*array of event handlers */
+ FrameworkMap* fwkmapper;
+ FWMgrFwType fwtype;
XACapabilities* capslist;
-
-} XAAdaptationBaseCtx_;
+ } XAAdaptationBaseCtx_;
/* Adaptation event callback */
-typedef void (*xaAdaptEventHandler) ( void *pHandlerCtx, XAAdaptEvent* event );
+typedef void (*xaAdaptEventHandler)(void *pHandlerCtx, XAAdaptEvent* event);
typedef struct XAAdaptEvtHdlr_
-{
- xaAdaptEventHandler handlerfunc; /* function handling the callback */
- void *handlercontext; /* context of handler */
- XAuint32 eventtypes; /* what kind of events this handles */
-} XAAdaptEvtHdlr;
-
-
-
+ {
+ xaAdaptEventHandler handlerfunc; /* function handling the callback */
+ void *handlercontext; /* context of handler */
+ XAuint32 eventtypes; /* what kind of events this handles */
+ } XAAdaptEvtHdlr;
/* FUNCTIONS */
-XAresult XAAdaptationBase_Init( XAAdaptationBaseCtx* pSelf, XAuint32 ctxId );
-XAresult XAAdaptationBase_PostInit( XAAdaptationBaseCtx* ctx );
-XAresult XAAdaptationBase_AddEventHandler( XAAdaptationBaseCtx* ctx, xaAdaptEventHandler evtHandler,
- XAuint32 evtTypes,void *pHandlerCtx );
-XAresult XAAdaptationBase_RemoveEventHandler( XAAdaptationBaseCtx* ctx, xaAdaptEventHandler evtHandler );
-void XAAdaptationBase_SendAdaptEvents(XAAdaptationBaseCtx* ctx, XAAdaptEvent* event);
+XAresult XAAdaptationBase_Init(XAAdaptationBaseCtx* pSelf, XAuint32 ctxId);
+XAresult XAAdaptationBase_PostInit(XAAdaptationBaseCtx* ctx);
+XAresult XAAdaptationBase_AddEventHandler(XAAdaptationBaseCtx* ctx,
+ xaAdaptEventHandler evtHandler, XAuint32 evtTypes, void *pHandlerCtx);
+XAresult XAAdaptationBase_RemoveEventHandler(XAAdaptationBaseCtx* ctx,
+ xaAdaptEventHandler evtHandler);
+void XAAdaptationBase_SendAdaptEvents(XAAdaptationBaseCtx* ctx,
+ XAAdaptEvent* event);
XAresult XAAdaptationBase_ThreadEntry(XAAdaptationBaseCtx *adaptCtx);
XAresult XAAdaptationBase_ThreadExit(XAAdaptationBaseCtx *adaptCtx);
-void XAAdaptationBase_Free( XAAdaptationBaseCtx* ctx );
+void XAAdaptationBase_Free(XAAdaptationBaseCtx* ctx);
-#endif /* XAADPTBASE_H_ */
+#endif /* XAADPTBASECTX_H_ */
--- a/khronosfws/openmax_al/src/adptcommon/xacapabilitiesmgr.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/adptcommon/xacapabilitiesmgr.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,20 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Capability Manager to query capabilities from different
+ * adaptations and store it in a linked list.
+ *
+ */
#include "xacapabilitiesmgr.h"
#include "xammfcapabilitiesmgr.h"
@@ -21,41 +22,39 @@
#include <stdio.h>
#include <string.h>
-static XAresult XACapabilitiesMgr_GetAudioInputDeviceCapabilities(XACapabilities **ppNode);
-static XAresult XACapabilitiesMgr_GetAudioOutputDeviceCapabilities(XACapabilities **ppNode);
+static XAresult XACapabilitiesMgr_GetAudioInputDeviceCapabilities(
+ XACapabilities **ppNode);
+static XAresult XACapabilitiesMgr_GetAudioOutputDeviceCapabilities(
+ XACapabilities **ppNode);
/* XAresult XAGSTCapabilitiesMgr_UpdateAudioIOCapabilitieList
* Description: Update the capabilities list supported by GStreamer framework.
*/
XAresult XACapabilitiesMgr_UpdateAudioIOCapabilitieList(
- FrameworkMap *frameworkMap,
- XACapabilities **ppListHead)
+ FrameworkMap *frameworkMap, XACapabilities **ppListHead)
-{
+ {
XAresult res = XA_RESULT_SUCCESS;
XACapabilities *lastNode;
- XACapabilities *firstNode ;
+ XACapabilities *firstNode;
XACapabilities *newNode = NULL;
-
- if(!frameworkMap || !ppListHead)
- {
+
+ if (!frameworkMap || !ppListHead)
+ {
res = XA_RESULT_PARAMETER_INVALID;
return res;
- }
-
- lastNode = *ppListHead;
- firstNode = *ppListHead;
-
+ }
+
+ lastNode = *ppListHead;
+ firstNode = *ppListHead;
DEBUG_API("->XACapabilitiesMgr_UpdateAudioIOCapabilitieList");
-
-
/* traverse and point to the last node in the list */
- while(lastNode && lastNode->next)
- {
+ while (lastNode && lastNode->next)
+ {
lastNode = lastNode->next;
- }
+ }
/* If no input devices are supported, the function returns
* XA_RESULT_SUCCESS and newNode will be NULL*/
@@ -65,18 +64,18 @@
{
return res;
}
-
+
if (lastNode)
- {
+ {
lastNode->next = newNode;
- }
+ }
if (newNode)
- { /* if a new node is created move lastNode to the new item */
+ { /* if a new node is created move lastNode to the new item */
if (!firstNode)
firstNode = newNode;
lastNode = newNode;
- }
-
+ }
+
/* If no input devices are supported, the function returns
* XA_RESULT_SUCCESS and newNode will be NULL*/
newNode = NULL;
@@ -85,346 +84,353 @@
{
return res;
}
-
+
if (lastNode)
- {
+ {
lastNode->next = newNode;
- }
+ }
if (newNode)
- { /* if a new node is created move lastNode to the new item */
+ { /* if a new node is created move lastNode to the new item */
if (!firstNode)
firstNode = newNode;
lastNode = newNode;
- }
+ }
/* if empty list, then append first node as the head */
if (!(*ppListHead))
{
*ppListHead = firstNode;
- }
- DEBUG_API("<-XACapabilitiesMgr_UpdateAudioIOCapabilitieList");
+ }DEBUG_API("<-XACapabilitiesMgr_UpdateAudioIOCapabilitieList");
return res;
-}
+ }
-XAresult XACapabilitiesMgr_CreateCapabilitieList(
- FrameworkMap* frameworkMap,
- XACapabilities** ppListHead)
-{
+XAresult XACapabilitiesMgr_CreateCapabilitieList(FrameworkMap* frameworkMap,
+ XACapabilities** ppListHead)
+ {
XACapabilities* list = NULL;
XAresult res = XA_RESULT_SUCCESS;
- if(!ppListHead)
- {
+ if (!ppListHead)
+ {
res = XA_RESULT_PARAMETER_INVALID;
return res;
- }
+ }
*ppListHead = NULL;
res = XACapabilitiesMgr_UpdateAudioIOCapabilitieList(frameworkMap, &list);
if (res != XA_RESULT_SUCCESS)
- {
+ {
XACapabilitiesMgr_DeleteCapabilitieList(&list);
return res;
- }
-
+ }
+
res = XAGSTCapabilitiesMgr_UpdateCapabilitieList(frameworkMap, &list);
if (res != XA_RESULT_SUCCESS)
- {
+ {
XACapabilitiesMgr_DeleteCapabilitieList(&list);
return res;
- }
+ }
res = XAMMFCapabilitiesMgr_UpdateCapabilitieList(frameworkMap, &list);
if (res != XA_RESULT_SUCCESS)
- {
+ {
XACapabilitiesMgr_DeleteCapabilitieList(&list);
return res;
- }
+ }
*ppListHead = list;
return res;
-}
+ }
XAresult XACapabilitiesMgr_DeleteCapabilitieList(XACapabilities** ppListHead)
-{
+ {
XACapabilities* currNode = NULL;
XACapabilities* nextNode = NULL;
XAresult res = XA_RESULT_SUCCESS;
-
- if(!ppListHead)
- {
+
+ if (!ppListHead)
+ {
res = XA_RESULT_PARAMETER_INVALID;
return res;
- }
+ }
currNode = *ppListHead;
while (currNode)
- {
+ {
if (currNode->capsType == AUD_I)
- {
- XAAudioInputDescriptor* entries = (XAAudioInputDescriptor*)currNode->pEntry;
+ {
+ XAAudioInputDescriptor* entries =
+ (XAAudioInputDescriptor*) currNode->pEntry;
XAint32 i;
- for(i=0;i< currNode->noOfEntries;i++)
- {
+ for (i = 0; i < currNode->noOfEntries; i++)
+ {
free(entries[i].samplingRatesSupported);
free(entries[i].deviceName);
- }
+ }
free(entries);
- }
+ }
else if (currNode->capsType == AUD_O)
- {
- XAAudioOutputDescriptor* entries = (XAAudioOutputDescriptor*)currNode->pEntry;
+ {
+ XAAudioOutputDescriptor* entries =
+ (XAAudioOutputDescriptor*) currNode->pEntry;
XAint32 i;
- for(i=0;i< currNode->noOfEntries;i++)
- {
+ for (i = 0; i < currNode->noOfEntries; i++)
+ {
free(entries[i].samplingRatesSupported);
free(entries[i].pDeviceName);
- }
+ }
free(entries);
- }
+ }
else if (currNode->capsType == AUD_E)
- {
- XAAudioCodecDescriptor* entries = (XAAudioCodecDescriptor*)currNode->pEntry;
+ {
+ XAAudioCodecDescriptor* entries =
+ (XAAudioCodecDescriptor*) currNode->pEntry;
XAint32 i;
- for(i=0;i< currNode->noOfEntries;i++)
- {
+ for (i = 0; i < currNode->noOfEntries; i++)
+ {
free(entries[i].pSampleRatesSupported);
free(entries[i].pBitratesSupported);
- }
+ }
free(entries);
- }
+ }
- if(currNode->adaptId)
+ if (currNode->adaptId)
{
free(currNode->adaptId);
}
-
+
nextNode = currNode->next;
free(currNode);
currNode = nextNode;
- }
+ }
*ppListHead = NULL;
return res;
-}
-
+ }
/* XAresult XACapabilitiesMgr_GetCapsCount
* Description: Count capabilities of certain type. Filter is specified by
* bitmasking XACapsType values.
*/
-XAresult XACapabilitiesMgr_GetCapsCount(XACapabilities* pListHead, XACapsType filter, XAuint32* count)
-{
+XAresult XACapabilitiesMgr_GetCapsCount(XACapabilities* pListHead,
+ XACapsType filter, XAuint32* count)
+ {
XAresult res = XA_RESULT_SUCCESS;
XACapabilities* currNode = pListHead;
DEBUG_API("->XACapabilitiesMgr_GetCapsCount");
- if(!currNode || !count)
- {
+ if (!currNode || !count)
+ {
res = XA_RESULT_PARAMETER_INVALID;
return res;
- }
+ }
- (*count)=0;
+ (*count) = 0;
while (currNode)
- {
- if ( (currNode->capsType & filter) == filter )
{
+ if ((currNode->capsType & filter) == filter)
+ {
(*count)++;
- }
+ }
currNode = currNode->next;
- }
+ }
DEBUG_API("<-XACapabilitiesMgr_GetCapsCount");
return res;
-}
+ }
/* XAresult XACapabilitiesMgr_GetCapsById
* Description: Get capabilities of type XACapsType and matching id
*/
-XAresult XACapabilitiesMgr_GetCapsById(XACapabilities* pListHead, XACapsType filter, XAuint32 maxId, XACapabilities* data)
-{
+XAresult XACapabilitiesMgr_GetCapsById(XACapabilities* pListHead,
+ XACapsType filter, XAuint32 maxId, XACapabilities* data)
+ {
XAresult res = XA_RESULT_SUCCESS;
XACapabilities* currNode = pListHead;
XAboolean found = XA_BOOLEAN_FALSE;
DEBUG_API("->XACapabilitiesMgr_GetCapsById");
- if(!currNode)
- {
+ if (!currNode)
+ {
res = XA_RESULT_PARAMETER_INVALID;
return res;
- }
+ }
while (currNode)
- {
- if (((currNode->capsType & filter) == filter ) && (maxId==currNode->xaid))
{
+ if (((currNode->capsType & filter) == filter) && (maxId
+ == currNode->xaid))
+ {
memcpy(data, currNode, sizeof(XACapabilities));
found = XA_BOOLEAN_TRUE;
break;
- }
+ }
currNode = currNode->next;
- }
+ }
- if(!found)
- {
- res = XA_RESULT_FEATURE_UNSUPPORTED;
- return res;
- }
+ if (!found)
+ {
+ res = XA_RESULT_FEATURE_UNSUPPORTED;
+ return res;
+ }
DEBUG_API("<-XACapabilitiesMgr_GetCapsById");
return res;
-}
+ }
/* XAresult XACapabilitiesMgr_GetCapsByIdx
* Description: Get n'th capabilities of type XACapsType
*/
-XAresult XACapabilitiesMgr_GetCapsByIdx(XACapabilities* pListHead, XACapsType filter, XAuint32 idx, XACapabilities* data)
-{
+XAresult XACapabilitiesMgr_GetCapsByIdx(XACapabilities* pListHead,
+ XACapsType filter, XAuint32 idx, XACapabilities* data)
+ {
XAresult res = XA_RESULT_SUCCESS;
XACapabilities* currNode = pListHead;
XAboolean found = XA_BOOLEAN_FALSE;
XAuint32 j = 0;
-
DEBUG_API("->XACapabilitiesMgr_GetCapsByIdx");
- if(!currNode)
- {
+ if (!currNode)
+ {
res = XA_RESULT_PARAMETER_INVALID;
return res;
- }
-
+ }
while (currNode)
- {
- if ((currNode->capsType & filter) == filter )
{
- if( idx == j++ )
+ if ((currNode->capsType & filter) == filter)
{
+ if (idx == j++)
+ {
memcpy(data, currNode, sizeof(XACapabilities));
found = XA_BOOLEAN_TRUE;
break;
+ }
}
+ currNode = currNode->next;
}
- currNode = currNode->next;
- }
- if(!found)
- {
- res = XA_RESULT_PARAMETER_INVALID;
- return res;
- }
+ if (!found)
+ {
+ res = XA_RESULT_PARAMETER_INVALID;
+ return res;
+ }
DEBUG_API("<-XACapabilitiesMgr_GetCapsByIdx");
return res;
-}
+ }
/* XAresult XACapabilitiesMgr_QueryColorFormats
* Description: Get color formats associated with the XA_IMAGECODEC_RAW codec.
*/
-XAresult XACapabilitiesMgr_QueryColorFormats(XACapabilities* pListHead, XAuint32* pIndex, XAuint32* pColorFormats)
-{
+XAresult XACapabilitiesMgr_QueryColorFormats(XACapabilities* pListHead,
+ XAuint32* pIndex, XAuint32* pColorFormats)
+ {
XAresult res = XA_RESULT_SUCCESS;
XACapabilities temp;
DEBUG_API("->XACapabilitiesMgr_QueryColorFormats");
- if( !pIndex )
- {
+ if (!pIndex)
+ {
DEBUG_ERR("illegal NULL parameter");
res = XA_RESULT_PARAMETER_INVALID;
return res;
- }
+ }
- res = XACapabilitiesMgr_GetCapsById(pListHead, (XACapsType)((XACapsType)(XACAP_ENCODER|XACAP_IMAGE)), XA_IMAGECODEC_RAW, &temp);
- if( res == XA_RESULT_SUCCESS )
- {
- if( !pColorFormats )
- { /* query number of color formats */
+ res = XACapabilitiesMgr_GetCapsById(pListHead,
+ (XACapsType) ((XACapsType) (XACAP_ENCODER | XACAP_IMAGE)),
+ XA_IMAGECODEC_RAW, &temp);
+ if (res == XA_RESULT_SUCCESS)
+ {
+ if (!pColorFormats)
+ { /* query number of color formats */
*pIndex = 1; /* one used by camera context */
- }
+ }
else
- { /* query color format */
- if( *pIndex >= 1 ) /* one used by camera context */
- {
+ { /* query color format */
+ if (*pIndex >= 1) /* one used by camera context */
+ {
DEBUG_ERR("index parameter invalid");
res = XA_RESULT_PARAMETER_INVALID;
- }
+ }
else
- { /* internal format used by pipeline, look camera context for details */
+ { /* internal format used by pipeline, look camera context for details */
*pColorFormats = XA_COLORFORMAT_YUV420PLANAR;
+ }
}
}
- }
else
- {
+ {
*pIndex = 0;
- }
+ }
DEBUG_API("<-XACapabilitiesMgr_QueryColorFormats");
return res;
-}
+ }
/* Add AudioInputDeviceCaps */
-XAresult XACapabilitiesMgr_GetAudioInputDeviceCapabilities(XACapabilities** ppNode)
-{
+XAresult XACapabilitiesMgr_GetAudioInputDeviceCapabilities(
+ XACapabilities** ppNode)
+ {
XAresult res = XA_RESULT_SUCCESS;
XACapabilities *newNode = NULL;
XAAudioInputDescriptor *entries = NULL;
-/* XAAudioInputDescriptor *entries = NULL;*/
XAchar micDeviceName[] = "Default Mic";
int strLen = 0;
- newNode = (XACapabilities *)calloc(1, sizeof(XACapabilities));
+ newNode = (XACapabilities *) calloc(1, sizeof(XACapabilities));
if (!newNode)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
return res;
- }
+ }
newNode->capsType = AUD_I;
newNode->xaid = 0xAD7E5001;
newNode->noOfEntries = 1;
/* Allocate array */
- entries = (XAAudioInputDescriptor*) calloc(1 , sizeof(XAAudioInputDescriptor));
+ entries = (XAAudioInputDescriptor*) calloc(1,
+ sizeof(XAAudioInputDescriptor));
if (!entries)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
return res;
- }
+ }
+
+ newNode->pEntry = (void*) entries;
- newNode->pEntry = (void*)entries;
-
- strLen = strlen((char*)micDeviceName);
- entries->deviceName = (XAchar *)calloc(strLen + 1, sizeof(XAchar));
+ strLen = strlen((char*) micDeviceName);
+ entries->deviceName = (XAchar *) calloc(strLen + 1, sizeof(XAchar));
if (!entries->deviceName)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
return res;
- }
+ }
- strncpy((char*)entries->deviceName, (char*)micDeviceName, strLen);
+ strncpy((char*) entries->deviceName, (char*) micDeviceName, strLen);
entries->deviceName[strLen] = '\0'; /*Null terminate it*/
entries->deviceConnection = XA_DEVCONNECTION_INTEGRATED;
entries->deviceScope = XA_DEVSCOPE_ENVIRONMENT;
entries->deviceLocation = XA_DEVLOCATION_HANDSET;
entries->isForTelephony = XA_BOOLEAN_FALSE;
- entries->minSampleRate=8000000; /* milliHz */
+ entries->minSampleRate = 8000000; /* milliHz */
entries->maxSampleRate = 96000000; /* milliHz */
- entries->isFreqRangeContinuous=XA_BOOLEAN_FALSE;
+ entries->isFreqRangeContinuous = XA_BOOLEAN_FALSE;
entries->numOfSamplingRatesSupported = 12;
- entries->samplingRatesSupported = (XAmilliHertz*)calloc(entries->numOfSamplingRatesSupported, sizeof(XAmilliHertz));
+ entries->samplingRatesSupported = (XAmilliHertz*) calloc(
+ entries->numOfSamplingRatesSupported, sizeof(XAmilliHertz));
if (!entries->samplingRatesSupported)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
return res;
- }
+ }
/* entries in milliHz */
entries->samplingRatesSupported[0] = 8000000;
entries->samplingRatesSupported[1] = 11025000;
@@ -440,52 +446,53 @@
entries->samplingRatesSupported[11] = 96000000;
entries->maxChannels = 2;
- newNode->pEntry = (void*)entries;
+ newNode->pEntry = (void*) entries;
*ppNode = newNode;
return res;
-}
+ }
-XAresult XACapabilitiesMgr_GetAudioOutputDeviceCapabilities(XACapabilities **ppNode)
-{
+XAresult XACapabilitiesMgr_GetAudioOutputDeviceCapabilities(
+ XACapabilities **ppNode)
+ {
XAresult res = XA_RESULT_SUCCESS;
XACapabilities *newNode = NULL;
XAAudioOutputDescriptor *entries = NULL;
-/* XAAudioOutputDescriptor *entries = NULL;*/
XAchar outputDeviceName[] = "Default Speaker";
int strLen = 0;
- newNode = (XACapabilities *)calloc(1, sizeof(XACapabilities));
+ newNode = (XACapabilities *) calloc(1, sizeof(XACapabilities));
if (!newNode)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
return res;
- }
+ }
newNode->capsType = AUD_O;
newNode->xaid = 0xAD7E5002;
newNode->noOfEntries = 1;
/* Allocate array */
- entries = (XAAudioOutputDescriptor*)calloc(1, sizeof(XAAudioOutputDescriptor));
+ entries = (XAAudioOutputDescriptor*) calloc(1,
+ sizeof(XAAudioOutputDescriptor));
if (!entries)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
return res;
- }
+ }
- newNode->pEntry = (void*)entries;
+ newNode->pEntry = (void*) entries;
- strLen = strlen((char*)outputDeviceName);
- entries->pDeviceName = (XAchar *)calloc(strLen + 1, sizeof(XAchar));
+ strLen = strlen((char*) outputDeviceName);
+ entries->pDeviceName = (XAchar *) calloc(strLen + 1, sizeof(XAchar));
if (!entries->pDeviceName)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
return res;
- }
- strncpy((char*)entries->pDeviceName, (char*)outputDeviceName, strLen);
+ }
+ strncpy((char*) entries->pDeviceName, (char*) outputDeviceName, strLen);
entries->pDeviceName[strLen] = '\0'; /*Null terminate it*/
entries->deviceConnection = XA_DEVCONNECTION_INTEGRATED;
entries->deviceScope = XA_DEVSCOPE_ENVIRONMENT;
@@ -495,13 +502,14 @@
entries->maxSampleRate = 96000000; /* milliHz */
entries->isFreqRangeContinuous = XA_BOOLEAN_FALSE;
entries->numOfSamplingRatesSupported = 12;
- entries->samplingRatesSupported = (XAmilliHertz*)calloc(entries->numOfSamplingRatesSupported, sizeof(XAmilliHertz));
+ entries->samplingRatesSupported = (XAmilliHertz*) calloc(
+ entries->numOfSamplingRatesSupported, sizeof(XAmilliHertz));
if (!entries->samplingRatesSupported)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
return res;
- }
+ }
/* entries in milliHz */
entries->samplingRatesSupported[0] = 8000000;
entries->samplingRatesSupported[1] = 11025000;
@@ -517,9 +525,9 @@
entries->samplingRatesSupported[11] = 96000000;
entries->maxChannels = 2;
- newNode->pEntry = (void*)entries;
+ newNode->pEntry = (void*) entries;
*ppNode = newNode;
return res;
-}
+ }
--- a/khronosfws/openmax_al/src/adptcommon/xacapabilitiesmgr.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/adptcommon/xacapabilitiesmgr.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Header File
+ *
+ */
#ifndef XACAPABILITIESMGR_H
#define XACAPABILITIESMGR_H
@@ -22,7 +22,6 @@
#include "openmaxalwrapper.h"
#include "xaglobals.h"
-
#define AUD_D (XACAP_DECODER|XACAP_AUDIO)
#define AUD_E (XACAP_ENCODER|XACAP_AUDIO)
#define VID_D (XACAP_DECODER|XACAP_VIDEO)
@@ -40,45 +39,32 @@
typedef struct XACapabilities_ XACapabilities;
struct XACapabilities_
-{
- XAuint32 capsType;
- XAuint32 xaid; /* OpenMAX id (e.g. XA_VIDEOCODEC macro) */
- XAchar* adaptId; /* TODO fill this */
- /* TODO Do we need a flag for default device id? */
- XAuint32 noOfEntries;
- void* pEntry;
+ {
+ XAuint32 capsType;
+ XAuint32 xaid; /* OpenMAX id (e.g. XA_VIDEOCODEC macro) */
+ XAchar* adaptId; /* Internal Adaptation Device IDs */
+ XAuint32 noOfEntries;
+ void* pEntry;
/*add if/when needed*/
XACapabilities* next;
-};
-
+ };
-XAresult XACapabilitiesMgr_CreateCapabilitieList(
- FrameworkMap* frameworkMap,
- XACapabilities** ppListHead);
+XAresult XACapabilitiesMgr_CreateCapabilitieList(FrameworkMap* frameworkMap,
+ XACapabilities** ppListHead);
XAresult XACapabilitiesMgr_DeleteCapabilitieList(XACapabilities** ppListHead);
-XAresult XACapabilitiesMgr_GetCapsCount(
- XACapabilities* pListHead,
- XACapsType filter,
- XAuint32* count);
+XAresult XACapabilitiesMgr_GetCapsCount(XACapabilities* pListHead,
+ XACapsType filter, XAuint32* count);
-XAresult XACapabilitiesMgr_GetCapsById(
- XACapabilities* pListHead,
- XACapsType filter,
- XAuint32 maxId,
- XACapabilities* data);
+XAresult XACapabilitiesMgr_GetCapsById(XACapabilities* pListHead,
+ XACapsType filter, XAuint32 maxId, XACapabilities* data);
-XAresult XACapabilitiesMgr_GetCapsByIdx(
- XACapabilities* pListHead,
- XACapsType filter,
- XAuint32 idx,
- XACapabilities* data);
+XAresult XACapabilitiesMgr_GetCapsByIdx(XACapabilities* pListHead,
+ XACapsType filter, XAuint32 idx, XACapabilities* data);
-XAresult XACapabilitiesMgr_QueryColorFormats(
- XACapabilities* pListHead,
- XAuint32* pIndex,
- XAuint32* pColorFormats);
+XAresult XACapabilitiesMgr_QueryColorFormats(XACapabilities* pListHead,
+ XAuint32* pIndex, XAuint32* pColorFormats);
#endif /* XACAPABILITIESMGR_H */
--- a/khronosfws/openmax_al/src/adptcommon/xaframeworkmgr.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/adptcommon/xaframeworkmgr.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,37 +1,37 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Framework Manager. Parses the CFG file
+ *
+ */
-#include "xaframeworkmgr.h"
#include <stdio.h>
#include <string.h>
+#include "xaframeworkmgr.h"
/* Default line width permitted in the cfg file + 2 to hold "\r\n"*/
#define LINEWIDTH 82
typedef enum
-{
+ {
FWMgrTagNone,
FWMgrTagURIScheme,
FWMgrTagFileExt
-} FWMgrTagType;
-
+ } FWMgrTagType;
/* Config file location */
-const char configFileLocation[] = "z:/openmaxal/openmaxal.cfg";
+const char configFileLocationZ[] = "z:/openmaxal/openmaxal.cfg";
+const char configFileLocationC[] = "c:/openmaxal/openmaxal.cfg";
/* Tags used for parsing */
const char mediaPlayerBeginTag[] = "<mediaplayer>";
@@ -49,24 +49,19 @@
/* Local function definitions */
/* returns FWMgrTrue if processed successfully */
-static FWMgrBool processConfigEntry(
- const char* buffer,
- FWMgrMOType *mediaType,
- FWMgrFwType *frameworkType,
- FWMgrTagType *tagType,
- FWMgrBool *newNode,
+static FWMgrBool processConfigEntry(const char* buffer,
+ FWMgrMOType *mediaType, FWMgrFwType *frameworkType,
+ FWMgrTagType *tagType, FWMgrBool *newNode, FrameworkMap **node);
+
+/* returns FWMgrTrue if processed successfully */
+static FWMgrBool processTagType(const char* buffer,
+ FWMgrFwType *frameworkType, FWMgrTagType *tagType,
FrameworkMap **node);
/* returns FWMgrTrue if processed successfully */
-static FWMgrBool processTagType(
- const char* buffer,
- FWMgrFwType *frameworkType,
- FWMgrTagType *tagType,
+static FWMgrBool tokenizeTag(FWMgrTagType tagType, const char* buffer,
FrameworkMap **node);
-/* returns FWMgrTrue if processed successfully */
-static FWMgrBool tokenizeTag(FWMgrTagType tagType, const char* buffer, FrameworkMap **node);
-
/* Crates a default rules config file */
static int createDefaultRules(const char * filename);
@@ -76,7 +71,7 @@
* Description: Creates a list of framework and use-case map.
*/
FrameworkMap* XAFrameworkMgr_CreateFrameworkMap()
-{
+ {
char buffer[LINEWIDTH];
int readSize;
int lineNumber = 0;
@@ -87,19 +82,19 @@
FrameworkMap *curNode = NULL;
FWMgrBool newNode;
FrameworkMap *frameworkMap = NULL;
- FILE* fp = fopen(configFileLocation, "r");
-
+ FILE* fp = fopen(configFileLocationZ, "r");
+
if (fp == NULL)
{
- createDefaultRules(configFileLocation);
+ createDefaultRules(configFileLocationC);
- fp = fopen(configFileLocation, "r");
+ fp = fopen(configFileLocationC, "r");
}
if (fp != NULL)
- {
- while((fgets(buffer, LINEWIDTH, fp) != NULL) && processedEntry)
{
+ while ((fgets(buffer, LINEWIDTH, fp) != NULL) && processedEntry)
+ {
/* keep looping until NULL pointer OR error... */
lineNumber++;
readSize = strlen(buffer);
@@ -108,58 +103,55 @@
continue;
/* Ignore replace "\r\n" with '\0' */
- if ((readSize >= 2) && (buffer[readSize-2]=='\r') && (buffer[readSize-1]=='\n'))
- buffer[readSize-2]='\0';
+ if ((readSize >= 2) && (buffer[readSize - 2] == '\r')
+ && (buffer[readSize - 1] == '\n'))
+ buffer[readSize - 2] = '\0';
/* Ignore new line... */
if (readSize == 2)
continue;
- processedEntry = processConfigEntry(
- buffer,
- ¤tMediaType,
- ¤tFrameworkType,
- ¤tTagType,
- &newNode,
- &curNode);
+ processedEntry = processConfigEntry(buffer, ¤tMediaType,
+ ¤tFrameworkType, ¤tTagType, &newNode,
+ &curNode);
if (newNode)
- {
+ {
/*Just link to the last element in the chain*/
if (!frameworkMap)
- {
+ {
frameworkMap = curNode;
- }
+ }
else
- {
+ {
FrameworkMap *lastNode = frameworkMap;
while (lastNode->next)
- {
+ {
lastNode = lastNode->next;
+ }
+ lastNode->next = curNode;
}
- lastNode->next = curNode;
}
}
+ fclose(fp);
}
- fclose(fp);
- }
else
- {
+ {
printf("unable to open config file!\n");
+ }
+ return frameworkMap;
}
- return frameworkMap;
-}
#ifdef _DEBUG
/* void XAFrameworkMgr_DumpFrameworkMap
* Description: Prints map to std console.
*/
void XAFrameworkMgr_DumpFrameworkMap(FrameworkMap *map)
-{
+ {
FrameworkMap *node = map;
int i;
int loopIndex = 0;
while (node)
- {
+ {
loopIndex++;
printf("%d>", loopIndex);
if (node->moType == FWMgrMOPlayer)
@@ -175,50 +167,48 @@
else
printf("UKNOWN-");
printf("Scheme[");
- for(i=0;i<node->uriSchemeCount;i++)
+ for (i = 0; i < node->uriSchemeCount; i++)
printf(" %s", node->uriSchemes[i]);
printf("]FileExt[");
- for(i=0;i<node->fileExtCount;i++)
+ for (i = 0; i < node->fileExtCount; i++)
printf(" %s", node->fileExts[i]);
printf("]\n");
node = node->next;
+ }
}
-}
#endif
/* void XAFrameworkMgr_DeleteFrameworkMap
* Description: Deletes the list of framework and use-case map.
*/
void XAFrameworkMgr_DeleteFrameworkMap(FrameworkMap **map)
-{
+ {
FrameworkMap *node = *map;
FrameworkMap *nextNode = NULL;
int i;
while (node)
- {
- for(i=0;i<node->uriSchemeCount;i++)
- free (node->uriSchemes[i]);
- free (node->uriSchemes);
+ {
+ for (i = 0; i < node->uriSchemeCount; i++)
+ free(node->uriSchemes[i]);
+ free(node->uriSchemes);
- for(i=0;i<node->fileExtCount;i++)
- free (node->fileExts[i]);
- free (node->fileExts);
+ for (i = 0; i < node->fileExtCount; i++)
+ free(node->fileExts[i]);
+ free(node->fileExts);
nextNode = node->next;
- free (node);
+ free(node);
node = nextNode;
+ }
+ *map = NULL;
}
- *map = NULL;
-}
/* FWMgrFwType XAFrameworkMgr_GetFramework
* Description: Returns the framework enum that handles uri.
*/
-FWMgrFwType XAFrameworkMgr_GetFramework(
- FrameworkMap *map,
- const char *uri,
- FWMgrMOType mediaObject)
-{
+FWMgrFwType XAFrameworkMgr_GetFramework(FrameworkMap *map, const char *uri,
+ FWMgrMOType mediaObject)
+ {
FWMgrFwType retVal = FWMgrFWUknown;
char fileScheme[] = "file";
char *uriScheme = NULL;
@@ -230,272 +220,305 @@
int copyLen = 0;
if (!map || !uri)
- {
+ {
/* TODO Log invalid uri */
return retVal;
- }
+ }
/* Get uri scheme */
uriScheme = strchr(uri, ':');
- if ( uriScheme == NULL)
- {
+ if (uriScheme == NULL)
+ {
/* TODO Log invalid uri */
return retVal;
- }
+ }
copyLen = (uriScheme - uri);
- uriScheme = (char*)calloc(copyLen + 1, sizeof(char));
+ uriScheme = (char*) calloc(copyLen + 1, sizeof(char));
strncpy(uriScheme, uri, copyLen);
uriScheme[copyLen] = '\0'; /*Null terminate it*/
if (strcasecmp(uriScheme, fileScheme) == 0)
- {
+ {
/* Get uri extension */
char* dotLoc = strrchr(uri, '.');
- if ( dotLoc == NULL)
- {
+ if (dotLoc == NULL)
+ {
/* TODO Log invalid uri */
free(uriScheme);
return retVal;
- }
+ }
/* We need to add 1 to exclude '.'*/
copyLen = strlen(uri) - (dotLoc + 1 - uri);
- fileExt = (char*)calloc(copyLen + 1, sizeof(char));
+ fileExt = (char*) calloc(copyLen + 1, sizeof(char));
strncpy(fileExt, dotLoc + 1, copyLen);
fileExt[copyLen] = '\0'; /*Null terminate it*/
- }
+ }
while (node)
- {
+ {
if (mediaObject == node->moType)
{
uriMatchFound = FWMgrFalse;
fileExtMatchFound = FWMgrFalse;
/* Match for uri*/
- for(i = 0; i < node->uriSchemeCount; i++)
- {
+ for (i = 0; i < node->uriSchemeCount; i++)
+ {
if (strcasecmp(uriScheme, node->uriSchemes[i]) == 0)
{
- uriMatchFound = FWMgrTrue;
- break;
+ uriMatchFound = FWMgrTrue;
+ break;
}
- }
+ }
/* if uri scheme is not file, we only need to check for uri */
if (!fileExt)
- {
+ {
fileExtMatchFound = FWMgrTrue;
- }
+ }
else
- {
- for(i = 0; i < node->fileExtCount; i++)
{
+ for (i = 0; i < node->fileExtCount; i++)
+ {
if (strcasecmp(fileExt, node->fileExts[i]) == 0)
- {
+ {
fileExtMatchFound = FWMgrTrue;
break;
+ }
}
}
- }
- if ((uriMatchFound == FWMgrTrue) &&
- (fileExtMatchFound == FWMgrTrue))
+ if ((uriMatchFound == FWMgrTrue) && (fileExtMatchFound
+ == FWMgrTrue))
{
- retVal = node->fwType;
- break;
+ retVal = node->fwType;
+ break;
}
}
node = node->next;
- }
+ }
free(uriScheme);
free(fileExt);
return retVal;
-}
+ }
/* Local functions */
/* FWMgrBool processConfigEntry
* Description: Processes a single line entry from the config file.
*/
-FWMgrBool processConfigEntry(
- const char* buffer,
- FWMgrMOType *mediaType,
- FWMgrFwType *frameworkType,
- FWMgrTagType *tagType,
- FWMgrBool *newNode,
- FrameworkMap **node)
-{
+FWMgrBool processConfigEntry(const char* buffer, FWMgrMOType *mediaType,
+ FWMgrFwType *frameworkType, FWMgrTagType *tagType,
+ FWMgrBool *newNode, FrameworkMap **node)
+ {
FWMgrBool processedSuccessfully = FWMgrTrue;
- *newNode = FWMgrFalse;
+
+ if (!buffer || !mediaType || !frameworkType || !tagType || !newNode)
+ {
+ processedSuccessfully = FWMgrFalse;
+ return processedSuccessfully;
+ }
+
+ *newNode = FWMgrFalse;
switch (*mediaType)
- {
+ {
case FWMgrMOUnknown:
- {
+ {
if (strcmp(buffer, mediaPlayerBeginTag) == 0)
- {
+ {
*mediaType = FWMgrMOPlayer;
*frameworkType = FWMgrFWUknown;
*tagType = FWMgrTagNone;
*node = NULL;
- }
+ }
else if (strcmp(buffer, mediaRecorderBeginTag) == 0)
- {
+ {
*mediaType = FWMgrMORecorder;
*frameworkType = FWMgrFWUknown;
*tagType = FWMgrTagNone;
*node = NULL;
+ }
}
- }
break;
case FWMgrMOPlayer:
case FWMgrMORecorder:
- {
+ {
switch (*frameworkType)
- {
- case FWMgrFWUknown:
{
- if ((*mediaType == FWMgrMOPlayer) && (strcmp(buffer, mediaPlayerEndTag) == 0))
- *mediaType = FWMgrMOUnknown;
- else if ((*mediaType == FWMgrMORecorder) && (strcmp(buffer, mediaRecorderEndTag) == 0))
+ case FWMgrFWUknown:
+ {
+ if ((*mediaType == FWMgrMOPlayer) && (strcmp(buffer,
+ mediaPlayerEndTag) == 0))
*mediaType = FWMgrMOUnknown;
- else if ( (strcmp(buffer, mediaFrameworkMmfBeginTag) == 0) ||
- (strcmp(buffer, mediaFrameworkGstBeginTag) == 0) )
- {
+ else if ((*mediaType == FWMgrMORecorder) && (strcmp(
+ buffer, mediaRecorderEndTag) == 0))
+ *mediaType = FWMgrMOUnknown;
+ else if ((strcmp(buffer, mediaFrameworkMmfBeginTag) == 0)
+ || (strcmp(buffer, mediaFrameworkGstBeginTag)
+ == 0))
+ {
+
*frameworkType = FWMgrFWMMF;
if (strcmp(buffer, mediaFrameworkGstBeginTag) == 0)
*frameworkType = FWMgrFWGST;
if (*node)
- {
- printf("Fatal error error. Entry already exists and creating another one!!!");
- return FWMgrFalse;
+ {
+ printf(
+ "Fatal error error. Entry already exists and creating another one!!!");
+ processedSuccessfully = FWMgrFalse;
+ }
+ else
+ {
+ *node = (FrameworkMap*) calloc(1,
+ sizeof(FrameworkMap));
+ if (!(*node))
+ {
+ printf(
+ "Fatal error. No memory to create an Entry!!!");
+ processedSuccessfully = FWMgrFalse;
+ }
+ else
+ {
+ *newNode = FWMgrTrue;
+ (*node)->moType = *mediaType;
+ (*node)->fwType = *frameworkType;
+ }
+ }
}
- *node = (FrameworkMap*)calloc(1, sizeof(FrameworkMap));
- if (!(*node))
- {
- printf("Fatal error. No memory to create an Entry!!!");
- return FWMgrFalse;
- }
- *newNode = FWMgrTrue;
- (*node)->moType = *mediaType;
- (*node)->fwType = *frameworkType;
}
- }
break;
case FWMgrFWMMF:
- {
- processedSuccessfully = processTagType(
- buffer,
- frameworkType,
- tagType,
- node);
- }
+ {
+ processedSuccessfully = processTagType(buffer,
+ frameworkType, tagType, node);
+ }
break;
case FWMgrFWGST:
- {
- processedSuccessfully = processTagType(
- buffer,
- frameworkType,
- tagType,
- node);
- }
+ {
+ processedSuccessfully = processTagType(buffer,
+ frameworkType, tagType, node);
+ }
break;
default:
processedSuccessfully = FWMgrFalse;
break;
- };
- }
+ };
+ }
break;
default:
processedSuccessfully = FWMgrFalse;
break;
- };
+ };
return processedSuccessfully;
-}
+ }
/* FWMgrBool processTagType
- * Description: Processes a framework type, uri, file tags entry from the config file.
+ * Description: Processes a framework type, uri, file tags entry from
+ * the config file.
*/
-FWMgrBool processTagType(const char* buffer,
- FWMgrFwType *frameworkType,
- FWMgrTagType *tagType,
- FrameworkMap **node)
-{
+FWMgrBool processTagType(const char* buffer, FWMgrFwType *frameworkType,
+ FWMgrTagType *tagType, FrameworkMap **node)
+ {
FWMgrBool processedSuccessfully = FWMgrTrue;
- switch (*tagType)
- {
- case FWMgrTagNone:
+
+ if (!buffer || !frameworkType || !tagType || (*node == NULL))
{
- if (((*frameworkType == FWMgrFWMMF) && (strcmp(buffer, mediaFrameworkMmfEndTag) == 0)) ||
- ((*frameworkType == FWMgrFWGST) && (strcmp(buffer, mediaFrameworkGstEndTag) == 0)))
+ processedSuccessfully = FWMgrFalse;
+ return processedSuccessfully;
+ }
+
+ switch (*tagType)
+ {
+ case FWMgrTagNone:
{
+ if (((*frameworkType == FWMgrFWMMF) && (strcmp(buffer,
+ mediaFrameworkMmfEndTag) == 0)) || ((*frameworkType
+ == FWMgrFWGST)
+ && (strcmp(buffer, mediaFrameworkGstEndTag) == 0)))
+ {
*node = NULL;
*frameworkType = FWMgrFWUknown;
- }
+ }
else if (strcmp(buffer, uriSchemeBeginTag) == 0)
*tagType = FWMgrTagURIScheme;
else if (strcmp(buffer, fileExtBeginTag) == 0)
*tagType = FWMgrTagFileExt;
- }
+ }
break;
case FWMgrTagURIScheme:
- {
+ {
if (strcmp(buffer, uriSchemeEndTag) == 0)
*tagType = FWMgrTagNone;
else
- {
+ {
processedSuccessfully = FWMgrFalse;
if (*node)
- processedSuccessfully = tokenizeTag(FWMgrTagURIScheme, buffer, node);
+ processedSuccessfully = tokenizeTag(FWMgrTagURIScheme,
+ buffer, node);
+ }
}
- }
break;
case FWMgrTagFileExt:
- {
+ {
if (strcmp(buffer, fileExtEndTag) == 0)
*tagType = FWMgrTagNone;
else
- {
+ {
processedSuccessfully = FWMgrFalse;
if (*node)
- processedSuccessfully = tokenizeTag(FWMgrTagFileExt, buffer, node);
+ processedSuccessfully = tokenizeTag(FWMgrTagFileExt,
+ buffer, node);
+ }
}
- }
break;
default:
+ processedSuccessfully = FWMgrFalse;
break;
- };
+ };
return processedSuccessfully;
-}
+ }
/* FWMgrBool processTagType
- * Description: Processes a framework type, uri, file tags entry from the config file.
+ * Description: Processes a framework type, uri, file tags entry from
+ * the config file.
*/
-FWMgrBool tokenizeTag(FWMgrTagType tagType, const char* buffer, FrameworkMap **node)
-{
- char* tempStartPtr = /*const_cast<char*>*/(char*)(buffer);
- char* tempEndPtr = /*const_cast<char*>*/(char*)(buffer);
+FWMgrBool tokenizeTag(FWMgrTagType tagType, const char* buffer,
+ FrameworkMap **node)
+ {
+ char* tempStartPtr;
+ char* tempEndPtr;
int index = 0;
int strLen = 0;
+ if (!buffer || (*node == NULL))
+ {
+ return FWMgrFalse;
+ }
+
+ tempStartPtr = /*const_cast<char*>*/(char*) (buffer);
+ tempEndPtr = /*const_cast<char*>*/(char*) (buffer);
+
if (tagType == FWMgrTagURIScheme)
- {
+ {
(*node)->uriSchemeCount = atoi(buffer);
- (*node)->uriSchemes = (char**)calloc((*node)->uriSchemeCount, sizeof (*((*node)->uriSchemes)));
+ (*node)->uriSchemes = (char**) calloc((*node)->uriSchemeCount,
+ sizeof(*((*node)->uriSchemes)));
if (!(*node)->uriSchemes)
- {
+ {
printf("Fatal error. No memory to create an Entry!!!");
return FWMgrFalse;
+ }
}
- }
else if (tagType == FWMgrTagFileExt)
- {
+ {
(*node)->fileExtCount = atoi(buffer);
- (*node)->fileExts = (char**)calloc((*node)->fileExtCount, sizeof (*((*node)->fileExts)));
+ (*node)->fileExts = (char**) calloc((*node)->fileExtCount,
+ sizeof(*((*node)->fileExts)));
if (!(*node)->fileExts)
- {
+ {
printf("Fatal error. No memory to create an Entry!!!");
return FWMgrFalse;
+ }
}
- }
else
return FWMgrFalse;
@@ -503,71 +526,90 @@
tempStartPtr = strchr(tempStartPtr, ',');
index = 0;
while (tempStartPtr && (strlen(tempStartPtr) > 1))
- {
+ {
tempStartPtr++; /* Ignore separator ','*/
tempEndPtr = strchr(tempStartPtr, ',');
strLen = (tempEndPtr - tempStartPtr) + 1; /* To hold null terminator */
if (strLen > 0)
- {
+ {
if (tagType == FWMgrTagURIScheme)
- {
- (*node)->uriSchemes[index] = (char*)calloc(strLen, sizeof(char));
+ {
+ (*node)->uriSchemes[index] = (char*) calloc(strLen,
+ sizeof(char));
strncpy((*node)->uriSchemes[index], tempStartPtr, strLen);
- (*node)->uriSchemes[index][strLen-1] = '\0'; /*Null terminate it*/
+ (*node)->uriSchemes[index][strLen - 1] = '\0'; /*Null terminate it*/
index++;
- }
+ }
else if (tagType == FWMgrTagFileExt)
- {
- (*node)->fileExts[index] = (char*)calloc(strLen, sizeof(char));
+ {
+ (*node)->fileExts[index] = (char*) calloc(strLen,
+ sizeof(char));
strncpy((*node)->fileExts[index], tempStartPtr, strLen);
- (*node)->fileExts[index][strLen-1] = '\0'; /*Null terminate it*/
+ (*node)->fileExts[index][strLen - 1] = '\0'; /*Null terminate it*/
index++;
+ }
}
+ tempStartPtr = tempEndPtr;
}
- tempStartPtr = tempEndPtr;
+ return FWMgrTrue;
}
- return FWMgrTrue;
-}
int createDefaultRules(const char * filename)
-{
+ {
FILE* fp = fopen(filename, "w");
if (fp == NULL)
return /*KErrAccessDenied*/-21;
fputs("#/*\r\n", fp);
- fputs("#* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).\r\n", fp);
+ fputs(
+ "#* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).\r\n",
+ fp);
fputs("#* All rights reserved.\r\n", fp);
- fputs("#* This component and the accompanying materials are made available\r\n", fp);
+ fputs(
+ "#* This component and the accompanying materials are made available\r\n",
+ fp);
fputs("#* under the terms of \"Eclipse Public License v1.0\"\r\n", fp);
fputs("#* which accompanies this distribution, and is available\r\n", fp);
- fputs("#* at the URL \"http://www.eclipse.org/legal/epl-v10.html\".\r\n", fp);
+ fputs("#* at the URL \"http://www.eclipse.org/legal/epl-v10.html\".\r\n",
+ fp);
fputs("#*\r\n", fp);
fputs("#* Initial Contributors:\r\n", fp);
fputs("#* Nokia Corporation - initial contribution.\r\n", fp);
fputs("#*\r\n", fp);
fputs("#* Contributors:\r\n", fp);
fputs("#*\r\n", fp);
- fputs("#* Description:\r\n", fp);
+ fputs("#* Description:\r\n", fp);
fputs("#*\r\n", fp);
fputs("#*/\r\n", fp);
- fputs("#============================================================================>|\r\n", fp);
- fputs("# Must not exceed 80 chars each line=========================================>|\r\n", fp);
- fputs("#============================================================================>|\r\n", fp);
+ fputs(
+ "#============================================================================>|\r\n",
+ fp);
+ fputs(
+ "# Must not exceed 80 chars each line=========================================>|\r\n",
+ fp);
+ fputs(
+ "#============================================================================>|\r\n",
+ fp);
fputs("<mediaplayer>\r\n", fp);
fputs("<mmf>\r\n", fp);
fputs("<urischeme>\r\n", fp);
- fputs("# Num of entries followed by actual entries all ending with a comma\r\n", fp);
- fputs("3,file,http,rtsp,\r\n", fp);
+ fputs(
+ "# Num of entries followed by actual entries all ending with a comma\r\n",
+ fp);
+ fputs("6,file,http,rtsp,rtspu,rtspt,mms,\r\n", fp);
fputs("</urischeme>\r\n", fp);
fputs("<fileext>\r\n", fp);
- fputs("15,3gp,wma,wmv,wav,amr,mp3,mp4,rm,ra,avi,mkv,aac,mid,awb,3g2,\r\n", fp);
+ fputs(
+ "15,3gp,wma,wmv,wav,amr,mp3,mp4,rm,ra,avi,mkv,aac,mid,awb,3g2,\r\n",
+ fp);
fputs("</fileext>\r\n", fp);
fputs("</mmf>\r\n", fp);
fputs("</mediaplayer>\r\n", fp);
fputs("<mediarecorder>\r\n", fp);
fputs("<gst>\r\n", fp);
fputs("<urischeme>\r\n", fp);
- fputs("# Num of entries followed by actual entries all ending with a comma\r\n", fp);
+ fputs(
+ "# Num of entries followed by actual entries all ending with a comma\r\n",
+ fp);
fputs("1,file,\r\n", fp);
fputs("</urischeme>\r\n", fp);
fputs("<fileext>\r\n", fp);
@@ -577,4 +619,4 @@
fputs("</mediarecorder>\r\n", fp);
fclose(fp);
return 0;
-}
+ }
--- a/khronosfws/openmax_al/src/adptcommon/xaframeworkmgr.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/adptcommon/xaframeworkmgr.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,20 +1,19 @@
-
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Header File for Framework Manager
+ *
+ */
#ifndef XAFRAMEWORKMANAGER_H
#define XAFRAMEWORKMANAGER_H
@@ -22,29 +21,29 @@
#include <stdlib.h>
typedef enum
-{
+ {
FWMgrMOUnknown,
FWMgrMOPlayer,
FWMgrMORecorder
-} FWMgrMOType;
+ } FWMgrMOType;
typedef enum
-{
+ {
FWMgrFWUknown,
FWMgrFWMMF,
FWMgrFWGST
-} FWMgrFwType;
+ } FWMgrFwType;
typedef enum
-{
+ {
FWMgrFalse,
FWMgrTrue
-} FWMgrBool;
+ } FWMgrBool;
typedef struct FrameworkMap_ FrameworkMap;
struct FrameworkMap_
-{
+ {
FWMgrMOType moType;
int uriSchemeCount;
char **uriSchemes;
@@ -52,8 +51,7 @@
char **fileExts;
FWMgrFwType fwType;
FrameworkMap *next;
-};
-
+ };
FrameworkMap* XAFrameworkMgr_CreateFrameworkMap(void);
#ifdef _DEBUG
@@ -61,9 +59,7 @@
#endif
void XAFrameworkMgr_DeleteFrameworkMap(FrameworkMap **map);
-FWMgrFwType XAFrameworkMgr_GetFramework(
- FrameworkMap *map,
- const char *uri,
- FWMgrMOType mediaObject);
+FWMgrFwType XAFrameworkMgr_GetFramework(FrameworkMap *map, const char *uri,
+ FWMgrMOType mediaObject);
#endif //XAFRAMEWORKMANAGER_H
--- a/khronosfws/openmax_al/src/common/openmaxal.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/openmaxal.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,20 +1,22 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Entry Point to the OpenMAX AL Core from the Client
+ * Application. Implementation of the OpenMAX AL Global
+ * Functions.
+ *
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
@@ -24,39 +26,35 @@
#include "xaglobals.h"
#include "xaobjects.h"
-EXPORT_C XAresult XAAPIENTRY xaCreateEngine(XAObjectItf *pEngine, XAuint32 numOptions,
- const XAEngineOption *pEngineOptions,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired)
-{
+EXPORT_C XAresult XAAPIENTRY xaCreateEngine(XAObjectItf *pEngine,
+ XAuint32 numOptions, const XAEngineOption *pEngineOptions,
+ XAuint32 numInterfaces, const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired)
+ {
XAresult ret;
DEBUG_API("->xaCreateEngine");
- ret = XAEngineImpl_Create(pEngine, numOptions,
- pEngineOptions,
- numInterfaces,
- pInterfaceIds,
- pInterfaceRequired);
+ ret = XAEngineImpl_Create(pEngine, numOptions, pEngineOptions,
+ numInterfaces, pInterfaceIds, pInterfaceRequired);
DEBUG_API_A1("<-xaCreateEngine: 0x%x",(int)ret);
return ret;
-}
+ }
-EXPORT_C XAresult XAAPIENTRY xaQueryNumSupportedEngineInterfaces(XAuint32 *pNumSupportedInterfaces)
-{
+EXPORT_C XAresult XAAPIENTRY xaQueryNumSupportedEngineInterfaces(
+ XAuint32 *pNumSupportedInterfaces)
+ {
XAresult ret;
DEBUG_API("->xaQueryNumSupportedEngineInterfaces");
ret = XAEngineImpl_QueryNumSupportedInterfaces(pNumSupportedInterfaces);
DEBUG_API_A1("<-xaQueryNumSupportedEngineInterfaces: 0x%x",(int)ret);
return ret;
-}
+ }
EXPORT_C XAresult XAAPIENTRY xaQuerySupportedEngineInterfaces(XAuint32 index,
- XAInterfaceID *pInterfaceId)
-{
+ XAInterfaceID *pInterfaceId)
+ {
XAresult ret;
DEBUG_API("->xaQuerySupportedEngineInterfaces");
- ret = XAEngineImpl_QuerySupportedInterfaces(
- index, pInterfaceId);
+ ret = XAEngineImpl_QuerySupportedInterfaces(index, pInterfaceId);
DEBUG_API_A1("<-xaQuerySupportedEngineInterfaces: 0x%x",(int)ret);
return ret;
-}
+ }
--- a/khronosfws/openmax_al/src/common/xacommon.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xacommon.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Common Openmax AL utility functions
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
@@ -27,32 +27,33 @@
* compare two XAInterfaceIDs, return true if same
*/
XAboolean XACommon_EqualIIds(XAInterfaceID idA, XAInterfaceID idB)
-{
+ {
XAboolean nodeOk;
XAuint16 nodeIdx;
- if(idA==idB) return XA_BOOLEAN_TRUE;
- if(!idA||!idB) return XA_BOOLEAN_FALSE;
- if( idA->time_low == idB->time_low &&
- idA->time_mid == idB->time_mid &&
- idA->time_hi_and_version == idB->time_hi_and_version &&
- idA->clock_seq == idB->clock_seq)
+ if (idA == idB)
+ return XA_BOOLEAN_TRUE;
+ if (!idA || !idB)
+ return XA_BOOLEAN_FALSE;
+ if (idA->time_low == idB->time_low && idA->time_mid == idB->time_mid
+ && idA->time_hi_and_version == idB->time_hi_and_version
+ && idA->clock_seq == idB->clock_seq)
{
- nodeOk = XA_BOOLEAN_TRUE;
- for(nodeIdx = 0; nodeIdx < sizeof(idA->node); nodeIdx++ )
+ nodeOk = XA_BOOLEAN_TRUE;
+ for (nodeIdx = 0; nodeIdx < sizeof(idA->node); nodeIdx++)
{
- if(idA->node[nodeIdx] != idB->node[nodeIdx])
+ if (idA->node[nodeIdx] != idB->node[nodeIdx])
{
- nodeOk = XA_BOOLEAN_FALSE;
- break;
+ nodeOk = XA_BOOLEAN_FALSE;
+ break;
}
}
- if(nodeOk)
+ if (nodeOk)
{
- return XA_BOOLEAN_TRUE;
+ return XA_BOOLEAN_TRUE;
}
}
return XA_BOOLEAN_FALSE;
-}
+ }
/* Check source availability and content type. Return error only if we are sure
* content is not valid, otherwise let adaptation try to identify and use content.
@@ -60,83 +61,82 @@
* @return Success code
*/
XAresult XACommon_CheckDataSource(XADataSource* source, XAMediaType* type)
-{
- XAresult ret=XA_RESULT_SUCCESS;
- XAchar* fname=NULL;
- XAchar* mime=NULL;
- XAboolean isLocal=XA_BOOLEAN_FALSE;
+ {
+ XAresult ret = XA_RESULT_SUCCESS;
+ XAchar* fname = NULL;
+ XAchar* mime = NULL;
+ XAboolean isLocal = XA_BOOLEAN_FALSE;
-
- if(!source || !source->pLocator)
- {
+ if (!source || !source->pLocator)
+ {
DEBUG_ERR("Invalid XADataSource structure!!");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
/* check URI availability */
- if( *(XAuint32*)(source->pLocator) == XA_DATALOCATOR_URI )
- {
- fname = (XAchar*)((XADataLocator_URI*)(source->pLocator))->URI;
- /* check protocol prefix */
- if(strstr((char*)fname,":///"))
+ if (*(XAuint32*) (source->pLocator) == XA_DATALOCATOR_URI)
{
- if(strncmp((char*)fname, "file:///", 8) == 0)
+ fname = (XAchar*) ((XADataLocator_URI*) (source->pLocator))->URI;
+ /* check protocol prefix */
+ if (strstr((char*) fname, "://"))
{
- isLocal=XA_BOOLEAN_TRUE;
+ if (strncmp((char*) fname, "file:///", 8) == 0)
+ {
+ isLocal = XA_BOOLEAN_TRUE;
fname += 8;
- }
+ }
else
- { /* add support for other protocols if needed */
- isLocal=XA_BOOLEAN_FALSE;
+ { /* add support for other protocols if needed */
+ isLocal = XA_BOOLEAN_FALSE;
+ }
+ }
+ else
+ {
+ isLocal = XA_BOOLEAN_TRUE;
+ }
+ if (isLocal)
+ {
+ FILE* file = fopen((char*) fname, "r");
+ if (!file)
+ {
+ DEBUG_INFO_A1("%s not found from filesystem", fname);
+ ret = XA_RESULT_CONTENT_NOT_FOUND;
+ }
+ else
+ {
+ fclose(file);
+ }
}
}
- else
- {
- isLocal=XA_BOOLEAN_TRUE;
- }
- if(isLocal)
- {
- FILE* file=fopen((char*)fname, "r");
- if(!file)
- {
- DEBUG_INFO_A1("%s not found from filesystem", fname);
- ret = XA_RESULT_CONTENT_NOT_FOUND;
- }
- else
- {
- fclose(file);
- }
- }
- }
/* check content type */
- if( type )
- {
- if(source->pFormat)
+ if (type)
{
- switch( *(XAuint32*)source->pFormat )
+ if (source->pFormat)
{
+ switch (*(XAuint32*) source->pFormat)
+ {
case XA_DATAFORMAT_MIME:
- {
+ {
/* try to parse mimetype first */
- mime = ((XADataFormat_MIME*)(source->pFormat))->mimeType;
- if(mime && (strncmp((char*)mime,"audio",5)==0))
- {
+ mime = ((XADataFormat_MIME*) (source->pFormat))->mimeType;
+ if (mime && (strncmp((char*) mime, "audio", 5) == 0))
+ {
*type = XA_MEDIATYPE_AUDIO;
- }
- else if(mime && (strncmp((char*)mime,"video",5)==0))
- {
+ }
+ else if (mime && (strncmp((char*) mime, "video", 5) == 0))
+ {
*type = XA_MEDIATYPE_VIDEO;
- }
- else if(mime && (strncmp((char*)mime,"image",5)==0))
- {
+ }
+ else if (mime && (strncmp((char*) mime, "image", 5) == 0))
+ {
*type = XA_MEDIATYPE_IMAGE;
- }
+ }
else
- {
+ {
/* try to parse containertype next */
- switch( ((XADataFormat_MIME*)(source->pFormat))->containerType )
- {
+ switch (((XADataFormat_MIME*) (source->pFormat))->containerType)
+ {
case XA_CONTAINERTYPE_M4A:
case XA_CONTAINERTYPE_MP3:
case XA_CONTAINERTYPE_WAV:
@@ -177,58 +177,60 @@
default:
*type = XA_MEDIATYPE_UNKNOWN;
break;
+ }
}
}
- }
- break;
+ break;
case XA_DATAFORMAT_PCM:
*type = XA_MEDIATYPE_AUDIO;
- break;
+ break;
case XA_DATAFORMAT_RAWIMAGE:
*type = XA_MEDIATYPE_IMAGE;
- break;
+ break;
default:
*type = XA_MEDIATYPE_UNKNOWN;
- DEBUG_INFO("Warning: unknown dataformat");
- break;
+ DEBUG_INFO("Warning: unknown dataformat")
+ ;
+ break;
+ }
}
- }
else
- {
+ {
DEBUG_ERR("Warning: no data format set");
*type = XA_MEDIATYPE_UNKNOWN;
- }
+ }
/* Expand this list if add new supported media type */
/* If media type unknow check it from file extension */
- if(*type == XA_MEDIATYPE_UNKNOWN && fname)
- {
- if( (strstr((char*)fname,".wav")) || (strstr((char*)fname,".mid"))
- || (strstr((char*)fname,".amr")))
+ if (*type == XA_MEDIATYPE_UNKNOWN && fname)
{
+ if ((strstr((char*) fname, ".wav")) || (strstr((char*) fname,
+ ".mid")) || (strstr((char*) fname, ".amr")))
+ {
*type = XA_MEDIATYPE_AUDIO;
- }
- if( (strstr((char*)fname,".avi")) || (strstr((char*)fname,".ogg")) )
- {
+ }
+ if ((strstr((char*) fname, ".avi")) || (strstr((char*) fname,
+ ".ogg")))
+ {
- }
- if(strstr((char*)fname,".jpg"))
- {
+ }
+ if (strstr((char*) fname, ".jpg"))
+ {
*type = XA_MEDIATYPE_IMAGE;
+ }
}
}
+ return ret;
}
- return ret;
-}
/* Validate XADataSink and XADataSrc object creation parameters.
* @return Success code
*/
-XAresult XACommon_ValidateDataLocator(XAuint32 pCounter, void* pSnk, ... )
-{
+XAresult XACommon_ValidateDataLocator(XAuint32 pCounter, void* pSnk, ...)
+ {
va_list argptr;
XAuint32 counter = 0;
XADataLocator_URI* uri = NULL;
@@ -240,91 +242,94 @@
XADataSink* xaSnk = NULL;
DEBUG_API("->XACommon_ValidateDataLocator");
- xaSnk = (XADataSink*)pSnk;
+ xaSnk = (XADataSink*) pSnk;
/* Initialize variable arguments. */
- //va_start (argptr, xaSnk); TL: Replaced with:
- va_start (argptr, pSnk);
- while( counter < pCounter )
- {
- if( counter > 0)
+ va_start (argptr, pSnk);
+ while (counter < pCounter)
{
+ if (counter > 0)
+ {
/*XADataSink and XADataSrc are equivalent, use XADataSink for both*/
- xaSnk = va_arg(argptr, XADataSink*);
- }
+xaSnk = va_arg(argptr, XADataSink*);
+ }
if( !xaSnk )
- { /*NULL sinks/sources are possible, not checked here*/
+ { /*NULL sinks/sources are possible, not checked here*/
counter++;
continue;
- }
+ }
else if( !xaSnk->pLocator )
- {
+ {
DEBUG_ERR_A1("NULL XADataLocator in parameter %d",(int)counter);
ret = XA_RESULT_PARAMETER_INVALID;
va_end(argptr);
- DEBUG_API("<-XACommon_ValidateDataLocator");
- return ret;
- }
+ DEBUG_API("<-XACommon_ValidateDataLocator");
+ return ret;
+ }
switch ( *(XAuint32*)(xaSnk->pLocator) )
- {
+ {
+ case XA_DEFAULTDEVICEID_AUDIOOUTPUT:
+ DEBUG_INFO("XA_DEFAULTDEVICEID_AUDIOOUTPUT");
+ uri = (XADataLocator_URI*)xaSnk->pLocator;
+ break;
case XA_DATALOCATOR_URI:
- DEBUG_INFO("XA_DATALOCATOR_URI");
- uri = (XADataLocator_URI*)xaSnk->pLocator;
- if( !uri->URI && !xaSnk->pFormat )
+ DEBUG_INFO("XA_DATALOCATOR_URI");
+ uri = (XADataLocator_URI*)xaSnk->pLocator;
+ if( !uri->URI && !xaSnk->pFormat )
{
- DEBUG_ERR("Invalid parameter set for uri ");
- ret = XA_RESULT_PARAMETER_INVALID;
+ DEBUG_ERR("Invalid parameter set for uri ");
+ ret = XA_RESULT_PARAMETER_INVALID;
}
- break;
+ break;
case XA_DATALOCATOR_NATIVEDISPLAY:
- DEBUG_INFO("Sink locator type - XA_DATALOCATOR_NATIVEDISPLAY");
- display = (XADataLocator_NativeDisplay*)(xaSnk->pLocator);
- if( !display->hDisplay || !display->hWindow )
+ DEBUG_INFO("Sink locator type - XA_DATALOCATOR_NATIVEDISPLAY");
+ display = (XADataLocator_NativeDisplay*)(xaSnk->pLocator);
+ if( !display->hDisplay || !display->hWindow )
{
- /*No action at this time*/
- DEBUG_INFO("Warning - no display or window handle set");
+ /*No action at this time*/
+ DEBUG_INFO("Warning - no display or window handle set");
}
- break;
+ break;
case XA_DATALOCATOR_OUTPUTMIX:
- DEBUG_INFO("Sink locator type - XA_DATALOCATOR_OUTPUTMIX");
+ DEBUG_INFO("Sink locator type - XA_DATALOCATOR_OUTPUTMIX");
{
- omix = (XADataLocator_OutputMix*)(xaSnk->pLocator);
- if ( !omix->outputMix )
+ omix = (XADataLocator_OutputMix*)(xaSnk->pLocator);
+ if ( !omix->outputMix )
{
- DEBUG_ERR("Invalid parameter set for outputmix");
- ret = XA_RESULT_PARAMETER_INVALID;
+ DEBUG_ERR("Invalid parameter set for outputmix");
+ ret = XA_RESULT_PARAMETER_INVALID;
}
}
- break;
+ break;
case XA_DATALOCATOR_ADDRESS:
- DEBUG_INFO("XA_DATALOCATOR_ADDRESS");
- address = (XADataLocator_Address*)(xaSnk->pLocator);
- if( !address->pAddress && !xaSnk->pFormat )
+ DEBUG_INFO("XA_DATALOCATOR_ADDRESS");
+ address = (XADataLocator_Address*)(xaSnk->pLocator);
+ if( !address->pAddress && !xaSnk->pFormat )
{
- DEBUG_ERR("Invalid parameter set for address");
- ret = XA_RESULT_PARAMETER_INVALID;
+ DEBUG_ERR("Invalid parameter set for address");
+ ret = XA_RESULT_PARAMETER_INVALID;
}
- break;
+ break;
case XA_DATALOCATOR_IODEVICE:
- DEBUG_INFO("XA_DATALOCATOR_IODEVICE");
- iodevice = (XADataLocator_IODevice*)(xaSnk->pLocator);
- if( iodevice->device )
+ DEBUG_INFO("XA_DATALOCATOR_IODEVICE");
+ iodevice = (XADataLocator_IODevice*)(xaSnk->pLocator);
+ if( iodevice->device )
{
- DEBUG_INFO("Media object as IODevice");
+ DEBUG_INFO("Media object as IODevice");
}
- else
+ else
{
- DEBUG_INFO("Iodevice id used");
+ DEBUG_INFO("Iodevice id used");
}
- break;
+ break;
default:
- DEBUG_ERR("Incorrect data locator for sink.")
- ret = XA_RESULT_PARAMETER_INVALID;
- break;
+ DEBUG_ERR("Incorrect data locator for sink.")
+ ret = XA_RESULT_PARAMETER_INVALID;
+ break;
+ }
+ counter ++;
}
- counter ++;
- }
va_end(argptr);
DEBUG_API("<-XACommon_ValidateDataLocator");
return ret;
-}
+ }
--- a/khronosfws/openmax_al/src/common/xadynamicsourceitf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xadynamicsourceitf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,29 +1,28 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Dynamic Source Interface Implementation
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "xadynamicsourceitf.h"
-
+
#include "xadynamicsourceitfadaptation.h"
#include "xadynamicsourceitfadaptationmmf.h"
-
/*****************************************************************************
* Base interface XADynamicSourceItf implementation
*****************************************************************************/
@@ -32,45 +31,44 @@
* Description: Sets the data source for the object.
*/
XAresult XADynamicSourceItfImpl_SetSource(XADynamicSourceItf self,
- XADataSource *pDataSource)
-{
+ XADataSource *pDataSource)
+ {
XAresult res = XA_RESULT_SUCCESS;
- XADynamicSourceItfImpl* impl = (XADynamicSourceItfImpl*)(*self);
+ XADynamicSourceItfImpl* impl = (XADynamicSourceItfImpl*) (*self);
DEBUG_API("->XADynamicSourceItfImpl_SetSource");
/* check casting */
- if( !impl || impl != impl->self || !pDataSource )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XADynamicSourceItfImpl_SetSource");
+ if (!impl || impl != impl->self || !pDataSource)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XADynamicSourceItfImpl_SetSource");
return XA_RESULT_PARAMETER_INVALID;
- }
-
- if( !impl->adaptCtx )
- {
- DEBUG_ERR("Adaptation not ready!!");
- DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
- DEBUG_API("<-XADynamicSourceItfImpl_SetSource");
+ }
+
+ if (!impl->adaptCtx)
+ {
+ DEBUG_ERR("Adaptation not ready!!");DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");DEBUG_API("<-XADynamicSourceItfImpl_SetSource");
res = XA_RESULT_INTERNAL_ERROR;
- }
+ }
else
- {
- res = XACommon_CheckDataSource(pDataSource,NULL);
- if(res==XA_RESULT_SUCCESS)
{
- if(impl->adaptCtx->fwtype == FWMgrFWGST)
+ res = XACommon_CheckDataSource(pDataSource, NULL);
+ if (res == XA_RESULT_SUCCESS)
+ {
+ if (impl->adaptCtx->fwtype == FWMgrFWGST)
{
- res = XADynamicSourceItfAdapt_SetSource((XAAdaptationGstCtx*)impl->adaptCtx, pDataSource );
+ res = XADynamicSourceItfAdapt_SetSource(
+ (XAAdaptationGstCtx*) impl->adaptCtx, pDataSource);
}
else
{
- res = XADynamicSourceItfAdaptMMF_SetSource((XAAdaptationMMFCtx*)impl->adaptCtx, pDataSource );
+ res = XADynamicSourceItfAdaptMMF_SetSource(
+ (XAAdaptationMMFCtx*) impl->adaptCtx, pDataSource);
}
+ }
}
- }
DEBUG_API("<-XADynamicSourceItfImpl_SetSource");
return res;
-}
+ }
/*****************************************************************************
* XADynamicSourceItfImpl -specific methods
@@ -79,33 +77,32 @@
/* XADynamicSourceItfImpl* XADynamicSourceItfImpl_Create()
* Description: Allocate and initialize DynamicSourceItfImpl
*/
-XADynamicSourceItfImpl* XADynamicSourceItfImpl_Create( XAAdaptationBaseCtx *adaptCtx )
-{
- XADynamicSourceItfImpl* self = (XADynamicSourceItfImpl*)
- calloc(1,sizeof(XADynamicSourceItfImpl));
-
+XADynamicSourceItfImpl* XADynamicSourceItfImpl_Create(
+ XAAdaptationBaseCtx *adaptCtx)
+ {
+ XADynamicSourceItfImpl* self = (XADynamicSourceItfImpl*) calloc(1,
+ sizeof(XADynamicSourceItfImpl));
+
DEBUG_API("->XADynamicSourceItfImpl_Create");
- if( self )
- {
+ if (self)
+ {
/* init itf default implementation */
self->itf.SetSource = XADynamicSourceItfImpl_SetSource;
/* init variables */
self->adaptCtx = adaptCtx;
self->self = self;
+ }DEBUG_API("<-XADynamicSourceItfImpl_Create");
+ return self;
}
- DEBUG_API("<-XADynamicSourceItfImpl_Create");
- return self;
-}
/* void XADynamicSourceItfImpl_Free(XADynamicSourceItfImpl* self)
* Description: Free all resources reserved at XADynamicSourceItfImpl_Create
*/
void XADynamicSourceItfImpl_Free(XADynamicSourceItfImpl* self)
-{
+ {
DEBUG_API("->XADynamicSourceItfImpl_Free");
assert( self==self->self );
- free( self );
+ free(self);
DEBUG_API("<-XADynamicSourceItfImpl_Free");
-}
+ }
-
--- a/khronosfws/openmax_al/src/common/xadynamicsourceitf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xadynamicsourceitf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Dynamic Source Interface Implementation Header
+ *
+ */
#ifndef XADYNAMICSOURCEITF_H
#define XADYNAMICSOURCEITF_H
@@ -29,7 +29,7 @@
/** STRUCTURES **/
/* Definition of XADynamicSourceItf implementation */
typedef struct XADynamicSourceItfImpl_
-{
+ {
/* parent interface */
struct XADynamicSourceItf_ itf;
/* pointer to self */
@@ -37,7 +37,7 @@
/* variables */
XAAdaptationBaseCtx *adaptCtx;
-} XADynamicSourceItfImpl;
+ } XADynamicSourceItfImpl;
/** METHODS **/
@@ -45,10 +45,11 @@
* See API Specification for method documentation
*/
XAresult XADynamicSourceItfImpl_SetSource(XADynamicSourceItf self,
- XADataSource *pDataSource);
+ XADataSource *pDataSource);
/* XADynamicSourceItfImpl -specific methods */
-XADynamicSourceItfImpl* XADynamicSourceItfImpl_Create(XAAdaptationBaseCtx *adaptCtx);
+XADynamicSourceItfImpl* XADynamicSourceItfImpl_Create(
+ XAAdaptationBaseCtx *adaptCtx);
void XADynamicSourceItfImpl_Free(XADynamicSourceItfImpl* self);
#endif /* XADYNAMICSOURCEITF_H */
--- a/khronosfws/openmax_al/src/common/xadynintmgmtitf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xadynintmgmtitf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Dynamic Management Interface Implementation
+ *
+ */
#include <stdlib.h>
#include <assert.h>
@@ -26,17 +26,17 @@
* Description: Validate interface pointer and cast it to implementation pointer.
*/
static XADIMItfImpl* GetImpl(XADynamicInterfaceManagementItf self)
-{
- if( self )
{
- XADIMItfImpl* impl = (XADIMItfImpl*)(*self);
- if( impl && (impl == impl->self) )
+ if (self)
{
+ XADIMItfImpl* impl = (XADIMItfImpl*) (*self);
+ if (impl && (impl == impl->self))
+ {
return impl;
+ }
}
+ return NULL;
}
- return NULL;
-}
/**
* Base Interface XADynamicInterfaceManagementItf implementation
@@ -46,177 +46,171 @@
* Optionally asynchronous method for exposing an interface on an object.
*/
XAresult XADIMItfImpl_AddInterface(XADynamicInterfaceManagementItf self,
- const XAInterfaceID iid,
- XAboolean async)
-{
+ const XAInterfaceID iid, XAboolean async)
+ {
XADIMItfImpl* impl = GetImpl(self);
XAresult retval = XA_RESULT_SUCCESS;
DEBUG_API("->XADIMItfImpl_AddInterface");
- if( !impl )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XADIMItfImpl_AddInterface");
+ if (!impl)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XADIMItfImpl_AddInterface");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
- if( async )
- {
+ if (async)
+ {
/* invoke asynchronously */
/* check if another async operation is processed */
- if(impl->asyncOngoing)
- {
+ if (impl->asyncOngoing)
+ {
/* abort ongoing operation */
XAImpl_CancelThread(impl->asyncThr);
- }
+ }
impl->asyncOngoing = XA_BOOLEAN_TRUE;
impl->asyncID = iid;
- if(XAImpl_StartThread(impl->asyncThr, NULL,
- &XADIMItfImpl_AsyncAddItf,(void*)(self)))
- {
+ if (XAImpl_StartThread(impl->asyncThr, NULL,
+ &XADIMItfImpl_AsyncAddItf, (void*) (self)))
+ {
impl->asyncOngoing = XA_BOOLEAN_FALSE;
retval = XA_RESULT_RESOURCE_ERROR;
- }
+ }
else
- {
+ {
retval = XA_RESULT_SUCCESS;
+ }
}
- }
else
- {
+ {
/* invoke synchronously */
retval = XADIMItfImpl_DoAddItf(impl, iid);
- }
+ }
DEBUG_API_A1("<-XADIMItfImpl_AddInterface %lu", retval);
return retval;
-}
+ }
/* XAresult XADIMItfImpl_RemoveInterface
* Synchronous method for removing a dynamically exposed interface on an object.
*/
XAresult XADIMItfImpl_RemoveInterface(XADynamicInterfaceManagementItf self,
- const XAInterfaceID iid)
-{
+ const XAInterfaceID iid)
+ {
XADIMItfImpl* impl = GetImpl(self);
XAresult retval = XA_RESULT_SUCCESS;
DEBUG_API("->XADIMItfImpl_RemoveInterface");
- if( impl )
- {
- XAObjItfMapEntry *mapEntry = NULL;
- if(impl->parent)
- {
- mapEntry = XAObjectItfImpl_GetItfEntry(impl->parent, iid);
- }
- if( mapEntry && mapEntry->isDynamic )
+ if (impl)
{
- if( (mapEntry->pItf) )
+ XAObjItfMapEntry *mapEntry = NULL;
+ if (impl->parent)
{
- if( impl->DoRemoveItfImpl )
+ mapEntry = XAObjectItfImpl_GetItfEntry(impl->parent, iid);
+ }
+ if (mapEntry && mapEntry->isDynamic)
+ {
+ if ((mapEntry->pItf))
{
+ if (impl->DoRemoveItfImpl)
+ {
retval = impl->DoRemoveItfImpl(impl->parent, mapEntry);
- }
+ }
else
- {
+ {
DEBUG_ERR("XADIMItfImpl_RemoveInterface: Object has specified dynamic itfs but not implemented DoRemoveItfImpl!!!");
retval = XA_RESULT_INTERNAL_ERROR;
+ }
+ }
+ else
+ {
+ DEBUG_ERR("XADIMItfImpl_RemoveInterface interface not exposed");
+ retval = XA_RESULT_PRECONDITIONS_VIOLATED;
}
}
- else
- {
- DEBUG_ERR("XADIMItfImpl_RemoveInterface interface not exposed");
- retval = XA_RESULT_PRECONDITIONS_VIOLATED;
+ else /*( mapEntry && mapEntry->isDynamic )*/
+ { /* interface is not supported for dynamic management */
+ DEBUG_ERR("XADIMItfImpl_RemoveInterface interface not supported");
+ retval = XA_RESULT_FEATURE_UNSUPPORTED;
}
}
- else /*( mapEntry && mapEntry->isDynamic )*/
- { /* interface is not supported for dynamic management */
- DEBUG_ERR("XADIMItfImpl_RemoveInterface interface not supported");
- retval = XA_RESULT_FEATURE_UNSUPPORTED;
- }
- }
else
- {
+ {
retval = XA_RESULT_PARAMETER_INVALID;
DEBUG_ERR("XADIMItfImpl_RemoveInterface: INVALID args");
- }
+ }
DEBUG_API_A1("<-XADIMItfImpl_RemoveInterface %lu", retval);
return retval;
-}
+ }
/* XAresult XADIMItfImpl_ResumeInterface
* Optionally asynchronous method for resuming a dynamically exposed interface on the object.
*/
XAresult XADIMItfImpl_ResumeInterface(XADynamicInterfaceManagementItf self,
- const XAInterfaceID iid,
- XAboolean async)
-{
+ const XAInterfaceID iid, XAboolean async)
+ {
XADIMItfImpl* impl = GetImpl(self);
XAresult retval = XA_RESULT_SUCCESS;
DEBUG_API("->XADIMItfImpl_ResumeInterface");
- if( !impl )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XADIMItfImpl_ResumeInterface");
+ if (!impl)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XADIMItfImpl_ResumeInterface");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
- if( async )
- {
+ if (async)
+ {
/* invoke asynchronously */
/* check if another async operation is processed */
- if(impl->asyncOngoing)
- {
+ if (impl->asyncOngoing)
+ {
/* abort ongoing operation */
XAImpl_CancelThread(impl->asyncThr);
- }
+ }
impl->asyncOngoing = XA_BOOLEAN_TRUE;
impl->asyncID = iid;
- if(XAImpl_StartThread(impl->asyncThr, NULL,
- &XADIMItfImpl_AsyncResumeItf,(void*)(self)))
- {
+ if (XAImpl_StartThread(impl->asyncThr, NULL,
+ &XADIMItfImpl_AsyncResumeItf, (void*) (self)))
+ {
impl->asyncOngoing = XA_BOOLEAN_FALSE;
retval = XA_RESULT_RESOURCE_ERROR;
- }
+ }
else
- {
+ {
retval = XA_RESULT_SUCCESS;
+ }
}
- }
else
- {
+ {
/* invoke synchronously */
retval = XADIMItfImpl_DoResumeItf(impl, iid);
- }
+ }
DEBUG_API_A1("<-XADIMItfImpl_ResumeInterface %lu", retval);
return retval;
-}
+ }
/* XAresult XADIMItfImpl_RegisterCallback
* Registers a callback on the object
*/
XAresult XADIMItfImpl_RegisterCallback(XADynamicInterfaceManagementItf self,
- xaDynamicInterfaceManagementCallback callback,
- void * pContext)
-{
+ xaDynamicInterfaceManagementCallback callback, void * pContext)
+ {
XADIMItfImpl* impl = GetImpl(self);
DEBUG_API("->XADIMItfImpl_RegisterCallback");
- if( !impl )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XADIMItfImpl_RegisterCallback");
+ if (!impl)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XADIMItfImpl_RegisterCallback");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
impl->dimCb = callback;
impl->dimCbContext = pContext;
impl->dimCbPtrToSelf = self;
DEBUG_API("<-XADIMItfImpl_RegisterCallback");
return XA_RESULT_SUCCESS;
-}
+ }
/**
* XADIMItfImpl -specific methods
@@ -226,12 +220,12 @@
* Description: Allocate and initialize DIMItfImpl
*/
XADIMItfImpl* XADIMItfImpl_Create()
-{
- XADIMItfImpl *self = (XADIMItfImpl*)calloc(1,sizeof(XADIMItfImpl));
+ {
+ XADIMItfImpl *self = (XADIMItfImpl*) calloc(1, sizeof(XADIMItfImpl));
DEBUG_API("->XADIMItfImpl_Create");
- if( self )
- {
+ if (self)
+ {
/* init itf default implementation */
self->itf.AddInterface = XADIMItfImpl_AddInterface;
self->itf.RemoveInterface = XADIMItfImpl_RemoveInterface;
@@ -243,38 +237,35 @@
self->dimCbPtrToSelf = NULL;
self->self = self;
- if( XAImpl_CreateThreadHandle(&(self->asyncThr)) != XA_RESULT_SUCCESS )
- {
+ if (XAImpl_CreateThreadHandle(&(self->asyncThr)) != XA_RESULT_SUCCESS)
+ {
free(self);
self = NULL;
- }
+ }
+ }DEBUG_API("<-XADIMItfImpl_Create");
+ return self;
}
- DEBUG_API("<-XADIMItfImpl_Create");
- return self;
-}
/* void XADIMItfImpl_Free(XADIMItfImpl* self)
* Description: Free all resources reserved at XADIMItfImpl_Create
*/
void XADIMItfImpl_Free(XADIMItfImpl* self)
-{
+ {
DEBUG_API("->XADIMItfImpl_Free");
assert(self==self->self);
XAImpl_DeleteThreadHandle(self->asyncThr);
free(self);
DEBUG_API("<-XADIMItfImpl_Free");
-}
+ }
/* void XADIMItfImpl_Init
* Description: Initialize DIM interface. Mandatory to call if dynamic
* interfaces are supported by object.
*/
-void XADIMItfImpl_Init( XADIMItfImpl* self,
- XAObjectItf parent,
- xaDoAddItfImpl doAdd,
- xaDoResumeItfImpl doResume,
- xaDoRemoveItfImpl doRemove)
-{
+void XADIMItfImpl_Init(XADIMItfImpl* self, XAObjectItf parent,
+ xaDoAddItfImpl doAdd, xaDoResumeItfImpl doResume,
+ xaDoRemoveItfImpl doRemove)
+ {
DEBUG_API("->XADIMItfImpl_Init");
assert(self==self->self && parent && doAdd && doResume && doRemove);
@@ -284,184 +275,182 @@
self->DoRemoveItfImpl = doRemove;
DEBUG_API("<-XADIMItfImpl_Init");
-}
+ }
/* void XADIMItfImpl_SendCbEvent
* Description: Object can use this method to send resource events
*/
-void XADIMItfImpl_SendCbEvent( XADIMItfImpl* self,
- XAuint32 event,
- XAresult result,
- const XAInterfaceID iid )
-{
+void XADIMItfImpl_SendCbEvent(XADIMItfImpl* self, XAuint32 event,
+ XAresult result, const XAInterfaceID iid)
+ {
DEBUG_API("->XADIMItfImpl_SendCbEvent");
- if( self->dimCb )
- {
- self->dimCb((XADynamicInterfaceManagementItf)(self), self->dimCbContext,
- event, result, iid);
- }
- DEBUG_API("<-XADIMItfImpl_SendCbEvent");
-}
+ if (self->dimCb)
+ {
+ self->dimCb((XADynamicInterfaceManagementItf) (self),
+ self->dimCbContext, event, result, iid);
+ }DEBUG_API("<-XADIMItfImpl_SendCbEvent");
+ }
/* void* XADIMItfImpl_AsyncAddItf
* Description: Launch AddItf from async thread.
*/
void* XADIMItfImpl_AsyncAddItf(void* args)
-{
+ {
XAresult retval = XA_RESULT_SUCCESS;
XADIMItfImpl* impl = GetImpl(args);
DEBUG_API("->XADIMItfImpl_AsyncAddItf");
- if( impl )
- {
+ if (impl)
+ {
retval = XADIMItfImpl_DoAddItf(impl, impl->asyncID);
- if( impl->dimCb )
- {
- impl->dimCb((XADynamicInterfaceManagementItf)(args), impl->dimCbContext,
- XA_DYNAMIC_ITF_EVENT_ASYNC_TERMINATION, retval, impl->asyncID);
- }
+ if (impl->dimCb)
+ {
+ impl->dimCb((XADynamicInterfaceManagementItf) (args),
+ impl->dimCbContext,
+ XA_DYNAMIC_ITF_EVENT_ASYNC_TERMINATION, retval,
+ impl->asyncID);
+ }
impl->asyncOngoing = XA_BOOLEAN_FALSE;
XAImpl_ExitThread(impl->asyncThr);
- }
+ }
else
- {
+ {
DEBUG_ERR("XADIMItfImpl_AsyncAddItf: INVALID args");
- }
-
+ }
DEBUG_API("<-XADIMItfImpl_AsyncAddItf");
return NULL;
-}
+ }
/* XAresult XADIMItfImpl_DoAddItf
* Description: Handle Itf dynamic addition and call object-specific parts.
* Launched either from async thread or directly.
*/
-XAresult XADIMItfImpl_DoAddItf(XADIMItfImpl* impl,
- const XAInterfaceID iid)
-{
+XAresult XADIMItfImpl_DoAddItf(XADIMItfImpl* impl, const XAInterfaceID iid)
+ {
XAresult retval = XA_RESULT_SUCCESS;
DEBUG_API("->XADIMItfImpl_DoAddItf");
- if( impl )
- {
- XAObjItfMapEntry *mapEntry = NULL;
- if(impl->parent)
- {
- mapEntry = XAObjectItfImpl_GetItfEntry(impl->parent, iid);
- }
- if( mapEntry && mapEntry->isDynamic )
+ if (impl)
{
- if( !(mapEntry->pItf) )
+ XAObjItfMapEntry *mapEntry = NULL;
+ if (impl->parent)
{
- if( impl->DoAddItfImpl )
+ mapEntry = XAObjectItfImpl_GetItfEntry(impl->parent, iid);
+ }
+ if (mapEntry && mapEntry->isDynamic)
+ {
+ if (!(mapEntry->pItf))
{
+ if (impl->DoAddItfImpl)
+ {
retval = impl->DoAddItfImpl(impl->parent, mapEntry);
- }
+ }
else
- {
+ {
DEBUG_ERR("XADIMItfImpl_DoAddItf: Object has specified dynamic itfs but not implemented DoAddItfImpl!!!");
retval = XA_RESULT_INTERNAL_ERROR;
+ }
+ }
+ else
+ {
+ DEBUG_ERR("XADIMItfImpl_DoAddItf interface already exposed");
+ retval = XA_RESULT_PRECONDITIONS_VIOLATED;
}
}
- else
- {
- DEBUG_ERR("XADIMItfImpl_DoAddItf interface already exposed");
- retval = XA_RESULT_PRECONDITIONS_VIOLATED;
+ else /*( mapEntry && mapEntry->isDynamic )*/
+ { /* interface is not supported for dynamic management */
+ DEBUG_ERR("XADIMItfImpl_DoAddItf interface not supported");
+ retval = XA_RESULT_FEATURE_UNSUPPORTED;
}
}
- else /*( mapEntry && mapEntry->isDynamic )*/
- { /* interface is not supported for dynamic management */
- DEBUG_ERR("XADIMItfImpl_DoAddItf interface not supported");
- retval = XA_RESULT_FEATURE_UNSUPPORTED;
- }
- }
else
- {
+ {
retval = XA_RESULT_INTERNAL_ERROR;
DEBUG_ERR("XADIMItfImpl_DoAddItf: INVALID args");
- }
+ }
DEBUG_API("<-XADIMItfImpl_DoAddItf");
return retval;
-}
+ }
/* void* XADIMItfImpl_AsyncResumeItf
* Description: Launch ResumeItf from async thread.
*/
void* XADIMItfImpl_AsyncResumeItf(void* args)
-{
+ {
XAresult retval = XA_RESULT_SUCCESS;
XADIMItfImpl* impl = GetImpl(args);
DEBUG_API("->XADIMItfImpl_AsyncResumeItf");
- if( impl )
- {
+ if (impl)
+ {
retval = XADIMItfImpl_DoResumeItf(impl, impl->asyncID);
- if( impl->dimCb )
- {
- impl->dimCb((XADynamicInterfaceManagementItf)(args), impl->dimCbContext,
- XA_DYNAMIC_ITF_EVENT_ASYNC_TERMINATION, retval, impl->asyncID);
- }
+ if (impl->dimCb)
+ {
+ impl->dimCb((XADynamicInterfaceManagementItf) (args),
+ impl->dimCbContext,
+ XA_DYNAMIC_ITF_EVENT_ASYNC_TERMINATION, retval,
+ impl->asyncID);
+ }
impl->asyncOngoing = XA_BOOLEAN_FALSE;
XAImpl_ExitThread(impl->asyncThr);
- }
+ }
else
- {
+ {
DEBUG_ERR("XADIMItfImpl_AsyncResumeItf: INVALID args");
- }
-
+ }
DEBUG_API("<-XADIMItfImpl_AsyncResumeItf");
return NULL;
-}
+ }
/* void XADIMItfImpl_DoResumeItf
* Description: Handle Itf dynamic resuming and call object-specific parts.
* Launched either from async thread or directly.
*/
-XAresult XADIMItfImpl_DoResumeItf(XADIMItfImpl* impl,
- const XAInterfaceID iid)
-{
+XAresult XADIMItfImpl_DoResumeItf(XADIMItfImpl* impl, const XAInterfaceID iid)
+ {
XAresult retval = XA_RESULT_SUCCESS;
DEBUG_API("->XADIMItfImpl_DoResumeItf");
- if( impl )
- {
- XAObjItfMapEntry *mapEntry = XAObjectItfImpl_GetItfEntry(impl->parent, iid);
- if( mapEntry && mapEntry->isDynamic )
+ if (impl)
{
- if( (!mapEntry->pItf) )
+ XAObjItfMapEntry *mapEntry = XAObjectItfImpl_GetItfEntry(
+ impl->parent, iid);
+ if (mapEntry && mapEntry->isDynamic)
{
- if( impl->DoResumeItfImpl )
+ if ((!mapEntry->pItf))
{
+ if (impl->DoResumeItfImpl)
+ {
retval = impl->DoResumeItfImpl(impl->parent, mapEntry);
- }
+ }
else
- {
+ {
DEBUG_ERR("XADIMItfImpl_DoResumeItf: Object has specified dynamic itfs but not implemented DoResumeItfImpl!!!");
retval = XA_RESULT_INTERNAL_ERROR;
+ }
+ }
+ else
+ {
+ DEBUG_ERR("XADIMItfImpl_DoResumeItf interface already exposed");
+ retval = XA_RESULT_PRECONDITIONS_VIOLATED;
}
}
- else
- {
- DEBUG_ERR("XADIMItfImpl_DoResumeItf interface already exposed");
- retval = XA_RESULT_PRECONDITIONS_VIOLATED;
+ else /*( mapEntry && mapEntry->isDynamic )*/
+ { /* interface is not supported for dynamic management */
+ DEBUG_ERR("XADIMItfImpl_DoResumeItf interface not supported");
+ retval = XA_RESULT_FEATURE_UNSUPPORTED;
}
}
- else /*( mapEntry && mapEntry->isDynamic )*/
- { /* interface is not supported for dynamic management */
- DEBUG_ERR("XADIMItfImpl_DoResumeItf interface not supported");
- retval = XA_RESULT_FEATURE_UNSUPPORTED;
- }
- }
else
- {
+ {
retval = XA_RESULT_INTERNAL_ERROR;
DEBUG_ERR("XADIMItfImpl_DoResumeItf: INVALID args");
- }
+ }
DEBUG_API("<-XADIMItfImpl_DoResumeItf");
return retval;
-}
+ }
--- a/khronosfws/openmax_al/src/common/xadynintmgmtitf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xadynintmgmtitf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Dynamic Mgmt Interface Header
+ *
+ */
#ifndef XADYNINTMGMTITF_H
#define XADYNINTMGMTITF_H
@@ -26,16 +26,19 @@
/** TYPES **/
/* object implementation-specific DIM methods */
-typedef XAresult (*xaDoAddItfImpl)(XAObjectItf self, XAObjItfMapEntry *mapEntry );
-typedef XAresult (*xaDoResumeItfImpl)(XAObjectItf self, XAObjItfMapEntry *mapEntry );
-typedef XAresult (*xaDoRemoveItfImpl)(XAObjectItf self, XAObjItfMapEntry *mapEntry );
+typedef XAresult (*xaDoAddItfImpl)(XAObjectItf self,
+ XAObjItfMapEntry *mapEntry);
+typedef XAresult (*xaDoResumeItfImpl)(XAObjectItf self,
+ XAObjItfMapEntry *mapEntry);
+typedef XAresult (*xaDoRemoveItfImpl)(XAObjectItf self,
+ XAObjItfMapEntry *mapEntry);
/** ENUMERATIONS **/
/** STRUCTURES **/
/* Definition of XADynamicInterfaceManagementItf implementation */
typedef struct XADIMItfImpl_
-{
+ {
/* parent interface */
struct XADynamicInterfaceManagementItf_ itf;
/* pointer to self */
@@ -45,7 +48,7 @@
/* pointer to parent object */
XAObjectItf parent;
/* pointers to implementation-specific methods */
- xaDoAddItfImpl DoAddItfImpl;
+ xaDoAddItfImpl DoAddItfImpl;
xaDoResumeItfImpl DoResumeItfImpl;
xaDoRemoveItfImpl DoRemoveItfImpl;
@@ -57,42 +60,37 @@
XAboolean asyncOngoing;
XAInterfaceID asyncID;
-} XADIMItfImpl;
+ } XADIMItfImpl;
/* Base interface XADynamicInterfaceManagementItf implementation */
XAresult XADIMItfImpl_AddInterface(XADynamicInterfaceManagementItf self,
- const XAInterfaceID iid, XAboolean async);
+ const XAInterfaceID iid, XAboolean async);
XAresult XADIMItfImpl_RemoveInterface(XADynamicInterfaceManagementItf self,
- const XAInterfaceID iid);
+ const XAInterfaceID iid);
XAresult XADIMItfImpl_ResumeInterface(XADynamicInterfaceManagementItf self,
- const XAInterfaceID iid, XAboolean async);
+ const XAInterfaceID iid, XAboolean async);
XAresult XADIMItfImpl_RegisterCallback(XADynamicInterfaceManagementItf self,
- xaDynamicInterfaceManagementCallback callback,
- void * pContext);
+ xaDynamicInterfaceManagementCallback callback, void * pContext);
/* XADIMItfImpl -specific methods */
XADIMItfImpl* XADIMItfImpl_Create(void);
void XADIMItfImpl_Free(XADIMItfImpl* self);
-void XADIMItfImpl_Init( XADIMItfImpl* self,
- XAObjectItf parent,
- xaDoAddItfImpl doAdd,
- xaDoResumeItfImpl doResume,
- xaDoRemoveItfImpl doRemove);
+void XADIMItfImpl_Init(XADIMItfImpl* self, XAObjectItf parent,
+ xaDoAddItfImpl doAdd, xaDoResumeItfImpl doResume,
+ xaDoRemoveItfImpl doRemove);
-void XADIMItfImpl_SendCbEvent( XADIMItfImpl* self,
- XAuint32 event,
- XAresult result,
- const XAInterfaceID iid );
+void XADIMItfImpl_SendCbEvent(XADIMItfImpl* self, XAuint32 event,
+ XAresult result, const XAInterfaceID iid);
/* methods for asynchronous service */
void* XADIMItfImpl_AsyncAddItf(void* args);
XAresult XADIMItfImpl_DoAddItf(XADIMItfImpl* impl, const XAInterfaceID iid);
void* XADIMItfImpl_AsyncResumeItf(void* args);
-XAresult XADIMItfImpl_DoResumeItf(XADIMItfImpl* impl, const XAInterfaceID iid);
-
+XAresult
+ XADIMItfImpl_DoResumeItf(XADIMItfImpl* impl, const XAInterfaceID iid);
#endif /* XADYNINTMGMTITF_H */
--- a/khronosfws/openmax_al/src/common/xaglobals.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xaglobals.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Header File for common AL enums, functions.
+ *
+ */
/*All global definitions and declarations here */
#ifndef XAGLOBALS_H
@@ -23,13 +23,14 @@
#include "xadebug.h"
/**
-GLOBAL ENUMERATIONS
+ GLOBAL ENUMERATIONS
*/
/**
* enumeration for different adaptation event types.
* add more types when needed, use single bit values.
**/
-typedef enum {
+typedef enum
+ {
XA_GENERICEVENTS = 0x1,
XA_PLAYITFEVENTS = 0x2,
XA_RECORDITFEVENTS = 0x4,
@@ -42,40 +43,34 @@
XA_METADATAEVENTS = 0x200,
XA_VOLUMEITFEVENTS = 0x400,
XA_NOKIALINEARVOLITFEVENTS = 0x800,
- XA_NOKIAEXTVOLITFEVENTS = 0x1000,
- XA_ADDMORETYPES = 0x2000
-}XAAdaptEventTypes;
-
+ XA_NOKIAEXTVOLITFEVENTS = 0x1000,
+ XA_ADDMORETYPES = 0x2000
+ } XAAdaptEventTypes;
typedef enum
-{
- XACAP_DECODER = 0x1,
- XACAP_ENCODER = 0x2,
- XACAP_DEVSNK = 0x4,
- XACAP_DEVSRC = 0x8,
+ {
+ XACAP_DECODER = 0x1,
+ XACAP_ENCODER = 0x2,
+ XACAP_DEVSNK = 0x4,
+ XACAP_DEVSRC = 0x8,
- XACAP_AUDIO = 0x10,
- XACAP_VIDEO = 0x20,
- XACAP_IMAGE = 0x40
-} XACapsType;
-
+ XACAP_AUDIO = 0x10,
+ XACAP_VIDEO = 0x20,
+ XACAP_IMAGE = 0x40
+ } XACapsType;
typedef enum
-{
- XA_UNDEFINED = 0,
- XA_READBUFFER,
- XA_WRITEBUFFER,
- XA_READ,
- XA_WRITE
-} XAConfigExtensionCpKey;
+ {
+ XA_UNDEFINED = 0, XA_READBUFFER, XA_WRITEBUFFER, XA_READ, XA_WRITE
+ } XAConfigExtensionCpKey;
typedef enum
-{
+ {
XA_MEDIATYPE_AUDIO = 0,
XA_MEDIATYPE_VIDEO,
XA_MEDIATYPE_IMAGE,
XA_MEDIATYPE_UNKNOWN
-} XAMediaType;
+ } XAMediaType;
#define CPCONFIGKEY "TestAppPipeConfig"
@@ -103,8 +98,6 @@
* GLOBAL METHODS
*/
-
-
/*
* Check if interface IDs are equal
*/
@@ -115,5 +108,5 @@
*/
XAresult XACommon_CheckDataSource(XADataSource* source, XAMediaType* type);
-XAresult XACommon_ValidateDataLocator( XAuint32 pCounter, void* pSnk, ... );
+XAresult XACommon_ValidateDataLocator(XAuint32 pCounter, void* pSnk, ...);
#endif /*XAGLOBALS_H */
--- a/khronosfws/openmax_al/src/common/xametadataextractionitf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xametadataextractionitf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Metadata Extraction Interface Implementation
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
@@ -34,32 +34,36 @@
* Description: Validate interface pointer and cast it to implementation pointer.
**/
static XAMetadataExtractionItfImpl* GetImpl(XAMetadataExtractionItf self)
-{
- if( self )
{
- XAMetadataExtractionItfImpl* impl = (XAMetadataExtractionItfImpl*)(*self);
- if( impl && (impl == impl->self) )
+ if (self)
{
+ XAMetadataExtractionItfImpl* impl =
+ (XAMetadataExtractionItfImpl*) (*self);
+ if (impl && (impl == impl->self))
+ {
return impl;
+ }
}
+ return NULL;
}
- return NULL;
-}
static void* GetMetadataUtilityContext(XAAdaptationMMFCtx* adaptCtx)
-{
- switch(adaptCtx->baseObj.ctxId)
- {
- case XAMediaPlayerAdaptation:
- return ((XAMediaPlayerAdaptationMMFCtx*)adaptCtx)->mmfMetadataContext;
- case XAMDAdaptation:
- return ((XAMetadataAdaptationMMFCtx*)adaptCtx)->mmfContext;
- default:
- break;
- }
+ {
+ if (adaptCtx)
+ {
+ switch (adaptCtx->baseObj.ctxId)
+ {
+ case XAMediaPlayerAdaptation:
+ return ((XAMediaPlayerAdaptationMMFCtx*) adaptCtx)->mmfMetadataContext;
+ case XAMDAdaptation:
+ return ((XAMetadataAdaptationMMFCtx*) adaptCtx)->mmfContext;
+ default:
+ break;
+ }
- return NULL;
-}
+ }
+ return NULL;
+ }
/*****************************************************************************
* Base interface XAMetadataExtractionItf implementation
*****************************************************************************/
@@ -69,62 +73,63 @@
* @XAuint32 *pItemCount
* Number of metadata items. Must be non-NULL
*/
-XAresult XAMetadataExtractionItfImpl_GetItemCount(XAMetadataExtractionItf self,
- XAuint32 *pItemCount)
-{
+XAresult XAMetadataExtractionItfImpl_GetItemCount(
+ XAMetadataExtractionItf self, XAuint32 *pItemCount)
+ {
XAMetadataExtractionItfImpl *impl = NULL;
XAresult res = XA_RESULT_SUCCESS;
DEBUG_API("->XAMetadataExtractionItfImpl_GetItemCount");
impl = GetImpl(self);
/* check parameters */
- if( !impl || !pItemCount )
- {
+ if (!impl || !pItemCount)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
res = XA_RESULT_PARAMETER_INVALID;
- }
+ }
else
- {
-
- if( impl->adaptCtx )
{
-
- if(impl->adaptCtx->fwtype == FWMgrFWMMF)
- {
- void *mmfCtx = GetMetadataUtilityContext((XAAdaptationMMFCtx*)impl->adaptCtx);
- if(mmfCtx)
- {
- res = mmf_get_item_count(mmfCtx, pItemCount);
- }
- else
- {
- res = XA_RESULT_PARAMETER_INVALID;
- }
- }
- else
- {
- if(impl->filteringOn)
- {
- *pItemCount = impl->filteredcount;
- }
- else
- {
- *pItemCount = impl->currentTags.itemcount;
- }
- res = XA_RESULT_SUCCESS;
- }
- }
+
+ if (impl->adaptCtx)
+ {
+
+ if (impl->adaptCtx->fwtype == FWMgrFWMMF)
+ {
+ void *mmfCtx = GetMetadataUtilityContext(
+ (XAAdaptationMMFCtx*) impl->adaptCtx);
+ if (mmfCtx)
+ {
+ res = mmf_get_item_count(mmfCtx, pItemCount);
+ }
+ else
+ {
+ res = XA_RESULT_PARAMETER_INVALID;
+ }
+ }
+ else
+ {
+ if (impl->filteringOn)
+ {
+ *pItemCount = impl->filteredcount;
+ }
+ else
+ {
+ *pItemCount = impl->currentTags.itemcount;
+ }
+ res = XA_RESULT_SUCCESS;
+ }
+ }
else
- {
+ {
res = XA_RESULT_INTERNAL_ERROR;
- }
+ }
DEBUG_INFO_A1("itemCount = %d", (int)*pItemCount);
- }
+ }
DEBUG_API_A1("<-XAMetadataExtractionItfImpl_GetItemCount (%d)", (int)res);
return res;
-}
+ }
/*
* Returns the byte size of a given metadata key
@@ -135,52 +140,51 @@
* Address to store key size. size must be greater than 0. Must be non-NULL
*/
XAresult XAMetadataExtractionItfImpl_GetKeySize(XAMetadataExtractionItf self,
- XAuint32 index,
- XAuint32 *pKeySize)
-{
+ XAuint32 index, XAuint32 *pKeySize)
+ {
XAMetadataExtractionItfImpl *impl = NULL;
XAresult res = XA_RESULT_SUCCESS;
XAuint32 newidx = 0;
DEBUG_API("->XAMetadataExtractionItfImpl_GetKeySize");
impl = GetImpl(self);
- if( !impl || !pKeySize )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAMetadataExtractionItfImpl_GetKeySize");
+ if (!impl || !pKeySize)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAMetadataExtractionItfImpl_GetKeySize");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pKeySize = 0;
- if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWMMF)
- {
- void *mmfCtx = GetMetadataUtilityContext((XAAdaptationMMFCtx*)impl->adaptCtx);
- if(mmfCtx)
- {
- res = mmf_get_key_size(mmfCtx, index, pKeySize);
- }
- else
- {
- res = XA_RESULT_PARAMETER_INVALID;
- }
- }
- else
- {
- /* check index and return unfiltered index */
- if( CheckAndUnfilterIndex(impl,index,&newidx) != XA_RESULT_SUCCESS )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAMetadataExtractionItfImpl_GetKeySize");
- return XA_RESULT_PARAMETER_INVALID;
- }
-
- /* size = size of struct + size of data - 1 (struct size already includes one char) */
- *pKeySize = sizeof(XAMetadataInfo) + impl->currentTags.mdeKeys[newidx]->size - 1;
- }
+ if (impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWMMF)
+ {
+ void *mmfCtx = GetMetadataUtilityContext(
+ (XAAdaptationMMFCtx*) impl->adaptCtx);
+ if (mmfCtx)
+ {
+ res = mmf_get_key_size(mmfCtx, index, pKeySize);
+ }
+ else
+ {
+ res = XA_RESULT_PARAMETER_INVALID;
+ }
+ }
+ else
+ {
+ /* check index and return unfiltered index */
+ if (CheckAndUnfilterIndex(impl, index, &newidx) != XA_RESULT_SUCCESS)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAMetadataExtractionItfImpl_GetKeySize");
+ return XA_RESULT_PARAMETER_INVALID;
+ }
+
+ /* size = size of struct + size of data - 1 (struct size already includes one char) */
+ *pKeySize = sizeof(XAMetadataInfo)
+ + impl->currentTags.mdeKeys[newidx]->size - 1;
+ }
DEBUG_API_A1("<-XAMetadataExtractionItfImpl_GetKeySize (%d)", (int)res);
return res;
-}
+ }
/*
* Returns a XAMetadataInfo structure and associated data referenced by the structure for a key.
@@ -192,78 +196,75 @@
* Address to store the key. Must be non-NULL
*/
XAresult XAMetadataExtractionItfImpl_GetKey(XAMetadataExtractionItf self,
- XAuint32 index,
- XAuint32 keySize,
- XAMetadataInfo *pKey)
-{
+ XAuint32 index, XAuint32 keySize, XAMetadataInfo *pKey)
+ {
XAMetadataExtractionItfImpl *impl = NULL;
XAresult res = XA_RESULT_SUCCESS;
XAuint32 newidx = 0;
-
+
XAuint32 neededsize = 0;
XAuint32 newdatasize = 0;
DEBUG_API("->XAMetadataExtractionItfImpl_GetKey");
impl = GetImpl(self);
- if( !impl || !pKey )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAMetadataExtractionItfImpl_GetKey");
+ if (!impl || !pKey)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAMetadataExtractionItfImpl_GetKey");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
+
+ memset(pKey, 0, keySize);
- memset(pKey,0,keySize);
-
- if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWMMF)
- {
- void *mmfCtx = GetMetadataUtilityContext((XAAdaptationMMFCtx*)impl->adaptCtx);
- if(mmfCtx)
- {
- res = mmf_get_key(mmfCtx, index, keySize, pKey);
- }
- else
- {
- res = XA_RESULT_PARAMETER_INVALID;
- }
- }
- else
- {
+ if (impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWMMF)
+ {
+ void *mmfCtx = GetMetadataUtilityContext(
+ (XAAdaptationMMFCtx*) impl->adaptCtx);
+ if (mmfCtx)
+ {
+ res = mmf_get_key(mmfCtx, index, keySize, pKey);
+ }
+ else
+ {
+ res = XA_RESULT_PARAMETER_INVALID;
+ }
+ }
+ else
+ {
- /* check index and return unfiltered index */
- if(CheckAndUnfilterIndex(impl,index,&newidx) != XA_RESULT_SUCCESS)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAMetadataExtractionItfImpl_GetKey");
- return XA_RESULT_PARAMETER_INVALID;
- }
+ /* check index and return unfiltered index */
+ if (CheckAndUnfilterIndex(impl, index, &newidx) != XA_RESULT_SUCCESS)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAMetadataExtractionItfImpl_GetKey");
+ return XA_RESULT_PARAMETER_INVALID;
+ }
-
- /* needed size = size of struct + size of data - 1 (struct size already includes one char) */
- neededsize = sizeof(XAMetadataInfo) + impl->currentTags.mdeKeys[newidx]->size - 1;
- if( keySize<neededsize )
- { /* cannot fit all of key data */
- newdatasize = impl->currentTags.mdeKeys[newidx]->size - (neededsize-keySize);
- DEBUG_ERR("XA_RESULT_BUFFER_INSUFFICIENT");
- res = XA_RESULT_BUFFER_INSUFFICIENT;
- }
- else
- {
- newdatasize = impl->currentTags.mdeKeys[newidx]->size;
- res = XA_RESULT_SUCCESS;
- }
- /* copy data up to given size */
- memcpy(pKey,impl->currentTags.mdeKeys[newidx],keySize-1);
- /* ensure null-termination */
-
- memset(pKey->data+newdatasize-1,0,1);
- pKey->size = newdatasize;
- }
+ /* needed size = size of struct + size of data - 1 (struct size already includes one char) */
+ neededsize = sizeof(XAMetadataInfo)
+ + impl->currentTags.mdeKeys[newidx]->size - 1;
+ if (keySize < neededsize)
+ { /* cannot fit all of key data */
+ newdatasize = impl->currentTags.mdeKeys[newidx]->size
+ - (neededsize - keySize);
+ DEBUG_ERR("XA_RESULT_BUFFER_INSUFFICIENT");
+ res = XA_RESULT_BUFFER_INSUFFICIENT;
+ }
+ else
+ {
+ newdatasize = impl->currentTags.mdeKeys[newidx]->size;
+ res = XA_RESULT_SUCCESS;
+ }
+ /* copy data up to given size */
+ memcpy(pKey, impl->currentTags.mdeKeys[newidx], keySize - 1);
+ /* ensure null-termination */
+
+ memset(pKey->data + newdatasize - 1, 0, 1);
+ pKey->size = newdatasize;
+ }
DEBUG_API_A1("<-XAMetadataExtractionItfImpl_GetKey (%d)", (int)res);
return res;
-}
-
+ }
/*
* Returns the byte size of a given metadata value
@@ -272,53 +273,52 @@
* @XAuint32 *pValueSize
* Address to store value size. size must be greater than 0. Must be non-NULL
*/
-XAresult XAMetadataExtractionItfImpl_GetValueSize(XAMetadataExtractionItf self,
- XAuint32 index,
- XAuint32 *pValueSize)
-{
+XAresult XAMetadataExtractionItfImpl_GetValueSize(
+ XAMetadataExtractionItf self, XAuint32 index, XAuint32 *pValueSize)
+ {
XAMetadataExtractionItfImpl *impl = NULL;
XAresult res = XA_RESULT_SUCCESS;
XAuint32 newidx = 0;
DEBUG_API("->XAMetadataExtractionItfImpl_GetValueSize");
impl = GetImpl(self);
- if( !impl || !pValueSize )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAMetadataExtractionItfImpl_GetValueSize");
+ if (!impl || !pValueSize)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAMetadataExtractionItfImpl_GetValueSize");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pValueSize = 0;
- if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWMMF)
- {
- void *mmfCtx = GetMetadataUtilityContext((XAAdaptationMMFCtx*)impl->adaptCtx);
- if(mmfCtx)
- {
- res = mmf_get_value_size(mmfCtx, index,pValueSize);
- }
- else
- {
- res = XA_RESULT_PARAMETER_INVALID;
- }
- }
- else
- {
- /* check index and return unfiltered index */
- if(CheckAndUnfilterIndex(impl,index,&newidx) != XA_RESULT_SUCCESS)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAMetadataExtractionItfImpl_GetValueSize");
- return XA_RESULT_PARAMETER_INVALID;
- }
-
- /* size = size of struct + size of data - 1 (struct size already includes one char) */
- *pValueSize = sizeof(XAMetadataInfo) + impl->currentTags.mdeValues[newidx]->size - 1;
- }
+ if (impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWMMF)
+ {
+ void *mmfCtx = GetMetadataUtilityContext(
+ (XAAdaptationMMFCtx*) impl->adaptCtx);
+ if (mmfCtx)
+ {
+ res = mmf_get_value_size(mmfCtx, index, pValueSize);
+ }
+ else
+ {
+ res = XA_RESULT_PARAMETER_INVALID;
+ }
+ }
+ else
+ {
+ /* check index and return unfiltered index */
+ if (CheckAndUnfilterIndex(impl, index, &newidx) != XA_RESULT_SUCCESS)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAMetadataExtractionItfImpl_GetValueSize");
+ return XA_RESULT_PARAMETER_INVALID;
+ }
+
+ /* size = size of struct + size of data - 1 (struct size already includes one char) */
+ *pValueSize = sizeof(XAMetadataInfo)
+ + impl->currentTags.mdeValues[newidx]->size - 1;
+ }
DEBUG_API_A1("<-XAMetadataExtractionItfImpl_GetValueSize (%d)", (int)res);
return res;
-}
+ }
/*
* Returns a XAMetadataInfo structure and associated data referenced by the structure for a value.
@@ -330,77 +330,75 @@
* Address to store the value. Must be non-NULL
*/
XAresult XAMetadataExtractionItfImpl_GetValue(XAMetadataExtractionItf self,
- XAuint32 index,
- XAuint32 valueSize,
- XAMetadataInfo *pValue)
-{
+ XAuint32 index, XAuint32 valueSize, XAMetadataInfo *pValue)
+ {
XAMetadataExtractionItfImpl *impl = NULL;
XAresult res = XA_RESULT_SUCCESS;
XAuint32 newidx = 0;
-
+
XAuint32 neededsize = 0;
XAuint32 newdatasize = 0;
DEBUG_API("->XAMetadataExtractionItfImpl_GetValue");
impl = GetImpl(self);
- if( !impl || !pValue )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAMetadataExtractionItfImpl_GetValue");
+ if (!impl || !pValue)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAMetadataExtractionItfImpl_GetValue");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
- memset(pValue,0,valueSize);
+ memset(pValue, 0, valueSize);
- if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWMMF)
- {
- void *mmfCtx = GetMetadataUtilityContext((XAAdaptationMMFCtx*)impl->adaptCtx);
- if(mmfCtx)
- {
- res = mmf_get_value(mmfCtx, index, valueSize, pValue);
- }
- else
- {
- res = XA_RESULT_PARAMETER_INVALID;
- }
- }
- else
- {
- /* check index and return unfiltered index */
- if(CheckAndUnfilterIndex(impl,index,&newidx) != XA_RESULT_SUCCESS)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAMetadataExtractionItfImpl_GetValue");
- return XA_RESULT_PARAMETER_INVALID;
- }
+ if (impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWMMF)
+ {
+ void *mmfCtx = GetMetadataUtilityContext(
+ (XAAdaptationMMFCtx*) impl->adaptCtx);
+ if (mmfCtx)
+ {
+ res = mmf_get_value(mmfCtx, index, valueSize, pValue);
+ }
+ else
+ {
+ res = XA_RESULT_PARAMETER_INVALID;
+ }
+ }
+ else
+ {
+ /* check index and return unfiltered index */
+ if (CheckAndUnfilterIndex(impl, index, &newidx) != XA_RESULT_SUCCESS)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAMetadataExtractionItfImpl_GetValue");
+ return XA_RESULT_PARAMETER_INVALID;
+ }
- /* needed size = size of struct + size of data - 1 (struct size already includes one char) */
- neededsize = sizeof(XAMetadataInfo) + impl->currentTags.mdeValues[newidx]->size - 1;
- if( valueSize<neededsize )
- { /* cannot fit all of key data */
- newdatasize = impl->currentTags.mdeValues[newidx]->size - (neededsize-valueSize);
- DEBUG_ERR("XA_RESULT_BUFFER_INSUFFICIENT");
- res = XA_RESULT_BUFFER_INSUFFICIENT;
- }
- else
- {
- newdatasize = impl->currentTags.mdeValues[newidx]->size;
- res = XA_RESULT_SUCCESS;
- }
- /* copy data up to given size */
- memcpy(pValue,impl->currentTags.mdeValues[newidx],valueSize-1);
- /* ensure null-termination */
+ /* needed size = size of struct + size of data - 1 (struct size already includes one char) */
+ neededsize = sizeof(XAMetadataInfo)
+ + impl->currentTags.mdeValues[newidx]->size - 1;
+ if (valueSize < neededsize)
+ { /* cannot fit all of key data */
+ newdatasize = impl->currentTags.mdeValues[newidx]->size
+ - (neededsize - valueSize);
+ DEBUG_ERR("XA_RESULT_BUFFER_INSUFFICIENT");
+ res = XA_RESULT_BUFFER_INSUFFICIENT;
+ }
+ else
+ {
+ newdatasize = impl->currentTags.mdeValues[newidx]->size;
+ res = XA_RESULT_SUCCESS;
+ }
+ /* copy data up to given size */
+ memcpy(pValue, impl->currentTags.mdeValues[newidx], valueSize - 1);
+ /* ensure null-termination */
- memset(pValue->data+newdatasize-1,0,1);
+ memset(pValue->data + newdatasize - 1, 0, 1);
- pValue->size = newdatasize;
- }
+ pValue->size = newdatasize;
+ }
DEBUG_API_A1("<-XAMetadataExtractionItfImpl_GetValue (%d)",(int)res);
return res;
-}
-
+ }
/*
* Adds a filter for a specific key
@@ -417,137 +415,135 @@
* @XAuint8 filterMask
* Bitmask indicating which criteria to filter by. Should be one of the XA_METADATA_FILTER macros
*/
-XAresult XAMetadataExtractionItfImpl_AddKeyFilter(XAMetadataExtractionItf self,
- XAuint32 keySize,
- const void *pKey,
- XAuint32 keyEncoding,
- const XAchar *pValueLangCountry,
- XAuint32 valueEncoding,
- XAuint8 filterMask)
-{
+XAresult XAMetadataExtractionItfImpl_AddKeyFilter(
+ XAMetadataExtractionItf self, XAuint32 keySize, const void *pKey,
+ XAuint32 keyEncoding, const XAchar *pValueLangCountry,
+ XAuint32 valueEncoding, XAuint8 filterMask)
+ {
XAresult res = XA_RESULT_SUCCESS;
-
+
XAuint32 idx = 0;
XAuint8 matchMask = 0;
-
-
+
XAMetadataExtractionItfImpl *impl = NULL;
const XAchar* parsedkey;
impl = GetImpl(self);
DEBUG_API("->XAMetadataExtractionItfImpl_AddKeyFilter");
-
-
- if( !impl )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAMetadataExtractionItfImpl_AddKeyFilter");
+ if (!impl)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAMetadataExtractionItfImpl_AddKeyFilter");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
else
- {
-
- if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWMMF)
- {
- DEBUG_API("<-XAMetadataExtractionItfImpl_AddKeyFilter Not Supported in MMF");
- res = XA_RESULT_PARAMETER_INVALID;
- }
- else
- {
- impl->filteringOn = XA_BOOLEAN_TRUE;
- for(idx=0; idx < impl->currentTags.itemcount; idx++)
- {
- if((filterMask & XA_METADATA_FILTER_KEY) && pKey)
- {
- parsedkey = XAMetadataAdapt_ParseKhronosKey(pKey);
- if( strcmp((char*)parsedkey,
- (char*)impl->currentTags.mdeKeys[idx]->data) == 0 )
- {
- matchMask |= XA_METADATA_FILTER_KEY;
- }
- }
- if(filterMask & XA_METADATA_FILTER_LANG && pValueLangCountry)
- {
- if( strcmp((char*)pValueLangCountry,
- (char*)impl->currentTags.mdeKeys[idx]->langCountry) == 0 )
- {
- matchMask |= XA_METADATA_FILTER_LANG;
- }
- }
- if(filterMask & XA_METADATA_FILTER_ENCODING)
- {
- if(keyEncoding==impl->currentTags.mdeKeys[idx]->encoding)
- {
- matchMask |= XA_METADATA_FILTER_ENCODING;
- }
- if(valueEncoding==impl->currentTags.mdeValues[idx]->encoding)
- {
- matchMask |= XA_METADATA_FILTER_ENCODING;
- }
- }
- /* check if all filters apply */
- if(filterMask == matchMask)
- {
- if(impl->tagmatchesfilter[idx] == XA_BOOLEAN_FALSE)
- {
- impl->tagmatchesfilter[idx] = XA_BOOLEAN_TRUE;
- impl->filteredcount++;
- }
- }
- /*reset matchmask*/
- matchMask=0;
- }
- }
+ {
+
+ if (impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWMMF)
+ {
+ DEBUG_API("<-XAMetadataExtractionItfImpl_AddKeyFilter Not Supported in MMF");
+ res = XA_RESULT_PARAMETER_INVALID;
+ }
+ else
+ {
+ impl->filteringOn = XA_BOOLEAN_TRUE;
+ for (idx = 0; idx < impl->currentTags.itemcount; idx++)
+ {
+ if ((filterMask & XA_METADATA_FILTER_KEY) && pKey)
+ {
+ parsedkey = XAMetadataAdapt_ParseKhronosKey(pKey);
+ if (strcmp((char*) parsedkey,
+ (char*) impl->currentTags.mdeKeys[idx]->data)
+ == 0)
+ {
+ matchMask |= XA_METADATA_FILTER_KEY;
+ }
+ }
+ if (filterMask & XA_METADATA_FILTER_LANG && pValueLangCountry)
+ {
+ if (strcmp(
+ (char*) pValueLangCountry,
+ (char*) impl->currentTags.mdeKeys[idx]->langCountry)
+ == 0)
+ {
+ matchMask |= XA_METADATA_FILTER_LANG;
+ }
+ }
+ if (filterMask & XA_METADATA_FILTER_ENCODING)
+ {
+ if (keyEncoding
+ == impl->currentTags.mdeKeys[idx]->encoding)
+ {
+ matchMask |= XA_METADATA_FILTER_ENCODING;
+ }
+ if (valueEncoding
+ == impl->currentTags.mdeValues[idx]->encoding)
+ {
+ matchMask |= XA_METADATA_FILTER_ENCODING;
+ }
+ }
+ /* check if all filters apply */
+ if (filterMask == matchMask)
+ {
+ if (impl->tagmatchesfilter[idx] == XA_BOOLEAN_FALSE)
+ {
+ impl->tagmatchesfilter[idx] = XA_BOOLEAN_TRUE;
+ impl->filteredcount++;
+ }
+ }
+ /*reset matchmask*/
+ matchMask = 0;
+ }
+ }
+ }DEBUG_API_A1("<-XAMetadataExtractionItfImpl_AddKeyFilter (%d)", (int)res);
+ return res;
}
- DEBUG_API_A1("<-XAMetadataExtractionItfImpl_AddKeyFilter (%d)", (int)res);
- return res;
- }
/*
* Clears the key filter
*/
-XAresult XAMetadataExtractionItfImpl_ClearKeyFilter(XAMetadataExtractionItf self)
-{
+XAresult XAMetadataExtractionItfImpl_ClearKeyFilter(
+ XAMetadataExtractionItf self)
+ {
XAMetadataExtractionItfImpl *impl = NULL;
XAresult res = XA_RESULT_SUCCESS;
-
+
XAuint32 idx = 0;
DEBUG_API("->XAMetadataExtractionItfImpl_ClearKeyFilter");
impl = GetImpl(self);
- if( !impl )
- {
+ if (!impl)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
res = XA_RESULT_PARAMETER_INVALID;
- }
+ }
else
- {
-
- if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWMMF)
- {
- DEBUG_API("<-XAMetadataExtractionItfImpl_ClearKeyFilter Not Supported in MMF");
- res = XA_RESULT_PARAMETER_INVALID;
- }
- else
- {
- if(impl->tagmatchesfilter)
- {
-
- for(idx=0; idx < impl->currentTags.itemcount; idx++)
- {
- impl->tagmatchesfilter[idx] = XA_BOOLEAN_FALSE;
- }
+ {
- }
- impl->filteredcount = 0;
- impl->filteringOn = XA_BOOLEAN_FALSE;
- }
- }
+ if (impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWMMF)
+ {
+ DEBUG_API("<-XAMetadataExtractionItfImpl_ClearKeyFilter Not Supported in MMF");
+ res = XA_RESULT_PARAMETER_INVALID;
+ }
+ else
+ {
+ if (impl->tagmatchesfilter)
+ {
+
+ for (idx = 0; idx < impl->currentTags.itemcount; idx++)
+ {
+ impl->tagmatchesfilter[idx] = XA_BOOLEAN_FALSE;
+ }
+
+ }
+ impl->filteredcount = 0;
+ impl->filteringOn = XA_BOOLEAN_FALSE;
+ }
+ }
DEBUG_API_A1("<-XAMetadataExtractionItfImpl_ClearKeyFilter (%d)", (int)res);
return res;
-}
+ }
/*****************************************************************************
* XAMetadataExtractionItfImpl -specific methods
@@ -556,15 +552,17 @@
/* XAMetadataExtractionItfImpl* XAMetadataExtractionItfImpl_Create()
* Description: Allocate and initialize XAMetadataExtractionItfImpl
*/
-XAMetadataExtractionItfImpl* XAMetadataExtractionItfImpl_Create(XAAdaptationBaseCtx *adaptCtx)
-{
+XAMetadataExtractionItfImpl* XAMetadataExtractionItfImpl_Create(
+ XAAdaptationBaseCtx *adaptCtx)
+ {
XAMetadataExtractionItfImpl *self = NULL;
DEBUG_API("->XAMetadataExtractionItfImpl_Create");
- self = (XAMetadataExtractionItfImpl*)calloc(1,sizeof(XAMetadataExtractionItfImpl));
+ self = (XAMetadataExtractionItfImpl*) calloc(1,
+ sizeof(XAMetadataExtractionItfImpl));
- if( self )
- {
+ if (self)
+ {
/* init itf default implementation */
self->itf.GetItemCount = XAMetadataExtractionItfImpl_GetItemCount;
self->itf.GetKeySize = XAMetadataExtractionItfImpl_GetKeySize;
@@ -580,120 +578,121 @@
self->adaptCtx = adaptCtx;
- if(self->adaptCtx->fwtype != FWMgrFWMMF)
- {
- XAAdaptationBase_AddEventHandler( adaptCtx, &XAMetadataExtractionItfImp_AdaptCb, XA_METADATAEVENTS, self );
- }
+ if (self->adaptCtx->fwtype != FWMgrFWMMF)
+ {
+ XAAdaptationBase_AddEventHandler(adaptCtx,
+ &XAMetadataExtractionItfImp_AdaptCb, XA_METADATAEVENTS,
+ self);
+ }
self->self = self;
- }
+ }
DEBUG_API("<-XAMetadataExtractionItfImpl_Create");
return self;
-}
+ }
/* void XAMetadataExtractionItfImpl_Free(XAMetadataExtractionItfImpl* self)
* Description: Free all resources reserved at XAMetadataExtractionItfImpl_Create
*/
void XAMetadataExtractionItfImpl_Free(XAMetadataExtractionItfImpl* self)
-{
+ {
DEBUG_API("->XAMetadataExtractionItfImpl_Free");
assert(self==self->self);
-
- if(self->adaptCtx->fwtype != FWMgrFWMMF)
- {
- XAAdaptationBase_RemoveEventHandler( self->adaptCtx, &XAMetadataExtractionItfImp_AdaptCb );
- XAMetadataAdapt_FreeImplTagList(&(self->currentTags), XA_BOOLEAN_TRUE);
-
- if(self->tagmatchesfilter)
- {
- free(self->tagmatchesfilter);
- }
- }
+
+ if (self->adaptCtx->fwtype != FWMgrFWMMF)
+ {
+ XAAdaptationBase_RemoveEventHandler(self->adaptCtx,
+ &XAMetadataExtractionItfImp_AdaptCb);
+ XAMetadataAdapt_FreeImplTagList(&(self->currentTags), XA_BOOLEAN_TRUE);
+
+ if (self->tagmatchesfilter)
+ {
+ free(self->tagmatchesfilter);
+ }
+ }
free(self);
DEBUG_API("<-XAMetadataExtractionItfImpl_Free");
-}
+ }
-
/* With this method, adaptation infroms that new tags are found (e.g. if source,
* has changed, live stream contains metadata...)
*/
-void XAMetadataExtractionItfImp_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
-{
+void XAMetadataExtractionItfImp_AdaptCb(void *pHandlerCtx,
+ XAAdaptEvent *event)
+ {
XAMetadataExtractionItfImpl* impl = NULL;
DEBUG_API("->XAMetadataExtractionItfImp_AdaptCb");
- impl = (XAMetadataExtractionItfImpl*)pHandlerCtx;
- if(!impl)
- {
- DEBUG_ERR("XAMetadataExtractionItfImp_AdaptCb, invalid context pointer!");
- DEBUG_API("<-XAMetadataExtractionItfImp_AdaptCb");
+ impl = (XAMetadataExtractionItfImpl*) pHandlerCtx;
+ if (!impl)
+ {
+ DEBUG_ERR("XAMetadataExtractionItfImp_AdaptCb, invalid context pointer!");DEBUG_API("<-XAMetadataExtractionItfImp_AdaptCb");
return;
- }
- if( event && event->eventid == XA_ADAPT_MDE_TAGS_AVAILABLE )
- {
- /* get the tag list */
- XAMetadataExtractionItfAdapt_FillTagList( (XAAdaptationGstCtx*)impl->adaptCtx, &(impl->currentTags) );
- if(impl->tagmatchesfilter)
+ }
+ if (event && event->eventid == XA_ADAPT_MDE_TAGS_AVAILABLE)
{
+ /* get the tag list */
+ XAMetadataExtractionItfAdapt_FillTagList(
+ (XAAdaptationGstCtx*) impl->adaptCtx, &(impl->currentTags));
+ if (impl->tagmatchesfilter)
+ {
free(impl->tagmatchesfilter);
+ }
+ impl->tagmatchesfilter = calloc(impl->currentTags.itemcount,
+ sizeof(XAboolean));
+ impl->filteredcount = 0;
}
- impl->tagmatchesfilter = calloc(impl->currentTags.itemcount,sizeof(XAboolean));
- impl->filteredcount = 0;
- }
else
- {
+ {
DEBUG_INFO("unhandled");
+ }DEBUG_API("<-XAMetadataExtractionItfImp_AdaptCb");
}
- DEBUG_API("<-XAMetadataExtractionItfImp_AdaptCb");
-}
-
/* For given index over filtered array, return index over whole array
*/
XAresult CheckAndUnfilterIndex(XAMetadataExtractionItfImpl *impl,
- XAuint32 oldidx, XAuint32 *newidx)
-{
+ XAuint32 oldidx, XAuint32 *newidx)
+ {
DEBUG_API("->CheckAndUnfilterIndex");
-
- if( impl->filteringOn )
- {
- XAint16 i=-1;
- if(oldidx>=impl->filteredcount)
+
+ if (impl->filteringOn)
{
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-CheckAndUnfilterIndex");
+ XAint16 i = -1;
+ if (oldidx >= impl->filteredcount)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-CheckAndUnfilterIndex");
return XA_RESULT_PARAMETER_INVALID;
- }
- *newidx=0;
- while(*newidx<impl->currentTags.itemcount)
- {
- if(impl->tagmatchesfilter[*newidx]) i++;
- if(i<oldidx) (*newidx)++;
- else break;
+ }
+ *newidx = 0;
+ while (*newidx < impl->currentTags.itemcount)
+ {
+ if (impl->tagmatchesfilter[*newidx])
+ i++;
+ if (i < oldidx)
+ (*newidx)++;
+ else
+ break;
+ }
+ if (*newidx == impl->currentTags.itemcount)
+ {
+ /* should not end up here */
+ *newidx = 0;
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-CheckAndUnfilterIndex");
+ return XA_RESULT_PARAMETER_INVALID;
+ }
}
- if(*newidx==impl->currentTags.itemcount)
+ else
{
- /* should not end up here */
- *newidx=0;
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-CheckAndUnfilterIndex");
+ if (oldidx >= impl->currentTags.itemcount)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-CheckAndUnfilterIndex");
return XA_RESULT_PARAMETER_INVALID;
+ }
+ *newidx = oldidx;
}
- }
- else
- {
- if(oldidx>=impl->currentTags.itemcount)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-CheckAndUnfilterIndex");
- return XA_RESULT_PARAMETER_INVALID;
- }
- *newidx=oldidx;
- }
DEBUG_API("<-CheckAndUnfilterIndex");
return XA_RESULT_SUCCESS;
-}
+ }
-
--- a/khronosfws/openmax_al/src/common/xametadataextractionitf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xametadataextractionitf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Metadata Extraction Implementation Header
+ *
+ */
#ifndef XAMETADATAEXTRACTIONITF_H
#define XAMETADATAEXTRACTIONITF_H
@@ -30,65 +30,58 @@
/** STRUCTURES **/
/* Definition of XAMetadataExtractionItf implementation */
typedef struct XAMetadataExtractionItfImpl_
-{
+ {
/* parent interface */
struct XAMetadataExtractionItf_ itf;
/* pointer to self */
struct XAMetadataExtractionItfImpl_* self;
/* variables */
- XAuint32 filteredcount;
- XAboolean* tagmatchesfilter;
- XAboolean filteringOn;
-
- XAMetadataImplTagList currentTags;
+ XAuint32 filteredcount;
+ XAboolean* tagmatchesfilter;
+ XAboolean filteringOn;
+
+ XAMetadataImplTagList currentTags;
XAAdaptationBaseCtx *adaptCtx;
-} XAMetadataExtractionItfImpl;
+ } XAMetadataExtractionItfImpl;
/** METHODS **/
/* Base interface XAMetadataExtractionItf implementation */
-XAresult XAMetadataExtractionItfImpl_GetItemCount(XAMetadataExtractionItf self,
- XAuint32 *pItemCount);
+XAresult XAMetadataExtractionItfImpl_GetItemCount(
+ XAMetadataExtractionItf self, XAuint32 *pItemCount);
XAresult XAMetadataExtractionItfImpl_GetKeySize(XAMetadataExtractionItf self,
- XAuint32 index,
- XAuint32 *pKeySize);
+ XAuint32 index, XAuint32 *pKeySize);
XAresult XAMetadataExtractionItfImpl_GetKey(XAMetadataExtractionItf self,
- XAuint32 index,
- XAuint32 keySize,
- XAMetadataInfo *pKey);
+ XAuint32 index, XAuint32 keySize, XAMetadataInfo *pKey);
-XAresult XAMetadataExtractionItfImpl_GetValueSize(XAMetadataExtractionItf self,
- XAuint32 index,
- XAuint32 *pValueSize);
+XAresult XAMetadataExtractionItfImpl_GetValueSize(
+ XAMetadataExtractionItf self, XAuint32 index, XAuint32 *pValueSize);
XAresult XAMetadataExtractionItfImpl_GetValue(XAMetadataExtractionItf self,
- XAuint32 index,
- XAuint32 valueSize,
- XAMetadataInfo *pValue);
+ XAuint32 index, XAuint32 valueSize, XAMetadataInfo *pValue);
-XAresult XAMetadataExtractionItfImpl_AddKeyFilter(XAMetadataExtractionItf self,
- XAuint32 keySize,
- const void *pKey,
- XAuint32 keyEncoding,
- const XAchar *pValueLangCountry,
- XAuint32 valueEncoding,
- XAuint8 filterMask);
+XAresult XAMetadataExtractionItfImpl_AddKeyFilter(
+ XAMetadataExtractionItf self, XAuint32 keySize, const void *pKey,
+ XAuint32 keyEncoding, const XAchar *pValueLangCountry,
+ XAuint32 valueEncoding, XAuint8 filterMask);
-XAresult XAMetadataExtractionItfImpl_ClearKeyFilter(XAMetadataExtractionItf self);
-
+XAresult XAMetadataExtractionItfImpl_ClearKeyFilter(
+ XAMetadataExtractionItf self);
/* XAMetadataExtractionItfImpl -specific methods */
-XAMetadataExtractionItfImpl* XAMetadataExtractionItfImpl_Create( XAAdaptationBaseCtx *adaptCtx);
-void XAMetadataExtractionItfImp_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
+XAMetadataExtractionItfImpl* XAMetadataExtractionItfImpl_Create(
+ XAAdaptationBaseCtx *adaptCtx);
+void XAMetadataExtractionItfImp_AdaptCb(void *pHandlerCtx,
+ XAAdaptEvent *event);
void XAMetadataExtractionItfImpl_Free(XAMetadataExtractionItfImpl* self);
/* internal methods */
XAresult CheckAndUnfilterIndex(XAMetadataExtractionItfImpl *impl,
- XAuint32 oldidx, XAuint32 *newidx);
+ XAuint32 oldidx, XAuint32 *newidx);
#endif /* XAMETADATAEXTRACTIONITF_H */
--- a/khronosfws/openmax_al/src/common/xanlinearvolumeitf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xanlinearvolumeitf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
#ifndef XANLINEARVOLUMEITF_H
#define XANLINEARVOLUMEITF_H
@@ -30,7 +30,7 @@
/** STRUCTURES **/
/* Definition of XANokiaLinearVolumeItf implementation */
typedef struct XANokiaLinearVolumeItfImpl_
-{
+ {
/* parent interface */
struct XANokiaLinearVolumeItf_ itf;
/* pointer to self */
@@ -38,33 +38,40 @@
XAmillibel volumeLevel;
XAuint32 eventFlags;
-
- XANokiaLinearVolumeItf cbPtrToSelf;
- xaNokiaLinearVolumeCallback callback;
- void *context;
-
+
+ XANokiaLinearVolumeItf cbPtrToSelf;
+ xaNokiaLinearVolumeCallback callback;
+ void *context;
+
/*Adaptation variables*/
XAAdaptationBaseCtx *adapCtx;
-} XANokiaLinearVolumeItfImpl;
+ } XANokiaLinearVolumeItfImpl;
/** METHODS **/
/* Base interface XANokiaLinearVolumeItf implementation */
-XAresult XANokiaLinearVolumeItfImpl_SetVolumeLevel(XANokiaLinearVolumeItf self, XAuint32 *percentage);
+XAresult XANokiaLinearVolumeItfImpl_SetVolumeLevel(
+ XANokiaLinearVolumeItf self, XAuint32 *percentage);
-XAresult XANokiaLinearVolumeItfImpl_GetVolumeLevel(XANokiaLinearVolumeItf self, XAuint32 *percentage);
+XAresult XANokiaLinearVolumeItfImpl_GetVolumeLevel(
+ XANokiaLinearVolumeItf self, XAuint32 *percentage);
-XAresult XANokiaLinearVolumeItfImpl_GetStepCount(XANokiaLinearVolumeItf self, XAuint32 *pStepCount);
+XAresult XANokiaLinearVolumeItfImpl_GetStepCount(XANokiaLinearVolumeItf self,
+ XAuint32 *pStepCount);
-XAresult XANokiaLinearVolumeItfImpl_RegisterVolumeCallback(XANokiaLinearVolumeItf self,
- xaNokiaLinearVolumeCallback callback,
- void * pContext);
-XAresult XANokiaLinearVolumeItfImpl_SetCallbackEventsMask(XANokiaLinearVolumeItf self, XAuint32 eventFlags );
-XAresult XANokiaLinearVolumeItfImpl_GetCallbackEventsMask(XANokiaLinearVolumeItf self, XAuint32 * pEventFlags);
+XAresult XANokiaLinearVolumeItfImpl_RegisterVolumeCallback(
+ XANokiaLinearVolumeItf self, xaNokiaLinearVolumeCallback callback,
+ void * pContext);
+XAresult XANokiaLinearVolumeItfImpl_SetCallbackEventsMask(
+ XANokiaLinearVolumeItf self, XAuint32 eventFlags);
+XAresult XANokiaLinearVolumeItfImpl_GetCallbackEventsMask(
+ XANokiaLinearVolumeItf self, XAuint32 * pEventFlags);
/* XANokiaLinearVolumeItfImpl -specific methods */
-XANokiaLinearVolumeItfImpl* XANokiaLinearVolumeItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
+XANokiaLinearVolumeItfImpl* XANokiaLinearVolumeItfImpl_Create(
+ XAAdaptationBaseCtx *adapCtx);
void XANokiaLinearVolumeItfImpl_Free(XANokiaLinearVolumeItfImpl* self);
-void XANokiaLinearVolumeItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
+void XANokiaLinearVolumeItfImpl_AdaptCb(void *pHandlerCtx,
+ XAAdaptEvent *event);
#endif /* XANLINEARVOLUMEITF_H */
--- a/khronosfws/openmax_al/src/common/xanokialinearvolume_iid.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xanokialinearvolume_iid.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,9 +1,20 @@
/*
- * Copyright goes here.
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Nokia Linear Volume IID
*
*/
-
#include "openmaxalwrapper.h"
/*****************************************************************************/
--- a/khronosfws/openmax_al/src/common/xanokialinearvolumeitf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xanokialinearvolumeitf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Nokia Linear Volume Interface Implementation
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
@@ -27,17 +27,18 @@
* Description: Validated interface pointer and cast it to implementations pointer.
**/
static XANokiaLinearVolumeItfImpl* GetImpl(XANokiaLinearVolumeItf self)
-{
- if(self)
{
- XANokiaLinearVolumeItfImpl* impl = (XANokiaLinearVolumeItfImpl*)(*self);
- if(impl && impl == impl->self)
+ if (self)
{
+ XANokiaLinearVolumeItfImpl* impl =
+ (XANokiaLinearVolumeItfImpl*) (*self);
+ if (impl && impl == impl->self)
+ {
return impl;
+ }
}
+ return NULL;
}
- return NULL;
-}
/**
* XAresult XANokiaLinearVolumeItfImpl_RegisterVolumeCallback(XANokiaLinearVolumeItf self,
@@ -45,21 +46,21 @@
* void * pContext)
* Description: Sets or clears the xaVolumeCallback.
**/
-XAresult XANokiaLinearVolumeItfImpl_RegisterVolumeCallback(XANokiaLinearVolumeItf self,
- xaNokiaLinearVolumeCallback callback,
- void * pContext)
-{
+XAresult XANokiaLinearVolumeItfImpl_RegisterVolumeCallback(
+ XANokiaLinearVolumeItf self, xaNokiaLinearVolumeCallback callback,
+ void * pContext)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XANokiaLinearVolumeItfImpl* impl = GetImpl(self);
DEBUG_API("->XANokiaLinearVolumeItfImpl_RegisterVolumeCallback");
- if(!impl)
- {
+ if (!impl)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
/* invalid parameter */
DEBUG_API("<-XANokiaLinearVolumeItfImpl_RegisterVolumeCallback");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
impl->callback = callback;
impl->context = pContext;
@@ -67,7 +68,7 @@
DEBUG_API("<-XANokiaLinearVolumeItfImpl_RegisterVolumeCallback");
return ret;
-}
+ }
/**
* Base interface XANokiaLinearVolumeItf implementation
@@ -77,140 +78,137 @@
* XAresult XANokiaLinearVolumeItfImpl_SetVolumeLevel(XANokiaLinearVolumeItf self, XAuint32 percentage)
* Description: Sets the object's volume level.
**/
-XAresult XANokiaLinearVolumeItfImpl_SetVolumeLevel(XANokiaLinearVolumeItf self, XAuint32 *percentage)
-{
+XAresult XANokiaLinearVolumeItfImpl_SetVolumeLevel(
+ XANokiaLinearVolumeItf self, XAuint32 *percentage)
+ {
XANokiaLinearVolumeItfImpl *impl = GetImpl(self);
- XAresult ret = XA_RESULT_SUCCESS;
+ XAresult ret = XA_RESULT_SUCCESS;
XAuint32 vol = *percentage;
-
+
DEBUG_API("->XANokiaLinearVolumeItfImpl_SetVolumeLevel");
-
- if((!impl) || (vol > MAX_PERCENTAGE_VOLUME))
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XANokiaLinearVolumeItfImpl_SetVolumeLevel");
+ if ((!impl) || (vol > MAX_PERCENTAGE_VOLUME))
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaLinearVolumeItfImpl_SetVolumeLevel");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
- {
- DEBUG_API("<-XANokiaLinearVolumeItfImpl_SetVolumeLevel");
- return ret;
- }
- if(impl->adapCtx->fwtype == FWMgrFWMMF)
+ if (ret == XA_RESULT_SUCCESS)
{
- ret = XANokiaLinearVolumeItfAdapt_SetVolumeLevel((XAAdaptationMMFCtx*)impl->adapCtx, vol);
+ if (impl->adapCtx && impl->adapCtx->fwtype == FWMgrFWMMF)
+ {
+ ret = XANokiaLinearVolumeItfAdapt_SetVolumeLevel(
+ (XAAdaptationMMFCtx*) impl->adapCtx, vol);
+ if (ret == XA_RESULT_SUCCESS)
+ {
+ impl->volumeLevel = vol;
+ }
+ }
+ XAAdaptationBase_ThreadExit(impl->adapCtx);
}
-
- if(ret == XA_RESULT_SUCCESS)
- {
- impl->volumeLevel = vol;
+ DEBUG_API("<-XANokiaLinearVolumeItfImpl_SetVolumeLevel");
+ return ret;
}
- XAAdaptationBase_ThreadExit(impl->adapCtx);
- DEBUG_API("<-XANokiaLinearVolumeItfImpl_SetVolumeLevel");
- return ret ;
-}
-
/**
* XAresult XANokiaLinearVolumeItfImpl_GetVolumeLevel(XANokiaLinearVolumeItf self, XAmillibel *pLevel)
* Description: Gets the object’s volume level.
**/
-XAresult XANokiaLinearVolumeItfImpl_GetVolumeLevel(XANokiaLinearVolumeItf self, XAuint32 *percentage)
-{
+XAresult XANokiaLinearVolumeItfImpl_GetVolumeLevel(
+ XANokiaLinearVolumeItf self, XAuint32 *percentage)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XANokiaLinearVolumeItfImpl *impl = GetImpl(self);
DEBUG_API("->XANokiaLinearVolumeItfImpl_GetVolumeLevel");
- if(!impl || !percentage)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XANokiaLinearVolumeItfImpl_GetVolumeLevel");
+ if (!impl || !percentage)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaLinearVolumeItfImpl_GetVolumeLevel");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*percentage = impl->volumeLevel;
DEBUG_API("<-XANokiaLinearVolumeItfImpl_GetVolumeLevel");
return ret;
-}
+ }
/**
* XAresult XANokiaLinearVolumeItfImpl_GetMaxVolumeLevel(XANokiaLinearVolumeItf self, XAmillibel *pMaxLevel)
* Description: Gets the maximum supported level.
**/
-XAresult XANokiaLinearVolumeItfImpl_GetStepCount(XANokiaLinearVolumeItf self, XAuint32 *pStepCount)
-{
+XAresult XANokiaLinearVolumeItfImpl_GetStepCount(XANokiaLinearVolumeItf self,
+ XAuint32 *pStepCount)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XANokiaLinearVolumeItfImpl *impl = GetImpl(self);
DEBUG_API("->XANokiaLinearVolumeItfImpl_GetVolumeLevel");
- if(!impl || !pStepCount)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XANokiaLinearVolumeItfImpl_GetMaxVolumeLevel");
+ if (!impl || !pStepCount)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaLinearVolumeItfImpl_GetMaxVolumeLevel");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
- {
- DEBUG_API("<-XANokiaLinearVolumeItfImpl_GetMaxVolumeLevel");
- return ret;
- }
- if(impl->adapCtx->fwtype == FWMgrFWMMF)
+ if (ret == XA_RESULT_SUCCESS)
{
- ret = XANokiaLinearVolumeItfAdapt_GetStepCount((XAAdaptationMMFCtx*)impl->adapCtx, pStepCount);
+ if (impl->adapCtx && impl->adapCtx->fwtype == FWMgrFWMMF)
+ {
+ ret = XANokiaLinearVolumeItfAdapt_GetStepCount(
+ (XAAdaptationMMFCtx*) impl->adapCtx, pStepCount);
+ }
+
+ XAAdaptationBase_ThreadExit(impl->adapCtx);
}
-
- XAAdaptationBase_ThreadExit(impl->adapCtx);
DEBUG_API("<-XANokiaLinearVolumeItfImpl_GetMaxVolumeLevel");
return ret;
-}
+ }
-XAresult XANokiaLinearVolumeItfImpl_SetCallbackEventsMask(XANokiaLinearVolumeItf self, XAuint32 eventFlags )
+XAresult XANokiaLinearVolumeItfImpl_SetCallbackEventsMask(
+ XANokiaLinearVolumeItf self, XAuint32 eventFlags)
{
XAresult ret = XA_RESULT_SUCCESS;
XANokiaLinearVolumeItfImpl* impl = GetImpl(self);
DEBUG_API("->XANokiaLinearVolumeItfImpl_SetCallbackEventsMask");
- if(!impl)
- {
+ if (!impl)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
/* invalid parameter */
DEBUG_API("<-XANokiaLinearVolumeItfImpl_SetCallbackEventsMask");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
impl->eventFlags = eventFlags;
DEBUG_API("<-XANokiaLinearVolumeItfImpl_SetCallbackEventsMask");
- return ret;
+ return ret;
}
-XAresult XANokiaLinearVolumeItfImpl_GetCallbackEventsMask(XANokiaLinearVolumeItf self, XAuint32 * pEventFlags)
+XAresult XANokiaLinearVolumeItfImpl_GetCallbackEventsMask(
+ XANokiaLinearVolumeItf self, XAuint32 * pEventFlags)
{
XAresult ret = XA_RESULT_SUCCESS;
XANokiaLinearVolumeItfImpl* impl = GetImpl(self);
DEBUG_API("->XANokiaLinearVolumeItfImpl_GetCallbackEventsMask");
- if(!impl || !pEventFlags)
- {
+ if (!impl || !pEventFlags)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
/* invalid parameter */
DEBUG_API("<-XANokiaLinearVolumeItfImpl_GetCallbackEventsMask");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pEventFlags = impl->eventFlags;
DEBUG_API("<-XANokiaLinearVolumeItfImpl_GetCallbackEventsMask");
- return ret;
+ return ret;
}
/**
@@ -221,76 +219,84 @@
* XANokiaLinearVolumeItfImpl* XANokiaLinearVolumeItfImpl_Create()
* Description: Allocate and initialize VolumeItfImpl
**/
-XANokiaLinearVolumeItfImpl* XANokiaLinearVolumeItfImpl_Create(XAAdaptationBaseCtx *adapCtx )
-{
- XANokiaLinearVolumeItfImpl *self = (XANokiaLinearVolumeItfImpl*)
- calloc(1,sizeof(XANokiaLinearVolumeItfImpl));
+XANokiaLinearVolumeItfImpl* XANokiaLinearVolumeItfImpl_Create(
+ XAAdaptationBaseCtx *adapCtx)
+ {
+ XANokiaLinearVolumeItfImpl *self = (XANokiaLinearVolumeItfImpl*) calloc(
+ 1, sizeof(XANokiaLinearVolumeItfImpl));
DEBUG_API("->XANokiaLinearVolumeItfImpl_Create");
- if(self)
- {
+ if (self)
+ {
/* init itf default implementation */
self->itf.GetStepCount = XANokiaLinearVolumeItfImpl_GetStepCount;
self->itf.GetVolumeLevel = XANokiaLinearVolumeItfImpl_GetVolumeLevel;
self->itf.SetVolumeLevel = XANokiaLinearVolumeItfImpl_SetVolumeLevel;
- self->itf.RegisterVolumeCallback = XANokiaLinearVolumeItfImpl_RegisterVolumeCallback;
- self->itf.SetCallbackEventsMask = XANokiaLinearVolumeItfImpl_SetCallbackEventsMask;
- self->itf.GetCallbackEventsMask = XANokiaLinearVolumeItfImpl_GetCallbackEventsMask;
+ self->itf.RegisterVolumeCallback
+ = XANokiaLinearVolumeItfImpl_RegisterVolumeCallback;
+ self->itf.SetCallbackEventsMask
+ = XANokiaLinearVolumeItfImpl_SetCallbackEventsMask;
+ self->itf.GetCallbackEventsMask
+ = XANokiaLinearVolumeItfImpl_GetCallbackEventsMask;
/* init variables */
self->volumeLevel = 0;
self->adapCtx = adapCtx;
- XAAdaptationBase_AddEventHandler( adapCtx, &XANokiaLinearVolumeItfImpl_AdaptCb, XA_NOKIALINEARVOLITFEVENTS, self );
-
+ XAAdaptationBase_AddEventHandler(adapCtx,
+ &XANokiaLinearVolumeItfImpl_AdaptCb,
+ XA_NOKIALINEARVOLITFEVENTS, self);
+
self->self = self;
- }
+ }
DEBUG_API("<-XANokiaLinearVolumeItfImpl_Create");
return self;
-}
+ }
/**
* void XANokiaLinearVolumeItfImpl_Free(XANokiaLinearVolumeItfImpl* self)
* Description: Free all resources reserved at XANokiaLinearVolumeItfImpl_Create
**/
void XANokiaLinearVolumeItfImpl_Free(XANokiaLinearVolumeItfImpl* self)
-{
+ {
DEBUG_API("->XANokiaLinearVolumeItfImpl_Free");
assert(self==self->self);
free(self);
DEBUG_API("<-XANokiaLinearVolumeItfImpl_Free");
-}
+ }
/* void XANokiaLinearVolumeItfimpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
* Description: Event handler for adaptation events
*/
-void XANokiaLinearVolumeItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
-{
- XANokiaLinearVolumeItfImpl* impl =(XANokiaLinearVolumeItfImpl*)pHandlerCtx;
+void XANokiaLinearVolumeItfImpl_AdaptCb(void *pHandlerCtx,
+ XAAdaptEvent *event)
+ {
+ XANokiaLinearVolumeItfImpl* impl =
+ (XANokiaLinearVolumeItfImpl*) pHandlerCtx;
XAboolean eventBoolean = XA_BOOLEAN_FALSE;
-
+
DEBUG_API("->XANokiaLinearVolumeItfimpl_AdaptCb");
- if(!impl)
- {
- DEBUG_ERR("XANokiaLinearVolumeItfImpl_AdaptCb, invalid context pointer!");
- DEBUG_API("<-XANokiaLinearVolumeItfImpl_AdaptCb");
+ if (!impl && !event)
+ {
+ DEBUG_ERR("XANokiaLinearVolumeItfImpl_AdaptCb, invalid context pointer!");DEBUG_API("<-XANokiaLinearVolumeItfImpl_AdaptCb");
return;
- }
+ }
+
assert(event);
- if( event->eventid == XA_ADAPT_VOLUME_VOLUME_CHANGED && impl->callback )
- {
- if(XA_NOKIALINEARVOLUME_EVENT_VOLUME_CHANGED & impl->eventFlags)
+ if (event->eventid == XA_ADAPT_VOLUME_VOLUME_CHANGED && impl->callback)
+ {
+ if (XA_NOKIALINEARVOLUME_EVENT_VOLUME_CHANGED & impl->eventFlags)
{
- DEBUG_API("Volume level changed in adaptation");
- impl->callback( impl->cbPtrToSelf, impl->context, XA_NOKIALINEARVOLUME_EVENT_VOLUME_CHANGED, eventBoolean );
+ DEBUG_API("Volume level changed in adaptation");
+ impl->callback(impl->cbPtrToSelf, impl->context,
+ XA_NOKIALINEARVOLUME_EVENT_VOLUME_CHANGED, eventBoolean);
}
- }
+ }
else
- {
+ {
/* do nothing */
+ }DEBUG_API("<-XANokiaLinearVolumeItfimpl_AdaptCb");
}
- DEBUG_API("<-XANokiaLinearVolumeItfimpl_AdaptCb");
-}
--- a/khronosfws/openmax_al/src/common/xanokiavolumeext_iid.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xanokiavolumeext_iid.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,5 +1,17 @@
/*
- * Copyright goes here.
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Nokia Volume Interface Extension IID
*
*/
--- a/khronosfws/openmax_al/src/common/xanokiavolumeextitf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xanokiavolumeextitf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
@@ -27,17 +27,17 @@
* Description: Validated interface pointer and cast it to implementations pointer.
**/
static XANokiaVolumeExtItfImpl* GetImpl(XANokiaVolumeExtItf self)
-{
- if(self)
{
- XANokiaVolumeExtItfImpl* impl = (XANokiaVolumeExtItfImpl*)(*self);
- if(impl && impl == impl->self)
+ if (self)
{
+ XANokiaVolumeExtItfImpl* impl = (XANokiaVolumeExtItfImpl*) (*self);
+ if (impl && impl == impl->self)
+ {
return impl;
+ }
}
+ return NULL;
}
- return NULL;
-}
/**
* XAresult XANokiaVolumeExtItfImpl_RegisterVolumeCallback(XANokiaVolumeExtItf self,
@@ -45,21 +45,21 @@
* void * pContext)
* Description: Sets or clears the xaVolumeCallback.
**/
-XAresult XANokiaVolumeExtItfImpl_RegisterVolumeCallback(XANokiaVolumeExtItf self,
- xaNokiaVolumeExtCallback callback,
- void * pContext)
-{
+XAresult XANokiaVolumeExtItfImpl_RegisterVolumeCallback(
+ XANokiaVolumeExtItf self, xaNokiaVolumeExtCallback callback,
+ void * pContext)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XANokiaVolumeExtItfImpl* impl = GetImpl(self);
DEBUG_API("->XANokiaVolumeExtItfImpl_RegisterVolumeCallback");
- if(!impl)
- {
+ if (!impl)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
/* invalid parameter */
DEBUG_API("<-XANokiaVolumeExtItfImpl_RegisterVolumeCallback");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
impl->callback = callback;
impl->context = pContext;
@@ -67,7 +67,7 @@
DEBUG_API("<-XANokiaVolumeExtItfImpl_RegisterVolumeCallback");
return ret;
-}
+ }
/**
* Base interface XANokiaVolumeExtItf implementation
@@ -77,222 +77,220 @@
* XAresult XANokiaVolumeExtItfImpl_SetVolumeLevel(XANokiaVolumeExtItf self, XAmillibel level)
* Description: Sets the object's volume level.
**/
-XAresult XANokiaVolumeExtItfImpl_SetVolumeLevel(XANokiaVolumeExtItf self, XAmillibel level)
-{
+XAresult XANokiaVolumeExtItfImpl_SetVolumeLevel(XANokiaVolumeExtItf self,
+ XAmillibel level)
+ {
XANokiaVolumeExtItfImpl *impl = GetImpl(self);
XAresult ret = XA_RESULT_SUCCESS;
- XAmillibel maximumLevel = 0;
-
+ XAmillibel maximumLevel = 0;
+
DEBUG_API("->XANokiaVolumeExtItfImpl_SetVolumeLevel");
/* check maximum volume level */
- if(XANokiaVolumeExtItfImpl_GetMaxVolumeLevel(self, &maximumLevel) != XA_RESULT_SUCCESS)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XANokiaVolumeExtItfImpl_SetVolumeLevel");
+ if (XANokiaVolumeExtItfImpl_GetMaxVolumeLevel(self, &maximumLevel)
+ != XA_RESULT_SUCCESS)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfImpl_SetVolumeLevel");
/* cannot solve maximum volume level */
return XA_RESULT_PARAMETER_INVALID;
- }
-
- if(!impl || level > maximumLevel)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XANokiaVolumeExtItfImpl_SetVolumeLevel");
+ }
+
+ if (!impl || level > maximumLevel)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfImpl_SetVolumeLevel");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
impl->volumeLevel = level;
DEBUG_API("<-XANokiaVolumeExtItfImpl_SetVolumeLevel");
- return ret ;
-}
+ return ret;
+ }
/**
* XAresult XANokiaVolumeExtItfImpl_GetVolumeLevel(XANokiaVolumeExtItf self, XAmillibel *pLevel)
* Description: Gets the object’s volume level.
**/
-XAresult XANokiaVolumeExtItfImpl_GetVolumeLevel(XANokiaVolumeExtItf self, XAmillibel *pLevel)
-{
+XAresult XANokiaVolumeExtItfImpl_GetVolumeLevel(XANokiaVolumeExtItf self,
+ XAmillibel *pLevel)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XANokiaVolumeExtItfImpl *impl = GetImpl(self);
DEBUG_API("->XANokiaVolumeExtItfImpl_GetVolumeLevel");
- if(!impl || !pLevel)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XANokiaVolumeExtItfImpl_GetVolumeLevel");
+ if (!impl || !pLevel)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfImpl_GetVolumeLevel");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pLevel = impl->volumeLevel;
DEBUG_API("<-XANokiaVolumeExtItfImpl_GetVolumeLevel");
return ret;
-}
+ }
/**
* XAresult XANokiaVolumeExtItfImpl_GetMaxVolumeLevel(XANokiaVolumeExtItf self, XAmillibel *pMaxLevel)
* Description: Gets the maximum supported level.
**/
-XAresult XANokiaVolumeExtItfImpl_GetMaxVolumeLevel(XANokiaVolumeExtItf self, XAmillibel *pMaxLevel)
-{
+XAresult XANokiaVolumeExtItfImpl_GetMaxVolumeLevel(XANokiaVolumeExtItf self,
+ XAmillibel *pMaxLevel)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XANokiaVolumeExtItfImpl *impl = GetImpl(self);
DEBUG_API("->XANokiaVolumeExtItfImpl_GetVolumeLevel");
- if(!impl || !pMaxLevel)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XANokiaVolumeExtItfImpl_GetMaxVolumeLevel");
+ if (!impl || !pMaxLevel)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfImpl_GetMaxVolumeLevel");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pMaxLevel = MAX_SUPPORT_VOLUME_LEVEL;
-
+
DEBUG_API("<-XANokiaVolumeExtItfImpl_GetMaxVolumeLevel");
return ret;
-}
+ }
/**
* XAresult XANokiaVolumeExtItfImpl_SetMute(XANokiaVolumeExtItf self, XAboolean mute)
* Description: Mutes or unmutes the object.
**/
-XAresult XANokiaVolumeExtItfImpl_SetMute(XANokiaVolumeExtItf self, XAboolean mute)
-{
+XAresult XANokiaVolumeExtItfImpl_SetMute(XANokiaVolumeExtItf self,
+ XAboolean mute)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XANokiaVolumeExtItfImpl *impl = GetImpl(self);
DEBUG_API("->XANokiaVolumeExtItfImpl_SetMute");
- if(!impl)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XANokiaVolumeExtItfImpl_SetMute");
+ if (!impl)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfImpl_SetMute");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
- {
- DEBUG_API("<-XANokiaVolumeExtItfImpl_SetMute");
- return ret;
- }
- /* check is mute state changed */
- if(mute != impl->mute)
- {
- if(impl->adapCtx->fwtype == FWMgrFWMMF)
+ if (ret == XA_RESULT_SUCCESS)
{
- ret = XANokiaVolumeExtItfAdapt_SetMute((XAAdaptationMMFCtx*)impl->adapCtx, mute);
- }
+ /* check is mute state changed */
+ if (mute != impl->mute)
+ {
+ if (impl->adapCtx && impl->adapCtx->fwtype == FWMgrFWMMF)
+ {
+ ret = XANokiaVolumeExtItfAdapt_SetMute(
+ (XAAdaptationMMFCtx*) impl->adapCtx, mute);
+ if (ret == XA_RESULT_SUCCESS)
+ {
+ impl->mute = mute;
+ }
+ }
+ }
- if(ret == XA_RESULT_SUCCESS)
- {
- impl->mute = mute;
+ XAAdaptationBase_ThreadExit(impl->adapCtx);
}
- }
-
- XAAdaptationBase_ThreadExit(impl->adapCtx);
DEBUG_API("<-XANokiaVolumeExtItfImpl_SetMute");
return ret;
-}
+ }
/**
* XAresult XANokiaVolumeExtItfImpl_GetMute(XANokiaVolumeExtItf self, XAboolean *pMute)
* Description: Retrieves the object's state.
**/
-XAresult XANokiaVolumeExtItfImpl_GetMute(XANokiaVolumeExtItf self, XAboolean *pMute)
-{
+XAresult XANokiaVolumeExtItfImpl_GetMute(XANokiaVolumeExtItf self,
+ XAboolean *pMute)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XANokiaVolumeExtItfImpl *impl = GetImpl(self);
DEBUG_API("->XANokiaVolumeExtItfImpl_GetMute");
- if(!impl || !pMute)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XANokiaVolumeExtItfImpl_GetMute");
+ if (!impl || !pMute)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfImpl_GetMute");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pMute = impl->mute;
DEBUG_API("<-XANokiaVolumeExtItfImpl_GetMute");
return ret;
-}
+ }
/**
* XAresult XANokiaVolumeExtItfImpl_EnableStereoPosition(XANokiaVolumeExtItf self, XAboolean enable)
* Description: Enables or disables the stereo positioning effect.
**/
-XAresult XANokiaVolumeExtItfImpl_EnableStereoPosition(XANokiaVolumeExtItf self, XAboolean enable)
-{
+XAresult XANokiaVolumeExtItfImpl_EnableStereoPosition(
+ XANokiaVolumeExtItf self, XAboolean enable)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XANokiaVolumeExtItfImpl *impl = GetImpl(self);
DEBUG_API("->XANokiaVolumeExtItfImpl_EnableStereoPosition");
- if(!impl)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XANokiaVolumeExtItfImpl_EnableStereoPosition");
+ if (!impl)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfImpl_EnableStereoPosition");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
- {
+ if (ret == XA_RESULT_PARAMETER_INVALID || ret
+ == XA_RESULT_PRECONDITIONS_VIOLATED)
+ {
DEBUG_API("<-XANokiaVolumeExtItfImpl_EnableStereoPosition");
return ret;
- }
+ }
/* Check is stereo position state changed */
- if(enable != impl->enableStereoPos)
- {
- if(impl->adapCtx->fwtype == FWMgrFWMMF)
+ if (enable != impl->enableStereoPos)
{
- ret = XANokiaVolumeExtItfAdapt_EnableStereoPosition((XAAdaptationMMFCtx*)impl->adapCtx,
- enable);
- }
+ if (impl->adapCtx->fwtype == FWMgrFWMMF)
+ {
+ ret = XANokiaVolumeExtItfAdapt_EnableStereoPosition(
+ (XAAdaptationMMFCtx*) impl->adapCtx, enable);
+ }
- if(ret == XA_RESULT_SUCCESS)
- {
+ if (ret == XA_RESULT_SUCCESS)
+ {
impl->enableStereoPos = enable;
+ }
}
- }
XAAdaptationBase_ThreadExit(impl->adapCtx);
DEBUG_API("<-XANokiaVolumeExtItfImpl_EnableStereoPosition");
return ret;
-}
+ }
/**
* XAresult XANokiaVolumeExtItfImpl_IsEnabledStereoPosition(XANokiaVolumeExtItf self,
* XAboolean *pEnable)
* Description: Returns the enabled state of the stereo positioning effect.
**/
-XAresult XANokiaVolumeExtItfImpl_IsEnabledStereoPosition(XANokiaVolumeExtItf self,
- XAboolean *pEnable)
-{
+XAresult XANokiaVolumeExtItfImpl_IsEnabledStereoPosition(
+ XANokiaVolumeExtItf self, XAboolean *pEnable)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XANokiaVolumeExtItfImpl *impl = GetImpl(self);
DEBUG_API("->XANokiaVolumeExtItfImpl_IsEnabledStereoPosition");
- if(!impl || !pEnable)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XANokiaVolumeExtItfImpl_IsEnabledStereoPosition");
+ if (!impl || !pEnable)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfImpl_IsEnabledStereoPosition");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pEnable = impl->enableStereoPos;
DEBUG_API("<-XANokiaVolumeExtItfImpl_IsEnabledStereoPosition");
return ret;
-}
+ }
/**
* XAresult XANokiaVolumeExtItfImpl_SetStereoPosition(XANokiaVolumeExtItf self,
@@ -300,44 +298,44 @@
* Description: Sets the stereo position of the object.
**/
XAresult XANokiaVolumeExtItfImpl_SetStereoPosition(XANokiaVolumeExtItf self,
- XApermille stereoPosition)
-{
+ XApermille stereoPosition)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XANokiaVolumeExtItfImpl *impl = GetImpl(self);
DEBUG_API("->XANokiaVolumeExtItfImpl_SetStereoPosition");
- if(!impl || (stereoPosition < STEREO_POSITION_LEFT) ||
- (stereoPosition > STEREO_POSITION_RIGHT))
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XANokiaVolumeExtItfImpl_SetStereoPosition");
+ if (!impl || (stereoPosition < STEREO_POSITION_LEFT) || (stereoPosition
+ > STEREO_POSITION_RIGHT))
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfImpl_SetStereoPosition");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
impl->stereoPosition = stereoPosition;
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
- {
+ if (ret == XA_RESULT_PARAMETER_INVALID || ret
+ == XA_RESULT_PRECONDITIONS_VIOLATED)
+ {
DEBUG_API("<-XANokiaVolumeExtItfImpl_SetStereoPosition");
return ret;
- }
+ }
/* check is stereo position effect enabled if is then handle effect */
- if(impl->enableStereoPos)
- {
- if(impl->adapCtx->fwtype == FWMgrFWMMF)
+ if (impl->enableStereoPos)
{
- ret = XANokiaVolumeExtItfAdapt_SetStereoPosition((XAAdaptationMMFCtx*)impl->adapCtx,
- stereoPosition);
-
+ if (impl->adapCtx->fwtype == FWMgrFWMMF)
+ {
+ ret = XANokiaVolumeExtItfAdapt_SetStereoPosition(
+ (XAAdaptationMMFCtx*) impl->adapCtx, stereoPosition);
+
+ }
}
- }
XAAdaptationBase_ThreadExit(impl->adapCtx);
DEBUG_API("<-XANokiaVolumeExtItfImpl_SetStereoPosition");
return ret;
-}
+ }
/**
* XAresult XANokiaVolumeExtItfImpl_GetStereoPosition(XANokiaVolumeExtItf self,
@@ -345,67 +343,67 @@
* Description: Gets the object’s stereo position setting.
**/
XAresult XANokiaVolumeExtItfImpl_GetStereoPosition(XANokiaVolumeExtItf self,
- XApermille *pStereoPosition)
-{
+ XApermille *pStereoPosition)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XANokiaVolumeExtItfImpl *impl = GetImpl(self);
DEBUG_API("->XANokiaVolumeExtItfImpl_GetStereoPosition");
- if(!impl || !pStereoPosition)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XANokiaVolumeExtItfImpl_GetStereoPosition");
+ if (!impl || !pStereoPosition)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfImpl_GetStereoPosition");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pStereoPosition = impl->stereoPosition;
DEBUG_API("<-XANokiaVolumeExtItfImpl_GetStereoPosition");
return ret;
-}
+ }
-XAresult XANokiaVolumeExtItfImpl_SetCallbackEventsMask(XANokiaVolumeExtItf self, XAuint32 eventFlags )
+XAresult XANokiaVolumeExtItfImpl_SetCallbackEventsMask(
+ XANokiaVolumeExtItf self, XAuint32 eventFlags)
{
XAresult ret = XA_RESULT_SUCCESS;
XANokiaVolumeExtItfImpl* impl = GetImpl(self);
DEBUG_API("->XANokiaVolumeExtItfImpl_SetCallbackEventsMask");
- if(!impl)
- {
+ if (!impl)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
/* invalid parameter */
DEBUG_API("<-XANokiaVolumeExtItfImpl_SetCallbackEventsMask");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
impl->eventFlags = eventFlags;
DEBUG_API("<-XANokiaVolumeExtItfImpl_SetCallbackEventsMask");
- return ret;
+ return ret;
}
-XAresult XANokiaVolumeExtItfImpl_GetCallbackEventsMask(XANokiaVolumeExtItf self, XAuint32 * pEventFlags)
+XAresult XANokiaVolumeExtItfImpl_GetCallbackEventsMask(
+ XANokiaVolumeExtItf self, XAuint32 * pEventFlags)
{
XAresult ret = XA_RESULT_SUCCESS;
XANokiaVolumeExtItfImpl* impl = GetImpl(self);
DEBUG_API("->XANokiaVolumeExtItfImpl_GetCallbackEventsMask");
- if(!impl || !pEventFlags)
- {
+ if (!impl || !pEventFlags)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
/* invalid parameter */
DEBUG_API("<-XANokiaVolumeExtItfImpl_GetCallbackEventsMask");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pEventFlags = impl->eventFlags;
DEBUG_API("<-XANokiaVolumeExtItfImpl_GetCallbackEventsMask");
- return ret;
+ return ret;
}
-
/**
* XANokiaVolumeExtItfImpl -specific methods
**/
@@ -414,27 +412,36 @@
* XANokiaVolumeExtItfImpl* XANokiaVolumeExtItfImpl_Create()
* Description: Allocate and initialize VolumeItfImpl
**/
-XANokiaVolumeExtItfImpl* XANokiaVolumeExtItfImpl_Create(XAAdaptationBaseCtx *adapCtx )
-{
- XANokiaVolumeExtItfImpl *self = (XANokiaVolumeExtItfImpl*)
- calloc(1,sizeof(XANokiaVolumeExtItfImpl));
+XANokiaVolumeExtItfImpl* XANokiaVolumeExtItfImpl_Create(
+ XAAdaptationBaseCtx *adapCtx)
+ {
+ XANokiaVolumeExtItfImpl *self = (XANokiaVolumeExtItfImpl*) calloc(1,
+ sizeof(XANokiaVolumeExtItfImpl));
DEBUG_API("->XANokiaVolumeExtItfImpl_Create");
- if(self)
- {
+ if (self)
+ {
/* init itf default implementation */
- self->itf.EnableStereoPosition = XANokiaVolumeExtItfImpl_EnableStereoPosition;
- self->itf.GetMaxVolumeLevel = XANokiaVolumeExtItfImpl_GetMaxVolumeLevel;
+ self->itf.EnableStereoPosition
+ = XANokiaVolumeExtItfImpl_EnableStereoPosition;
+ self->itf.GetMaxVolumeLevel
+ = XANokiaVolumeExtItfImpl_GetMaxVolumeLevel;
self->itf.GetMute = XANokiaVolumeExtItfImpl_GetMute;
- self->itf.GetStereoPosition = XANokiaVolumeExtItfImpl_GetStereoPosition;
+ self->itf.GetStereoPosition
+ = XANokiaVolumeExtItfImpl_GetStereoPosition;
self->itf.GetVolumeLevel = XANokiaVolumeExtItfImpl_GetVolumeLevel;
- self->itf.IsEnabledStereoPosition = XANokiaVolumeExtItfImpl_IsEnabledStereoPosition;
+ self->itf.IsEnabledStereoPosition
+ = XANokiaVolumeExtItfImpl_IsEnabledStereoPosition;
self->itf.SetMute = XANokiaVolumeExtItfImpl_SetMute;
- self->itf.SetStereoPosition = XANokiaVolumeExtItfImpl_SetStereoPosition;
+ self->itf.SetStereoPosition
+ = XANokiaVolumeExtItfImpl_SetStereoPosition;
self->itf.SetVolumeLevel = XANokiaVolumeExtItfImpl_SetVolumeLevel;
- self->itf.RegisterVolumeCallback = XANokiaVolumeExtItfImpl_RegisterVolumeCallback;
- self->itf.SetCallbackEventsMask = XANokiaVolumeExtItfImpl_SetCallbackEventsMask;
- self->itf.GetCallbackEventsMask = XANokiaVolumeExtItfImpl_GetCallbackEventsMask;
+ self->itf.RegisterVolumeCallback
+ = XANokiaVolumeExtItfImpl_RegisterVolumeCallback;
+ self->itf.SetCallbackEventsMask
+ = XANokiaVolumeExtItfImpl_SetCallbackEventsMask;
+ self->itf.GetCallbackEventsMask
+ = XANokiaVolumeExtItfImpl_GetCallbackEventsMask;
/* init variables */
self->volumeLevel = 0;
@@ -444,73 +451,79 @@
self->adapCtx = adapCtx;
- XAAdaptationBase_AddEventHandler(adapCtx, &XANokiaVolumeExtItfImpl_AdaptCb, XA_NOKIAEXTVOLITFEVENTS, self );
-
+ XAAdaptationBase_AddEventHandler(adapCtx,
+ &XANokiaVolumeExtItfImpl_AdaptCb, XA_NOKIAEXTVOLITFEVENTS,
+ self);
+
self->self = self;
- }
+ }
DEBUG_API("<-XANokiaVolumeExtItfImpl_Create");
return self;
-}
+ }
/**
* void XANokiaVolumeExtItfImpl_Free(XANokiaVolumeExtItfImpl* self)
* Description: Free all resources reserved at XANokiaVolumeExtItfImpl_Create
**/
void XANokiaVolumeExtItfImpl_Free(XANokiaVolumeExtItfImpl* self)
-{
+ {
DEBUG_API("->XANokiaVolumeExtItfImpl_Free");
assert(self==self->self);
free(self);
DEBUG_API("<-XANokiaVolumeExtItfImpl_Free");
-}
+ }
/* void XANokiaVolumeExtItfimpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
* Description: Event handler for adaptation events
*/
-void XANokiaVolumeExtItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
-{
- XANokiaVolumeExtItfImpl* impl =(XANokiaVolumeExtItfImpl*)pHandlerCtx;
+void XANokiaVolumeExtItfImpl_AdaptCb(void *pHandlerCtx, XAAdaptEvent *event)
+ {
+ XANokiaVolumeExtItfImpl* impl = (XANokiaVolumeExtItfImpl*) pHandlerCtx;
XAboolean eventBoolean = XA_BOOLEAN_FALSE;
-
+
DEBUG_API("->XANokiaVolumeExtItfimpl_AdaptCb");
- if(!impl)
- {
- DEBUG_ERR("XANokiaVolumeExtItfImpl_AdaptCb, invalid context pointer!");
- DEBUG_API("<-XANokiaVolumeExtItfImpl_AdaptCb");
+ if (!impl)
+ {
+ DEBUG_ERR("XANokiaVolumeExtItfImpl_AdaptCb, invalid context pointer!");DEBUG_API("<-XANokiaVolumeExtItfImpl_AdaptCb");
return;
- }
+ }
assert(event);
-
- if( event->eventid == XA_ADAPT_VOLUME_MUTE_CHANGED && impl->callback )
- {
- if(impl->eventFlags & XA_NOKIAVOLUMEEXT_EVENT_MUTE_CHANGED)
+
+ if (event->eventid == XA_ADAPT_VOLUME_MUTE_CHANGED && impl->callback)
+ {
+ if (impl->eventFlags & XA_NOKIAVOLUMEEXT_EVENT_MUTE_CHANGED)
{
DEBUG_API("Mute Status changed in adaptation");
- eventBoolean = *(XAboolean*)event->data;
- impl->callback( impl->cbPtrToSelf, impl->context, XA_NOKIAVOLUMEEXT_EVENT_MUTE_CHANGED, eventBoolean );
+ eventBoolean = *(XAboolean*) event->data;
+ impl->callback(impl->cbPtrToSelf, impl->context,
+ XA_NOKIAVOLUMEEXT_EVENT_MUTE_CHANGED, eventBoolean);
}
- }
-
+ }
+
else if (event->eventid == XA_ADAPT_VOLUME_VOLUME_CHANGED)
- {
- if(impl->eventFlags & XA_NOKIAVOLUMEEXT_EVENT_VOLUME_CHANGED)
+ {
+ if (impl->eventFlags & XA_NOKIAVOLUMEEXT_EVENT_VOLUME_CHANGED)
{
DEBUG_API("Volume Status changed in adaptation");
- eventBoolean = *(XAboolean*)event->data;
- impl->callback( impl->cbPtrToSelf, impl->context, XA_NOKIAVOLUMEEXT_EVENT_VOLUME_CHANGED, eventBoolean );
+ eventBoolean = *(XAboolean*) event->data;
+ impl->callback(impl->cbPtrToSelf, impl->context,
+ XA_NOKIAVOLUMEEXT_EVENT_VOLUME_CHANGED, eventBoolean);
}
- }
+ }
else if (event->eventid == XA_ADAPT_VULOME_STEREOPOSITION_CHANGED)
- {
- if(impl->eventFlags & XA_NOKIAVOLUMEEXT_EVENT_STEREO_POSITION_CHANGED)
+ {
+ if (impl->eventFlags
+ & XA_NOKIAVOLUMEEXT_EVENT_STEREO_POSITION_CHANGED)
{
DEBUG_API("StereoPosituin Status changed in adaptation");
- eventBoolean = *(XAboolean*)event->data;
- impl->callback( impl->cbPtrToSelf, impl->context, XA_NOKIAVOLUMEEXT_EVENT_STEREO_POSITION_CHANGED, eventBoolean );
+ eventBoolean = *(XAboolean*) event->data;
+ impl->callback(impl->cbPtrToSelf, impl->context,
+ XA_NOKIAVOLUMEEXT_EVENT_STEREO_POSITION_CHANGED,
+ eventBoolean);
}
+ }
+
+ DEBUG_API("<-XANokiaVolumeExtItfimpl_AdaptCb");
}
-
- DEBUG_API("<-XANokiaVolumeExtItfimpl_AdaptCb");
-}
--- a/khronosfws/openmax_al/src/common/xanvolumeextitf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xanvolumeextitf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
#ifndef XANVOLUMEEXTITF_H
#define XANVOLUMEEXTITF_H
@@ -37,7 +37,7 @@
/** STRUCTURES **/
/* Definition of XANokiaVolumeExtItf implementation */
typedef struct XANokiaVolumeExtItfImpl_
-{
+ {
/* parent interface */
struct XANokiaVolumeExtItf_ itf;
/* pointer to self */
@@ -47,46 +47,58 @@
XAboolean mute;
XAboolean enableStereoPos;
XApermille stereoPosition;
- XAuint32 eventFlags;
- XANokiaVolumeExtItf cbPtrToSelf;
- xaNokiaVolumeExtCallback callback;
- void *context;
-
+ XAuint32 eventFlags;
+ XANokiaVolumeExtItf cbPtrToSelf;
+ xaNokiaVolumeExtCallback callback;
+ void *context;
+
/*Adaptation variables*/
XAAdaptationBaseCtx *adapCtx;
-} XANokiaVolumeExtItfImpl;
+ } XANokiaVolumeExtItfImpl;
/** METHODS **/
/* Base interface XANokiaVolumeExtItf implementation */
-XAresult XANokiaVolumeExtItfImpl_SetVolumeLevel(XANokiaVolumeExtItf self, XAmillibel level);
+XAresult XANokiaVolumeExtItfImpl_SetVolumeLevel(XANokiaVolumeExtItf self,
+ XAmillibel level);
-XAresult XANokiaVolumeExtItfImpl_GetVolumeLevel(XANokiaVolumeExtItf self, XAmillibel *pLevel);
-
-XAresult XANokiaVolumeExtItfImpl_GetMaxVolumeLevel(XANokiaVolumeExtItf self, XAmillibel *pMaxLevel);
+XAresult XANokiaVolumeExtItfImpl_GetVolumeLevel(XANokiaVolumeExtItf self,
+ XAmillibel *pLevel);
-XAresult XANokiaVolumeExtItfImpl_SetMute(XANokiaVolumeExtItf self, XAboolean mute);
+XAresult XANokiaVolumeExtItfImpl_GetMaxVolumeLevel(XANokiaVolumeExtItf self,
+ XAmillibel *pMaxLevel);
-XAresult XANokiaVolumeExtItfImpl_GetMute(XANokiaVolumeExtItf self, XAboolean *pMute);
+XAresult XANokiaVolumeExtItfImpl_SetMute(XANokiaVolumeExtItf self,
+ XAboolean mute);
-XAresult XANokiaVolumeExtItfImpl_EnableStereoPosition(XANokiaVolumeExtItf self, XAboolean enable);
+XAresult XANokiaVolumeExtItfImpl_GetMute(XANokiaVolumeExtItf self,
+ XAboolean *pMute);
-XAresult XANokiaVolumeExtItfImpl_IsEnabledStereoPosition(XANokiaVolumeExtItf self, XAboolean *pEnable);
+XAresult XANokiaVolumeExtItfImpl_EnableStereoPosition(
+ XANokiaVolumeExtItf self, XAboolean enable);
-XAresult XANokiaVolumeExtItfImpl_SetStereoPosition(XANokiaVolumeExtItf self, XApermille stereoPosition);
+XAresult XANokiaVolumeExtItfImpl_IsEnabledStereoPosition(
+ XANokiaVolumeExtItf self, XAboolean *pEnable);
-XAresult XANokiaVolumeExtItfImpl_GetStereoPosition(XANokiaVolumeExtItf self, XApermille *pStereoPosition);
+XAresult XANokiaVolumeExtItfImpl_SetStereoPosition(XANokiaVolumeExtItf self,
+ XApermille stereoPosition);
-XAresult XANokiaVolumeExtItfImpl_RegisterVolumeCallback(XANokiaVolumeExtItf self,
- xaNokiaVolumeExtCallback callback,
- void * pContext);
-XAresult XANokiaVolumeExtItfImpl_SetCallbackEventsMask(XANokiaVolumeExtItf self, XAuint32 eventFlags );
-XAresult XANokiaVolumeExtItfImpl_GetCallbackEventsMask(XANokiaVolumeExtItf self, XAuint32 * pEventFlags);
+XAresult XANokiaVolumeExtItfImpl_GetStereoPosition(XANokiaVolumeExtItf self,
+ XApermille *pStereoPosition);
+
+XAresult XANokiaVolumeExtItfImpl_RegisterVolumeCallback(
+ XANokiaVolumeExtItf self, xaNokiaVolumeExtCallback callback,
+ void * pContext);
+XAresult XANokiaVolumeExtItfImpl_SetCallbackEventsMask(
+ XANokiaVolumeExtItf self, XAuint32 eventFlags);
+XAresult XANokiaVolumeExtItfImpl_GetCallbackEventsMask(
+ XANokiaVolumeExtItf self, XAuint32 * pEventFlags);
/* XANokiaVolumeExtItfImpl -specific methods */
-XANokiaVolumeExtItfImpl* XANokiaVolumeExtItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
+XANokiaVolumeExtItfImpl* XANokiaVolumeExtItfImpl_Create(
+ XAAdaptationBaseCtx *adapCtx);
void XANokiaVolumeExtItfImpl_Free(XANokiaVolumeExtItfImpl* self);
-void XANokiaVolumeExtItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
+void XANokiaVolumeExtItfImpl_AdaptCb(void *pHandlerCtx, XAAdaptEvent *event);
#endif /* XANVOLUMEEXTITF_H */
--- a/khronosfws/openmax_al/src/common/xaobjectitf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xaobjectitf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Object Interface Implementation
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
@@ -25,311 +25,305 @@
* Base interface XAObjectItf implementation
*/
XAresult XAObjectItfImpl_Realize(XAObjectItf self, XAboolean async)
-{
- XAObjectItfImpl* pObjImp = (XAObjectItfImpl*)(*self);
+ {
+ XAObjectItfImpl* pObjImp = (XAObjectItfImpl*) (*self);
XAresult retval = XA_RESULT_SUCCESS;
DEBUG_API("->XAObjectItfImpl_Realize");
- if( !pObjImp || pObjImp != pObjImp->self)
- {
+ if (!pObjImp || pObjImp != pObjImp->self)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAObjectItfImpl_Realize");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
- if( async )
- {
- /* invoke asynchronously */
- if( !pObjImp->callBack )
+ if (async)
{
+ /* invoke asynchronously */
+ if (!pObjImp->callBack)
+ {
retval = XA_RESULT_PARAMETER_INVALID;
- }
+ }
else
- {
+ {
/* check if another async operation is processed */
- if(pObjImp->asyncOngoing)
- {
+ if (pObjImp->asyncOngoing)
+ {
/* abort ongoing operation */
XAImpl_CancelThread(pObjImp->asyncThr);
- }
+ }
pObjImp->asyncOngoing = XA_BOOLEAN_TRUE;
- if(XAImpl_StartThread(pObjImp->asyncThr, NULL,
- XAObjectItfImpl_AsyncRealize,(void*)(self)))
- {
+ if (XAImpl_StartThread(pObjImp->asyncThr, NULL,
+ XAObjectItfImpl_AsyncRealize, (void*) (self)))
+ {
pObjImp->asyncOngoing = XA_BOOLEAN_FALSE;
retval = XA_RESULT_RESOURCE_ERROR;
- }
+ }
else
- {
+ {
retval = XA_RESULT_SUCCESS;
+ }
}
}
- }
else
- {
+ {
/* Check if the object is in unrealized state */
- if(pObjImp->state != XA_OBJECT_STATE_UNREALIZED)
- {
+ if (pObjImp->state != XA_OBJECT_STATE_UNREALIZED)
+ {
DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
DEBUG_API("<-XAObjectItfImpl_Realize");
return XA_RESULT_PRECONDITIONS_VIOLATED;
- }
+ }
/* invoke synchronously */
- if( pObjImp->DoRealizeImpl )
- {
+ if (pObjImp->DoRealizeImpl)
+ {
retval = pObjImp->DoRealizeImpl(self);
- }
+ }
+ }DEBUG_API("<-XAObjectItfImpl_Realize");
+ return retval;
}
- DEBUG_API("<-XAObjectItfImpl_Realize");
- return retval;
-}
XAresult XAObjectItfImpl_Resume(XAObjectItf self, XAboolean async)
-{
+ {
XAresult retval = XA_RESULT_SUCCESS;
- XAObjectItfImpl* pObjImp = (XAObjectItfImpl*)(*self);
+ XAObjectItfImpl* pObjImp = (XAObjectItfImpl*) (*self);
DEBUG_API("->XAObjectItfImpl_Resume");
- if( !pObjImp || pObjImp != pObjImp->self )
- {
+ if (!pObjImp || pObjImp != pObjImp->self)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAObjectItfImpl_Resume");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
- if( async )
- {
+ }
+ if (async)
+ {
/* invoke asynchronously */
- if( !pObjImp->callBack )
- {
+ if (!pObjImp->callBack)
+ {
retval = XA_RESULT_PARAMETER_INVALID;
- }
+ }
else
- {
+ {
/* check if another async operation is processed */
- if(pObjImp->asyncOngoing)
- {
+ if (pObjImp->asyncOngoing)
+ {
/* abort ongoing operation */
XAImpl_CancelThread(pObjImp->asyncThr);
- }
+ }
pObjImp->asyncOngoing = XA_BOOLEAN_TRUE;
- if(XAImpl_StartThread(pObjImp->asyncThr, NULL,
- XAObjectItfImpl_AsyncResume,(void*)(self)))
- {
+ if (XAImpl_StartThread(pObjImp->asyncThr, NULL,
+ XAObjectItfImpl_AsyncResume, (void*) (self)))
+ {
pObjImp->asyncOngoing = XA_BOOLEAN_FALSE;
retval = XA_RESULT_RESOURCE_ERROR;
- }
+ }
else
- {
+ {
retval = XA_RESULT_SUCCESS;
+ }
}
}
- }
else
- {
- /* invoke synchronously */
- if( pObjImp->DoResumeImpl )
{
+ /* invoke synchronously */
+ if (pObjImp->DoResumeImpl)
+ {
retval = pObjImp->DoResumeImpl(self);
- }
+ }
+ }DEBUG_API("<-XAObjectItfImpl_Resume");
+ return retval;
}
- DEBUG_API("<-XAObjectItfImpl_Resume");
- return retval;
-}
XAresult XAObjectItfImpl_GetState(XAObjectItf self, XAuint32 *pState)
-{
- XAObjectItfImpl* pObjImp = (XAObjectItfImpl*)(*self);
+ {
+ XAObjectItfImpl* pObjImp = (XAObjectItfImpl*) (*self);
DEBUG_API("->XAObjectItfImpl_GetState");
- if( !pObjImp || pObjImp != pObjImp->self || !pState )
- {
+ if (!pObjImp || pObjImp != pObjImp->self || !pState)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAObjectItfImpl_GetState");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pState = pObjImp->state;
DEBUG_API("<-XAObjectItfImpl_GetState");
return XA_RESULT_SUCCESS;
-}
+ }
-XAresult XAObjectItfImpl_GetInterface(XAObjectItf self, const XAInterfaceID iid,
- void *pInterface)
-{
- XAObjectItfImpl* pObjImp = (XAObjectItfImpl*)(*self);
+XAresult XAObjectItfImpl_GetInterface(XAObjectItf self,
+ const XAInterfaceID iid, void *pInterface)
+ {
+ XAObjectItfImpl* pObjImp = (XAObjectItfImpl*) (*self);
XAObjItfMapEntry *mapEntry = NULL;
DEBUG_API("->XAObjectItfImpl_GetInterface");
- if( !pObjImp || pObjImp != pObjImp->self || !pInterface || !iid )
- {
+ if (!pObjImp || pObjImp != pObjImp->self || !pInterface || !iid)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAObjectItfImpl_GetInterface");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
- if(pObjImp->state != XA_OBJECT_STATE_REALIZED)
- {
+ if (pObjImp->state != XA_OBJECT_STATE_REALIZED)
+ {
DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
DEBUG_API("<-XAObjectItfImpl_GetInterface");
/*state is not correct */
return XA_RESULT_PRECONDITIONS_VIOLATED;
- }
+ }
mapEntry = XAObjectItfImpl_GetItfEntry(self, iid);
- if( mapEntry && mapEntry->pItf )
- {
- *(void**)pInterface = &(mapEntry->pItf);
+ if (mapEntry && mapEntry->pItf)
+ {
+ *(void**) pInterface = &(mapEntry->pItf);
DEBUG_API("<-XAObjectItfImpl_GetInterface");
return XA_RESULT_SUCCESS;
- }
+ }
else
- {
+ {
DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
DEBUG_API("<-XAObjectItfImpl_GetInterface");
return XA_RESULT_FEATURE_UNSUPPORTED;
+ }
}
-}
-
XAresult XAObjectItfImpl_RegisterCallback(XAObjectItf self,
- xaObjectCallback callback,
- void *pContext)
-{
- XAObjectItfImpl* pObjImp = (XAObjectItfImpl*)(*self);
+ xaObjectCallback callback, void *pContext)
+ {
+ XAObjectItfImpl* pObjImp = (XAObjectItfImpl*) (*self);
DEBUG_API("->XAObjectItfImpl_RegisterCallback");
- if( !pObjImp || pObjImp != pObjImp->self )
- {
+ if (!pObjImp || pObjImp != pObjImp->self)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAObjectItfImpl_RegisterCallback");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
pObjImp->callBack = callback;
pObjImp->context = pContext;
pObjImp->cbPtrToSelf = self;
DEBUG_API("<-XAObjectItfImpl_RegisterCallback");
return XA_RESULT_SUCCESS;
-}
+ }
void XAObjectItfImpl_AbortAsyncOperation(XAObjectItf self)
-{
- XAObjectItfImpl* pObjImp = (XAObjectItfImpl*)(*self);
+ {
+ XAObjectItfImpl* pObjImp = (XAObjectItfImpl*) (*self);
DEBUG_API("->XAObjectItfImpl_AbortAsyncOperation");
- if( pObjImp &&
- (pObjImp == pObjImp->self) &&
- pObjImp->callBack &&
- pObjImp->asyncOngoing )
- {
+ if (pObjImp && (pObjImp == pObjImp->self) && pObjImp->callBack
+ && pObjImp->asyncOngoing)
+ {
/* abort ongoing operation */
XAImpl_CancelThread(pObjImp->asyncThr);
- }
+ }
DEBUG_API("<-XAObjectItfImpl_AbortAsyncOperation");
-}
+ }
void XAObjectItfImpl_Destroy(XAObjectItf self)
-{
- XAObjectItfImpl* pObjImp = (XAObjectItfImpl*)(*self);
+ {
+ XAObjectItfImpl* pObjImp = (XAObjectItfImpl*) (*self);
DEBUG_API("->XAObjectItfImpl_Destroy");
- if( pObjImp && pObjImp == pObjImp->self )
- {
- if( pObjImp->asyncOngoing )
+ if (pObjImp && pObjImp == pObjImp->self)
{
+ if (pObjImp->asyncOngoing)
+ {
/* abort ongoing operation */
XAImpl_CancelThread(pObjImp->asyncThr);
- }
+ }
/* free object specific resources */
- if( pObjImp->FreeResourcesImpl )
- {
+ if (pObjImp->FreeResourcesImpl)
+ {
pObjImp->FreeResourcesImpl(self);
- }
+ }
free(pObjImp->interfaceMap);
XAImpl_DeleteThreadHandle(pObjImp->asyncThr);
free(pObjImp);
- }
+ }
DEBUG_API("<-XAObjectItfImpl_Destroy");
-}
+ }
XAresult XAObjectItfImpl_SetPriority(XAObjectItf self, XAint32 priority,
- XAboolean preemptable)
-{
- XAObjectItfImpl* pObjImp = (XAObjectItfImpl*)(*self);
+ XAboolean preemptable)
+ {
+ XAObjectItfImpl* pObjImp = (XAObjectItfImpl*) (*self);
DEBUG_API("->XAObjectItfImpl_SetPriority");
- if( !pObjImp || pObjImp != pObjImp->self )
- {
+ if (!pObjImp || pObjImp != pObjImp->self)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAObjectItfImpl_SetPriority");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
pObjImp->priority = priority;
pObjImp->preemptable = preemptable;
DEBUG_API("<-XAObjectItfImpl_SetPriority");
return XA_RESULT_SUCCESS;
-}
+ }
XAresult XAObjectItfImpl_GetPriority(XAObjectItf self, XAint32 *pPriority,
- XAboolean *pPreemptable)
-{
- XAObjectItfImpl* pObjImp = (XAObjectItfImpl*)(*self);
+ XAboolean *pPreemptable)
+ {
+ XAObjectItfImpl* pObjImp = (XAObjectItfImpl*) (*self);
DEBUG_API("->XAObjectItfImpl_GetPriority");
- if( !pObjImp || pObjImp != pObjImp->self )
- {
+ if (!pObjImp || pObjImp != pObjImp->self)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAObjectItfImpl_GetPriority");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pPriority = pObjImp->priority;
*pPreemptable = pObjImp->preemptable;
DEBUG_API("<-XAObjectItfImpl_GetPriority");
return XA_RESULT_SUCCESS;
-}
+ }
XAresult XAObjectItfImpl_SetLossOfControlInterfaces(XAObjectItf self,
- XAint16 numInterfaces,
- XAInterfaceID *pInterfaceIDs,
- XAboolean enabled)
-{
- XAObjectItfImpl* pObjImp = (XAObjectItfImpl*)(*self);
+ XAint16 numInterfaces, XAInterfaceID *pInterfaceIDs,
+ XAboolean enabled)
+ {
+ XAObjectItfImpl* pObjImp = (XAObjectItfImpl*) (*self);
XAint32 itfIndex = 0;
XAObjItfMapEntry *mapEntry = NULL;
DEBUG_API("->XAObjectItfImpl_SetLossOfControlInterfaces");
- if( !pObjImp || pObjImp != pObjImp->self || !pInterfaceIDs )
- {
+ if (!pObjImp || pObjImp != pObjImp->self || !pInterfaceIDs)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAObjectItfImpl_SetLossOfControlInterfaces");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
- if( pInterfaceIDs )
- {
- for(itfIndex = 0; itfIndex < numInterfaces; itfIndex++)
+ }
+ if (pInterfaceIDs)
{
- mapEntry = XAObjectItfImpl_GetItfEntry(self, pInterfaceIDs[itfIndex]);
- if( mapEntry )
+ for (itfIndex = 0; itfIndex < numInterfaces; itfIndex++)
{
+ mapEntry = XAObjectItfImpl_GetItfEntry(self,
+ pInterfaceIDs[itfIndex]);
+ if (mapEntry)
+ {
mapEntry->locEnabled = enabled;
+ }
}
}
- }
DEBUG_API("<-XAObjectItfImpl_SetLossOfControlInterfaces");
return XA_RESULT_SUCCESS;
-}
+ }
/**
* XAObjectItfImpl -specific methods
@@ -338,43 +332,40 @@
/*
* Allocate and init new object itf instance
*/
-XAresult XAObjectItfImpl_Init(XAObjectItfImpl* self,
- XAuint32 itfCount,
- const XAInterfaceID** itfIIDs,
- xaDoRealizeImpl doRealizeImpl,
- xaDoResumeImpl doResumeImpl,
- xaFreeResourcesImpl freeResourcesImpl)
-{
+XAresult XAObjectItfImpl_Init(XAObjectItfImpl* self, XAuint32 itfCount,
+ const XAInterfaceID** itfIIDs, xaDoRealizeImpl doRealizeImpl,
+ xaDoResumeImpl doResumeImpl, xaFreeResourcesImpl freeResourcesImpl)
+ {
XAuint32 i = 0;
DEBUG_API("->XAObjectItfImpl_Init");
assert( self && itfIIDs && doRealizeImpl && doResumeImpl && freeResourcesImpl );
- self->interfaceMap =
- (XAObjItfMapEntry*)calloc(itfCount, sizeof(XAObjItfMapEntry));
- if( !self->interfaceMap )
- {
+ self->interfaceMap = (XAObjItfMapEntry*) calloc(itfCount,
+ sizeof(XAObjItfMapEntry));
+ if (!self->interfaceMap)
+ {
free(self);
DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
DEBUG_API("<-XAObjectItfImpl_Init");
return XA_RESULT_MEMORY_FAILURE;
- }
- if( XAImpl_CreateThreadHandle(&(self->asyncThr)) != XA_RESULT_SUCCESS )
- {
+ }
+ if (XAImpl_CreateThreadHandle(&(self->asyncThr)) != XA_RESULT_SUCCESS)
+ {
free(self);
DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
DEBUG_API("<-XAObjectItfImpl_Init");
return XA_RESULT_MEMORY_FAILURE;
- }
- for(i=0;i<itfCount;i++)
- {
+ }
+ for (i = 0; i < itfCount; i++)
+ {
self->interfaceMap[i].mapIdx = i;
self->interfaceMap[i].iid = *(itfIIDs[i]);
self->interfaceMap[i].pItf = NULL;
self->interfaceMap[i].locEnabled = XA_BOOLEAN_FALSE;
self->interfaceMap[i].required = XA_BOOLEAN_FALSE;
self->interfaceMap[i].isDynamic = XA_BOOLEAN_FALSE;
- }
+ }
self->interfaceMap[0].pItf = self;
self->interfaceMap[0].required = XA_BOOLEAN_TRUE;
@@ -401,111 +392,106 @@
self->itf.Destroy = XAObjectItfImpl_Destroy;
self->itf.SetPriority = XAObjectItfImpl_SetPriority;
self->itf.GetPriority = XAObjectItfImpl_GetPriority;
- self->itf.SetLossOfControlInterfaces = XAObjectItfImpl_SetLossOfControlInterfaces;
+ self->itf.SetLossOfControlInterfaces
+ = XAObjectItfImpl_SetLossOfControlInterfaces;
self->self = self;
DEBUG_API("<-XAObjectItfImpl_Init");
return XA_RESULT_SUCCESS;
-}
+ }
/*
* Asynchronous invocation of Realize
*/
void* XAObjectItfImpl_AsyncRealize(void* args)
-{
+ {
XAresult retval = XA_RESULT_SUCCESS;
- XAObjectItfImpl* pObjImp = (XAObjectItfImpl*)(*(XAObjectItf)(args));
+ XAObjectItfImpl* pObjImp = (XAObjectItfImpl*) (*(XAObjectItf) (args));
DEBUG_API("->XAObjectItfImpl_AsyncRealize");
- if( pObjImp && pObjImp == pObjImp->self)
- {
- /* Check if the object is in unrealized state */
- if(pObjImp->state != XA_OBJECT_STATE_UNREALIZED)
- {
- retval = XA_RESULT_PRECONDITIONS_VIOLATED;
- }
- else if( pObjImp->DoRealizeImpl )
+ if (pObjImp && pObjImp == pObjImp->self)
{
- retval = pObjImp->DoRealizeImpl((XAObjectItf)(args));
- }
- if( pObjImp->callBack )
- {
+ /* Check if the object is in unrealized state */
+ if (pObjImp->state != XA_OBJECT_STATE_UNREALIZED)
+ {
+ retval = XA_RESULT_PRECONDITIONS_VIOLATED;
+ }
+ else if (pObjImp->DoRealizeImpl)
+ {
+ retval = pObjImp->DoRealizeImpl((XAObjectItf) (args));
+ }
+ if (pObjImp->callBack)
+ {
pObjImp->callBack(pObjImp->cbPtrToSelf, pObjImp->context,
- XA_OBJECT_EVENT_ASYNC_TERMINATION,
- retval, pObjImp->state, NULL);
- }
+ XA_OBJECT_EVENT_ASYNC_TERMINATION, retval,
+ pObjImp->state, NULL);
+ }
pObjImp->asyncOngoing = XA_BOOLEAN_FALSE;
XAImpl_ExitThread(pObjImp->asyncThr);
- }
+ }
else
- {
+ {
DEBUG_API("XAObjectItfImpl_AsyncRealize: INVALID args");
- }
-
+ }
DEBUG_API("<-XAObjectItfImpl_AsyncRealize");
return NULL;
-}
-
+ }
/*
* Asynchronous invocation of Resume
*/
void* XAObjectItfImpl_AsyncResume(void* args)
-{
+ {
XAresult retval = XA_RESULT_SUCCESS;
- XAObjectItfImpl* pObjImp = (XAObjectItfImpl*)(*(XAObjectItf)(args));
+ XAObjectItfImpl* pObjImp = (XAObjectItfImpl*) (*(XAObjectItf) (args));
DEBUG_API("->XAObjectItfImpl_AsyncResume");
- if( pObjImp && pObjImp == pObjImp->self )
- {
- if( pObjImp->DoResumeImpl )
+ if (pObjImp && pObjImp == pObjImp->self)
{
- retval = pObjImp->DoResumeImpl((XAObjectItf)(args));
- }
- if( pObjImp->callBack )
- {
+ if (pObjImp->DoResumeImpl)
+ {
+ retval = pObjImp->DoResumeImpl((XAObjectItf) (args));
+ }
+ if (pObjImp->callBack)
+ {
pObjImp->callBack(pObjImp->cbPtrToSelf, pObjImp->context,
- XA_OBJECT_EVENT_ASYNC_TERMINATION,
- retval, pObjImp->state, NULL);
- }
+ XA_OBJECT_EVENT_ASYNC_TERMINATION, retval,
+ pObjImp->state, NULL);
+ }
pObjImp->asyncOngoing = XA_BOOLEAN_FALSE;
XAImpl_ExitThread(pObjImp->asyncThr);
- }
+ }
else
- {
+ {
DEBUG_API("XAObjectItfImpl_AsyncResume: INVALID args");
- }
-
+ }
DEBUG_API("<-XAObjectItfImpl_AsyncResume");
return NULL;
-}
+ }
XAObjItfMapEntry* XAObjectItfImpl_GetItfEntry(const XAObjectItf self,
- const XAInterfaceID iid)
-{
+ const XAInterfaceID iid)
+ {
XAuint32 mapIndex = 0;
- XAObjectItfImpl* pObjImp = (XAObjectItfImpl*)(*self);
+ XAObjectItfImpl* pObjImp = (XAObjectItfImpl*) (*self);
DEBUG_API("->XAObjectItfImpl_GetItfEntry");
- if( pObjImp &&
- (pObjImp == pObjImp->self) &&
- pObjImp->interfaceMap &&
- iid )
- {
+ if (pObjImp && (pObjImp == pObjImp->self) && pObjImp->interfaceMap && iid)
+ {
/* Check interface */
- for(mapIndex = 0; mapIndex < pObjImp->interfaceCount; mapIndex++)
- {
- if(XACommon_EqualIIds(pObjImp->interfaceMap[mapIndex].iid, iid))
+ for (mapIndex = 0; mapIndex < pObjImp->interfaceCount; mapIndex++)
{
+ if (XACommon_EqualIIds(pObjImp->interfaceMap[mapIndex].iid, iid))
+ {
DEBUG_API("<-XAObjectItfImpl_GetItfEntry");
return &(pObjImp->interfaceMap[mapIndex]);
+ }
}
}
- }
DEBUG_API("<-XAObjectItfImpl_GetItfEntry");
return NULL;
-}
+ }
--- a/khronosfws/openmax_al/src/common/xaobjectitf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xaobjectitf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
#ifndef XAOBJECTITF_H
#define XAOBJECTITF_H
@@ -34,18 +34,18 @@
/** STRUCTURES **/
typedef struct XAObjItfMapEntry_
-{
+ {
XAInterfaceID iid;
- XAuint8 mapIdx;
- void *pItf;
- XAboolean locEnabled;
- XAboolean required;
- XAboolean isDynamic;
-} XAObjItfMapEntry;
+ XAuint8 mapIdx;
+ void *pItf;
+ XAboolean locEnabled;
+ XAboolean required;
+ XAboolean isDynamic;
+ } XAObjItfMapEntry;
/* Definition of XAObjectItf implementation */
typedef struct XAObjectItfImpl_
-{
+ {
/* parent interface */
struct XAObjectItf_ itf;
/* pointer to self */
@@ -72,8 +72,7 @@
xaDoRealizeImpl DoRealizeImpl;
xaDoResumeImpl DoResumeImpl;
xaFreeResourcesImpl FreeResourcesImpl;
-} XAObjectItfImpl;
-
+ } XAObjectItfImpl;
/** METHODS **/
@@ -85,43 +84,37 @@
XAresult XAObjectItfImpl_GetState(XAObjectItf self, XAuint32 *pState);
XAresult XAObjectItfImpl_GetInterface(XAObjectItf self,
- const XAInterfaceID iid,
- void *pInterface);
+ const XAInterfaceID iid, void *pInterface);
XAresult XAObjectItfImpl_RegisterCallback(XAObjectItf self,
- xaObjectCallback callback,
- void *pContext);
+ xaObjectCallback callback, void *pContext);
void XAObjectItfImpl_AbortAsyncOperation(XAObjectItf self);
void XAObjectItfImpl_Destroy(XAObjectItf self);
XAresult XAObjectItfImpl_SetPriority(XAObjectItf self, XAint32 priority,
- XAboolean preemptable);
+ XAboolean preemptable);
XAresult XAObjectItfImpl_GetPriority(XAObjectItf self, XAint32 *pPriority,
- XAboolean *pPreemptable);
+ XAboolean *pPreemptable);
XAresult XAObjectItfImpl_SetLossOfControlInterfaces(XAObjectItf self,
- XAint16 numInterfaces,
- XAInterfaceID *pInterfaceIDs,
- XAboolean enabled);
+ XAint16 numInterfaces, XAInterfaceID *pInterfaceIDs,
+ XAboolean enabled);
/* XAObjectItfImpl -specific methods */
/* Allocate and initialize base object */
-XAresult XAObjectItfImpl_Init(XAObjectItfImpl* self,
- XAuint32 itfCount,
- const XAInterfaceID** itfIIDs,
- xaDoRealizeImpl doRealizeImpl,
- xaDoResumeImpl doResumeImpl,
- xaFreeResourcesImpl freeResourcesImpl);
+XAresult XAObjectItfImpl_Init(XAObjectItfImpl* self, XAuint32 itfCount,
+ const XAInterfaceID** itfIIDs, xaDoRealizeImpl doRealizeImpl,
+ xaDoResumeImpl doResumeImpl, xaFreeResourcesImpl freeResourcesImpl);
/* methods for asynchronous service */
void* XAObjectItfImpl_AsyncRealize(void* args);
void* XAObjectItfImpl_AsyncResume(void* args);
XAObjItfMapEntry* XAObjectItfImpl_GetItfEntry(const XAObjectItf self,
- const XAInterfaceID iid);
+ const XAInterfaceID iid);
#endif /* XAOBJECTITF_H */
--- a/khronosfws/openmax_al/src/common/xaobjects.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xaobjects.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Entry Point Functions to Create AL Objects
+ *
+ */
/*All global definitions and declarations here */
#ifndef XAOBJECTS_H
@@ -28,151 +28,137 @@
* GLOBAL METHODS
*/
-
/*
* Engine
*/
-XAresult XAEngineImpl_Create(XAObjectItf *pEngine,
- XAuint32 numOptions,
- const XAEngineOption *pEngineOptions,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired);
+XAresult XAEngineImpl_Create(XAObjectItf *pEngine, XAuint32 numOptions,
+ const XAEngineOption *pEngineOptions, XAuint32 numInterfaces,
+ const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired);
-XAresult XAEngineImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
+XAresult XAEngineImpl_QueryNumSupportedInterfaces(
+ XAuint32 *pNumSupportedInterfaces);
XAresult XAEngineImpl_QuerySupportedInterfaces(XAuint32 index,
- XAInterfaceID *pInterfaceId);
+ XAInterfaceID *pInterfaceId);
/*
* Media Player
*/
-XAresult XAMediaPlayerImpl_CreateMediaPlayer( FrameworkMap* mapper,
- XACapabilities* capabilities,
- XAObjectItf *pPlayer,
- XADataSource *pDataSrc,
- XADataSource *pBankSrc,
- XADataSink *pAudioSnk,
- XADataSink *pImageVideoSnk,
- XADataSink *pVibra,
- XADataSink *pLEDArray,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired);
+XAresult XAMediaPlayerImpl_CreateMediaPlayer(FrameworkMap* mapper,
+ XACapabilities* capabilities, XAObjectItf *pPlayer,
+ XADataSource *pDataSrc, XADataSource *pBankSrc,
+ XADataSink *pAudioSnk, XADataSink *pImageVideoSnk,
+ XADataSink *pVibra, XADataSink *pLEDArray, XAuint32 numInterfaces,
+ const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired);
-XAresult XAMediaPlayerImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
+XAresult XAMediaPlayerImpl_QueryNumSupportedInterfaces(
+ XAuint32 *pNumSupportedInterfaces);
XAresult XAMediaPlayerImpl_QuerySupportedInterfaces(XAuint32 index,
- XAInterfaceID *pInterfaceId);
+ XAInterfaceID *pInterfaceId);
/*
* Metadata Extractor
*/
-XAresult XAMetadataExtractorImpl_Create( FrameworkMap* mapper,
- XACapabilities* capabilities,
- XAObjectItf *pMetadataExtractor,
- XADataSource *pDataSource,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired );
+XAresult XAMetadataExtractorImpl_Create(FrameworkMap* mapper,
+ XACapabilities* capabilities, XAObjectItf *pMetadataExtractor,
+ XADataSource *pDataSource, XAuint32 numInterfaces,
+ const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired);
-XAresult XAMetadataExtractorImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
+XAresult XAMetadataExtractorImpl_QueryNumSupportedInterfaces(
+ XAuint32 *pNumSupportedInterfaces);
XAresult XAMetadataExtractorImpl_QuerySupportedInterfaces(XAuint32 index,
- XAInterfaceID *pInterfaceId);
+ XAInterfaceID *pInterfaceId);
/*
* Output Mix
*/
-XAresult XAOMixImpl_CreateOutputMix( FrameworkMap* mapper,
- XACapabilities* capabilities,
- XAObjectItf *pMix,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired );
+XAresult XAOMixImpl_CreateOutputMix(FrameworkMap* mapper,
+ XACapabilities* capabilities, XAObjectItf *pMix,
+ XAuint32 numInterfaces, const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired);
-XAresult XAOMixImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
+XAresult XAOMixImpl_QueryNumSupportedInterfaces(
+ XAuint32 *pNumSupportedInterfaces);
XAresult XAOMixImpl_QuerySupportedInterfaces(XAuint32 index,
- XAInterfaceID *pInterfaceId);
+ XAInterfaceID *pInterfaceId);
/*
* Media Recorder
*/
XAresult XAMediaRecorderImpl_CreateMediaRecorder(FrameworkMap* mapper,
- XACapabilities* capabilities,
- XAObjectItf* pRecorder,
- XADataSource* pAudioSrc,
- XADataSource* pImageVideoSrc,
- XADataSink* pDataSnk,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired);
+ XACapabilities* capabilities, XAObjectItf* pRecorder,
+ XADataSource* pAudioSrc, XADataSource* pImageVideoSrc,
+ XADataSink* pDataSnk, XAuint32 numInterfaces,
+ const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired);
-XAresult XAMediaRecorderImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
+XAresult XAMediaRecorderImpl_QueryNumSupportedInterfaces(
+ XAuint32 *pNumSupportedInterfaces);
XAresult XAMediaRecorderImpl_QuerySupportedInterfaces(XAuint32 index,
- XAInterfaceID *pInterfaceId);
+ XAInterfaceID *pInterfaceId);
/*
* Camera Device
*/
-XAresult XACameraDeviceImpl_CreateCameraDevice( FrameworkMap* mapper,
- XACapabilities* capabilities,
- XAObjectItf* pDevice,
- XAuint32 deviceID,
- XAuint32 numInterfaces,
- const XAInterfaceID * pInterfaceIds,
- const XAboolean * pInterfaceRequired);
+XAresult XACameraDeviceImpl_CreateCameraDevice(FrameworkMap* mapper,
+ XACapabilities* capabilities, XAObjectItf* pDevice,
+ XAuint32 deviceID, XAuint32 numInterfaces,
+ const XAInterfaceID * pInterfaceIds,
+ const XAboolean * pInterfaceRequired);
-XAresult XACameraDeviceImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
+XAresult XACameraDeviceImpl_QueryNumSupportedInterfaces(
+ XAuint32 *pNumSupportedInterfaces);
XAresult XACameraDeviceImpl_QuerySupportedInterfaces(XAuint32 index,
- XAInterfaceID *pInterfaceId);
+ XAInterfaceID *pInterfaceId);
/*
* Radio Device
*/
-XAresult XARadioDeviceImpl_CreateRadioDevice( FrameworkMap* mapper,
- XAObjectItf* pDevice,
- XAuint32 numInterfaces,
- const XAInterfaceID * pInterfaceIds,
- const XAboolean * pInterfaceRequired);
+XAresult XARadioDeviceImpl_CreateRadioDevice( /*FrameworkMap* mapper,*/
+XAObjectItf* pDevice, XAuint32 numInterfaces,
+ const XAInterfaceID * pInterfaceIds,
+ const XAboolean * pInterfaceRequired);
-XAresult XARadioDeviceImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
+XAresult XARadioDeviceImpl_QueryNumSupportedInterfaces(
+ XAuint32 *pNumSupportedInterfaces);
XAresult XARadioDeviceImpl_QuerySupportedInterfaces(XAuint32 index,
- XAInterfaceID *pInterfaceId);
+ XAInterfaceID *pInterfaceId);
/*
* Vibra Device
*/
-XAresult XAVibraDeviceImpl_CreateVibraDevice( FrameworkMap* mapper,
- XAObjectItf* pDevice,
- XAuint32 deviceID,
- XAuint32 numInterfaces,
- const XAInterfaceID * pInterfaceIds,
- const XAboolean * pInterfaceRequired);
+XAresult XAVibraDeviceImpl_CreateVibraDevice(FrameworkMap* mapper,
+ XAObjectItf* pDevice, XAuint32 deviceID, XAuint32 numInterfaces,
+ const XAInterfaceID * pInterfaceIds,
+ const XAboolean * pInterfaceRequired);
-XAresult XAVibraDeviceImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
+XAresult XAVibraDeviceImpl_QueryNumSupportedInterfaces(
+ XAuint32 *pNumSupportedInterfaces);
XAresult XAVibraDeviceImpl_QuerySupportedInterfaces(XAuint32 index,
- XAInterfaceID *pInterfaceId);
+ XAInterfaceID *pInterfaceId);
/*
* LED Array
*/
-XAresult XALEDArrayDeviceImpl_CreateLEDArrayDevice( FrameworkMap* mapper,
- XAObjectItf* pDevice,
- XAuint32 deviceID,
- XAuint32 numInterfaces,
- const XAInterfaceID * pInterfaceIds,
- const XAboolean * pInterfaceRequired);
+XAresult XALEDArrayDeviceImpl_CreateLEDArrayDevice(FrameworkMap* mapper,
+ XAObjectItf* pDevice, XAuint32 deviceID, XAuint32 numInterfaces,
+ const XAInterfaceID * pInterfaceIds,
+ const XAboolean * pInterfaceRequired);
-XAresult XALEDArrayDeviceImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces);
+XAresult XALEDArrayDeviceImpl_QueryNumSupportedInterfaces(
+ XAuint32 *pNumSupportedInterfaces);
XAresult XALEDArrayDeviceImpl_QuerySupportedInterfaces(XAuint32 index,
- XAInterfaceID *pInterfaceId);
-
+ XAInterfaceID *pInterfaceId);
#endif /*XAOBJECTS_H */
--- a/khronosfws/openmax_al/src/common/xaplatform.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xaplatform.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Platform Specific Utility Functions
+ *
+ */
#include <pthread.h>
#include <semaphore.h>
@@ -24,8 +24,6 @@
#include "xaplatform.h"
-
-
/** MACROS **/
/**********************************************************************
@@ -35,21 +33,21 @@
#undef _MUTEXERRORSUPPORT
#ifdef _MUTEXERRORSUPPORT
- typedef pthread_mutex_t XA_MTX;
+typedef pthread_mutex_t XA_MTX;
#else
- typedef struct
+typedef struct
{
- pthread_mutex_t mutex;
- pthread_t owner;
+ pthread_mutex_t mutex;
+ pthread_t owner;
} XA_MTX;
#endif
-XAresult XAImpl_CreateMutex( XAImplMutexHandle *mtx )
-{
- XA_MTX *pMtx = (XA_MTX *)malloc(sizeof(XA_MTX));
+XAresult XAImpl_CreateMutex(XAImplMutexHandle *mtx)
+ {
+ XA_MTX *pMtx = (XA_MTX *) malloc(sizeof(XA_MTX));
assert(mtx);
- if( pMtx )
- {
+ if (pMtx)
+ {
pthread_mutexattr_t *pAttr = NULL;
#ifdef _MUTEXERRORSUPPORT
pthread_mutexattr_t attr;
@@ -58,46 +56,44 @@
pthread_mutexattr_settype(pAttr, PTHREAD_MUTEX_ERRORCHECK);
if(pthread_mutex_init(pMtx, pAttr))
#else
- if(pthread_mutex_init(&(pMtx->mutex), pAttr))
+ if (pthread_mutex_init(&(pMtx->mutex), pAttr))
#endif
- {
+ {
free(pMtx);
*mtx = NULL;
return XA_RESULT_INTERNAL_ERROR;
- }
- *mtx = (XAImplMutexHandle)pMtx;
+ }
+ *mtx = (XAImplMutexHandle) pMtx;
return XA_RESULT_SUCCESS;
- }
+ }
else
- {
+ {
return XA_RESULT_MEMORY_FAILURE;
+ }
}
-}
-
-XAresult XAImpl_LockMutex( XAImplMutexHandle mtx )
-{
- XA_MTX *pMtx = (XA_MTX*)mtx;
+XAresult XAImpl_LockMutex(XAImplMutexHandle mtx)
+ {
+ XA_MTX *pMtx = (XA_MTX*) mtx;
assert(pMtx);
#ifdef _MUTEXERRORSUPPORT
if(pthread_mutex_lock(pMtx))
- {
+ {
return XA_RESULT_PRECONDITIONS_VIOLATED;
- }
+ }
#else
- if( pthread_self() == pMtx->owner ||
- pthread_mutex_unlock(&(pMtx->mutex)) )
- {
+ if (pthread_self() == pMtx->owner || pthread_mutex_unlock(&(pMtx->mutex)))
+ {
return XA_RESULT_PRECONDITIONS_VIOLATED;
- }
+ }
pMtx->owner = pthread_self();
#endif
return XA_RESULT_SUCCESS;
-}
+ }
-XAresult XAImpl_TryLockMutex( XAImplMutexHandle mtx )
-{
- XA_MTX *pMtx = (XA_MTX*)mtx;
+XAresult XAImpl_TryLockMutex(XAImplMutexHandle mtx)
+ {
+ XA_MTX *pMtx = (XA_MTX*) mtx;
XAint32 mutexRet;
XAresult ret = XA_RESULT_SUCCESS;
assert(pMtx);
@@ -105,179 +101,176 @@
#ifdef _MUTEXERRORSUPPORT
mutexRet = pthread_ mutex_trylock(pMtx);
switch (mutexRet)
- {
- case EBUSY:
+ {
+ case EBUSY:
/* if mutex is already locked, return permission denied */
- ret = XA_RESULT_PERMISSION_DENIED;
+ ret = XA_RESULT_PERMISSION_DENIED;
break;
- case 0:
- ret = XA_RESULT_SUCCESS;
+ case 0:
+ ret = XA_RESULT_SUCCESS;
break;
- default:
+ default:
ret = XA_RESULT_PRECONDITIONS_VIOLATED;
break;
- }
+ }
#else
- if( pthread_self() == pMtx->owner )
- {
+ if (pthread_self() == pMtx->owner)
+ {
return XA_RESULT_PRECONDITIONS_VIOLATED;
- }
+ }
mutexRet = pthread_mutex_trylock(&(pMtx->mutex));
switch (mutexRet)
- {
- case EBUSY:
- /* if mutex is already locked, return permission denied */
- ret = XA_RESULT_PERMISSION_DENIED;
- break;
- case 0:
- pMtx->owner = pthread_self();
- ret = XA_RESULT_SUCCESS;
- break;
- default:
- ret = XA_RESULT_PRECONDITIONS_VIOLATED;
- break;
- }
+ {
+ case EBUSY:
+ /* if mutex is already locked, return permission denied */
+ ret = XA_RESULT_PERMISSION_DENIED;
+ break;
+ case 0:
+ pMtx->owner = pthread_self();
+ ret = XA_RESULT_SUCCESS;
+ break;
+ default:
+ ret = XA_RESULT_PRECONDITIONS_VIOLATED;
+ break;
+ }
#endif
return ret;
-}
-
+ }
-XAresult XAImpl_UnlockMutex( XAImplMutexHandle mtx )
-{
- XA_MTX *pMtx = (XA_MTX*)mtx;
+XAresult XAImpl_UnlockMutex(XAImplMutexHandle mtx)
+ {
+ XA_MTX *pMtx = (XA_MTX*) mtx;
assert(pMtx);
#ifdef _MUTEXERRORSUPPORT
if(pthread_mutex_lock(pMtx))
- {
+ {
return XA_RESULT_PRECONDITIONS_VIOLATED;
- }
+ }
#else
- if( pthread_self() != pMtx->owner ||
- pthread_mutex_unlock(&(pMtx->mutex)) )
- {
+ if (pthread_self() != pMtx->owner || pthread_mutex_unlock(&(pMtx->mutex)))
+ {
return XA_RESULT_PRECONDITIONS_VIOLATED;
- }
+ }
// Changing the below value to 0 since owner is an unsigned int.
// pMtx->owner = -1;
pMtx->owner = 0;
#endif
return XA_RESULT_SUCCESS;
-}
+ }
-void XAImpl_DeleteMutex( XAImplMutexHandle mtx )
-{
- XA_MTX *pMtx = (XA_MTX*)mtx;
- if( pMtx )
+void XAImpl_DeleteMutex(XAImplMutexHandle mtx)
{
+ XA_MTX *pMtx = (XA_MTX*) mtx;
+ if (pMtx)
+ {
#ifdef _MUTEXERRORSUPPORT
pthread_mutex_destroy(pMtx);
#else
pthread_mutex_destroy(&(pMtx->mutex));
#endif
free(pMtx);
+ }
}
-}
/**********************************************************************
* semaphores
**********************************************************************/
-
-XAresult XAImpl_CreateSemaphore( XAImplSemHandle *sem )
-{
- sem_t *pSem = (sem_t*)malloc(sizeof(sem_t));
+XAresult XAImpl_CreateSemaphore(XAImplSemHandle *sem)
+ {
+ sem_t *pSem = (sem_t*) malloc(sizeof(sem_t));
assert(sem);
- if( pSem )
- {
- if(sem_init(pSem,0,0))
+ if (pSem)
{
+ if (sem_init(pSem, 0, 0))
+ {
free(pSem);
*sem = NULL;
return XA_RESULT_INTERNAL_ERROR;
- }
- *sem = (XAImplSemHandle)pSem;
+ }
+ *sem = (XAImplSemHandle) pSem;
return XA_RESULT_SUCCESS;
- }
+ }
else
- {
+ {
return XA_RESULT_MEMORY_FAILURE;
+ }
}
-}
-XAresult XAImpl_WaitSemaphore( XAImplSemHandle sem )
-{
- sem_t* pSem = (sem_t*)sem;
+XAresult XAImpl_WaitSemaphore(XAImplSemHandle sem)
+ {
+ sem_t* pSem = (sem_t*) sem;
assert(pSem);
sem_wait(pSem);
return XA_RESULT_SUCCESS;
-}
+ }
-XAresult XAImpl_PostSemaphore( XAImplSemHandle sem )
-{
- sem_t *pSem = (sem_t*)sem;
+XAresult XAImpl_PostSemaphore(XAImplSemHandle sem)
+ {
+ sem_t *pSem = (sem_t*) sem;
assert(pSem);
sem_post(pSem);
return XA_RESULT_SUCCESS;
-}
+ }
-void XAImpl_DeleteSemaphore( XAImplSemHandle sem )
-{
- sem_t *pSem = (sem_t*)sem;
- if( pSem )
+void XAImpl_DeleteSemaphore(XAImplSemHandle sem)
{
+ sem_t *pSem = (sem_t*) sem;
+ if (pSem)
+ {
sem_destroy(pSem);
free(pSem);
+ }
}
-}
/**********************************************************************
* THREADS
**********************************************************************/
-XAresult XAImpl_CreateThreadHandle( XAImplThreadHandle *thd )
-{
- pthread_t *pThd = (pthread_t*)malloc(sizeof(pthread_t));
+XAresult XAImpl_CreateThreadHandle(XAImplThreadHandle *thd)
+ {
+ pthread_t *pThd = (pthread_t*) malloc(sizeof(pthread_t));
assert(thd);
- if( !pThd )
- {
+ if (!pThd)
+ {
return XA_RESULT_MEMORY_FAILURE;
- }
- *thd = (XAImplThreadHandle)pThd;
+ }
+ *thd = (XAImplThreadHandle) pThd;
return XA_RESULT_SUCCESS;
-}
+ }
-XAresult XAImpl_StartThread( XAImplThreadHandle thd,
- void *thdattrib, XAImplThreadFunction thdfunc, void* thdfuncargs )
-{
- pthread_t *pThd = (pthread_t*)thd;
+XAresult XAImpl_StartThread(XAImplThreadHandle thd, void *thdattrib,
+ XAImplThreadFunction thdfunc, void* thdfuncargs)
+ {
+ pthread_t *pThd = (pthread_t*) thd;
assert(thd);
- if ( pthread_create(pThd, thdattrib, thdfunc, thdfuncargs) )
- {
+ if (pthread_create(pThd, thdattrib, thdfunc, thdfuncargs))
+ {
return XA_RESULT_INTERNAL_ERROR;
- }
+ }
return XA_RESULT_SUCCESS;
-}
+ }
-void XAImpl_CancelThread( XAImplThreadHandle thd )
-{
-// int res;
- // TL: TODO: There is no pthread_cancel API in S60, need to replace
- //res = pthread_cancel(*pThd);
-
-}
+void XAImpl_CancelThread(XAImplThreadHandle thd)
+ {
+ // int res;
+ // TL: TODO: There is no pthread_cancel API in S60, need to replace
+ //res = pthread_cancel(*pThd);
+
+ }
-void XAImpl_ExitThread( XAImplThreadHandle thd )
-{
+void XAImpl_ExitThread(XAImplThreadHandle thd)
+ {
pthread_exit(NULL);
-}
+ }
-void XAImpl_DeleteThreadHandle( XAImplThreadHandle thd )
-{
- pthread_t *pThd = (pthread_t*)thd;
- if( pThd )
+void XAImpl_DeleteThreadHandle(XAImplThreadHandle thd)
{
+ pthread_t *pThd = (pthread_t*) thd;
+ if (pThd)
+ {
free(pThd);
+ }
}
-}
--- a/khronosfws/openmax_al/src/common/xaplatform.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xaplatform.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Platform Specfic Header File
+ *
+ */
#ifndef XAPLATFORM_H
#define XAPLATFORM_H
@@ -28,33 +28,30 @@
typedef void* XAImplMutexHandle;
typedef void* XAImplSemHandle;
typedef void* XAImplThreadHandle;
-typedef void* (* XAImplThreadFunction)(
- void *xaThdFunAargs
-);
+typedef void* (* XAImplThreadFunction)(void *xaThdFunAargs);
/** METHODS **/
/* mutex management */
-XAresult XAImpl_CreateMutex( XAImplMutexHandle *mtx );
-XAresult XAImpl_TryLockMutex( XAImplMutexHandle mtx );
-XAresult XAImpl_LockMutex( XAImplMutexHandle mtx );
-XAresult XAImpl_UnlockMutex( XAImplMutexHandle mtx );
-void XAImpl_DeleteMutex( XAImplMutexHandle mtx );
+XAresult XAImpl_CreateMutex(XAImplMutexHandle *mtx);
+XAresult XAImpl_TryLockMutex(XAImplMutexHandle mtx);
+XAresult XAImpl_LockMutex(XAImplMutexHandle mtx);
+XAresult XAImpl_UnlockMutex(XAImplMutexHandle mtx);
+void XAImpl_DeleteMutex(XAImplMutexHandle mtx);
/* semaphores */
-XAresult XAImpl_CreateSemaphore( XAImplSemHandle *sem );
-XAresult XAImpl_WaitSemaphore( XAImplSemHandle sem );
-XAresult XAImpl_PostSemaphore( XAImplSemHandle sem );
-void XAImpl_DeleteSemaphore( XAImplSemHandle sem );
+XAresult XAImpl_CreateSemaphore(XAImplSemHandle *sem);
+XAresult XAImpl_WaitSemaphore(XAImplSemHandle sem);
+XAresult XAImpl_PostSemaphore(XAImplSemHandle sem);
+void XAImpl_DeleteSemaphore(XAImplSemHandle sem);
/* thread management */
-XAresult XAImpl_CreateThreadHandle( XAImplThreadHandle *thd );
-XAresult XAImpl_StartThread( XAImplThreadHandle thd,
- void *thdattrib,
- XAImplThreadFunction thdfunc, void *thdfuncargs );
-void XAImpl_CancelThread( XAImplThreadHandle thd );
-void XAImpl_ExitThread( XAImplThreadHandle thd );
-void XAImpl_DeleteThreadHandle( XAImplThreadHandle thd );
+XAresult XAImpl_CreateThreadHandle(XAImplThreadHandle *thd);
+XAresult XAImpl_StartThread(XAImplThreadHandle thd, void *thdattrib,
+ XAImplThreadFunction thdfunc, void *thdfuncargs);
+void XAImpl_CancelThread(XAImplThreadHandle thd);
+void XAImpl_ExitThread(XAImplThreadHandle thd);
+void XAImpl_DeleteThreadHandle(XAImplThreadHandle thd);
#endif /* XAPLATFORM_H */
--- a/khronosfws/openmax_al/src/common/xastreaminformationitf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xastreaminformationitf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,20 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Stream Information Interface Implementation
+ *
+ */
#include <assert.h>
@@ -26,248 +25,223 @@
* Description: Validate interface pointer and cast it to implementation pointer.
*/
static XAStreamInformationItfImpl* GetImpl(XAStreamInformationItf self)
-{
- if(self)
{
- XAStreamInformationItfImpl* impl = (XAStreamInformationItfImpl*)(*self);
- if(impl && impl == impl->self)
+ if (self)
{
+ XAStreamInformationItfImpl* impl =
+ (XAStreamInformationItfImpl*) (*self);
+ if (impl && impl == impl->self)
+ {
return impl;
+ }
}
+ return NULL;
}
- return NULL;
-}
/**
* Base interface XAPlayItf implementation
*/
-
XAresult XAStreamInformationItfImpl_QueryMediaContainerInformation(
- XAStreamInformationItf self,
- XAMediaContainerInformation * info)
-{
+ XAStreamInformationItf self, XAMediaContainerInformation * info)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAStreamInformationItfImpl* impl = GetImpl(self);
DEBUG_API("->XAStreamInformationItfImpl_QueryMediaContainerInformation");
- if(!impl || !info)
- {
+ if (!impl || !info || !impl->adapCtx)
+ {
/* invalid parameter */
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("-<XAStreamInformationItfImpl_QueryMediaContainerInformation");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
-
- if(impl->adapCtx->fwtype == FWMgrFWGST)
+ if (impl->adapCtx->fwtype == FWMgrFWGST)
{
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID )
- {
+ if (ret == XA_RESULT_PARAMETER_INVALID)
+ {
DEBUG_API("<-XAStreamInformationItfImpl_QueryMediaContainerInformation");
return ret;
- }
+ }
ret = XAStreamInformationItfAdapt_QueryMediaContainerInformation(
- impl->adapCtx,
- &(info->containerType),
- &(info->mediaDuration),
- &(info->numStreams));
+ impl->adapCtx, &(info->containerType),
+ &(info->mediaDuration), &(info->numStreams));
XAAdaptationBase_ThreadExit(impl->adapCtx);
}
else
{
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID )
- {
+ if (ret == XA_RESULT_PARAMETER_INVALID)
+ {
DEBUG_API("<-XAStreamInformationItfImpl_QueryMediaContainerInformation");
return ret;
- }
+ }
ret = XAStreamInformationItfAdaptMMF_QueryMediaContainerInformation(
- impl->adapCtx,
- &(info->containerType),
- &(info->mediaDuration),
- &(info->numStreams));
- XAAdaptationBase_ThreadExit(impl->adapCtx);;
+ impl->adapCtx, &(info->containerType),
+ &(info->mediaDuration), &(info->numStreams));
+ XAAdaptationBase_ThreadExit(impl->adapCtx);
+ ;
}
DEBUG_API("-<XAStreamInformationItfImpl_QueryMediaContainerInformation");
return ret;
-}
+ }
XAresult XAStreamInformationItfImpl_QueryStreamType(
- XAStreamInformationItf self,
- XAuint32 streamIndex,
- XAuint32 *domain)
-{
+ XAStreamInformationItf self, XAuint32 streamIndex, XAuint32 *domain)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAStreamInformationItfImpl* impl = GetImpl(self);
DEBUG_API("->XAStreamInformationItfImpl_QueryStreamType");
- if(!impl || !domain || (streamIndex == 0))
- {
+ if (!impl || !domain || (streamIndex == 0) || !impl->adapCtx)
+ {
/* invalid parameter */
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("-<XAStreamInformationItfImpl_QueryStreamType");
return XA_RESULT_PARAMETER_INVALID;
- }
- if(impl->adapCtx->fwtype == FWMgrFWGST)
+ }
+ if (impl->adapCtx->fwtype == FWMgrFWGST)
{
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID )
- {
+ if (ret == XA_RESULT_PARAMETER_INVALID)
+ {
DEBUG_API("<-XAStreamInformationItfImpl_QueryStreamType");
return ret;
- }
-
- ret = XAStreamInformationItfAdapt_QueryStreamType(
- impl->adapCtx,
- streamIndex,
- domain);
-
+ }
+
+ ret = XAStreamInformationItfAdapt_QueryStreamType(impl->adapCtx,
+ streamIndex, domain);
+
XAAdaptationBase_ThreadExit(impl->adapCtx);
}
else
{
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID )
- {
+ if (ret == XA_RESULT_PARAMETER_INVALID)
+ {
DEBUG_API("<-XAStreamInformationItfImpl_QueryStreamType");
return ret;
- }
-
- ret = XAStreamInformationItfAdaptMMF_QueryStreamType(
- impl->adapCtx,
- streamIndex,
- domain);
-
- XAAdaptationBase_ThreadExit(impl->adapCtx);;
- }
- DEBUG_API("-<XAStreamInformationItfImpl_QueryStreamType");
+ }
+
+ ret = XAStreamInformationItfAdaptMMF_QueryStreamType(impl->adapCtx,
+ streamIndex, domain);
+
+ XAAdaptationBase_ThreadExit(impl->adapCtx);
+ ;
+ }DEBUG_API("-<XAStreamInformationItfImpl_QueryStreamType");
return ret;
-}
+ }
XAresult XAStreamInformationItfImpl_QueryStreamInformation(
- XAStreamInformationItf self,
- XAuint32 streamIndex,
- void * info)
-{
+ XAStreamInformationItf self, XAuint32 streamIndex, void * info)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAStreamInformationItfImpl* impl = GetImpl(self);
DEBUG_API("->XAStreamInformationItfImpl_QueryStreamInformation");
- if(!impl || !info || (streamIndex == 0))
- {
+ if (!impl || !info || (streamIndex == 0) || !impl->adapCtx)
+ {
/* invalid parameter */
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("-<XAStreamInformationItfImpl_QueryStreamInformation");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
- if(impl->adapCtx->fwtype == FWMgrFWGST)
+ if (impl->adapCtx->fwtype == FWMgrFWGST)
{
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID )
- {
+ if (ret == XA_RESULT_PARAMETER_INVALID)
+ {
DEBUG_API("<-XAStreamInformationItfImpl_QueryStreamInformation");
return ret;
- }
-
+ }
+
ret = XAStreamInformationItfAdapt_QueryStreamInformation(
- impl->adapCtx,
- streamIndex,
- info);
-
+ impl->adapCtx, streamIndex, info);
+
XAAdaptationBase_ThreadExit(impl->adapCtx);
}
else
{
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID )
- {
+ if (ret == XA_RESULT_PARAMETER_INVALID)
+ {
DEBUG_API("<-XAStreamInformationItfImpl_QueryStreamInformation");
return ret;
- }
-
+ }
+
ret = XAStreamInformationItfAdaptMMF_QueryStreamInformation(
- impl->adapCtx,
- streamIndex,
- info);
-
- XAAdaptationBase_ThreadExit(impl->adapCtx);;
+ impl->adapCtx, streamIndex, info);
+
+ XAAdaptationBase_ThreadExit(impl->adapCtx);
+ ;
}
DEBUG_API("-<XAStreamInformationItfImpl_QueryStreamInformation");
return ret;
-}
+ }
XAresult XAStreamInformationItfImpl_QueryStreamName(
- XAStreamInformationItf self,
- XAuint32 streamIndex,
- XAuint16 * pNameSize,
- XAchar * pName)
-{
+ XAStreamInformationItf self, XAuint32 streamIndex,
+ XAuint16 * pNameSize, XAchar * pName)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAStreamInformationItfImpl* impl = GetImpl(self);
DEBUG_API("->XAStreamInformationItfImpl_QueryStreamName");
- if(!impl || (streamIndex == 0) || !pNameSize)
- {
+ if (!impl || (streamIndex == 0) || !pNameSize || !impl->adapCtx)
+ {
/* invalid parameter */
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("-<XAStreamInformationItfImpl_QueryStreamName");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
- if(impl->adapCtx->fwtype == FWMgrFWGST)
+ if (impl->adapCtx->fwtype == FWMgrFWGST)
{
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID )
- {
+ if (ret == XA_RESULT_PARAMETER_INVALID)
+ {
DEBUG_API("<-XAStreamInformationItfImpl_QueryStreamName");
return ret;
- }
-
- ret = XAStreamInformationItfAdapt_QueryStreamName(
- impl->adapCtx,
- streamIndex,
- pNameSize,
- pName);
-
+ }
+
+ ret = XAStreamInformationItfAdapt_QueryStreamName(impl->adapCtx,
+ streamIndex, pNameSize, pName);
+
XAAdaptationBase_ThreadExit(impl->adapCtx);
}
else
{
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID )
- {
+ if (ret == XA_RESULT_PARAMETER_INVALID)
+ {
DEBUG_API("<-XAStreamInformationItfImpl_QueryStreamName");
return ret;
- }
-
- ret = XAStreamInformationItfAdaptMMF_QueryStreamName(
- impl->adapCtx,
- streamIndex,
- pNameSize,
- pName);
-
- XAAdaptationBase_ThreadExit(impl->adapCtx);;
- }
- DEBUG_API("-<XAStreamInformationItfImpl_QueryStreamName");
+ }
+
+ ret = XAStreamInformationItfAdaptMMF_QueryStreamName(impl->adapCtx,
+ streamIndex, pNameSize, pName);
+
+ XAAdaptationBase_ThreadExit(impl->adapCtx);
+ ;
+ }DEBUG_API("-<XAStreamInformationItfImpl_QueryStreamName");
return ret;
-}
+ }
XAresult XAStreamInformationItfImpl_RegisterStreamChangeCallback(
- XAStreamInformationItf self,
- xaStreamEventChangeCallback callback,
- void * pContext)
-{
+ XAStreamInformationItf self, xaStreamEventChangeCallback callback,
+ void * pContext)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAStreamInformationItfImpl* impl = GetImpl(self);
DEBUG_API("->XAStreamInformationItfImpl_RegisterStreamChangeCallback");
- if(!impl)
- {
+ if (!impl)
+ {
/* invalid parameter */
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("-<XAStreamInformationItfImpl_RegisterStreamChangeCallback");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
/* callback may be NULL (to remove callback) */
impl->callback = callback;
@@ -276,116 +250,105 @@
DEBUG_API("-<XAStreamInformationItfImpl_RegisterStreamChangeCallback");
return ret;
-}
+ }
XAresult XAStreamInformationItfImpl_QueryActiveStreams(
- XAStreamInformationItf self,
- XAuint32 *numStreams,
- XAboolean *activeStreams)
-{
+ XAStreamInformationItf self, XAuint32 *numStreams,
+ XAboolean *activeStreams)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAStreamInformationItfImpl* impl = GetImpl(self);
DEBUG_API("->XAStreamInformationItfImpl_QueryActiveStreams");
- if(!impl || !numStreams)
- {
+ if (!impl || !numStreams || !impl->adapCtx)
+ {
/* invalid parameter */
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("-<XAStreamInformationItfImpl_QueryActiveStreams");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
- if(impl->adapCtx->fwtype == FWMgrFWGST)
- {
+ if (impl->adapCtx->fwtype == FWMgrFWGST)
+ {
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID )
- {
+ if (ret == XA_RESULT_PARAMETER_INVALID)
+ {
DEBUG_API("<-XAStreamInformationItfImpl_QueryActiveStreams");
return ret;
- }
-
- ret = XAStreamInformationItfAdapt_QueryActiveStreams(
- impl->adapCtx,
- numStreams,
- activeStreams);
-
+ }
+
+ ret = XAStreamInformationItfAdapt_QueryActiveStreams(impl->adapCtx,
+ numStreams, activeStreams);
+
XAAdaptationBase_ThreadExit(impl->adapCtx);
}
else
{
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID )
- {
+ if (ret == XA_RESULT_PARAMETER_INVALID)
+ {
DEBUG_API("<-XAStreamInformationItfImpl_QueryActiveStreams");
return ret;
- }
-
+ }
+
ret = XAStreamInformationItfAdaptMMF_QueryActiveStreams(
- impl->adapCtx,
- numStreams,
- activeStreams);
-
- XAAdaptationBase_ThreadExit(impl->adapCtx);;
+ impl->adapCtx, numStreams, activeStreams);
+
+ XAAdaptationBase_ThreadExit(impl->adapCtx);
+ ;
}
DEBUG_API("-<XAStreamInformationItfImpl_QueryActiveStreams");
return ret;
-}
+ }
XAresult XAStreamInformationItfImpl_SetActiveStream(
- XAStreamInformationItf self,
- XAuint32 streamNum,
- XAboolean active,
- XAboolean commitNow)
-{
+ XAStreamInformationItf self, XAuint32 streamNum, XAboolean active,
+ XAboolean commitNow)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAStreamInformationItfImpl* impl = GetImpl(self);
DEBUG_API("->XAStreamInformationItfImpl_SetActiveStream");
- if(!impl)
- {
+ if (!impl || !impl->adapCtx)
+ {
/* invalid parameter */
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("-<XAStreamInformationItfImpl_SetActiveStream");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
- if(impl->adapCtx->fwtype == FWMgrFWGST)
- {
+ if (impl->adapCtx->fwtype == FWMgrFWGST)
+ {
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID )
- {
+ if (ret == XA_RESULT_PARAMETER_INVALID)
+ {
DEBUG_API("<-XAStreamInformationItfImpl_SetActiveStream");
return ret;
- }
-
- ret = XAStreamInformationItfAdapt_SetActiveStream(
- impl->adapCtx,
- streamNum,
- active,
- commitNow);
-
+ }
+
+ ret = XAStreamInformationItfAdapt_SetActiveStream(impl->adapCtx,
+ streamNum, active, commitNow);
+
XAAdaptationBase_ThreadExit(impl->adapCtx);
}
else
{
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID )
- {
+ if (ret == XA_RESULT_PARAMETER_INVALID)
+ {
DEBUG_API("<-XAStreamInformationItfImpl_SetActiveStream");
return ret;
- }
-
- ret = XAStreamInformationItfAdaptMMF_SetActiveStream(
- impl->adapCtx,
- streamNum,
- active,
- commitNow);
-
- XAAdaptationBase_ThreadExit(impl->adapCtx);;
+ }
+
+ ret = XAStreamInformationItfAdaptMMF_SetActiveStream(impl->adapCtx,
+ streamNum, active, commitNow);
+
+ XAAdaptationBase_ThreadExit(impl->adapCtx);
+ ;
}
DEBUG_API("-<XAStreamInformationItfImpl_SetActiveStream");
return ret;
-}
+ }
/**
* XAStreamInformationItfImpl -specific methods
@@ -395,22 +358,31 @@
* XAStreamInformationItfImpl* XAStreamInformationItfImpl_Create()
* Description: Allocate and initialize PlayItfImpl
**/
-XAStreamInformationItfImpl* XAStreamInformationItfImpl_Create( XAAdaptationBaseCtx *adapCtx )
-{
+XAStreamInformationItfImpl* XAStreamInformationItfImpl_Create(
+ XAAdaptationBaseCtx *adapCtx)
+ {
XAStreamInformationItfImpl *self;
DEBUG_API("->XAStreamInformationItfImpl_Create");
- self = (XAStreamInformationItfImpl*)calloc(1,sizeof(XAStreamInformationItfImpl));
- if(self)
- {
+ self = (XAStreamInformationItfImpl*) calloc(1,
+ sizeof(XAStreamInformationItfImpl));
+ if (self)
+ {
/* init itf default implementation */
- self->itf.QueryMediaContainerInformation = XAStreamInformationItfImpl_QueryMediaContainerInformation;
- self->itf.QueryStreamType = XAStreamInformationItfImpl_QueryStreamType;
- self->itf.QueryStreamInformation = XAStreamInformationItfImpl_QueryStreamInformation;
- self->itf.QueryStreamName = XAStreamInformationItfImpl_QueryStreamName;
- self->itf.RegisterStreamChangeCallback = XAStreamInformationItfImpl_RegisterStreamChangeCallback;
- self->itf.QueryActiveStreams = XAStreamInformationItfImpl_QueryActiveStreams;
- self->itf.SetActiveStream = XAStreamInformationItfImpl_SetActiveStream;
+ self->itf.QueryMediaContainerInformation
+ = XAStreamInformationItfImpl_QueryMediaContainerInformation;
+ self->itf.QueryStreamType
+ = XAStreamInformationItfImpl_QueryStreamType;
+ self->itf.QueryStreamInformation
+ = XAStreamInformationItfImpl_QueryStreamInformation;
+ self->itf.QueryStreamName
+ = XAStreamInformationItfImpl_QueryStreamName;
+ self->itf.RegisterStreamChangeCallback
+ = XAStreamInformationItfImpl_RegisterStreamChangeCallback;
+ self->itf.QueryActiveStreams
+ = XAStreamInformationItfImpl_QueryActiveStreams;
+ self->itf.SetActiveStream
+ = XAStreamInformationItfImpl_SetActiveStream;
/* init variables */
self->cbPtrToSelf = NULL;
@@ -419,21 +391,23 @@
self->adapCtx = adapCtx;
self->self = self;
- }
+ }
DEBUG_API("<-XAStreamInformationItfImpl_Create");
return self;
-}
+ }
/* void XAStreamInformationItfImpl_Free(XAStreamInformationItfImpl* self)
* Description: Free all resources reserved at XAStreamInformationItfImpl_Create
*/
void XAStreamInformationItfImpl_Free(XAStreamInformationItfImpl* self)
-{
+ {
DEBUG_API("->XAStreamInformationItfImpl_Free");
assert(self==self->self);
- free(self);
+ if(self)
+ {
+ free(self);
+ }
DEBUG_API("<-XAStreamInformationItfImpl_Free");
-}
+ }
-
--- a/khronosfws/openmax_al/src/common/xastreaminformationitf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xastreaminformationitf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,20 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Stream Information Interface Header
+ *
+ */
#ifndef XASTREAMINFORMATIONITF_H
#define XASTREAMINFORMATIONITF_H
@@ -31,7 +30,7 @@
/** STRUCTURES **/
/* Definition of XAStreamInformationItf implementation */
typedef struct XAStreamInformationItfImpl_
-{
+ {
/* parent interface */
struct XAStreamInformationItf_ itf;
/* pointer to self */
@@ -40,53 +39,43 @@
/*Adaptation variables*/
XAStreamInformationItf cbPtrToSelf;
- xaStreamEventChangeCallback callback;
+ xaStreamEventChangeCallback callback;
void *cbcontext;
XAAdaptationBaseCtx *adapCtx;
-} XAStreamInformationItfImpl;
+ } XAStreamInformationItfImpl;
/** METHODS **/
/* Base interface XAStreamInformationItf implementation */
XAresult XAStreamInformationItfImpl_QueryMediaContainerInformation(
- XAStreamInformationItf self,
- XAMediaContainerInformation * info);
+ XAStreamInformationItf self, XAMediaContainerInformation * info);
XAresult XAStreamInformationItfImpl_QueryStreamType(
- XAStreamInformationItf self,
- XAuint32 streamIndex,
- XAuint32 *domain);
+ XAStreamInformationItf self, XAuint32 streamIndex, XAuint32 *domain);
XAresult XAStreamInformationItfImpl_QueryStreamInformation(
- XAStreamInformationItf self,
- XAuint32 streamIndex,
- void * info);
+ XAStreamInformationItf self, XAuint32 streamIndex, void * info);
XAresult XAStreamInformationItfImpl_QueryStreamName(
- XAStreamInformationItf self,
- XAuint32 streamIndex,
- XAuint16 * pNameSize,
- XAchar * pName);
+ XAStreamInformationItf self, XAuint32 streamIndex,
+ XAuint16 * pNameSize, XAchar * pName);
XAresult XAStreamInformationItfImpl_RegisterStreamChangeCallback(
- XAStreamInformationItf self,
- xaStreamEventChangeCallback callback,
- void * pContext);
+ XAStreamInformationItf self, xaStreamEventChangeCallback callback,
+ void * pContext);
XAresult XAStreamInformationItfImpl_QueryActiveStreams(
- XAStreamInformationItf self,
- XAuint32 *numStreams,
- XAboolean *activeStreams);
+ XAStreamInformationItf self, XAuint32 *numStreams,
+ XAboolean *activeStreams);
XAresult XAStreamInformationItfImpl_SetActiveStream(
- XAStreamInformationItf self,
- XAuint32 streamNum,
- XAboolean active,
- XAboolean commitNow);
+ XAStreamInformationItf self, XAuint32 streamNum, XAboolean active,
+ XAboolean commitNow);
/* XAStreamInformationItfImpl -specific methods */
-XAStreamInformationItfImpl* XAStreamInformationItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
+XAStreamInformationItfImpl* XAStreamInformationItfImpl_Create(
+ XAAdaptationBaseCtx *adapCtx);
void XAStreamInformationItfImpl_Free(XAStreamInformationItfImpl* self);
#endif /* XASTREAMINFORMATIONITF_H */
--- a/khronosfws/openmax_al/src/common/xathreadsafety.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xathreadsafety.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,28 +1,28 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Thread Safety Implementation
+ *
+ */
#include <stdlib.h>
#include "xathreadsafety.h"
typedef struct
-{
+ {
XAImplMutexHandle mutexTable[XATSCount];
XAboolean tsEnabled;
-}XAThreadSafetyImpl;
+ } XAThreadSafetyImpl;
static XAThreadSafetyImpl* threadSafety;
@@ -31,79 +31,78 @@
* Description: Creates mutex table for thread safety support
* @return: Success value
*/
-XAresult XAThreadSafety_Init( XAboolean tsEnable )
-{
+XAresult XAThreadSafety_Init(XAboolean tsEnable)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAint32 i = 0;
DEBUG_API_A1("->XAThreadSafety_Init - tsEnable:%lu",tsEnable);
/* Initialize thread safety only once */
- if ( !threadSafety )
- {
- threadSafety = (XAThreadSafetyImpl *)calloc(1,sizeof(XAThreadSafetyImpl));
- if ( !threadSafety )
+ if (!threadSafety)
{
- DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
- DEBUG_API("<-XAThreadSafety_Init");
+ threadSafety = (XAThreadSafetyImpl *) calloc(1,
+ sizeof(XAThreadSafetyImpl));
+ if (!threadSafety)
+ {
+ DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");DEBUG_API("<-XAThreadSafety_Init");
/* memory allocation failed */
return XA_RESULT_MEMORY_FAILURE;
- }
+ }
threadSafety->tsEnabled = tsEnable;
- if ( tsEnable )
- {
- for( i = 0; i < XATSCount; i++ )
+ if (tsEnable)
{
- ret = XAImpl_CreateMutex( &threadSafety->mutexTable[i] );
- if ( ret != XA_RESULT_SUCCESS )
+ for (i = 0; i < XATSCount; i++)
{
+ ret = XAImpl_CreateMutex(&threadSafety->mutexTable[i]);
+ if (ret != XA_RESULT_SUCCESS)
+ {
break;
+ }DEBUG_INFO_A2("Created %s:%x",MEDIAOBJECTNAME(i), threadSafety->mutexTable[i] );
}
- DEBUG_INFO_A2("Created %s:%x",MEDIAOBJECTNAME(i), threadSafety->mutexTable[i] );
+ }
+ else
+ {
+ DEBUG_INFO("Thread safety: disabled.");
}
}
- else
- {
- DEBUG_INFO("Thread safety: disabled.");
- }
- }
DEBUG_API("<-XAThreadSafety_Init");
return ret;
-}
+ }
/*
* XAresult XAThreadSafety_Destroy()
* Description: Destroys mutex table created for thread safety support
*/
XAresult XAThreadSafety_Destroy()
-{
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAint32 i = 0;
DEBUG_API("->XAThreadSafety_Destroy");
- if ( threadSafety )
- {
- if ( threadSafety->tsEnabled )
+ if (threadSafety)
{
- for( i = 0; i < XATSCount; i++ )
+ if (threadSafety->tsEnabled)
{
+ for (i = 0; i < XATSCount; i++)
+ {
DEBUG_INFO_A2("Free %s:%x",MEDIAOBJECTNAME(i), threadSafety->mutexTable[i] );
- XAImpl_DeleteMutex( threadSafety->mutexTable[i] );
+ XAImpl_DeleteMutex(threadSafety->mutexTable[i]);
+ }
}
+ free(threadSafety);
}
- free( threadSafety);
- }
else
- {
+ {
DEBUG_INFO("Thread safety: disabled.");
- }
+ }
DEBUG_API("<-XAThreadSafety_Destroy");
return ret;
-}
+ }
/*
* XAresult XAThreadSafety_Unlock( XAThreadSafetyMediaObjects mediaObject )
@@ -111,57 +110,56 @@
* @param XAThreadSafetyMediaObjects mediaObject
* @return
*/
-XAresult XAThreadSafety_Unlock( XAThreadSafetyMediaObjects mediaObject )
-{
+XAresult XAThreadSafety_Unlock(XAThreadSafetyMediaObjects mediaObject)
+ {
XAresult ret = XA_RESULT_SUCCESS;
DEBUG_API("->XAThreadSafety_Unlock");
- if ( threadSafety )
- {
- if ( threadSafety->tsEnabled )
+ if (threadSafety)
{
- ret = XAImpl_UnlockMutex( threadSafety->mutexTable[mediaObject] );
- if ( ret == XA_RESULT_SUCCESS)
+ if (threadSafety->tsEnabled)
{
+ ret = XAImpl_UnlockMutex(threadSafety->mutexTable[mediaObject]);
+ if (ret == XA_RESULT_SUCCESS)
+ {
DEBUG_INFO_A2("Released lock for %s:%x",MEDIAOBJECTNAME(mediaObject), threadSafety->mutexTable[mediaObject] );
+ }
}
}
- }
else
- {
+ {
DEBUG_INFO("Thread safety: disabled.");
+ }DEBUG_API("<-XAThreadSafety_Unlock");
+ return ret;
}
- DEBUG_API("<-XAThreadSafety_Unlock");
- return ret;
-}
/*
* XAresult XAThreadSafety_TryLock( XAThreadSafetyMediaObjects mediaObject );
* Description:
* @param XAThreadSafetyMediaObjects mediaObject
* @return
*/
-XAresult XAThreadSafety_TryLock( XAThreadSafetyMediaObjects mediaObject )
-{
+XAresult XAThreadSafety_TryLock(XAThreadSafetyMediaObjects mediaObject)
+ {
XAresult ret = XA_RESULT_SUCCESS;
DEBUG_API("->XAThreadSafety_TryLock");
- if ( threadSafety )
- {
- if ( threadSafety->tsEnabled )
+ if (threadSafety)
{
- ret = XAImpl_TryLockMutex( threadSafety->mutexTable[mediaObject]);
- if ( ret == XA_RESULT_SUCCESS)
+ if (threadSafety->tsEnabled)
{
+ ret = XAImpl_TryLockMutex(threadSafety->mutexTable[mediaObject]);
+ if (ret == XA_RESULT_SUCCESS)
+ {
DEBUG_INFO_A2("Locked %s:%x",MEDIAOBJECTNAME(mediaObject), threadSafety->mutexTable[mediaObject] );
+ }
}
}
- }
else
- {
+ {
DEBUG_INFO("Thread safety: disabled.");
- }
+ }
DEBUG_API("<-XAThreadSafety_TryLock");
return ret;
-}
+ }
--- a/khronosfws/openmax_al/src/common/xathreadsafety.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xathreadsafety.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Thread Safety Header
+ *
+ */
#ifndef XATHREADSAFETY_H_
#define XATHREADSAFETY_H_
@@ -26,17 +26,17 @@
/*parse media object names for debug prints*/
static const char* mediaobjectnames[9] =
-{
- "XATSMediaPlayer",
- "XATSMediaRecorder",
- "XATSEngine",
- "XATSRadio",
- "XATSCamera",
- "XATSOutputMix",
- "XATSVibra",
- "XATSLEDArray",
- "XATSMetaDataExtractor"
-};
+ {
+ "XATSMediaPlayer",
+ "XATSMediaRecorder",
+ "XATSEngine",
+ "XATSRadio",
+ "XATSCamera",
+ "XATSOutputMix",
+ "XATSVibra",
+ "XATSLEDArray",
+ "XATSMetaDataExtractor"
+ };
#define MEDIAOBJECTNAME(i) ((i<XATSCount)?mediaobjectnames[i]:"INVALID")
#endif /*_DEBUG*/
@@ -139,7 +139,7 @@
/* ENUMERATIONS */
typedef enum
-{
+ {
XATSMediaPlayer = 0,
XATSMediaRecorder,
XATSEngine,
@@ -150,12 +150,12 @@
XATSLEDArray,
XATSMetaDataExtractor,
XATSCount
-}XAThreadSafetyMediaObjects;
+ } XAThreadSafetyMediaObjects;
/* FUNCTIONS */
-XAresult XAThreadSafety_Init( XAboolean tsEnable);
+XAresult XAThreadSafety_Init(XAboolean tsEnable);
XAresult XAThreadSafety_Destroy(void);
-XAresult XAThreadSafety_Unlock( XAThreadSafetyMediaObjects mediaObject );
-XAresult XAThreadSafety_TryLock( XAThreadSafetyMediaObjects mediaObject );
+XAresult XAThreadSafety_Unlock(XAThreadSafetyMediaObjects mediaObject);
+XAresult XAThreadSafety_TryLock(XAThreadSafetyMediaObjects mediaObject);
#endif /* XATHREADSAFETY_H_ */
--- a/khronosfws/openmax_al/src/common/xavolumeitf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xavolumeitf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,26 +1,26 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Volume Interface Implementation
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "xavolumeitf.h"
-
+
#include "xavolumeitfadaptation.h"
#include "xanokiavolumeextitfadaptationmmf.h"
/**
@@ -28,17 +28,17 @@
* Description: Validated interface pointer and cast it to implementations pointer.
**/
static XAVolumeItfImpl* GetImpl(XAVolumeItf self)
-{
- if(self)
{
- XAVolumeItfImpl* impl = (XAVolumeItfImpl*)(*self);
- if(impl && impl == impl->self)
+ if (self)
{
+ XAVolumeItfImpl* impl = (XAVolumeItfImpl*) (*self);
+ if (impl && impl == impl->self)
+ {
return impl;
+ }
}
+ return NULL;
}
- return NULL;
-}
/**
* Base interface XAVolumeItf implementation
@@ -49,7 +49,7 @@
* Description: Sets the object's volume level.
**/
XAresult XAVolumeItfImpl_SetVolumeLevel(XAVolumeItf self, XAmillibel level)
-{
+ {
XAVolumeItfImpl *impl = GetImpl(self);
XAresult ret = XA_RESULT_SUCCESS;
@@ -57,102 +57,105 @@
DEBUG_API("->XAVolumeItfImpl_SetVolumeLevel");
/* check maximum volume level */
- if(XAVolumeItfImpl_GetMaxVolumeLevel(self, &maximumLevel) != XA_RESULT_SUCCESS)
- {
+ if (XAVolumeItfImpl_GetMaxVolumeLevel(self, &maximumLevel)
+ != XA_RESULT_SUCCESS)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAVolumeItfImpl_SetVolumeLevel");
/* cannot solve maximum volume level */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
- if(!impl || level > maximumLevel)
- {
+ if (!impl || level > maximumLevel || !impl->adapCtx)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAVolumeItfImpl_SetVolumeLevel");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
-
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
- {
+ if (ret == XA_RESULT_PARAMETER_INVALID || ret
+ == XA_RESULT_PRECONDITIONS_VIOLATED)
+ {
DEBUG_API("<-XAVolumeItfImpl_SetVolumeLevel");
return ret;
- }
- if(impl->adapCtx->fwtype == FWMgrFWGST)
+ }
+ if (impl->adapCtx->fwtype == FWMgrFWGST)
{
- ret = XAVolumeItfAdapt_SetVolumeLevel((XAAdaptationGstCtx*)impl->adapCtx, level);
+ ret = XAVolumeItfAdapt_SetVolumeLevel(
+ (XAAdaptationGstCtx*) impl->adapCtx, level);
}
else
{
impl->volumeLevel = level;
}
-
- if(ret == XA_RESULT_SUCCESS)
- {
+
+ if (ret == XA_RESULT_SUCCESS)
+ {
impl->volumeLevel = level;
- }
+ }
XAAdaptationBase_ThreadExit(impl->adapCtx);
DEBUG_API("<-XAVolumeItfImpl_SetVolumeLevel");
- return ret ;
-}
+ return ret;
+ }
/**
* XAresult XAVolumeItfImpl_GetVolumeLevel(XAVolumeItf self, XAmillibel *pLevel)
* Description: Gets the object’s volume level.
**/
XAresult XAVolumeItfImpl_GetVolumeLevel(XAVolumeItf self, XAmillibel *pLevel)
-{
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAVolumeItfImpl *impl = GetImpl(self);
DEBUG_API("->XAVolumeItfImpl_GetVolumeLevel");
- if(!impl || !pLevel)
- {
+ if (!impl || !pLevel)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAVolumeItfImpl_GetVolumeLevel");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pLevel = impl->volumeLevel;
DEBUG_API("<-XAVolumeItfImpl_GetVolumeLevel");
return ret;
-}
+ }
/**
* XAresult XAVolumeItfImpl_GetMaxVolumeLevel(XAVolumeItf self, XAmillibel *pMaxLevel)
* Description: Gets the maximum supported level.
**/
-XAresult XAVolumeItfImpl_GetMaxVolumeLevel(XAVolumeItf self, XAmillibel *pMaxLevel)
-{
+XAresult XAVolumeItfImpl_GetMaxVolumeLevel(XAVolumeItf self,
+ XAmillibel *pMaxLevel)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAVolumeItfImpl *impl = GetImpl(self);
DEBUG_API("->XAVolumeItfImpl_GetVolumeLevel");
- if(!impl || !pMaxLevel)
- {
+ if (!impl || !pMaxLevel || !impl->adapCtx)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAVolumeItfImpl_GetMaxVolumeLevel");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
-
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
- {
+ if (ret == XA_RESULT_PARAMETER_INVALID || ret
+ == XA_RESULT_PRECONDITIONS_VIOLATED)
+ {
DEBUG_API("<-XAVolumeItfImpl_GetMaxVolumeLevel");
return ret;
- }
- if(impl->adapCtx->fwtype == FWMgrFWGST)
+ }
+ if (impl->adapCtx->fwtype == FWMgrFWGST)
{
- ret = XAVolumeItfAdapt_GetMaxVolumeLevel((XAAdaptationGstCtx*)impl->adapCtx,
- pMaxLevel);
+ ret = XAVolumeItfAdapt_GetMaxVolumeLevel(
+ (XAAdaptationGstCtx*) impl->adapCtx, pMaxLevel);
}
else
{
@@ -163,130 +166,133 @@
DEBUG_API("<-XAVolumeItfImpl_GetMaxVolumeLevel");
return ret;
-}
+ }
/**
* XAresult XAVolumeItfImpl_SetMute(XAVolumeItf self, XAboolean mute)
* Description: Mutes or unmutes the object.
**/
XAresult XAVolumeItfImpl_SetMute(XAVolumeItf self, XAboolean mute)
-{
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAVolumeItfImpl *impl = GetImpl(self);
DEBUG_API("->XAVolumeItfImpl_SetMute");
- if(!impl)
- {
+ if (!impl || !impl->adapCtx)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAVolumeItfImpl_SetMute");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
-
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
- {
+ if (ret == XA_RESULT_PARAMETER_INVALID || ret
+ == XA_RESULT_PRECONDITIONS_VIOLATED)
+ {
DEBUG_API("<-XAVolumeItfImpl_SetMute");
return ret;
- }
+ }
/* check is mute state changed */
- if(mute != impl->mute)
- {
- if(impl->adapCtx->fwtype == FWMgrFWMMF)
+ if (mute != impl->mute)
+ {
+ if (impl->adapCtx->fwtype == FWMgrFWMMF)
{
- ret = XANokiaVolumeExtItfAdapt_SetMute((XAAdaptationMMFCtx*)impl->adapCtx, mute);
+ ret = XANokiaVolumeExtItfAdapt_SetMute(
+ (XAAdaptationMMFCtx*) impl->adapCtx, mute);
}
else
{
- ret = XAVolumeItfAdapt_SetMute((XAAdaptationGstCtx*)impl->adapCtx, mute);
+ ret = XAVolumeItfAdapt_SetMute(
+ (XAAdaptationGstCtx*) impl->adapCtx, mute);
}
- if(ret == XA_RESULT_SUCCESS)
- {
+ if (ret == XA_RESULT_SUCCESS)
+ {
impl->mute = mute;
+ }
}
- }
XAAdaptationBase_ThreadExit(impl->adapCtx);
DEBUG_API("<-XAVolumeItfImpl_SetMute");
return ret;
-}
+ }
/**
* XAresult XAVolumeItfImpl_GetMute(XAVolumeItf self, XAboolean *pMute)
* Description: Retrieves the object's state.
**/
XAresult XAVolumeItfImpl_GetMute(XAVolumeItf self, XAboolean *pMute)
-{
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAVolumeItfImpl *impl = GetImpl(self);
DEBUG_API("->XAVolumeItfImpl_GetMute");
- if(!impl || !pMute)
- {
+ if (!impl || !pMute)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAVolumeItfImpl_GetMute");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pMute = impl->mute;
DEBUG_API("<-XAVolumeItfImpl_GetMute");
return ret;
-}
+ }
/**
* XAresult XAVolumeItfImpl_EnableStereoPosition(XAVolumeItf self, XAboolean enable)
* Description: Enables or disables the stereo positioning effect.
**/
-XAresult XAVolumeItfImpl_EnableStereoPosition(XAVolumeItf self, XAboolean enable)
-{
+XAresult XAVolumeItfImpl_EnableStereoPosition(XAVolumeItf self,
+ XAboolean enable)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAVolumeItfImpl *impl = GetImpl(self);
DEBUG_API("->XAVolumeItfImpl_EnableStereoPosition");
- if(!impl)
- {
+ if (!impl || !impl->adapCtx)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAVolumeItfImpl_EnableStereoPosition");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
-
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
- {
+ if (ret == XA_RESULT_PARAMETER_INVALID || ret
+ == XA_RESULT_PRECONDITIONS_VIOLATED)
+ {
DEBUG_API("<-XAVolumeItfImpl_EnableStereoPosition");
return ret;
- }
- /* Check is stereo position state changed */
- if(enable != impl->enableStereoPos)
- {
- if(impl->adapCtx->fwtype == FWMgrFWGST)
- {
- ret = XAVolumeItfAdapt_EnableStereoPosition((XAAdaptationGstCtx*)impl->adapCtx,
- enable);
}
- else
+ /* Check is stereo position state changed */
+ if (enable != impl->enableStereoPos)
{
- ret = XANokiaVolumeExtItfAdapt_EnableStereoPosition((XAAdaptationMMFCtx*)impl->adapCtx,
- enable);
+ if (impl->adapCtx->fwtype == FWMgrFWGST)
+ {
+ ret = XAVolumeItfAdapt_EnableStereoPosition(
+ (XAAdaptationGstCtx*) impl->adapCtx, enable);
+ }
+ else
+ {
+ ret = XANokiaVolumeExtItfAdapt_EnableStereoPosition(
+ (XAAdaptationMMFCtx*) impl->adapCtx, enable);
+ }
+ if (ret == XA_RESULT_SUCCESS)
+ {
+ impl->enableStereoPos = enable;
+ }
}
- if(ret == XA_RESULT_SUCCESS)
- {
- impl->enableStereoPos = enable;
- }
- }
XAAdaptationBase_ThreadExit(impl->adapCtx);
DEBUG_API("<-XAVolumeItfImpl_EnableStereoPosition");
return ret;
-}
+ }
/**
* XAresult XAVolumeItfImpl_IsEnabledStereoPosition(XAVolumeItf self,
@@ -294,25 +300,25 @@
* Description: Returns the enabled state of the stereo positioning effect.
**/
XAresult XAVolumeItfImpl_IsEnabledStereoPosition(XAVolumeItf self,
- XAboolean *pEnable)
-{
+ XAboolean *pEnable)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAVolumeItfImpl *impl = GetImpl(self);
DEBUG_API("->XAVolumeItfImpl_IsEnabledStereoPosition");
- if(!impl || !pEnable)
- {
+ if (!impl || !pEnable)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAVolumeItfImpl_IsEnabledStereoPosition");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pEnable = impl->enableStereoPos;
DEBUG_API("<-XAVolumeItfImpl_IsEnabledStereoPosition");
return ret;
-}
+ }
/**
* XAresult XAVolumeItfImpl_SetStereoPosition(XAVolumeItf self,
@@ -320,50 +326,50 @@
* Description: Sets the stereo position of the object.
**/
XAresult XAVolumeItfImpl_SetStereoPosition(XAVolumeItf self,
- XApermille stereoPosition)
-{
+ XApermille stereoPosition)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAVolumeItfImpl *impl = GetImpl(self);
DEBUG_API("->XAVolumeItfImpl_SetStereoPosition");
- if(!impl || (stereoPosition < STEREO_POSITION_LEFT) ||
- (stereoPosition > STEREO_POSITION_RIGHT))
- {
+ if (!impl || (stereoPosition < STEREO_POSITION_LEFT) || (stereoPosition
+ > STEREO_POSITION_RIGHT) || !impl->adapCtx)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAVolumeItfImpl_SetStereoPosition");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
impl->stereoPosition = stereoPosition;
-
ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
- if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
- {
+ if (ret == XA_RESULT_PARAMETER_INVALID || ret
+ == XA_RESULT_PRECONDITIONS_VIOLATED)
+ {
DEBUG_API("<-XAVolumeItfImpl_SetStereoPosition");
return ret;
- }
+ }
/* check is stereo position effect enabled if is then handle effect */
- if(impl->enableStereoPos)
- {
- if(impl->adapCtx->fwtype == FWMgrFWGST)
+ if (impl->enableStereoPos)
{
- ret = XAVolumeItfAdapt_SetStereoPosition((XAAdaptationGstCtx*)impl->adapCtx,
- stereoPosition);
+ if (impl->adapCtx->fwtype == FWMgrFWGST)
+ {
+ ret = XAVolumeItfAdapt_SetStereoPosition(
+ (XAAdaptationGstCtx*) impl->adapCtx, stereoPosition);
+ }
+ else
+ {
+ ret = XANokiaVolumeExtItfAdapt_SetStereoPosition(
+ (XAAdaptationMMFCtx*) impl->adapCtx, stereoPosition);
+ }
}
- else
- {
- ret = XANokiaVolumeExtItfAdapt_SetStereoPosition((XAAdaptationMMFCtx*)impl->adapCtx,
- stereoPosition);
- }
- }
XAAdaptationBase_ThreadExit(impl->adapCtx);
DEBUG_API("<-XAVolumeItfImpl_SetStereoPosition");
return ret;
-}
+ }
/**
* XAresult XAVolumeItfImpl_GetStereoPosition(XAVolumeItf self,
@@ -371,50 +377,50 @@
* Description: Gets the object’s stereo position setting.
**/
XAresult XAVolumeItfImpl_GetStereoPosition(XAVolumeItf self,
- XApermille *pStereoPosition)
-{
+ XApermille *pStereoPosition)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAVolumeItfImpl *impl = GetImpl(self);
DEBUG_API("->XAVolumeItfImpl_GetStereoPosition");
- if(!impl || !pStereoPosition)
- {
+ if (!impl || !pStereoPosition)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAVolumeItfImpl_GetStereoPosition");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pStereoPosition = impl->stereoPosition;
DEBUG_API("<-XAVolumeItfImpl_GetStereoPosition");
return ret;
-}
+ }
/**
* XAVolumeItfImpl -specific methods
**/
-
/**
* XAVolumeItfImpl* XAVolumeItfImpl_Create()
* Description: Allocate and initialize VolumeItfImpl
**/
-XAVolumeItfImpl* XAVolumeItfImpl_Create(XAAdaptationBaseCtx *adapCtx )
-{
- XAVolumeItfImpl *self = (XAVolumeItfImpl*)
- calloc(1,sizeof(XAVolumeItfImpl));
+XAVolumeItfImpl* XAVolumeItfImpl_Create(XAAdaptationBaseCtx *adapCtx)
+ {
+ XAVolumeItfImpl *self = (XAVolumeItfImpl*) calloc(1,
+ sizeof(XAVolumeItfImpl));
DEBUG_API("->XAVolumeItfImpl_Create");
- if(self)
- {
+ if (self)
+ {
/* init itf default implementation */
self->itf.EnableStereoPosition = XAVolumeItfImpl_EnableStereoPosition;
self->itf.GetMaxVolumeLevel = XAVolumeItfImpl_GetMaxVolumeLevel;
self->itf.GetMute = XAVolumeItfImpl_GetMute;
self->itf.GetStereoPosition = XAVolumeItfImpl_GetStereoPosition;
self->itf.GetVolumeLevel = XAVolumeItfImpl_GetVolumeLevel;
- self->itf.IsEnabledStereoPosition = XAVolumeItfImpl_IsEnabledStereoPosition;
+ self->itf.IsEnabledStereoPosition
+ = XAVolumeItfImpl_IsEnabledStereoPosition;
self->itf.SetMute = XAVolumeItfImpl_SetMute;
self->itf.SetStereoPosition = XAVolumeItfImpl_SetStereoPosition;
self->itf.SetVolumeLevel = XAVolumeItfImpl_SetVolumeLevel;
@@ -428,20 +434,20 @@
self->adapCtx = adapCtx;
self->self = self;
- }
+ }
DEBUG_API("<-XAVolumeItfImpl_Create");
return self;
-}
+ }
/**
* void XAVolumeItfImpl_Free(XAVolumeItfImpl* self)
* Description: Free all resources reserved at XAVolumeItfImpl_Create
**/
void XAVolumeItfImpl_Free(XAVolumeItfImpl* self)
-{
+ {
DEBUG_API("->XAVolumeItfImpl_Free");
assert(self==self->self);
free(self);
DEBUG_API("<-XAVolumeItfImpl_Free");
-}
+ }
--- a/khronosfws/openmax_al/src/common/xavolumeitf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/common/xavolumeitf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Volume Interface Header
+ *
+ */
#ifndef XAVOLUMEITF_H
#define XAVOLUMEITF_H
@@ -29,7 +29,7 @@
/** STRUCTURES **/
/* Definition of XAVolumeItf implementation */
typedef struct XAVolumeItfImpl_
-{
+ {
/* parent interface */
struct XAVolumeItf_ itf;
/* pointer to self */
@@ -41,7 +41,7 @@
XApermille stereoPosition;
/*Adaptation variables*/
XAAdaptationBaseCtx *adapCtx;
-} XAVolumeItfImpl;
+ } XAVolumeItfImpl;
/** METHODS **/
@@ -50,21 +50,25 @@
XAresult XAVolumeItfImpl_GetVolumeLevel(XAVolumeItf self, XAmillibel *pLevel);
-XAresult XAVolumeItfImpl_GetMaxVolumeLevel(XAVolumeItf self, XAmillibel *pMaxLevel);
+XAresult XAVolumeItfImpl_GetMaxVolumeLevel(XAVolumeItf self,
+ XAmillibel *pMaxLevel);
XAresult XAVolumeItfImpl_SetMute(XAVolumeItf self, XAboolean mute);
XAresult XAVolumeItfImpl_GetMute(XAVolumeItf self, XAboolean *pMute);
-XAresult XAVolumeItfImpl_EnableStereoPosition(XAVolumeItf self, XAboolean enable);
+XAresult XAVolumeItfImpl_EnableStereoPosition(XAVolumeItf self,
+ XAboolean enable);
-XAresult XAVolumeItfImpl_IsEnabledStereoPosition(XAVolumeItf self, XAboolean *pEnable);
+XAresult XAVolumeItfImpl_IsEnabledStereoPosition(XAVolumeItf self,
+ XAboolean *pEnable);
-XAresult XAVolumeItfImpl_SetStereoPosition(XAVolumeItf self, XApermille stereoPosition);
+XAresult XAVolumeItfImpl_SetStereoPosition(XAVolumeItf self,
+ XApermille stereoPosition);
-XAresult XAVolumeItfImpl_GetStereoPosition(XAVolumeItf self, XApermille *pStereoPosition);
+XAresult XAVolumeItfImpl_GetStereoPosition(XAVolumeItf self,
+ XApermille *pStereoPosition);
-
/* XAVolumeItfImpl -specific methods */
XAVolumeItfImpl* XAVolumeItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
void XAVolumeItfImpl_Free(XAVolumeItfImpl* self);
--- a/khronosfws/openmax_al/src/engine/xaaudiodecodercapabilitiesitf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaaudiodecodercapabilitiesitf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Audio Encoder Capabilities Interface Implementation
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
@@ -27,18 +27,20 @@
/* XAAudioDecoderCapabilitiesItfImpl* GetImpl
* Description: Validate interface pointer and cast it to implementation pointer.
*/
-static XAAudioDecoderCapabilitiesItfImpl* GetImpl(XAAudioDecoderCapabilitiesItf self)
-{
- if( self )
+static XAAudioDecoderCapabilitiesItfImpl* GetImpl(
+ XAAudioDecoderCapabilitiesItf self)
{
- XAAudioDecoderCapabilitiesItfImpl* impl = (XAAudioDecoderCapabilitiesItfImpl*)(*self);
- if( impl && (impl == impl->self) )
+ if (self)
{
+ XAAudioDecoderCapabilitiesItfImpl* impl =
+ (XAAudioDecoderCapabilitiesItfImpl*) (*self);
+ if (impl && (impl == impl->self))
+ {
return impl;
+ }
}
+ return NULL;
}
- return NULL;
-}
/*****************************************************************************
* Base interface XAAudioDecoderCapabilitiesItf implementation
@@ -48,143 +50,149 @@
* Description: Retrieves the available audio decoders.
*/
XAresult XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoders(
- XAAudioDecoderCapabilitiesItf self,
- XAuint32* pNumDecoders,
- XAuint32* pDecoderIds)
-{
+ XAAudioDecoderCapabilitiesItf self, XAuint32* pNumDecoders,
+ XAuint32* pDecoderIds)
+ {
XAAudioDecoderCapabilitiesItfImpl* impl = GetImpl(self);
XAresult res = XA_RESULT_SUCCESS;
DEBUG_API("->XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoders");
- if( !impl || !pNumDecoders )
- {
+ if (!impl || !pNumDecoders)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
res = XA_RESULT_PARAMETER_INVALID;
- }
+ }
else
- {
- if( pDecoderIds )
- { /* query array of decoders */
- if( *pNumDecoders < impl->numCodecs )
- {
+ {
+ if (pDecoderIds)
+ { /* query array of decoders */
+ if (*pNumDecoders < impl->numCodecs)
+ {
DEBUG_ERR("XA_RESULT_BUFFER_INSUFFICIENT");
res = XA_RESULT_BUFFER_INSUFFICIENT;
- }
+ }
else
- {
-
- XAuint32 i = 0;
- XACapabilities temp;
- for( i=0; i<impl->numCodecs; i++ )
{
+
+ XAuint32 i = 0;
+ XACapabilities temp;
+ for (i = 0; i < impl->numCodecs; i++)
+ {
/* query decoder id from adaptation using index value */
- XACapabilitiesMgr_GetCapsByIdx(NULL, (XACapsType)(XACAP_DECODER|XACAP_AUDIO), i, &temp);
+ XACapabilitiesMgr_GetCapsByIdx(NULL,
+ (XACapsType) (XACAP_DECODER | XACAP_AUDIO), i,
+ &temp);
pDecoderIds[i] = temp.xaid;
+ }
+
}
-
}
- }
/* return number of decoders */
*pNumDecoders = impl->numCodecs;
+ }DEBUG_API("<-XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoders");
+ return res;
}
- DEBUG_API("<-XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoders");
- return res;
-}
/* XAresult XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoderCapabilities
* Description: Queries for the audio decoder�s capabilities.
*/
XAresult XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoderCapabilities(
- XAAudioDecoderCapabilitiesItf self,
- XAuint32 decoderId,
- XAuint32* pIndex,
- XAAudioCodecDescriptor* pDescriptor)
-{
+ XAAudioDecoderCapabilitiesItf self, XAuint32 decoderId,
+ XAuint32* pIndex, XAAudioCodecDescriptor* pDescriptor)
+ {
XAAudioDecoderCapabilitiesItfImpl* impl = GetImpl(self);
XAresult res = XA_RESULT_SUCCESS;
DEBUG_API("->XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoderCapabilities");
- if( !impl || !pIndex )
- {
+ if (!impl || !pIndex)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
res = XA_RESULT_PARAMETER_INVALID;
- }
+ }
else
- {
- if( !pDescriptor )
- { /* query number of capa structures */
+ {
+ if (!pDescriptor)
+ { /* query number of capa structures */
*pIndex = 1;
- }
+ }
else
- { /* query capabilities */
- if( *pIndex >= 1 )
- {
+ { /* query capabilities */
+ if (*pIndex >= 1)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
res = XA_RESULT_PARAMETER_INVALID;
- }
+ }
else
- {
-
+ {
+
/* query capabilities from adaptation using codec id */
XACapabilities temp;
- memset(pDescriptor,0,sizeof(XAAudioCodecDescriptor));
- res = XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_DECODER|XACAP_AUDIO), decoderId, &temp);
- if( res == XA_RESULT_SUCCESS )
- {
- XAAudioCodecDescriptor* desc = ((XAAudioCodecDescriptor*)(temp.pEntry));
+ memset(pDescriptor, 0, sizeof(XAAudioCodecDescriptor));
+ res = XACapabilitiesMgr_GetCapsById(NULL,
+ (XACapsType) (XACAP_DECODER | XACAP_AUDIO),
+ decoderId, &temp);
+ if (res == XA_RESULT_SUCCESS)
+ {
+ XAAudioCodecDescriptor* desc =
+ ((XAAudioCodecDescriptor*) (temp.pEntry));
/* map applicable values to XAAudioCodecCapabilities */
pDescriptor->maxChannels = desc->maxChannels;
- pDescriptor->minSampleRate= desc->minSampleRate*1000; /* milliHz */
+ pDescriptor->minSampleRate = desc->minSampleRate * 1000; /* milliHz */
if (desc->maxSampleRate < (0xFFFFFFFF / 1000))
- {
- pDescriptor->maxSampleRate = desc->maxSampleRate*1000;
- }
+ {
+ pDescriptor->maxSampleRate = desc->maxSampleRate
+ * 1000;
+ }
else
- {
+ {
pDescriptor->maxSampleRate = 0xFFFFFFFF;
- }
- pDescriptor->minBitsPerSample=desc->minBitsPerSample;
- pDescriptor->maxBitsPerSample=desc->maxBitsPerSample;
- pDescriptor->isFreqRangeContinuous=XA_BOOLEAN_TRUE;
- pDescriptor->minBitRate=desc->minBitRate;
- pDescriptor->maxBitRate=desc->maxBitRate;
- pDescriptor->numBitratesSupported = desc->numBitratesSupported;
- pDescriptor->isBitrateRangeContinuous=XA_BOOLEAN_TRUE;
- if (temp.xaid == XA_AUDIOCODEC_PCM )
- {
- pDescriptor->profileSetting=XA_AUDIOPROFILE_PCM;
- pDescriptor->modeSetting=0; /* no chanmode for pcm defined */
+ }
+ pDescriptor->minBitsPerSample = desc->minBitsPerSample;
+ pDescriptor->maxBitsPerSample = desc->maxBitsPerSample;
+ pDescriptor->isFreqRangeContinuous = XA_BOOLEAN_TRUE;
+ pDescriptor->minBitRate = desc->minBitRate;
+ pDescriptor->maxBitRate = desc->maxBitRate;
+ pDescriptor->numBitratesSupported
+ = desc->numBitratesSupported;
+ pDescriptor->isBitrateRangeContinuous = XA_BOOLEAN_TRUE;
+ if (temp.xaid == XA_AUDIOCODEC_PCM)
+ {
+ pDescriptor->profileSetting = XA_AUDIOPROFILE_PCM;
+ pDescriptor->modeSetting = 0; /* no chanmode for pcm defined */
+ }
+ else if (temp.xaid == XA_ADAPTID_VORBIS) /* for ogg */
+ {
+ if (desc->maxChannels == 1)
+ {
+ pDescriptor->profileSetting
+ =XA_AUDIOPROFILE_MPEG1_L3;
+ pDescriptor->modeSetting
+ =XA_AUDIOCHANMODE_MP3_MONO;
+ }
+ else
+ {
+ pDescriptor->profileSetting
+ =XA_AUDIOPROFILE_MPEG2_L3;
+ pDescriptor->modeSetting
+ =XA_AUDIOCHANMODE_MP3_STEREO;
+ }
+ }
+ else
+ {
+ /* do nothing */
+ }
+ /*other caps undefined*/
}
- else if (temp.xaid == XA_ADAPTID_VORBIS) /* for ogg */
- {
- if (desc->maxChannels == 1)
- {
- pDescriptor->profileSetting=XA_AUDIOPROFILE_MPEG1_L3;
- pDescriptor->modeSetting=XA_AUDIOCHANMODE_MP3_MONO;
- }
- else
- {
- pDescriptor->profileSetting=XA_AUDIOPROFILE_MPEG2_L3;
- pDescriptor->modeSetting=XA_AUDIOCHANMODE_MP3_STEREO;
- }
- }
- else
- {
- /* do nothing */
- }
- /*other caps undefined*/
+
}
-
}
}
- }
DEBUG_API("<-XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoderCapabilities");
return res;
-}
-
+ }
/*****************************************************************************
* XAAudioDecoderCapabilitiesItfImpl -specific methods
@@ -194,38 +202,39 @@
* Description: Allocate and initialize XAAudioDecoderCapabilitiesItfImpl
*/
XAAudioDecoderCapabilitiesItfImpl* XAAudioDecoderCapabilitiesItfImpl_Create()
-{
- XAAudioDecoderCapabilitiesItfImpl* self = (XAAudioDecoderCapabilitiesItfImpl*)
- calloc(1,sizeof(XAAudioDecoderCapabilitiesItfImpl));
+ {
+ XAAudioDecoderCapabilitiesItfImpl* self =
+ (XAAudioDecoderCapabilitiesItfImpl*) calloc(1,
+ sizeof(XAAudioDecoderCapabilitiesItfImpl));
DEBUG_API("->XAAudioDecoderCapabilitiesItfImpl_Create");
- if( self )
- {
+ if (self)
+ {
/* init itf default implementation */
- self->itf.GetAudioDecoders =
- XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoders;
- self->itf.GetAudioDecoderCapabilities =
- XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoderCapabilities;
+ self->itf.GetAudioDecoders
+ = XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoders;
+ self->itf.GetAudioDecoderCapabilities
+ = XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoderCapabilities;
/* init variables */
-
+
assert( XACapabilitiesMgr_GetCapsCount(NULL, (XACapsType)(XACAP_DECODER|XACAP_AUDIO),
- &(self->numCodecs) ) == XA_RESULT_SUCCESS );
+ &(self->numCodecs) ) == XA_RESULT_SUCCESS );
self->self = self;
+ }DEBUG_API("<-XAAudioDecoderCapabilitiesItfImpl_Create");
+ return self;
}
- DEBUG_API("<-XAAudioDecoderCapabilitiesItfImpl_Create");
- return self;
-}
/* void XAAudioDecoderCapabilitiesItfImpl_Free
* Description: Free all resources reserved at XAAudioDecoderCapabilitiesItfImpl_Create
*/
-void XAAudioDecoderCapabilitiesItfImpl_Free(XAAudioDecoderCapabilitiesItfImpl* self)
-{
+void XAAudioDecoderCapabilitiesItfImpl_Free(
+ XAAudioDecoderCapabilitiesItfImpl* self)
+ {
DEBUG_API("->XAAudioDecoderCapabilitiesItfImpl_Free");
assert(self==self->self);
free(self);
DEBUG_API("<-XAAudioDecoderCapabilitiesItfImpl_Free");
-}
+ }
--- a/khronosfws/openmax_al/src/engine/xaaudiodecodercapabilitiesitf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaaudiodecodercapabilitiesitf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Audio Encoder Itf Header
+ *
+ */
#ifndef XAAUDIODECODERCAPABILITIESITF_H
#define XAAUDIODECODERCAPABILITIESITF_H
@@ -30,29 +30,28 @@
/** STRUCTURES **/
/* Definition of XAAudioDecoderCapabilitiesItf implementation */
typedef struct XAAudioDecoderCapabilitiesItfImpl_
-{
+ {
/* parent interface */
struct XAAudioDecoderCapabilitiesItf_ itf;
/* pointer to self */
struct XAAudioDecoderCapabilitiesItfImpl_* self;
/* variables */
XAuint32 numCodecs;
-} XAAudioDecoderCapabilitiesItfImpl;
+ } XAAudioDecoderCapabilitiesItfImpl;
/* Base interface XAAudioDecoderCapabilitiesItf implementation */
XAresult XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoders(
- XAAudioDecoderCapabilitiesItf self,
- XAuint32* pNumDecoders,
- XAuint32* pDecoderIds);
+ XAAudioDecoderCapabilitiesItf self, XAuint32* pNumDecoders,
+ XAuint32* pDecoderIds);
XAresult XAAudioDecoderCapabilitiesItfImpl_GetAudioDecoderCapabilities(
- XAAudioDecoderCapabilitiesItf self,
- XAuint32 decoderId,
- XAuint32* pIndex,
- XAAudioCodecDescriptor* pDescriptor);
+ XAAudioDecoderCapabilitiesItf self, XAuint32 decoderId,
+ XAuint32* pIndex, XAAudioCodecDescriptor* pDescriptor);
/* XAAudioDecoderCapabilitiesItfImpl -specific methods */
-XAAudioDecoderCapabilitiesItfImpl* XAAudioDecoderCapabilitiesItfImpl_Create(void);
-void XAAudioDecoderCapabilitiesItfImpl_Free(XAAudioDecoderCapabilitiesItfImpl* self);
+XAAudioDecoderCapabilitiesItfImpl* XAAudioDecoderCapabilitiesItfImpl_Create(
+ void);
+void XAAudioDecoderCapabilitiesItfImpl_Free(
+ XAAudioDecoderCapabilitiesItfImpl* self);
#endif /* XAAUDIODECODERCAPABILITIESITF_H */
--- a/khronosfws/openmax_al/src/engine/xaaudioencodercapabilitiesitf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaaudioencodercapabilitiesitf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Audio Encoder capabilities Itf Implementation
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
@@ -28,18 +28,20 @@
/* XAAudioEncoderCapabilitiesItfImpl* GetImpl
* Description: Validate interface pointer and cast it to implementation pointer.
*/
-static XAAudioEncoderCapabilitiesItfImpl* GetImpl(XAAudioEncoderCapabilitiesItf self)
-{
- if( self )
+static XAAudioEncoderCapabilitiesItfImpl* GetImpl(
+ XAAudioEncoderCapabilitiesItf self)
{
- XAAudioEncoderCapabilitiesItfImpl* impl = (XAAudioEncoderCapabilitiesItfImpl*)(*self);
- if( impl && (impl == impl->self) )
+ if (self)
{
+ XAAudioEncoderCapabilitiesItfImpl* impl =
+ (XAAudioEncoderCapabilitiesItfImpl*) (*self);
+ if (impl && (impl == impl->self))
+ {
return impl;
+ }
}
+ return NULL;
}
- return NULL;
-}
/*****************************************************************************
* Base interface XAAudioEncoderCapabilitiesItf implementation
@@ -49,66 +51,63 @@
* Description: Retrieves the available audio encoders.
*/
XAresult XAAudioEncoderCapabilitiesItfImpl_GetAudioEncoders(
- XAAudioEncoderCapabilitiesItf self,
- XAuint32* pNumEncoders,
- XAuint32* pEncoderIds)
-{
+ XAAudioEncoderCapabilitiesItf self, XAuint32* pNumEncoders,
+ XAuint32* pEncoderIds)
+ {
XAAudioEncoderCapabilitiesItfImpl* impl = GetImpl(self);
XAresult res = XA_RESULT_SUCCESS;
DEBUG_API("->XAAudioEncoderCapabilitiesItfImpl_GetAudioEncoders");
-
- if( !impl || !pNumEncoders )
- {
+
+ if (!impl || !pNumEncoders)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
res = XA_RESULT_PARAMETER_INVALID;
- }
+ }
else
- {
- if( pEncoderIds )
- { /* query array of encoders */
- if( *pNumEncoders < impl->numCodecs )
- {
+ {
+ if (pEncoderIds)
+ { /* query array of encoders */
+ if (*pNumEncoders < impl->numCodecs)
+ {
DEBUG_ERR("XA_RESULT_BUFFER_INSUFFICIENT");
res = XA_RESULT_BUFFER_INSUFFICIENT;
- }
+ }
else
- {
-
+ {
+
XAuint32 i = 0;
XACapabilities temp;
- for( i=0; i<impl->numCodecs; i++ )
- {
+ for (i = 0; i < impl->numCodecs; i++)
+ {
/* query encoder id from adaptation using index value */
- XACapabilitiesMgr_GetCapsByIdx(impl->capslist, (XACapsType)(XACAP_ENCODER|XACAP_AUDIO), i, &temp);
+ XACapabilitiesMgr_GetCapsByIdx(impl->capslist,
+ (XACapsType) (XACAP_ENCODER | XACAP_AUDIO), i,
+ &temp);
pEncoderIds[i] = temp.xaid;
- }
+ }
- pEncoderIds[0] = XA_AUDIOCODEC_AMR;
- pEncoderIds[1] = XA_AUDIOCODEC_AAC;
- pEncoderIds[2] = XA_AUDIOCODEC_PCM;
+ pEncoderIds[0] = XA_AUDIOCODEC_AMR;
+ pEncoderIds[1] = XA_AUDIOCODEC_AAC;
+ pEncoderIds[2] = XA_AUDIOCODEC_PCM;
+ }
}
- }
- /* return number of encoders */
- *pNumEncoders = impl->numCodecs;
+ /* return number of encoders */
+ *pNumEncoders = impl->numCodecs;
+ }DEBUG_API("<-XAAudioEncoderCapabilitiesItfImpl_GetAudioEncoders");
+ return res;
}
- DEBUG_API("<-XAAudioEncoderCapabilitiesItfImpl_GetAudioEncoders");
- return res;
-}
/* XAresult XAAudioEncoderCapabilitiesItfImpl_GetAudioEncoderCapabilities
* Description: Queries for the audio encoders capabilities.
*/
XAresult XAAudioEncoderCapabilitiesItfImpl_GetAudioEncoderCapabilities(
- XAAudioEncoderCapabilitiesItf self,
- XAuint32 encoderId,
- XAuint32 *pIndex,
- XAAudioCodecDescriptor *pDescriptor)
-{
+ XAAudioEncoderCapabilitiesItf self, XAuint32 encoderId,
+ XAuint32 *pIndex, XAAudioCodecDescriptor *pDescriptor)
+ {
XAAudioEncoderCapabilitiesItfImpl* impl = GetImpl(self);
XAresult res = XA_RESULT_SUCCESS;
-
XACapabilities temp;
DEBUG_API("->XAAudioEncoderCapabilitiesItfImpl_GetAudioEncoderCapabilities");
@@ -117,27 +116,27 @@
/*Removing the pDescriptor because the client can pass
* it as NULL to query the pIndex for number of Codec/Mode
* pair capabilities for each encoder */
- if( !impl || !pIndex )
- {
+ if (!impl || !pIndex)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
res = XA_RESULT_PARAMETER_INVALID;
return res;
- }
+ }
else
- {
- *pIndex = 1;
- if(!pDescriptor)
+ {
+ *pIndex = 1;
+ if (!pDescriptor)
{
return res;
}
- }
-
- /* query capabilities from adaptation using codec id */
- memset(pDescriptor,0,sizeof(XAAudioCodecDescriptor));
-
+ }
+
+ /* query capabilities from adaptation using codec id */
+ memset(pDescriptor, 0, sizeof(XAAudioCodecDescriptor));
+
switch (encoderId)
{
- case XA_AUDIOCODEC_AMR:
+ case XA_AUDIOCODEC_AMR:
{
impl->sampleRateArray[0] = 8000000;
@@ -147,27 +146,29 @@
impl->bitRateArray[3] = 6700;
impl->bitRateArray[4] = 7400;
impl->bitRateArray[5] = 7950;
- impl->bitRateArray[6] = 10200;
+ impl->bitRateArray[6] = 10200;
impl->bitRateArray[7] = 12200;
pDescriptor->maxChannels = 1;
pDescriptor->minBitsPerSample = 8;
pDescriptor->maxBitsPerSample = 8;
- pDescriptor->minSampleRate = 8000000; /*milliHz*/
+ pDescriptor->minSampleRate = 8000000; /*milliHz*/
pDescriptor->maxSampleRate = 8000000;
- pDescriptor->isFreqRangeContinuous=XA_BOOLEAN_FALSE;
- pDescriptor->pSampleRatesSupported = (XAmilliHertz*)(&(impl->sampleRateArray));
+ pDescriptor->isFreqRangeContinuous = XA_BOOLEAN_FALSE;
+ pDescriptor->pSampleRatesSupported
+ = (XAmilliHertz*) (&(impl->sampleRateArray));
pDescriptor->numSampleRatesSupported = 1;
- pDescriptor->minBitRate=4750;
- pDescriptor->maxBitRate=12200;
- pDescriptor->isBitrateRangeContinuous=XA_BOOLEAN_FALSE;
- pDescriptor->pBitratesSupported = (XAuint32*)(&(impl->bitRateArray));
+ pDescriptor->minBitRate = 4750;
+ pDescriptor->maxBitRate = 12200;
+ pDescriptor->isBitrateRangeContinuous = XA_BOOLEAN_FALSE;
+ pDescriptor->pBitratesSupported
+ = (XAuint32*) (&(impl->bitRateArray));
pDescriptor->numBitratesSupported = 8;
pDescriptor->profileSetting = XA_AUDIOPROFILE_AMR;
pDescriptor->modeSetting = 0;
}
break;
- case XA_AUDIOCODEC_AAC:
+ case XA_AUDIOCODEC_AAC:
{
impl->sampleRateArray[0] = 8000000;
impl->sampleRateArray[1] = 11025000;
@@ -183,27 +184,29 @@
impl->bitRateArray[3] = 128000;
impl->bitRateArray[4] = 160000;
impl->bitRateArray[5] = 192000;
- impl->bitRateArray[6] = 224000;
- impl->bitRateArray[7] = 256000;
-
+ impl->bitRateArray[6] = 224000;
+ impl->bitRateArray[7] = 256000;
+
pDescriptor->maxChannels = 2;
pDescriptor->minBitsPerSample = 16;
pDescriptor->maxBitsPerSample = 16;
- pDescriptor->minSampleRate = 8000*1000; /*milliHz*/
+ pDescriptor->minSampleRate = 8000 * 1000; /*milliHz*/
pDescriptor->maxSampleRate = 48000 * 1000;
- pDescriptor->isFreqRangeContinuous=XA_BOOLEAN_FALSE;
- pDescriptor->pSampleRatesSupported = (XAmilliHertz*)(&(impl->sampleRateArray));
+ pDescriptor->isFreqRangeContinuous = XA_BOOLEAN_FALSE;
+ pDescriptor->pSampleRatesSupported
+ = (XAmilliHertz*) (&(impl->sampleRateArray));
pDescriptor->numSampleRatesSupported = 7;
- pDescriptor->minBitRate=32000;
- pDescriptor->maxBitRate=256000;
- pDescriptor->isBitrateRangeContinuous=XA_BOOLEAN_FALSE;
- pDescriptor->pBitratesSupported = (XAuint32*)(&(impl->bitRateArray));
+ pDescriptor->minBitRate = 32000;
+ pDescriptor->maxBitRate = 256000;
+ pDescriptor->isBitrateRangeContinuous = XA_BOOLEAN_FALSE;
+ pDescriptor->pBitratesSupported
+ = (XAuint32*) (&(impl->bitRateArray));
pDescriptor->numBitratesSupported = 8;
pDescriptor->profileSetting = XA_AUDIOPROFILE_AAC_AAC;
pDescriptor->modeSetting = XA_AUDIOMODE_AAC_LC;
}
break;
- case XA_AUDIOCODEC_PCM:
+ case XA_AUDIOCODEC_PCM:
{
impl->sampleRateArray[0] = 12000000;
impl->sampleRateArray[1] = 16000000;
@@ -219,75 +222,75 @@
pDescriptor->maxChannels = 2;
pDescriptor->minBitsPerSample = 16;
pDescriptor->maxBitsPerSample = 16;
- pDescriptor->minSampleRate = 8000000; /*milliHz*/
+ pDescriptor->minSampleRate = 8000000; /*milliHz*/
pDescriptor->maxSampleRate = 96000000;
- pDescriptor->isFreqRangeContinuous=XA_BOOLEAN_FALSE;
- pDescriptor->pSampleRatesSupported = (XAmilliHertz*)(&(impl->sampleRateArray));
+ pDescriptor->isFreqRangeContinuous = XA_BOOLEAN_FALSE;
+ pDescriptor->pSampleRatesSupported
+ = (XAmilliHertz*) (&(impl->sampleRateArray));
pDescriptor->numSampleRatesSupported = 10;
- pDescriptor->minBitRate= 0;
- pDescriptor->maxBitRate= 0;
- pDescriptor->isBitrateRangeContinuous=XA_BOOLEAN_FALSE;
+ pDescriptor->minBitRate = 0;
+ pDescriptor->maxBitRate = 0;
+ pDescriptor->isBitrateRangeContinuous = XA_BOOLEAN_FALSE;
pDescriptor->pBitratesSupported = NULL;
pDescriptor->numBitratesSupported = 0;
- pDescriptor->profileSetting = XA_AUDIOPROFILE_PCM ;
- pDescriptor->modeSetting = 0;
+ pDescriptor->profileSetting = XA_AUDIOPROFILE_PCM;
+ pDescriptor->modeSetting = 0;
}
break;
}
-
-
-
- res = XACapabilitiesMgr_GetCapsById(impl->capslist, (XACapsType)(XACAP_ENCODER|XACAP_AUDIO), encoderId, &temp);
- if( res == XA_RESULT_SUCCESS )
- {
- XAAudioCodecDescriptor* desc = ((XAAudioCodecDescriptor*)(temp.pEntry));
- /* map applicable values to XAAudioCodecCapabilities */
- pDescriptor->maxChannels = desc->maxChannels;
- pDescriptor->minSampleRate= desc->minSampleRate*1000; /* milliHz */
- if (desc->maxSampleRate < (0xFFFFFFFF / 1000))
- {
- pDescriptor->maxSampleRate = desc->maxSampleRate*1000;
- }
- else
- {
- pDescriptor->maxSampleRate = 0xFFFFFFFF;
- }
- pDescriptor->minBitsPerSample=desc->minBitsPerSample;
- pDescriptor->maxBitsPerSample=desc->maxBitsPerSample;
- pDescriptor->isFreqRangeContinuous=XA_BOOLEAN_TRUE;
- pDescriptor->minBitRate=desc->minBitRate;
- pDescriptor->maxBitRate=desc->maxBitRate;
- pDescriptor->numBitratesSupported = desc->numBitratesSupported;
- pDescriptor->isBitrateRangeContinuous=XA_BOOLEAN_TRUE;
- if (temp.xaid == XA_AUDIOCODEC_PCM )
- {
- pDescriptor->profileSetting=XA_AUDIOPROFILE_PCM;
- pDescriptor->modeSetting=0; /* no chanmode for pcm defined */
- }
- else if (temp.xaid == XA_ADAPTID_VORBIS) /* for ogg */
- {
- if (desc->maxChannels == 1)
- {
- pDescriptor->profileSetting=XA_AUDIOPROFILE_MPEG1_L3;
- pDescriptor->modeSetting=XA_AUDIOCHANMODE_MP3_MONO;
- }
- else
- {
- pDescriptor->profileSetting=XA_AUDIOPROFILE_MPEG2_L3;
- pDescriptor->modeSetting=XA_AUDIOCHANMODE_MP3_STEREO;
- }
- }
- else
- {
- /* do nothing */
- }
-
- }
-
+
+ res = XACapabilitiesMgr_GetCapsById(impl->capslist,
+ (XACapsType) (XACAP_ENCODER | XACAP_AUDIO), encoderId, &temp);
+ if (res == XA_RESULT_SUCCESS)
+ {
+ XAAudioCodecDescriptor* desc =
+ ((XAAudioCodecDescriptor*) (temp.pEntry));
+ /* map applicable values to XAAudioCodecCapabilities */
+ pDescriptor->maxChannels = desc->maxChannels;
+ pDescriptor->minSampleRate = desc->minSampleRate * 1000; /* milliHz */
+ if (desc->maxSampleRate < (0xFFFFFFFF / 1000))
+ {
+ pDescriptor->maxSampleRate = desc->maxSampleRate * 1000;
+ }
+ else
+ {
+ pDescriptor->maxSampleRate = 0xFFFFFFFF;
+ }
+ pDescriptor->minBitsPerSample = desc->minBitsPerSample;
+ pDescriptor->maxBitsPerSample = desc->maxBitsPerSample;
+ pDescriptor->isFreqRangeContinuous = XA_BOOLEAN_TRUE;
+ pDescriptor->minBitRate = desc->minBitRate;
+ pDescriptor->maxBitRate = desc->maxBitRate;
+ pDescriptor->numBitratesSupported = desc->numBitratesSupported;
+ pDescriptor->isBitrateRangeContinuous = XA_BOOLEAN_TRUE;
+ if (temp.xaid == XA_AUDIOCODEC_PCM)
+ {
+ pDescriptor->profileSetting = XA_AUDIOPROFILE_PCM;
+ pDescriptor->modeSetting = 0; /* no chanmode for pcm defined */
+ }
+ else if (temp.xaid == XA_ADAPTID_VORBIS) /* for ogg */
+ {
+ if (desc->maxChannels == 1)
+ {
+ pDescriptor->profileSetting = XA_AUDIOPROFILE_MPEG1_L3;
+ pDescriptor->modeSetting = XA_AUDIOCHANMODE_MP3_MONO;
+ }
+ else
+ {
+ pDescriptor->profileSetting = XA_AUDIOPROFILE_MPEG2_L3;
+ pDescriptor->modeSetting = XA_AUDIOCHANMODE_MP3_STEREO;
+ }
+ }
+ else
+ {
+ /* do nothing */
+ }
+
+ }
+
DEBUG_API("<-XAAudioEncoderCapabilitiesItfImpl_GetAudioEncoderCapabilities");
return res;
-}
-
+ }
/*****************************************************************************
* XAAudioEncoderCapabilitiesItfImpl -specific methods
@@ -296,42 +299,44 @@
/* XAAudioEncoderCapabilitiesItfImpl_Create
* Description: Allocate and initialize XAAudioEncoderCapabilitiesItfImpl
*/
-XAAudioEncoderCapabilitiesItfImpl* XAAudioEncoderCapabilitiesItfImpl_Create(XACapabilities* caps)
-{
- XAAudioEncoderCapabilitiesItfImpl* self = (XAAudioEncoderCapabilitiesItfImpl*)
- calloc(1,sizeof(XAAudioEncoderCapabilitiesItfImpl));
+XAAudioEncoderCapabilitiesItfImpl* XAAudioEncoderCapabilitiesItfImpl_Create(
+ XACapabilities* caps)
+ {
+ XAAudioEncoderCapabilitiesItfImpl* self =
+ (XAAudioEncoderCapabilitiesItfImpl*) calloc(1,
+ sizeof(XAAudioEncoderCapabilitiesItfImpl));
DEBUG_API("->XAAudioEncoderCapabilitiesItfImpl_Create");
- if( self )
- {
+ if (self)
+ {
/* init itf default implementation */
- self->itf.GetAudioEncoders =
- XAAudioEncoderCapabilitiesItfImpl_GetAudioEncoders;
- self->itf.GetAudioEncoderCapabilities =
- XAAudioEncoderCapabilitiesItfImpl_GetAudioEncoderCapabilities;
+ self->itf.GetAudioEncoders
+ = XAAudioEncoderCapabilitiesItfImpl_GetAudioEncoders;
+ self->itf.GetAudioEncoderCapabilities
+ = XAAudioEncoderCapabilitiesItfImpl_GetAudioEncoderCapabilities;
self->capslist = caps;
-
+
/* init variables */
assert( XACapabilitiesMgr_GetCapsCount( caps, (XACapsType)((XACapsType)(XACAP_ENCODER|XACAP_AUDIO)),
- &(self->numCodecs) ) == XA_RESULT_SUCCESS );
+ &(self->numCodecs) ) == XA_RESULT_SUCCESS );
/*self->mmfEngine = (void*)mmf_capability_engine_init();*/
self->numCodecs = 3;
self->self = self;
-
+
+ }DEBUG_API("<-XAAudioEncoderCapabilitiesItfImpl_Create");
+ return self;
}
- DEBUG_API("<-XAAudioEncoderCapabilitiesItfImpl_Create");
- return self;
-}
/* void XAAudioEncoderCapabilitiesItfImpl_Free
* Description: Free all resources reserved at XAAudioEncoderCapabilitiesItfImpl_Create
*/
-void XAAudioEncoderCapabilitiesItfImpl_Free(XAAudioEncoderCapabilitiesItfImpl* self)
-{
+void XAAudioEncoderCapabilitiesItfImpl_Free(
+ XAAudioEncoderCapabilitiesItfImpl* self)
+ {
DEBUG_API("->XAAudioEncoderCapabilitiesItfImpl_Free");
assert(self==self->self);
free(self);
DEBUG_API("<-XAAudioEncoderCapabilitiesItfImpl_Free");
-}
+ }
--- a/khronosfws/openmax_al/src/engine/xaaudioencodercapabilitiesitf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaaudioencodercapabilitiesitf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Audio Encoder capabilities Itf Header
+ *
+ */
#ifndef XAAUDIOENCODERCAPABILITIESITF_H
#define XAAUDIOENCODERCAPABILITIESITF_H
@@ -30,7 +30,7 @@
/** STRUCTURES **/
/* Definition of XAAudioEncoderCapabilitiesItf implementation */
typedef struct XAAudioEncoderCapabilitiesItfImpl_
-{
+ {
/* parent interface */
struct XAAudioEncoderCapabilitiesItf_ itf;
/* pointer to self */
@@ -41,22 +41,21 @@
XAuint32 bitRateArray[10];
void* mmfEngine;
XACapabilities* capslist;
-} XAAudioEncoderCapabilitiesItfImpl;
+ } XAAudioEncoderCapabilitiesItfImpl;
/* Base interface XAAudioEncoderCapabilitiesItf implementation */
XAresult XAAudioEncoderCapabilitiesItfImpl_GetAudioEncoders(
- XAAudioEncoderCapabilitiesItf self,
- XAuint32* pNumEncoders,
- XAuint32* pEncoderIds);
+ XAAudioEncoderCapabilitiesItf self, XAuint32* pNumEncoders,
+ XAuint32* pEncoderIds);
XAresult XAAudioEncoderCapabilitiesItfImpl_GetAudioEncoderCapabilities(
- XAAudioEncoderCapabilitiesItf self,
- XAuint32 encoderId,
- XAuint32* pIndex,
- XAAudioCodecDescriptor* pCapabilities);
+ XAAudioEncoderCapabilitiesItf self, XAuint32 encoderId,
+ XAuint32* pIndex, XAAudioCodecDescriptor* pCapabilities);
/* XAAudioEncoderCapabilitiesItfImpl -specific methods */
-XAAudioEncoderCapabilitiesItfImpl* XAAudioEncoderCapabilitiesItfImpl_Create(XACapabilities* caps);
-void XAAudioEncoderCapabilitiesItfImpl_Free(XAAudioEncoderCapabilitiesItfImpl* self);
+XAAudioEncoderCapabilitiesItfImpl* XAAudioEncoderCapabilitiesItfImpl_Create(
+ XACapabilities* caps);
+void XAAudioEncoderCapabilitiesItfImpl_Free(
+ XAAudioEncoderCapabilitiesItfImpl* self);
#endif /* XAAUDIOENCODERCAPABILITIESITF_H */
--- a/khronosfws/openmax_al/src/engine/xaaudioiodevicecapabilitiesitf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaaudioiodevicecapabilitiesitf.c Wed Jun 23 18:47:10 2010 +0300
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description: Audio IO Device capabilities Itf
*
*/
--- a/khronosfws/openmax_al/src/engine/xaaudioiodevicecapabilitiesitf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaaudioiodevicecapabilitiesitf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Audio IO Device capabilities Itf
+ *
+ */
#ifndef XAAUDIOIODEVICECAPABILITIESITF_H
#define XAAUDIOIODEVICECAPABILITIESITF_H
@@ -30,7 +30,7 @@
/** STRUCTURES **/
/* Definition of XAAudioIODeviceCapabilitiesItf implementation */
typedef struct XAAudIODevCapaItfImpl_
-{
+ {
/* parent interface */
struct XAAudioIODeviceCapabilitiesItf_ itf;
/* pointer to self */
@@ -51,58 +51,54 @@
XAuint32 numOutputDevices;
XAmilliHertz sampleRateArray[12];
XACapabilities* capslist;
-
-} XAAudIODevCapaItfImpl;
+
+ } XAAudIODevCapaItfImpl;
/* Base interface XAAudioIODeviceCapabilitiesItf implementation */
-XAresult XAAudIODevCapaItfImpl_GetAvailableAudioInputs(XAAudioIODeviceCapabilitiesItf self,
- XAint32* pNumInputs,
- XAuint32* pInputDeviceIDs);
+XAresult XAAudIODevCapaItfImpl_GetAvailableAudioInputs(
+ XAAudioIODeviceCapabilitiesItf self, XAint32* pNumInputs,
+ XAuint32* pInputDeviceIDs);
-XAresult XAAudIODevCapaItfImpl_QueryAudioInputCapabilities(XAAudioIODeviceCapabilitiesItf self,
- XAuint32 deviceId,
- XAAudioInputDescriptor* pDescriptor);
-
-XAresult XAAudIODevCapaItfImpl_RegisterAvailableAudioInputsChangedCallback(XAAudioIODeviceCapabilitiesItf self,
- xaAvailableAudioInputsChangedCallback callback,
- void* pContext);
+XAresult XAAudIODevCapaItfImpl_QueryAudioInputCapabilities(
+ XAAudioIODeviceCapabilitiesItf self, XAuint32 deviceId,
+ XAAudioInputDescriptor* pDescriptor);
-XAresult XAAudIODevCapaItfImpl_GetAvailableAudioOutputs(XAAudioIODeviceCapabilitiesItf self,
- XAint32* pNumOutputs,
- XAuint32* pOutputDeviceIDs);
+XAresult XAAudIODevCapaItfImpl_RegisterAvailableAudioInputsChangedCallback(
+ XAAudioIODeviceCapabilitiesItf self,
+ xaAvailableAudioInputsChangedCallback callback, void* pContext);
-XAresult XAAudIODevCapaItfImpl_QueryAudioOutputCapabilities(XAAudioIODeviceCapabilitiesItf self,
- XAuint32 deviceId,
- XAAudioOutputDescriptor* pDescriptor);
+XAresult XAAudIODevCapaItfImpl_GetAvailableAudioOutputs(
+ XAAudioIODeviceCapabilitiesItf self, XAint32* pNumOutputs,
+ XAuint32* pOutputDeviceIDs);
-XAresult XAAudIODevCapaItfImpl_RegisterAvailableAudioOutputsChangedCallback(XAAudioIODeviceCapabilitiesItf self,
- xaAvailableAudioOutputsChangedCallback callback,
- void* pContext);
+XAresult XAAudIODevCapaItfImpl_QueryAudioOutputCapabilities(
+ XAAudioIODeviceCapabilitiesItf self, XAuint32 deviceId,
+ XAAudioOutputDescriptor* pDescriptor);
-XAresult XAAudIODevCapaItfImpl_RegisterDefaultDeviceIDMapChangedCallback(XAAudioIODeviceCapabilitiesItf self,
- xaDefaultDeviceIDMapChangedCallback callback,
- void* pContext);
+XAresult XAAudIODevCapaItfImpl_RegisterAvailableAudioOutputsChangedCallback(
+ XAAudioIODeviceCapabilitiesItf self,
+ xaAvailableAudioOutputsChangedCallback callback, void* pContext);
-XAresult XAAudIODevCapaItfImpl_GetAssociatedAudioInputs(XAAudioIODeviceCapabilitiesItf self,
- XAuint32 deviceId,
- XAint32* pNumAudioInputs,
- XAuint32* pAudioInputDeviceIDs);
+XAresult XAAudIODevCapaItfImpl_RegisterDefaultDeviceIDMapChangedCallback(
+ XAAudioIODeviceCapabilitiesItf self,
+ xaDefaultDeviceIDMapChangedCallback callback, void* pContext);
+
+XAresult XAAudIODevCapaItfImpl_GetAssociatedAudioInputs(
+ XAAudioIODeviceCapabilitiesItf self, XAuint32 deviceId,
+ XAint32* pNumAudioInputs, XAuint32* pAudioInputDeviceIDs);
-XAresult XAAudIODevCapaItfImpl_GetAssociatedAudioOutputs(XAAudioIODeviceCapabilitiesItf self,
- XAuint32 deviceId,
- XAint32* pNumAudioOutputs,
- XAuint32* pAudioOutputDeviceIDs);
+XAresult XAAudIODevCapaItfImpl_GetAssociatedAudioOutputs(
+ XAAudioIODeviceCapabilitiesItf self, XAuint32 deviceId,
+ XAint32* pNumAudioOutputs, XAuint32* pAudioOutputDeviceIDs);
-XAresult XAAudIODevCapaItfImpl_GetDefaultAudioDevices(XAAudioIODeviceCapabilitiesItf self,
- XAuint32 defaultDeviceID,
- XAint32 *pNumAudioDevices,
- XAuint32 *pAudioDeviceIDs);
+XAresult XAAudIODevCapaItfImpl_GetDefaultAudioDevices(
+ XAAudioIODeviceCapabilitiesItf self, XAuint32 defaultDeviceID,
+ XAint32 *pNumAudioDevices, XAuint32 *pAudioDeviceIDs);
-XAresult XAAudIODevCapaItfImpl_QuerySampleFormatsSupported(XAAudioIODeviceCapabilitiesItf self,
- XAuint32 deviceId,
- XAmilliHertz samplingRate,
- XAint32* pSampleFormats,
- XAint32* pNumOfSampleFormats);
+XAresult XAAudIODevCapaItfImpl_QuerySampleFormatsSupported(
+ XAAudioIODeviceCapabilitiesItf self, XAuint32 deviceId,
+ XAmilliHertz samplingRate, XAint32* pSampleFormats,
+ XAint32* pNumOfSampleFormats);
/* XAAudIODevCapaItfImpl -specific methods */
XAAudIODevCapaItfImpl* XAAudIODevCapaItfImpl_Create(XACapabilities* caps);
--- a/khronosfws/openmax_al/src/engine/xaengine.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaengine.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Engine Implementation
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
@@ -38,26 +38,26 @@
#include "xaframeworkmgr.h"
#include "xastaticcameracapsadaptation.h"
-
/* Static mapping of enumeration XAEngineInterfaces to interface iids */
-static const XAInterfaceID* xaEngineItfIIDs[ENGINE_ITFCOUNT]={
+static const XAInterfaceID* xaEngineItfIIDs[ENGINE_ITFCOUNT] =
+ {
&XA_IID_OBJECT,
&XA_IID_ENGINE,
&XA_IID_DYNAMICINTERFACEMANAGEMENT,
&XA_IID_THREADSYNC,
-/* &XA_IID_CONFIGEXTENSION,*/
-/* &XA_IID_DEVICEVOLUME,*/
+ /* &XA_IID_CONFIGEXTENSION,*/
+ /* &XA_IID_DEVICEVOLUME,*/
&XA_IID_AUDIOIODEVICECAPABILITIES,
-/* &XA_IID_AUDIODECODERCAPABILITIES,*/
+ /* &XA_IID_AUDIODECODERCAPABILITIES,*/
&XA_IID_AUDIOENCODERCAPABILITIES
-/*
+ /*
&XA_IID_CAMERACAPABILITIES,
&XA_IID_IMAGEDECODERCAPABILITIES,
&XA_IID_IMAGEENCODERCAPABILITIES,
&XA_IID_VIDEODECODERCAPABILITIES,
&XA_IID_VIDEOENCODERCAPABILITIES
-*/
-};
+ */
+ };
/*****************************************************************************
* Global methods
@@ -66,13 +66,11 @@
/* XAResult XAEngineImpl_Create
* Description: Create object
*/
-XAresult XAEngineImpl_Create(XAObjectItf *pEngine,
- XAuint32 numOptions,
- const XAEngineOption *pEngineOptions,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired)
-{
+XAresult XAEngineImpl_Create(XAObjectItf *pEngine, XAuint32 numOptions,
+ const XAEngineOption *pEngineOptions, XAuint32 numInterfaces,
+ const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired)
+ {
XAEngineImpl* pImpl = NULL;
XAObjectItfImpl* pBaseObj = NULL;
XAuint32 itfIndex = 0;
@@ -80,160 +78,148 @@
XAboolean threadSafeEnabled = XA_BOOLEAN_TRUE;
DEBUG_API("->XAEngineImpl_Create");
- if( !pEngine )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAEngineImpl_Create");
+ if (!pEngine)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAEngineImpl_Create");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
/* check engine options */
- if( pEngineOptions && (numOptions != 0))
- {
+ if (pEngineOptions && (numOptions != 0))
+ {
int i;
- for(i = 0; i<numOptions; i++)
- {
- if (pEngineOptions[i].feature==XA_ENGINEOPTION_LOSSOFCONTROL)
+ for (i = 0; i < numOptions; i++)
{
+ if (pEngineOptions[i].feature == XA_ENGINEOPTION_LOSSOFCONTROL)
+ {
//XAboolean optEnabled = pEngineOptions[i].data;
// TODO: do something with the above value or else remove the code
- }
- if (pEngineOptions[i].feature==XA_ENGINEOPTION_THREADSAFE)
- {
+ }
+ if (pEngineOptions[i].feature == XA_ENGINEOPTION_THREADSAFE)
+ {
threadSafeEnabled = pEngineOptions[i].data;
+ }
}
}
- }
/* instantiate object implementation */
- pImpl = (XAEngineImpl*)calloc(1,sizeof(XAEngineImpl));
- if( !pImpl )
- {
- DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
- DEBUG_API("<-XAEngineImpl_Create");
+ pImpl = (XAEngineImpl*) calloc(1, sizeof(XAEngineImpl));
+ if (!pImpl)
+ {
+ DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");DEBUG_API("<-XAEngineImpl_Create");
/* memory allocation failed */
return XA_RESULT_MEMORY_FAILURE;
- }
+ }
pBaseObj = &pImpl->baseObj;
/* Initialize base object default implementation */
- XAObjectItfImpl_Init(pBaseObj,
- ENGINE_ITFCOUNT,
- xaEngineItfIIDs,
- XAEngineImpl_DoRealize,
- XAEngineImpl_DoResume,
- XAEngineImpl_FreeResources);
-
+ XAObjectItfImpl_Init(pBaseObj, ENGINE_ITFCOUNT, xaEngineItfIIDs,
+ XAEngineImpl_DoRealize, XAEngineImpl_DoResume,
+ XAEngineImpl_FreeResources);
/* Mark interfaces that need to be exposed */
/* Implicit and mandated interfaces */
pBaseObj->interfaceMap[ENGINE_ENGINEITF].required = XA_BOOLEAN_TRUE;
pBaseObj->interfaceMap[ENGINE_DIMITF].required = XA_BOOLEAN_TRUE;
pBaseObj->interfaceMap[ENGINE_THREADSYNCITF].required = XA_BOOLEAN_TRUE;
- pBaseObj->interfaceMap[ENGINE_AUDIOIODEVICECAPAITF].required = XA_BOOLEAN_TRUE;
- pBaseObj->interfaceMap[ENGINE_AUDIOENCODERCAPAITF].required = XA_BOOLEAN_TRUE;
+ pBaseObj->interfaceMap[ENGINE_AUDIOIODEVICECAPAITF].required
+ = XA_BOOLEAN_TRUE;
+ pBaseObj->interfaceMap[ENGINE_AUDIOENCODERCAPAITF].required
+ = XA_BOOLEAN_TRUE;
/* Explicit interfaces */
- if( (numInterfaces != 0) && pInterfaceIds && pInterfaceRequired )
- {
+ if ((numInterfaces != 0) && pInterfaceIds && pInterfaceRequired)
+ {
/* Check required interfaces */
- for(itfIndex = 0; itfIndex < numInterfaces; itfIndex++)
- {
+ for (itfIndex = 0; itfIndex < numInterfaces; itfIndex++)
+ {
/* If mapEntry is null then required interface is not supported.*/
- XAObjItfMapEntry *entry =
- XAObjectItfImpl_GetItfEntry((XAObjectItf)&(pBaseObj), pInterfaceIds[itfIndex]);
- if( !entry )
- {
- if( pInterfaceRequired[itfIndex] )
+ XAObjItfMapEntry *entry = XAObjectItfImpl_GetItfEntry(
+ (XAObjectItf) &(pBaseObj), pInterfaceIds[itfIndex]);
+ if (!entry)
{
+ if (pInterfaceRequired[itfIndex])
+ {
/* required interface cannot be accommodated - fail creation */
- XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
- DEBUG_ERR("Required interface not found - abort creation!");
- DEBUG_API("<-XAEngineImpl_Create");
+ XAObjectItfImpl_Destroy((XAObjectItf) &(pBaseObj));
+ DEBUG_ERR("Required interface not found - abort creation!");DEBUG_API("<-XAEngineImpl_Create");
return XA_RESULT_FEATURE_UNSUPPORTED;
- }
+ }
else
+ {
+ DEBUG_INFO("Requested (not required) interface not found - continue creation");
+ }
+ }
+ else
{
- DEBUG_INFO("Requested (not required) interface not found - continue creation");
+ entry->required = XA_BOOLEAN_TRUE;
}
}
- else
- {
- entry->required = XA_BOOLEAN_TRUE;
- }
}
- }
/* Initialize XAEngineImpl variables */
- if( threadSafeEnabled )
- {
+ if (threadSafeEnabled)
+ {
XAresult ret = XA_RESULT_SUCCESS;
pImpl->isThreadSafe = threadSafeEnabled;
- ret = XAThreadSafety_Init( threadSafeEnabled );
- if ( ret != XA_RESULT_SUCCESS )
- {
+ ret = XAThreadSafety_Init(threadSafeEnabled);
+ if (ret != XA_RESULT_SUCCESS)
+ {
DEBUG_INFO_A1("Unable to initialize thread safety - ret:%x", ret );
+ }
}
- }
-/*
-
- pImpl->adaptationCtx = XAEngineAdapt_Create();
-
-*/
/* Set ObjectItf to point to newly created object */
- *pEngine = ((XAObjectItf)&(pBaseObj->self));
+ *pEngine = ((XAObjectItf) &(pBaseObj->self));
DEBUG_API("<-XAEngineImpl_Create");
return XA_RESULT_SUCCESS;
-}
+ }
/* XAResult XAEngineImpl_QueryNumSupportedInterfaces
* Description: Statically query number of supported interfaces
*/
XAresult XAEngineImpl_QueryNumSupportedInterfaces(
- XAuint32 *pNumSupportedInterfaces)
-{
+ XAuint32 *pNumSupportedInterfaces)
+ {
DEBUG_API("->XAEngineImpl_QueryNumSupportedInterfaces");
- if(pNumSupportedInterfaces)
- {
+ if (pNumSupportedInterfaces)
+ {
*pNumSupportedInterfaces = ENGINE_ITFCOUNT;
DEBUG_API("<-XAEngineImpl_QueryNumSupportedInterfaces");
return XA_RESULT_SUCCESS;
- }
+ }
else
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAEngineImpl_QueryNumSupportedInterfaces");
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAEngineImpl_QueryNumSupportedInterfaces");
return XA_RESULT_PARAMETER_INVALID;
+ }
}
-}
/* XAResult XAEngineImpl_QuerySupportedInterfaces
* Description: Statically query supported interfaces
*/
-XAresult XAEngineImpl_QuerySupportedInterfaces(
- XAuint32 index,
- XAInterfaceID *pInterfaceId)
-{
+XAresult XAEngineImpl_QuerySupportedInterfaces(XAuint32 index,
+ XAInterfaceID *pInterfaceId)
+ {
DEBUG_API("->XAEngineImpl_QuerySupportedInterfaces");
- if (index >= ENGINE_ITFCOUNT || !pInterfaceId )
- {
- if(pInterfaceId)
+ if (index >= ENGINE_ITFCOUNT || !pInterfaceId)
+ {
+ if (pInterfaceId)
{
*pInterfaceId = XA_IID_NULL;
}
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAEngineImpl_QuerySupportedInterfaces");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
else
- {
+ {
*pInterfaceId = *(xaEngineItfIIDs[index]);
DEBUG_API("<-XAEngineImpl_QuerySupportedInterfaces");
return XA_RESULT_SUCCESS;
+ }
}
-}
/*****************************************************************************
* base object XAObjectItfImpl methods
@@ -245,54 +231,53 @@
* Called from base object XAObjectItfImpl
*/
XAresult XAEngineImpl_DoRealize(XAObjectItf self)
-{
+ {
XAuint8 itfIdx = 0;
- XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
- XAEngineImpl* pObjImpl = (XAEngineImpl*)(pObj);
+ XAObjectItfImpl* pObj = (XAObjectItfImpl*) (*self);
+ XAEngineImpl* pObjImpl = (XAEngineImpl*) (pObj);
XAresult ret = XA_RESULT_SUCCESS;
DEBUG_API("->XAEngineImpl_DoRealize");
/* check casting from correct pointer type */
- if( !pObjImpl || pObj != pObjImpl->baseObj.self )
- {
+ if (!pObjImpl || pObj != pObjImpl->baseObj.self)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAEngineImpl_DoRealize");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
-
/* Table containing use-case framework map */
pObjImpl->frameworkMap = XAFrameworkMgr_CreateFrameworkMap();
if (pObjImpl->frameworkMap == NULL)
- {
+ {
DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
DEBUG_API("<-XAEngineImpl_DoRealize");
/* memory allocation failed */
return XA_RESULT_MEMORY_FAILURE;
- }
-
+ }
/* Create capabilities list */
- ret = XACapabilitiesMgr_CreateCapabilitieList(pObjImpl->frameworkMap, &(pObjImpl->capabilities));
+ ret = XACapabilitiesMgr_CreateCapabilitieList(pObjImpl->frameworkMap,
+ &(pObjImpl->capabilities));
if (ret != XA_RESULT_SUCCESS)
{
return ret;
}
-
/* Realize all implicit and explicitly wanted interfaces */
- for(itfIdx=0; itfIdx<ENGINE_ITFCOUNT; itfIdx++)
- {
- if(!(pObj->interfaceMap[itfIdx].pItf) &&
- pObj->interfaceMap[itfIdx].required )
+ for (itfIdx = 0; itfIdx < ENGINE_ITFCOUNT; itfIdx++)
{
- void *pItf = NULL;
- switch(itfIdx)
+ if (!(pObj->interfaceMap[itfIdx].pItf)
+ && pObj->interfaceMap[itfIdx].required)
{
+ void *pItf = NULL;
+ switch (itfIdx)
+ {
case ENGINE_ENGINEITF:
- pItf = XAEngineItfImpl_Create(pObjImpl->frameworkMap, pObjImpl->capabilities);
+ pItf = XAEngineItfImpl_Create(pObjImpl->frameworkMap,
+ pObjImpl->capabilities);
break;
case ENGINE_THREADSYNCITF:
pItf = XAThreadSyncItfImpl_Create();
@@ -301,92 +286,92 @@
pItf = XADIMItfImpl_Create();
break;
case ENGINE_AUDIOIODEVICECAPAITF:
- pItf = XAAudIODevCapaItfImpl_Create(pObjImpl->capabilities);
+ pItf = XAAudIODevCapaItfImpl_Create(
+ pObjImpl->capabilities);
break;
case ENGINE_AUDIOENCODERCAPAITF:
- pItf = XAAudioEncoderCapabilitiesItfImpl_Create(pObjImpl->capabilities);
- break;
-/*
- case ENGINE_AUDIODECODERCAPAITF:
- pItf = XAAudioDecoderCapabilitiesItfImpl_Create();
+ pItf = XAAudioEncoderCapabilitiesItfImpl_Create(
+ pObjImpl->capabilities);
break;
- case ENGINE_CONFIGEXTENSIONSITF:
- pItf = XAConfigExtensionsItfImpl_Create();
- break;
- case ENGINE_DEVICEVOLUMEITF:
- pItf = XADeviceVolumeItfImpl_Create(pObjImpl->adaptationCtx);
- break;
- case ENGINE_CAMERACAPAITF:
+ /*
+ case ENGINE_AUDIODECODERCAPAITF:
+ pItf = XAAudioDecoderCapabilitiesItfImpl_Create();
+ break;
+ case ENGINE_CONFIGEXTENSIONSITF:
+ pItf = XAConfigExtensionsItfImpl_Create();
+ break;
+ case ENGINE_DEVICEVOLUMEITF:
+ pItf = XADeviceVolumeItfImpl_Create(pObjImpl->adaptationCtx);
+ break;
+ case ENGINE_CAMERACAPAITF:
- XAStaticCameraCaps_Init();
- pItf = XACameraCapabilitiesItfImpl_Create();
-
- break;
- case ENGINE_IMAGEDECODERCAPAITF:
- pItf = XAImageDecoderCapabilitiesItfImpl_Create();
- break;
- case ENGINE_IMAGEENCODERCAPAITF:
- pItf = XAImageEncoderCapabilitiesItfImpl_Create();
- break;
- case ENGINE_VIDEODECODERCAPAITF:
- pItf = XAVideoDecoderCapabilitiesItfImpl_Create();
- break;
- case ENGINE_VIDEOENCODERCAPAITF:
- pItf = XAVideoEncoderCapabilitiesItfImpl_Create();
- break;
-*/
+ XAStaticCameraCaps_Init();
+ pItf = XACameraCapabilitiesItfImpl_Create();
+
+ break;
+ case ENGINE_IMAGEDECODERCAPAITF:
+ pItf = XAImageDecoderCapabilitiesItfImpl_Create();
+ break;
+ case ENGINE_IMAGEENCODERCAPAITF:
+ pItf = XAImageEncoderCapabilitiesItfImpl_Create();
+ break;
+ case ENGINE_VIDEODECODERCAPAITF:
+ pItf = XAVideoDecoderCapabilitiesItfImpl_Create();
+ break;
+ case ENGINE_VIDEOENCODERCAPAITF:
+ pItf = XAVideoEncoderCapabilitiesItfImpl_Create();
+ break;
+ */
default:
break;
- }
- if(!pItf)
- {
- DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
- DEBUG_API("<-XAEngineImpl_DoRealize");
+ }
+ if (!pItf)
+ {
+ DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");DEBUG_API("<-XAEngineImpl_DoRealize");
/* memory allocation failed */
return XA_RESULT_MEMORY_FAILURE;
- }
+ }
else
- {
+ {
pObj->interfaceMap[itfIdx].pItf = pItf;
+ }
}
}
- }
pObj->state = XA_OBJECT_STATE_REALIZED;
DEBUG_API("<-XAEngineImpl_DoRealize");
return XA_RESULT_SUCCESS;
-}
+ }
/* XAresult XAEngineImpl_DoResume
* Description: Resume object from suspended state
*/
XAresult XAEngineImpl_DoResume(XAObjectItf self)
-{
- DEBUG_API("->XAEngineImpl_DoResume");
- DEBUG_API("<-XAEngineImpl_DoResume");
+ {
+ DEBUG_API("->XAEngineImpl_DoResume");DEBUG_API("<-XAEngineImpl_DoResume");
return XA_RESULT_PRECONDITIONS_VIOLATED;
-}
+ }
/* void XAEngineImpl_FreeResources
* Description: Free all resources reserved at XA%ExampleObject%Impl_DoRealize()
*/
void XAEngineImpl_FreeResources(XAObjectItf self)
-{
- XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
- XAEngineImpl* pImpl = (XAEngineImpl*)(*self);
+ {
+ XAObjectItfImpl* pObj = (XAObjectItfImpl*) (*self);
+ XAEngineImpl* pImpl = (XAEngineImpl*) (*self);
XAuint8 itfIdx = 0;
DEBUG_API("->XAEngineImpl_FreeResources");
assert( pObj && pImpl && pObj == pObj->self );
/* free all allocated interfaces */
- for(itfIdx=0; itfIdx<ENGINE_ITFCOUNT; itfIdx++)
- {
+ for (itfIdx = 0; itfIdx < ENGINE_ITFCOUNT; itfIdx++)
+ {
void *pItf = pObj->interfaceMap[itfIdx].pItf;
- if(pItf)
- {
- switch(itfIdx)
+ if (pItf)
{
+ switch (itfIdx)
+ {
case ENGINE_ENGINEITF:
XAEngineItfImpl_Free(pItf);
break;
@@ -402,64 +387,53 @@
case ENGINE_AUDIOENCODERCAPAITF:
XAAudioEncoderCapabilitiesItfImpl_Free(pItf);
break;
-/*
- case ENGINE_AUDIODECODERCAPAITF:
- XAAudioDecoderCapabilitiesItfImpl_Free(pItf);
- break;
- case ENGINE_CONFIGEXTENSIONSITF:
- XAConfigExtensionsItfImpl_Free(pItf);
- break;
- case ENGINE_DEVICEVOLUMEITF:
- XADeviceVolumeItfImpl_Free(pItf);
- break;
- case ENGINE_CAMERACAPAITF:
+ /*
+ case ENGINE_AUDIODECODERCAPAITF:
+ XAAudioDecoderCapabilitiesItfImpl_Free(pItf);
+ break;
+ case ENGINE_CONFIGEXTENSIONSITF:
+ XAConfigExtensionsItfImpl_Free(pItf);
+ break;
+ case ENGINE_DEVICEVOLUMEITF:
+ XADeviceVolumeItfImpl_Free(pItf);
+ break;
+ case ENGINE_CAMERACAPAITF:
- XACameraCapabilitiesItfImpl_Free(pItf);
-
- break;
- case ENGINE_IMAGEDECODERCAPAITF:
- XAImageDecoderCapabilitiesItfImpl_Free(pItf);
- break;
- case ENGINE_IMAGEENCODERCAPAITF:
- XAImageEncoderCapabilitiesItfImpl_Free(pItf);
- break;
- case ENGINE_VIDEODECODERCAPAITF:
- XAVideoDecoderCapabilitiesItfImpl_Free(pItf);
- break;
- case ENGINE_VIDEOENCODERCAPAITF:
- XAVideoEncoderCapabilitiesItfImpl_Free(pItf);
- break;
-*/
+ XACameraCapabilitiesItfImpl_Free(pItf);
+
+ break;
+ case ENGINE_IMAGEDECODERCAPAITF:
+ XAImageDecoderCapabilitiesItfImpl_Free(pItf);
+ break;
+ case ENGINE_IMAGEENCODERCAPAITF:
+ XAImageEncoderCapabilitiesItfImpl_Free(pItf);
+ break;
+ case ENGINE_VIDEODECODERCAPAITF:
+ XAVideoDecoderCapabilitiesItfImpl_Free(pItf);
+ break;
+ case ENGINE_VIDEOENCODERCAPAITF:
+ XAVideoEncoderCapabilitiesItfImpl_Free(pItf);
+ break;
+ */
default:
break;
- }
+ }
pObj->interfaceMap[itfIdx].pItf = NULL;
+ }
}
- }
/* free all other allocated resources*/
-/*
- if ( pImpl->adaptationCtx != NULL )
- {
- XAEngineAdapt_Destroy( pImpl->adaptationCtx );
- pImpl->adaptationCtx = NULL;
- }
-
- if ( pImpl->adaptationMmfCtx != NULL )
- {
- XAEngineAdaptMMF_Destroy( pImpl->adaptationMmfCtx );
- pImpl->adaptationMmfCtx = NULL;
- }*/
+
/* free framework map */
XAFrameworkMgr_DeleteFrameworkMap(&pImpl->frameworkMap);
-
- /* TODO free capabilities list */
+
+ /* free capabilities list */
XACapabilitiesMgr_DeleteCapabilitieList(&pImpl->capabilities);
-
- XAThreadSafety_Destroy();
+
+ XAThreadSafety_Destroy();
DEBUG_API("<-XAEngineImpl_FreeResources");
return;
-}
+ }
/* END OF FILE */
--- a/khronosfws/openmax_al/src/engine/xaengine.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaengine.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Engine Implementation Header
+ *
+ */
#ifndef XAENGINE_H
#define XAENGINE_H
@@ -29,40 +29,38 @@
/** MACROS **/
-
/** TYPES **/
-
/** ENUMERATIONS **/
/* Enumeration for interfaces that Engine supports. */
typedef enum
-{
+ {
ENGINE_OBJECTITF,
ENGINE_ENGINEITF,
ENGINE_DIMITF,
ENGINE_THREADSYNCITF,
-/*
- ENGINE_CONFIGEXTENSIONSITF,
- ENGINE_DEVICEVOLUMEITF,
-*/
+ /*
+ ENGINE_CONFIGEXTENSIONSITF,
+ ENGINE_DEVICEVOLUMEITF,
+ */
ENGINE_AUDIOIODEVICECAPAITF,
-/* ENGINE_AUDIODECODERCAPAITF,*/
+ /* ENGINE_AUDIODECODERCAPAITF,*/
ENGINE_AUDIOENCODERCAPAITF,
-/*
- ENGINE_CAMERACAPAITF,
- ENGINE_IMAGEDECODERCAPAITF,
- ENGINE_IMAGEENCODERCAPAITF,
- ENGINE_VIDEODECODERCAPAITF,
- ENGINE_VIDEOENCODERCAPAITF,
-*/
+ /*
+ ENGINE_CAMERACAPAITF,
+ ENGINE_IMAGEDECODERCAPAITF,
+ ENGINE_IMAGEENCODERCAPAITF,
+ ENGINE_VIDEODECODERCAPAITF,
+ ENGINE_VIDEOENCODERCAPAITF,
+ */
ENGINE_ITFCOUNT
-} XAEngineInterfaces;
+ } XAEngineInterfaces;
/** STRUCTURES **/
/* Specification for XAEngineImpl.
*/
typedef struct XAEngineImpl_
-{
+ {
/* Parent for XAEngineImpl */
XAObjectItfImpl baseObj;
@@ -72,10 +70,10 @@
//actual adpatation context can point to either MMF or GST implementations
FrameworkMap *frameworkMap;
XACapabilities* capabilities;
-
-/* void* adaptationGstCtx;
- void* adaptationMmfCtx;*/
-} XAEngineImpl;
+
+ /* void* adaptationGstCtx;
+ void* adaptationMmfCtx;*/
+ } XAEngineImpl;
/** METHODS **/
--- a/khronosfws/openmax_al/src/engine/xaengineitf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaengineitf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Engine Interface Implementation
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
@@ -30,161 +30,132 @@
* Description: Validate interface pointer and cast it to implementation pointer.
**/
static XAEngineItfImpl* GetImpl(XAEngineItf self)
-{
- if( self )
{
- XAEngineItfImpl* impl = (XAEngineItfImpl*)(*self);
- if( impl && (impl == impl->self) )
+ if (self)
{
+ XAEngineItfImpl* impl = (XAEngineItfImpl*) (*self);
+ if (impl && (impl == impl->self))
+ {
return impl;
+ }
}
+ return NULL;
}
- return NULL;
-}
/**
* Base interface XAEngineItf implementation
*/
XAresult XAEngineItfImpl_CreateCameraDevice(XAEngineItf self,
- XAObjectItf *pDevice,
- XAuint32 deviceID,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired)
-{
+ XAObjectItf *pDevice, XAuint32 deviceID, XAuint32 numInterfaces,
+ const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired)
+ {
XAEngineItfImpl* impl = GetImpl(self);
+#ifdef OMAX_CAMERABIN
return XACameraDeviceImpl_CreateCameraDevice( impl->mapper,impl->capabilities,
- pDevice, deviceID,numInterfaces,
- pInterfaceIds, pInterfaceRequired );
-}
+ pDevice, deviceID,numInterfaces,
+ pInterfaceIds, pInterfaceRequired );
+#else
+ return XA_RESULT_FEATURE_UNSUPPORTED;
+#endif
+ }
XAresult XAEngineItfImpl_CreateRadioDevice(XAEngineItf self,
- XAObjectItf *pDevice,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired)
-{
- return XARadioDeviceImpl_CreateRadioDevice( ((XAEngineItfImpl*)self)->mapper,
- pDevice, numInterfaces,
- pInterfaceIds, pInterfaceRequired );
-}
+ XAObjectItf *pDevice, XAuint32 numInterfaces,
+ const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired)
+ {
+ return XARadioDeviceImpl_CreateRadioDevice( /*((XAEngineItfImpl*)self)->mapper,*/
+ pDevice, numInterfaces, pInterfaceIds, pInterfaceRequired);
+ }
XAresult XAEngineItfImpl_CreateLEDDevice(XAEngineItf self,
- XAObjectItf *pDevice,
- XAuint32 deviceID,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired)
-{
- return XALEDArrayDeviceImpl_CreateLEDArrayDevice( ((XAEngineItfImpl*)self)->mapper,
- pDevice, deviceID, numInterfaces,
- pInterfaceIds, pInterfaceRequired );
-}
+ XAObjectItf *pDevice, XAuint32 deviceID, XAuint32 numInterfaces,
+ const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired)
+ {
+ return XALEDArrayDeviceImpl_CreateLEDArrayDevice(
+ ((XAEngineItfImpl*) self)->mapper, pDevice, deviceID,
+ numInterfaces, pInterfaceIds, pInterfaceRequired);
+ }
XAresult XAEngineItfImpl_CreateVibraDevice(XAEngineItf self,
- XAObjectItf *pDevice,
- XAuint32 deviceID,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired)
-{
- return XAVibraDeviceImpl_CreateVibraDevice( ((XAEngineItfImpl*)self)->mapper,
- pDevice, deviceID, numInterfaces,
- pInterfaceIds, pInterfaceRequired);
-}
+ XAObjectItf *pDevice, XAuint32 deviceID, XAuint32 numInterfaces,
+ const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired)
+ {
+ return XAVibraDeviceImpl_CreateVibraDevice(
+ ((XAEngineItfImpl*) self)->mapper, pDevice, deviceID,
+ numInterfaces, pInterfaceIds, pInterfaceRequired);
+ }
XAresult XAEngineItfImpl_CreateMediaPlayer(XAEngineItf self,
- XAObjectItf *pPlayer,
- XADataSource *pDataSrc,
- XADataSource *pBankSrc,
- XADataSink *pAudioSnk,
- XADataSink *pImageVideoSnk,
- XADataSink *pVibra,
- XADataSink *pLEDArray,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired)
-{
+ XAObjectItf *pPlayer, XADataSource *pDataSrc, XADataSource *pBankSrc,
+ XADataSink *pAudioSnk, XADataSink *pImageVideoSnk,
+ XADataSink *pVibra, XADataSink *pLEDArray, XAuint32 numInterfaces,
+ const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired)
+ {
XAEngineItfImpl* impl = GetImpl(self);
- return XAMediaPlayerImpl_CreateMediaPlayer(impl->mapper,impl->capabilities, pPlayer,
- pDataSrc, pBankSrc, pAudioSnk,
- pImageVideoSnk, pVibra, pLEDArray,
- numInterfaces, pInterfaceIds, pInterfaceRequired);
-}
+ return XAMediaPlayerImpl_CreateMediaPlayer(impl->mapper,
+ impl->capabilities, pPlayer, pDataSrc, pBankSrc, pAudioSnk,
+ pImageVideoSnk, pVibra, pLEDArray, numInterfaces, pInterfaceIds,
+ pInterfaceRequired);
+ }
XAresult XAEngineItfImpl_CreateMediaRecorder(XAEngineItf self,
- XAObjectItf * pRecorder,
- XADataSource * pAudioSrc,
- XADataSource * pImageVideoSrc,
- XADataSink * pDataSnk,
- XAuint32 numInterfaces,
- const XAInterfaceID * pInterfaceIds,
- const XAboolean * pInterfaceRequired)
-{
+ XAObjectItf * pRecorder, XADataSource * pAudioSrc,
+ XADataSource * pImageVideoSrc, XADataSink * pDataSnk,
+ XAuint32 numInterfaces, const XAInterfaceID * pInterfaceIds,
+ const XAboolean * pInterfaceRequired)
+ {
XAEngineItfImpl* impl = GetImpl(self);
return XAMediaRecorderImpl_CreateMediaRecorder(impl->mapper,
- impl->capabilities,
- pRecorder,
- pAudioSrc,
- pImageVideoSrc,
- pDataSnk,
- numInterfaces,
- pInterfaceIds,
- pInterfaceRequired);
-}
+ impl->capabilities, pRecorder, pAudioSrc, pImageVideoSrc,
+ pDataSnk, numInterfaces, pInterfaceIds, pInterfaceRequired);
+ }
-XAresult XAEngineItfImpl_CreateOutputMix(XAEngineItf self,
- XAObjectItf *pMix,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired)
-{
+XAresult XAEngineItfImpl_CreateOutputMix(XAEngineItf self, XAObjectItf *pMix,
+ XAuint32 numInterfaces, const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired)
+ {
XAEngineItfImpl* impl = GetImpl(self);
- return XAOMixImpl_CreateOutputMix(impl->mapper,impl->capabilities,
- pMix, numInterfaces,
- pInterfaceIds, pInterfaceRequired);
-}
+ return XAOMixImpl_CreateOutputMix(impl->mapper, impl->capabilities, pMix,
+ numInterfaces, pInterfaceIds, pInterfaceRequired);
+ }
XAresult XAEngineItfImpl_CreateMetadataExtractor(XAEngineItf self,
- XAObjectItf *pMetadataExtractor,
- XADataSource *pDataSource,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired)
-{
+ XAObjectItf *pMetadataExtractor, XADataSource *pDataSource,
+ XAuint32 numInterfaces, const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired)
+ {
XAEngineItfImpl* impl = GetImpl(self);
return XAMetadataExtractorImpl_Create(impl->mapper, impl->capabilities,
- pMetadataExtractor, pDataSource,
- numInterfaces, pInterfaceIds, pInterfaceRequired);
-}
+ pMetadataExtractor, pDataSource, numInterfaces, pInterfaceIds,
+ pInterfaceRequired);
+ }
XAresult XAEngineItfImpl_CreateExtensionObject(XAEngineItf self,
- XAObjectItf *pObject,
- void *pParameters,
- XAuint32 objectID,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired)
-{
+ XAObjectItf *pObject, void *pParameters, XAuint32 objectID,
+ XAuint32 numInterfaces, const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired)
+ {
DEBUG_API("->XAEngineItfImpl_CreateExtensionObject");
/* no supported extensions */
DEBUG_API("<-XAEngineItfImpl_CreateExtensionObject - XA_RESULT_FEATURE_UNSUPPORTED");
return XA_RESULT_FEATURE_UNSUPPORTED;
-}
+ }
XAresult XAEngineItfImpl_GetImplementationInfo(XAEngineItf self,
- XAuint32 *pMajor,
- XAuint32 *pMinor,
- XAuint32 *pStep,
- const XAchar *pImplementationText)
-{
+ XAuint32 *pMajor, XAuint32 *pMinor, XAuint32 *pStep,
+ const XAchar *pImplementationText)
+ {
DEBUG_API("->XAEngineItfImpl_GetImplementationInfo");
- if( !pMajor || !pMinor || !pStep )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAEngineItfImpl_GetImplementationInfo");
+ if (!pMajor || !pMinor || !pStep)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAEngineItfImpl_GetImplementationInfo");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
/* OpenMAX AL API ver 1.0.1 */
*pMajor = 1;
*pMinor = 0;
@@ -193,327 +164,321 @@
DEBUG_API("<-XAEngineItfImpl_GetImplementationInfo");
return XA_RESULT_SUCCESS;
-}
+ }
XAresult XAEngineItfImpl_QuerySupportedProfiles(XAEngineItf self,
- XAint16 *pProfilesSupported)
-{
+ XAint16 *pProfilesSupported)
+ {
DEBUG_API("->XAEngineItfImpl_QuerySupportedProfiles");
- if( !pProfilesSupported )
- {
+ if (!pProfilesSupported)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAEngineItfImpl_QuerySupportedProfiles");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
/* NOTE: enable +MIDI when/if XMF issues solved
* XA_PROFILES_MEDIA_PLAYER |
* XA_PROFILES_MEDIA_PLAYER_RECORDER |
* XA_PROFILES_PLUS_MIDI;
*/
- *pProfilesSupported = XA_PROFILES_MEDIA_PLAYER | XA_PROFILES_MEDIA_PLAYER_RECORDER;
+ *pProfilesSupported = XA_PROFILES_MEDIA_PLAYER
+ | XA_PROFILES_MEDIA_PLAYER_RECORDER;
DEBUG_API("<-XAEngineItfImpl_QuerySupportedProfiles");
return XA_RESULT_SUCCESS;
-}
+ }
XAresult XAEngineItfImpl_QueryNumSupportedInterfaces(XAEngineItf self,
- XAuint32 objectID,
- XAuint32 *pNumSupportedInterfaces)
-{
+ XAuint32 objectID, XAuint32 *pNumSupportedInterfaces)
+ {
XAresult res = XA_RESULT_SUCCESS;
DEBUG_API("->XAEngineItfImpl_QueryNumSupportedInterfaces");
- if( !pNumSupportedInterfaces )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAEngineItfImpl_QueryNumSupportedInterfaces");
+ if (!pNumSupportedInterfaces)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAEngineItfImpl_QueryNumSupportedInterfaces");
return XA_RESULT_PARAMETER_INVALID;
- }
- *pNumSupportedInterfaces=0;
- switch(objectID)
- {
+ }
+ *pNumSupportedInterfaces = 0;
+ switch (objectID)
+ {
case XA_OBJECTID_ENGINE:
res = XAEngineImpl_QueryNumSupportedInterfaces(
- pNumSupportedInterfaces);
+ pNumSupportedInterfaces);
break;
case XA_OBJECTID_MEDIAPLAYER:
res = XAMediaPlayerImpl_QueryNumSupportedInterfaces(
- pNumSupportedInterfaces);
+ pNumSupportedInterfaces);
break;
case XA_OBJECTID_MEDIARECORDER:
res = XAMediaRecorderImpl_QueryNumSupportedInterfaces(
- pNumSupportedInterfaces);
+ pNumSupportedInterfaces);
break;
case XA_OBJECTID_OUTPUTMIX:
res = XAOMixImpl_QueryNumSupportedInterfaces(
- pNumSupportedInterfaces);
+ pNumSupportedInterfaces);
break;
- case XA_OBJECTID_CAMERADEVICE:
+#ifdef OMAX_CAMERABIN
+ case XA_OBJECTID_CAMERADEVICE:
res = XACameraDeviceImpl_QueryNumSupportedInterfaces(
- pNumSupportedInterfaces);
+ pNumSupportedInterfaces);
break;
+#endif
case XA_OBJECTID_RADIODEVICE:
res = XARadioDeviceImpl_QueryNumSupportedInterfaces(
- pNumSupportedInterfaces);
+ pNumSupportedInterfaces);
break;
case XA_OBJECTID_LEDDEVICE:
res = XALEDArrayDeviceImpl_QueryNumSupportedInterfaces(
- pNumSupportedInterfaces);
+ pNumSupportedInterfaces);
break;
case XA_OBJECTID_VIBRADEVICE:
res = XAVibraDeviceImpl_QueryNumSupportedInterfaces(
- pNumSupportedInterfaces);
+ pNumSupportedInterfaces);
break;
case XA_OBJECTID_METADATAEXTRACTOR:
res = XAMetadataExtractorImpl_QueryNumSupportedInterfaces(
- pNumSupportedInterfaces);
+ pNumSupportedInterfaces);
break;
default:
res = XA_RESULT_FEATURE_UNSUPPORTED;
break;
- }
+ }
DEBUG_API_A1("<-XAEngineItfImpl_QueryNumSupportedInterfaces %lu",res);
return res;
-}
+ }
XAresult XAEngineItfImpl_QuerySupportedInterfaces(XAEngineItf self,
- XAuint32 objectID,
- XAuint32 index,
- XAInterfaceID *pInterfaceId)
-{
+ XAuint32 objectID, XAuint32 index, XAInterfaceID *pInterfaceId)
+ {
XAresult res = XA_RESULT_SUCCESS;
DEBUG_API("->XAEngineItfImpl_QuerySupportedInterfaces");
- if( !pInterfaceId )
- {
+ if (!pInterfaceId)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAEngineItfImpl_QuerySupportedInterfaces");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pInterfaceId = XA_IID_NULL;
switch (objectID)
- {
+ {
case XA_OBJECTID_ENGINE:
- res = XAEngineImpl_QuerySupportedInterfaces(
- index, pInterfaceId);
+ res = XAEngineImpl_QuerySupportedInterfaces(index, pInterfaceId);
break;
case XA_OBJECTID_MEDIAPLAYER:
- res = XAMediaPlayerImpl_QuerySupportedInterfaces(
- index, pInterfaceId);
+ res = XAMediaPlayerImpl_QuerySupportedInterfaces(index,
+ pInterfaceId);
break;
case XA_OBJECTID_MEDIARECORDER:
- res = XAMediaRecorderImpl_QuerySupportedInterfaces(
- index, pInterfaceId);
+ res = XAMediaRecorderImpl_QuerySupportedInterfaces(index,
+ pInterfaceId);
break;
case XA_OBJECTID_OUTPUTMIX:
- res = XAOMixImpl_QuerySupportedInterfaces(
- index, pInterfaceId);
+ res = XAOMixImpl_QuerySupportedInterfaces(index, pInterfaceId);
break;
- case XA_OBJECTID_CAMERADEVICE:
+#ifdef OMAX_CAMERABIN
+ case XA_OBJECTID_CAMERADEVICE:
res = XACameraDeviceImpl_QuerySupportedInterfaces(
- index, pInterfaceId );
+ index, pInterfaceId );
break;
+#endif
case XA_OBJECTID_RADIODEVICE:
- res = XARadioDeviceImpl_QuerySupportedInterfaces(
- index, pInterfaceId );
+ res = XARadioDeviceImpl_QuerySupportedInterfaces(index,
+ pInterfaceId);
break;
case XA_OBJECTID_LEDDEVICE:
- res = XALEDArrayDeviceImpl_QuerySupportedInterfaces(
- index, pInterfaceId );
+ res = XALEDArrayDeviceImpl_QuerySupportedInterfaces(index,
+ pInterfaceId);
break;
case XA_OBJECTID_VIBRADEVICE:
- res = XAVibraDeviceImpl_QuerySupportedInterfaces(
- index, pInterfaceId );
+ res = XAVibraDeviceImpl_QuerySupportedInterfaces(index,
+ pInterfaceId);
break;
case XA_OBJECTID_METADATAEXTRACTOR:
- res = XAMetadataExtractorImpl_QuerySupportedInterfaces(
- index, pInterfaceId);
+ res = XAMetadataExtractorImpl_QuerySupportedInterfaces(index,
+ pInterfaceId);
break;
default:
res = XA_RESULT_FEATURE_UNSUPPORTED;
- }
+ }
DEBUG_API_A1("<-XAEngineItfImpl_QuerySupportedInterfaces %lu", res);
return res;
-}
+ }
XAresult XAEngineItfImpl_QueryLEDCapabilities(XAEngineItf self,
- XAuint32 *pIndex,
- XAuint32 *pLEDDeviceID,
- XALEDDescriptor *pDescriptor)
-{
-
+ XAuint32 *pIndex, XAuint32 *pLEDDeviceID,
+ XALEDDescriptor *pDescriptor)
+ {
+
XALEDDescriptor descriptor;
-
+
DEBUG_API("->XAEngineItfImpl_QueryLEDCapabilities");
- if( !pDescriptor )
- { /*query number of devices*/
- if( !pIndex )
- {
+ if (!pDescriptor)
+ { /*query number of devices*/
+ if (!pIndex)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
/* Number of devices */
*pIndex = 1;
- }
+ }
else
- {
-
+ {
+
/* query device capabilities */
- if( pIndex )
- {
- if( *pIndex == 0 )
+ if (pIndex)
{
- if( !pLEDDeviceID )
+ if (*pIndex == 0)
{
+ if (!pLEDDeviceID)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pLEDDeviceID = XA_ADAPTID_LEDARRAY;
- }
+ }
else
- {
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities");
return XA_RESULT_PARAMETER_INVALID;
+ }
}
- }
- if( *pLEDDeviceID == XA_ADAPTID_LEDARRAY )
- {
+ if (*pLEDDeviceID == XA_ADAPTID_LEDARRAY)
+ {
descriptor.colorMask = COLOR_MASK;
descriptor.ledCount = LED_COUNT;
descriptor.primaryLED = PRIMARY_LED;
*pDescriptor = descriptor;
- }
-
+ }
+
+ }DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities");
+ return XA_RESULT_SUCCESS;
}
- DEBUG_API("<-XAEngineItfImpl_QueryLEDCapabilities");
- return XA_RESULT_SUCCESS;
-}
XAresult XAEngineItfImpl_QueryVibraCapabilities(XAEngineItf self,
- XAuint32 *pIndex,
- XAuint32 *pVibraDeviceID,
- XAVibraDescriptor *pDescriptor)
-{
-
+ XAuint32 *pIndex, XAuint32 *pVibraDeviceID,
+ XAVibraDescriptor *pDescriptor)
+ {
+
XAVibraDescriptor descriptor;
DEBUG_API("->XAEngineItfImpl_QueryVibraCapabilities");
- if( !pDescriptor )
- { /*query number of devices*/
- if( !pIndex )
- {
+ if (!pDescriptor)
+ { /*query number of devices*/
+ if (!pIndex)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
/* Number of devices */
*pIndex = 1;
- }
+ }
else
- {
-
+ {
+
/* query device capabilities */
- if( pIndex )
- {
- if( *pIndex == 0 )
+ if (pIndex)
{
- if( !pVibraDeviceID )
+ if (*pIndex == 0)
{
+ if (!pVibraDeviceID)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pVibraDeviceID = XA_ADAPTID_VIBRA;
- }
+ }
else
- {
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities");
return XA_RESULT_PARAMETER_INVALID;
+ }
}
- }
- if( *pVibraDeviceID == XA_ADAPTID_VIBRA )
- {
+ if (*pVibraDeviceID == XA_ADAPTID_VIBRA)
+ {
descriptor.minFrequency = MIN_FREQUENCY;
descriptor.maxFrequency = MAX_FREQUENCY;
descriptor.supportsFrequency = XA_BOOLEAN_TRUE;
descriptor.supportsIntensity = XA_BOOLEAN_TRUE;
*pDescriptor = descriptor;
+ }
+
}
-
- }
DEBUG_API("<-XAEngineItfImpl_QueryVibraCapabilities");
return XA_RESULT_SUCCESS;
-}
+ }
XAresult XAEngineItfImpl_QueryNumSupportedExtensions(XAEngineItf self,
- XAuint32 *pNumExtensions)
-{
- DEBUG_API("->XAEngineItfImpl_QuerySupportedExtension");
- if(pNumExtensions==NULL)
+ XAuint32 *pNumExtensions)
{
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAEngineItfImpl_QuerySupportedExtension");
- return XA_RESULT_PARAMETER_INVALID;
- }
+ DEBUG_API("->XAEngineItfImpl_QuerySupportedExtension");
+ if (pNumExtensions == NULL)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+ DEBUG_API("<-XAEngineItfImpl_QuerySupportedExtension");
+ return XA_RESULT_PARAMETER_INVALID;
+ }
/* no supported extensions */
- *pNumExtensions=0;
+ *pNumExtensions = 0;
DEBUG_API("<-XAEngineItfImpl_QuerySupportedExtension");
return XA_RESULT_SUCCESS;
-}
+ }
XAresult XAEngineItfImpl_QuerySupportedExtension(XAEngineItf self,
- XAuint32 index,
- XAchar *pExtensionName,
- XAint16 *pNameLength)
-{
+ XAuint32 index, XAchar *pExtensionName, XAint16 *pNameLength)
+ {
DEBUG_API("->XAEngineItfImpl_QuerySupportedExtension");
/* no supported extensions => index is always wrong */
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAEngineItfImpl_QuerySupportedExtension");
return XA_RESULT_PARAMETER_INVALID;
-}
+ }
XAresult XAEngineItfImpl_IsExtensionSupported(XAEngineItf self,
- const XAchar *pExtensionName,
- XAboolean *pSupported)
-{
+ const XAchar *pExtensionName, XAboolean *pSupported)
+ {
DEBUG_API("->XAEngineItfImpl_IsExtensionSupported");
- if(pSupported==NULL)
- {
+ if (pSupported == NULL)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAEngineItfImpl_IsExtensionSupported");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
/* no supported extensions */
- *pSupported=XA_BOOLEAN_FALSE;
+ *pSupported = XA_BOOLEAN_FALSE;
DEBUG_API("<-XAEngineItfImpl_IsExtensionSupported");
return XA_RESULT_SUCCESS;
-}
+ }
/**
* XAEngineItfImpl -specific methods
**/
-XAEngineItfImpl* XAEngineItfImpl_Create(FrameworkMap* fwkmapper, XACapabilities* capabilities)
-{
- XAEngineItfImpl* self = (XAEngineItfImpl*)
- calloc(1,sizeof(XAEngineItfImpl));
+XAEngineItfImpl* XAEngineItfImpl_Create(FrameworkMap* fwkmapper,
+ XACapabilities* capabilities)
+ {
+ XAEngineItfImpl* self = (XAEngineItfImpl*) calloc(1,
+ sizeof(XAEngineItfImpl));
DEBUG_API("->XAEngineItfImpl_Create");
- if( self )
- {
+ if (self)
+ {
/* init itf default implementation */
self->itf.CreateCameraDevice = XAEngineItfImpl_CreateCameraDevice;
self->itf.CreateRadioDevice = XAEngineItfImpl_CreateRadioDevice;
@@ -522,30 +487,42 @@
self->itf.CreateMediaPlayer = XAEngineItfImpl_CreateMediaPlayer;
self->itf.CreateMediaRecorder = XAEngineItfImpl_CreateMediaRecorder;
self->itf.CreateOutputMix = XAEngineItfImpl_CreateOutputMix;
- self->itf.CreateMetadataExtractor = XAEngineItfImpl_CreateMetadataExtractor;
- self->itf.CreateExtensionObject = XAEngineItfImpl_CreateExtensionObject;
- self->itf.GetImplementationInfo = XAEngineItfImpl_GetImplementationInfo;
- self->itf.QuerySupportedProfiles = XAEngineItfImpl_QuerySupportedProfiles;
- self->itf.QueryNumSupportedInterfaces = XAEngineItfImpl_QueryNumSupportedInterfaces;
- self->itf.QuerySupportedInterfaces = XAEngineItfImpl_QuerySupportedInterfaces;
+ self->itf.CreateMetadataExtractor
+ = XAEngineItfImpl_CreateMetadataExtractor;
+ self->itf.CreateExtensionObject
+ = XAEngineItfImpl_CreateExtensionObject;
+ self->itf.GetImplementationInfo
+ = XAEngineItfImpl_GetImplementationInfo;
+ self->itf.QuerySupportedProfiles
+ = XAEngineItfImpl_QuerySupportedProfiles;
+ self->itf.QueryNumSupportedInterfaces
+ = XAEngineItfImpl_QueryNumSupportedInterfaces;
+ self->itf.QuerySupportedInterfaces
+ = XAEngineItfImpl_QuerySupportedInterfaces;
self->itf.QueryLEDCapabilities = XAEngineItfImpl_QueryLEDCapabilities;
- self->itf.QueryVibraCapabilities = XAEngineItfImpl_QueryVibraCapabilities;
- self->itf.QueryNumSupportedExtensions = XAEngineItfImpl_QueryNumSupportedExtensions;
- self->itf.QuerySupportedExtension = XAEngineItfImpl_QuerySupportedExtension;
+ self->itf.QueryVibraCapabilities
+ = XAEngineItfImpl_QueryVibraCapabilities;
+ self->itf.QueryNumSupportedExtensions
+ = XAEngineItfImpl_QueryNumSupportedExtensions;
+ self->itf.QuerySupportedExtension
+ = XAEngineItfImpl_QuerySupportedExtension;
self->itf.IsExtensionSupported = XAEngineItfImpl_IsExtensionSupported;
self->mapper = fwkmapper;
self->capabilities = capabilities;
self->xyz = 50;
self->self = self;
- }
+ }
DEBUG_API("<-XAEngineItfImpl_Create");
return self;
-}
+ }
void XAEngineItfImpl_Free(XAEngineItfImpl* self)
-{
+ {
DEBUG_API("->XAEngineItfImpl_Free");
assert(self==self->self);
- free(self);
+ if(self)
+ {
+ free(self);
+ }
DEBUG_API("<-XAEngineItfImpl_Free");
-}
+ }
--- a/khronosfws/openmax_al/src/engine/xaengineitf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xaengineitf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Engine Interface Header
+ *
+ */
#ifndef XAENGINEITF_H
#define XAENGINEITF_H
@@ -31,7 +31,7 @@
/** STRUCTURES **/
/* Definition of XAEngineItf implementation */
typedef struct XAEngineItfImpl_
-{
+ {
/* parent interface */
struct XAEngineItf_ itf;
/* pointer to self */
@@ -41,126 +41,94 @@
struct FrameworkMap_* mapper;
/*Not Owned*/
struct XACapabilities_* capabilities;
-
+
int xyz;
-
-} XAEngineItfImpl;
+
+ } XAEngineItfImpl;
/** METHODS **/
/* Base interface XAEngineItf implementation */
XAresult XAEngineItfImpl_CreateCameraDevice(XAEngineItf self,
- XAObjectItf *pDevice,
- XAuint32 deviceID,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired);
+ XAObjectItf *pDevice, XAuint32 deviceID, XAuint32 numInterfaces,
+ const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired);
XAresult XAEngineItfImpl_CreateRadioDevice(XAEngineItf self,
- XAObjectItf *pDevice,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired);
-
+ XAObjectItf *pDevice, XAuint32 numInterfaces,
+ const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired);
XAresult XAEngineItfImpl_CreateLEDDevice(XAEngineItf self,
- XAObjectItf *pDevice,
- XAuint32 deviceID,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired);
+ XAObjectItf *pDevice, XAuint32 deviceID, XAuint32 numInterfaces,
+ const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired);
XAresult XAEngineItfImpl_CreateVibraDevice(XAEngineItf self,
- XAObjectItf *pDevice,
- XAuint32 deviceID,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired);
+ XAObjectItf *pDevice, XAuint32 deviceID, XAuint32 numInterfaces,
+ const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired);
XAresult XAEngineItfImpl_CreateMediaPlayer(XAEngineItf self,
- XAObjectItf *pPlayer,
- XADataSource *pDataSrc,
- XADataSource *pBankSrc,
- XADataSink *pAudioSnk,
- XADataSink *pImageVideoSnk,
- XADataSink *pVibra,
- XADataSink *pLEDArray,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired);
+ XAObjectItf *pPlayer, XADataSource *pDataSrc, XADataSource *pBankSrc,
+ XADataSink *pAudioSnk, XADataSink *pImageVideoSnk,
+ XADataSink *pVibra, XADataSink *pLEDArray, XAuint32 numInterfaces,
+ const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired);
XAresult XAEngineItfImpl_CreateMediaRecorder(XAEngineItf self,
- XAObjectItf *pRecorder,
- XADataSource *pAudioSrc,
- XADataSource *pImageVideoSrc,
- XADataSink *pDataSnk,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired);
+ XAObjectItf *pRecorder, XADataSource *pAudioSrc,
+ XADataSource *pImageVideoSrc, XADataSink *pDataSnk,
+ XAuint32 numInterfaces, const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired);
-XAresult XAEngineItfImpl_CreateOutputMix(XAEngineItf self,
- XAObjectItf *pMix,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired);
+XAresult XAEngineItfImpl_CreateOutputMix(XAEngineItf self, XAObjectItf *pMix,
+ XAuint32 numInterfaces, const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired);
XAresult XAEngineItfImpl_CreateMetadataExtractor(XAEngineItf self,
- XAObjectItf *pMetadataExtractor,
- XADataSource *pDataSource,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired);
+ XAObjectItf *pMetadataExtractor, XADataSource *pDataSource,
+ XAuint32 numInterfaces, const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired);
XAresult XAEngineItfImpl_CreateExtensionObject(XAEngineItf self,
- XAObjectItf *pObject,
- void *pParameters,
- XAuint32 objectID,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired);
+ XAObjectItf *pObject, void *pParameters, XAuint32 objectID,
+ XAuint32 numInterfaces, const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired);
XAresult XAEngineItfImpl_GetImplementationInfo(XAEngineItf self,
- XAuint32 *pMajor,
- XAuint32 *pMinor,
- XAuint32 *pStep,
- const XAchar *pImplementationText);
+ XAuint32 *pMajor, XAuint32 *pMinor, XAuint32 *pStep,
+ const XAchar *pImplementationText);
XAresult XAEngineItfImpl_QuerySupportedProfiles(XAEngineItf self,
- XAint16 *pProfilesSupported);
+ XAint16 *pProfilesSupported);
XAresult XAEngineItfImpl_QueryNumSupportedInterfaces(XAEngineItf self,
- XAuint32 objectID,
- XAuint32 *pNumSupportedInterfaces);
+ XAuint32 objectID, XAuint32 *pNumSupportedInterfaces);
XAresult XAEngineItfImpl_QuerySupportedInterfaces(XAEngineItf self,
- XAuint32 objectID,
- XAuint32 index,
- XAInterfaceID *pInterfaceId);
+ XAuint32 objectID, XAuint32 index, XAInterfaceID *pInterfaceId);
XAresult XAEngineItfImpl_QueryLEDCapabilities(XAEngineItf self,
- XAuint32 *pIndex,
- XAuint32 *pLEDDeviceID,
- XALEDDescriptor *pDescriptor);
+ XAuint32 *pIndex, XAuint32 *pLEDDeviceID,
+ XALEDDescriptor *pDescriptor);
XAresult XAEngineItfImpl_QueryVibraCapabilities(XAEngineItf self,
- XAuint32 *pIndex,
- XAuint32 *pVibraDeviceID,
- XAVibraDescriptor *pDescriptor);
+ XAuint32 *pIndex, XAuint32 *pVibraDeviceID,
+ XAVibraDescriptor *pDescriptor);
XAresult XAEngineItfImpl_QueryNumSupportedExtensions(XAEngineItf self,
- XAuint32 *pNumExtensions);
+ XAuint32 *pNumExtensions);
XAresult XAEngineItfImpl_QuerySupportedExtension(XAEngineItf self,
- XAuint32 index,
- XAchar *pExtensionName,
- XAint16 *pNameLength);
+ XAuint32 index, XAchar *pExtensionName, XAint16 *pNameLength);
XAresult XAEngineItfImpl_IsExtensionSupported(XAEngineItf self,
- const XAchar *pExtensionName,
- XAboolean *pSupported);
+ const XAchar *pExtensionName, XAboolean *pSupported);
/* XAEngineItfImpl -specific methods */
-XAEngineItfImpl* XAEngineItfImpl_Create(FrameworkMap* fwkmapper, XACapabilities* capabilities);
+XAEngineItfImpl* XAEngineItfImpl_Create(FrameworkMap* fwkmapper,
+ XACapabilities* capabilities);
void XAEngineItfImpl_Free(XAEngineItfImpl *self);
#endif /* XAENGINEITF_H */
--- a/khronosfws/openmax_al/src/engine/xathreadsyncitf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xathreadsyncitf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: ThreadSync Itf Implementation
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
@@ -25,110 +25,113 @@
* Base interface XAThreadSyncItf Implementation
*/
XAresult XAThreadSyncItfImpl_EnterCriticalSection(XAThreadSyncItf self)
-{
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAThreadSyncItfImpl* impl = NULL;
DEBUG_API("->XAThreadSyncItfImpl_EnterCriticalSection");
- impl = (XAThreadSyncItfImpl*)(*self);
- if( !impl || impl != impl->self )
- {
+ impl = (XAThreadSyncItfImpl*) (*self);
+ if (!impl || impl != impl->self)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAThreadSyncItfImpl_EnterCriticalSection");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
- if( impl->engInCritical )
- {
+ if (impl->engInCritical)
+ {
/* The calling context must not already be in
- critical section state. */
+ critical section state. */
DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
ret = XA_RESULT_PRECONDITIONS_VIOLATED;
- }
+ }
else
- {
- ret = XAImpl_LockMutex( impl->engCriticalSection );
- if(ret == XA_RESULT_SUCCESS)
{
+ ret = XAImpl_LockMutex(impl->engCriticalSection);
+ if (ret == XA_RESULT_SUCCESS)
+ {
impl->engInCritical = XA_BOOLEAN_TRUE;
- }
+ }
+ }DEBUG_API("<-XAThreadSyncItfImpl_EnterCriticalSection");
+ return ret;
}
- DEBUG_API("<-XAThreadSyncItfImpl_EnterCriticalSection");
- return ret;
-}
XAresult XAThreadSyncItfImpl_ExitCriticalSection(XAThreadSyncItf self)
-{
+ {
XAThreadSyncItfImpl* impl = NULL;
XAresult ret = XA_RESULT_SUCCESS;
- impl = (XAThreadSyncItfImpl*)(*self);
+ impl = (XAThreadSyncItfImpl*) (*self);
DEBUG_API("->XAThreadSyncItfImpl_ExitCriticalSection");
- if( !impl || impl != impl->self )
- {
+ if (!impl || impl != impl->self)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAThreadSyncItfImpl_ExitCriticalSection");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
- if( impl->engInCritical )
- {
- ret = XAImpl_UnlockMutex( impl->engCriticalSection );
- if(ret == XA_RESULT_SUCCESS)
+ if (impl->engInCritical)
{
+ ret = XAImpl_UnlockMutex(impl->engCriticalSection);
+ if (ret == XA_RESULT_SUCCESS)
+ {
impl->engInCritical = XA_BOOLEAN_FALSE;
+ }
}
- }
else
- {
+ {
/* The engine must be in critical section state */
DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
ret = XA_RESULT_PRECONDITIONS_VIOLATED;
+ }DEBUG_API("<-XAThreadSyncItfImpl_ExitCriticalSection");
+ return ret;
}
- DEBUG_API("<-XAThreadSyncItfImpl_ExitCriticalSection");
- return ret;
-}
/**
* XAThreadSyncItfImpl -specific methods
**/
XAThreadSyncItfImpl* XAThreadSyncItfImpl_Create()
-{
+ {
XAThreadSyncItfImpl *self = NULL;
DEBUG_API("->XAThreadSyncItfImpl_Create");
- self = (XAThreadSyncItfImpl*)calloc(1,sizeof(XAThreadSyncItfImpl));
+ self = (XAThreadSyncItfImpl*) calloc(1, sizeof(XAThreadSyncItfImpl));
- if( self )
- {
+ if (self)
+ {
/* init itf default implementation */
- self->itf.EnterCriticalSection = XAThreadSyncItfImpl_EnterCriticalSection;
- self->itf.ExitCriticalSection = XAThreadSyncItfImpl_ExitCriticalSection;
+ self->itf.EnterCriticalSection
+ = XAThreadSyncItfImpl_EnterCriticalSection;
+ self->itf.ExitCriticalSection
+ = XAThreadSyncItfImpl_ExitCriticalSection;
- if( XAImpl_CreateMutex( &(self->engCriticalSection) )
- != XA_RESULT_SUCCESS )
- {
+ if (XAImpl_CreateMutex(&(self->engCriticalSection))
+ != XA_RESULT_SUCCESS)
+ {
DEBUG_ERR("Mutex creation failed, abort");
free(self);
DEBUG_API("<-XAThreadSyncItfImpl_Create");
return NULL;
- }
+ }
self->self = self;
- }
+ }
DEBUG_API("<-XAThreadSyncItfImpl_Create");
return self;
-}
+ }
void XAThreadSyncItfImpl_Free(XAThreadSyncItfImpl* self)
-{
+ {
DEBUG_API("->XAThreadSyncItfImpl_Free");
assert(self==self->self);
- XAImpl_DeleteMutex(self->engCriticalSection);
- free(self);
+ if(self)
+ {
+ XAImpl_DeleteMutex(self->engCriticalSection);
+ free(self);
+ }
DEBUG_API("<-XAThreadSyncItfImpl_Free");
-}
+ }
--- a/khronosfws/openmax_al/src/engine/xathreadsyncitf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/engine/xathreadsyncitf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: ThreadSync Itf Header
+ *
+ */
#ifndef XATHREADSYNCITF_H
#define XATHREADSYNCITF_H
@@ -29,7 +29,7 @@
/** STRUCTURES **/
/* Definition of XA%ExampleItf% implementation */
typedef struct XAThreadSyncItfImpl_
-{
+ {
/* parent interface */
struct XAThreadSyncItf_ itf;
/* pointer to self */
@@ -38,7 +38,7 @@
/* variables */
XAImplMutexHandle engCriticalSection;
XAboolean engInCritical;
-} XAThreadSyncItfImpl;
+ } XAThreadSyncItfImpl;
/** METHODS **/
--- a/khronosfws/openmax_al/src/gst_adaptation/xaadaptationgst.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaadaptationgst.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,25 +1,24 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Base GStreamer Adaptation Source
+ *
+ */
#include <assert.h>
#include <string.h>
-#include "gst/gst.h"
-#include "gst/gstbuffer.h"
-#include "gst/app/gstappsrc.h"
+#include <gst/gst.h>
+#include <gst/gstbuffer.h>
#include "xaobjectitf.h"
#include "xacameradevice.h"
#include "xaradiodevice.h"
@@ -27,20 +26,28 @@
#include "xamediaplayeradaptctx.h"
#include "xacameraadaptctx.h"
#include <stdlib.h>
+
+#ifdef OMAX_CAMERABIN
extern XAboolean cameraRealized;
+
extern XACameraAdaptationCtx_* cameraCtx;
+#else
+XAboolean cameraRealized = XA_BOOLEAN_FALSE;
+XACameraAdaptationCtx_* cameraCtx = NULL;
+#endif
/*
* XAAdaptationGstCtx* XAAdaptationGst_Create()
* 1st phase initialization function for Adaptation Base context structure.
* Reserves memory for base context and initializes GStreamer FW.
*/
-XAresult XAAdaptationGst_Init( XAAdaptationGstCtx* pSelf, XAuint32 ctxId )
-{
+XAresult XAAdaptationGst_Init(XAAdaptationGstCtx* pSelf, XAuint32 ctxId)
+ {
DEBUG_API("->XAAdaptationGst_Init");
- if ( pSelf )
- {
- if(XAAdaptationBase_Init(&(pSelf->baseObj), ctxId) != XA_RESULT_SUCCESS)
+ if (pSelf)
+ {
+ if (XAAdaptationBase_Init(&(pSelf->baseObj), ctxId)
+ != XA_RESULT_SUCCESS)
{
DEBUG_ERR("Failed to init base context!!!");
free(pSelf);
@@ -49,94 +56,93 @@
else
{
GError* gerror = 0;
-
- /* Add default handler for Gst-bus messages */
+
+ /* Add default handler for Gst-bus messages */
pSelf->busCb = XAAdaptationGst_GstBusCb;
-
+
// VASU MOD BEGINS
pSelf->cond_mutx_inited = XA_BOOLEAN_FALSE;
// VASU MOD ENDS
-
- sem_init(&(pSelf->semAsyncWait),0,0);
-
-
- if ( !gst_init_check( NULL, NULL, &gerror ) )
+
+ sem_init(&(pSelf->semAsyncWait), 0, 0);
+
+ if (!gst_init_check(NULL, NULL, &gerror))
{
- DEBUG_ERR("Gst Initalization failure.");
- return XA_RESULT_INTERNAL_ERROR;
+ DEBUG_ERR("Gst Initalization failure.");
+ return XA_RESULT_INTERNAL_ERROR;
}
-
+
}
- }
+ }
else
- {
+ {
DEBUG_ERR("Invalid Gst Base Context.")
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
DEBUG_API("<-XAAdaptationGst_Init");
return XA_RESULT_SUCCESS;
-}
+ }
/*
* XAresult XAAdaptationGst_PostInit()
* 2nd phase initialization for Adaptation Base.
*/
-XAresult XAAdaptationGst_PostInit( XAAdaptationGstCtx* ctx )
-{
+XAresult XAAdaptationGst_PostInit(XAAdaptationGstCtx* ctx)
+ {
XAresult ret = XA_RESULT_SUCCESS;
DEBUG_API("->XAAdaptationGst_PostInit");
// VASU MOD BEGINS
XAAdaptationBase_PostInit(&ctx->baseObj);
-
+
ctx->thread_launched = XA_BOOLEAN_FALSE;
pthread_mutex_init(&(ctx->ds_mutex), NULL);
pthread_cond_init(&(ctx->ds_condition), NULL);
ctx->cond_mutx_inited = XA_BOOLEAN_TRUE;
-
-
+
// VASU MOD ENDS
DEBUG_API("<-XAAdaptationGst_PostInit");
return ret;
-}
+ }
/*
* void XAAdaptationGst_Free( XAAdaptationGstCtx* ctx )
* Frees all Base context variables .
*/
-void XAAdaptationGst_Free( XAAdaptationGstCtx* ctx )
-{
- GstElement* fakesink = NULL;
+void XAAdaptationGst_Free(XAAdaptationGstCtx* ctx)
+ {
+ GstElement* fakesink = NULL;
DEBUG_API("->XAAdaptationGst_Free");
- if ( ctx->bin )
- {
- fakesink = gst_bin_get_by_name(GST_BIN(ctx->bin), "fakesink");
- if ( fakesink )
- {
- gst_element_set_state( GST_ELEMENT(fakesink), GST_STATE_NULL);
- gst_object_unref(fakesink);
- }
+ if (ctx->bin)
+ {
+ fakesink = gst_bin_get_by_name(GST_BIN(ctx->bin), "fakesink");
+ if (fakesink)
+ {
+ gst_element_set_state(GST_ELEMENT(fakesink), GST_STATE_NULL);
+ gst_object_unref(fakesink);
+ }
- if ( gst_element_set_state(GST_ELEMENT(ctx->bin), GST_STATE_NULL )!=GST_STATE_CHANGE_SUCCESS )
- { /*not much we can do*/
+ if (gst_element_set_state(GST_ELEMENT(ctx->bin), GST_STATE_NULL)
+ != GST_STATE_CHANGE_SUCCESS)
+ { /*not much we can do*/
DEBUG_ERR("WARNING: Failed to change to NULL state before deletion!!")
+ }
}
- }
- if(ctx->asynctimer)
- { /*cancel timer*/
+ if (ctx->asynctimer)
+ { /*cancel timer*/
g_source_remove(ctx->asynctimer);
- }
+ }
sem_post(&(ctx->semAsyncWait));
sem_destroy(&(ctx->semAsyncWait));
XAAdaptationGst_StopGstListener(ctx);
- if ( ctx->bin )
- {
+ if (ctx->bin)
+ {
gst_object_unref(ctx->bin);
- }
+ }
//g_array_free(ctx->evtHdlrs, TRUE);
// VASU MOD BEGINS
@@ -149,29 +155,29 @@
}
// VASU MOD ENDS
XAAdaptationBase_Free(&ctx->baseObj);
-
+
DEBUG_API("<-XAAdaptationGst_Free");
-}
-
+ }
/*
* gboolean XAAdaptationBase_GstBusCb( GstBus *bus, GstMessage *message, gpointer data )
* Default Gst-bus message handler (Callback)
*/
-gboolean XAAdaptationGst_GstBusCb( GstBus *bus, GstMessage *message, gpointer data )
-{
+gboolean XAAdaptationGst_GstBusCb(GstBus *bus, GstMessage *message,
+ gpointer data)
+ {
GError *error;
gchar *debug;
- DEBUG_API("->XAAdaptationGst_GstBusCb");
- DEBUG_INFO_A2("Received Gst callback \"%s\" from \"%s\"",
- GST_MESSAGE_TYPE_NAME(message),
- GST_OBJECT_NAME(GST_MESSAGE_SRC(message)));
+ DEBUG_API("->XAAdaptationGst_GstBusCb");DEBUG_INFO_A2("Received Gst callback \"%s\" from \"%s\"",
+ GST_MESSAGE_TYPE_NAME(message),
+ GST_OBJECT_NAME(GST_MESSAGE_SRC(message)));
- switch( GST_MESSAGE_TYPE(message))
- {
+ switch (GST_MESSAGE_TYPE(message))
+ {
case GST_MESSAGE_ERROR:
- gst_message_parse_error( message, &error, &debug );
- DEBUG_INFO_A1("%s", debug);
+ gst_message_parse_error(message, &error, &debug);
+ DEBUG_INFO_A1("%s", debug)
+ ;
break;
case GST_MESSAGE_EOS:
break;
@@ -220,48 +226,48 @@
case GST_MESSAGE_ANY:
break;
default:
- DEBUG_INFO("Unhandled Gst-Bus message");
+ DEBUG_INFO("Unhandled Gst-Bus message")
+ ;
break;
+ }DEBUG_API("<-XAAdaptationGst_GstBusCb");
+ return TRUE;
}
- DEBUG_API("<-XAAdaptationGst_GstBusCb");
- return TRUE;
-}
XAresult XAAdaptationGst_InitGstListener(XAAdaptationGstCtx* ctx)
-{
+ {
int ret;
DEBUG_API("->XAAdaptationGst_InitGstListener");
- if ( ctx->bin )
- {
- ctx->bus = gst_pipeline_get_bus( GST_PIPELINE( ctx->bin ));
- }
- if( !ctx->bus )
- {
+ if (ctx->bin)
+ {
+ ctx->bus = gst_pipeline_get_bus(GST_PIPELINE( ctx->bin ));
+ }
+ if (!ctx->bus)
+ {
DEBUG_ERR("could not get gst bus!")
return XA_RESULT_INTERNAL_ERROR;
- }
- ret = pthread_create(&(ctx->busloopThr), NULL, (XAAdaptationGst_LaunchGstListener),(void*)ctx);
+ }
+ ret = pthread_create(&(ctx->busloopThr), NULL,
+ (XAAdaptationGst_LaunchGstListener), (void*) ctx);
// VASU MOD BEGINS
- if ( ctx->thread_launched == XA_BOOLEAN_FALSE )
- {
+ if (ctx->thread_launched == XA_BOOLEAN_FALSE)
+ {
// Wait until the thread is created
pthread_mutex_lock(&(ctx->ds_mutex));
pthread_cond_wait(&(ctx->ds_condition), &(ctx->ds_mutex));
pthread_mutex_unlock(&(ctx->ds_mutex));
// VASU MOD ENDS
- }
- if(ret)
- {
+ }
+ if (ret)
+ {
DEBUG_ERR_A1("could not create thread!! (%d)",ret)
return XA_RESULT_INTERNAL_ERROR;
+ }DEBUG_API("<-XAAdaptationGst_InitGstListener");
+ return XA_RESULT_SUCCESS;
}
- DEBUG_API("<-XAAdaptationGst_InitGstListener");
- return XA_RESULT_SUCCESS;
-}
void * XAAdaptationGst_LaunchGstListener(void* args)
-{
- XAAdaptationGstCtx* ctx = (XAAdaptationGstCtx*)args;
+ {
+ XAAdaptationGstCtx* ctx = (XAAdaptationGstCtx*) args;
DEBUG_API("->XAAdaptationGst_LaunchGstListener");
// VASU MOD BEGINS
// Signal calling thread that this thread creation is completed
@@ -271,39 +277,38 @@
pthread_mutex_unlock(&(ctx->ds_mutex));
// VASU MOD ENDS
- ctx->busloop = g_main_loop_new( NULL, FALSE );
- if ( !ctx->busloop )
- {
- DEBUG_ERR("Glib main loop failure.")
+ ctx->busloop = g_main_loop_new(NULL, FALSE);
+ if (!ctx->busloop)
+ {
+ DEBUG_ERR("Glib main loop failure.");
DEBUG_API("<-XAAdaptationGst_LaunchGstListener");
assert(0);
- }
+ }
else
- {
+ {
DEBUG_INFO("Start Glib main loop")
g_main_loop_run(ctx->busloop);
- DEBUG_INFO("Glib main loop stopped - exiting thread")
+ DEBUG_INFO("Glib main loop stopped - exiting thread");
DEBUG_API("<-XAAdaptationGst_LaunchGstListener");
pthread_exit(NULL);
+ }
+ return NULL;
}
- return NULL;
-}
void XAAdaptationGst_StopGstListener(XAAdaptationGstCtx* ctx)
-{
+ {
DEBUG_API("->XAAdaptationGst_StopGstListener");
- if(ctx->busloop)
- {
- g_main_loop_quit (ctx->busloop);
+ if (ctx->busloop)
+ {
+ g_main_loop_quit(ctx->busloop);
g_main_loop_unref(ctx->busloop);
- }
- if(ctx->bus)
- {
+ }
+ if (ctx->bus)
+ {
gst_object_unref(ctx->bus);
ctx->bus = NULL;
+ }DEBUG_API("<-XAAdaptationGst_StopGstListener");
}
- DEBUG_API("<-XAAdaptationGst_StopGstListener");
-}
/*
* ASynchronous operation managing
@@ -312,87 +317,85 @@
/* NOTE: This should NOT be called from gst callbacks - danger of deadlock!!
*/
void XAAdaptationGst_PrepareAsyncWait(XAAdaptationGstCtx* ctx)
-{
+ {
DEBUG_API("->XAAdaptationGst_PrepareAsyncWait");
- if( ctx->waitingasyncop )
- { /*wait previous async op*/
+ if (ctx->waitingasyncop)
+ { /*wait previous async op*/
DEBUG_INFO("::WARNING:: previous asynch still ongoing!!!");
DEBUG_INFO(">>>> WAIT PREVIOUS");
sem_wait(&(ctx->semAsyncWait));
DEBUG_INFO("<<<< PREVIOUS COMPLETED");
- }
- sem_init(&(ctx->semAsyncWait),0,0);
+ }
+ sem_init(&(ctx->semAsyncWait), 0, 0);
ctx->waitingasyncop = XA_BOOLEAN_TRUE;
DEBUG_API("<-XAAdaptationGst_PrepareAsyncWait");
-}
+ }
void XAAdaptationGst_StartAsyncWait(XAAdaptationGstCtx* ctx)
-{
+ {
DEBUG_API("->XAAdaptationGst_StartAsyncWait");
/* timeout to try to avoid gst freeze in rollup */
ctx->asynctimer = g_timeout_add(XA_ADAPT_ASYNC_TIMEOUT,
- XAAdaptationGst_CancelAsyncWait, ctx);
+ XAAdaptationGst_CancelAsyncWait, ctx);
/* check flag once again if callback already happened before wait */
- if(ctx->waitingasyncop)
- {
+ if (ctx->waitingasyncop)
+ {
DEBUG_INFO(">>>> ASYNC STARTS");
sem_wait(&(ctx->semAsyncWait));
DEBUG_INFO("<<<< ASYNC COMPLETED");
- }
+ }
else
- {
+ {
DEBUG_INFO("<> async completed already");
- }
+ }
/*cancel timer*/
- if(ctx->asynctimer)
- {
+ if (ctx->asynctimer)
+ {
g_source_remove(ctx->asynctimer);
- }
+ }
ctx->waitingasyncop = XA_BOOLEAN_FALSE;
DEBUG_API("<-XAAdaptationGst_StartAsyncWait");
-}
+ }
/* async operation timeout callback*/
gboolean XAAdaptationGst_CancelAsyncWait(gpointer ctx)
-{
- XAAdaptationGstCtx* bCtx = (XAAdaptationGstCtx*)ctx;
+ {
+ XAAdaptationGstCtx* bCtx = (XAAdaptationGstCtx*) ctx;
DEBUG_API("->XAAdaptationGst_CancelAsyncWait");
- if( bCtx->waitingasyncop )
- {
+ if (bCtx->waitingasyncop)
+ {
DEBUG_ERR_A3("ASYNC TIMED OUT : current %d, gsttarget %d, wanted %d",
- GST_STATE(bCtx->bin), GST_STATE_TARGET(bCtx->bin), bCtx->binWantedState);
+ GST_STATE(bCtx->bin), GST_STATE_TARGET(bCtx->bin), bCtx->binWantedState);
bCtx->waitingasyncop = XA_BOOLEAN_FALSE;
sem_post(&(bCtx->semAsyncWait));
- }
- DEBUG_API("<-XAAdaptationGst_CancelAsyncWait");
+ }DEBUG_API("<-XAAdaptationGst_CancelAsyncWait");
/* return false to remove timer */
return FALSE;
-}
+ }
void XAAdaptationGst_CompleteAsyncWait(XAAdaptationGstCtx* ctx)
-{
+ {
DEBUG_API("->XAAdaptationGst_CompleteAsyncWait");
- if( ctx->waitingasyncop )
- {
+ if (ctx->waitingasyncop)
+ {
int i;
ctx->waitingasyncop = XA_BOOLEAN_FALSE;
- sem_getvalue(&(ctx->semAsyncWait),&i);
+ sem_getvalue(&(ctx->semAsyncWait), &i);
DEBUG_INFO_A1("Asynch operation succeeded, sem value %d",i);
- if(i<=0)
- { /* only post if locked */
+ if (i <= 0)
+ { /* only post if locked */
sem_post(&(ctx->semAsyncWait));
- }
- else if(i>0)
- { /* should not be, reset semaphore */
- sem_init(&(ctx->semAsyncWait),0,0);
- }
+ }
+ else if (i > 0)
+ { /* should not be, reset semaphore */
+ sem_init(&(ctx->semAsyncWait), 0, 0);
+ }
+ }DEBUG_API("<-XAAdaptationGst_CompleteAsyncWait");
}
- DEBUG_API("<-XAAdaptationGst_CompleteAsyncWait");
-}
/**
* GstElement* XAAdaptationGst_CreateGstSource( XADataSource* xaSrc, const XAchar *name )
@@ -402,198 +405,208 @@
* @return GstElement* - return newly created gst source element
* Description: Create gst source element corresponding to XA source structure
*/
-GstElement* XAAdaptationGst_CreateGstSource( XADataSource* xaSrc, const char *name, XAboolean *isobj, XAboolean *isPCM, XAboolean *isRawImage )
-{
+GstElement* XAAdaptationGst_CreateGstSource(XADataSource* xaSrc,
+ const char *name, XAboolean *isobj, XAboolean *isPCM,
+ XAboolean *isRawImage)
+ {
XAuint32 locType = 0;
GstElement* gstSrc = NULL;
- char* fname=NULL;
+ char* fname = NULL;
XADataLocator_URI* uri = NULL;
XADataLocator_IODevice* ioDevice = NULL;
+#ifdef OMAX_CAMERABIN
XACameraDeviceImpl* cameraDevice = NULL;
+ XAObjectItfImpl* pObj = NULL;
+#endif
XARadioDeviceImpl* radioDevice = NULL;
- XAObjectItfImpl* pObj = NULL;
DEBUG_API("->XAAdaptationGst_CreateGstSource");
- if( !xaSrc || !xaSrc->pLocator || !isobj )
- {
+ if (!xaSrc || !xaSrc->pLocator || !isobj)
+ {
return NULL;
- }
+ }
*isobj = XA_BOOLEAN_FALSE;
- if( xaSrc && xaSrc->pFormat && *((XAuint32*)(xaSrc->pFormat))==XA_DATAFORMAT_PCM && isPCM )
- {
+ if (xaSrc && xaSrc->pFormat && *((XAuint32*) (xaSrc->pFormat))
+ ==XA_DATAFORMAT_PCM && isPCM)
+ {
*isPCM = XA_BOOLEAN_TRUE;
- }
- if( xaSrc && xaSrc->pFormat && *((XAuint32*)(xaSrc->pFormat))==XA_DATAFORMAT_RAWIMAGE && isRawImage )
- {
+ }
+ if (xaSrc && xaSrc->pFormat && *((XAuint32*) (xaSrc->pFormat))
+ ==XA_DATAFORMAT_RAWIMAGE && isRawImage)
+ {
*isRawImage = XA_BOOLEAN_TRUE;
- }
- locType = *((XAuint32*)(xaSrc->pLocator));
- switch ( locType )
- {
+ }
+ locType = *((XAuint32*) (xaSrc->pLocator));
+ switch (locType)
+ {
case XA_DATALOCATOR_URI:
- DEBUG_INFO("XA_DATALOCATOR_URI");
- uri = (XADataLocator_URI*)xaSrc->pLocator;
- gstSrc = gst_element_factory_make("filesrc",name);
- if ( uri->URI != NULL )
- {
+ DEBUG_INFO("XA_DATALOCATOR_URI")
+ ;
+ uri = (XADataLocator_URI*) xaSrc->pLocator;
+ gstSrc = gst_element_factory_make("filesrc", name);
+ if (uri->URI != NULL)
+ {
DEBUG_INFO_A1("URI: %s", uri->URI);
- if(strncmp((char *)uri->URI, "file:///", 8) == 0)
+ if (strncmp((char *) uri->URI, "file:///", 8) == 0)
{
- fname = (char *)&((uri->URI)[8]);
+ fname = (char *) &((uri->URI)[8]);
}
else
{
- fname = (char *)uri->URI;
+ fname = (char *) uri->URI;
+ }DEBUG_INFO_A1("->filesystem path %s", fname);
+ g_object_set(G_OBJECT(gstSrc), "location", fname, NULL);
+ /*check for pcm - decodebin does not know how to handle raw PCM files */
+ if (isPCM && strstr(fname, ".pcm"))
+ {
+ DEBUG_INFO("PCM file detected");
+ *isPCM = XA_BOOLEAN_TRUE;
}
- DEBUG_INFO_A1("->filesystem path %s", fname);
- g_object_set( G_OBJECT(gstSrc), "location", fname, NULL );
- /*check for pcm - decodebin does not know how to handle raw PCM files */
- if( isPCM && strstr(fname, ".pcm") )
+ }
+ else
{
- DEBUG_INFO("PCM file detected");
- *isPCM=XA_BOOLEAN_TRUE;
- }
- }
- else
- {
DEBUG_ERR("No uri specified.");
return NULL;
- }
+ }
break; /* XA_DATALOCATOR_URI */
-
case XA_DATALOCATOR_IODEVICE:
- DEBUG_INFO("XA_DATALOCATOR_IODEVICE");
- ioDevice = (XADataLocator_IODevice*)(xaSrc->pLocator);
- switch ( ioDevice->deviceType )
- {
+ DEBUG_INFO("XA_DATALOCATOR_IODEVICE")
+ ;
+ ioDevice = (XADataLocator_IODevice*) (xaSrc->pLocator);
+ switch (ioDevice->deviceType)
+ {
case XA_IODEVICE_AUDIOINPUT:
- {
+ {
DEBUG_INFO("XA_IODEVICE_AUDIOINPUT");
DEBUG_INFO_A1("ioDevice->deviceID: %x", ioDevice->deviceID);
- switch (ioDevice->deviceID )
- {
- //case XA_ADAPTID_ALSASRC: //Krishna
- case XA_ADAPTID_DEVSOUNDSRC:
- //DEBUG_INFO("alsasrc"); //Krishna
- DEBUG_INFO("devsoundsrc");
- gstSrc = gst_element_factory_make("devsoundsrc",name); //Krishna - changed to devsoundsrc
- g_object_set (G_OBJECT (gstSrc), "num-buffers", 80, NULL);
- break;
- case XA_ADAPTID_AUDIOTESTSRC:
- /*fall through*/
- default:
- DEBUG_INFO("audiotestsrc");
- gstSrc = gst_element_factory_make("audiotestsrc",name);
- break;
- }
- break;
- }
- case XA_IODEVICE_CAMERA:
- {
- DEBUG_INFO("XA_IODEVICE_CAMERA");
- if ( ioDevice->device )
- { /*source is camera object*/
- DEBUG_INFO("Use camerabin as source.");
- /* Get camerabin from source object */
- pObj = (XAObjectItfImpl*)(*ioDevice->device);
- cameraDevice = (XACameraDeviceImpl*)(pObj);
- /*TODO we had to remove this line below since adaptationCtx
- * was not a member of structure*/
-
- gstSrc = GST_ELEMENT(((XAAdaptationGstCtx*)(cameraDevice->adaptationCtx))->bin);
- /* refcount increase is needed to keep this not being deleted after use */
- gst_object_ref(GST_OBJECT(gstSrc));
- *isobj = XA_BOOLEAN_TRUE;
- }
- else
- {
- DEBUG_INFO_A1("ioDevice->deviceID: %x", ioDevice->deviceID);
- switch (ioDevice->deviceID )
+ switch (ioDevice->deviceID)
{
- case XA_ADAPTID_V4L2SRC:
- DEBUG_INFO("Camera deviceID: v4l2src ");
-
+ //case XA_ADAPTID_ALSASRC: //Krishna
+ case XA_ADAPTID_DEVSOUNDSRC:
+ //DEBUG_INFO("alsasrc"); //Krishna
+ DEBUG_INFO("devsoundsrc")
+ ;
+ gstSrc = gst_element_factory_make("devsoundsrc",
+ name); //Krishna - changed to devsoundsrc
+ g_object_set(G_OBJECT (gstSrc), "num-buffers",
+ 80, NULL);
break;
- case XA_ADAPTID_VIDEOTESTSRC:
- DEBUG_INFO("Camera deviceID: videotestsrc");
-
- break;
+ case XA_ADAPTID_AUDIOTESTSRC:
+ /*fall through*/
default:
- case XA_DEFAULTDEVICEID_CAMERA:
- DEBUG_INFO("Camera deviceID:Default");
-
+ DEBUG_INFO("audiotestsrc")
+ ;
+ gstSrc = gst_element_factory_make("audiotestsrc",
+ name);
break;
}
- if ( cameraCtx )
- {
- gstSrc = GST_ELEMENT(cameraCtx->baseObj.bin);
- gst_object_ref(GST_OBJECT(gstSrc));
- *isobj = XA_BOOLEAN_TRUE;
- }
- else
- {
- DEBUG_ERR("No camera object created!");
- return NULL;
- }
+ break;
}
- break;
- }
+#ifdef OMAX_CAMERABIN
+
+ case XA_IODEVICE_CAMERA:
+ {
+ DEBUG_INFO("XA_IODEVICE_CAMERA");
+ if ( ioDevice->device )
+ { /*source is camera object*/
+ DEBUG_INFO("Use camerabin as source.");
+ /* Get camerabin from source object */
+ pObj = (XAObjectItfImpl*)(*ioDevice->device);
+ cameraDevice = (XACameraDeviceImpl*)(pObj);
+ /*TODO we had to remove this line below since adaptationCtx
+ * was not a member of structure*/
+
+ gstSrc = GST_ELEMENT(((XAAdaptationGstCtx*)(cameraDevice->adaptationCtx))->bin);
+ /* refcount increase is needed to keep this not being deleted after use */
+ gst_object_ref(GST_OBJECT(gstSrc));
+ *isobj = XA_BOOLEAN_TRUE;
+ }
+ else
+ {
+ DEBUG_INFO_A1("ioDevice->deviceID: %x", ioDevice->deviceID);
+ switch (ioDevice->deviceID )
+ {
+ case XA_ADAPTID_V4L2SRC:
+ DEBUG_INFO("Camera deviceID: v4l2src ");
+
+ break;
+ case XA_ADAPTID_VIDEOTESTSRC:
+ DEBUG_INFO("Camera deviceID: videotestsrc");
+
+ break;
+ default:
+ case XA_DEFAULTDEVICEID_CAMERA:
+ DEBUG_INFO("Camera deviceID:Default");
+
+ break;
+ }
+ if ( cameraCtx )
+ {
+ gstSrc = GST_ELEMENT(cameraCtx->baseObj.bin);
+ gst_object_ref(GST_OBJECT(gstSrc));
+ *isobj = XA_BOOLEAN_TRUE;
+ }
+ else
+ {
+ DEBUG_ERR("No camera object created!");
+ return NULL;
+ }
+ }
+ break;
+ }
+#endif
case XA_IODEVICE_RADIO:
- DEBUG_INFO("XA_IODEVICE_RADIO");
- if ( ioDevice->device )
- {
+ DEBUG_INFO("XA_IODEVICE_RADIO")
+ ;
+ if (ioDevice->device)
+ {
DEBUG_INFO("Use radio pipeline as source.");
/* Get radio_pipeline and set it to base context */
- radioDevice = (XARadioDeviceImpl*)(*ioDevice->device);
+ radioDevice = (XARadioDeviceImpl*) (*ioDevice->device);
/* radio does not have actual bin, only source element*/
gstSrc = GST_ELEMENT(((XAAdaptationGstCtx*)radioDevice->adaptationCtx)->bin);
/* refcount increase is needed to keep this not being deleted after use */
gst_object_ref(GST_OBJECT(gstSrc));
/**isobj = XA_BOOLEAN_TRUE;*/
- }
+ }
break;
default:
- {
+ {
DEBUG_ERR("Unsupported IODevice.");
break;
+ }
}
- }
break; /* XA_DATALOCATOR_IODEVICE */
-/* case XA_DATALOCATOR_CONTENTPIPE:
- {
- DEBUG_INFO("XA_DATALOCATOR_CONTENTPIPE");
- gstSrc = gst_element_factory_make("appsrc",name);
- break;
- }*/
case XA_DATALOCATOR_ADDRESS:
{
- XADataLocator_Address* address = (XADataLocator_Address*)(xaSrc->pLocator);
- gstSrc = gst_element_factory_make("appsrc", name);
- /* init gst buffer from datalocator */
- if( gstSrc )
+ XADataLocator_Address* address =
+ (XADataLocator_Address*) (xaSrc->pLocator);
+ gstSrc = gst_element_factory_make("appsrc", name);
+ /* init gst buffer from datalocator */
+ if (gstSrc)
{
- /* init GST buffer from XADataLocator*/
- GstBuffer* userBuf = gst_buffer_new();
- if( userBuf )
+ /* init GST buffer from XADataLocator*/
+ GstBuffer* userBuf = gst_buffer_new();
+ if (userBuf)
{
- userBuf->size = address->length;
- userBuf->data = address->pAddress;
- /* push the whole buffer to appsrc so it is ready for preroll */
- DEBUG_INFO("Pushing buffer");
- gst_app_src_push_buffer( GST_APP_SRC(gstSrc), userBuf );
- DEBUG_INFO_A1("Sent buffer at 0x%x to appsrc", userBuf );
- gst_app_src_end_of_stream( GST_APP_SRC(gstSrc) );
+ userBuf->size = address->length;
+ userBuf->data = address->pAddress;
+ /* push the whole buffer to appsrc so it is ready for preroll */
+ DEBUG_INFO("Pushing buffer");
+ gst_app_src_push_buffer(GST_APP_SRC(gstSrc), userBuf);
+ DEBUG_INFO_A1("Sent buffer at 0x%x to appsrc", userBuf );
+ gst_app_src_end_of_stream(GST_APP_SRC(gstSrc));
}
- else
+ else
{
- DEBUG_ERR("Failure allocating buffer!");
+ DEBUG_ERR("Failure allocating buffer!");
}
}
- else
+ else
{
- DEBUG_ERR("Failure creating appsrc!");
+ DEBUG_ERR("Failure creating appsrc!");
}
}
break;
@@ -601,17 +614,16 @@
default:
DEBUG_ERR("Incorrect data locator for source.")
break;
- }
+ }
- if ( gstSrc )
- {
+ if (gstSrc)
+ {
DEBUG_INFO_A1("Created gstreamer source element at %x", gstSrc);
- }
+ }
DEBUG_API("<-XAAdaptationGst_CreateGstSource");
return gstSrc;
-}
-
+ }
/**
* GstElement* XAAdaptationGst_CreateGstSink( XADataSink* xaSnk, const XAchar *name )
@@ -620,129 +632,128 @@
* @return GstElement* - return newly created gst sink element
* Description: Create gst sink element corresponding to XA sink structure
*/
-GstElement* XAAdaptationGst_CreateGstSink( XADataSink* xaSnk, const char *name, XAboolean *isobj )
-{
+GstElement* XAAdaptationGst_CreateGstSink(XADataSink* xaSnk,
+ const char *name, XAboolean *isobj)
+ {
XAuint32 locType = 0;
GstElement* gstSnk = NULL;
XADataLocator_URI* uri = NULL;
DEBUG_API("->XAAdaptationGst_CreateGstSink");
- if(!xaSnk || !xaSnk->pLocator)
- {
+ if (!xaSnk || !xaSnk->pLocator)
+ {
DEBUG_INFO("Warning! No sink specified, use fakesink");
- gstSnk = gst_element_factory_make("fakesink",name);
- if(!gstSnk)
- {
+ gstSnk = gst_element_factory_make("fakesink", name);
+ if (!gstSnk)
+ {
DEBUG_ERR("Cannot create sink!");
return NULL;
+ }
+ g_object_set(G_OBJECT(gstSnk), "async", FALSE, NULL);
}
- g_object_set( G_OBJECT(gstSnk),"async", FALSE, NULL);
- }
else
- {
- locType = *((XAuint32*)(xaSnk->pLocator));
- switch ( locType )
{
+ locType = *((XAuint32*) (xaSnk->pLocator));
+ switch (locType)
+ {
case XA_DATALOCATOR_URI:
- DEBUG_INFO("XA_DATALOCATOR_URI");
- uri = (XADataLocator_URI*)xaSnk->pLocator;
- gstSnk = gst_element_factory_make("filesink",name);
- if(!gstSnk)
- {
+ DEBUG_INFO("XA_DATALOCATOR_URI")
+ ;
+ uri = (XADataLocator_URI*) xaSnk->pLocator;
+ gstSnk = gst_element_factory_make("filesink", name);
+ if (!gstSnk)
+ {
DEBUG_ERR("Cannot create sink!");
return NULL;
- }
- if ( uri->URI != NULL )
- {
+ }
+ if (uri->URI != NULL)
+ {
XAchar *fname;
DEBUG_INFO_A1("URI: %s", uri->URI);
- if(strncmp((char *)uri->URI, "file:///", 8) == 0)
- {
+ if (strncmp((char *) uri->URI, "file:///", 8) == 0)
+ {
fname = &((uri->URI)[8]);
- }
+ }
else
- {
+ {
fname = uri->URI;
+ }DEBUG_INFO_A1("->filesystem path %s", fname);
+ g_object_set(G_OBJECT(gstSnk), "location", fname,
+ "async", FALSE, "qos", FALSE, "max-lateness",
+ (gint64) (-1), NULL);
}
- DEBUG_INFO_A1("->filesystem path %s", fname);
- g_object_set( G_OBJECT(gstSnk),"location", fname,
- "async", FALSE,
- "qos", FALSE,
- "max-lateness", (gint64)(-1),
- NULL);
- }
else
- {
+ {
DEBUG_ERR("No recording output uri specified.");
return NULL;
- }
+ }
break;
case XA_DATALOCATOR_NATIVEDISPLAY:
- DEBUG_INFO("Sink locator type - XA_DATALOCATOR_NATIVEDISPLAY");
+ DEBUG_INFO("Sink locator type - XA_DATALOCATOR_NATIVEDISPLAY")
+ ;
#ifdef USE_NGA_SURFACES
- gstSnk = gst_element_factory_make("devvideosink","devvideosink");
+ gstSnk = gst_element_factory_make("devvideosink",
+ "devvideosink");
#else
gstSnk = gst_element_factory_make("ximagesink",name);
#endif /*USE_NGA_SURFACES*/
- if(!gstSnk)
- {
+ if (!gstSnk)
+ {
DEBUG_ERR("Cannot create sink!");
return NULL;
- }
- g_object_set( G_OBJECT(gstSnk), "force-aspect-ratio", TRUE,
- "async", FALSE,
- "qos", FALSE,
- "handle-events", TRUE,
- "handle-expose", TRUE,
- "max-lateness", (gint64)(-1),
- NULL);
+ }
+ g_object_set(G_OBJECT(gstSnk), "force-aspect-ratio", TRUE,
+ "async", FALSE, "qos", FALSE, "handle-events", TRUE,
+ "handle-expose", TRUE, "max-lateness", (gint64) (-1),
+ NULL);
break;
case XA_DATALOCATOR_OUTPUTMIX:
- DEBUG_INFO("Sink locator type - XA_DATALOCATOR_OUTPUTMIX");
- {
+ DEBUG_INFO("Sink locator type - XA_DATALOCATOR_OUTPUTMIX")
+ ;
+ {
/* Get OutputMix adaptation from data locator */
- XADataLocator_OutputMix* omix = (XADataLocator_OutputMix*)(xaSnk->pLocator);
- if ( omix->outputMix )
- {
- XAOMixImpl* omixDevice = (XAOMixImpl*)(*omix->outputMix);
+ XADataLocator_OutputMix* omix =
+ (XADataLocator_OutputMix*) (xaSnk->pLocator);
+ if (omix->outputMix)
+ {
+ XAOMixImpl* omixDevice =
+ (XAOMixImpl*) (*omix->outputMix);
- if(omixDevice)
- {
+ if (omixDevice)
+ {
/*TODO we had to remove this line below since adaptationCtx
* was not a member of structure*/
-
+
/*gstSnk = XAOutputMixAdapt_GetSink(omixDevice->adaptationCtx);*/
- if(!gstSnk)
- {
+ if (!gstSnk)
+ {
DEBUG_ERR("Cannot create sink!");
return NULL;
- }
+ }
*isobj = XA_BOOLEAN_TRUE;
- }
+ }
else
- {
+ {
DEBUG_ERR("Warning - NULL outputmix object - default audio output used");
- gstSnk = gst_element_factory_make("alsasink",name);
+ gstSnk = gst_element_factory_make("alsasink",
+ name);
+ }
}
- }
else
- {
+ {
DEBUG_ERR("Warning - NULL outputmix object - default audio output used");
- gstSnk = gst_element_factory_make("alsasink",name);
- }
+ gstSnk = gst_element_factory_make("alsasink", name);
+ }
- }
+ }
break;
-/* case XA_DATALOCATOR_CONTENTPIPE:
- DEBUG_INFO("XA_DATALOCATOR_CONTENTPIPE");
- gstSnk = gst_element_factory_make("appsink",name);
- break;*/
+
case XA_DATALOCATOR_ADDRESS:
{
- gstSnk = gst_element_factory_make("appsink", name);
- /* Not actually object sink, but attribute used to notify recorder
- * about appsink (no object sinks applicable in this use case)
- **/
- *isobj=TRUE;
+ gstSnk = gst_element_factory_make("appsink", name);
+ /* Not actually object sink, but attribute used to notify recorder
+ * about appsink (no object sinks applicable in this use case)
+ **/
+ *isobj = TRUE;
}
break;
case XA_DATALOCATOR_IODEVICE:
@@ -753,718 +764,690 @@
default:
DEBUG_ERR("Incorrect data locator for sink.")
break;
+ }
}
- }
- if (gstSnk )
- {
+ if (gstSnk)
+ {
DEBUG_INFO_A1("Created gstreamer sink element at %x", gstSnk);
+ }DEBUG_API("<-XAAdaptationGst_CreateGstSink");
+ return gstSnk;
}
- DEBUG_API("<-XAAdaptationGst_CreateGstSink");
- return gstSnk;
-}
/**
* GstElement* XAAdaptationGst_CreateVideoPP( )
* @return GstElement* - return newly created gst pipeline element
* Description: Create video processing pipeline
*/
-GstElement* XAAdaptationGst_CreateVideoPP( )
-{
+GstElement* XAAdaptationGst_CreateVideoPP()
+ {
GstElement *vpp;
DEBUG_API("->XAAdaptationGst_CreateVideoPP");
vpp = gst_pipeline_new("videopp");
- if( vpp )
- {
+ if (vpp)
+ {
GstPad *ghostsink, *ghostsrc;
- GstElement *col1,
- *col2,
- *rotate,
- *mirror,
- *box,
- *crop,
- *gamma,
- *balance,
- *scale,
- *scale2,
+ GstElement *col1, *col2, *rotate, *mirror, *box, *crop, *gamma,
+ *balance, *scale, *scale2,
#ifdef USE_NGA_SURFACES
- *identity,
+ *identity,
#endif /*USE_NGA_SURFACES*/
- *queue;
-
+ *queue;
/* Crete ffmpegcolorspace to convert stream to correct format */
- col1 = gst_element_factory_make( "ffmpegcolorspace", "pp_colsp1");
- if(col1)
- {
+ col1 = gst_element_factory_make("ffmpegcolorspace", "pp_colsp1");
+ if (col1)
+ {
DEBUG_INFO("Created ffmpegcolorspace element");
gst_bin_add(GST_BIN(vpp), col1);
- /* make this bin link point*/
- ghostsink = gst_element_get_static_pad(col1,"sink");
- if(ghostsink)
- {
- gst_element_add_pad(vpp, gst_ghost_pad_new("videopp_sink",ghostsink));
+ /* make this bin link point*/
+ ghostsink = gst_element_get_static_pad(col1, "sink");
+ if (ghostsink)
+ {
+ gst_element_add_pad(vpp, gst_ghost_pad_new("videopp_sink",
+ ghostsink));
gst_object_unref(GST_OBJECT(ghostsink));
+ }
}
- }
/* create video crop, this will be sink for videoPP pipeline */
- crop = gst_element_factory_make( "videocrop", "pp_crop");
- if(crop)
- {
+ crop = gst_element_factory_make("videocrop", "pp_crop");
+ if (crop)
+ {
DEBUG_INFO("Created crop element");
gst_bin_add(GST_BIN(vpp), crop);
- }
+ }
/* create video rotate */
- rotate = gst_element_factory_make( "videoflip", "pp_rotate");
- if(rotate)
- {
+ rotate = gst_element_factory_make("videoflip", "pp_rotate");
+ if (rotate)
+ {
DEBUG_INFO("Created rotate element");
g_object_set(G_OBJECT(rotate), "method", FLIP_NONE, NULL);
gst_bin_add(GST_BIN(vpp), rotate);
- }
+ }
/* create video mirror */
- mirror = gst_element_factory_make( "videoflip", "pp_mirror");
- if(mirror)
- {
+ mirror = gst_element_factory_make("videoflip", "pp_mirror");
+ if (mirror)
+ {
DEBUG_INFO("Created mirror element");
g_object_set(G_OBJECT(mirror), "method", FLIP_NONE, NULL);
gst_bin_add(GST_BIN(vpp), mirror);
- }
+ }
/* create video box */
- box = gst_element_factory_make( "videobox", "pp_box");
- if(box)
- {
+ box = gst_element_factory_make("videobox", "pp_box");
+ if (box)
+ {
DEBUG_INFO("Created videobox element");
gst_bin_add(GST_BIN(vpp), box);
- }
+ }
/* create video balance */
- balance = gst_element_factory_make( "videobalance", "pp_balance");
- if(balance)
- {
+ balance = gst_element_factory_make("videobalance", "pp_balance");
+ if (balance)
+ {
DEBUG_INFO("Created balance element");
gst_bin_add(GST_BIN(vpp), balance);
- }
+ }
/* create video gamma */
- gamma = gst_element_factory_make( "gamma", "pp_gamma");
- if(gamma)
- {
+ gamma = gst_element_factory_make("gamma", "pp_gamma");
+ if (gamma)
+ {
DEBUG_INFO("Created gamma element");
gst_bin_add(GST_BIN(vpp), gamma);
- }
+ }
/* Create videoscale element to scale postprocessed output to correct size */
scale = gst_element_factory_make("videoscale", "pp_scale");
- if ( scale )
- {
+ if (scale)
+ {
DEBUG_INFO("Created videoscale element");
gst_bin_add(GST_BIN(vpp), scale);
- }
+ }
scale2 = gst_element_factory_make("videoscale", "pp_scale2");
- if ( scale2 )
- {
- GstPad *pad = NULL;
- GstCaps *caps = NULL;
- DEBUG_INFO("Created videoscale element");
- pad = gst_element_get_static_pad(scale2,"src");
- caps = gst_caps_new_simple("video/x-raw-yuv",
- "width", G_TYPE_INT,0,
- "height", G_TYPE_INT,0,
- NULL);
- gst_pad_set_caps(pad, caps);
- gst_bin_add(GST_BIN(vpp), scale2);
- }
+ if (scale2)
+ {
+ GstPad *pad = NULL;
+ GstCaps *caps = NULL;
+ DEBUG_INFO("Created videoscale element");
+ pad = gst_element_get_static_pad(scale2, "src");
+ caps = gst_caps_new_simple("video/x-raw-yuv", "width",
+ G_TYPE_INT, 0, "height", G_TYPE_INT, 0, NULL);
+ gst_pad_set_caps(pad, caps);
+ gst_bin_add(GST_BIN(vpp), scale2);
+ }
/* create video queue */
- queue = gst_element_factory_make( "queue", "vpp_queue");
- if(queue)
- {
+ queue = gst_element_factory_make("queue", "vpp_queue");
+ if (queue)
+ {
DEBUG_INFO("Created queue element");
gst_bin_add(GST_BIN(vpp), queue);
#ifdef USE_NGA_SURFACES
/* make this bin link point*/
- ghostsink = gst_element_get_static_pad(queue,"sink");
- if(ghostsink)
- {
- gst_element_add_pad(vpp, gst_ghost_pad_new("videopp_src",ghostsink));
+ ghostsink = gst_element_get_static_pad(queue, "sink");
+ if (ghostsink)
+ {
+ gst_element_add_pad(vpp, gst_ghost_pad_new("videopp_src",
+ ghostsink));
gst_object_unref(GST_OBJECT(ghostsink));
- }
+ }
#endif /*USE_NGA_SURFACES*/
- }
-
+ }
/* Crete ffmpegcolorspace to convert stream to correct format */
- col2 = gst_element_factory_make( "ffmpegcolorspace", "pp_colsp2");
- if(col2)
- {
+ col2 = gst_element_factory_make("ffmpegcolorspace", "pp_colsp2");
+ if (col2)
+ {
DEBUG_INFO("Created ffmpegcolorspace element");
gst_bin_add(GST_BIN(vpp), col2);
/* make this bin link point*/
- ghostsrc = gst_element_get_static_pad(col2,"src");
- if(ghostsrc)
- {
- gst_element_add_pad(vpp, gst_ghost_pad_new("videopp_src",ghostsrc));
+ ghostsrc = gst_element_get_static_pad(col2, "src");
+ if (ghostsrc)
+ {
+ gst_element_add_pad(vpp, gst_ghost_pad_new("videopp_src",
+ ghostsrc));
gst_object_unref(GST_OBJECT(ghostsrc));
+ }
}
- }
#ifdef USE_NGA_SURFACES
//shyward
/* create identity element */
- identity = gst_element_factory_make( "identity", "identity" );
- if(identity)
- {
- DEBUG_INFO("Created identity element");
- gst_bin_add(GST_BIN(vpp), identity);
- /* make this bin link point*/
- ghostsrc = gst_element_get_static_pad(identity,"src");
- if(ghostsrc)
- {
- gst_element_add_pad(vpp, gst_ghost_pad_new("videopp_sink",ghostsrc));
- gst_object_unref(GST_OBJECT(ghostsrc));
- }
- }
- if( !(gst_element_link_many(queue,identity,NULL)) )
+ identity = gst_element_factory_make("identity", "identity");
+ if (identity)
+ {
+ DEBUG_INFO("Created identity element");
+ gst_bin_add(GST_BIN(vpp), identity);
+ /* make this bin link point*/
+ ghostsrc = gst_element_get_static_pad(identity, "src");
+ if (ghostsrc)
+ {
+ gst_element_add_pad(vpp, gst_ghost_pad_new("videopp_sink",
+ ghostsrc));
+ gst_object_unref(GST_OBJECT(ghostsrc));
+ }
+ }
+ if (!(gst_element_link_many(queue, identity, NULL)))
#else
//shyward - thins code assumes all the elements will have been created, which is not true
if( !(gst_element_link_many(col1,
- scale,
- crop,
- rotate,
- mirror,
- box,
- balance,
- gamma,
- queue,
- scale2,
+ scale,
+ crop,
+ rotate,
+ mirror,
+ box,
+ balance,
+ gamma,
+ queue,
+ scale2,
#ifdef USE_NGA_SURFACES
- identity,
+ identity,
#endif /*USE_NGA_SURFACES*/
- col2,
- NULL)
- ) )
+ col2,
+ NULL)
+ ) )
#endif /*USE_NGA_SURFACES*/
- {
+ {
DEBUG_ERR("Could not link videopp elements!!");
gst_object_unref(vpp);
vpp = NULL;
- }
+ }
+ }DEBUG_API("<-XAAdaptationGst_CreateVideoPP");
+ return vpp;
}
- DEBUG_API("<-XAAdaptationGst_CreateVideoPP");
- return vpp;
-}
/**
* GstElement* XAAdaptationGst_CreateFixedSizeRecordVideoPP( )
* @return GstElement* - return newly created gst pipeline element
- * Description: Create video processing pipeline with fixed output size to TEST_VIDEO_WIDTH x TEST_VIDEO_HEIGHT
+ * Description: Create video processing pipeline with fixed output size
+ * to TEST_VIDEO_WIDTH x TEST_VIDEO_HEIGHT
* experimental implementation for changing recorder output size
*/
-GstElement* XAAdaptationGst_CreateFixedSizeVideoPP( )
-{
+GstElement* XAAdaptationGst_CreateFixedSizeVideoPP()
+ {
GstElement *vpp;
DEBUG_API("->XAAdaptationGst_CreateFixedSizeVideoPP");
vpp = gst_pipeline_new("videopp");
- if( vpp )
- {
+ if (vpp)
+ {
GstPad *ghostsink, *ghostsrc;
- GstElement *col1,
- *col2,
- *rotate,
- *mirror,
- *box,
- *crop,
- *gamma,
- *balance,
- *scale,
- *scale2,
- *filter,
- *queue;
-
+ GstElement *col1, *col2, *rotate, *mirror, *box, *crop, *gamma,
+ *balance, *scale, *scale2, *filter, *queue;
/* Crete ffmpegcolorspace to convert stream to correct format */
- col1 = gst_element_factory_make( "ffmpegcolorspace", "pp_colsp1");
- if(col1)
- {
+ col1 = gst_element_factory_make("ffmpegcolorspace", "pp_colsp1");
+ if (col1)
+ {
DEBUG_INFO("Created ffmpegcolorspace element");
gst_bin_add(GST_BIN(vpp), col1);
- /* make this bin link point*/
- ghostsink = gst_element_get_static_pad(col1,"sink");
- if(ghostsink)
- {
- gst_element_add_pad(vpp, gst_ghost_pad_new("videopp_sink",ghostsink));
+ /* make this bin link point*/
+ ghostsink = gst_element_get_static_pad(col1, "sink");
+ if (ghostsink)
+ {
+ gst_element_add_pad(vpp, gst_ghost_pad_new("videopp_sink",
+ ghostsink));
gst_object_unref(GST_OBJECT(ghostsink));
+ }
}
- }
/* create video crop, this will be sink for videoPP pipeline */
- crop = gst_element_factory_make( "videocrop", "pp_crop");
- if(crop)
- {
+ crop = gst_element_factory_make("videocrop", "pp_crop");
+ if (crop)
+ {
DEBUG_INFO("Created crop element");
gst_bin_add(GST_BIN(vpp), crop);
- }
+ }
/* create video rotate */
- rotate = gst_element_factory_make( "videoflip", "pp_rotate");
- if(rotate)
- {
+ rotate = gst_element_factory_make("videoflip", "pp_rotate");
+ if (rotate)
+ {
DEBUG_INFO("Created rotate element");
g_object_set(G_OBJECT(rotate), "method", FLIP_NONE, NULL);
gst_bin_add(GST_BIN(vpp), rotate);
- }
+ }
/* create video mirror */
- mirror = gst_element_factory_make( "videoflip", "pp_mirror");
- if(mirror)
- {
+ mirror = gst_element_factory_make("videoflip", "pp_mirror");
+ if (mirror)
+ {
DEBUG_INFO("Created mirror element");
g_object_set(G_OBJECT(mirror), "method", FLIP_NONE, NULL);
gst_bin_add(GST_BIN(vpp), mirror);
- }
+ }
/* create video box */
- box = gst_element_factory_make( "videobox", "pp_box");
- if(box)
- {
+ box = gst_element_factory_make("videobox", "pp_box");
+ if (box)
+ {
DEBUG_INFO("Created videobox element");
gst_bin_add(GST_BIN(vpp), box);
- }
+ }
/* create video balance */
- balance = gst_element_factory_make( "videobalance", "pp_balance");
- if(balance)
- {
+ balance = gst_element_factory_make("videobalance", "pp_balance");
+ if (balance)
+ {
DEBUG_INFO("Created balance element");
gst_bin_add(GST_BIN(vpp), balance);
- }
+ }
/* create video gamma */
- gamma = gst_element_factory_make( "gamma", "pp_gamma");
- if(gamma)
- {
+ gamma = gst_element_factory_make("gamma", "pp_gamma");
+ if (gamma)
+ {
DEBUG_INFO("Created gamma element");
gst_bin_add(GST_BIN(vpp), gamma);
- }
+ }
/* Create videoscale element to scale postprocessed output to correct size */
scale = gst_element_factory_make("videoscale", "pp_scale");
- if ( scale )
- {
+ if (scale)
+ {
DEBUG_INFO("Created videoscale element");
gst_bin_add(GST_BIN(vpp), scale);
- }
+ }
scale2 = gst_element_factory_make("videoscale", "pp_scale2");
- if ( scale2 )
- {
+ if (scale2)
+ {
GstPad *pad = NULL;
GstCaps *caps = NULL;
DEBUG_INFO("Created videoscale element");
- pad = gst_element_get_static_pad(scale2,"src");
- caps = gst_caps_new_simple("video/x-raw-yuv",
- "width", G_TYPE_INT,0,
- "height", G_TYPE_INT,0,
- NULL);
+ pad = gst_element_get_static_pad(scale2, "src");
+ caps = gst_caps_new_simple("video/x-raw-yuv", "width",
+ G_TYPE_INT, 0, "height", G_TYPE_INT, 0, NULL);
gst_pad_set_caps(pad, caps);
gst_bin_add(GST_BIN(vpp), scale2);
- }
+ }
/* create capsfilter for fixed video size */
filter = gst_element_factory_make("capsfilter", "pp_filter");
- if ( filter )
- {
+ if (filter)
+ {
- g_object_set( G_OBJECT(filter), "caps",
- gst_caps_new_simple("video/x-raw-yuv",
- "width", G_TYPE_INT, TEST_VIDEO_WIDTH,
- "height", G_TYPE_INT, TEST_VIDEO_HEIGHT, NULL)
- ,NULL );
+ g_object_set(G_OBJECT(filter), "caps", gst_caps_new_simple(
+ "video/x-raw-yuv", "width", G_TYPE_INT, TEST_VIDEO_WIDTH,
+ "height", G_TYPE_INT, TEST_VIDEO_HEIGHT, NULL), NULL);
gst_bin_add(GST_BIN(vpp), filter);
- }
+ }
/* create video queue */
- queue = gst_element_factory_make( "queue", "vpp_queue");
- if(queue)
- {
+ queue = gst_element_factory_make("queue", "vpp_queue");
+ if (queue)
+ {
gst_bin_add(GST_BIN(vpp), queue);
- }
-
+ }
/* Crete ffmpegcolorspace to convert stream to correct format */
- col2 = gst_element_factory_make( "ffmpegcolorspace", "pp_colsp2");
- if(col2)
- {
+ col2 = gst_element_factory_make("ffmpegcolorspace", "pp_colsp2");
+ if (col2)
+ {
DEBUG_INFO("Created ffmpegcolorspace element");
gst_bin_add(GST_BIN(vpp), col2);
/* make this bin link point*/
- ghostsrc = gst_element_get_static_pad(col2,"src");
- if(ghostsrc)
- {
- gst_element_add_pad(vpp, gst_ghost_pad_new("videopp_src",ghostsrc));
+ ghostsrc = gst_element_get_static_pad(col2, "src");
+ if (ghostsrc)
+ {
+ gst_element_add_pad(vpp, gst_ghost_pad_new("videopp_src",
+ ghostsrc));
gst_object_unref(GST_OBJECT(ghostsrc));
+ }
}
- }
- if( !(gst_element_link_many(col1,
- scale,
- crop,
- rotate,
- mirror,
- box,
- balance,
- gamma,
- queue,
- scale2,
- filter,
- col2,
- NULL)
- ) )
- {
+ if (!(gst_element_link_many(col1, scale, crop, rotate, mirror, box,
+ balance, gamma, queue, scale2, filter, col2, NULL)))
+ {
DEBUG_ERR("Could not link videopp elements!!");
gst_object_unref(vpp);
vpp = NULL;
- }
- }
- DEBUG_API("<-XAAdaptationGst_CreateFixedSizeVideoPP");
+ }
+ }DEBUG_API("<-XAAdaptationGst_CreateFixedSizeVideoPP");
return vpp;
-}
-
-
+ }
/**
* GstElement* XAAdaptationGst_CreateVideoPPBlackScr( )
* @return GstElement* - return newly created gst pipeline element
* Description: Create video processing pipeline for black screen
*/
-GstElement* XAAdaptationGst_CreateVideoPPBlackScr( )
-{
+GstElement* XAAdaptationGst_CreateVideoPPBlackScr()
+ {
GstElement *vppBScr;
DEBUG_API("->XAAdaptationGst_CreateVideoPPBlackScr");
vppBScr = gst_pipeline_new("videoppBScr");
- if( vppBScr )
- {
- GstPad *ghostsrc=NULL;
- GstElement *testVideo=NULL, *scale=NULL;
- GstElement *ffmpegcolorspace=NULL;
+ if (vppBScr)
+ {
+ GstPad *ghostsrc = NULL;
+ GstElement *testVideo = NULL, *scale = NULL;
+ GstElement *ffmpegcolorspace = NULL;
- testVideo = gst_element_factory_make( "videotestsrc", "videotest");
- if(testVideo)
- {
+ testVideo = gst_element_factory_make("videotestsrc", "videotest");
+ if (testVideo)
+ {
DEBUG_INFO("Created videotestsrc element");
- g_object_set(G_OBJECT(testVideo), "pattern", (gint)2, "num-buffers", (gint)1, NULL);
+ g_object_set(G_OBJECT(testVideo), "pattern", (gint) 2,
+ "num-buffers", (gint) 1, NULL);
gst_bin_add(GST_BIN(vppBScr), testVideo);
- }
+ }
scale = gst_element_factory_make("videoscale", "BSrc_scale");
- if(scale)
- {
+ if (scale)
+ {
DEBUG_INFO("Created videoscale element");
gst_bin_add(GST_BIN(vppBScr), scale);
/* make this bin link point*/
- ghostsrc = gst_element_get_static_pad(scale,"src");
- if(ghostsrc)
- {
- gst_element_add_pad(vppBScr, gst_ghost_pad_new("videoppBSrc_src",ghostsrc));
+ ghostsrc = gst_element_get_static_pad(scale, "src");
+ if (ghostsrc)
+ {
+ gst_element_add_pad(vppBScr, gst_ghost_pad_new(
+ "videoppBSrc_src", ghostsrc));
gst_object_unref(GST_OBJECT(ghostsrc));
+ }
}
- }
- ffmpegcolorspace = gst_element_factory_make("ffmpegcolorspace", "BlackScrFfmpeg");
+ ffmpegcolorspace = gst_element_factory_make("ffmpegcolorspace",
+ "BlackScrFfmpeg");
gst_bin_add(GST_BIN(vppBScr), ffmpegcolorspace);
- if( !(gst_element_link_many(testVideo, ffmpegcolorspace, scale, NULL)) )
- {
+ if (!(gst_element_link_many(testVideo, ffmpegcolorspace, scale, NULL)))
+ {
DEBUG_ERR("Could not link videoppBSrc elements!!");
gst_object_unref(vppBScr);
vppBScr = NULL;
- }
+ }
+ }DEBUG_API("<-XAAdaptationGst_CreateVideoPPBlackScr");
+ return vppBScr;
}
- DEBUG_API("<-XAAdaptationGst_CreateVideoPPBlackScr");
- return vppBScr;
-}
/**
* GstElement* XAAdaptationGst_CreateInputSelector( )
* @return GstElement* - return newly created input selector
* Description: Create input selector to processing between black screen and video screen
*/
-GstElement* XAAdaptationGst_CreateInputSelector( )
-{
+GstElement* XAAdaptationGst_CreateInputSelector()
+ {
GstElement *inputSelector;
DEBUG_API("->XAAdaptationGst_CreateInputSelector");
- inputSelector = gst_element_factory_make("input-selector", "input-selector");
- if( inputSelector )
- {
+ inputSelector = gst_element_factory_make("input-selector",
+ "input-selector");
+ if (inputSelector)
+ {
g_object_set(G_OBJECT(inputSelector), "select-all", TRUE, NULL);
+ }DEBUG_API("<-XAAdaptationGst_CreateInputSelector");
+ return inputSelector;
}
- DEBUG_API("<-XAAdaptationGst_CreateInputSelector");
- return inputSelector;
-}
/**
* GstElement* XAAdaptationGst_CreateAudioPP( )
* @return GstElement* - return newly created gst pipeline element
* Description: Create video processing pipeline
*/
-GstElement* XAAdaptationGst_CreateAudioPP( )
-{
+GstElement* XAAdaptationGst_CreateAudioPP()
+ {
GstElement *app;
gboolean ok = TRUE;
DEBUG_API("->XAAdaptationGst_CreateAudioPP");
app = gst_pipeline_new("audiopp");
- if( app )
- {
+ if (app)
+ {
GstPad *ghostsink, *ghostsrc;
- GstElement *ac,*vol,*eq,*queue,*pan, *ac2;
+ GstElement *ac, *vol, *eq, *queue, *pan, *ac2;
- /* first and last elements should be audioconverts to match sink and encoder formats */
- ac = gst_element_factory_make( "audioconvert", "pp_ac");
+ /* first and last elements should be audioconverts to
+ * match sink and encoder formats */
+ ac = gst_element_factory_make("audioconvert", "pp_ac");
if (ac)
- {
+ {
ok = gst_bin_add(GST_BIN(app), ac);
/* make this bin link point*/
if (ok)
- {
- ghostsink = gst_element_get_static_pad(ac,"sink");
- ok = gst_element_add_pad(app, gst_ghost_pad_new("sink",ghostsink));
+ {
+ ghostsink = gst_element_get_static_pad(ac, "sink");
+ ok = gst_element_add_pad(app, gst_ghost_pad_new("sink",
+ ghostsink));
gst_object_unref(GST_OBJECT(ghostsink));
+ }
}
- }
- ac2 = gst_element_factory_make( "audioconvert", "pp_ac2");
+ ac2 = gst_element_factory_make("audioconvert", "pp_ac2");
if (ac2 && ok)
- {
+ {
ok = gst_bin_add(GST_BIN(app), ac2);
/* make this bin link point*/
if (ok)
+ {
+ ghostsrc = gst_element_get_static_pad(ac2, "src");
+ ok = gst_element_add_pad(app, gst_ghost_pad_new("src",
+ ghostsrc));
+ gst_object_unref(GST_OBJECT(ghostsrc));
+ }
+ }
+
+ vol = gst_element_factory_make("volume", "pp_vol");
+ /* create volume controller */
+ if (vol && ok)
{
- ghostsrc = gst_element_get_static_pad(ac2,"src");
- ok = gst_element_add_pad(app, gst_ghost_pad_new("src",ghostsrc));
- gst_object_unref(GST_OBJECT(ghostsrc));
+ ok = gst_bin_add(GST_BIN(app), vol);
+ g_object_set(G_OBJECT(vol), "volume", (gdouble) 1, NULL);
+ }
+ /* create 10-band equalizer */
+ eq = gst_element_factory_make("equalizer-10bands", "pp_equ");
+ if (eq && ok)
+ {
+ ok = gst_bin_add(GST_BIN(app), eq);
+ }
+ /* create audio queue */
+ queue = gst_element_factory_make("queue", "app_queue");
+ if (queue && ok)
+ {
+ ok = gst_bin_add(GST_BIN(app), queue);
+ g_object_set(G_OBJECT (queue), "max-size-buffers", 2, NULL);
+ }
+ /* create audio pan effect */
+ pan = gst_element_factory_make("audiopanorama", "pp_pan");
+ if (pan && ok)
+ {
+ ok = gst_bin_add(GST_BIN(app), pan);
+ }
+
+ if (ac && ok)
+ {
+ if (queue)
+ {
+ ok = gst_element_link(ac, queue);
+ }
+ else if (vol)
+ {
+ ok = gst_element_link(ac, vol);
+ }
+ else if (pan)
+ {
+ ok = gst_element_link(ac, pan);
+ }
+ else if (eq)
+ {
+ ok = gst_element_link(ac, eq);
+ }
+ else if (ac2)
+ {
+ ok = gst_element_link(ac, ac2);
+ }
+ }
+ if (queue && ok)
+ {
+ if (vol)
+ {
+ ok = gst_element_link(queue, vol);
+ }
+ else if (pan)
+ {
+ ok = gst_element_link(queue, pan);
+ }
+ else if (eq)
+ {
+ ok = gst_element_link(queue, eq);
+ }
+ else if (ac2)
+ {
+ ok = gst_element_link(queue, ac2);
+ }
+ }
+ if (vol && ok)
+ {
+ if (pan)
+ {
+ ok = gst_element_link(vol, pan);
+ }
+ else if (eq)
+ {
+ ok = gst_element_link(vol, eq);
+ }
+ else if (ac2)
+ {
+ ok = gst_element_link(vol, ac2);
+ }
+ }
+ if (pan && ok)
+ {
+ if (eq)
+ {
+ ok = gst_element_link(pan, eq);
+ }
+ else if (ac2)
+ {
+ ok = gst_element_link(pan, ac2);
+ }
+ }
+ if (eq && ok)
+ {
+ if (ac2)
+ {
+ ok = gst_element_link(eq, ac2);
+ }
+ }
+
+ if (ac)
+ {
+ // ghost sink above
+ }
+ else if (queue && ok)
+ {
+ /* make this bin link point*/
+ ghostsink = gst_element_get_static_pad(queue, "sink");
+ ok = gst_element_add_pad(app,
+ gst_ghost_pad_new("sink", ghostsink));
+ gst_object_unref(GST_OBJECT(ghostsink));
+ }
+ else if (vol && ok)
+ {
+ /* make this bin link point*/
+ ghostsink = gst_element_get_static_pad(vol, "sink");
+ ok = gst_element_add_pad(app,
+ gst_ghost_pad_new("sink", ghostsink));
+ gst_object_unref(GST_OBJECT(ghostsink));
+ }
+ else if (pan && ok)
+ {
+ /* make this bin link point*/
+ ghostsink = gst_element_get_static_pad(pan, "sink");
+ ok = gst_element_add_pad(app,
+ gst_ghost_pad_new("sink", ghostsink));
+ gst_object_unref(GST_OBJECT(ghostsink));
+ }
+ else if (eq && ok)
+ {
+ /* make this bin link point*/
+ ghostsink = gst_element_get_static_pad(eq, "sink");
+ ok = gst_element_add_pad(app,
+ gst_ghost_pad_new("sink", ghostsink));
+ gst_object_unref(GST_OBJECT(ghostsink));
+ }
+ else if (ac2 && ok)
+ {
+ /* make this bin link point*/
+ ghostsink = gst_element_get_static_pad(ac2, "sink");
+ ok = gst_element_add_pad(app,
+ gst_ghost_pad_new("sink", ghostsink));
+ gst_object_unref(GST_OBJECT(ghostsink));
+ }
+
+ if (ac2)
+ {
+ // ghost src above
+ }
+ else if (eq && ok)
+ {
+ /* make this bin link point*/
+ ghostsrc = gst_element_get_static_pad(eq, "src");
+ ok = gst_element_add_pad(app, gst_ghost_pad_new("src", ghostsrc));
+ gst_object_unref(GST_OBJECT(ghostsrc));
+ }
+ else if (pan && ok)
+ {
+ /* make this bin link point*/
+ ghostsrc = gst_element_get_static_pad(pan, "src");
+ ok = gst_element_add_pad(app, gst_ghost_pad_new("src", ghostsrc));
+ gst_object_unref(GST_OBJECT(ghostsrc));
+ }
+ else if (vol && ok)
+ {
+ /* make this bin link point*/
+ ghostsrc = gst_element_get_static_pad(vol, "src");
+ ok = gst_element_add_pad(app, gst_ghost_pad_new("src", ghostsrc));
+ gst_object_unref(GST_OBJECT(ghostsrc));
+ }
+ else if (queue && ok)
+ {
+ /* make this bin link point*/
+ ghostsrc = gst_element_get_static_pad(queue, "src");
+ ok = gst_element_add_pad(app, gst_ghost_pad_new("src", ghostsrc));
+ gst_object_unref(GST_OBJECT(ghostsrc));
+ }
+ else if (ac && ok)
+ {
+ /* make this bin link point*/
+ ghostsrc = gst_element_get_static_pad(ac, "src");
+ ok = gst_element_add_pad(app, gst_ghost_pad_new("src", ghostsrc));
+ gst_object_unref(GST_OBJECT(ghostsrc));
+ }
+
+ // if( !(gst_element_link_many(ac, queue, vol, ac2, NULL)) )
+ // if( !(gst_element_link_many(ac, queue, vol, pan, eq, ac2, NULL)) )
+ if (!ok)
+ {
+ DEBUG_ERR("Could not link audiopp elements!!");
+ gst_object_unref(app);
+ app = NULL;
}
}
- vol = gst_element_factory_make( "volume", "pp_vol");
- /* create volume controller */
- if (vol && ok)
- {
- ok = gst_bin_add(GST_BIN(app), vol);
- g_object_set( G_OBJECT(vol), "volume", (gdouble)1, NULL );
- }
- /* create 10-band equalizer */
- eq = gst_element_factory_make( "equalizer-10bands", "pp_equ");
- if (eq && ok)
- {
- ok = gst_bin_add(GST_BIN(app), eq);
- }
- /* create audio queue */
- queue = gst_element_factory_make( "queue", "app_queue");
- if(queue && ok)
- {
- ok = gst_bin_add(GST_BIN(app), queue);
- g_object_set (G_OBJECT (queue), "max-size-buffers", 2, NULL);
- }
- /* create audio pan effect */
- pan = gst_element_factory_make( "audiopanorama", "pp_pan");
- if (pan && ok)
- {
- ok = gst_bin_add(GST_BIN(app), pan);
- }
-
- if (ac && ok)
- {
- if (queue)
- {
- ok = gst_element_link(ac, queue);
- }
- else if (vol)
- {
- ok = gst_element_link(ac, vol);
- }
- else if (pan)
- {
- ok = gst_element_link(ac, pan);
- }
- else if (eq)
- {
- ok = gst_element_link(ac, eq);
- }
- else if (ac2)
- {
- ok = gst_element_link(ac, ac2);
- }
- }
- if (queue && ok)
- {
- if (vol)
- {
- ok = gst_element_link(queue, vol);
- }
- else if (pan)
- {
- ok = gst_element_link(queue, pan);
- }
- else if (eq)
- {
- ok = gst_element_link(queue, eq);
- }
- else if (ac2)
- {
- ok = gst_element_link(queue, ac2);
- }
- }
- if (vol && ok)
- {
- if (pan)
- {
- ok = gst_element_link(vol, pan);
- }
- else if (eq)
- {
- ok = gst_element_link(vol, eq);
- }
- else if (ac2)
- {
- ok = gst_element_link(vol, ac2);
- }
- }
- if (pan && ok)
- {
- if (eq)
- {
- ok = gst_element_link(pan, eq);
- }
- else if (ac2)
- {
- ok = gst_element_link(pan, ac2);
- }
- }
- if (eq && ok)
- {
- if (ac2)
- {
- ok = gst_element_link(eq, ac2);
- }
- }
-
- if (ac)
- {
- // ghost sink above
- }
- else if (queue && ok)
- {
- /* make this bin link point*/
- ghostsink = gst_element_get_static_pad(queue,"sink");
- ok = gst_element_add_pad(app, gst_ghost_pad_new("sink",ghostsink));
- gst_object_unref(GST_OBJECT(ghostsink));
- }
- else if (vol && ok)
- {
- /* make this bin link point*/
- ghostsink = gst_element_get_static_pad(vol,"sink");
- ok = gst_element_add_pad(app, gst_ghost_pad_new("sink",ghostsink));
- gst_object_unref(GST_OBJECT(ghostsink));
- }
- else if (pan && ok)
- {
- /* make this bin link point*/
- ghostsink = gst_element_get_static_pad(pan,"sink");
- ok = gst_element_add_pad(app, gst_ghost_pad_new("sink",ghostsink));
- gst_object_unref(GST_OBJECT(ghostsink));
- }
- else if (eq && ok)
- {
- /* make this bin link point*/
- ghostsink = gst_element_get_static_pad(eq,"sink");
- ok = gst_element_add_pad(app, gst_ghost_pad_new("sink",ghostsink));
- gst_object_unref(GST_OBJECT(ghostsink));
- }
- else if (ac2 && ok)
- {
- /* make this bin link point*/
- ghostsink = gst_element_get_static_pad(ac2,"sink");
- ok = gst_element_add_pad(app, gst_ghost_pad_new("sink",ghostsink));
- gst_object_unref(GST_OBJECT(ghostsink));
- }
-
- if (ac2)
- {
- // ghost src above
- }
- else if (eq && ok)
- {
- /* make this bin link point*/
- ghostsrc = gst_element_get_static_pad(eq,"src");
- ok = gst_element_add_pad(app, gst_ghost_pad_new("src",ghostsrc));
- gst_object_unref(GST_OBJECT(ghostsrc));
- }
- else if (pan && ok)
- {
- /* make this bin link point*/
- ghostsrc = gst_element_get_static_pad(pan,"src");
- ok = gst_element_add_pad(app, gst_ghost_pad_new("src",ghostsrc));
- gst_object_unref(GST_OBJECT(ghostsrc));
- }
- else if (vol && ok)
- {
- /* make this bin link point*/
- ghostsrc = gst_element_get_static_pad(vol,"src");
- ok = gst_element_add_pad(app, gst_ghost_pad_new("src",ghostsrc));
- gst_object_unref(GST_OBJECT(ghostsrc));
- }
- else if (queue && ok)
- {
- /* make this bin link point*/
- ghostsrc = gst_element_get_static_pad(queue,"src");
- ok = gst_element_add_pad(app, gst_ghost_pad_new("src",ghostsrc));
- gst_object_unref(GST_OBJECT(ghostsrc));
- }
- else if (ac && ok)
- {
- /* make this bin link point*/
- ghostsrc = gst_element_get_static_pad(ac,"src");
- ok = gst_element_add_pad(app, gst_ghost_pad_new("src",ghostsrc));
- gst_object_unref(GST_OBJECT(ghostsrc));
- }
-
-// if( !(gst_element_link_many(ac, queue, vol, ac2, NULL)) )
-// if( !(gst_element_link_many(ac, queue, vol, pan, eq, ac2, NULL)) )
- if (!ok)
- {
- DEBUG_ERR("Could not link audiopp elements!!");
- gst_object_unref(app);
- app = NULL;
- }
+ DEBUG_API("<-XAAdaptationGst_CreateAudioPP");
+ return app;
}
- DEBUG_API("<-XAAdaptationGst_CreateAudioPP");
- return app;
-}
-
/* called when pad is actually blocking/ gets unblocked*/
-void XAAdaptationGst_PadBlockCb(GstPad *pad, gboolean blocked, gpointer user_data)
-{
+void XAAdaptationGst_PadBlockCb(GstPad *pad, gboolean blocked,
+ gpointer user_data)
+ {
DEBUG_API_A2("->XAAdaptationGst_PadBlockCb pad \"%s\" of \"%s\" ",
- GST_OBJECT_NAME(pad),
- GST_OBJECT_NAME(gst_pad_get_parent_element(pad)) );
+ GST_OBJECT_NAME(pad),
+ GST_OBJECT_NAME(gst_pad_get_parent_element(pad)) );
DEBUG_API_A1("<-XAAdaptationGst_PadBlockCb blocked:%d",blocked);
-}
+ }
/* utility to set same fields for all media types in caps */
-void XAAdaptationGst_SetAllCaps (GstCaps * caps, char *field, ...)
-{
+void XAAdaptationGst_SetAllCaps(GstCaps * caps, char *field, ...)
+ {
GstStructure *structure;
va_list var_args;
int i;
- for (i = 0; i < gst_caps_get_size (caps); i++)
- {
- structure = gst_caps_get_structure (caps, i);
+ for (i = 0; i < gst_caps_get_size(caps); i++)
+ {
+ structure = gst_caps_get_structure(caps, i);
va_start (var_args, field);
- gst_structure_set_valist (structure, field, var_args);
+ gst_structure_set_valist(structure, field, var_args);
va_end (var_args);
+ }
}
-}
-
--- a/khronosfws/openmax_al/src/gst_adaptation/xaadaptationgst.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaadaptationgst.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Base Gstreamer Adaptation Source
+ *
+ */
#ifndef XAADAPTATIONGST_H_
#define XAADAPTATIONGST_H_
@@ -22,12 +22,12 @@
#include <semaphore.h>
#include <string.h>
#include <unistd.h>
-#include "openmaxalwrapper.h"
-#include "xaglobals.h"
#include <gst/gst.h>
#include <gst/app/gstappsrc.h>
#include <gst/app/gstappsink.h>
#include <gst/app/gstappbuffer.h>
+#include "openmaxalwrapper.h"
+#include "xaglobals.h"
#include "xaplatform.h"
#include "xaadptbasectx.h"
#include <stdlib.h>
@@ -45,48 +45,47 @@
#define FLIP_VERTICAL 5 /* Flip image vertically */
/* TYPEDEFS */
-typedef gboolean (*GstBusCb)( GstBus *bus, GstMessage *message, gpointer data );
+typedef gboolean (*GstBusCb)(GstBus *bus, GstMessage *message, gpointer data);
#define CONTENT_PIPE_BUFFER_SIZE 1000
#define TEST_VIDEO_WIDTH 640
#define TEST_VIDEO_HEIGHT 480
/*typedef enum
-{
- XA_AUDIO_WAVENC = 0,
- XA_AUDIO_VORBISENC,
- XA_AUDIO_PCM,
- XA_NUM_OF_AUDIOENCODERS Do not move this line
-} XAAudioEnc;*/
+ {
+ XA_AUDIO_WAVENC = 0,
+ XA_AUDIO_VORBISENC,
+ XA_AUDIO_PCM,
+ XA_NUM_OF_AUDIOENCODERS Do not move this line
+ } XAAudioEnc;*/
/*typedef enum
-{
- XA_VIDEO_JPEGENC = 0,
- XA_VIDEO_THEORAENC,
- XA_NUM_OF_VIDEOENCODERS Do not move this line
-} XAVideoEnc;*/
+ {
+ XA_VIDEO_JPEGENC = 0,
+ XA_VIDEO_THEORAENC,
+ XA_NUM_OF_VIDEOENCODERS Do not move this line
+ } XAVideoEnc;*/
/*typedef enum CP_STATE
-{
- CPStateNull =0,
- CPStateInitialized,
- CPStatePrerolling,
- CPStateStarted,
- CPStateRunning,
- CPStatePaused,
- CPStateStopped,
- CPStateWaitForData,
- CPStateEOS,
- CPStateError
-}CP_STATE;*/
+ {
+ CPStateNull =0,
+ CPStateInitialized,
+ CPStatePrerolling,
+ CPStateStarted,
+ CPStateRunning,
+ CPStatePaused,
+ CPStateStopped,
+ CPStateWaitForData,
+ CPStateEOS,
+ CPStateError
+ }CP_STATE;*/
/*typedef enum
-{
- XA_IMAGE_JPEGENC = 0,
- XA_IMAGE_RAW,
- XA_NUM_OF_IMAGEENCODERS Do not move this line
-} XAImageEnc;*/
-
+ {
+ XA_IMAGE_JPEGENC = 0,
+ XA_IMAGE_RAW,
+ XA_NUM_OF_IMAGEENCODERS Do not move this line
+ } XAImageEnc;*/
/* STRUCTURES */
@@ -98,26 +97,26 @@
* Gst-Adaptation context structures.
*/
typedef struct XAAdaptationGstCtx_
-{
+ {
/* Common Variables for all adaptation elements */
XAAdaptationBaseCtx baseObj;
- GstState binWantedState; /** requested gst-bin target state **/
- GstElement *bin; /** Container for all gst elements **/
+ GstState binWantedState; /** requested gst-bin target state **/
+ GstElement *bin; /** Container for all gst elements **/
- GstBus *bus; /** Gst-bus where gst sends messages **/
- GMainLoop *busloop; /** Gst-bus listener loop **/
- pthread_t busloopThr;
- GstBusCb busCb; /** Gst-Bus callback funtion*/
+ GstBus *bus; /** Gst-bus where gst sends messages **/
+ GMainLoop *busloop; /** Gst-bus listener loop **/
+ pthread_t busloopThr;
+ GstBusCb busCb; /** Gst-Bus callback funtion*/
- XAboolean waitingasyncop;
- sem_t semAsyncWait;
- guint asynctimer;
+ XAboolean waitingasyncop;
+ sem_t semAsyncWait;
+ guint asynctimer;
#ifdef XA_IMPL_MEASURE_GST_DELAY
- clock_t startTime;
- clock_t endTime;
- double diff;
+ clock_t startTime;
+ clock_t endTime;
+ double diff;
#endif /*XA_IMPL_MEASURE_GST_DELAY*/
XAboolean thread_launched;
@@ -126,7 +125,7 @@
XAboolean cond_mutx_inited;
/* FUNCTIONS*/
-} XAAdaptationGstCtx_;
+ } XAAdaptationGstCtx_;
/* FUNCTIONS */
/*
@@ -134,13 +133,13 @@
* Default CallBack handler for gst-bus messages. This will be called if object specific callback is
* not implemented.
*/
-
-XAresult XAAdaptationGst_Init( XAAdaptationGstCtx* pSelf, XAuint32 ctxId );
-XAresult XAAdaptationGst_PostInit( XAAdaptationGstCtx* ctx );
-void XAAdaptationGst_Free( XAAdaptationGstCtx* ctx );
-
-gboolean XAAdaptationGst_GstBusCb( GstBus *bus, GstMessage *message, gpointer data );
+XAresult XAAdaptationGst_Init(XAAdaptationGstCtx* pSelf, XAuint32 ctxId);
+XAresult XAAdaptationGst_PostInit(XAAdaptationGstCtx* ctx);
+void XAAdaptationGst_Free(XAAdaptationGstCtx* ctx);
+
+gboolean XAAdaptationGst_GstBusCb(GstBus *bus, GstMessage *message,
+ gpointer data);
XAresult XAAdaptationGst_InitGstListener(XAAdaptationGstCtx* ctx);
void* XAAdaptationGst_LaunchGstListener(void* args);
@@ -151,17 +150,19 @@
gboolean XAAdaptationGst_CancelAsyncWait(gpointer ctx);
void XAAdaptationGst_CompleteAsyncWait(XAAdaptationGstCtx* ctx);
-GstElement* XAAdaptationGst_CreateGstSource( XADataSource* xaSrc, const char *name, XAboolean *isobj, XAboolean *isPCM, XAboolean *isRawImage );
-GstElement* XAAdaptationGst_CreateGstSink( XADataSink* xaSrc, const char *name, XAboolean *isobj );
+GstElement* XAAdaptationGst_CreateGstSource(XADataSource* xaSrc,
+ const char *name, XAboolean *isobj, XAboolean *isPCM,
+ XAboolean *isRawImage);
+GstElement* XAAdaptationGst_CreateGstSink(XADataSink* xaSrc,
+ const char *name, XAboolean *isobj);
GstElement* XAAdaptationGst_CreateVideoPP(void);
GstElement* XAAdaptationGst_CreateVideoPPBlackScr(void);
GstElement* XAAdaptationGst_CreateInputSelector(void);
GstElement* XAAdaptationGst_CreateAudioPP(void);
-void XAAdaptationGst_PadBlockCb(GstPad *pad, gboolean blocked, gpointer user_data);
-void XAAdaptationGst_SetAllCaps (GstCaps * caps, char *field, ...);
-
-
+void XAAdaptationGst_PadBlockCb(GstPad *pad, gboolean blocked,
+ gpointer user_data);
+void XAAdaptationGst_SetAllCaps(GstCaps * caps, char *field, ...);
/*XAresult XAMetadataAdapt_TryWriteTags(XAAdaptationGstCtx* mCtx, GstBin* binToWriteTo);*/
--- a/khronosfws/openmax_al/src/gst_adaptation/xaaudioencoderitfadaptation.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaaudioencoderitfadaptation.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: AudioEnc Intfc Adaptation for GStreamer
+ *
+ */
#include <gst/gst.h>
#include "xamediarecorderadaptctx.h"
@@ -29,46 +29,48 @@
* @return XAresult ret - return success value
* Description: Sets preferred encoder settings for pipeline.
*/
-XAresult XAAudioEncoderItfAdapt_SetEncoderSettings( XAAdaptationBaseCtx *ctx,
- XAAudioEncoderSettings *pSettings )
-{
+XAresult XAAudioEncoderItfAdapt_SetEncoderSettings(XAAdaptationBaseCtx *ctx,
+ XAAudioEncoderSettings *pSettings)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAMediaRecorderAdaptationCtx* mCtx = NULL;
DEBUG_API("->XAAudioEncoderItfAdapt_SetEncoderSettings");
- if( !ctx || (ctx->ctxId != XAMediaRecorderAdaptation) || !pSettings )
- {
+ if (!ctx || (ctx->ctxId != XAMediaRecorderAdaptation) || !pSettings)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAAudioEncoderItfImpl_SetEncoderSettings");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
mCtx = (XAMediaRecorderAdaptationCtx*) ctx;
- ret = XAMediaRecorderAdapt_CheckCodec(mCtx,XACAP_AUDIO,pSettings->encoderId);
- if(ret==XA_RESULT_SUCCESS)
- {
+ ret = XAMediaRecorderAdapt_CheckCodec(mCtx, XACAP_AUDIO,
+ pSettings->encoderId);
+ if (ret == XA_RESULT_SUCCESS)
+ {
/*change of settings - pipeline must be regenerated**/
mCtx->encodingchanged = XA_BOOLEAN_TRUE;
- memcpy(&mCtx->audioEncSettings, pSettings, sizeof(XAAudioEncoderSettings));
- }
- DEBUG_API("<-XAAudioEncoderItfAdapt_SetEncoderSettings");
+ memcpy(&mCtx->audioEncSettings, pSettings,
+ sizeof(XAAudioEncoderSettings));
+ }DEBUG_API("<-XAAudioEncoderItfAdapt_SetEncoderSettings");
return ret;
-}
+ }
-XAresult XAAudioEncoderItfAdapt_GetEncoderSettings( XAAdaptationBaseCtx *bCtx,
- XAAudioEncoderSettings *pSettings )
-{
+XAresult XAAudioEncoderItfAdapt_GetEncoderSettings(XAAdaptationBaseCtx *bCtx,
+ XAAudioEncoderSettings *pSettings)
+ {
XAMediaRecorderAdaptationCtx* mCtx = NULL;
XAresult ret = XA_RESULT_SUCCESS;
DEBUG_API("->XAAudioEncoderItfAdapt_GetEncoderSettings");
- if( !bCtx || (bCtx->ctxId != XAMediaRecorderAdaptation) || !pSettings )
- {
+ if (!bCtx || (bCtx->ctxId != XAMediaRecorderAdaptation) || !pSettings)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
mCtx = (XAMediaRecorderAdaptationCtx*) bCtx;
- memcpy(pSettings, &(mCtx->audioEncSettings), sizeof(XAAudioEncoderSettings));
+ memcpy(pSettings, &(mCtx->audioEncSettings),
+ sizeof(XAAudioEncoderSettings));
DEBUG_API("<-XAAudioEncoderItfAdapt_GetEncoderSettings");
return ret;
-}
+ }
--- a/khronosfws/openmax_al/src/gst_adaptation/xaaudioencoderitfadaptation.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaaudioencoderitfadaptation.h Wed Jun 23 18:47:10 2010 +0300
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description: AudioEnc Itf GST Adaptation
*
*/
--- a/khronosfws/openmax_al/src/gst_adaptation/xacameraadaptctx.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/gst_adaptation/xacameraadaptctx.h Wed Jun 23 18:47:10 2010 +0300
@@ -19,7 +19,9 @@
#define XACAMERAADAPTCTX_H
#include "xaadaptationgst.h"
+#ifdef OMAX_CAMERABIN
#include <gst/interfaces/photography.h>
+#endif
/* TYPEDEFS */
typedef struct XACameraAdaptationCtx_ XACameraAdaptationCtx;
@@ -39,8 +41,9 @@
XAuint32 curMirror;
/* GST Variables */
+#ifdef OMAX_CAMERABIN
GstFocusStatus focusStatus;
-
+#endif
/* Internals */
XAboolean recording;
XAboolean playing;
--- a/khronosfws/openmax_al/src/gst_adaptation/xagstcapabilitiesmgr.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/gst_adaptation/xagstcapabilitiesmgr.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,35 +1,40 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "xagstcapabilitiesmgr.h"
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: GST Capabilities Mgr. Here you can query the capabilities
+ * of various GST components and store it in a list.
+ *
+ */
+
#include <stdio.h>
#include <string.h>
+#include "xagstcapabilitiesmgr.h"
+#include "xaframeworkmgr.h"
-static XAresult XAGSTCapabilitiesMgr_GetAudioAACEncoderCapabilities(XACapabilities **ppNode);
-static XAresult XAGSTCapabilitiesMgr_GetAudioAMREncoderCapabilities(XACapabilities **ppNode);
-static XAresult XAGSTCapabilitiesMgr_GetAudioPCMEncoderCapabilities(XACapabilities **ppNode);
+static XAresult XAGSTCapabilitiesMgr_GetAudioAACEncoderCapabilities(
+ XACapabilities **ppNode);
+static XAresult XAGSTCapabilitiesMgr_GetAudioAMREncoderCapabilities(
+ XACapabilities **ppNode);
+static XAresult XAGSTCapabilitiesMgr_GetAudioPCMEncoderCapabilities(
+ XACapabilities **ppNode);
/* XAresult XAGSTCapabilitiesMgr_UpdateCapabilitieList
* Description: Update the capabilities list supported by GStreamer framework.
*/
XAresult XAGSTCapabilitiesMgr_UpdateCapabilitieList(
- FrameworkMap *frameworkMap,
- XACapabilities **ppListHead)
+ FrameworkMap *frameworkMap, XACapabilities **ppListHead)
-{
+ {
XAresult res = XA_RESULT_SUCCESS;
XACapabilities *newNode = NULL;
FWMgrFwType fwtype = FWMgrFWUknown;
@@ -39,166 +44,156 @@
DEBUG_API("->XAGSTCapabilitiesMgr_UpdateCapabilitieList");
- if(!frameworkMap || !ppListHead)
- {
+ if (!frameworkMap || !ppListHead)
+ {
res = XA_RESULT_PARAMETER_INVALID;
return res;
- }
-
+ }
+
lastNode = firstNode = *ppListHead;
-
+
/* traverse and point to the last node in the list */
- while(lastNode && lastNode->next)
- {
+ while (lastNode && lastNode->next)
+ {
lastNode = lastNode->next;
- }
-
+ }
uri = "file:///c:/test.mp4";
- fwtype = XAFrameworkMgr_GetFramework(
- frameworkMap,
- uri,
- FWMgrMORecorder);
-
- if(fwtype == FWMgrFWGST)
- {
- /* Add codec capabilities */
- newNode = NULL;
- res = XAGSTCapabilitiesMgr_GetAudioAACEncoderCapabilities(&newNode);
- if (res != XA_RESULT_SUCCESS)
- {
- return res;
- }
- if (lastNode)
- {
- lastNode->next = newNode;
- }
- if (newNode)
- { /* if a new node is created move lastNode to the new item */
- if (!firstNode)
- firstNode = newNode;
- lastNode = newNode;
- }
- }
-
+ fwtype = XAFrameworkMgr_GetFramework(frameworkMap, uri, FWMgrMORecorder);
+
+ if (fwtype == FWMgrFWGST)
+ {
+ /* Add codec capabilities */
+ newNode = NULL;
+ res = XAGSTCapabilitiesMgr_GetAudioAACEncoderCapabilities(&newNode);
+ if (res != XA_RESULT_SUCCESS)
+ {
+ return res;
+ }
+ if (lastNode)
+ {
+ lastNode->next = newNode;
+ }
+ if (newNode)
+ { /* if a new node is created move lastNode to the new item */
+ if (!firstNode)
+ firstNode = newNode;
+ lastNode = newNode;
+ }
+ }
uri = "file:///c:/test.amr";
- fwtype = XAFrameworkMgr_GetFramework(
- frameworkMap,
- uri,
- FWMgrMORecorder);
-
- if(fwtype == FWMgrFWGST)
- {
- newNode = NULL;
- res = XAGSTCapabilitiesMgr_GetAudioAMREncoderCapabilities(&newNode);
- if (res != XA_RESULT_SUCCESS)
- {
- return res;
- }
- if (lastNode)
- {
- lastNode->next = newNode;
- }
- if (newNode)
- { /* if a new node is created move lastNode to the new item */
- if (!firstNode)
- firstNode = newNode;
- lastNode = newNode;
- }
- }
+ fwtype = XAFrameworkMgr_GetFramework(frameworkMap, uri, FWMgrMORecorder);
+
+ if (fwtype == FWMgrFWGST)
+ {
+ newNode = NULL;
+ res = XAGSTCapabilitiesMgr_GetAudioAMREncoderCapabilities(&newNode);
+ if (res != XA_RESULT_SUCCESS)
+ {
+ return res;
+ }
+ if (lastNode)
+ {
+ lastNode->next = newNode;
+ }
+ if (newNode)
+ { /* if a new node is created move lastNode to the new item */
+ if (!firstNode)
+ firstNode = newNode;
+ lastNode = newNode;
+ }
+ }
uri = "file:///c:/test.wav";
- fwtype = XAFrameworkMgr_GetFramework(
- frameworkMap,
- uri,
- FWMgrMORecorder);
-
- if(fwtype == FWMgrFWGST)
- {
- newNode = NULL;
- res = XAGSTCapabilitiesMgr_GetAudioPCMEncoderCapabilities(&newNode);
- if (res != XA_RESULT_SUCCESS)
- {
- return res;
- }
- if (lastNode)
- {
- lastNode->next = newNode;
- }
- if (newNode)
- { /* if a new node is created move lastNode to the new item */
- if (!firstNode)
- firstNode = newNode;
- lastNode = newNode;
- }
- }
+ fwtype = XAFrameworkMgr_GetFramework(frameworkMap, uri, FWMgrMORecorder);
+
+ if (fwtype == FWMgrFWGST)
+ {
+ newNode = NULL;
+ res = XAGSTCapabilitiesMgr_GetAudioPCMEncoderCapabilities(&newNode);
+ if (res != XA_RESULT_SUCCESS)
+ {
+ return res;
+ }
+ if (lastNode)
+ {
+ lastNode->next = newNode;
+ }
+ if (newNode)
+ { /* if a new node is created move lastNode to the new item */
+ if (!firstNode)
+ firstNode = newNode;
+ lastNode = newNode;
+ }
+ }
/* if empty list, then append first node as the head */
if (!(*ppListHead))
{
*ppListHead = firstNode;
- }
- DEBUG_API("<-XAGSTCapabilitiesMgr_UpdateCapabilitieList");
+ }DEBUG_API("<-XAGSTCapabilitiesMgr_UpdateCapabilitieList");
return res;
-}
+ }
-XAresult XAGSTCapabilitiesMgr_GetAudioAACEncoderCapabilities(XACapabilities **ppNode)
-{
+XAresult XAGSTCapabilitiesMgr_GetAudioAACEncoderCapabilities(
+ XACapabilities **ppNode)
+ {
XAresult res = XA_RESULT_SUCCESS;
XACapabilities *newNode = NULL;
XAAudioCodecDescriptor *entries = NULL;
XAchar aacencelement[] = "nokiaaacenc";
int strLen = 0;
-
- newNode = (XACapabilities *)calloc(1, sizeof(XACapabilities));
+
+ newNode = (XACapabilities *) calloc(1, sizeof(XACapabilities));
if (!newNode)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
return res;
- }
+ }
newNode->capsType = AUD_E;
newNode->xaid = XA_AUDIOCODEC_AAC;
newNode->noOfEntries = 1;
-
-
- strLen = strlen((char*)aacencelement);
- newNode->adaptId = (XAchar *)calloc(strLen + 1, sizeof(XAchar));
+
+ strLen = strlen((char*) aacencelement);
+ newNode->adaptId = (XAchar *) calloc(strLen + 1, sizeof(XAchar));
if (!newNode->adaptId)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
return res;
- }
+ }
- strncpy((char*)newNode->adaptId, (char*)aacencelement, strLen);
+ strncpy((char*) newNode->adaptId, (char*) aacencelement, strLen);
newNode->adaptId[strLen] = '\0'; /*Null terminate it*/
-
+
/* Allocate array */
- entries = (XAAudioCodecDescriptor*)calloc(1, sizeof(XAAudioCodecDescriptor));
+ entries = (XAAudioCodecDescriptor*) calloc(1,
+ sizeof(XAAudioCodecDescriptor));
if (!entries)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
return res;
- }
+ }
- newNode->pEntry = (void*)entries;
-
+ newNode->pEntry = (void*) entries;
+
entries->maxChannels = 2;
entries->minBitsPerSample = 16;
entries->maxBitsPerSample = 16;
- entries->minSampleRate = 8000000; /*milliHz*/
+ entries->minSampleRate = 8000000; /*milliHz*/
entries->maxSampleRate = 48000000;
- entries->isFreqRangeContinuous=XA_BOOLEAN_FALSE;
+ entries->isFreqRangeContinuous = XA_BOOLEAN_FALSE;
entries->numSampleRatesSupported = 7;
- entries->pSampleRatesSupported = (XAmilliHertz*)calloc(entries->numSampleRatesSupported, sizeof(XAmilliHertz));
+ entries->pSampleRatesSupported = (XAmilliHertz*) calloc(
+ entries->numSampleRatesSupported, sizeof(XAmilliHertz));
if (!entries->pSampleRatesSupported)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
return res;
- }
+ }
/* entries in milliHz */
entries->pSampleRatesSupported[0] = 8000000;
entries->pSampleRatesSupported[1] = 11025000;
@@ -212,13 +207,14 @@
entries->maxBitRate = 256000;
entries->isBitrateRangeContinuous = XA_BOOLEAN_FALSE;
entries->numBitratesSupported = 8;
- entries->pBitratesSupported = (XAuint32*)calloc(entries->numBitratesSupported, sizeof(XAuint32));
+ entries->pBitratesSupported = (XAuint32*) calloc(
+ entries->numBitratesSupported, sizeof(XAuint32));
if (!entries->pBitratesSupported)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
return res;
- }
+ }
(entries->pBitratesSupported)[0] = 32000;
(entries->pBitratesSupported)[1] = 64000;
(entries->pBitratesSupported)[2] = 96000;
@@ -231,58 +227,61 @@
entries->profileSetting = XA_AUDIOPROFILE_AAC_AAC;
entries->modeSetting = XA_AUDIOMODE_AAC_LC;
- newNode->pEntry = (void*)entries;
+ newNode->pEntry = (void*) entries;
*ppNode = newNode;
return res;
-}
+ }
-XAresult XAGSTCapabilitiesMgr_GetAudioAMREncoderCapabilities(XACapabilities **ppNode)
-{
+XAresult XAGSTCapabilitiesMgr_GetAudioAMREncoderCapabilities(
+ XACapabilities **ppNode)
+ {
XAresult res = XA_RESULT_SUCCESS;
XACapabilities *newNode = NULL;
XAAudioCodecDescriptor *entries = NULL;
-
- newNode = (XACapabilities *)calloc(1, sizeof(XACapabilities));
+
+ newNode = (XACapabilities *) calloc(1, sizeof(XACapabilities));
if (!newNode)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
return res;
- }
+ }
newNode->capsType = AUD_E;
newNode->xaid = XA_AUDIOCODEC_AMR;
newNode->noOfEntries = 1;
/* Allocate array */
- entries = (XAAudioCodecDescriptor*)calloc(1, sizeof(XAAudioCodecDescriptor));
+ entries = (XAAudioCodecDescriptor*) calloc(1,
+ sizeof(XAAudioCodecDescriptor));
if (!entries)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
return res;
- }
+ }
- newNode->pEntry = (void*)entries;
-
+ newNode->pEntry = (void*) entries;
+
entries->maxChannels = 1;
entries->minBitsPerSample = 8;
entries->maxBitsPerSample = 8;
- entries->minSampleRate = 8000000; /*milliHz*/
+ entries->minSampleRate = 8000000; /*milliHz*/
entries->maxSampleRate = 8000000;
- entries->isFreqRangeContinuous=XA_BOOLEAN_TRUE;
+ entries->isFreqRangeContinuous = XA_BOOLEAN_TRUE;
entries->numSampleRatesSupported = 1;
- entries->minBitRate=4750;
- entries->maxBitRate=12200;
- entries->isBitrateRangeContinuous=XA_BOOLEAN_FALSE;
+ entries->minBitRate = 4750;
+ entries->maxBitRate = 12200;
+ entries->isBitrateRangeContinuous = XA_BOOLEAN_FALSE;
entries->numBitratesSupported = 8;
- entries->pBitratesSupported = (XAuint32*)calloc(entries->numBitratesSupported, sizeof(XAuint32));
+ entries->pBitratesSupported = (XAuint32*) calloc(
+ entries->numBitratesSupported, sizeof(XAuint32));
if (!entries->pBitratesSupported)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
return res;
- }
+ }
(entries->pBitratesSupported)[0] = 4750;
(entries->pBitratesSupported)[1] = 5150;
(entries->pBitratesSupported)[2] = 5900;
@@ -295,54 +294,57 @@
entries->profileSetting = XA_AUDIOPROFILE_AMR;
entries->modeSetting = 0;
- newNode->pEntry = (void*)entries;
+ newNode->pEntry = (void*) entries;
*ppNode = newNode;
return res;
-}
+ }
-XAresult XAGSTCapabilitiesMgr_GetAudioPCMEncoderCapabilities(XACapabilities **ppNode)
-{
+XAresult XAGSTCapabilitiesMgr_GetAudioPCMEncoderCapabilities(
+ XACapabilities **ppNode)
+ {
XAresult res = XA_RESULT_SUCCESS;
XACapabilities *newNode = NULL;
XAAudioCodecDescriptor *entries = NULL;
- newNode = (XACapabilities *)calloc(1, sizeof(XACapabilities));
+ newNode = (XACapabilities *) calloc(1, sizeof(XACapabilities));
if (!newNode)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
return res;
- }
+ }
newNode->capsType = AUD_E;
newNode->xaid = XA_AUDIOCODEC_PCM;
newNode->noOfEntries = 1;
/* Allocate array */
- entries = (XAAudioCodecDescriptor*)calloc(1, sizeof(XAAudioCodecDescriptor));
+ entries = (XAAudioCodecDescriptor*) calloc(1,
+ sizeof(XAAudioCodecDescriptor));
if (!entries)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
return res;
- }
+ }
- newNode->pEntry = (void*)entries;
+ newNode->pEntry = (void*) entries;
entries->maxChannels = 2;
entries->minBitsPerSample = 16;
entries->maxBitsPerSample = 16;
- entries->minSampleRate = 8000000; /*milliHz*/
+ entries->minSampleRate = 8000000; /*milliHz*/
entries->maxSampleRate = 96000000;
- entries->isFreqRangeContinuous=XA_BOOLEAN_FALSE;
+ entries->isFreqRangeContinuous = XA_BOOLEAN_FALSE;
entries->numSampleRatesSupported = 10;
- entries->pSampleRatesSupported = (XAmilliHertz*)calloc(entries->numSampleRatesSupported, sizeof(XAmilliHertz));
+ entries->pSampleRatesSupported = (XAmilliHertz*) calloc(
+ entries->numSampleRatesSupported, sizeof(XAmilliHertz));
if (!entries->pSampleRatesSupported)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
return res;
- }
+ }
/* entries in milliHz */
entries->pSampleRatesSupported[0] = 12000000;
entries->pSampleRatesSupported[1] = 16000000;
@@ -363,8 +365,8 @@
entries->profileSetting = XA_AUDIOPROFILE_PCM;
entries->modeSetting = 0;
- newNode->pEntry = (void*)entries;
+ newNode->pEntry = (void*) entries;
*ppNode = newNode;
return res;
-}
+ }
--- a/khronosfws/openmax_al/src/gst_adaptation/xagstcapabilitiesmgr.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/gst_adaptation/xagstcapabilitiesmgr.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: GST Capability Mgr header
+ *
+ */
#ifndef XAGSTCAPABILITIESMGR_H
#define XAGSTCAPABILITIESMGR_H
@@ -23,7 +23,6 @@
#include "xacapabilitiesmgr.h"
XAresult XAGSTCapabilitiesMgr_UpdateCapabilitieList(
- FrameworkMap *frameworkMap,
- XACapabilities** ppListHead);
+ FrameworkMap *frameworkMap, XACapabilities** ppListHead);
#endif /* XAGSTCAPABILITIESMGR_H */
--- a/khronosfws/openmax_al/src/gst_adaptation/xamediarecorderadaptctx.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/gst_adaptation/xamediarecorderadaptctx.c Wed Jun 23 18:47:10 2010 +0300
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description: Media Recorder Adaptation for GST
*
*/
--- a/khronosfws/openmax_al/src/gst_adaptation/xamediarecorderadaptctx.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/gst_adaptation/xamediarecorderadaptctx.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Media Recoder Adaptation for GST Header
+ *
+ */
#ifndef XAMEDIARECORDERADAPTCTX_H_
#define XAMEDIARECORDERADAPTCTX_H_
@@ -24,111 +24,114 @@
/* TYPEDEFS */
typedef struct XASnapshotItfVars_
-{
+ {
/*User variables*/
- XAuint32 numpics;
- XAuint32 fps;
- XAboolean freeze;
- gchar* fnametemplate;
- XADataSink* xaSink;
+ XAuint32 numpics;
+ XAuint32 fps;
+ XAboolean freeze;
+ gchar* fnametemplate;
+ XADataSink* xaSink;
/* internal variables */
- gboolean waitforbuffer;
- gboolean parsenegotiated;
- XAuint32 numpicstaken;
+ gboolean waitforbuffer;
+ gboolean parsenegotiated;
+ XAuint32 numpicstaken;
- GstBus* ssbus;
- GstElement* sspipeline;
- GstElement* ssbuffersrc;
- GstElement* ssparser;
- GstElement* ssscaler;
- GstElement* ssfilter;
- GstElement* ssencoder;
- GstElement* sstagger;
- GstElement* sssink;
- gulong sighandler;
+ GstBus* ssbus;
+ GstElement* sspipeline;
+ GstElement* ssbuffersrc;
+ GstElement* ssparser;
+ GstElement* ssscaler;
+ GstElement* ssfilter;
+ GstElement* ssencoder;
+ GstElement* sstagger;
+ GstElement* sssink;
+ gulong sighandler;
- GstBuffer* snapshotbuffer;
+ GstBuffer* snapshotbuffer;
-} XASnapshotItfVars;
+ } XASnapshotItfVars;
/* context to track buffer insufficient event */
-typedef struct recordItfCtx_{
+typedef struct recordItfCtx_
+ {
XAImplSemHandle bufInsufficientSem;
XAboolean buffer_insufficient;
-}recodtItfCtx;
+ } recodtItfCtx;
typedef struct XAMediaRecorderAdaptationCtx_ XAMediaRecorderAdaptationCtx;
typedef struct XAMediaRecorderAdaptationCtx_
-{
+ {
/* Parent*/
XAAdaptationGstCtx_ baseObj;
/* OMX-AL Variables */
- XADataSource *xaAudioSource, *xaVideoSource;
- XADataSink *xaSink;
- XAuint8 recModes;
+ XADataSource *xaAudioSource, *xaVideoSource;
+ XADataSink *xaSink;
+ XAuint8 recModes;
/* GST elements */
- GstElement *datasink;
- XAboolean isobjsink; /*is sink another XA object?*/
- GstElement *codecbin;
- GstElement *audioppbin;
- GstElement *audiofilter;
- GstElement *videoppbin;
- GstElement *videofilter;
- GstElement *videoextract;
- GstElement *audiosource;
- GstElement *audioqueue;
- XAboolean isobjasrc; /*is audio source another XA object?*/
- GstElement *videosource;
- GstState vsrcOrigState;
- GstElement *videoqueue;
- XAboolean isobjvsrc; /*is video source another XA object?*/
- XAboolean encodingchanged;
+ GstElement *datasink;
+ XAboolean isobjsink; /*is sink another XA object?*/
+ GstElement *codecbin;
+ GstElement *audioppbin;
+ GstElement *audiofilter;
+ GstElement *videoppbin;
+ GstElement *videofilter;
+ GstElement *videoextract;
+ GstElement *audiosource;
+ GstElement *audioqueue;
+ XAboolean isobjasrc; /*is audio source another XA object?*/
+ GstElement *videosource;
+ GstState vsrcOrigState;
+ GstElement *videoqueue;
+ XAboolean isobjvsrc; /*is video source another XA object?*/
+ XAboolean encodingchanged;
- XAboolean mute;
- XAuint32 imageEffectID;
- XAboolean isStereoPosition;
- XAuint32 xaRecordState;
- XAmillidegree curRotation;
- XAuint32 curMirror;
- XAboolean isRecord;
+ XAboolean mute;
+ XAuint32 imageEffectID;
+ XAboolean isStereoPosition;
+ XAuint32 xaRecordState;
+ XAmillidegree curRotation;
+ XAuint32 curMirror;
+ XAboolean isRecord;
/* internals */
- XAboolean trackpositionenabled;
- gboolean runpositiontimer;
- GSourceFunc positionCb;
+ XAboolean trackpositionenabled;
+ gboolean runpositiontimer;
+ GSourceFunc positionCb;
- XAImplThreadHandle recordingEventThr;
- recodtItfCtx recThrCtx;
-
+ XAImplThreadHandle recordingEventThr;
+ recodtItfCtx recThrCtx;
/* Variables for snapshot */
- XASnapshotItfVars snapshotVars;
+ XASnapshotItfVars snapshotVars;
- XAMetadataAdaptVars *metadatavars;
+ XAMetadataAdaptVars *metadatavars;
/* Variables for encoders */
- XAAudioEncoderSettings audioEncSettings;
- XAVideoSettings videoEncSettings;
- XAImageSettings imageEncSettings;
+ XAAudioEncoderSettings audioEncSettings;
+ XAVideoSettings videoEncSettings;
+ XAImageSettings imageEncSettings;
/*buffersink variable*/
- guint64 writepos;
+ guint64 writepos;
-} XAMediaRecorderAdaptationCtx_;
+ } XAMediaRecorderAdaptationCtx_;
/* FUNCTIONS */
-XAAdaptationBaseCtx* XAMediaRecorderAdapt_Create( XADataSource* pAudioSrc, XADataSource* pImageVideoSrc, XADataSink* pDataSnk, XAuint8 recModes );
-XAresult XAMediaRecorderAdapt_PostInit( XAAdaptationGstCtx* bCtx );
-void XAMediaRecorderAdapt_Destroy( XAAdaptationGstCtx* bCtx );
+XAAdaptationBaseCtx* XAMediaRecorderAdapt_Create(XADataSource* pAudioSrc,
+ XADataSource* pImageVideoSrc, XADataSink* pDataSnk, XAuint8 recModes);
+XAresult XAMediaRecorderAdapt_PostInit(XAAdaptationGstCtx* bCtx);
+void XAMediaRecorderAdapt_Destroy(XAAdaptationGstCtx* bCtx);
/*XAresult XAMediaRecorderAdapt_InitContentPipeSink(XAMediaRecorderAdaptationCtx* ctx);*/
-XAresult XAMediaRecorderAdapt_ChangeEncoders( XAMediaRecorderAdaptationCtx_* mCtx );
-XAresult XAMediaRecorderAdapt_CheckCodec( XAMediaRecorderAdaptationCtx_* mCtx, XACapsType encType, XAuint32 encoderId );
+XAresult XAMediaRecorderAdapt_ChangeEncoders(
+ XAMediaRecorderAdaptationCtx_* mCtx);
+XAresult XAMediaRecorderAdapt_CheckCodec(XAMediaRecorderAdaptationCtx_* mCtx,
+ XACapsType encType, XAuint32 encoderId);
-void* XAMediaRecorderAdapt_RecordEventThr(void* ctx);
+void* XAMediaRecorderAdapt_RecordEventThr(void* ctx);
#endif /* XAMEDIARECORDERADAPTCTX_H_ */
--- a/khronosfws/openmax_al/src/gst_adaptation/xardsitfadaptation.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/gst_adaptation/xardsitfadaptation.c Wed Jun 23 18:47:10 2010 +0300
@@ -65,14 +65,14 @@
static XAint16 subscribedODAGroups[MAX_ODA_GROUP_SUBSCRIPTIONS];
static XAuint16 subscribedODAGroupCount = 0;
-static XAuint32 freqSetAfterSeek;
+//static XAuint32 freqSetAfterSeek;
const RDSData* GetCurrentRdsData( XAAdaptationGstCtx *bCtx );
void * XARDSItfAdapt_AsyncSeek(void* args);
void * XARDSItfAdapt_AsyncGetODAGroup(void* args);
/* exposing radio itf adaptation internal function here */
-XAresult XARadioItfAdapt_SyncSetFrequency(XAAdaptationGstCtx *bCtx, XAuint32 freq);
+//XAresult XARadioItfAdapt_SyncSetFrequency(XAAdaptationGstCtx *bCtx, XAuint32 freq);
/*
@@ -429,11 +429,11 @@
if (pty == XA_RDSPROGRAMMETYPE_RDSPTY_POPMUSIC)
{
- freqSetAfterSeek = rdsData[POPMUSIC_CHANNEL].frequency;
+ //freqSetAfterSeek = rdsData[POPMUSIC_CHANNEL].frequency;
}
else
{
- freqSetAfterSeek = mCtx->frequency;
+ //freqSetAfterSeek = mCtx->frequency;
}
mCtx->state = XA_RADIO_SEEKING;
@@ -475,7 +475,7 @@
mCtx->state = XA_RADIO_IDLE;
}
- freqSetAfterSeek = rdsData[TRAFFIC_ANNOUNCEMENT_CHANNEL].frequency;
+ //freqSetAfterSeek = rdsData[TRAFFIC_ANNOUNCEMENT_CHANNEL].frequency;
mCtx->state = XA_RADIO_SEEKING;
pt_ret = pthread_create(&(mCtx->emulationThread), NULL, (XARDSItfAdapt_AsyncSeek),(void*)bCtx);
@@ -516,7 +516,7 @@
mCtx->state = XA_RADIO_IDLE;
}
- freqSetAfterSeek = rdsData[TRAFFIC_PROGRAMME_CHANNEL].frequency;
+ //freqSetAfterSeek = rdsData[TRAFFIC_PROGRAMME_CHANNEL].frequency;
mCtx->state = XA_RADIO_SEEKING;
pt_ret = pthread_create(&(mCtx->emulationThread), NULL, (XARDSItfAdapt_AsyncSeek),(void*)bCtx);
@@ -548,7 +548,7 @@
DEBUG_INFO("Seek done!");
- ret = XARadioItfAdapt_SyncSetFrequency( bCtx, freqSetAfterSeek );
+ //ret = XARadioItfAdapt_SyncSetFrequency( bCtx, freqSetAfterSeek );
if (ret != XA_RESULT_SUCCESS)
{
DEBUG_ERR("XARadioItfAdapt_SyncSetFrequency FAILED");
--- a/khronosfws/openmax_al/src/gst_adaptation/xarecorditfadaptation.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/gst_adaptation/xarecorditfadaptation.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Record Itf GST adaptation
+ *
+ */
#include <pthread.h>
#include <gst/gst.h>
@@ -35,8 +35,9 @@
* XAuint32 state - Record state to be set
* @return XAresult ret - Success value
*/
-XAresult XARecordItfAdapt_SetRecordState(XAAdaptationGstCtx *bCtx, XAuint32 state)
-{
+XAresult XARecordItfAdapt_SetRecordState(XAAdaptationGstCtx *bCtx,
+ XAuint32 state)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAboolean closeSink = XA_BOOLEAN_FALSE;
XAboolean requestStateChange = XA_BOOLEAN_FALSE;
@@ -44,167 +45,187 @@
XAMediaRecorderAdaptationCtx* mCtx = NULL;
XAboolean recording = XA_BOOLEAN_FALSE;
DEBUG_API_A1("->XARecordItfAdapt_SetRecordState %s",RECORDSTATENAME(state));
- if(!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
- {
+ if (!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XARecordItfAdapt_SetRecordState");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
mCtx = (XAMediaRecorderAdaptationCtx*) bCtx;
mCtx->isRecord = XA_BOOLEAN_TRUE;
- switch ( state )
- {
+ switch (state)
+ {
case XA_RECORDSTATE_STOPPED:
- {
- // Audio sourse should be stopped
- if ( mCtx->audiosource )
+ {
+ // Audio sourse should be stopped
+ if (mCtx->audiosource)
{
- if ( gst_element_send_event (mCtx->audiosource, gst_event_new_eos ()) == TRUE )
- {
- DEBUG_INFO ("posted eos");
- }
- else
- {
- DEBUG_ERR("FAIL : post eos");
- }
+ if (gst_element_send_event(mCtx->audiosource,
+ gst_event_new_eos()) == TRUE)
+ {
+ DEBUG_INFO ("posted eos");
+ }
+ else
+ {
+ DEBUG_ERR("FAIL : post eos");
+ }
}
-
- if ( cameraCtx && cameraRealized && mCtx->isobjvsrc && mCtx->videosource )
- {
- cameraCtx->recording = XA_BOOLEAN_FALSE;
+
+ if (cameraCtx && cameraRealized && mCtx->isobjvsrc
+ && mCtx->videosource)
+ {
+ cameraCtx->recording = XA_BOOLEAN_FALSE;
- if(!cameraCtx->playing && !cameraCtx->snapshotting)
- {
- /* Neither view finder or recorder is running -> pause camera */
- if ( GST_STATE( GST_ELEMENT(mCtx->videosource)) == GST_STATE_PLAYING )
- {
- GstStateChangeReturn gret;
- DEBUG_INFO("Stop camera source");
- gret = gst_element_set_state( GST_ELEMENT(mCtx->videosource), GST_STATE_PAUSED );
- if(gret == GST_STATE_CHANGE_SUCCESS)
- gret = gst_element_get_state( GST_ELEMENT(mCtx->videosource), NULL,NULL, XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC );
- }
- }
- }
+ if (!cameraCtx->playing && !cameraCtx->snapshotting)
+ {
+ /* Neither view finder or recorder is running -> pause camera */
+ if (GST_STATE( GST_ELEMENT(mCtx->videosource))
+ == GST_STATE_PLAYING)
+ {
+ GstStateChangeReturn gret;
+ DEBUG_INFO("Stop camera source");
+ gret = gst_element_set_state(
+ GST_ELEMENT(mCtx->videosource),
+ GST_STATE_PAUSED);
+ if (gret == GST_STATE_CHANGE_SUCCESS)
+ gret = gst_element_get_state(
+ GST_ELEMENT(mCtx->videosource), NULL,
+ NULL, XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC);
+ }
+ }
+ }
bCtx->binWantedState = GST_STATE_PAUSED;
closeSink = XA_BOOLEAN_TRUE;
- if(mCtx->runpositiontimer > 0)
- {
+ if (mCtx->runpositiontimer > 0)
+ {
g_source_remove(mCtx->runpositiontimer);
- mCtx->runpositiontimer=0;
- }
+ mCtx->runpositiontimer = 0;
+ }
- if ( mCtx->recThrCtx.bufInsufficientSem )
- {
+ if (mCtx->recThrCtx.bufInsufficientSem)
+ {
DEBUG_INFO("No buffer-insufficient received, posting record thr semaphore.");
- if ( XAImpl_PostSemaphore( mCtx->recThrCtx.bufInsufficientSem ) != XA_RESULT_SUCCESS)
- {
+ if (XAImpl_PostSemaphore(mCtx->recThrCtx.bufInsufficientSem)
+ != XA_RESULT_SUCCESS)
+ {
DEBUG_ERR("Posting buffer-insufficient semaphore FAILED!");
+ }
}
- }
break;
- }
+ }
case XA_RECORDSTATE_PAUSED:
- {
- if ( cameraCtx && cameraRealized && mCtx->isobjvsrc && mCtx->videosource )
- {
- cameraCtx->recording = XA_BOOLEAN_FALSE;
- if(!cameraCtx->playing && !cameraCtx->snapshotting)
- {
- /* Neither view finder or recorder is running -> pause camera */
- if ( GST_STATE( GST_ELEMENT(mCtx->videosource)) == GST_STATE_PLAYING )
- {
- GstStateChangeReturn gret;
- DEBUG_INFO("Stop camera source");
- gret = gst_element_set_state( GST_ELEMENT(mCtx->videosource), GST_STATE_PAUSED );
- if(gret == GST_STATE_CHANGE_SUCCESS)
- gret = gst_element_get_state( GST_ELEMENT(mCtx->videosource), NULL,NULL, XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC );
- }
- }
- }
-
- if(mCtx->xaRecordState==XA_RECORDSTATE_STOPPED && mCtx->encodingchanged)
- {
- XAMediaRecorderAdapt_ChangeEncoders( mCtx );
- mCtx->encodingchanged = XA_BOOLEAN_FALSE;
- }
- bCtx->binWantedState = GST_STATE_PAUSED;
- if(mCtx->runpositiontimer > 0)
{
+ if (cameraCtx && cameraRealized && mCtx->isobjvsrc
+ && mCtx->videosource)
+ {
+ cameraCtx->recording = XA_BOOLEAN_FALSE;
+ if (!cameraCtx->playing && !cameraCtx->snapshotting)
+ {
+ /* Neither view finder or recorder is running -> pause camera */
+ if (GST_STATE( GST_ELEMENT(mCtx->videosource))
+ == GST_STATE_PLAYING)
+ {
+ GstStateChangeReturn gret;
+ DEBUG_INFO("Stop camera source");
+ gret = gst_element_set_state(
+ GST_ELEMENT(mCtx->videosource),
+ GST_STATE_PAUSED);
+ if (gret == GST_STATE_CHANGE_SUCCESS)
+ gret = gst_element_get_state(
+ GST_ELEMENT(mCtx->videosource), NULL,
+ NULL, XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC);
+ }
+ }
+ }
+
+ if (mCtx->xaRecordState == XA_RECORDSTATE_STOPPED
+ && mCtx->encodingchanged)
+ {
+ XAMediaRecorderAdapt_ChangeEncoders(mCtx);
+ mCtx->encodingchanged = XA_BOOLEAN_FALSE;
+ }
+ bCtx->binWantedState = GST_STATE_PAUSED;
+ if (mCtx->runpositiontimer > 0)
+ {
g_source_remove(mCtx->runpositiontimer);
- mCtx->runpositiontimer=0;
+ mCtx->runpositiontimer = 0;
+ }
+ break;
}
- break;
- }
case XA_RECORDSTATE_RECORDING:
- {
- if ( cameraCtx && mCtx->isobjvsrc )
- {
- cameraCtx->recording = XA_BOOLEAN_TRUE;
- }
-
- if(mCtx->xaRecordState==XA_RECORDSTATE_STOPPED && (mCtx->encodingchanged))
{
- XAMediaRecorderAdapt_ChangeEncoders( mCtx );
+ if (cameraCtx && mCtx->isobjvsrc)
+ {
+ cameraCtx->recording = XA_BOOLEAN_TRUE;
+ }
+
+ if (mCtx->xaRecordState == XA_RECORDSTATE_STOPPED
+ && (mCtx->encodingchanged))
+ {
+ XAMediaRecorderAdapt_ChangeEncoders(mCtx);
mCtx->encodingchanged = XA_BOOLEAN_FALSE;
- }
+ }
- if ( mCtx->recThrCtx.bufInsufficientSem )
- {
+ if (mCtx->recThrCtx.bufInsufficientSem)
+ {
/* Recording to address and recording thread semaphora is created */
- if(! XAImpl_StartThread(&(mCtx->recordingEventThr),NULL, &XAMediaRecorderAdapt_RecordEventThr, (void*)mCtx ))
+ if (!XAImpl_StartThread(&(mCtx->recordingEventThr), NULL,
+ &XAMediaRecorderAdapt_RecordEventThr, (void*) mCtx))
{
- DEBUG_ERR("Start thread Failed");
- return XA_RESULT_INTERNAL_ERROR;
+ DEBUG_ERR("Start thread Failed");
+ return XA_RESULT_INTERNAL_ERROR;
}
- }
+ }
bCtx->binWantedState = GST_STATE_PLAYING;
recording = XA_BOOLEAN_TRUE;
break;
- }
+ }
default:
- DEBUG_ERR("Unhandled state");
+ DEBUG_ERR("Unhandled state")
+ ;
ret = XA_RESULT_PARAMETER_INVALID;
break;
- }
+ }
- if( ret == XA_RESULT_SUCCESS )
- {
+ if (ret == XA_RESULT_SUCCESS)
+ {
mCtx->xaRecordState = state;
- }
+ }
/* launch Gstreamer state change only if necessary */
- if( GST_STATE_TARGET(bCtx->bin) == bCtx->binWantedState )
- {
+ if (GST_STATE_TARGET(bCtx->bin) == bCtx->binWantedState)
+ {
DEBUG_INFO("Gst already transitioning to wanted state!!");
requestStateChange = XA_BOOLEAN_FALSE;
- }
+ }
else
- {
- if( (GST_STATE(bCtx->bin) == bCtx->binWantedState) &&
- (GST_STATE_PENDING(bCtx->bin) == GST_STATE_VOID_PENDING) )
{
+ if ((GST_STATE(bCtx->bin) == bCtx->binWantedState)
+ && (GST_STATE_PENDING(bCtx->bin) == GST_STATE_VOID_PENDING))
+ {
DEBUG_ERR_A3("WARNING : gststate %d == wanted %d != gsttarget %d and no statechange pending",
- GST_STATE(bCtx->bin), bCtx->binWantedState, GST_STATE_TARGET(bCtx->bin));
- }
+ GST_STATE(bCtx->bin), bCtx->binWantedState, GST_STATE_TARGET(bCtx->bin));
+ }
requestStateChange = XA_BOOLEAN_TRUE;
- }
+ }
- if( requestStateChange )
- {
+ if (requestStateChange)
+ {
XAAdaptationGst_PrepareAsyncWait(bCtx);
DEBUG_INFO_A1("Sending change state request to state %d", bCtx->binWantedState);
- gstRet = gst_element_set_state( GST_ELEMENT(bCtx->bin), bCtx->binWantedState);
- switch ( gstRet )
- {
+ gstRet = gst_element_set_state(GST_ELEMENT(bCtx->bin),
+ bCtx->binWantedState);
+ switch (gstRet)
+ {
case GST_STATE_CHANGE_FAILURE:
- DEBUG_ERR_A1("FAILED to change state (target %d)",bCtx->binWantedState);
+ DEBUG_ERR_A1("FAILED to change state (target %d)",bCtx->binWantedState)
+ ;
bCtx->binWantedState = GST_STATE(bCtx->bin);
ret = XA_RESULT_INTERNAL_ERROR;
break;
@@ -214,64 +235,71 @@
ret = XA_RESULT_SUCCESS;
break;
case GST_STATE_CHANGE_NO_PREROLL:
- DEBUG_INFO("GST_STATE_CHANGE_NO_PREROLL");
+ DEBUG_INFO("GST_STATE_CHANGE_NO_PREROLL")
+ ;
/* deliberate fall-through */
case GST_STATE_CHANGE_SUCCESS:
- DEBUG_INFO_A1("Successfully changed state (target %d)",bCtx->binWantedState);
+ DEBUG_INFO_A1("Successfully changed state (target %d)",bCtx->binWantedState)
+ ;
ret = XA_RESULT_SUCCESS;
break;
default:
- DEBUG_ERR_A1("Unhandled error (%d)",gstRet);
+ DEBUG_ERR_A1("Unhandled error (%d)",gstRet)
+ ;
ret = XA_RESULT_UNKNOWN_ERROR;
break;
- }
+ }
bCtx->waitingasyncop = XA_BOOLEAN_FALSE;
- }
- if( (GST_STATE(bCtx->bin) > GST_STATE_READY) && closeSink )
- { /* close the sink*/
- gst_element_send_event(bCtx->bin,gst_event_new_flush_start());
- gst_element_send_event(bCtx->bin,gst_event_new_flush_stop());
- }
+ }
+ if ((GST_STATE(bCtx->bin) > GST_STATE_READY) && closeSink)
+ { /* close the sink*/
+ gst_element_send_event(bCtx->bin, gst_event_new_flush_start());
+ gst_element_send_event(bCtx->bin, gst_event_new_flush_stop());
+ }
- if ( recording && mCtx->isobjvsrc && mCtx->videosource )
- {
- GstPad *pad = gst_element_get_static_pad( GST_ELEMENT(mCtx->videosource), "MRObjSrc");
- if( pad && gst_pad_is_linked(pad) )
- {
- DEBUG_INFO_A2("unblock element:%s pad:%s",
- gst_element_get_name(mCtx->videosource),
- gst_pad_get_name(pad));
- gst_pad_set_blocked_async(pad, FALSE, XAAdaptationGst_PadBlockCb, NULL);
- }
+ if (recording && mCtx->isobjvsrc && mCtx->videosource)
+ {
+ GstPad *pad = gst_element_get_static_pad(
+ GST_ELEMENT(mCtx->videosource), "MRObjSrc");
+ if (pad && gst_pad_is_linked(pad))
+ {
+ DEBUG_INFO_A2("unblock element:%s pad:%s",
+ gst_element_get_name(mCtx->videosource),
+ gst_pad_get_name(pad));
+ gst_pad_set_blocked_async(pad, FALSE, XAAdaptationGst_PadBlockCb,
+ NULL);
+ }
- if ( GST_STATE( GST_ELEMENT(mCtx->videosource)) != GST_STATE_PLAYING )
- {
- GstStateChangeReturn gret = GST_STATE_CHANGE_SUCCESS;
- DEBUG_INFO("Start camera source");
- gret = gst_element_set_state( GST_ELEMENT(mCtx->videosource), GST_STATE_PLAYING );
- if(gret == GST_STATE_CHANGE_SUCCESS)
- gret = gst_element_get_state( GST_ELEMENT(mCtx->videosource), NULL,NULL, XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC );
- }
+ if (GST_STATE( GST_ELEMENT(mCtx->videosource)) != GST_STATE_PLAYING)
+ {
+ GstStateChangeReturn gret = GST_STATE_CHANGE_SUCCESS;
+ DEBUG_INFO("Start camera source");
+ gret = gst_element_set_state(GST_ELEMENT(mCtx->videosource),
+ GST_STATE_PLAYING);
+ if (gret == GST_STATE_CHANGE_SUCCESS)
+ gret = gst_element_get_state(GST_ELEMENT(mCtx->videosource),
+ NULL, NULL, XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC);
+ }
+ }DEBUG_API("<-XARecordItfAdapt_SetRecordState");
+ return ret;
}
- DEBUG_API("<-XARecordItfAdapt_SetRecordState");
- return ret;
-}
/*
* XAresult XARecordItfAdapt_GetRecordState(XAAdaptationGstCtx *bCtx, XAuint32 *state)
* Description: Return record state
*/
-XAresult XARecordItfAdapt_GetRecordState(XAAdaptationGstCtx *bCtx, XAuint32 *state)
-{
+XAresult XARecordItfAdapt_GetRecordState(XAAdaptationGstCtx *bCtx,
+ XAuint32 *state)
+ {
XAMediaRecorderAdaptationCtx* mCtx = NULL;
DEBUG_API("->XARecordItfAdapt_GetRecordState");
- if(!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
- {
+ if (!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XARecordItfAdapt_GetRecordState");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
mCtx = (XAMediaRecorderAdaptationCtx*) bCtx;
@@ -279,7 +307,7 @@
DEBUG_API("<-XARecordItfAdapt_GetRecordState");
return XA_RESULT_SUCCESS;
-}
+ }
/*
* XAresult XARecordItfAdapt_GetPosition(XAAdaptationGstCtx *ctx, AdaptationContextIDS ctxIDs, XAmillisecond *pMsec)
@@ -287,39 +315,39 @@
* XAmillisecond *pMsec - Pointer where to store current position in stream.
* @return XAresult ret - Success value
*/
-XAresult XARecordItfAdapt_GetPosition(XAAdaptationGstCtx *bCtx, XAmillisecond *pMsec)
-{
+XAresult XARecordItfAdapt_GetPosition(XAAdaptationGstCtx *bCtx,
+ XAmillisecond *pMsec)
+ {
XAresult ret = XA_RESULT_SUCCESS;
-
- gint64 position=0;
+
+ gint64 position = 0;
GstFormat format = GST_FORMAT_TIME;
DEBUG_API("->XARecordItfAdapt_GetPosition");
- if(!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
- {
+ if (!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XARecordItfAdapt_GetPosition");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
- if ( gst_element_query_position( GST_ELEMENT(bCtx->bin), &format, &position ) )
- {
+ }
+ if (gst_element_query_position(GST_ELEMENT(bCtx->bin), &format, &position))
+ {
ret = XA_RESULT_SUCCESS;
*pMsec = GST_TIME_AS_MSECONDS(position); /*Warning ok due to used API specification*/
DEBUG_INFO_A1("Gst: Position in microseconds : %u", *pMsec );
- }
+ }
else
- {
+ {
DEBUG_ERR("WARNING: Gst: could not get position");
/* probably not fully prerolled - safe assumption for position = 0 */
*pMsec = 0;
ret = XA_RESULT_SUCCESS;
- }
+ }
DEBUG_API("<-XARecordItfAdapt_GetPosition");
return ret;
-}
-
+ }
/*
* gboolean XARecordItfAdapt_PositionUpdate(gpointer ctx)
@@ -328,75 +356,81 @@
* @return false to stop periodic calls
*/
gboolean XARecordItfAdapt_PositionUpdate(gpointer ctx)
-{
+ {
XAAdaptationGstCtx *bCtx = (XAAdaptationGstCtx*) ctx;
XAMediaRecorderAdaptationCtx* mCtx = (XAMediaRecorderAdaptationCtx*) ctx;
DEBUG_API("->XARecordItfAdapt_PositionUpdate");
- if( mCtx && mCtx->trackpositionenabled )
- {
+ if (mCtx && mCtx->trackpositionenabled)
+ {
GstFormat format = GST_FORMAT_TIME;
gint64 position = 0;
- if ( gst_element_query_position( GST_ELEMENT(bCtx->bin), &format, &position ) )
- {
- XAuint32 posMsec = GST_TIME_AS_MSECONDS(position);/*Warning ok due to used API specification*/
- XAAdaptEvent event = {XA_RECORDITFEVENTS, XA_ADAPT_POSITION_UPDATE_EVT, 1, NULL};
+ if (gst_element_query_position(GST_ELEMENT(bCtx->bin), &format,
+ &position))
+ {
+ XAuint32 posMsec = GST_TIME_AS_MSECONDS(position);
+ /*Warning ok due to used API specification*/
+ XAAdaptEvent event =
+ {
+ XA_RECORDITFEVENTS, XA_ADAPT_POSITION_UPDATE_EVT, 1, NULL
+ };
event.data = &posMsec;
DEBUG_API_A1("XARecordItfAdapt_PositionUpdate: pos %lu ms", posMsec);
/* send needed events */
- XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
- }
+ XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event);
+ }
else
- {
+ {
DEBUG_ERR("Gst: Failed to get position");
+ }
+ DEBUG_API_A1("<-XARecordItfAdapt_PositionUpdate: %d", mCtx->runpositiontimer);
+ /* return false to stop timer */
+ return (mCtx->runpositiontimer);
}
- DEBUG_API_A1("<-XARecordItfAdapt_PositionUpdate: %d", mCtx->runpositiontimer);
- /* return false to stop timer */
- return( mCtx->runpositiontimer );
+ return FALSE;
}
- return FALSE;
-}
/*
* XAresult XARecordItfAdapt_EnablePositionTracking
* Enable/disable periodic position tracking callbacks
*/
-XAresult XARecordItfAdapt_EnablePositionTracking(XAAdaptationGstCtx *bCtx, XAboolean enable)
-{
+XAresult XARecordItfAdapt_EnablePositionTracking(XAAdaptationGstCtx *bCtx,
+ XAboolean enable)
+ {
XAMediaRecorderAdaptationCtx* mCtx = (XAMediaRecorderAdaptationCtx*) bCtx;
DEBUG_API_A1("->XARecordItfAdapt_EnablePositionTracking (enable: %lu)", enable);
- if(!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
- {
+ if (!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XARecordItfAdapt_EnablePositionTracking");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
-
+ }
/* create a timer to track position of playback */
- if(enable && !(mCtx->trackpositionenabled))
- {
+ if (enable && !(mCtx->trackpositionenabled))
+ {
mCtx->trackpositionenabled = XA_BOOLEAN_TRUE;
mCtx->positionCb = &XARecordItfAdapt_PositionUpdate;
/* if recording is already on, create a timer to track position of recording */
- if( GST_STATE(bCtx->bin) == GST_STATE_PLAYING )
- {
- mCtx->runpositiontimer = g_timeout_add(XA_ADAPT_PU_INTERVAL, mCtx->positionCb, mCtx);
+ if (GST_STATE(bCtx->bin) == GST_STATE_PLAYING)
+ {
+ mCtx->runpositiontimer = g_timeout_add(XA_ADAPT_PU_INTERVAL,
+ mCtx->positionCb, mCtx);
+ }
}
- }
else if (!enable && (mCtx->trackpositionenabled))
- {
+ {
mCtx->trackpositionenabled = XA_BOOLEAN_FALSE;
- if(mCtx->runpositiontimer > 0)
- {
+ if (mCtx->runpositiontimer > 0)
+ {
g_source_remove(mCtx->runpositiontimer);
- mCtx->runpositiontimer=0;
+ mCtx->runpositiontimer = 0;
+ }
}
- }
DEBUG_API("<-XARecordItfAdapt_EnablePositionTracking");
return XA_RESULT_SUCCESS;
-}
+ }
--- a/khronosfws/openmax_al/src/gst_adaptation/xarecorditfadaptation.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/gst_adaptation/xarecorditfadaptation.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,43 +1,47 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Record Itf GST adapt header
+ *
+ */
#ifndef XARECORDITFADAPTATION_H
#define XARECORDITFADAPTATION_H
#include "xaadaptationgst.h"
-
#ifdef _DEBUG
/*parse state names for debug prints*/
static const char* recordstatenames[3] =
-{
- "XA_RECORDSTATE_STOPPED",
- "XA_RECORDSTATE_PAUSED",
- "XA_RECORDSTATE_RECORDING",
-};
+ {
+ "XA_RECORDSTATE_STOPPED",
+ "XA_RECORDSTATE_PAUSED",
+ "XA_RECORDSTATE_RECORDING",
+ };
#define RECORDSTATENAME(i) ((i>0&&i<4)?recordstatenames[i-1]:"INVALID")
#endif /*_DEBUG*/
/* FUNCTIONS */
-XAresult XARecordItfAdapt_SetRecordState(XAAdaptationGstCtx *ctx, XAuint32 state );
-XAresult XARecordItfAdapt_SetDurationLimit( XAAdaptationGstCtx *ctx, XAmillisecond msec );
-XAresult XARecordItfAdapt_GetPosition( XAAdaptationGstCtx *ctx, XAmillisecond *pMsec );
-XAresult XARecordItfAdapt_EnablePositionTracking(XAAdaptationGstCtx *ctx, XAboolean enable);
-XAresult XARecordItfAdapt_GetRecordState(XAAdaptationGstCtx *bCtx, XAuint32 *state);
+XAresult XARecordItfAdapt_SetRecordState(XAAdaptationGstCtx *ctx,
+ XAuint32 state);
+XAresult XARecordItfAdapt_SetDurationLimit(XAAdaptationGstCtx *ctx,
+ XAmillisecond msec);
+XAresult XARecordItfAdapt_GetPosition(XAAdaptationGstCtx *ctx,
+ XAmillisecond *pMsec);
+XAresult XARecordItfAdapt_EnablePositionTracking(XAAdaptationGstCtx *ctx,
+ XAboolean enable);
+XAresult XARecordItfAdapt_GetRecordState(XAAdaptationGstCtx *bCtx,
+ XAuint32 *state);
#endif /* XARECORDITFADAPTATION_H */
--- a/khronosfws/openmax_al/src/gst_adaptation/xastreaminformationitfadaptation.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/gst_adaptation/xastreaminformationitfadaptation.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,20 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: StreamInformation Itf Adaptation Source
+ *
+ */
#include "xadebug.h"
#include "xathreadsafety.h"
@@ -78,9 +77,8 @@
}
/* Get media container type */
- DEBUG_INFO_A2("Adaptation Context- ID is [%u] Extended ID[%u]",
- (unsigned int)adaptCtx->ctxId,
- (unsigned int)((XAMediaPlayerAdaptationCtx*) adaptCtx)->extendedCtxId);
+ DEBUG_INFO_A1("Adaptation Context- ID is [%u] ",
+ (unsigned int)adaptCtx->ctxId );
/* Initialize to unspecified */
*containerType = XA_CONTAINERTYPE_UNSPECIFIED;
--- a/khronosfws/openmax_al/src/gst_adaptation/xastreaminformationitfadaptation.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/gst_adaptation/xastreaminformationitfadaptation.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,20 +1,20 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: StreamInformation Itf Adaptation header
+ *
+ */
+
#ifndef XASTREAMINFORMATIONITFADAPTATION_H
#define XASTREAMINFORMATIONITFADAPTATION_H
--- a/khronosfws/openmax_al/src/mediaplayer/xamediaplayer.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mediaplayer/xamediaplayer.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Media Player Object Implementation
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
@@ -45,26 +45,26 @@
/* Static mapping of enumeration XAMediaPlayerInterfaces to interface iids */
static const XAInterfaceID* xaMediaPlayerItfIIDs[MP_ITFCOUNT] =
-{
- &XA_IID_OBJECT,
- &XA_IID_DYNAMICINTERFACEMANAGEMENT,
- &XA_IID_PLAY,
- &XA_IID_SEEK,
- &XA_IID_VOLUME,
- &XA_IID_PREFETCHSTATUS,
- &XA_IID_CONFIGEXTENSION,
- &XA_IID_DYNAMICSOURCE,
- &XA_IID_EQUALIZER,
- &XA_IID_IMAGECONTROLS,
- &XA_IID_IMAGEEFFECTS,
- &XA_IID_METADATAEXTRACTION,
- &XA_IID_METADATATRAVERSAL,
- &XA_IID_PLAYBACKRATE,
- &XA_IID_VIDEOPOSTPROCESSING,
- &XA_IID_NOKIAVOLUMEEXT,
- &XA_IID_NOKIALINEARVOLUME,
- &XA_IID_STREAMINFORMATION
-};
+ {
+ &XA_IID_OBJECT,
+ &XA_IID_DYNAMICINTERFACEMANAGEMENT,
+ &XA_IID_PLAY,
+ &XA_IID_SEEK,
+ &XA_IID_VOLUME,
+ &XA_IID_PREFETCHSTATUS,
+ &XA_IID_CONFIGEXTENSION,
+ &XA_IID_DYNAMICSOURCE,
+ &XA_IID_EQUALIZER,
+ &XA_IID_IMAGECONTROLS,
+ &XA_IID_IMAGEEFFECTS,
+ &XA_IID_METADATAEXTRACTION,
+ &XA_IID_METADATATRAVERSAL,
+ &XA_IID_PLAYBACKRATE,
+ &XA_IID_VIDEOPOSTPROCESSING,
+ &XA_IID_NOKIAVOLUMEEXT,
+ &XA_IID_NOKIALINEARVOLUME,
+ &XA_IID_STREAMINFORMATION
+ };
/* Global methods */
@@ -72,18 +72,13 @@
* Create object
*/
XAresult XAMediaPlayerImpl_CreateMediaPlayer(FrameworkMap* mapper,
- XACapabilities* capabilities,
- XAObjectItf *pPlayer,
- XADataSource *pDataSrc,
- XADataSource *pBankSrc,
- XADataSink *pAudioSnk,
- XADataSink *pImageVideoSnk,
- XADataSink *pVibra,
- XADataSink *pLEDArray,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired)
-{
+ XACapabilities* capabilities, XAObjectItf *pPlayer,
+ XADataSource *pDataSrc, XADataSource *pBankSrc,
+ XADataSink *pAudioSnk, XADataSink *pImageVideoSnk,
+ XADataSink *pVibra, XADataSink *pLEDArray, XAuint32 numInterfaces,
+ const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired)
+ {
XAuint8 itfIdx = 0;
XAMediaType mediaType = XA_MEDIATYPE_UNKNOWN;
XAMediaPlayerImpl* pPlayerImpl = NULL;
@@ -91,51 +86,53 @@
XAObjectItfImpl* pBaseObj = NULL;
const char *uri = NULL;
XAresult ret = XA_RESULT_SUCCESS;
-
+ XADataLocator_IODevice* tmpIODevice;
+ XADataLocator_IODevice locatorIODevice;
+
DEBUG_API("->XAMediaPlayerImpl_CreateMediaPlayer");
XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaPlayer);
- if(!pPlayer || !pDataSrc)
- {
+ if (!pPlayer || !pDataSrc)
+ {
XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer);
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAMediaPlayerImpl_CreateMediaPlayer");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
/* check sink&source parameters */
- ret = XACommon_ValidateDataLocator(6, pAudioSnk, pImageVideoSnk, pDataSrc,
- pBankSrc, pVibra, pLEDArray);
- if(ret!=XA_RESULT_SUCCESS)
- {
+ ret = XACommon_ValidateDataLocator(6, pAudioSnk, pImageVideoSnk,
+ pDataSrc, pBankSrc, pVibra, pLEDArray);
+ if (ret != XA_RESULT_SUCCESS)
+ {
XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer);
DEBUG_API("<-XAMediaPlayerImpl_CreateMediaPlayer");
return ret;
- }
+ }
/* also, check source availability */
- ret = XACommon_CheckDataSource(pDataSrc,&mediaType);
- if(ret!=XA_RESULT_SUCCESS)
- {
+ ret = XACommon_CheckDataSource(pDataSrc, &mediaType);
+ if (ret != XA_RESULT_SUCCESS)
+ {
XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer);
DEBUG_API("<-XAMediaPlayerImpl_CreateMediaPlayer");
return ret;
- }
+ }
/* instantiate object */
- pPlayerImpl = (XAMediaPlayerImpl*)calloc(1,sizeof(XAMediaPlayerImpl));
- if(!pPlayerImpl)
- {
+ pPlayerImpl = (XAMediaPlayerImpl*) calloc(1, sizeof(XAMediaPlayerImpl));
+ if (!pPlayerImpl)
+ {
/* memory allocation failed */
XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer);
DEBUG_API("<-XAMediaPlayerImpl_CreateMediaPlayer");
return XA_RESULT_MEMORY_FAILURE;
- }
+ }
pBaseObj = &pPlayerImpl->baseObj;
/* Initialize base object default implementation */
XAObjectItfImpl_Init(pBaseObj, MP_ITFCOUNT, xaMediaPlayerItfIIDs,
- XAMediaPlayerImpl_DoRealize, XAMediaPlayerImpl_DoResume,
- XAMediaPlayerImpl_FreeResources);
+ XAMediaPlayerImpl_DoRealize, XAMediaPlayerImpl_DoResume,
+ XAMediaPlayerImpl_FreeResources);
/* Mark interfaces that need to be exposed */
/* Implicit and mandated interfaces */
@@ -143,73 +140,72 @@
pBaseObj->interfaceMap[MP_DIMITF].required = XA_BOOLEAN_TRUE;
/* Explicit interfaces */
- if((numInterfaces != 0) && pInterfaceIds && pInterfaceRequired)
- {
+ if ((numInterfaces != 0) && pInterfaceIds && pInterfaceRequired)
+ {
/* Check required interfaces */
- for(itfIdx = 0; itfIdx < numInterfaces; itfIdx++)
- {
+ for (itfIdx = 0; itfIdx < numInterfaces; itfIdx++)
+ {
/* If mapEntry is null then required interface is not supported.*/
- XAObjItfMapEntry *entry =
- XAObjectItfImpl_GetItfEntry((XAObjectItf)&(pBaseObj), pInterfaceIds[itfIdx]);
- if( !entry )
- {
- if( pInterfaceRequired[itfIdx] )
+ XAObjItfMapEntry *entry = XAObjectItfImpl_GetItfEntry(
+ (XAObjectItf) &(pBaseObj), pInterfaceIds[itfIdx]);
+ if (!entry)
{
+ if (pInterfaceRequired[itfIdx])
+ {
/* required interface cannot be accommodated - fail creation */
DEBUG_ERR("Required interface not found - abort creation!");
ret = XA_RESULT_FEATURE_UNSUPPORTED;
break;
- }
+ }
else
- {
+ {
DEBUG_INFO("Requested (not required) interface not found - continue creation");
+ }
}
- }
else
- { /* weed out unsupported content-aware itf's */
- if( (mediaType==XA_MEDIATYPE_IMAGE &&
- (entry->mapIdx==MP_SEEKITF ||
- entry->mapIdx==MP_EQUALIZERITF ||
- entry->mapIdx==MP_VOLUMEITF))
- ||
- (mediaType==XA_MEDIATYPE_AUDIO &&
- (entry->mapIdx==MP_IMAGECONTROLSITF ||
- entry->mapIdx==MP_IMAGEEFFECTSITF ||
- entry->mapIdx==MP_VIDEOPOSTPROCESSINGITF)) )
- {
+ { /* weed out unsupported content-aware itf's */
+ if ((mediaType == XA_MEDIATYPE_IMAGE && (entry->mapIdx
+ == MP_SEEKITF || entry->mapIdx == MP_EQUALIZERITF
+ || entry->mapIdx == MP_VOLUMEITF)) || (mediaType
+ == XA_MEDIATYPE_AUDIO && (entry->mapIdx
+ == MP_IMAGECONTROLSITF || entry->mapIdx
+ == MP_IMAGEEFFECTSITF || entry->mapIdx
+ == MP_VIDEOPOSTPROCESSINGITF)))
+ {
entry->required = XA_BOOLEAN_FALSE;
- if( pInterfaceRequired[itfIdx] )
- {
+ if (pInterfaceRequired[itfIdx])
+ {
DEBUG_ERR("Required interface not supported for given media - abort creation!");
ret = XA_RESULT_FEATURE_UNSUPPORTED;
break;
+ }
}
- }
else
- {
+ {
entry->required = XA_BOOLEAN_TRUE;
+ }
}
}
}
- }
- if(ret!=XA_RESULT_SUCCESS)
- { /* creation fails */
- XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
+ if (ret != XA_RESULT_SUCCESS)
+ { /* creation fails */
+ XAObjectItfImpl_Destroy((XAObjectItf) &(pBaseObj));
return ret;
- }
+ }
/* Mark interfaces that can be handled dynamically */
/* Mandated dynamic itfs */
pBaseObj->interfaceMap[MP_EQUALIZERITF].isDynamic = XA_BOOLEAN_TRUE;
pBaseObj->interfaceMap[MP_IMAGEEFFECTSITF].isDynamic = XA_BOOLEAN_TRUE;
- pBaseObj->interfaceMap[MP_METADATAEXTRACTIONITF].isDynamic = XA_BOOLEAN_TRUE;
- pBaseObj->interfaceMap[MP_METADATATRAVERSALITF].isDynamic = XA_BOOLEAN_TRUE;
+ pBaseObj->interfaceMap[MP_METADATAEXTRACTIONITF].isDynamic
+ = XA_BOOLEAN_TRUE;
+ pBaseObj->interfaceMap[MP_METADATATRAVERSALITF].isDynamic
+ = XA_BOOLEAN_TRUE;
pBaseObj->interfaceMap[MP_PLAYBACKRATEITF].isDynamic = XA_BOOLEAN_TRUE;
-
- /*Set ObjectItf to point to newly created object*/
- *pPlayer = (XAObjectItf)&(pBaseObj->self);
+ /*Set ObjectItf to point to newly created object*/
+ *pPlayer = (XAObjectItf) &(pBaseObj->self);
/*initialize XAPlayerImpl variables */
@@ -220,116 +216,120 @@
pPlayerImpl->vibra = pVibra;
pPlayerImpl->LEDArray = pLEDArray;
- /* Determine framework type that can handle recording */
- fwType = (FWMgrFwType)FWMgrMOUnknown;
- /**/
- if (pDataSrc->pLocator)
- {
- XADataLocator_URI* dataLoc = (XADataLocator_URI*)pDataSrc->pLocator;
- if (dataLoc->locatorType == XA_DATALOCATOR_URI)
- {
- uri = (char*)dataLoc->URI;
- }
- }
- fwType = XAFrameworkMgr_GetFramework(
- mapper,
- uri,
- FWMgrMOPlayer);
-
- if (fwType == FWMgrMOUnknown)
+ // Handle possible radio:
+ tmpIODevice = (XADataLocator_IODevice*) (pPlayerImpl->dataSrc->pLocator);
+ locatorIODevice = *tmpIODevice;
+ if (locatorIODevice.deviceType == XA_IODEVICE_RADIO)
{
- ret = XA_RESULT_CONTENT_UNSUPPORTED;
- XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
- XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
- DEBUG_API("<-XAMediaPlayerImpl_CreateMediaPlayer");
- return ret;
+ fwType = (FWMgrFwType) FWMgrFWMMF;
}
-
- if(fwType == FWMgrFWMMF)
- {
- pPlayerImpl->adaptationCtxMMF = XAMediaPlayerAdaptMMF_Create(pPlayerImpl->dataSrc,
- pPlayerImpl->bankSrc,
- pPlayerImpl->audioSnk,
- pPlayerImpl->imageVideoSnk,
- pPlayerImpl->vibra,
- pPlayerImpl->LEDArray);
-
- pPlayerImpl->curAdaptCtx = pPlayerImpl->adaptationCtxMMF;
- }
else
- {
- pPlayerImpl->adaptationCtxGst = XAMediaPlayerAdapt_Create(pPlayerImpl->dataSrc,
- pPlayerImpl->bankSrc,
- pPlayerImpl->audioSnk,
- pPlayerImpl->imageVideoSnk,
- pPlayerImpl->vibra,
- pPlayerImpl->LEDArray);
-
- pPlayerImpl->curAdaptCtx = pPlayerImpl->adaptationCtxGst;
- }
-
+ {
+ /* Determine framework type that can handle recording */
+ fwType = (FWMgrFwType) FWMgrMOUnknown;
+ /**/
+ if (pDataSrc->pLocator)
+ {
+ XADataLocator_URI* dataLoc =
+ (XADataLocator_URI*) pDataSrc->pLocator;
+ if (dataLoc->locatorType == XA_DATALOCATOR_URI)
+ {
+ uri = (char*) dataLoc->URI;
+ }
+ }
+ fwType = XAFrameworkMgr_GetFramework(mapper, uri, FWMgrMOPlayer);
+
+ if (fwType == FWMgrMOUnknown)
+ {
+ ret = XA_RESULT_CONTENT_UNSUPPORTED;
+ XAObjectItfImpl_Destroy((XAObjectItf) &(pBaseObj));
+ XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+ DEBUG_API("<-XAMediaPlayerImpl_CreateMediaPlayer");
+ return ret;
+ }
+ } // end else
+
+ if (fwType == FWMgrFWMMF)
+ {
+ pPlayerImpl->adaptationCtxMMF = XAMediaPlayerAdaptMMF_Create(
+ pPlayerImpl->dataSrc, pPlayerImpl->bankSrc,
+ pPlayerImpl->audioSnk, pPlayerImpl->imageVideoSnk,
+ pPlayerImpl->vibra, pPlayerImpl->LEDArray);
+
+ pPlayerImpl->curAdaptCtx = pPlayerImpl->adaptationCtxMMF;
+ }
+ else
+ {
+ pPlayerImpl->adaptationCtxGst = XAMediaPlayerAdapt_Create(
+ pPlayerImpl->dataSrc, pPlayerImpl->bankSrc,
+ pPlayerImpl->audioSnk, pPlayerImpl->imageVideoSnk,
+ pPlayerImpl->vibra, pPlayerImpl->LEDArray);
+
+ pPlayerImpl->curAdaptCtx = pPlayerImpl->adaptationCtxGst;
+ }
+
pPlayerImpl->curAdaptCtx->capslist = capabilities;
pPlayerImpl->curAdaptCtx->fwtype = fwType;
-
+
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
DEBUG_API("<-XAMediaPlayerImpl_CreateMediaPlayer");
return XA_RESULT_SUCCESS;
-}
+ }
/* XAResult XAMediaPlayerImpl_QueryNumSupportedInterfaces
* Statically query supported interfaces
*/
-XAresult XAMediaPlayerImpl_QueryNumSupportedInterfaces(XAuint32 * pNumSupportedInterfaces)
-{
+XAresult XAMediaPlayerImpl_QueryNumSupportedInterfaces(
+ XAuint32 * pNumSupportedInterfaces)
+ {
DEBUG_API("->XAMediaPlayerImpl_QueryNumSupportedInterfaces");
- if(pNumSupportedInterfaces)
- {
+ if (pNumSupportedInterfaces)
+ {
*pNumSupportedInterfaces = MP_ITFCOUNT;
DEBUG_API("<-XAMediaPlayerImpl_QueryNumSupportedInterfaces");
return XA_RESULT_SUCCESS;
- }
+ }
else
- {
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAMediaPlayerImpl_QueryNumSupportedInterfaces");
return XA_RESULT_PARAMETER_INVALID;
+ }
}
-}
/* XAResult XAMediaPlayerImpl_QuerySupportedInterfaces
* Statically query supported interfaces
*/
XAresult XAMediaPlayerImpl_QuerySupportedInterfaces(XAuint32 index,
- XAInterfaceID * pInterfaceId)
-{
+ XAInterfaceID * pInterfaceId)
+ {
DEBUG_API("->XAMediaPlayerImpl_QuerySupportedInterfaces");
- if (index >= MP_ITFCOUNT || !pInterfaceId )
- {
- if(pInterfaceId)
+ if (index >= MP_ITFCOUNT || !pInterfaceId)
{
+ if (pInterfaceId)
+ {
*pInterfaceId = XA_IID_NULL;
+ }DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+ DEBUG_API("<-XAMediaPlayerImpl_QuerySupportedInterfaces");
+ return XA_RESULT_PARAMETER_INVALID;
}
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAMediaPlayerImpl_QuerySupportedInterfaces");
- return XA_RESULT_PARAMETER_INVALID;
- }
else
- {
+ {
*pInterfaceId = *(xaMediaPlayerItfIIDs[index]);
DEBUG_API("<-XAMediaPlayerImpl_QuerySupportedInterfaces");
return XA_RESULT_SUCCESS;
+ }
}
-}
/*
* Realize the object
*/
XAresult XAMediaPlayerImpl_DoRealize(XAObjectItf self)
-{
- XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
- XAMediaPlayerImpl* pImpl = (XAMediaPlayerImpl*)(pObj);
+ {
+ XAObjectItfImpl* pObj = (XAObjectItfImpl*) (*self);
+ XAMediaPlayerImpl* pImpl = (XAMediaPlayerImpl*) (pObj);
XAuint8 itfIdx = 0;
void *pItf = NULL;
XAresult ret = XA_RESULT_SUCCESS;
@@ -338,51 +338,55 @@
XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
/* check casting from correct pointer type */
- if(!pImpl || pObj != pImpl->baseObj.self)
- {
+ if (!pImpl || pObj != pImpl->baseObj.self)
+ {
/* invalid parameter */
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAMediaPlayerImpl_DoRealize");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
/* Realize all implicit and explicitly wanted interfaces */
- for(itfIdx = 0; itfIdx < MP_ITFCOUNT; itfIdx++)
- {
- if(!(pObj->interfaceMap[itfIdx].pItf) && pObj->interfaceMap[itfIdx].required)
+ for (itfIdx = 0; itfIdx < MP_ITFCOUNT; itfIdx++)
{
- switch(itfIdx)
+ if (!(pObj->interfaceMap[itfIdx].pItf)
+ && pObj->interfaceMap[itfIdx].required)
{
+ switch (itfIdx)
+ {
case MP_DIMITF:
pItf = XADIMItfImpl_Create();
- if(pItf)
- {
+ if (pItf)
+ {
XADIMItfImpl_Init(pItf, self,
- XAMediaPlayerImpl_DoAddItf,
- XAMediaPlayerImpl_DoResumeItf,
- XAMediaPlayerImpl_DoRemoveItf);
- }
+ XAMediaPlayerImpl_DoAddItf,
+ XAMediaPlayerImpl_DoResumeItf,
+ XAMediaPlayerImpl_DoRemoveItf);
+ }
break;
case MP_PLAYITF:
pItf = XAPlayItfImpl_Create(pImpl);
- if ( pImpl->dataSrc )
- {
- XAuint32 locType = *((XAuint32*)(pImpl->dataSrc->pLocator));
- if ( locType == XA_DATALOCATOR_IODEVICE )
- {
- XADataLocator_IODevice *ioDevice = (XADataLocator_IODevice*)(pImpl->dataSrc->pLocator);
- if ( ioDevice->deviceType == XA_IODEVICE_CAMERA)
- {
- vfHandle = (void*) pItf;
- DEBUG_INFO_A1("Stored view finder pointer to global address %x", vfHandle);
- }
- }
- else
- {
-
- }
- }
+ if (pImpl->dataSrc)
+ {
+ XAuint32 locType =
+ *((XAuint32*) (pImpl->dataSrc->pLocator));
+ if (locType == XA_DATALOCATOR_IODEVICE)
+ {
+ XADataLocator_IODevice
+ *ioDevice =
+ (XADataLocator_IODevice*) (pImpl->dataSrc->pLocator);
+ if (ioDevice->deviceType == XA_IODEVICE_CAMERA)
+ {
+ vfHandle = (void*) pItf;
+ DEBUG_INFO_A1("Stored view finder pointer to global address %x", vfHandle);
+ }
+ }
+ else
+ {
+
+ }
+ }
break;
case MP_VOLUMEITF:
pItf = XAVolumeItfImpl_Create(pImpl->curAdaptCtx);
@@ -391,20 +395,23 @@
pItf = XASeekItfImpl_Create(pImpl);
break;
case MP_PREFETCHSTATUSITF:
- pItf = XAPrefetchStatusItfImpl_Create( pImpl );
+ pItf = XAPrefetchStatusItfImpl_Create(pImpl);
break;
case MP_METADATAEXTRACTIONITF:
- pItf = XAMetadataExtractionItfImpl_Create( pImpl->curAdaptCtx );
+ pItf = XAMetadataExtractionItfImpl_Create(
+ pImpl->curAdaptCtx);
break;
case MP_METADATATRAVERSALITF:
- pItf = XAMetadataTraversalItfImpl_Create( pImpl->curAdaptCtx );
+ pItf = XAMetadataTraversalItfImpl_Create(
+ pImpl->curAdaptCtx);
break;
case MP_PLAYBACKRATEITF:
pItf = XAPlaybackRateItfImpl_Create(pImpl);
break;
case MP_CONFIGEXTENSIONITF:
pItf = XAConfigExtensionsItfImpl_Create();
- XAConfigExtensionsItfImpl_SetContext( pItf, pImpl->curAdaptCtx);
+ XAConfigExtensionsItfImpl_SetContext(pItf,
+ pImpl->curAdaptCtx);
break;
case MP_DYNAMICSOURCEITF:
pItf = XADynamicSourceItfImpl_Create(pImpl->curAdaptCtx);
@@ -412,96 +419,102 @@
case MP_EQUALIZERITF:
pItf = XAEqualizerItfImpl_Create(pImpl->curAdaptCtx);
break;
- case MP_IMAGECONTROLSITF:
+#ifdef OMAX_CAMERABIN
+ case MP_IMAGECONTROLSITF:
pItf = XAImageControlsItfImpl_Create(pImpl->curAdaptCtx);
break;
- case MP_IMAGEEFFECTSITF:
+ case MP_IMAGEEFFECTSITF:
pItf = XAImageEffectsItfImpl_Create(pImpl->curAdaptCtx);
break;
- case MP_VIDEOPOSTPROCESSINGITF:
+ case MP_VIDEOPOSTPROCESSINGITF:
pItf = XAVideoPostProcessingItfImpl_Create(pImpl->curAdaptCtx);
break;
- case MP_NOKIAVOLUMEEXT:
+#endif
+ case MP_NOKIAVOLUMEEXT:
pItf = XANokiaVolumeExtItfImpl_Create(pImpl->curAdaptCtx);
break;
- case MP_NOKIALINEARVOLUME:
- pItf = XANokiaLinearVolumeItfImpl_Create(pImpl->curAdaptCtx);
- break;
+ case MP_NOKIALINEARVOLUME:
+ pItf = XANokiaLinearVolumeItfImpl_Create(
+ pImpl->curAdaptCtx);
+ break;
case MP_STREAMINFORMATIONITF:
- pItf = XAStreamInformationItfImpl_Create(pImpl->curAdaptCtx);
- break;
+ pItf = XAStreamInformationItfImpl_Create(
+ pImpl->curAdaptCtx);
+ break;
default:
break;
- }
- if(!pItf)
- {
+ }
+ if (!pItf)
+ {
/* Memory allocation failed */
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
DEBUG_API("<-XAMediaPlayerImpl_DoRealize");
return XA_RESULT_MEMORY_FAILURE;
- }
+ }
else
- {
+ {
pObj->interfaceMap[itfIdx].pItf = pItf;
+ }
}
}
- }
/* init adaptation */
- if(pImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
- {
- ret = XAMediaPlayerAdaptMMF_PostInit( (XAAdaptationMMFCtx*)pImpl->adaptationCtxMMF );
- }
+ if (pImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+ {
+ ret = XAMediaPlayerAdaptMMF_PostInit(
+ (XAAdaptationMMFCtx*) pImpl->adaptationCtxMMF);
+ }
else
- {
- ret = XAMediaPlayerAdapt_PostInit( (XAAdaptationGstCtx*)pImpl->adaptationCtxGst );
- }
- if ( ret != XA_RESULT_SUCCESS )
- {
+ {
+ ret = XAMediaPlayerAdapt_PostInit(
+ (XAAdaptationGstCtx*) pImpl->adaptationCtxGst);
+ }
+ if (ret != XA_RESULT_SUCCESS)
+ {
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
DEBUG_ERR("Adaptation init failed!");
DEBUG_API("<-XAMediaPlayerImpl_DoRealize");
return ret;
- }
+ }
pObj->state = XA_OBJECT_STATE_REALIZED;
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
DEBUG_API("<-XAMediaPlayerImpl_DoRealize");
return XA_RESULT_SUCCESS;
-}
+ }
/*
* Resume object
*/
XAresult XAMediaPlayerImpl_DoResume(XAObjectItf self)
-{
+ {
DEBUG_API("->XAMediaPlayerImpl_DoResume");
DEBUG_API("<-XAMediaPlayerImpl_DoResume");
/* suspended state not supported by this implementation */
return XA_RESULT_PRECONDITIONS_VIOLATED;
-}
+ }
/**
* void XAMediaPlayerImpl_FreeResources(XAObjectItf self)
* Description: Free all resources reserved at XAMediaPlayerImpl_DoRealize()
**/
void XAMediaPlayerImpl_FreeResources(XAObjectItf self)
-{
- XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
+ {
+ XAObjectItfImpl* pObj = (XAObjectItfImpl*) (*self);
XAuint8 itfIdx = 0;
- XAMediaPlayerImpl* pImpl = (XAMediaPlayerImpl*)pObj;
+ XAMediaPlayerImpl* pImpl = (XAMediaPlayerImpl*) pObj;
DEBUG_API("->XAMediaPlayerImpl_FreeResources");
XA_IMPL_THREAD_SAFETY_ENTRY_FOR_VOID_FUNCTIONS( XATSMediaPlayer );
assert(pObj && pImpl && pObj == pObj->self);
- for(itfIdx = 0; itfIdx < MP_ITFCOUNT; itfIdx++)
- {
+ for (itfIdx = 0; itfIdx < MP_ITFCOUNT; itfIdx++)
+ {
void *pItf = pObj->interfaceMap[itfIdx].pItf;
- if(pItf)
- {
- switch(itfIdx)
+ if (pItf)
{
+ switch (itfIdx)
+ {
case MP_DIMITF:
XADIMItfImpl_Free(pItf);
break;
@@ -535,126 +548,138 @@
case MP_EQUALIZERITF:
XAEqualizerItfImpl_Free(pItf);
break;
- case MP_IMAGECONTROLSITF:
+#ifdef OMAX_CAMERABIN
+ case MP_IMAGECONTROLSITF:
XAImageControlsItfImpl_Free(pItf);
break;
- case MP_IMAGEEFFECTSITF:
+ case MP_IMAGEEFFECTSITF:
XAImageEffectsItfImpl_Free(pItf);
break;
- case MP_VIDEOPOSTPROCESSINGITF:
+ case MP_VIDEOPOSTPROCESSINGITF:
XAVideoPostProcessingItfImpl_Free(pItf);
break;
+#endif
case MP_NOKIAVOLUMEEXT:
XANokiaVolumeExtItfImpl_Free(pItf);
break;
case MP_NOKIALINEARVOLUME:
XANokiaLinearVolumeItfImpl_Free(pItf);
- break;
+ break;
case MP_STREAMINFORMATIONITF:
XAStreamInformationItfImpl_Free(pItf);
break;
-
+
+ }
+ pObj->interfaceMap[itfIdx].pItf = NULL;
}
- pObj->interfaceMap[itfIdx].pItf = NULL;
}
- }
-
- if(pImpl->curAdaptCtx)
+
+ if (pImpl->curAdaptCtx)
{
- if(pImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+ if (pImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
{
- XAMediaPlayerAdaptMMF_Destroy( (XAAdaptationMMFCtx*)pImpl->adaptationCtxMMF );
+ XAMediaPlayerAdaptMMF_Destroy(
+ (XAAdaptationMMFCtx*) pImpl->adaptationCtxMMF);
}
else
{
- XAMediaPlayerAdapt_Destroy( (XAAdaptationGstCtx*)pImpl->adaptationCtxGst );
+ XAMediaPlayerAdapt_Destroy(
+ (XAAdaptationGstCtx*) pImpl->adaptationCtxGst);
}
}
XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS( XATSMediaPlayer );
DEBUG_API("<-XAMediaPlayerImpl_FreeResources");
return;
-}
+ }
/* XAMediaPlayerImpl_DoAddItf
* Dynamically add an interface, object specific parts
*/
-XAresult XAMediaPlayerImpl_DoAddItf(XAObjectItf self, XAObjItfMapEntry *mapEntry )
-{
-
- XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
- XAMediaPlayerImpl* pImpl = (XAMediaPlayerImpl*)(pObj);
+XAresult XAMediaPlayerImpl_DoAddItf(XAObjectItf self,
+ XAObjItfMapEntry *mapEntry)
+ {
+
+ XAObjectItfImpl* pObj = (XAObjectItfImpl*) (*self);
+ XAMediaPlayerImpl* pImpl = (XAMediaPlayerImpl*) (pObj);
XAresult ret = XA_RESULT_SUCCESS;
DEBUG_API("->XAMediaPlayerImpl_DoAddItf");
- if(mapEntry)
- {
- switch( mapEntry->mapIdx )
+ if (mapEntry)
+ {
+ switch (mapEntry->mapIdx)
{
-
+
case MP_METADATAEXTRACTIONITF:
- mapEntry->pItf = XAMetadataExtractionItfImpl_Create( pImpl->curAdaptCtx );
+ mapEntry->pItf = XAMetadataExtractionItfImpl_Create(
+ pImpl->curAdaptCtx);
break;
case MP_METADATATRAVERSALITF:
- mapEntry->pItf = XAMetadataTraversalItfImpl_Create( pImpl->curAdaptCtx );
+ mapEntry->pItf = XAMetadataTraversalItfImpl_Create(
+ pImpl->curAdaptCtx);
break;
case MP_PLAYBACKRATEITF:
mapEntry->pItf = XAPlaybackRateItfImpl_Create(pImpl);
break;
case MP_EQUALIZERITF:
- mapEntry->pItf = XAEqualizerItfImpl_Create( pImpl->curAdaptCtx );
+ mapEntry->pItf
+ = XAEqualizerItfImpl_Create(pImpl->curAdaptCtx);
break;
- case MP_IMAGEEFFECTSITF:
+#ifdef OMAX_CAMERABIN
+ case MP_IMAGEEFFECTSITF:
mapEntry->pItf = XAImageEffectsItfImpl_Create( pImpl->curAdaptCtx );
break;
-
+#endif
default:
- DEBUG_ERR("XAMediaPlayerImpl_DoAddItf unknown id");
+ DEBUG_ERR("XAMediaPlayerImpl_DoAddItf unknown id")
+ ;
ret = XA_RESULT_FEATURE_UNSUPPORTED;
break;
}
-
- if( !mapEntry->pItf && ret == XA_RESULT_SUCCESS)
+
+ if (!mapEntry->pItf && ret == XA_RESULT_SUCCESS)
{
DEBUG_ERR("XAMediaPlayerImpl_DoAddItf itf creation failed");
ret = XA_RESULT_MEMORY_FAILURE;
}
- }
+ }
else
- {
+ {
ret = XA_RESULT_PARAMETER_INVALID;
- }
+ }
DEBUG_API("<-XAMediaPlayerImpl_DoAddItf");
return ret;
-}
+ }
/* XAMediaPlayerImpl_DoResumeItf
* Try to resume lost interface, object specific parts
*/
-XAresult XAMediaPlayerImpl_DoResumeItf(XAObjectItf self, XAObjItfMapEntry *mapEntry )
-{
+XAresult XAMediaPlayerImpl_DoResumeItf(XAObjectItf self,
+ XAObjItfMapEntry *mapEntry)
+ {
/* For now, no difference between suspended and unrealised itfs */
XAresult ret = XA_RESULT_SUCCESS;
DEBUG_API("->XAMediaPlayerImpl_DoResumeItf");
- ret = XAMediaPlayerImpl_DoAddItf(self,mapEntry);
+ ret = XAMediaPlayerImpl_DoAddItf(self, mapEntry);
DEBUG_API("<-XAMediaPlayerImpl_DoResumeItf");
return ret;
-}
+ }
/* XAMediaPlayerImpl_DoRemoveItf
* Dynamically remove an interface, object specific parts
*/
-XAresult XAMediaPlayerImpl_DoRemoveItf(XAObjectItf self, XAObjItfMapEntry *mapEntry )
-{
+XAresult XAMediaPlayerImpl_DoRemoveItf(XAObjectItf self,
+ XAObjItfMapEntry *mapEntry)
+ {
XAresult ret = XA_RESULT_SUCCESS;
DEBUG_API("->XAMediaPlayerImpl_DoRemoveItf");
- if(mapEntry)
- {
- switch( mapEntry->mapIdx )
+ if (mapEntry)
{
+ switch (mapEntry->mapIdx)
+ {
case MP_METADATAEXTRACTIONITF:
XAMetadataExtractionItfImpl_Free(mapEntry->pItf);
break;
@@ -667,22 +692,25 @@
case MP_EQUALIZERITF:
XAEqualizerItfImpl_Free(mapEntry->pItf);
break;
- case MP_IMAGEEFFECTSITF:
+#ifdef OMAX_CAMERABIN
+ case MP_IMAGEEFFECTSITF:
XAImageEffectsItfImpl_Free(mapEntry->pItf);
break;
+#endif
default:
- DEBUG_ERR("XAMediaPlayerImpl_DoRemoveItf unknown id");
+ DEBUG_ERR("XAMediaPlayerImpl_DoRemoveItf unknown id")
+ ;
ret = XA_RESULT_FEATURE_UNSUPPORTED;
break;
- }
+ }
mapEntry->pItf = NULL;
- }
+ }
else
- {
+ {
ret = XA_RESULT_PARAMETER_INVALID;
- }
+ }
DEBUG_API("<-XAMediaPlayerImpl_DoRemoveItf");
return ret;
-}
+ }
--- a/khronosfws/openmax_al/src/mediaplayer/xamediaplayer.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mediaplayer/xamediaplayer.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: MediaPlayer Object Implementation Header
+ *
+ */
#ifndef XAMEDIAPLAYER_H
#define XAMEDIAPLAYER_H
@@ -26,14 +26,12 @@
#include "xacapabilitiesmgr.h"
/** MACROS **/
-
/** TYPES **/
-
/** ENUMERATIONS **/
/* Enumeration for interfaces that MediaPlayer supports. */
typedef enum
-{
+ {
MP_OBJECTITF,
MP_DIMITF,
MP_PLAYITF,
@@ -53,12 +51,12 @@
MP_NOKIALINEARVOLUME,
MP_STREAMINFORMATIONITF,
MP_ITFCOUNT
-} MPInterfaces;
+ } MPInterfaces;
/** STRUCTURES **/
/* Specification for XAMediaPlayerImpl.*/
typedef struct XAMediaPlayerImpl_
-{
+ {
/* Parent for XAMediaPlayerImpl */
XAObjectItfImpl baseObj;
@@ -76,8 +74,7 @@
XAAdaptationBaseCtx* adaptationCtxGst;
XAAdaptationBaseCtx* adaptationCtxMMF;
-} XAMediaPlayerImpl;
-
+ } XAMediaPlayerImpl;
/** METHODS **/
@@ -87,8 +84,11 @@
void XAMediaPlayerImpl_FreeResources(XAObjectItf self);
/* DynamicInterfaceManagement object-specific methods */
-XAresult XAMediaPlayerImpl_DoAddItf(XAObjectItf self, XAObjItfMapEntry *mapEntry );
-XAresult XAMediaPlayerImpl_DoResumeItf(XAObjectItf self, XAObjItfMapEntry *mapEntry );
-XAresult XAMediaPlayerImpl_DoRemoveItf(XAObjectItf self, XAObjItfMapEntry *mapEntry );
+XAresult XAMediaPlayerImpl_DoAddItf(XAObjectItf self,
+ XAObjItfMapEntry *mapEntry);
+XAresult XAMediaPlayerImpl_DoResumeItf(XAObjectItf self,
+ XAObjItfMapEntry *mapEntry);
+XAresult XAMediaPlayerImpl_DoRemoveItf(XAObjectItf self,
+ XAObjItfMapEntry *mapEntry);
#endif /* XAMEDIAPLAYER_H */
--- a/khronosfws/openmax_al/src/mediaplayer/xaplayitf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mediaplayer/xaplayitf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Play Itf Implementation
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
@@ -33,17 +33,17 @@
* Description: Validate interface pointer and cast it to implementation pointer.
*/
static XAPlayItfImpl* GetImpl(XAPlayItf self)
-{
- if(self)
{
- XAPlayItfImpl* impl = (XAPlayItfImpl*)(*self);
- if(impl && impl == impl->self)
+ if (self)
{
+ XAPlayItfImpl* impl = (XAPlayItfImpl*) (*self);
+ if (impl && impl == impl->self)
+ {
return impl;
+ }
}
+ return NULL;
}
- return NULL;
-}
/**
* Base interface XAPlayItf implementation
@@ -54,124 +54,130 @@
* Description: Requests a transition of the player into the given play state.
**/
XAresult XAPlayItfImpl_SetPlayState(XAPlayItf self, XAuint32 state)
-{
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAPlayItfImpl* impl = GetImpl(self);
DEBUG_API_A1("->XAPlayItfImpl_SetPlayState %s",PLAYSTATENAME(state));
- if( !impl || state < XA_PLAYSTATE_STOPPED || state > XA_PLAYSTATE_PLAYING )
- {
+ if (!impl || state < XA_PLAYSTATE_STOPPED || state > XA_PLAYSTATE_PLAYING)
+ {
/* invalid parameter */
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAPlayItfImpl_SetPlayState");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
- if(impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
- {
- ret = XAPlayItfAdaptMMF_SetPlayState(impl->pObjImpl->curAdaptCtx, state);
+ if (impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+ {
+ ret = XAPlayItfAdaptMMF_SetPlayState(impl->pObjImpl->curAdaptCtx,
+ state);
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
DEBUG_API("<-XAPlayItfImpl_SetPlayState");
- return ret;
- }
+ return ret;
+ }
- /* check is play state changed, if not do nothing */
- if(state != impl->playbackState)
- {
- if(state == XA_PLAYSTATE_PLAYING)
- {
- XAPlayItfAdaptGST_GetPosition((XAAdaptationGstCtx*)impl->adapCtx, &(impl->lastPosition));
- }
- ret = XAPlayItfAdaptGST_SetPlayState(impl->adapCtx, state);
+ /* check is play state changed, if not do nothing */
+ if (state != impl->playbackState)
+ {
+ if (state == XA_PLAYSTATE_PLAYING)
+ {
+ XAPlayItfAdaptGST_GetPosition(
+ (XAAdaptationGstCtx*) impl->adapCtx,
+ &(impl->lastPosition));
+ }
+ ret = XAPlayItfAdaptGST_SetPlayState(impl->adapCtx, state);
- if(ret == XA_RESULT_SUCCESS)
- {
- impl->playbackState = state;
- if(state == XA_PLAYSTATE_STOPPED || state == XA_PLAYSTATE_PAUSED)
- {
- impl->isMarkerPosCbSend = XA_BOOLEAN_FALSE;
- impl->lastPosition = 0;
- }
- }
- }
+ if (ret == XA_RESULT_SUCCESS)
+ {
+ impl->playbackState = state;
+ if (state == XA_PLAYSTATE_STOPPED || state == XA_PLAYSTATE_PAUSED)
+ {
+ impl->isMarkerPosCbSend = XA_BOOLEAN_FALSE;
+ impl->lastPosition = 0;
+ }
+ }
+ }
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
DEBUG_API("<-XAPlayItfImpl_SetPlayState");
return ret;
-}
+ }
/**
* XAresult XAPlayItfImpl_GetPlayState(XAPlayItf self, XAuint32 *pState)
* Description: Gets the player's current play state.
**/
XAresult XAPlayItfImpl_GetPlayState(XAPlayItf self, XAuint32 *pState)
-{
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAPlayItfImpl* impl = GetImpl(self);
DEBUG_API("->XAPlayItfImpl_GetPlayState");
- if(!impl || !pState)
- {
+ if (!impl || !pState)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAPlayItfImpl_GetPlayState");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
- if(impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
- {
- ret = XAPlayItfAdaptMMF_GetPlayState(impl->pObjImpl->curAdaptCtx, pState);
- }
+ if (impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+ {
+ ret = XAPlayItfAdaptMMF_GetPlayState(impl->pObjImpl->curAdaptCtx,
+ pState);
+ }
else
- {
+ {
*pState = impl->playbackState;
- }
+ }
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
DEBUG_API_A1("<-XAPlayItfImpl_GetPlayState: %s",PLAYSTATENAME(impl->playbackState));
return ret;
-}
+ }
/**
* XAresult XAPlayItfImpl_GetDuration(XAPlayItf self, XAmillisecond *pMsec)
* Description: Gets the duration of the current content, in milliseconds.
**/
XAresult XAPlayItfImpl_GetDuration(XAPlayItf self, XAmillisecond *pMsec)
-{
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAPlayItfImpl* impl = GetImpl(self);
DEBUG_API("->XAPlayItfImpl_GetDuration");
- if(!impl || !pMsec)
- {
+ if (!impl || !pMsec)
+ {
/* invalid parameter */
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAPlayItfImpl_GetDuration");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
- if(impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
- {
- ret = XAPlayItfAdaptMMF_GetDuration(impl->pObjImpl->curAdaptCtx, pMsec);
- }
+ if (impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+ {
+ ret = XAPlayItfAdaptMMF_GetDuration(impl->pObjImpl->curAdaptCtx,
+ pMsec);
+ }
else
- {
- ret = XAPlayItfAdaptGST_GetDuration((XAAdaptationGstCtx*)impl->adapCtx, pMsec);
- }
-
+ {
+ ret = XAPlayItfAdaptGST_GetDuration(
+ (XAAdaptationGstCtx*) impl->adapCtx, pMsec);
+ }
+
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
DEBUG_API("<-XAPlayItfImpl_GetDuration");
return ret;
-}
+ }
/**
* XAresult XAPlayItfImpl_GetPosition(XAPlayItf self, XAmillisecond *pMsec)
@@ -179,170 +185,187 @@
* to the beginning of the content.
**/
XAresult XAPlayItfImpl_GetPosition(XAPlayItf self, XAmillisecond *pMsec)
-{
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAPlayItfImpl* impl = GetImpl(self);
-
+
DEBUG_API("->XAPlayItfImpl_GetPosition");
- if(!impl || !pMsec)
- {
+ if (!impl || !pMsec)
+ {
/* invalid parameter */
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAPlayItfImpl_GetPosition");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
- if(impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
- {
- ret = XAPlayItfAdaptMMF_GetPosition(impl->pObjImpl->curAdaptCtx, pMsec);
- }
+ if (impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+ {
+ ret = XAPlayItfAdaptMMF_GetPosition(impl->pObjImpl->curAdaptCtx,
+ pMsec);
+ }
else
- {
+ {
- if ( impl->playbackState == XA_PLAYSTATE_STOPPED )
- {
- *pMsec = 0;
- DEBUG_API("<-XAPlayItfImpl_GetPosition");
- XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
- return XA_RESULT_SUCCESS;
+ if (impl->playbackState == XA_PLAYSTATE_STOPPED)
+ {
+ *pMsec = 0;
+ DEBUG_API("<-XAPlayItfImpl_GetPosition");
+ XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+ return XA_RESULT_SUCCESS;
+ }
+ ret = XAPlayItfAdaptGST_GetPosition(
+ (XAAdaptationGstCtx*) impl->adapCtx, pMsec);
}
- ret = XAPlayItfAdaptGST_GetPosition((XAAdaptationGstCtx*)impl->adapCtx, pMsec);
- }
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
DEBUG_API("<-XAPlayItfImpl_GetPosition");
return ret;
-}
+ }
/**
* XAresult XAPlayItfImpl_RegisterCallback(XAPlayItf self, xaPlayCallback callback,
* void *pContext)
* Description: Sets the playback callback function.
**/
-XAresult XAPlayItfImpl_RegisterCallback(XAPlayItf self, xaPlayCallback callback,
- void *pContext)
-{
+XAresult XAPlayItfImpl_RegisterCallback(XAPlayItf self,
+ xaPlayCallback callback, void *pContext)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAPlayItfImpl* impl = GetImpl(self);
DEBUG_API("->XAPlayItfImpl_RegisterCallback");
- if(!impl)
- {
+ if (!impl)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAPlayItfImpl_RegisterCallback");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
/* callback may be NULL (to remove callback) */
impl->callback = callback;
impl->cbcontext = pContext;
impl->cbPtrToSelf = self;
+ // No need to do anything else if radio:
+ if (((XAMediaPlayerAdaptationMMFCtx*) impl->pObjImpl->curAdaptCtx)->isForRadio
+ == XA_BOOLEAN_TRUE)
+ {
+ DEBUG_API("<-XAPlayItfImpl_RegisterCallback");
+ return ret;
+ }
+
XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
- if(impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
- {
- ret = XAPlayItfAdaptMMF_RegisterCallback(impl->pObjImpl->curAdaptCtx, callback);
- }
+ if (impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+ {
+ ret = XAPlayItfAdaptMMF_RegisterCallback(impl->pObjImpl->curAdaptCtx,
+ callback);
+ }
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
DEBUG_API("<-XAPlayItfImpl_RegisterCallback");
return ret;
-}
+ }
/**
* XAresult XAPlayItfImpl_SetCallbackEventsMask(XAPlayItf self, XAuint32 eventFlags)
* Description: Enables/disables notification of playback events.
**/
-XAresult XAPlayItfImpl_SetCallbackEventsMask(XAPlayItf self, XAuint32 eventFlags)
-{
+XAresult XAPlayItfImpl_SetCallbackEventsMask(XAPlayItf self,
+ XAuint32 eventFlags)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAPlayItfImpl* impl = GetImpl(self);
DEBUG_API("->XAPlayItfImpl_SetCallbackEventsMask");
- if(!impl || ( eventFlags > (XA_PLAYEVENT_HEADATEND | XA_PLAYEVENT_HEADATMARKER |
- XA_PLAYEVENT_HEADATNEWPOS | XA_PLAYEVENT_HEADMOVING | XA_PLAYEVENT_HEADSTALLED) ) )
- {
+ if (!impl || (eventFlags > (XA_PLAYEVENT_HEADATEND
+ | XA_PLAYEVENT_HEADATMARKER | XA_PLAYEVENT_HEADATNEWPOS
+ | XA_PLAYEVENT_HEADMOVING | XA_PLAYEVENT_HEADSTALLED)))
+ {
/* invalid parameter */
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAPlayItfImpl_SetCallbackEventsMask");
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XAPlayItfImpl_SetCallbackEventsMask");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
impl->eventFlags = eventFlags;
- if(impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
- {
- ret = XAPlayItfAdaptMMF_SetCallbackEventsMask(impl->pObjImpl->curAdaptCtx, eventFlags);
+ if (impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+ {
+ ret = XAPlayItfAdaptMMF_SetCallbackEventsMask(
+ impl->pObjImpl->curAdaptCtx, eventFlags);
- XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
- DEBUG_API("<-XAPlayItfImpl_SetCallbackEventsMask");
- return ret;
- }
+ XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
+ DEBUG_API("<-XAPlayItfImpl_SetCallbackEventsMask");
+ return ret;
+ }
/* enable position tracking if client wants so */
- if( (eventFlags & (XA_PLAYEVENT_HEADATMARKER | XA_PLAYEVENT_HEADATNEWPOS))
- && impl->adapCtx && !impl->positionupdateOn)
+ if ((eventFlags & (XA_PLAYEVENT_HEADATMARKER | XA_PLAYEVENT_HEADATNEWPOS))
+ && impl->adapCtx && !impl->positionupdateOn)
{
- ret = XAPlayItfAdapt_EnablePositionTracking((XAAdaptationGstCtx*)impl->adapCtx, XA_BOOLEAN_TRUE);
- if( ret == XA_RESULT_SUCCESS )
- {
+ ret = XAPlayItfAdapt_EnablePositionTracking(
+ (XAAdaptationGstCtx*) impl->adapCtx, XA_BOOLEAN_TRUE);
+ if (ret == XA_RESULT_SUCCESS)
+ {
impl->positionupdateOn = XA_BOOLEAN_TRUE;
+ }
}
- }
- else if( !(eventFlags & (XA_PLAYEVENT_HEADATMARKER | XA_PLAYEVENT_HEADATNEWPOS))
- && impl->adapCtx && impl->positionupdateOn)
- {
- ret = XAPlayItfAdapt_EnablePositionTracking((XAAdaptationGstCtx*)impl->adapCtx, XA_BOOLEAN_FALSE);
- if( ret == XA_RESULT_SUCCESS )
+ else if (!(eventFlags & (XA_PLAYEVENT_HEADATMARKER
+ | XA_PLAYEVENT_HEADATNEWPOS)) && impl->adapCtx
+ && impl->positionupdateOn)
{
+ ret = XAPlayItfAdapt_EnablePositionTracking(
+ (XAAdaptationGstCtx*) impl->adapCtx, XA_BOOLEAN_FALSE);
+ if (ret == XA_RESULT_SUCCESS)
+ {
impl->positionupdateOn = XA_BOOLEAN_FALSE;
+ }
}
- }
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
DEBUG_API("<-XAPlayItfImpl_SetCallbackEventsMask");
return ret;
-}
+ }
/**
* XAresult XAPlayItfImpl_GetCallbackEventsMask(XAPlayItf self, XAuint32 *pEventFlags)
* Description: Queries for the notification state (enabled/disabled) of playback events.
**/
-XAresult XAPlayItfImpl_GetCallbackEventsMask(XAPlayItf self, XAuint32 *pEventFlags)
-{
+XAresult XAPlayItfImpl_GetCallbackEventsMask(XAPlayItf self,
+ XAuint32 *pEventFlags)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAPlayItfImpl* impl = GetImpl(self);
DEBUG_API("->XAPlayItfImpl_GetCallbackEventsMask");
- if(!impl || !pEventFlags)
- {
+ if (!impl || !pEventFlags)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAPlayItfImpl_GetCallbackEventsMask");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pEventFlags = impl->eventFlags;
DEBUG_API("<-XAPlayItfImpl_GetCallbackEventsMask");
return ret;
-}
+ }
/**
* XAresult XAPlayItfImpl_SetMarkerPosition(XAPlayItf self, XAmillisecond mSec)
* Description: Sets the position of the playback marker.
**/
XAresult XAPlayItfImpl_SetMarkerPosition(XAPlayItf self, XAmillisecond mSec)
-{
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAmillisecond duration = 0;
XAPlayItfImpl* impl = GetImpl(self);
@@ -350,161 +373,164 @@
DEBUG_API_A1("->XAPlayItfImpl_SetMarkerPosition: %lu ms", mSec);
/* Get duration of the content */
- if(XAPlayItfImpl_GetDuration(self, &duration) != XA_RESULT_SUCCESS)
- {
+ if (XAPlayItfImpl_GetDuration(self, &duration) != XA_RESULT_SUCCESS)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAPlayItfImpl_SetMarkerPosition");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
-
+ }
- if(!impl || mSec > duration)
- {
+ if (!impl || mSec > duration)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAPlayItfImpl_SetMarkerPosition");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
impl->markerPosition = mSec;
impl->isMarkerPosCbSend = XA_BOOLEAN_FALSE;
XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
- if(impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
- {
- ret = XAPlayItfAdaptMMF_SetMarkerPosition(impl->pObjImpl->curAdaptCtx, mSec);
- }
+ if (impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+ {
+ ret = XAPlayItfAdaptMMF_SetMarkerPosition(
+ impl->pObjImpl->curAdaptCtx, mSec);
+ }
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
DEBUG_API("<-XAPlayItfImpl_SetMarkerPosition");
return ret;
-}
+ }
/**
* XAresult XAPlayItfImpl_ClearMarkerPosition(XAPlayItf self)
* Description: Clears marker.
**/
XAresult XAPlayItfImpl_ClearMarkerPosition(XAPlayItf self)
-{
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAPlayItfImpl* impl = GetImpl(self);
DEBUG_API("->XAPlayItfImpl_ClearMarkerPosition");
- if(!impl)
- {
+ if (!impl)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAPlayItfImpl_ClearMarkerPosition");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
impl->isMarkerPosCbSend = XA_BOOLEAN_FALSE;
impl->markerPosition = NO_POSITION;
XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
- if(impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
- {
- ret = XAPlayItfAdaptMMF_ClearMarkerPosition(impl->pObjImpl->curAdaptCtx);
- }
+ if (impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+ {
+ ret = XAPlayItfAdaptMMF_ClearMarkerPosition(
+ impl->pObjImpl->curAdaptCtx);
+ }
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
DEBUG_API("<-XAPlayItfImpl_ClearMarkerPosition");
return ret;
-}
+ }
/**
* XAresult XAPlayItfImpl_GetMarkerPosition(XAPlayItf self, XAmillisecond *pMsec)
* Description: Queries the position of playback marker.
**/
XAresult XAPlayItfImpl_GetMarkerPosition(XAPlayItf self, XAmillisecond *pMsec)
-{
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAPlayItfImpl* impl = GetImpl(self);
DEBUG_API("->XAPlayItfImpl_GetMarkerPosition");
- if(!impl || !pMsec)
- {
+ if (!impl || !pMsec)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAPlayItfImpl_GetMarkerPosition");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
- if(impl->markerPosition == NO_POSITION)
- {
+ if (impl->markerPosition == NO_POSITION)
+ {
DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
DEBUG_API("<-XAPlayItfImpl_GetMarkerPosition");
/*marker is not set */
return XA_RESULT_PRECONDITIONS_VIOLATED;
- }
+ }
*pMsec = impl->markerPosition;
DEBUG_API("<-XAPlayItfImpl_GetMarkerPosition");
return ret;
-}
+ }
/**
* XAresult XAPlayItfImpl_SetPositionUpdatePeriod(XAPlayItf self, XAmillisecond mSec)
* Description: Sets the interval between periodic position notifications.
**/
-XAresult XAPlayItfImpl_SetPositionUpdatePeriod(XAPlayItf self, XAmillisecond mSec)
-{
+XAresult XAPlayItfImpl_SetPositionUpdatePeriod(XAPlayItf self,
+ XAmillisecond mSec)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAPlayItfImpl* impl = GetImpl(self);
DEBUG_API_A1("->XAPlayItfImpl_SetPositionUpdatePeriod, %lu mSec", mSec);
- if(!impl )
- {
+ if (!impl)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAPlayItfImpl_SetPositionUpdatePeriod");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
impl->positionUpdatePeriod = mSec;
XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
- if(impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
- {
- ret = XAPlayItfAdaptMMF_SetPositionUpdatePeriod(impl->pObjImpl->curAdaptCtx, mSec);
- }
+ if (impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+ {
+ ret = XAPlayItfAdaptMMF_SetPositionUpdatePeriod(
+ impl->pObjImpl->curAdaptCtx, mSec);
+ }
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
DEBUG_API("<-XAPlayItfImpl_SetPositionUpdatePeriod");
return ret;
-}
+ }
/**
* XAresult XAPlayItfImpl_GetPositionUpdatePeriod(XAPlayItf self, XAmillisecond *pMsec)
* Description: Queries the interval between periodic position notifications.
**/
-XAresult XAPlayItfImpl_GetPositionUpdatePeriod(XAPlayItf self, XAmillisecond *pMsec)
-{
+XAresult XAPlayItfImpl_GetPositionUpdatePeriod(XAPlayItf self,
+ XAmillisecond *pMsec)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAPlayItfImpl* impl = GetImpl(self);
DEBUG_API("->XAPlayItfImpl_GetPositionUpdatePeriod");
- if(!impl || !pMsec)
- {
+ if (!impl || !pMsec)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAPlayItfImpl_GetPositionUpdatePeriod");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pMsec = impl->positionUpdatePeriod;
DEBUG_API("<-XAPlayItfImpl_GetPositionUpdatePeriod");
return ret;
-}
-
+ }
/**
* XAPlayItfImpl -specific methods
@@ -514,14 +540,14 @@
* XAPlayItfImpl* XAPlayItfImpl_Create()
* Description: Allocate and initialize PlayItfImpl
**/
-XAPlayItfImpl* XAPlayItfImpl_Create( XAMediaPlayerImpl *impl )
-{
+XAPlayItfImpl* XAPlayItfImpl_Create(XAMediaPlayerImpl *impl)
+ {
XAPlayItfImpl *self;
DEBUG_API("->XAPlayItfImpl_Create");
- self = (XAPlayItfImpl*)calloc(1,sizeof(XAPlayItfImpl));
- if(self)
- {
+ self = (XAPlayItfImpl*) calloc(1, sizeof(XAPlayItfImpl));
+ if (self)
+ {
/* init itf default implementation */
self->itf.ClearMarkerPosition = XAPlayItfImpl_ClearMarkerPosition;
self->itf.GetCallbackEventsMask = XAPlayItfImpl_GetCallbackEventsMask;
@@ -529,12 +555,14 @@
self->itf.GetMarkerPosition = XAPlayItfImpl_GetMarkerPosition;
self->itf.GetPlayState = XAPlayItfImpl_GetPlayState;
self->itf.GetPosition = XAPlayItfImpl_GetPosition;
- self->itf.GetPositionUpdatePeriod = XAPlayItfImpl_GetPositionUpdatePeriod;
+ self->itf.GetPositionUpdatePeriod
+ = XAPlayItfImpl_GetPositionUpdatePeriod;
self->itf.RegisterCallback = XAPlayItfImpl_RegisterCallback;
self->itf.SetCallbackEventsMask = XAPlayItfImpl_SetCallbackEventsMask;
self->itf.SetMarkerPosition = XAPlayItfImpl_SetMarkerPosition;
self->itf.SetPlayState = XAPlayItfImpl_SetPlayState;
- self->itf.SetPositionUpdatePeriod = XAPlayItfImpl_SetPositionUpdatePeriod;
+ self->itf.SetPositionUpdatePeriod
+ = XAPlayItfImpl_SetPositionUpdatePeriod;
/* init variables */
self->callback = NULL;
@@ -548,150 +576,155 @@
self->pObjImpl = impl;
self->cbPtrToSelf = NULL;
self->isMarkerPosCbSend = XA_BOOLEAN_FALSE;
-
-/* XAAdaptationBase_AddEventHandler( self->adapCtx, &XAPlayItfImpl_AdaptCb, XA_PLAYITFEVENTS, self );*/
- XAAdaptationBase_AddEventHandler( self->pObjImpl->curAdaptCtx, &XAPlayItfImpl_AdaptCb, XA_PLAYITFEVENTS, self );
+
+ /* XAAdaptationBase_AddEventHandler( self->adapCtx, &XAPlayItfImpl_AdaptCb, XA_PLAYITFEVENTS, self );*/
+ XAAdaptationBase_AddEventHandler(self->pObjImpl->curAdaptCtx,
+ &XAPlayItfImpl_AdaptCb, XA_PLAYITFEVENTS, self);
self->self = self;
- }
+ }
DEBUG_API("<-XAPlayItfImpl_Create");
return self;
-}
+ }
/* void XAPlayItfImpl_Free(XAPlayItfImpl* self)
* Description: Free all resources reserved at XAPlayItfImpl_Create
*/
void XAPlayItfImpl_Free(XAPlayItfImpl* self)
-{
+ {
DEBUG_API("->XAPlayItfImpl_Free");
assert(self==self->self);
-/* XAAdaptationBase_RemoveEventHandler( self->adapCtx, &XAPlayItfImpl_AdaptCb );*/
- XAAdaptationBase_RemoveEventHandler( self->pObjImpl->curAdaptCtx, &XAPlayItfImpl_AdaptCb );
+ /* XAAdaptationBase_RemoveEventHandler( self->adapCtx, &XAPlayItfImpl_AdaptCb );*/
+ XAAdaptationBase_RemoveEventHandler(self->pObjImpl->curAdaptCtx,
+ &XAPlayItfImpl_AdaptCb);
free(self);
DEBUG_API("<-XAPlayItfImpl_Free");
-}
+ }
/* void XAPlayItfImpl_AdaptCb
* Description: Listen changes in adaptation
*/
-void XAPlayItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
-{
- XAPlayItfImpl* impl = (XAPlayItfImpl*)pHandlerCtx;
+void XAPlayItfImpl_AdaptCb(void *pHandlerCtx, XAAdaptEvent *event)
+ {
+ XAPlayItfImpl* impl = (XAPlayItfImpl*) pHandlerCtx;
XAuint32 newpos = 0;
DEBUG_API("->XAPlayItfImpl_AdaptCb");
XA_IMPL_THREAD_SAFETY_ENTRY_FOR_VOID_FUNCTIONS( XATSMediaPlayer );
- if(!impl)
- {
+ if (!impl)
+ {
DEBUG_ERR("XAPlayItfImpl_AdaptCb, invalid context pointer!");
DEBUG_API("<-XAPlayItfImpl_AdaptCb");
XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS( XATSMediaPlayer );
return;
- }
+ }
assert(event);
- if(impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
- {
+ if (impl->pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+ {
impl->callback(impl->cbPtrToSelf, impl->cbcontext, event->eventid);
DEBUG_API("<-XAPlayItfImpl_AdaptCb");
XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS( XATSMediaPlayer );
return;
- }
+ }
/* check position update events */
- if( event->eventid == XA_ADAPT_POSITION_UPDATE_EVT )
- {
+ if (event->eventid == XA_ADAPT_POSITION_UPDATE_EVT)
+ {
assert(event->data);
- newpos = *((XAuint32*)(event->data));
+ newpos = *((XAuint32*) (event->data));
DEBUG_API_A1("Position update from adaptation: new position %lu ms",newpos);
/* Check is looping start file playing before marker position */
- if(newpos < impl->markerPosition || impl->lastPosition > newpos)
- {
- DEBUG_INFO("Restart looping, clear marker position callback flag.");
+ if (newpos < impl->markerPosition || impl->lastPosition > newpos)
+ {
+ DEBUG_INFO("Restart looping, clear marker position callback flag.");
impl->isMarkerPosCbSend = XA_BOOLEAN_FALSE;
- }
+ }
/* check if marker passed and callback needed */
- if( (impl->markerPosition != NO_POSITION) &&
- (impl->eventFlags & XA_PLAYEVENT_HEADATMARKER) )
+ if ((impl->markerPosition != NO_POSITION) && (impl->eventFlags
+ & XA_PLAYEVENT_HEADATMARKER))
+ {
+ if (impl->callback && (((impl->lastPosition
+ < impl->markerPosition)
+ && (newpos > impl->markerPosition)) || (newpos
+ == impl->markerPosition)))
+ {
+ /* Check is callback already send */
+ if (impl->isMarkerPosCbSend != XA_BOOLEAN_TRUE)
+ {
+ impl->callback(impl->cbPtrToSelf, impl->cbcontext,
+ XA_PLAYEVENT_HEADATMARKER);
+ impl->isMarkerPosCbSend = XA_BOOLEAN_TRUE;
+ }
+ }
+ }
+ /* check if update period passed and callback needed */
+ if ((impl->positionUpdatePeriod > 0) && (impl->eventFlags
+ & XA_PLAYEVENT_HEADATNEWPOS) && impl->callback)
+ {
+ if ((XAuint32) ((impl->lastPosition)
+ / (impl->positionUpdatePeriod)) < (XAuint32) (newpos
+ / (impl->positionUpdatePeriod)))
+ {
+ impl->callback(impl->cbPtrToSelf, impl->cbcontext,
+ XA_PLAYEVENT_HEADATNEWPOS);
+ }
+ }
+ /* store position */
+ impl->lastPosition = newpos;
+ }
+
+ /* check other events */
+ else if (event->eventid == XA_PLAYEVENT_HEADATEND)
{
- if( impl->callback &&
- (
- ((impl->lastPosition < impl->markerPosition) &&
- (newpos > impl->markerPosition))
- ||
- (newpos == impl->markerPosition)
- )
- )
+ impl->playbackState = XA_PLAYSTATE_STOPPED;
+ impl->lastPosition = 0;
+ /* send callback if needed */
+ if ((XA_PLAYEVENT_HEADATEND & impl->eventFlags) && impl->callback)
{
- /* Check is callback already send */
- if( impl->isMarkerPosCbSend != XA_BOOLEAN_TRUE )
- {
- impl->callback(impl->cbPtrToSelf, impl->cbcontext, XA_PLAYEVENT_HEADATMARKER);
- impl->isMarkerPosCbSend = XA_BOOLEAN_TRUE;
- }
+ impl->callback(impl->cbPtrToSelf, impl->cbcontext,
+ XA_PLAYEVENT_HEADATEND);
}
}
- /* check if update period passed and callback needed */
- if( (impl->positionUpdatePeriod > 0) &&
- (impl->eventFlags & XA_PLAYEVENT_HEADATNEWPOS) &&
- impl->callback )
+ else if (event->eventid == XA_PLAYEVENT_HEADSTALLED)
{
- if( (XAuint32)((impl->lastPosition)/(impl->positionUpdatePeriod )) <
- (XAuint32)(newpos/(impl->positionUpdatePeriod )) )
- {
- impl->callback(impl->cbPtrToSelf, impl->cbcontext, XA_PLAYEVENT_HEADATNEWPOS);
- }
- }
- /* store position */
- impl->lastPosition = newpos;
- }
-
- /* check other events */
- else if( event->eventid == XA_PLAYEVENT_HEADATEND )
- {
- impl->playbackState = XA_PLAYSTATE_STOPPED;
- impl->lastPosition=0;
- /* send callback if needed */
- if( (XA_PLAYEVENT_HEADATEND & impl->eventFlags) && impl->callback )
- {
- impl->callback(impl->cbPtrToSelf, impl->cbcontext, XA_PLAYEVENT_HEADATEND);
- }
- }
- else if( event->eventid == XA_PLAYEVENT_HEADSTALLED )
- {
impl->playbackState = XA_PLAYSTATE_PAUSED;
- if(impl->adapCtx->fwtype == FWMgrFWMMF)
+ if (impl->adapCtx->fwtype == FWMgrFWMMF)
{
//XAPlayItfAdaptMMF_GetPosition((XAAdaptationGstCtx*)impl->adapCtx, &(impl->lastPosition));
}
else
{
- XAPlayItfAdaptGST_GetPosition((XAAdaptationGstCtx*)impl->adapCtx, &(impl->lastPosition));
- }
+ XAPlayItfAdaptGST_GetPosition(
+ (XAAdaptationGstCtx*) impl->adapCtx,
+ &(impl->lastPosition));
+ }
/* send callback if needed */
- if( (XA_PLAYEVENT_HEADSTALLED & impl->eventFlags) && impl->callback )
+ if ((XA_PLAYEVENT_HEADSTALLED & impl->eventFlags) && impl->callback)
+ {
+ impl->callback(impl->cbPtrToSelf, impl->cbcontext,
+ XA_PLAYEVENT_HEADSTALLED);
+ }
+ }
+ else if (event->eventid == XA_PLAYEVENT_HEADMOVING)
{
- impl->callback(impl->cbPtrToSelf, impl->cbcontext, XA_PLAYEVENT_HEADSTALLED);
- }
- }
- else if( event->eventid == XA_PLAYEVENT_HEADMOVING )
- {
impl->playbackState = XA_PLAYSTATE_PLAYING;
/* send callback if needed */
- if( (XA_PLAYEVENT_HEADMOVING & impl->eventFlags) && impl->callback )
- {
- impl->callback(impl->cbPtrToSelf, impl->cbcontext, XA_PLAYEVENT_HEADMOVING);
+ if ((XA_PLAYEVENT_HEADMOVING & impl->eventFlags) && impl->callback)
+ {
+ impl->callback(impl->cbPtrToSelf, impl->cbcontext,
+ XA_PLAYEVENT_HEADMOVING);
+ }
}
- }
else
- {
+ {
/* do nothing */
- }
+ }
DEBUG_API("<-XAPlayItfImpl_AdaptCb");
XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS( XATSMediaPlayer );
-}
+ }
--- a/khronosfws/openmax_al/src/mediaplayer/xaplayitf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mediaplayer/xaplayitf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Play Itf Header
+ *
+ */
#ifndef XAPLAYITF_H
#define XAPLAYITF_H
@@ -21,7 +21,6 @@
#include "xaadptbasectx.h"
#include "xamediaplayer.h"
-
/** MACROS **/
#define NO_POSITION XA_TIME_UNKNOWN
#define PLAYITF_DEFAULT_UPDATE_PERIOD 1000
@@ -34,7 +33,7 @@
/** STRUCTURES **/
/* Definition of XAPlayItf implementation */
typedef struct XAPlayItfImpl_
-{
+ {
/* parent interface */
struct XAPlayItf_ itf;
/* pointer to self */
@@ -51,7 +50,7 @@
XAuint32 eventFlags;
XAmillisecond markerPosition;
XAmillisecond positionUpdatePeriod;
- XAboolean positionupdateOn;
+ XAboolean positionupdateOn;
XAmillisecond lastPosition;
XAboolean isMarkerPosCbSend;
@@ -59,10 +58,10 @@
/* TODO : This is no longer needed since we have access to XAMediaPlayerImpl
* Delete this.*/
XAAdaptationBaseCtx *adapCtx;
-
+
XAMediaPlayerImpl* pObjImpl;
-} XAPlayItfImpl;
+ } XAPlayItfImpl;
/** METHODS **/
@@ -75,30 +74,33 @@
XAresult XAPlayItfImpl_GetPosition(XAPlayItf self, XAmillisecond *pMsec);
-XAresult XAPlayItfImpl_RegisterCallback(XAPlayItf self, xaPlayCallback callback,
- void *pContext);
+XAresult XAPlayItfImpl_RegisterCallback(XAPlayItf self,
+ xaPlayCallback callback, void *pContext);
-XAresult XAPlayItfImpl_SetCallbackEventsMask(XAPlayItf self, XAuint32 eventFlags);
+XAresult XAPlayItfImpl_SetCallbackEventsMask(XAPlayItf self,
+ XAuint32 eventFlags);
-XAresult XAPlayItfImpl_GetCallbackEventsMask(XAPlayItf self, XAuint32 *pEventFlags);
+XAresult XAPlayItfImpl_GetCallbackEventsMask(XAPlayItf self,
+ XAuint32 *pEventFlags);
XAresult XAPlayItfImpl_SetMarkerPosition(XAPlayItf self, XAmillisecond mSec);
XAresult XAPlayItfImpl_ClearMarkerPosition(XAPlayItf self);
-XAresult XAPlayItfImpl_GetMarkerPosition(XAPlayItf self, XAmillisecond *pMsec);
+XAresult
+ XAPlayItfImpl_GetMarkerPosition(XAPlayItf self, XAmillisecond *pMsec);
-XAresult XAPlayItfImpl_SetPositionUpdatePeriod(XAPlayItf self, XAmillisecond mSec);
+XAresult XAPlayItfImpl_SetPositionUpdatePeriod(XAPlayItf self,
+ XAmillisecond mSec);
-XAresult XAPlayItfImpl_GetPositionUpdatePeriod(XAPlayItf self, XAmillisecond *pMsec);
-
+XAresult XAPlayItfImpl_GetPositionUpdatePeriod(XAPlayItf self,
+ XAmillisecond *pMsec);
/*
* implementation-specific methods
*/
-XAPlayItfImpl* XAPlayItfImpl_Create( XAMediaPlayerImpl *impl );
-void XAPlayItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
+XAPlayItfImpl* XAPlayItfImpl_Create(XAMediaPlayerImpl *impl);
+void XAPlayItfImpl_AdaptCb(void *pHandlerCtx, XAAdaptEvent *event);
void XAPlayItfImpl_Free(XAPlayItfImpl* self);
-
#endif /* XAPLAYITF_H */
--- a/khronosfws/openmax_al/src/mediaplayer/xaseekitf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mediaplayer/xaseekitf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Seek Itf Implementation
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
@@ -31,17 +31,17 @@
* Description: Validate interface pointer and cast it to implementation pointer.
*/
static XASeekItfImpl* GetImpl(XASeekItf self)
-{
- if(self)
{
- XASeekItfImpl* impl = (XASeekItfImpl*)(*self);
- if(impl && impl == impl->self)
+ if (self)
{
+ XASeekItfImpl* impl = (XASeekItfImpl*) (*self);
+ if (impl && impl == impl->self)
+ {
return impl;
+ }
}
+ return NULL;
}
- return NULL;
-}
/**
* Base interface XASeekItf implementation
@@ -53,28 +53,29 @@
* Description: Sets the position of the playback head.
**/
XAresult XASeekItfImpl_SetPosition(XASeekItf self, XAmillisecond pos,
- XAuint32 seekMode)
-{
+ XAuint32 seekMode)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAmillisecond duration = 0;
XASeekItfImpl* impl = GetImpl(self);
DEBUG_API("->XASeekItfImpl_SetPosition");
XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
- if(!impl)
- {
+ if (!impl)
+ {
/* invalid parameter */
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XASeekItfImpl_SetPosition");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
-
- if(impl->adapCtx->fwtype == FWMgrFWMMF)
+ if (impl->adapCtx->fwtype == FWMgrFWMMF)
{
/* Get duration of the content */
- if(XAPlayItfAdaptMMF_GetDuration((XAAdaptationBaseCtx*)impl->adapCtx, &duration) != XA_RESULT_SUCCESS)
+ if (XAPlayItfAdaptMMF_GetDuration(
+ (XAAdaptationBaseCtx*) impl->adapCtx, &duration)
+ != XA_RESULT_SUCCESS)
{
/* invalid parameter */
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
@@ -82,7 +83,7 @@
DEBUG_API("<-XASeekItfImpl_SetPosition");
return XA_RESULT_PARAMETER_INVALID;
}
- if(pos > duration)
+ if (pos > duration)
{
/* invalid parameter */
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
@@ -90,8 +91,8 @@
DEBUG_API("<-XASeekItfImpl_SetPosition");
return XA_RESULT_PARAMETER_INVALID;
}
-
- if(seekMode != XA_SEEKMODE_FAST && seekMode != XA_SEEKMODE_ACCURATE)
+
+ if (seekMode != XA_SEEKMODE_FAST && seekMode != XA_SEEKMODE_ACCURATE)
{
/* seek mode unsupported */
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
@@ -99,9 +100,9 @@
DEBUG_API("<-XASeekItfImpl_SetPosition");
return XA_RESULT_FEATURE_UNSUPPORTED;
}
-
+
ret = XASeekItfAdaptMMF_SetPosition(impl->adapCtx, pos, seekMode);
- if(ret == XA_RESULT_SUCCESS)
+ if (ret == XA_RESULT_SUCCESS)
{
impl->playbackPosition = pos;
impl->seekMode = seekMode;
@@ -110,7 +111,9 @@
else
{
/* Get duration of the content */
- if(XAPlayItfAdaptGST_GetDuration((XAAdaptationGstCtx*)impl->adapCtx, &duration) != XA_RESULT_SUCCESS)
+ if (XAPlayItfAdaptGST_GetDuration(
+ (XAAdaptationGstCtx*) impl->adapCtx, &duration)
+ != XA_RESULT_SUCCESS)
{
/* invalid parameter */
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
@@ -118,7 +121,7 @@
DEBUG_API("<-XASeekItfImpl_SetPosition");
return XA_RESULT_PARAMETER_INVALID;
}
- if(pos > duration)
+ if (pos > duration)
{
/* invalid parameter */
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
@@ -126,8 +129,8 @@
DEBUG_API("<-XASeekItfImpl_SetPosition");
return XA_RESULT_PARAMETER_INVALID;
}
-
- if(seekMode != XA_SEEKMODE_FAST && seekMode != XA_SEEKMODE_ACCURATE)
+
+ if (seekMode != XA_SEEKMODE_FAST && seekMode != XA_SEEKMODE_ACCURATE)
{
/* seek mode unsupported */
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
@@ -135,20 +138,21 @@
DEBUG_API("<-XASeekItfImpl_SetPosition");
return XA_RESULT_FEATURE_UNSUPPORTED;
}
-
- ret = XASeekItfAdapt_SetPosition((XAAdaptationGstCtx*)impl->adapCtx, pos, seekMode);
- if(ret == XA_RESULT_SUCCESS)
+
+ ret = XASeekItfAdapt_SetPosition((XAAdaptationGstCtx*) impl->adapCtx,
+ pos, seekMode);
+ if (ret == XA_RESULT_SUCCESS)
{
impl->playbackPosition = pos;
impl->seekMode = seekMode;
}
-
+
}
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
DEBUG_API("<-XASeekItfImpl_SetPosition");
return ret;
-}
+ }
/**
* XAresult XASeekItfImpl_SetLoop(XASeekItf self, XAboolean loopEnable,
@@ -156,27 +160,29 @@
* Description: Enables or disables looping and sets the start and end points of looping.
**/
XAresult XASeekItfImpl_SetLoop(XASeekItf self, XAboolean loopEnable,
- XAmillisecond startPos, XAmillisecond endPos)
-{
+ XAmillisecond startPos, XAmillisecond endPos)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAmillisecond duration = 0;
XASeekItfImpl* impl = GetImpl(self);
DEBUG_API_A2("->XASeekItfImpl_SetLoop, startPos:%lu, endPos:%lu", startPos, endPos);
XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaPlayer );
- if(!impl || (startPos > endPos))
- {
+ if (!impl || (startPos > endPos))
+ {
/* invalid parameter */
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XASeekItfImpl_SetLoop");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
- if(impl->adapCtx->fwtype == FWMgrFWMMF)
+ if (impl->adapCtx->fwtype == FWMgrFWMMF)
{
/* Get duration of the content */
- if(XAPlayItfAdaptMMF_GetDuration((XAAdaptationBaseCtx*)impl->adapCtx, &duration) != XA_RESULT_SUCCESS)
+ if (XAPlayItfAdaptMMF_GetDuration(
+ (XAAdaptationBaseCtx*) impl->adapCtx, &duration)
+ != XA_RESULT_SUCCESS)
{
/* invalid parameter */
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
@@ -184,7 +190,7 @@
DEBUG_API("<-XASeekItfImpl_SetLoop");
return XA_RESULT_PARAMETER_INVALID;
}
- if(endPos > duration && endPos != XA_TIME_UNKNOWN)
+ if (endPos > duration && endPos != XA_TIME_UNKNOWN)
{
/* invalid parameter */
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
@@ -192,19 +198,22 @@
DEBUG_API("<-XASeekItfImpl_SetLoop");
return XA_RESULT_PARAMETER_INVALID;
}
-
- ret = XASeekItfAdaptMMF_SetLoop(impl->adapCtx, loopEnable, startPos, endPos);
- if(ret == XA_RESULT_SUCCESS)
+
+ ret = XASeekItfAdaptMMF_SetLoop(impl->adapCtx, loopEnable, startPos,
+ endPos);
+ if (ret == XA_RESULT_SUCCESS)
{
impl->loopEnable = loopEnable;
impl->startPos = startPos;
impl->endPos = endPos;
- }
+ }
}
else
{
/* Get duration of the content */
- if(XAPlayItfAdaptGST_GetDuration((XAAdaptationGstCtx*)impl->adapCtx, &duration) != XA_RESULT_SUCCESS)
+ if (XAPlayItfAdaptGST_GetDuration(
+ (XAAdaptationGstCtx*) impl->adapCtx, &duration)
+ != XA_RESULT_SUCCESS)
{
/* invalid parameter */
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
@@ -212,7 +221,7 @@
DEBUG_API("<-XASeekItfImpl_SetLoop");
return XA_RESULT_PARAMETER_INVALID;
}
- if(endPos > duration && endPos != XA_TIME_UNKNOWN)
+ if (endPos > duration && endPos != XA_TIME_UNKNOWN)
{
/* invalid parameter */
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
@@ -220,21 +229,22 @@
DEBUG_API("<-XASeekItfImpl_SetLoop");
return XA_RESULT_PARAMETER_INVALID;
}
-
- ret = XASeekItfAdapt_SetLoop((XAAdaptationGstCtx*)impl->adapCtx, loopEnable, startPos, endPos);
- if(ret == XA_RESULT_SUCCESS)
+
+ ret = XASeekItfAdapt_SetLoop((XAAdaptationGstCtx*) impl->adapCtx,
+ loopEnable, startPos, endPos);
+ if (ret == XA_RESULT_SUCCESS)
{
impl->loopEnable = loopEnable;
impl->startPos = startPos;
impl->endPos = endPos;
}
-
+
}
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
DEBUG_API("<-XASeekItfImpl_SetLoop");
return ret;
-}
+ }
/**
* XAresult XASeekItfImpl_GetLoop(XASeekItf self, XAboolean *pLoopEnabled,
@@ -243,21 +253,20 @@
* Description: Queries whether looping is enabled or disabled, and retrieves loop points.
**/
XAresult XASeekItfImpl_GetLoop(XASeekItf self, XAboolean *pLoopEnabled,
- XAmillisecond *pStartPos,
- XAmillisecond *pEndPos)
-{
+ XAmillisecond *pStartPos, XAmillisecond *pEndPos)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XASeekItfImpl* impl = GetImpl(self);
DEBUG_API("->XASeekItfImpl_GetLoop");
- if(!impl || !pLoopEnabled || !pStartPos || !pEndPos)
- {
+ if (!impl || !pLoopEnabled || !pStartPos || !pEndPos)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XASeekItfImpl_GetLoop");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pLoopEnabled = impl->loopEnable;
*pStartPos = impl->startPos;
@@ -265,7 +274,7 @@
DEBUG_API("<-XASeekItfImpl_GetLoop");
return ret;
-}
+ }
/**
* XASeekItfImpl -specific methods
@@ -275,13 +284,12 @@
* XASeekItfImpl* XASeekItfImpl_Create()
* Description: Allocate and initialize SeekItfImpl.
**/
-XASeekItfImpl* XASeekItfImpl_Create( XAMediaPlayerImpl* impl )
-{
- XASeekItfImpl *self = (XASeekItfImpl*)
- calloc(1,sizeof(XASeekItfImpl));
+XASeekItfImpl* XASeekItfImpl_Create(XAMediaPlayerImpl* impl)
+ {
+ XASeekItfImpl *self = (XASeekItfImpl*) calloc(1, sizeof(XASeekItfImpl));
DEBUG_API("->XASeekItfImpl_Create");
- if(self)
- {
+ if (self)
+ {
/* init itf default implementation */
self->itf.GetLoop = XASeekItfImpl_GetLoop;
self->itf.SetLoop = XASeekItfImpl_SetLoop;
@@ -297,19 +305,21 @@
self->adapCtx = impl->curAdaptCtx;
self->self = self;
+ }DEBUG_API("<-XASeekItfImpl_Create");
+ return self;
}
- DEBUG_API("<-XASeekItfImpl_Create");
- return self;
-}
/**
* void XASeekItfImpl_Free(XASeekItfImpl* self)
* Description: Free all resources reserved at XASeekItfImpl_Create.
**/
void XASeekItfImpl_Free(XASeekItfImpl* self)
-{
+ {
DEBUG_API("->XASeekItfImpl_Free");
assert(self==self->self);
- free(self);
+ if(self)
+ {
+ free(self);
+ }
DEBUG_API("<-XASeekItfImpl_Free");
-}
+ }
--- a/khronosfws/openmax_al/src/mediaplayer/xaseekitf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mediaplayer/xaseekitf.h Wed Jun 23 18:47:10 2010 +0300
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description: Seek Interface Header
*
*/
--- a/khronosfws/openmax_al/src/mediarecorder/xaaudioencoderitf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xaaudioencoderitf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
#include <assert.h>
#include "xamediarecorderadaptctxmmf.h"
@@ -28,17 +28,17 @@
* Description: Validate interface pointer and cast it to implementation pointer.
**/
static XAAudioEncoderItfImpl* GetImpl(XAAudioEncoderItf self)
-{
- if( self )
{
- XAAudioEncoderItfImpl* impl = (XAAudioEncoderItfImpl*)(*self);
- if( impl && (impl == impl->self) )
+ if (self)
{
+ XAAudioEncoderItfImpl* impl = (XAAudioEncoderItfImpl*) (*self);
+ if (impl && (impl == impl->self))
+ {
return impl;
+ }
}
+ return NULL;
}
- return NULL;
-}
/*****************************************************************************
* Base interface XAAudioEncoderItf implementation
@@ -50,8 +50,8 @@
* Description: Set audio encoder settings.
**/
XAresult XAAudioEncoderItfImpl_SetEncoderSettings(XAAudioEncoderItf self,
- XAAudioEncoderSettings *pSettings)
-{
+ XAAudioEncoderSettings *pSettings)
+ {
XAMediaRecorderAdaptationMMFCtx* mCtx;
XAresult ret = XA_RESULT_SUCCESS;
XAuint32 recState = XA_RECORDSTATE_STOPPED;
@@ -61,7 +61,7 @@
DEBUG_API("->XAAudioEncoderItfImpl_SetEncoderSettings");
XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaRecorder );
- if( !impl || !pSettings )
+ if (!impl || !pSettings)
{
/* invalid parameter */
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
@@ -70,11 +70,12 @@
return XA_RESULT_PARAMETER_INVALID;
}
- if(impl->adapCtx->fwtype == FWMgrFWMMF)
+ if (impl->adapCtx->fwtype == FWMgrFWMMF)
{
- mCtx = (XAMediaRecorderAdaptationMMFCtx*) impl->pObjImpl->adaptationCtx;
-
- if(mCtx->xaRecordState != recState)
+ mCtx
+ = (XAMediaRecorderAdaptationMMFCtx*) impl->pObjImpl->adaptationCtx;
+
+ if (mCtx->xaRecordState != recState)
{
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
@@ -83,56 +84,60 @@
}
XAAudioEncoderItfImpl_GetEncoderSettings(self, ¤tSettings);
- if(pSettings->encoderId == currentSettings.encoderId)
+ if (pSettings->encoderId == currentSettings.encoderId)
{
- if(pSettings->channelsIn != currentSettings.channelsIn)
+ if (pSettings->channelsIn != currentSettings.channelsIn)
{
- ret = mmf_set_destination_channels(mCtx->mmfContext, &(pSettings->channelsIn));
+ ret = mmf_set_destination_channels(mCtx->mmfContext,
+ &(pSettings->channelsIn));
}
-
- if(pSettings->channelsOut != currentSettings.channelsOut)
+
+ if (pSettings->channelsOut != currentSettings.channelsOut)
{
- ret = mmf_set_destination_channels(mCtx->mmfContext, &(pSettings->channelsOut));
- }
-
- if(pSettings->sampleRate != currentSettings.sampleRate)
- {
- ret = mmf_set_destination_samplerate(mCtx->mmfContext, &(pSettings->sampleRate));
+ ret = mmf_set_destination_channels(mCtx->mmfContext,
+ &(pSettings->channelsOut));
}
- if(pSettings->bitRate != currentSettings.bitRate)
+ if (pSettings->sampleRate != currentSettings.sampleRate)
{
- ret = mmf_set_destination_bitrate(mCtx->mmfContext, &(pSettings->bitRate));
+ ret = mmf_set_destination_samplerate(mCtx->mmfContext,
+ &(pSettings->sampleRate));
}
-
- if(pSettings->rateControl != currentSettings.rateControl)
+
+ if (pSettings->bitRate != currentSettings.bitRate)
+ {
+ ret = mmf_set_destination_bitrate(mCtx->mmfContext,
+ &(pSettings->bitRate));
+ }
+
+ if (pSettings->rateControl != currentSettings.rateControl)
{
ret = XA_RESULT_PARAMETER_INVALID;
}
- if(pSettings->channelMode != currentSettings.channelMode)
+ if (pSettings->channelMode != currentSettings.channelMode)
{
ret = XA_RESULT_PARAMETER_INVALID;
}
- if(pSettings->encodeOptions != currentSettings.encodeOptions)
+ if (pSettings->encodeOptions != currentSettings.encodeOptions)
+ {
+ ret = XA_RESULT_PARAMETER_INVALID;
+ }
+ if (pSettings->blockAlignment != currentSettings.blockAlignment)
{
ret = XA_RESULT_PARAMETER_INVALID;
}
- if(pSettings->blockAlignment != currentSettings.blockAlignment)
- {
- ret = XA_RESULT_PARAMETER_INVALID;
- }
- if(pSettings->bitsPerSample != currentSettings.bitsPerSample)
+ if (pSettings->bitsPerSample != currentSettings.bitsPerSample)
{
ret = XA_RESULT_PARAMETER_INVALID;
- }
- if(pSettings->profileSetting != currentSettings.profileSetting)
+ }
+ if (pSettings->profileSetting != currentSettings.profileSetting)
{
ret = XA_RESULT_PARAMETER_INVALID;
- }
- if(pSettings->levelSetting != currentSettings.levelSetting)
+ }
+ if (pSettings->levelSetting != currentSettings.levelSetting)
{
ret = XA_RESULT_PARAMETER_INVALID;
- }
+ }
}
else
{
@@ -142,16 +147,21 @@
else
{
XACapabilities temp;
-
- ret = XACapabilitiesMgr_GetCapsById(impl->pObjImpl->adaptationCtx->capslist, (XACapsType)(XACAP_ENCODER|XACAP_AUDIO), pSettings->encoderId, &temp);
- if( ret == XA_RESULT_SUCCESS )
+
+ ret = XACapabilitiesMgr_GetCapsById(
+ impl->pObjImpl->adaptationCtx->capslist,
+ (XACapsType) (XACAP_ENCODER | XACAP_AUDIO),
+ pSettings->encoderId, &temp);
+ if (ret == XA_RESULT_SUCCESS)
{
- ret = XARecordItfAdapt_GetRecordState( (XAAdaptationGstCtx*)impl->adapCtx, &recState );
- if( ret == XA_RESULT_SUCCESS )
+ ret = XARecordItfAdapt_GetRecordState(
+ (XAAdaptationGstCtx*) impl->adapCtx, &recState);
+ if (ret == XA_RESULT_SUCCESS)
{
- if( XA_RECORDSTATE_STOPPED == recState )
+ if (XA_RECORDSTATE_STOPPED == recState)
{
- ret = XAAudioEncoderItfAdapt_SetEncoderSettings( impl->adapCtx, pSettings);
+ ret = XAAudioEncoderItfAdapt_SetEncoderSettings(
+ impl->adapCtx, pSettings);
}
else
{
@@ -167,12 +177,12 @@
DEBUG_API("<-XAAudioEncoderItfImpl_SetEncoderSettings");
return XA_RESULT_FEATURE_UNSUPPORTED;
}
- }
-
+ }
+
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
DEBUG_API("<-XAAudioEncoderItfImpl_SetEncoderSettings");
return ret;
-}
+ }
/**
* XAresult XAAudioEncoderItfImpl_GetEncoderSettings(XAAudioEncoderItf self,
@@ -180,8 +190,8 @@
* Description: Get audio encoder settings.
**/
XAresult XAAudioEncoderItfImpl_GetEncoderSettings(XAAudioEncoderItf self,
- XAAudioEncoderSettings *pSettings)
-{
+ XAAudioEncoderSettings *pSettings)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAuint32 encoderId;
XAuint32 channelsIn;
@@ -189,26 +199,24 @@
XAmilliHertz sampleRate;
XAuint32 bitRate;
XAMediaRecorderAdaptationMMFCtx* mCtx;
-
+
XAAudioEncoderItfImpl *impl = GetImpl(self);
-
+
DEBUG_API("->XAAudioEncoderItfImpl_GetEncoderSettings");
- if(!impl || !pSettings )
- {
+ if (!impl || !pSettings)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
mCtx = (XAMediaRecorderAdaptationMMFCtx*) (impl->pObjImpl->adaptationCtx);
-
-
- if(impl->adapCtx->fwtype == FWMgrFWMMF)
+ if (impl->adapCtx->fwtype == FWMgrFWMMF)
{
mmf_get_codec_id(mCtx->mmfContext, &encoderId);
-
- switch(encoderId)
+
+ switch (encoderId)
{
case 0x36315020:
pSettings->encoderId = XA_AUDIOCODEC_PCM;
@@ -232,9 +240,9 @@
pSettings->streamFormat = XA_AUDIOSTREAMFORMAT_RAW;
break;
}
-
+
mmf_get_channels(mCtx->mmfContext, &channelsIn);
- pSettings->channelsIn = channelsIn;
+ pSettings->channelsIn = channelsIn;
mmf_get_channels(mCtx->mmfContext, &channelsOut);
pSettings->channelsOut = channelsOut;
mmf_get_samplerate(mCtx->mmfContext, &sampleRate);
@@ -248,11 +256,11 @@
}
else
{
- ret = XAAudioEncoderItfAdapt_GetEncoderSettings(impl->adapCtx, pSettings);
- }
- DEBUG_API("<-XAAudioEncoderItfImpl_GetEncoderSettings");
+ ret = XAAudioEncoderItfAdapt_GetEncoderSettings(impl->adapCtx,
+ pSettings);
+ }DEBUG_API("<-XAAudioEncoderItfImpl_GetEncoderSettings");
return ret;
-}
+ }
/*****************************************************************************
* XAAudioEncoderItfImpl -specific methods
@@ -261,39 +269,43 @@
/* XAAudioEncoderItfImpl* XAAudioEncoderItfImpl_Create()
* Description: Allocate and initialize XAAudioEncoderItfImpl
*/
-XAAudioEncoderItfImpl* XAAudioEncoderItfImpl_Create( XAMediaRecorderImpl* impl )
-{
- XAAudioEncoderItfImpl* self = (XAAudioEncoderItfImpl*)
- calloc(1,sizeof(XAAudioEncoderItfImpl));
+XAAudioEncoderItfImpl* XAAudioEncoderItfImpl_Create(XAMediaRecorderImpl* impl)
+ {
+ XAAudioEncoderItfImpl* self = (XAAudioEncoderItfImpl*) calloc(1,
+ sizeof(XAAudioEncoderItfImpl));
//XAMediaRecorderAdaptationCtx* mCtx = (XAMediaRecorderAdaptationCtx*)(impl->adaptationCtx);
-
+
DEBUG_API("->XAAudioEncoderItfImpl_Create");
- if( self )
- {
+ if (self)
+ {
//if(mCtx->fwtype == FWMgrFWMMF)
{
/* init itf default implementation */
- self->itf.GetEncoderSettings = XAAudioEncoderItfImpl_GetEncoderSettings;
- self->itf.SetEncoderSettings = XAAudioEncoderItfImpl_SetEncoderSettings;
+ self->itf.GetEncoderSettings
+ = XAAudioEncoderItfImpl_GetEncoderSettings;
+ self->itf.SetEncoderSettings
+ = XAAudioEncoderItfImpl_SetEncoderSettings;
}
-
+
self->pObjImpl = impl;
/* init variables */
self->adapCtx = impl->adaptationCtx;
self->self = self;
+ }DEBUG_API("<-XAAudioEncoderItfImpl_Create");
+ return self;
}
- DEBUG_API("<-XAAudioEncoderItfImpl_Create");
- return self;
-}
/* void XAAudioEncoderItfImpl_Free(XAAudioEncoderItfImpl* self)
* Description: Free all resources reserved at XAAudioEncoderItfImpl_Create
*/
void XAAudioEncoderItfImpl_Free(XAAudioEncoderItfImpl* self)
-{
+ {
DEBUG_API("->XAAudioEncoderItfImpl_Free");
assert( self==self->self );
- free( self );
+ if(self)
+ {
+ free(self);
+ }
DEBUG_API("<-XAAudioEncoderItfImpl_Free");
-}
+ }
--- a/khronosfws/openmax_al/src/mediarecorder/xaaudioencoderitf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xaaudioencoderitf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: AudioEncoder Itf Header
+ *
+ */
#ifndef XAAUDIOENCODERITF_H
#define XAAUDIOENCODERITF_H
@@ -29,32 +29,33 @@
/** STRUCTURES **/
/* Definition of XAAudioEncoderItf implementation */
typedef struct XAAudioEncoderItfImpl_
-{
+ {
/* parent interface */
struct XAAudioEncoderItf_ itf;
/* pointer to self */
struct XAAudioEncoderItfImpl_* self;
-
+
XAMediaRecorderImpl* pObjImpl;
-
+
/* variables */
- XAAdaptationBaseCtx *adapCtx;
+ XAAdaptationBaseCtx *adapCtx;
-} XAAudioEncoderItfImpl;
+ } XAAudioEncoderItfImpl;
/** METHODS **/
/* Base interface XAAudioEncoderItf implementation
* See API Specification for method documentation
*/
-XAresult XAAudioEncoderItfImpl_SetEncoderSettings( XAAudioEncoderItf self,
- XAAudioEncoderSettings *pSettings );
+XAresult XAAudioEncoderItfImpl_SetEncoderSettings(XAAudioEncoderItf self,
+ XAAudioEncoderSettings *pSettings);
-XAresult XAAudioEncoderItfImpl_GetEncoderSettings( XAAudioEncoderItf self,
- XAAudioEncoderSettings *pSettings );
+XAresult XAAudioEncoderItfImpl_GetEncoderSettings(XAAudioEncoderItf self,
+ XAAudioEncoderSettings *pSettings);
/* XAAudioEncoderItfImpl -specific methods */
-XAAudioEncoderItfImpl* XAAudioEncoderItfImpl_Create( XAMediaRecorderImpl* impl );
-void XAAudioEncoderItfImpl_Free( XAAudioEncoderItfImpl* self );
+XAAudioEncoderItfImpl
+ * XAAudioEncoderItfImpl_Create(XAMediaRecorderImpl* impl);
+void XAAudioEncoderItfImpl_Free(XAAudioEncoderItfImpl* self);
#endif /* XAAUDIOENCODERITF_H */
--- a/khronosfws/openmax_al/src/mediarecorder/xaimageencoderitf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xaimageencoderitf.c Wed Jun 23 18:47:10 2010 +0300
@@ -74,7 +74,9 @@
res = XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_ENCODER|XACAP_IMAGE), pSettings->encoderId, &temp);
if( res == XA_RESULT_SUCCESS )
{
+#ifdef OMAX_CAMERABIN
res = XAImageEncoderItfAdapt_SetImageSettings((XAAdaptationGstCtx*)impl->adaptCtx, pSettings);
+#endif
}
else
{
@@ -108,7 +110,9 @@
}
if(impl->adaptCtx->fwtype == FWMgrFWGST)
{
+#ifdef OMAX_CAMERABIN
res = XAImageEncoderItfAdapt_GetImageSettings((XAAdaptationGstCtx*)impl->adaptCtx, pSettings);
+#endif
}
else
{
@@ -144,7 +148,9 @@
if(impl->adaptCtx->fwtype == FWMgrFWGST)
{
+#ifdef OMAX_CAMERABIN
XAImageEncoderItfAdapt_GetImageSettings((XAAdaptationGstCtx*)impl->adaptCtx, &curSettings);
+#endif
}
else
{
--- a/khronosfws/openmax_al/src/mediarecorder/xamediarecorder.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xamediarecorder.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: MediaRecoder Object Impl
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
@@ -40,25 +40,25 @@
#include "xamediarecorderadaptctxmmf.h"
#include "xamediarecorderadaptctx.h"
/* Static mapping of enumeration XAMediaRecorderInterfaces to interface iids */
-static const XAInterfaceID* xaMediaRecorderItfIIDs[MR_ITFCOUNT]=
-{
- &XA_IID_OBJECT,
- &XA_IID_AUDIOENCODER,
- &XA_IID_CONFIGEXTENSION,
- &XA_IID_DYNAMICINTERFACEMANAGEMENT,
- &XA_IID_EQUALIZER,
- &XA_IID_IMAGECONTROLS,
- &XA_IID_IMAGEEFFECTS,
- &XA_IID_IMAGEENCODER,
- &XA_IID_METADATAINSERTION,
- &XA_IID_RECORD,
- &XA_IID_SNAPSHOT,
- &XA_IID_VIDEOENCODER,
- &XA_IID_VIDEOPOSTPROCESSING,
- &XA_IID_VOLUME,
- &XA_IID_METADATAEXTRACTION,
- &XA_IID_METADATATRAVERSAL
-};
+static const XAInterfaceID* xaMediaRecorderItfIIDs[MR_ITFCOUNT] =
+ {
+ &XA_IID_OBJECT,
+ &XA_IID_AUDIOENCODER,
+ &XA_IID_CONFIGEXTENSION,
+ &XA_IID_DYNAMICINTERFACEMANAGEMENT,
+ &XA_IID_EQUALIZER,
+ &XA_IID_IMAGECONTROLS,
+ &XA_IID_IMAGEEFFECTS,
+ &XA_IID_IMAGEENCODER,
+ &XA_IID_METADATAINSERTION,
+ &XA_IID_RECORD,
+ &XA_IID_SNAPSHOT,
+ &XA_IID_VIDEOENCODER,
+ &XA_IID_VIDEOPOSTPROCESSING,
+ &XA_IID_VOLUME,
+ &XA_IID_METADATAEXTRACTION,
+ &XA_IID_METADATATRAVERSAL
+ };
/* Global methods */
@@ -66,230 +66,222 @@
* Create object
*/
XAresult XAMediaRecorderImpl_CreateMediaRecorder(FrameworkMap* mapper,
- XACapabilities* capabilities,
- XAObjectItf* pRecorder,
- XADataSource* pAudioSrc,
- XADataSource* pImageVideoSrc,
- XADataSink* pDataSnk,
- XAuint32 numInterfaces,
- const XAInterfaceID *pInterfaceIds,
- const XAboolean *pInterfaceRequired)
-{
+ XACapabilities* capabilities, XAObjectItf* pRecorder,
+ XADataSource* pAudioSrc, XADataSource* pImageVideoSrc,
+ XADataSink* pDataSnk, XAuint32 numInterfaces,
+ const XAInterfaceID *pInterfaceIds,
+ const XAboolean *pInterfaceRequired)
+ {
XAMediaRecorderImpl* pImpl = NULL;
XAObjectItfImpl* pBaseObj = NULL;
FWMgrFwType fwType;
XAuint8 itfIdx;
XAMediaType mediaType = XA_MEDIATYPE_UNKNOWN;
- XAresult ret=XA_RESULT_SUCCESS;
+ XAresult ret = XA_RESULT_SUCCESS;
const char *uri = NULL;
-
+
DEBUG_API("->XAMediaRecorderImpl_CreateMediaRecorder");
XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaRecorder );
- if( !pRecorder )
- {
+ if (!pRecorder)
+ {
/* invalid parameter */
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAMediaRecorderImpl_CreateMediaRecorder");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
/* check sink&source parameters */
- ret = XACommon_ValidateDataLocator(3, pAudioSrc, pImageVideoSrc, pDataSnk);
- if(ret!=XA_RESULT_SUCCESS)
- {
+ ret
+ = XACommon_ValidateDataLocator(3, pAudioSrc, pImageVideoSrc,
+ pDataSnk);
+ if (ret != XA_RESULT_SUCCESS)
+ {
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
DEBUG_API("<-XAMediaRecorderImpl_CreateMediaRecorder");
return ret;
- }
+ }
/* instantiate object implementation */
- pImpl = (XAMediaRecorderImpl*)calloc(1,sizeof(XAMediaRecorderImpl));
- if( !pImpl )
- {
+ pImpl = (XAMediaRecorderImpl*) calloc(1, sizeof(XAMediaRecorderImpl));
+ if (!pImpl)
+ {
/* memory allocation failed */
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
DEBUG_API("<-XAMediaRecorderImpl_CreateMediaRecorder");
return XA_RESULT_MEMORY_FAILURE;
- }
+ }
pBaseObj = &pImpl->baseObj;
/* Initialize base object default implementation */
- XAObjectItfImpl_Init(pBaseObj,
- MR_ITFCOUNT,
- xaMediaRecorderItfIIDs,
- XAMediaRecorderImpl_DoRealize,
- XAMediaRecorderImpl_DoResume,
- XAMediaRecorderImpl_FreeResources);
+ XAObjectItfImpl_Init(pBaseObj, MR_ITFCOUNT, xaMediaRecorderItfIIDs,
+ XAMediaRecorderImpl_DoRealize, XAMediaRecorderImpl_DoResume,
+ XAMediaRecorderImpl_FreeResources);
/* Mark interfaces that need to be exposed */
/* Implicit and mandated interfaces */
pBaseObj->interfaceMap[MR_RECORDITF].required = XA_BOOLEAN_TRUE;
- if(pAudioSrc && mediaType!=XA_MEDIATYPE_IMAGE)
- {
+ if (pAudioSrc && mediaType != XA_MEDIATYPE_IMAGE)
+ {
pBaseObj->interfaceMap[MR_AUDIOENCODERITF].required = XA_BOOLEAN_TRUE;
- }
- if(pImageVideoSrc && mediaType!=XA_MEDIATYPE_AUDIO)
- {
+ }
+ if (pImageVideoSrc && mediaType != XA_MEDIATYPE_AUDIO)
+ {
pBaseObj->interfaceMap[MR_VIDEOENCODER].required = XA_BOOLEAN_TRUE;
pBaseObj->interfaceMap[MR_IMAGEENCODERITF].required = XA_BOOLEAN_TRUE;
pBaseObj->interfaceMap[MR_SNAPSHOTITF].required = XA_BOOLEAN_TRUE;
- }
+ }
pBaseObj->interfaceMap[MR_DIMITF].required = XA_BOOLEAN_TRUE;
/* Explicit interfaces */
- if((numInterfaces != 0) && pInterfaceIds && pInterfaceRequired)
- {
- /* check only sink media type, do not care about return value (availability) */
- XACommon_CheckDataSource((XADataSource*)pDataSnk,&mediaType);
- /* Check required interfaces */
- for( itfIdx = 0; itfIdx < numInterfaces; itfIdx++)
+ if ((numInterfaces != 0) && pInterfaceIds && pInterfaceRequired)
{
+ /* check only sink media type, do not care about return value (availability) */
+ XACommon_CheckDataSource((XADataSource*) pDataSnk, &mediaType);
+ /* Check required interfaces */
+ for (itfIdx = 0; itfIdx < numInterfaces; itfIdx++)
+ {
/* If mapEntry is null then required interface is not supported.*/
- XAObjItfMapEntry *entry =
- XAObjectItfImpl_GetItfEntry((XAObjectItf)&(pBaseObj), pInterfaceIds[itfIdx]);
- if( !entry )
- {
- if( pInterfaceRequired[itfIdx] )
+ XAObjItfMapEntry *entry = XAObjectItfImpl_GetItfEntry(
+ (XAObjectItf) &(pBaseObj), pInterfaceIds[itfIdx]);
+ if (!entry)
{
+ if (pInterfaceRequired[itfIdx])
+ {
/* required interface cannot be accommodated - fail creation */
DEBUG_ERR("Required interface not found - abort creation!");
ret = XA_RESULT_FEATURE_UNSUPPORTED;
break;
- }
+ }
else
- {
+ {
DEBUG_INFO("Requested (not required) interface not found - continue creation");
+ }
}
- }
else
- { /* weed out unsupported content-aware itf's */
- if( ( (mediaType==XA_MEDIATYPE_IMAGE || !pAudioSrc) &&
- (entry->mapIdx==MR_EQUALIZERITF ||
- entry->mapIdx==MR_VOLUMEITF ||
- entry->mapIdx==MR_AUDIOENCODERITF))
- ||
- ( (mediaType==XA_MEDIATYPE_AUDIO || !pImageVideoSrc) &&
- (entry->mapIdx==MR_IMAGECONTROLSITF ||
- entry->mapIdx==MR_IMAGEEFFECTSITF ||
- entry->mapIdx==MR_VIDEOPOSTPROCESSINGITF ||
- entry->mapIdx==MR_VIDEOENCODER ||
- entry->mapIdx==MR_IMAGEENCODERITF ||
- entry->mapIdx==MR_SNAPSHOTITF)) )
- {
+ { /* weed out unsupported content-aware itf's */
+ if (((mediaType == XA_MEDIATYPE_IMAGE || !pAudioSrc)
+ && (entry->mapIdx == MR_EQUALIZERITF || entry->mapIdx
+ == MR_VOLUMEITF || entry->mapIdx
+ == MR_AUDIOENCODERITF)) || ((mediaType
+ == XA_MEDIATYPE_AUDIO || !pImageVideoSrc)
+ && (entry->mapIdx == MR_IMAGECONTROLSITF
+ || entry->mapIdx == MR_IMAGEEFFECTSITF
+ || entry->mapIdx == MR_VIDEOPOSTPROCESSINGITF
+ || entry->mapIdx == MR_VIDEOENCODER
+ || entry->mapIdx == MR_IMAGEENCODERITF
+ || entry->mapIdx == MR_SNAPSHOTITF)))
+ {
entry->required = XA_BOOLEAN_FALSE;
- if( pInterfaceRequired[itfIdx] )
- {
+ if (pInterfaceRequired[itfIdx])
+ {
DEBUG_ERR("Required interface not supported for given media - abort creation!");
ret = XA_RESULT_FEATURE_UNSUPPORTED;
break;
+ }
}
- }
else
- {
+ {
entry->required = XA_BOOLEAN_TRUE;
- }
+ }
- if(entry->mapIdx==MR_SNAPSHOTITF)
- {
+ if (entry->mapIdx == MR_SNAPSHOTITF)
+ {
DEBUG_ERR("SnapshotItf requested - support still mode");
pImpl->recModes |= XA_RECMODE_STILL;
- }
- if(entry->mapIdx==MR_RECORDITF)
- {
+ }
+ if (entry->mapIdx == MR_RECORDITF)
+ {
DEBUG_ERR("RecordItf requested - support stream mode");
pImpl->recModes |= XA_RECMODE_STREAM;
+ }
}
}
}
- }
- if( pImpl->recModes ==0 )
- {
+ if (pImpl->recModes == 0)
+ {
DEBUG_ERR("Warning!!! No recording interfaces requested - unable to record!!");
- }
+ }
/*check sink and src parameters*/
- if(ret==XA_RESULT_SUCCESS)
- {
- ret = XACommon_ValidateDataLocator(3, pDataSnk, pAudioSrc, pImageVideoSrc);
+ if (ret == XA_RESULT_SUCCESS)
+ {
+ ret = XACommon_ValidateDataLocator(3, pDataSnk, pAudioSrc,
+ pImageVideoSrc);
/*datasink ignored if only snapshotitf is used*/
- if(!pDataSnk && (pImpl->recModes & XA_RECMODE_STREAM))
- {
+ if (!pDataSnk && (pImpl->recModes & XA_RECMODE_STREAM))
+ {
DEBUG_ERR("No datasink to record to!");
ret = XA_RESULT_PARAMETER_INVALID;
- }
- if(!pAudioSrc && !pImageVideoSrc)
- {
+ }
+ if (!pAudioSrc && !pImageVideoSrc)
+ {
DEBUG_ERR("No data sources set!");
ret = XA_RESULT_PARAMETER_INVALID;
+ }
}
- }
- if(ret!=XA_RESULT_SUCCESS)
- { /* creation fails */
- XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
+ if (ret != XA_RESULT_SUCCESS)
+ { /* creation fails */
+ XAObjectItfImpl_Destroy((XAObjectItf) &(pBaseObj));
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
DEBUG_API("<-XAMediaRecorderImpl_CreateMediaRecorder");
return ret;
- }
+ }
/* Mark interfaces that can be handled dynamically */
/* Mandated dynamic itfs */
- pBaseObj->interfaceMap[MR_METADATAINSERTIONITF].isDynamic = XA_BOOLEAN_TRUE;
+ pBaseObj->interfaceMap[MR_METADATAINSERTIONITF].isDynamic
+ = XA_BOOLEAN_TRUE;
pBaseObj->interfaceMap[MR_EQUALIZERITF].isDynamic = XA_BOOLEAN_TRUE;
pBaseObj->interfaceMap[MR_IMAGEEFFECTSITF].isDynamic = XA_BOOLEAN_TRUE;
-
/* Initialize XAMediaRecorderImpl variables */
pImpl->audioSrc = pAudioSrc;
pImpl->dataSnk = pDataSnk;
pImpl->imageVideoSrc = pImageVideoSrc;
/* Determine framework type that can handle recording */
- fwType = (FWMgrFwType)FWMgrMOUnknown;
+ fwType = (FWMgrFwType) FWMgrMOUnknown;
/**/
if (pDataSnk->pLocator)
- {
- XADataLocator_URI* dataLoc = (XADataLocator_URI*)pDataSnk->pLocator;
+ {
+ XADataLocator_URI* dataLoc = (XADataLocator_URI*) pDataSnk->pLocator;
if (dataLoc->locatorType == XA_DATALOCATOR_URI)
{
- uri = (char*)dataLoc->URI;
+ uri = (char*) dataLoc->URI;
}
- }
- fwType = XAFrameworkMgr_GetFramework(
- mapper,
- uri,
- FWMgrMORecorder);
+ }
+ fwType = XAFrameworkMgr_GetFramework(mapper, uri, FWMgrMORecorder);
if (fwType == FWMgrMOUnknown)
{
ret = XA_RESULT_CONTENT_UNSUPPORTED;
- XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
+ XAObjectItfImpl_Destroy((XAObjectItf) &(pBaseObj));
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
DEBUG_API("<-XAMediaRecorderImpl_CreateMediaRecorder");
return ret;
}
-
+
/* Set ObjectItf to point to newly created object */
- *pRecorder = (XAObjectItf)&(pBaseObj->self);
-
- if(fwType == FWMgrFWMMF)
- {
-
- pImpl->adaptationCtx = XAMediaRecorderAdaptMMF_Create(pImpl->audioSrc,
- pImpl->imageVideoSrc, pImpl->dataSnk, pImpl->recModes);
- }
+ *pRecorder = (XAObjectItf) &(pBaseObj->self);
+
+ if (fwType == FWMgrFWMMF)
+ {
+
+ pImpl->adaptationCtx = XAMediaRecorderAdaptMMF_Create(
+ pImpl->audioSrc, pImpl->imageVideoSrc, pImpl->dataSnk,
+ pImpl->recModes);
+ }
else
- {
+ {
pImpl->adaptationCtx = XAMediaRecorderAdapt_Create(pImpl->audioSrc,
- pImpl->imageVideoSrc,
- pImpl->dataSnk,
- pImpl->recModes);
- }
+ pImpl->imageVideoSrc, pImpl->dataSnk, pImpl->recModes);
+ }
- if(pImpl->adaptationCtx)
+ if (pImpl->adaptationCtx)
{
pImpl->adaptationCtx->capslist = capabilities;
pImpl->adaptationCtx->fwtype = fwType;
@@ -297,56 +289,57 @@
else
{
ret = XA_RESULT_MEMORY_FAILURE;
- XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
+ XAObjectItfImpl_Destroy((XAObjectItf) &(pBaseObj));
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
DEBUG_API("<-XAMediaRecorderImpl_CreateMediaRecorder");
return ret;
}
-
+
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
DEBUG_API("<-XAMediaRecorderImpl_CreateMediaRecorder");
return XA_RESULT_SUCCESS;
-}
+ }
/* XAResult XAMediaRecorderImpl_QueryNumSupportedInterfaces
* Statically query supported interfaces
*/
-XAresult XAMediaRecorderImpl_QueryNumSupportedInterfaces(XAuint32 *pNumSupportedInterfaces)
-{
+XAresult XAMediaRecorderImpl_QueryNumSupportedInterfaces(
+ XAuint32 *pNumSupportedInterfaces)
+ {
DEBUG_API("->XAMediaRecorderImpl_QueryNumSupportedInterfaces");
- if( pNumSupportedInterfaces )
- {
+ if (pNumSupportedInterfaces)
+ {
*pNumSupportedInterfaces = MR_ITFCOUNT;
DEBUG_API("<-XAMediaRecorderImpl_QueryNumSupportedInterfaces");
return XA_RESULT_SUCCESS;
- }
+ }
else
- {
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
return XA_RESULT_PARAMETER_INVALID;
+ }
}
-}
/* XAResult XAMediaRecorderImpl_QuerySupportedInterfaces
* Statically query supported interfaces
*/
XAresult XAMediaRecorderImpl_QuerySupportedInterfaces(XAuint32 index,
- XAInterfaceID *pInterfaceId)
-{
+ XAInterfaceID *pInterfaceId)
+ {
DEBUG_API("->XAMediaRecorderImpl_QuerySupportedInterfaces");
- if( index >= MR_ITFCOUNT || !pInterfaceId )
- {
+ if (index >= MR_ITFCOUNT || !pInterfaceId)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
else
- {
+ {
*pInterfaceId = *(xaMediaRecorderItfIIDs[index]);
DEBUG_API("<-XAMediaRecorderImpl_QuerySupportedInterfaces");
return XA_RESULT_SUCCESS;
+ }
}
-}
/*****************************************************************************
* base object XAObjectItfImpl methods
@@ -357,161 +350,169 @@
* Create and initialize implementation-specific variables.
* Called from base object XAObjectItfImpl
*/
-XAresult XAMediaRecorderImpl_DoRealize( XAObjectItf self )
-{
+XAresult XAMediaRecorderImpl_DoRealize(XAObjectItf self)
+ {
XAuint8 itfIdx;
- XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
- XAMediaRecorderImpl* pObjImpl = (XAMediaRecorderImpl*)(pObj);
+ XAObjectItfImpl* pObj = (XAObjectItfImpl*) (*self);
+ XAMediaRecorderImpl* pObjImpl = (XAMediaRecorderImpl*) (pObj);
XAresult ret = XA_RESULT_SUCCESS;
-
DEBUG_API("->XAMediaRecorderImpl_DoRealize");
XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaRecorder );
/* check casting from correct pointer type */
- if( !pObjImpl || pObj != pObjImpl->baseObj.self )
- {
+ if (!pObjImpl || pObj != pObjImpl->baseObj.self)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
/* invalid parameter */
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
/* init adaptation */
- if(pObjImpl->adaptationCtx->fwtype == FWMgrFWMMF)
- {
- ret = XAMediaRecorderAdaptMMF_PostInit( (XAAdaptationMMFCtx*)pObjImpl->adaptationCtx );
- }
+ if (pObjImpl->adaptationCtx->fwtype == FWMgrFWMMF)
+ {
+ ret = XAMediaRecorderAdaptMMF_PostInit(
+ (XAAdaptationMMFCtx*) pObjImpl->adaptationCtx);
+ }
else
- {
- ret = XAMediaRecorderAdapt_PostInit( (XAAdaptationGstCtx*)pObjImpl->adaptationCtx );
- }
+ {
+ ret = XAMediaRecorderAdapt_PostInit(
+ (XAAdaptationGstCtx*) pObjImpl->adaptationCtx);
+ }
- if( ret != XA_RESULT_SUCCESS )
- {
+ if (ret != XA_RESULT_SUCCESS)
+ {
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
return ret;
- }
+ }
/* Realize all implicit and explicitly wanted interfaces */
- for( itfIdx = 0; itfIdx < MR_ITFCOUNT; itfIdx++ )
- {
- if( !(pObj->interfaceMap[itfIdx].pItf) &&
- pObj->interfaceMap[itfIdx].required )
+ for (itfIdx = 0; itfIdx < MR_ITFCOUNT; itfIdx++)
{
+ if (!(pObj->interfaceMap[itfIdx].pItf)
+ && pObj->interfaceMap[itfIdx].required)
+ {
void *pItf = NULL;
- switch( itfIdx )
- {
+ switch (itfIdx)
+ {
case MR_DIMITF:
pItf = XADIMItfImpl_Create();
- if(pItf)
- {
+ if (pItf)
+ {
XADIMItfImpl_Init(pItf, self,
XAMediaRecorderImpl_DoAddItf,
XAMediaRecorderImpl_DoResumeItf,
XAMediaRecorderImpl_DoRemoveItf);
- }
+ }
break;
case MR_RECORDITF:
- pItf = XARecordItfImpl_Create( pObjImpl );
+ pItf = XARecordItfImpl_Create(pObjImpl);
break;
case MR_AUDIOENCODERITF:
pItf = XAAudioEncoderItfImpl_Create(pObjImpl);
break;
- case MR_SNAPSHOTITF:
+#ifdef OMAX_CAMERABIN
+ case MR_SNAPSHOTITF:
pItf = XASnapshotItfImpl_Create(pObjImpl);
break;
- case MR_VIDEOENCODER:
+ case MR_VIDEOENCODER:
pItf = XAVideoEncoderItfImpl_Create(pObjImpl);
- break;
- case MR_IMAGEENCODERITF:
+ break;
+ case MR_IMAGEENCODERITF:
pItf = XAImageEncoderItfImpl_Create(pObjImpl);
- break;
+ break;
+#endif
case MR_METADATAINSERTIONITF:
pItf = XAMetadataInsertionItfImpl_Create(pObjImpl);
- break;
+ break;
- case MR_CONFIGEXTENSIONITF:
+ case MR_CONFIGEXTENSIONITF:
pItf = XAConfigExtensionsItfImpl_Create();
- XAConfigExtensionsItfImpl_SetContext( pItf, pObjImpl->adaptationCtx);
+ XAConfigExtensionsItfImpl_SetContext(pItf,
+ pObjImpl->adaptationCtx);
break;
case MR_EQUALIZERITF:
- pItf = XAEqualizerItfImpl_Create( pObjImpl->adaptationCtx );
+ pItf = XAEqualizerItfImpl_Create(pObjImpl->adaptationCtx);
break;
- case MR_IMAGECONTROLSITF:
+#ifdef OMAX_CAMERABIN
+ case MR_IMAGECONTROLSITF:
pItf = XAImageControlsItfImpl_Create( pObjImpl->adaptationCtx );
break;
- case MR_IMAGEEFFECTSITF:
+ case MR_IMAGEEFFECTSITF:
pItf = XAImageEffectsItfImpl_Create( pObjImpl->adaptationCtx );
break;
- case MR_VIDEOPOSTPROCESSINGITF:
+ case MR_VIDEOPOSTPROCESSINGITF:
pItf = XAVideoPostProcessingItfImpl_Create( pObjImpl->adaptationCtx );
break;
+#endif
case MR_VOLUMEITF:
- pItf = XAVolumeItfImpl_Create( pObjImpl->adaptationCtx );
+ pItf = XAVolumeItfImpl_Create(pObjImpl->adaptationCtx);
break;
case MR_METADATAEXTRACTIONITF:
- pItf = XAMetadataExtractionItfImpl_Create( pObjImpl->adaptationCtx );
+ pItf = XAMetadataExtractionItfImpl_Create(
+ pObjImpl->adaptationCtx);
break;
case MR_METADATATRAVERSALITF:
- pItf = XAMetadataTraversalItfImpl_Create( pObjImpl->adaptationCtx );
+ pItf = XAMetadataTraversalItfImpl_Create(
+ pObjImpl->adaptationCtx);
break;
-
+
default:
break;
- }
- if( !pItf )
- {
+ }
+ if (!pItf)
+ {
DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
/* memory allocation failed */
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
return XA_RESULT_MEMORY_FAILURE;
- }
+ }
else
- {
+ {
pObj->interfaceMap[itfIdx].pItf = pItf;
+ }
}
}
- }
pObj->state = XA_OBJECT_STATE_REALIZED;
DEBUG_API("<-XAMediaRecorderImpl_DoRealize");
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
return XA_RESULT_SUCCESS;
-}
+ }
/* XAresult XAMediaRecorderImpl_DoResume
* Description: Resume object from suspended state
*/
XAresult XAMediaRecorderImpl_DoResume(XAObjectItf self)
-{
+ {
DEBUG_API("->XAMediaRecorderImpl_DoResume");
DEBUG_API("<-XAMediaRecorderImpl_DoResume");
/* This implementation does not support suspended state */
return XA_RESULT_PRECONDITIONS_VIOLATED;
-}
+ }
/* void XAMediaRecorderImpl_FreeResources
* Description: Free all resources reserved at XAMediaRecorderImpl_DoRealize()
*/
void XAMediaRecorderImpl_FreeResources(XAObjectItf self)
-{
- XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
- XAMediaRecorderImpl* pObjImpl = (XAMediaRecorderImpl*)(pObj);
+ {
+ XAObjectItfImpl* pObj = (XAObjectItfImpl*) (*self);
+ XAMediaRecorderImpl* pObjImpl = (XAMediaRecorderImpl*) (pObj);
XAuint8 itfIdx;
- XAMediaRecorderImpl* pImpl = (XAMediaRecorderImpl*)(*self);
+ XAMediaRecorderImpl* pImpl = (XAMediaRecorderImpl*) (*self);
DEBUG_API("->XAMediaRecorderImpl_FreeResources");
XA_IMPL_THREAD_SAFETY_ENTRY_FOR_VOID_FUNCTIONS( XATSMediaRecorder );
assert( pObj && pImpl && pObj == pObj->self );
/* free all allocated interfaces */
- for(itfIdx = 0; itfIdx < MR_ITFCOUNT; itfIdx++)
- {
+ for (itfIdx = 0; itfIdx < MR_ITFCOUNT; itfIdx++)
+ {
void *pItf = pObj->interfaceMap[itfIdx].pItf;
- if(pItf)
- {
- switch(itfIdx)
+ if (pItf)
{
+ switch (itfIdx)
+ {
case MR_AUDIOENCODERITF:
XAAudioEncoderItfImpl_Free(pItf);
break;
@@ -524,30 +525,34 @@
case MR_EQUALIZERITF:
XAEqualizerItfImpl_Free(pItf);
break;
- case MR_IMAGECONTROLSITF:
+#ifdef OMAX_CAMERABIN
+ case MR_IMAGECONTROLSITF:
XAImageControlsItfImpl_Free(pItf);
break;
- case MR_IMAGEEFFECTSITF:
+ case MR_IMAGEEFFECTSITF:
XAImageEffectsItfImpl_Free(pItf);
break;
- case MR_IMAGEENCODERITF:
+ case MR_IMAGEENCODERITF:
XAImageEncoderItfImpl_Free(pItf);
break;
+#endif
case MR_METADATAINSERTIONITF:
XAMetadataInsertionItfImpl_Free(pItf);
break;
case MR_RECORDITF:
XARecordItfImpl_Free(pItf);
break;
- case MR_SNAPSHOTITF:
+#ifdef OMAX_CAMERABIN
+ case MR_SNAPSHOTITF:
XASnapshotItfImpl_Free(pItf);
break;
- case MR_VIDEOENCODER:
+ case MR_VIDEOENCODER:
XAVideoEncoderItfImpl_Free(pItf);
break;
- case MR_VIDEOPOSTPROCESSINGITF:
+ case MR_VIDEOPOSTPROCESSINGITF:
XAVideoPostProcessingItfImpl_Free(pItf);
break;
+#endif
case MR_VOLUMEITF:
XAVolumeItfImpl_Free(pItf);
break;
@@ -559,30 +564,32 @@
break;
default:
break;
- }
+ }
pObj->interfaceMap[itfIdx].pItf = NULL;
+ }
}
- }
- if ( pImpl->adaptationCtx != NULL )
- {
- if(pImpl->adaptationCtx->fwtype == FWMgrFWMMF)
+ if (pImpl->adaptationCtx != NULL)
+ {
+ if (pImpl->adaptationCtx->fwtype == FWMgrFWMMF)
{
- XAMediaRecorderAdaptMMF_Destroy( (XAAdaptationMMFCtx*)pObjImpl->adaptationCtx );
+ XAMediaRecorderAdaptMMF_Destroy(
+ (XAAdaptationMMFCtx*) pObjImpl->adaptationCtx);
}
else
{
- XAMediaRecorderAdapt_Destroy( (XAAdaptationGstCtx*)pImpl->adaptationCtx );
+ XAMediaRecorderAdapt_Destroy(
+ (XAAdaptationGstCtx*) pImpl->adaptationCtx);
}
pImpl->adaptationCtx = NULL;
- }
+ }
/* free all other allocated resources*/
DEBUG_API("<-XAMediaRecorderImpl_FreeResources");
XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS( XATSMediaRecorder );
return;
-}
+ }
/*****************************************************************************
* MediaRecorderImpl -specific methods
@@ -591,106 +598,114 @@
/* XAMediaRecorderImpl_DoAddItf
* Dynamically add an interface, object specific parts
*/
-XAresult XAMediaRecorderImpl_DoAddItf(XAObjectItf self, XAObjItfMapEntry *mapEntry )
-{
+XAresult XAMediaRecorderImpl_DoAddItf(XAObjectItf self,
+ XAObjItfMapEntry *mapEntry)
+ {
- XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
- XAMediaRecorderImpl* pImpl = (XAMediaRecorderImpl*)(pObj);
+ XAObjectItfImpl* pObj = (XAObjectItfImpl*) (*self);
+ XAMediaRecorderImpl* pImpl = (XAMediaRecorderImpl*) (pObj);
XAresult ret = XA_RESULT_SUCCESS;
DEBUG_API("->XAMediaRecorderImpl_DoAddItf");
XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaRecorder );
- if(mapEntry)
- {
- switch( mapEntry->mapIdx )
+ if (mapEntry)
{
+ switch (mapEntry->mapIdx)
+ {
- case MR_METADATAINSERTIONITF:
- mapEntry->pItf = XAMetadataInsertionItfImpl_Create(pImpl);
- break;
- case MR_EQUALIZERITF:
- mapEntry->pItf = XAEqualizerItfImpl_Create( pImpl->adaptationCtx );
- break;
- case MR_IMAGEEFFECTSITF:
- mapEntry->pItf = XAImageEffectsItfImpl_Create( pImpl->adaptationCtx );
- break;
+ case MR_METADATAINSERTIONITF:
+ mapEntry->pItf = XAMetadataInsertionItfImpl_Create(pImpl);
+ break;
+ case MR_EQUALIZERITF:
+ mapEntry->pItf = XAEqualizerItfImpl_Create(
+ pImpl->adaptationCtx);
+ break;
+#ifdef OMAX_CAMERABIN
+ case MR_IMAGEEFFECTSITF:
+ mapEntry->pItf = XAImageEffectsItfImpl_Create( pImpl->adaptationCtx );
+ break;
+#endif
+ default:
+ DEBUG_ERR("XAMediaRecorderImpl_DoAddItf unknown id")
+ ;
+ ret = XA_RESULT_FEATURE_UNSUPPORTED;
+ break;
+ }
- default:
- DEBUG_ERR("XAMediaRecorderImpl_DoAddItf unknown id");
- ret = XA_RESULT_FEATURE_UNSUPPORTED;
- break;
- }
-
- if( !mapEntry->pItf && ret == XA_RESULT_SUCCESS)
- {
+ if (!mapEntry->pItf && ret == XA_RESULT_SUCCESS)
+ {
DEBUG_ERR("XAMediaRecorderImpl_DoAddItf itf creation failed");
ret = XA_RESULT_MEMORY_FAILURE;
+ }
}
- }
else
- {
+ {
ret = XA_RESULT_PARAMETER_INVALID;
- }
+ }
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
DEBUG_API("<-XAMediaRecorderImpl_DoAddItf");
return ret;
-}
+ }
/* XAMediaRecorderImpl_DoResumeItf
* Try to resume lost interface, object specific parts
*/
-XAresult XAMediaRecorderImpl_DoResumeItf(XAObjectItf self, XAObjItfMapEntry *mapEntry )
-{
+XAresult XAMediaRecorderImpl_DoResumeItf(XAObjectItf self,
+ XAObjItfMapEntry *mapEntry)
+ {
XAresult ret;
/* For now, no difference between suspended and unrealised itfs */
DEBUG_API("->XAMediaRecorderImpl_DoResumeItf");
XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaRecorder );
- ret = XAMediaRecorderImpl_DoAddItf(self,mapEntry);
+ ret = XAMediaRecorderImpl_DoAddItf(self, mapEntry);
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
DEBUG_API("<-XAMediaRecorderImpl_DoResumeItf");
return ret;
-}
+ }
/* XAMediaRecorderImpl_DoRemoveItf
* Dynamically remove an interface, object specific parts
*/
-XAresult XAMediaRecorderImpl_DoRemoveItf(XAObjectItf self, XAObjItfMapEntry *mapEntry )
-{
+XAresult XAMediaRecorderImpl_DoRemoveItf(XAObjectItf self,
+ XAObjItfMapEntry *mapEntry)
+ {
XAresult ret = XA_RESULT_SUCCESS;
DEBUG_API("->XAMediaRecorderImpl_DoRemoveItf");
XA_IMPL_THREAD_SAFETY_ENTRY( XATSMediaRecorder );
- if(mapEntry)
- {
- switch( mapEntry->mapIdx )
+ if (mapEntry)
{
- case MR_METADATAINSERTIONITF:
- XAMetadataInsertionItfImpl_Free( mapEntry->pItf );
- break;
- case MR_EQUALIZERITF:
- XAEqualizerItfImpl_Free( mapEntry->pItf );
- break;
- case MR_IMAGEEFFECTSITF:
- XAImageEffectsItfImpl_Free( mapEntry->pItf );
- break;
- default:
- DEBUG_ERR("XAMediaRecorderImpl_DoRemoveItf unknown id");
- ret = XA_RESULT_FEATURE_UNSUPPORTED;
- break;
+ switch (mapEntry->mapIdx)
+ {
+ case MR_METADATAINSERTIONITF:
+ XAMetadataInsertionItfImpl_Free(mapEntry->pItf);
+ break;
+ case MR_EQUALIZERITF:
+ XAEqualizerItfImpl_Free(mapEntry->pItf);
+ break;
+#ifdef OMAX_CAMERABIN
+ case MR_IMAGEEFFECTSITF:
+ XAImageEffectsItfImpl_Free( mapEntry->pItf );
+ break;
+#endif
+ default:
+ DEBUG_ERR("XAMediaRecorderImpl_DoRemoveItf unknown id")
+ ;
+ ret = XA_RESULT_FEATURE_UNSUPPORTED;
+ break;
+ }
+ mapEntry->pItf = NULL;
}
- mapEntry->pItf = NULL;
- }
else
- {
+ {
ret = XA_RESULT_PARAMETER_INVALID;
- }
+ }
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaRecorder );
DEBUG_API("<-XAMediaRecorderImpl_DoRemoveItf");
return ret;
-}
-
+ }
/* END OF FILE */
--- a/khronosfws/openmax_al/src/mediarecorder/xamediarecorder.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xamediarecorder.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: MediaRecorder Object Header
+ *
+ */
#ifndef XAMEDIARECORDER_H
#define XAMEDIARECORDER_H
@@ -26,14 +26,12 @@
/** MACROS **/
-
/** TYPES **/
-
/** ENUMERATIONS **/
/* Enumeration for interfaces that MediaRecorder supports. */
typedef enum
-{
+ {
MR_OBJECTITF,
MR_AUDIOENCODERITF,
MR_CONFIGEXTENSIONITF,
@@ -51,12 +49,12 @@
MR_METADATAEXTRACTIONITF,
MR_METADATATRAVERSALITF,
MR_ITFCOUNT
-} MRInterfaces;
+ } MRInterfaces;
/** STRUCTURES **/
/* Specification for MediaRecorderImpl. */
typedef struct XAMediaRecorderImpl_
-{
+ {
/* Parent for XAMediaRecorder */
XAObjectItfImpl baseObj;
@@ -67,20 +65,21 @@
XAuint8 recModes;
XAAdaptationBaseCtx* adaptationCtx;
-} XAMediaRecorderImpl;
-
+ } XAMediaRecorderImpl;
/** METHODS **/
/* base object XAObjectItfImpl methods */
-XAresult XAMediaRecorderImpl_DoRealize(XAObjectItf self);
-XAresult XAMediaRecorderImpl_DoResume(XAObjectItf self);
-void XAMediaRecorderImpl_FreeResources(XAObjectItf self);
-
+XAresult XAMediaRecorderImpl_DoRealize(XAObjectItf self);
+XAresult XAMediaRecorderImpl_DoResume(XAObjectItf self);
+void XAMediaRecorderImpl_FreeResources(XAObjectItf self);
/* MediaRecorderImpl -specific methods*/
-XAresult XAMediaRecorderImpl_DoAddItf(XAObjectItf self, XAObjItfMapEntry *mapEntry );
-XAresult XAMediaRecorderImpl_DoResumeItf(XAObjectItf self, XAObjItfMapEntry *mapEntry );
-XAresult XAMediaRecorderImpl_DoRemoveItf(XAObjectItf self, XAObjItfMapEntry *mapEntry );
+XAresult XAMediaRecorderImpl_DoAddItf(XAObjectItf self,
+ XAObjItfMapEntry *mapEntry);
+XAresult XAMediaRecorderImpl_DoResumeItf(XAObjectItf self,
+ XAObjItfMapEntry *mapEntry);
+XAresult XAMediaRecorderImpl_DoRemoveItf(XAObjectItf self,
+ XAObjItfMapEntry *mapEntry);
#endif /* XAMEDIARECORDER_H */
--- a/khronosfws/openmax_al/src/mediarecorder/xametadatainsertionitf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xametadatainsertionitf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Metadata Insertion Itf Impl
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
@@ -27,17 +27,18 @@
* Description: Validate interface pointer and cast it to implementation pointer.
*/
static XAMetadataInsertionItfImpl* GetImpl(XAMetadataInsertionItf self)
-{
- if( self )
{
- XAMetadataInsertionItfImpl* impl = (XAMetadataInsertionItfImpl*)(*self);
- if( impl && (impl == impl->self) )
+ if (self)
{
+ XAMetadataInsertionItfImpl* impl =
+ (XAMetadataInsertionItfImpl*) (*self);
+ if (impl && (impl == impl->self))
+ {
return impl;
+ }
}
+ return NULL;
}
- return NULL;
-}
/*****************************************************************************
* Base interface XAMetadataInsertionItf implementation
@@ -46,424 +47,421 @@
/* XAMetadataInsertionItfImpl_CreateChildNode
* Description: Creates a new child node for the given parent.
*/
-XAresult XAMetadataInsertionItfImpl_CreateChildNode(XAMetadataInsertionItf self,
- XAint32 parentNodeID,
- XAuint32 type,
- XAchar *mimeType,
- XAint32 *pChildNodeID)
-{
+XAresult XAMetadataInsertionItfImpl_CreateChildNode(
+ XAMetadataInsertionItf self, XAint32 parentNodeID, XAuint32 type,
+ XAchar *mimeType, XAint32 *pChildNodeID)
+ {
XAMetadataInsertionItfImpl *impl = NULL;
XAresult ret = XA_RESULT_SUCCESS;
DEBUG_API("->XAMetadataInsertionItfImpl_CreateChildNode");
impl = GetImpl(self);
- if(!impl || !mimeType || !pChildNodeID )
- {
+ if (!impl || !mimeType || !pChildNodeID)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
/* invalid parameter */
ret = XA_RESULT_PARAMETER_INVALID;
- }
- else
- {
-
- if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWGST)
- {
- if(impl->adaptCtx)
- {
- ret = XAMetadataInsertionItfAdapt_CreateChildNode(
- (XAAdaptationGstCtx*)impl->adaptCtx,parentNodeID,type,mimeType,pChildNodeID);
- }
- else
- {
- ret = XA_RESULT_INTERNAL_ERROR;
- }
-
}
else
{
- DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
- DEBUG_API("<-XAMetadataInsertionItfImpl_CreateChildNode");
- return XA_RESULT_FEATURE_UNSUPPORTED;
- }
+
+ if (impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWGST)
+ {
+ if (impl->adaptCtx)
+ {
+ ret = XAMetadataInsertionItfAdapt_CreateChildNode(
+ (XAAdaptationGstCtx*) impl->adaptCtx, parentNodeID,
+ type, mimeType, pChildNodeID);
+ }
+ else
+ {
+ ret = XA_RESULT_INTERNAL_ERROR;
+ }
+
+ }
+ else
+ {
+ DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+ DEBUG_API("<-XAMetadataInsertionItfImpl_CreateChildNode");
+ return XA_RESULT_FEATURE_UNSUPPORTED;
+ }
+ }DEBUG_API("<-XAMetadataInsertionItfImpl_CreateChildNode");
+ return ret;
}
- DEBUG_API("<-XAMetadataInsertionItfImpl_CreateChildNode");
- return ret;
-}
/* XAresult XAMetadataInsertionItfImpl_GetSupportedKeysCount
* Description: A query method to tell if the metadata keys (for writing metadata)
* can be freely chosen by the application or if they are fixed (for the given node).
*/
-XAresult XAMetadataInsertionItfImpl_GetSupportedKeysCount(XAMetadataInsertionItf self,
- XAint32 nodeID,
- XAboolean *pFreeKeys,
- XAuint32 *pKeyCount,
- XAuint32 *pEncodingCount)
-{
+XAresult XAMetadataInsertionItfImpl_GetSupportedKeysCount(
+ XAMetadataInsertionItf self, XAint32 nodeID, XAboolean *pFreeKeys,
+ XAuint32 *pKeyCount, XAuint32 *pEncodingCount)
+ {
XAMetadataInsertionItfImpl *impl = NULL;
XAresult ret = XA_RESULT_SUCCESS;
DEBUG_API("->XAMetadataInsertionItfImpl_GetSupportedKeysCount");
impl = GetImpl(self);
- if(!impl || !pFreeKeys || !pKeyCount || !pEncodingCount )
- {
+ if (!impl || !pFreeKeys || !pKeyCount || !pEncodingCount)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
/* invalid parameter */
ret = XA_RESULT_PARAMETER_INVALID;
- }
+ }
else
- {
- if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWGST)
{
- if( impl->adaptCtx )
+ if (impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWGST)
{
- ret = XAMetadataInsertionItfAdapt_GetSupportedKeysCount(
- (XAAdaptationGstCtx*)impl->adaptCtx,nodeID,pFreeKeys,pKeyCount,pEncodingCount);
+ if (impl->adaptCtx)
+ {
+ ret = XAMetadataInsertionItfAdapt_GetSupportedKeysCount(
+ (XAAdaptationGstCtx*) impl->adaptCtx, nodeID,
+ pFreeKeys, pKeyCount, pEncodingCount);
+ }
+ else
+ {
+ ret = XA_RESULT_INTERNAL_ERROR;
+ }
}
else
{
- ret = XA_RESULT_INTERNAL_ERROR;
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+ DEBUG_API("<-XAMetadataInsertionItfImpl_GetSupportedKeysCount");
+ return XA_RESULT_PARAMETER_INVALID;
}
- }
- else
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAMetadataInsertionItfImpl_GetSupportedKeysCount");
- return XA_RESULT_PARAMETER_INVALID;
- }
+ }DEBUG_API("<-XAMetadataInsertionItfImpl_GetSupportedKeysCount");
+ return ret;
}
- DEBUG_API("<-XAMetadataInsertionItfImpl_GetSupportedKeysCount");
- return ret;
-}
/* XAresult XAMetadataInsertionItfImpl_GetKeySize
* Description: Returns the byte size required for a supported metadata
* key pointed by the given index
*/
XAresult XAMetadataInsertionItfImpl_GetKeySize(XAMetadataInsertionItf self,
- XAint32 nodeID,
- XAuint32 keyIndex,
- XAuint32 *pKeySize)
-{
+ XAint32 nodeID, XAuint32 keyIndex, XAuint32 *pKeySize)
+ {
XAMetadataInsertionItfImpl *impl = NULL;
XAresult ret = XA_RESULT_SUCCESS;
DEBUG_API("->XAMetadataInsertionItfImpl_GetKeySize");
impl = GetImpl(self);
- if(!impl || !pKeySize )
- {
+ if (!impl || !pKeySize)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
/* invalid parameter */
ret = XA_RESULT_PARAMETER_INVALID;
- }
+ }
else
- {
- if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWGST)
{
-
- if( impl->adaptCtx )
+ if (impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWGST)
{
- ret = XAMetadataInsertionItfAdapt_GetKeySize(
- (XAAdaptationGstCtx*)impl->adaptCtx, nodeID, keyIndex, pKeySize);
+
+ if (impl->adaptCtx)
+ {
+ ret = XAMetadataInsertionItfAdapt_GetKeySize(
+ (XAAdaptationGstCtx*) impl->adaptCtx, nodeID,
+ keyIndex, pKeySize);
+ }
+ else
+ {
+ ret = XA_RESULT_INTERNAL_ERROR;
+ }
}
else
{
- ret = XA_RESULT_INTERNAL_ERROR;
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+ DEBUG_API("<-XAMetadataInsertionItfImpl_GetKeySize");
+ return XA_RESULT_PARAMETER_INVALID;
}
- }
- else
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAMetadataInsertionItfImpl_GetKeySize");
- return XA_RESULT_PARAMETER_INVALID;
- }
+ }DEBUG_API("<-XAMetadataInsertionItfImpl_GetKeySize");
+ return ret;
}
- DEBUG_API("<-XAMetadataInsertionItfImpl_GetKeySize");
- return ret;
-}
/* XAresult XAMetadataInsertionItfImpl_GetKey
* Description; Returns a XAMetadataInfo structure and associated data
* referenced by the structure for a supported key
*/
XAresult XAMetadataInsertionItfImpl_GetKey(XAMetadataInsertionItf self,
- XAint32 nodeID,
- XAuint32 keyIndex,
- XAuint32 keySize,
- XAMetadataInfo *pKey)
-{
+ XAint32 nodeID, XAuint32 keyIndex, XAuint32 keySize,
+ XAMetadataInfo *pKey)
+ {
XAMetadataInsertionItfImpl *impl = NULL;
XAresult ret = XA_RESULT_SUCCESS;
DEBUG_API("->XAMetadataInsertionItfImpl_GetKey");
impl = GetImpl(self);
- if(!impl || !pKey )
- {
+ if (!impl || !pKey)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
/* invalid parameter */
ret = XA_RESULT_PARAMETER_INVALID;
- }
+ }
else
- {
- if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWGST)
{
-
- if( impl->adaptCtx )
+ if (impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWGST)
{
- ret = XAMetadataInsertionItfAdapt_GetKey(
- (XAAdaptationGstCtx*)impl->adaptCtx,nodeID,keyIndex,keySize,pKey);
+
+ if (impl->adaptCtx)
+ {
+ ret = XAMetadataInsertionItfAdapt_GetKey(
+ (XAAdaptationGstCtx*) impl->adaptCtx, nodeID,
+ keyIndex, keySize, pKey);
+ }
+ else
+ {
+ ret = XA_RESULT_INTERNAL_ERROR;
+ }
}
else
{
- ret = XA_RESULT_INTERNAL_ERROR;
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+ DEBUG_API("<-XAMetadataInsertionItfImpl_GetKey");
+ return XA_RESULT_PARAMETER_INVALID;
}
- }
- else
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAMetadataInsertionItfImpl_GetKey");
- return XA_RESULT_PARAMETER_INVALID;
- }
+ }DEBUG_API("<-XAMetadataInsertionItfImpl_GetKey");
+ return ret;
}
- DEBUG_API("<-XAMetadataInsertionItfImpl_GetKey");
- return ret;
-}
/* XAresult XAMetadataInsertionItfImpl_GetFreeKeysEncoding
* Description: A method to be used in case implementation supports
* free keys for metadata insertion.
*/
-XAresult XAMetadataInsertionItfImpl_GetFreeKeysEncoding(XAMetadataInsertionItf self,
- XAint32 nodeID,
- XAuint32 encodingIndex,
- XAuint32 *pEncoding)
-{
+XAresult XAMetadataInsertionItfImpl_GetFreeKeysEncoding(
+ XAMetadataInsertionItf self, XAint32 nodeID, XAuint32 encodingIndex,
+ XAuint32 *pEncoding)
+ {
XAMetadataInsertionItfImpl *impl = NULL;
XAresult ret = XA_RESULT_SUCCESS;
DEBUG_API("->XAMetadataInsertionItfImpl_GetFreeKeysEncoding");
impl = GetImpl(self);
- if( !impl || !pEncoding )
- {
+ if (!impl || !pEncoding)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
/* invalid parameter */
- ret =XA_RESULT_PARAMETER_INVALID;
- }
+ ret = XA_RESULT_PARAMETER_INVALID;
+ }
else
- {
- if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWGST)
{
-
- if( impl->adaptCtx )
+ if (impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWGST)
{
- ret = XAMetadataInsertionItfAdapt_GetFreeKeysEncoding(
- (XAAdaptationGstCtx*)impl->adaptCtx,nodeID,encodingIndex,pEncoding);
+
+ if (impl->adaptCtx)
+ {
+ ret = XAMetadataInsertionItfAdapt_GetFreeKeysEncoding(
+ (XAAdaptationGstCtx*) impl->adaptCtx, nodeID,
+ encodingIndex, pEncoding);
+ }
+ else
+ {
+ ret = XA_RESULT_INTERNAL_ERROR;
+ }
}
else
{
- ret = XA_RESULT_INTERNAL_ERROR;
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
+ DEBUG_API("<-XAMetadataInsertionItfImpl_GetFreeKeysEncoding");
+ return XA_RESULT_PARAMETER_INVALID;
}
- }
- else
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XAMetadataInsertionItfImpl_GetFreeKeysEncoding");
- return XA_RESULT_PARAMETER_INVALID;
- }
+ }DEBUG_API("<-XAMetadataInsertionItfImpl_GetFreeKeysEncoding");
+ return ret;
}
- DEBUG_API("<-XAMetadataInsertionItfImpl_GetFreeKeysEncoding");
- return ret;
-}
/* XAresult XAMetadataInsertionItfImpl_InsertMetadataItem
* Description: Inserts the key/value pair to the specified node of the metadata tree.
*/
-XAresult XAMetadataInsertionItfImpl_InsertMetadataItem(XAMetadataInsertionItf self,
- XAint32 nodeID,
- XAMetadataInfo *pKey,
- XAMetadataInfo *pValue,
- XAboolean overwrite)
-{
+XAresult XAMetadataInsertionItfImpl_InsertMetadataItem(
+ XAMetadataInsertionItf self, XAint32 nodeID, XAMetadataInfo *pKey,
+ XAMetadataInfo *pValue, XAboolean overwrite)
+ {
XAMetadataInsertionItfImpl *impl = NULL;
XAresult ret = XA_RESULT_SUCCESS;
DEBUG_API("->XAMetadataInsertionItfImpl_InsertMetadataItem");
impl = GetImpl(self);
- if( !impl || !pKey || !pValue )
- {
+ if (!impl || !pKey || !pValue)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
/* invalid parameter */
ret = XA_RESULT_PARAMETER_INVALID;
- }
+ }
else
- {
- if(impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWGST)
{
+ if (impl->adaptCtx && impl->adaptCtx->fwtype == FWMgrFWGST)
+ {
- if( impl->adaptCtx )
- {
- ret = XAMetadataInsertionItfAdapt_InsertMetadataItem(
- (XAAdaptationGstCtx*)impl->adaptCtx,nodeID,pKey,pValue,overwrite);
- impl->currentTags.mdeKeys[impl->currentTags.itemcount] = pKey;
- impl->currentTags.mdeValues[impl->currentTags.itemcount] = pValue;
- impl->currentTags.itemcount++;
+ if (impl->adaptCtx)
+ {
+ ret = XAMetadataInsertionItfAdapt_InsertMetadataItem(
+ (XAAdaptationGstCtx*) impl->adaptCtx, nodeID, pKey,
+ pValue, overwrite);
+ impl->currentTags.mdeKeys[impl->currentTags.itemcount] = pKey;
+ impl->currentTags.mdeValues[impl->currentTags.itemcount]
+ = pValue;
+ impl->currentTags.itemcount++;
+ }
+ else
+ {
+ ret = XA_RESULT_INTERNAL_ERROR;
+ }
}
else
{
- ret = XA_RESULT_INTERNAL_ERROR;
+ DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
+ DEBUG_API("<-XAMetadataInsertionItfImpl_GetFreeKeysEncoding");
+ return XA_RESULT_FEATURE_UNSUPPORTED;
}
- }
- else
- {
- DEBUG_ERR("XA_RESULT_FEATURE_UNSUPPORTED");
- DEBUG_API("<-XAMetadataInsertionItfImpl_GetFreeKeysEncoding");
- return XA_RESULT_FEATURE_UNSUPPORTED;
- }
+ }DEBUG_API("<-XAMetadataInsertionItfImpl_InsertMetadataItem");
+ return ret;
}
- DEBUG_API("<-XAMetadataInsertionItfImpl_InsertMetadataItem");
- return ret;
-}
/* XAresult XAMetadataInsertionItfImpl_RegisterCallback
* Description: Registers a callback on the object that executes after each of
* the actual writings of metadata key/value pairs takes place.
*/
-XAresult XAMetadataInsertionItfImpl_RegisterCallback(XAMetadataInsertionItf self,
- xaMetadataInsertionCallback callback,
- void *pContext)
-{
+XAresult XAMetadataInsertionItfImpl_RegisterCallback(
+ XAMetadataInsertionItf self, xaMetadataInsertionCallback callback,
+ void *pContext)
+ {
XAMetadataInsertionItfImpl *impl = NULL;
DEBUG_API("->XAMetadataInsertionItfImpl_RegisterCallback");
impl = GetImpl(self);
- if( !impl )
- {
+ if (!impl)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XAMetadataInsertionItfImpl_RegisterCallback");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
- if(callback)
- {
- XAAdaptationBase_AddEventHandler( impl->adaptCtx, &XAMetadataInsertionItfImpl_AdaptCb,
- XA_METADATAEVENTS, impl );
+ if (callback)
+ {
+ XAAdaptationBase_AddEventHandler(impl->adaptCtx,
+ &XAMetadataInsertionItfImpl_AdaptCb, XA_METADATAEVENTS, impl);
impl->callback = callback;
- impl->cbcontext = pContext;
+ impl->cbcontext = pContext;
impl->cbPtrToSelf = self;
- }
+ }
else
- {
- XAAdaptationBase_RemoveEventHandler(impl->adaptCtx, &XAMetadataInsertionItfImpl_AdaptCb );
- }
+ {
+ XAAdaptationBase_RemoveEventHandler(impl->adaptCtx,
+ &XAMetadataInsertionItfImpl_AdaptCb);
+ }
DEBUG_API("<-XAMetadataInsertionItfImpl_RegisterCallback");
return XA_RESULT_SUCCESS;
-}
+ }
/*****************************************************************************
* XAMetadataTraversalImpl -specific methods
*****************************************************************************/
-
/* XAMetadataInsertionItfImpl* XAMetadataInsertionItfImpl_Create()
* Description: Allocate and initialize MetadataInsertionItfImpl
*/
-XAMetadataInsertionItfImpl* XAMetadataInsertionItfImpl_Create(XAMediaRecorderImpl* impl)
-{
- XAMetadataInsertionItfImpl* self = (XAMetadataInsertionItfImpl*)
- calloc(1,sizeof(XAMetadataInsertionItfImpl));
+XAMetadataInsertionItfImpl* XAMetadataInsertionItfImpl_Create(
+ XAMediaRecorderImpl* impl)
+ {
+ XAMetadataInsertionItfImpl* self = (XAMetadataInsertionItfImpl*) calloc(
+ 1, sizeof(XAMetadataInsertionItfImpl));
//XAMediaRecorderAdaptationCtx* mCtx = (XAMediaRecorderAdaptationCtx*)(impl->adaptationCtx);
-
+
DEBUG_API("->XAMetadataInsertionItfImpl_Create");
- if( self )
- {
+ if (self)
+ {
//if(mCtx->fwtype == FWMgrFWGST)
{
/* init itf default implementation */
- self->itf.CreateChildNode = XAMetadataInsertionItfImpl_CreateChildNode;
- self->itf.GetFreeKeysEncoding = XAMetadataInsertionItfImpl_GetFreeKeysEncoding;
+ self->itf.CreateChildNode
+ = XAMetadataInsertionItfImpl_CreateChildNode;
+ self->itf.GetFreeKeysEncoding
+ = XAMetadataInsertionItfImpl_GetFreeKeysEncoding;
self->itf.GetKey = XAMetadataInsertionItfImpl_GetKey;
self->itf.GetKeySize = XAMetadataInsertionItfImpl_GetKeySize;
- self->itf.GetSupportedKeysCount = XAMetadataInsertionItfImpl_GetSupportedKeysCount;
- self->itf.InsertMetadataItem = XAMetadataInsertionItfImpl_InsertMetadataItem;
- self->itf.RegisterCallback = XAMetadataInsertionItfImpl_RegisterCallback;
+ self->itf.GetSupportedKeysCount
+ = XAMetadataInsertionItfImpl_GetSupportedKeysCount;
+ self->itf.InsertMetadataItem
+ = XAMetadataInsertionItfImpl_InsertMetadataItem;
+ self->itf.RegisterCallback
+ = XAMetadataInsertionItfImpl_RegisterCallback;
}
/* init variables*/
-
+
self->callback = NULL;
self->cbcontext = NULL;
self->cbPtrToSelf = NULL;
self->adaptCtx = impl->adaptationCtx;
- self->currentTags.mdeKeys = calloc(MAX_TAGS,sizeof(XAMetadataInfo*));
- self->currentTags.mdeValues = calloc(MAX_TAGS,sizeof(XAMetadataInfo*));
+ self->currentTags.mdeKeys = calloc(MAX_TAGS, sizeof(XAMetadataInfo*));
+ self->currentTags.mdeValues = calloc(MAX_TAGS,
+ sizeof(XAMetadataInfo*));
self->self = self;
+ }DEBUG_API("<-XAMetadataInsertionItfImpl_Create");
+ return self;
}
- DEBUG_API("<-XAMetadataInsertionItfImpl_Create");
- return self;
-}
/* void XAMetadataInsertionItfImpl_Free(XAMetadataInsertionItfImpl* self)
* Description: Free all resources reserved at XAMetadataInsertionItfImpl_Create()
*/
void XAMetadataInsertionItfImpl_Free(XAMetadataInsertionItfImpl* self)
-{
+ {
DEBUG_API("->XAMetadataInsertionItfImpl_Free");
assert( self==self->self );
- if(self->callback)
- {
- XAAdaptationBase_RemoveEventHandler(self->adaptCtx, &XAMetadataInsertionItfImpl_AdaptCb );
+ if (self->callback)
+ {
+ XAAdaptationBase_RemoveEventHandler(self->adaptCtx,
+ &XAMetadataInsertionItfImpl_AdaptCb);
+ }
+ XAMetadataAdapt_FreeImplTagList(&(self->currentTags), XA_BOOLEAN_FALSE);
+ free(self);
+ DEBUG_API("<-XAMetadataInsertionItfImpl_Free");
}
- XAMetadataAdapt_FreeImplTagList(&(self->currentTags), XA_BOOLEAN_FALSE);
- free( self );
- DEBUG_API("<-XAMetadataInsertionItfImpl_Free");
-}
/* With this method, adaptation infroms that tags are written to stream
*/
-void XAMetadataInsertionItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
-{
+void XAMetadataInsertionItfImpl_AdaptCb(void *pHandlerCtx,
+ XAAdaptEvent *event)
+ {
XAMetadataInsertionItfImpl* impl = NULL;
XAuint32 idx = 0, nodeID = XA_ROOT_NODE_ID;
XAboolean result = XA_BOOLEAN_TRUE;
DEBUG_API("->XAMetadataInsertionItfImpl_AdaptCb");
- impl = (XAMetadataInsertionItfImpl*)pHandlerCtx;
- if(!impl)
- {
+ impl = (XAMetadataInsertionItfImpl*) pHandlerCtx;
+ if (!impl)
+ {
DEBUG_ERR("XAMetadataInsertionItfImpl_AdaptCb, invalid context pointer!");
DEBUG_API("<-XAMetadataInsertionItfImpl_AdaptCb");
return;
- }
- if( event && event->eventid == XA_ADAPT_MDE_TAGS_WRITTEN )
- {
+ }
+ if (event && event->eventid == XA_ADAPT_MDE_TAGS_WRITTEN)
+ {
/*here datasize field is used for return value*/
- if(event->datasize != XA_RESULT_SUCCESS)
- {
+ if (event->datasize != XA_RESULT_SUCCESS)
+ {
DEBUG_ERR_A1("Adaptation failed to write metadata (code %x)!",(int)event->datasize);
- result=XA_BOOLEAN_FALSE;
- }
+ result = XA_BOOLEAN_FALSE;
+ }
/*all tags written, send cb for client to free the memory*/
- for(idx=0;idx<impl->currentTags.itemcount;idx++)
- {
- if(impl->callback)
+ for (idx = 0; idx < impl->currentTags.itemcount; idx++)
{
+ if (impl->callback)
+ {
impl->callback(impl->cbPtrToSelf, impl->cbcontext,
- impl->currentTags.mdeKeys[idx],
- impl->currentTags.mdeValues[idx],
- nodeID, result);
+ impl->currentTags.mdeKeys[idx],
+ impl->currentTags.mdeValues[idx], nodeID, result);
+ }
+ impl->currentTags.mdeKeys[idx] = NULL;
+ impl->currentTags.mdeValues[idx] = NULL;
}
- impl->currentTags.mdeKeys[idx]=NULL;
- impl->currentTags.mdeValues[idx]=NULL;
+ impl->currentTags.itemcount = 0;
}
- impl->currentTags.itemcount=0;
- }
else
- {
+ {
DEBUG_INFO("unhandled");
- }
+ }
DEBUG_API("<-XAMetadataInsertionItfImpl_AdaptCb");
-}
+ }
--- a/khronosfws/openmax_al/src/mediarecorder/xametadatainsertionitf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xametadatainsertionitf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,24 +1,23 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Metadata Insertion Itf Impl
+ *
+ */
#ifndef XAMETADATAINSERTIONITF_H
#define XAMETADATAINSERTIONITF_H
-
#include "xametadataadaptation.h"
#include "xamediarecorder.h"
/** MACROS **/
@@ -30,7 +29,7 @@
/** STRUCTURES **/
/* Definition of XAMetadataInsertionItf implementation */
typedef struct XAMetadataInsertionItfImpl_
-{
+ {
/* parent interface */
struct XAMetadataInsertionItf_ itf;
/* pointer to self */
@@ -38,59 +37,50 @@
/* variables */
XAAdaptationBaseCtx *adaptCtx;
- XAMetadataImplTagList currentTags;
+ XAMetadataImplTagList currentTags;
/*Callback*/
xaMetadataInsertionCallback callback;
- void *cbcontext;
+ void *cbcontext;
XAMetadataInsertionItf cbPtrToSelf;
-} XAMetadataInsertionItfImpl;
+ } XAMetadataInsertionItfImpl;
/** METHODS **/
/* Base interface XAMetadataInsertionItf implementation */
-XAresult XAMetadataInsertionItfImpl_CreateChildNode(XAMetadataInsertionItf self,
- XAint32 parentNodeID,
- XAuint32 type,
- XAchar *mimeType,
- XAint32 *pChildNodeID);
+XAresult XAMetadataInsertionItfImpl_CreateChildNode(
+ XAMetadataInsertionItf self, XAint32 parentNodeID, XAuint32 type,
+ XAchar *mimeType, XAint32 *pChildNodeID);
-XAresult XAMetadataInsertionItfImpl_GetSupportedKeysCount(XAMetadataInsertionItf self,
- XAint32 nodeID,
- XAboolean *pFreeKeys,
- XAuint32 *pKeyCount,
- XAuint32 *pEncodingCount);
+XAresult XAMetadataInsertionItfImpl_GetSupportedKeysCount(
+ XAMetadataInsertionItf self, XAint32 nodeID, XAboolean *pFreeKeys,
+ XAuint32 *pKeyCount, XAuint32 *pEncodingCount);
XAresult XAMetadataInsertionItfImpl_GetKeySize(XAMetadataInsertionItf self,
- XAint32 nodeID,
- XAuint32 keyIndex,
- XAuint32 *pKeySize);
+ XAint32 nodeID, XAuint32 keyIndex, XAuint32 *pKeySize);
XAresult XAMetadataInsertionItfImpl_GetKey(XAMetadataInsertionItf self,
- XAint32 nodeID,
- XAuint32 keyIndex,
- XAuint32 keySize,
- XAMetadataInfo *pKey);
+ XAint32 nodeID, XAuint32 keyIndex, XAuint32 keySize,
+ XAMetadataInfo *pKey);
-XAresult XAMetadataInsertionItfImpl_GetFreeKeysEncoding(XAMetadataInsertionItf self,
- XAint32 nodeID,
- XAuint32 encodingIndex,
- XAuint32 *pEncoding);
+XAresult XAMetadataInsertionItfImpl_GetFreeKeysEncoding(
+ XAMetadataInsertionItf self, XAint32 nodeID, XAuint32 encodingIndex,
+ XAuint32 *pEncoding);
-XAresult XAMetadataInsertionItfImpl_InsertMetadataItem(XAMetadataInsertionItf self,
- XAint32 nodeID,
- XAMetadataInfo *pKey,
- XAMetadataInfo *pValue,
- XAboolean overwrite);
+XAresult XAMetadataInsertionItfImpl_InsertMetadataItem(
+ XAMetadataInsertionItf self, XAint32 nodeID, XAMetadataInfo *pKey,
+ XAMetadataInfo *pValue, XAboolean overwrite);
-XAresult XAMetadataInsertionItfImpl_RegisterCallback(XAMetadataInsertionItf self,
- xaMetadataInsertionCallback callback,
- void *pContext);
+XAresult XAMetadataInsertionItfImpl_RegisterCallback(
+ XAMetadataInsertionItf self, xaMetadataInsertionCallback callback,
+ void *pContext);
/* XAMetadataInsertionItfImpl -specific methods */
-XAMetadataInsertionItfImpl* XAMetadataInsertionItfImpl_Create(XAMediaRecorderImpl* impl);
-void XAMetadataInsertionItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
+XAMetadataInsertionItfImpl* XAMetadataInsertionItfImpl_Create(
+ XAMediaRecorderImpl* impl);
+void XAMetadataInsertionItfImpl_AdaptCb(void *pHandlerCtx,
+ XAAdaptEvent *event);
void XAMetadataInsertionItfImpl_Free(XAMetadataInsertionItfImpl* self);
#endif /* XAMETADATAINSERTIONITF_H */
--- a/khronosfws/openmax_al/src/mediarecorder/xarecorditf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xarecorditf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Record Itf Impl
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
@@ -30,17 +30,17 @@
* Description: Validate interface pointer and cast it to implementation pointer.
**/
static XARecordItfImpl* GetImpl(XARecordItf self)
-{
- if( self )
{
- XARecordItfImpl* impl = (XARecordItfImpl*)(*self);
- if( impl && (impl == impl->self) )
+ if (self)
{
+ XARecordItfImpl* impl = (XARecordItfImpl*) (*self);
+ if (impl && (impl == impl->self))
+ {
return impl;
+ }
}
+ return NULL;
}
- return NULL;
-}
/*****************************************************************************
* Base interface XARecordItf implementation
@@ -51,68 +51,69 @@
* XAuint32 state)
* Description: Transitions recorder into the given record state.
**/
-XAresult XARecordItfImpl_SetRecordState(XARecordItf self,
- XAuint32 state)
-{
+XAresult XARecordItfImpl_SetRecordState(XARecordItf self, XAuint32 state)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XARecordItfImpl *impl = GetImpl(self);
DEBUG_API("->XARecordItfImpl_SetRecordState");
- if( !impl || state < XA_RECORDSTATE_STOPPED || state > XA_RECORDSTATE_RECORDING )
- {
+ if (!impl || state < XA_RECORDSTATE_STOPPED || state
+ > XA_RECORDSTATE_RECORDING)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XARecordItfImpl_SetRecordState");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
/* check is play state changed, if not do nothing */
- if(state != impl->recordState)
- {
- if(impl->adapCtx->fwtype == FWMgrFWMMF)
- {
- ret = XARecordItfAdaptMMF_SetRecordState((XAAdaptationMMFCtx*)impl->adapCtx, state);
- }
- else
+ if (state != impl->recordState)
{
- ret = XARecordItfAdapt_SetRecordState((XAAdaptationGstCtx*)impl->adapCtx, state);
- }
+ if (impl->adapCtx->fwtype == FWMgrFWMMF)
+ {
+ ret = XARecordItfAdaptMMF_SetRecordState(
+ (XAAdaptationMMFCtx*) impl->adapCtx, state);
+ }
+ else
+ {
+ ret = XARecordItfAdapt_SetRecordState(
+ (XAAdaptationGstCtx*) impl->adapCtx, state);
+ }
- if(ret == XA_RESULT_SUCCESS)
- {
+ if (ret == XA_RESULT_SUCCESS)
+ {
impl->recordState = state;
+ }
}
- }
DEBUG_API("<-XARecordItfImpl_SetRecordState");
return ret;
-}
+ }
/**
* XAresult XARecordItfImpl_GetRecordState(XARecordItf self,
* XAuint32 *pState)
* Description: Gets the recorder’s current record state.
**/
-XAresult XARecordItfImpl_GetRecordState(XARecordItf self,
- XAuint32 *pState)
-{
+XAresult XARecordItfImpl_GetRecordState(XARecordItf self, XAuint32 *pState)
+ {
XARecordItfImpl *impl = GetImpl(self);
DEBUG_API("->XARecordItfImpl_GetRecordState");
- if( !impl || !pState )
- {
+ if (!impl || !pState)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XARecordItfImpl_GetRecordState");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pState = impl->recordState;
DEBUG_API("<-XARecordItfImpl_GetRecordState");
return XA_RESULT_SUCCESS;
-}
+ }
/**
* XAresult XARecordItfImpl_SetDurationLimit(XARecordItf self,
@@ -120,37 +121,38 @@
* Description: Sets the duration of current content in milliseconds.
**/
XAresult XARecordItfImpl_SetDurationLimit(XARecordItf self,
- XAmillisecond msec)
-{
+ XAmillisecond msec)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XARecordItfImpl *impl = GetImpl(self);
DEBUG_API("->XARecordItfImpl_SetDurationLimit");
XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaRecorder);
- if( !impl || msec <= 0 )
- {
+ if (!impl || msec <= 0)
+ {
/* invalid parameter */
XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XARecordItfImpl_SetDurationLimit");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
impl->durationLimitSetted = 1;
impl->durationLimit = msec;
- if(impl->adapCtx->fwtype == FWMgrFWGST)
- {
- ret = XARecordItfAdapt_EnablePositionTracking( (XAAdaptationGstCtx*)impl->adapCtx, 1 );
- }
+ if (impl->adapCtx->fwtype == FWMgrFWGST)
+ {
+ ret = XARecordItfAdapt_EnablePositionTracking(
+ (XAAdaptationGstCtx*) impl->adapCtx, 1);
+ }
else
- {
- ret = XARecordItfAdaptMMF_EnablePositionTracking( (XAAdaptationMMFCtx*)impl->adapCtx, 1 );
- }
-
+ {
+ ret = XARecordItfAdaptMMF_EnablePositionTracking(
+ (XAAdaptationMMFCtx*) impl->adapCtx, 1);
+ }
XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
DEBUG_API("<-XARecordItfImpl_SetDurationLimit");
return ret;
-}
+ }
/**
* XAresult XARecordItfImpl_GetPosition(XARecordItf self,
@@ -158,36 +160,36 @@
* Description: Returns the current position of the recording head relative
* to the beginning of content.
**/
-XAresult XARecordItfImpl_GetPosition(XARecordItf self,
- XAmillisecond *pMsec)
-{
+XAresult XARecordItfImpl_GetPosition(XARecordItf self, XAmillisecond *pMsec)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XARecordItfImpl *impl = GetImpl(self);
DEBUG_API("->XARecordItfImpl_GetPosition");
XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaRecorder);
- if( !impl || !pMsec )
- {
+ if (!impl || !pMsec)
+ {
/* invalid parameter */
XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XARecordItfImpl_GetPosition");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
-
- if(impl->adapCtx->fwtype == FWMgrFWGST)
- {
- ret = XARecordItfAdapt_GetPosition((XAAdaptationGstCtx*)impl->adapCtx, pMsec);
- }
+ if (impl->adapCtx->fwtype == FWMgrFWGST)
+ {
+ ret = XARecordItfAdapt_GetPosition(
+ (XAAdaptationGstCtx*) impl->adapCtx, pMsec);
+ }
else
- {
- ret = XARecordItfAdaptMMF_GetPosition((XAAdaptationMMFCtx*)impl->adapCtx, pMsec);
- }
+ {
+ ret = XARecordItfAdaptMMF_GetPosition(
+ (XAAdaptationMMFCtx*) impl->adapCtx, pMsec);
+ }
XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
DEBUG_API("<-XARecordItfImpl_GetPosition");
return ret;
-}
+ }
/**
* XAresult XARecordItfImpl_RegisterCallback(XARecordItf self,
@@ -196,35 +198,34 @@
* Description: Registers the record callback function.
**/
XAresult XARecordItfImpl_RegisterCallback(XARecordItf self,
- xaRecordCallback callback,
- void *pContext)
-{
+ xaRecordCallback callback, void *pContext)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XARecordItfImpl *impl = GetImpl(self);
DEBUG_API("->XARecordItfImpl_RegisterCallback");
- if( !impl )
- {
+ if (!impl)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XARecordItfImpl_RegisterCallback");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
- if( callback )
- {
+ if (callback)
+ {
impl->callback = callback;
- impl->cbcontext = pContext;
+ impl->cbcontext = pContext;
impl->cbPtrToSelf = self;
- }
+ }
else
- {
+ {
/* There is no callback */
- }
+ }
DEBUG_API("<-XARecordItfImpl_RegisterCallback");
return ret;
-}
+ }
/**
* XAresult XARecordItfImpl_SetCallbackEventsMask(XARecordItf self,
@@ -232,74 +233,83 @@
* Description: Sets the notification state of record events.
**/
XAresult XARecordItfImpl_SetCallbackEventsMask(XARecordItf self,
- XAuint32 eventFlags)
-{
+ XAuint32 eventFlags)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XARecordItfImpl* impl = GetImpl(self);
DEBUG_API_A1("->XARecordItfImpl_SetCallbackEventsMask- %lu", eventFlags);
XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaRecorder);
- if(!impl || (eventFlags > (XA_RECORDEVENT_HEADATLIMIT | XA_RECORDEVENT_HEADATMARKER |
- XA_RECORDEVENT_HEADATNEWPOS | XA_RECORDEVENT_HEADMOVING |
- XA_RECORDEVENT_HEADSTALLED | XA_RECORDEVENT_BUFFER_FULL)) )
- {
+ if (!impl || (eventFlags > (XA_RECORDEVENT_HEADATLIMIT
+ | XA_RECORDEVENT_HEADATMARKER | XA_RECORDEVENT_HEADATNEWPOS
+ | XA_RECORDEVENT_HEADMOVING | XA_RECORDEVENT_HEADSTALLED
+ | XA_RECORDEVENT_BUFFER_FULL)))
+ {
/* invalid parameter */
XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XARecordItfImpl_SetCallbackEventsMask");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
impl->eventFlags = eventFlags;
-
- if(impl->adapCtx->fwtype == FWMgrFWGST)
+
+ if (impl->adapCtx->fwtype == FWMgrFWGST)
{
- /* enable position tracking if client wants so */
- if( (eventFlags & (XA_RECORDEVENT_HEADATMARKER | XA_RECORDEVENT_HEADATNEWPOS))
- && impl->adapCtx && !impl->positionupdateOn)
+ /* enable position tracking if client wants so */
+ if ((eventFlags & (XA_RECORDEVENT_HEADATMARKER
+ | XA_RECORDEVENT_HEADATNEWPOS)) && impl->adapCtx
+ && !impl->positionupdateOn)
{
- ret = XARecordItfAdapt_EnablePositionTracking((XAAdaptationGstCtx*)impl->adapCtx, XA_BOOLEAN_TRUE);
- if( ret == XA_RESULT_SUCCESS )
+ ret = XARecordItfAdapt_EnablePositionTracking(
+ (XAAdaptationGstCtx*) impl->adapCtx, XA_BOOLEAN_TRUE);
+ if (ret == XA_RESULT_SUCCESS)
{
- impl->positionupdateOn = XA_BOOLEAN_TRUE;
+ impl->positionupdateOn = XA_BOOLEAN_TRUE;
}
}
- else if( !(eventFlags & (XA_RECORDEVENT_HEADATMARKER | XA_RECORDEVENT_HEADATNEWPOS))
- && impl->adapCtx && impl->positionupdateOn)
+ else if (!(eventFlags & (XA_RECORDEVENT_HEADATMARKER
+ | XA_RECORDEVENT_HEADATNEWPOS)) && impl->adapCtx
+ && impl->positionupdateOn)
{
- ret = XARecordItfAdapt_EnablePositionTracking((XAAdaptationGstCtx*)impl->adapCtx, XA_BOOLEAN_FALSE);
- if( ret == XA_RESULT_SUCCESS )
+ ret = XARecordItfAdapt_EnablePositionTracking(
+ (XAAdaptationGstCtx*) impl->adapCtx, XA_BOOLEAN_FALSE);
+ if (ret == XA_RESULT_SUCCESS)
{
- impl->positionupdateOn = XA_BOOLEAN_FALSE;
+ impl->positionupdateOn = XA_BOOLEAN_FALSE;
}
}
}
else
{
- /* enable position tracking if client wants so */
- if( (eventFlags & (XA_RECORDEVENT_HEADATMARKER | XA_RECORDEVENT_HEADATNEWPOS))
- && impl->adapCtx && !impl->positionupdateOn)
+ /* enable position tracking if client wants so */
+ if ((eventFlags & (XA_RECORDEVENT_HEADATMARKER
+ | XA_RECORDEVENT_HEADATNEWPOS)) && impl->adapCtx
+ && !impl->positionupdateOn)
{
- ret = XARecordItfAdaptMMF_EnablePositionTracking((XAAdaptationMMFCtx*)impl->adapCtx, XA_BOOLEAN_TRUE);
- if( ret == XA_RESULT_SUCCESS )
+ ret = XARecordItfAdaptMMF_EnablePositionTracking(
+ (XAAdaptationMMFCtx*) impl->adapCtx, XA_BOOLEAN_TRUE);
+ if (ret == XA_RESULT_SUCCESS)
{
- impl->positionupdateOn = XA_BOOLEAN_TRUE;
+ impl->positionupdateOn = XA_BOOLEAN_TRUE;
}
}
- else if( !(eventFlags & (XA_RECORDEVENT_HEADATMARKER | XA_RECORDEVENT_HEADATNEWPOS))
- && impl->adapCtx && impl->positionupdateOn)
+ else if (!(eventFlags & (XA_RECORDEVENT_HEADATMARKER
+ | XA_RECORDEVENT_HEADATNEWPOS)) && impl->adapCtx
+ && impl->positionupdateOn)
{
- ret = XARecordItfAdaptMMF_EnablePositionTracking((XAAdaptationMMFCtx*)impl->adapCtx, XA_BOOLEAN_FALSE);
- if( ret == XA_RESULT_SUCCESS )
+ ret = XARecordItfAdaptMMF_EnablePositionTracking(
+ (XAAdaptationMMFCtx*) impl->adapCtx, XA_BOOLEAN_FALSE);
+ if (ret == XA_RESULT_SUCCESS)
{
- impl->positionupdateOn = XA_BOOLEAN_FALSE;
+ impl->positionupdateOn = XA_BOOLEAN_FALSE;
}
- }
+ }
}
XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaRecorder);
DEBUG_API("<-XARecordItfImpl_SetCallbackEventsMask");
return ret;
-}
+ }
/**
* XAresult XARecordItfImpl_GetCallbackEventsMask(XARecordItf self,
@@ -307,27 +317,26 @@
* Description: Queries the notification state of record events.
**/
XAresult XARecordItfImpl_GetCallbackEventsMask(XARecordItf self,
- XAuint32 *pEventFlags)
-{
+ XAuint32 *pEventFlags)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XARecordItfImpl *impl = GetImpl(self);
DEBUG_API("->XARecordItfImpl_GetCallbackEventsMask");
DEBUG_INFO_A1("pEventFlags - %u", pEventFlags);
-
- if( !impl || !pEventFlags )
- {
+ if (!impl || !pEventFlags)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XARecordItfImpl_GetCallbackEventsMask");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pEventFlags = impl->eventFlags;
DEBUG_API("<-XARecordItfImpl_GetCallbackEventsMask");
return ret;
-}
+ }
/**
* XAresult XARecordItfImpl_SetMarkerPosition(XARecordItf self,
@@ -335,49 +344,50 @@
* Description: Sets the position of the recording marker.
**/
XAresult XARecordItfImpl_SetMarkerPosition(XARecordItf self,
- XAmillisecond mSec)
-{
+ XAmillisecond mSec)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XARecordItfImpl *impl = GetImpl(self);
DEBUG_API_A1("->XARecordItfImpl_SetMarkerPosition, mSec-%lu",mSec);
- if( !impl || (( impl->durationLimitSetted) && (mSec > impl->durationLimit) ) )
- {
+ if (!impl
+ || ((impl->durationLimitSetted) && (mSec > impl->durationLimit)))
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XARecordItfImpl_SetMarkerPosition");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
impl->markerPosition = mSec;
DEBUG_API("<-XARecordItfImpl_SetMarkerPosition");
return ret;
-}
+ }
/**
* XAresult XARecordItfImpl_ClearMarkerPosition(XARecordItf self)
* Description: Clears marker.
**/
XAresult XARecordItfImpl_ClearMarkerPosition(XARecordItf self)
-{
+ {
XAresult ret = XA_RESULT_SUCCESS;
XARecordItfImpl *impl = GetImpl(self);
DEBUG_API("->XARecordItfImpl_ClearMarkerPosition");
- if( !impl )
- {
+ if (!impl)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XARecordItfImpl_ClearMarkerPosition");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
impl->markerPosition = NO_POSITION;
DEBUG_API("<-XARecordItfImpl_ClearMarkerPosition");
return ret;
-}
+ }
/**
* XAresult XARecordItfImpl_GetMarkerPosition(XARecordItf self,
@@ -385,29 +395,29 @@
* Description: Queries the position of the recording marker.
**/
XAresult XARecordItfImpl_GetMarkerPosition(XARecordItf self,
- XAmillisecond *pMsec)
-{
+ XAmillisecond *pMsec)
+ {
XARecordItfImpl *impl = GetImpl(self);
DEBUG_API("->XARecordItfImpl_GetMarkerPosition");
- if( !impl || !pMsec )
- {
+ if (!impl || !pMsec)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XARecordItfImpl_GetMarkerPosition");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
- if ( impl->markerPosition == NO_POSITION )
- {
+ }
+ if (impl->markerPosition == NO_POSITION)
+ {
DEBUG_ERR("No marker position set.");
return XA_RESULT_PRECONDITIONS_VIOLATED;
- }
+ }
*pMsec = impl->markerPosition;
DEBUG_API("<-XARecordItfImpl_GetMarkerPosition");
return XA_RESULT_SUCCESS;
-}
+ }
/**
* XAresult XARecordItfImpl_SetPositionUpdatePeriod(XARecordItf self,
@@ -415,25 +425,26 @@
* Description: Sets the interval between periodic position notifications.
**/
XAresult XARecordItfImpl_SetPositionUpdatePeriod(XARecordItf self,
- XAmillisecond mSec)
-{
+ XAmillisecond mSec)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XARecordItfImpl *impl = GetImpl(self);
DEBUG_API_A1("->XARecordItfImpl_SetPositionUpdatePeriod, mSec-%lu",mSec);
- if( !impl || (( impl->durationLimitSetted) && (mSec > impl->durationLimit) ) )
- {
+ if (!impl
+ || ((impl->durationLimitSetted) && (mSec > impl->durationLimit)))
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XARecordItfImpl_SetPositionUpdatePeriod");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
impl->positionUpdatePeriod = mSec;
DEBUG_API("<-XARecordItfImpl_SetPositionUpdatePeriod");
return ret;
-}
+ }
/**
* XAresult XARecordItfImpl_GetPositionUpdatePeriod(XARecordItf self,
@@ -441,55 +452,57 @@
* Description: Queries the interval between periodic position notifications.
**/
XAresult XARecordItfImpl_GetPositionUpdatePeriod(XARecordItf self,
- XAmillisecond *pMsec)
-{
+ XAmillisecond *pMsec)
+ {
XARecordItfImpl *impl = GetImpl(self);
DEBUG_API("->XARecordItfImpl_GetPositionUpdatePeriod");
- if( !impl || !pMsec )
- {
+ if (!impl || !pMsec)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XARecordItfImpl_GetPositionUpdatePeriod");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
*pMsec = impl->positionUpdatePeriod;
DEBUG_API("<-XARecordItfImpl_GetPositionUpdatePeriod");
return XA_RESULT_SUCCESS;
-}
+ }
/*****************************************************************************
* XARecordItfImpl -specific methods
*****************************************************************************/
-
/**
* XARecordItfImpl* XARecordItfImpl_Create()
* Description: Allocate and initialize XARecordItfImpl
**/
-XARecordItfImpl* XARecordItfImpl_Create( XAMediaRecorderImpl* impl )
-{
- XARecordItfImpl* self = (XARecordItfImpl*)
- calloc(1,sizeof(XARecordItfImpl));
-
-
+XARecordItfImpl* XARecordItfImpl_Create(XAMediaRecorderImpl* impl)
+ {
+ XARecordItfImpl* self = (XARecordItfImpl*) calloc(1,
+ sizeof(XARecordItfImpl));
+
DEBUG_API("->XARecordItfImpl_Create");
- if( self )
- {
+ if (self)
+ {
/* init itf default implementation */
self->itf.ClearMarkerPosition = XARecordItfImpl_ClearMarkerPosition;
- self->itf.GetCallbackEventsMask = XARecordItfImpl_GetCallbackEventsMask;
+ self->itf.GetCallbackEventsMask
+ = XARecordItfImpl_GetCallbackEventsMask;
self->itf.GetMarkerPosition = XARecordItfImpl_GetMarkerPosition;
self->itf.GetPosition = XARecordItfImpl_GetPosition;
- self->itf.GetPositionUpdatePeriod = XARecordItfImpl_GetPositionUpdatePeriod;
+ self->itf.GetPositionUpdatePeriod
+ = XARecordItfImpl_GetPositionUpdatePeriod;
self->itf.GetRecordState = XARecordItfImpl_GetRecordState;
self->itf.RegisterCallback = XARecordItfImpl_RegisterCallback;
- self->itf.SetCallbackEventsMask = XARecordItfImpl_SetCallbackEventsMask;
+ self->itf.SetCallbackEventsMask
+ = XARecordItfImpl_SetCallbackEventsMask;
self->itf.SetDurationLimit = XARecordItfImpl_SetDurationLimit;
self->itf.SetMarkerPosition = XARecordItfImpl_SetMarkerPosition;
- self->itf.SetPositionUpdatePeriod = XARecordItfImpl_SetPositionUpdatePeriod;
+ self->itf.SetPositionUpdatePeriod
+ = XARecordItfImpl_SetPositionUpdatePeriod;
self->itf.SetRecordState = XARecordItfImpl_SetRecordState;
/* init variables */
@@ -505,115 +518,122 @@
self->cbPtrToSelf = NULL;
self->pObjImpl = impl;
self->adapCtx = impl->adaptationCtx;
- XAAdaptationBase_AddEventHandler( impl->adaptationCtx, &XARecordItfImpl_AdaptCb, XA_RECORDITFEVENTS, self );
+ XAAdaptationBase_AddEventHandler(impl->adaptationCtx,
+ &XARecordItfImpl_AdaptCb, XA_RECORDITFEVENTS, self);
self->self = self;
+ }DEBUG_API("<-XARecordItfImpl_Create");
+ return self;
}
- DEBUG_API("<-XARecordItfImpl_Create");
- return self;
-}
/**
* void XARecordItfImpl_Free(XARecordItfImpl* self)
* Description: Free all resources reserved at XARecordItfImpl_Create
**/
void XARecordItfImpl_Free(XARecordItfImpl* self)
-{
+ {
DEBUG_API("->XARecordItfImpl_Free");
assert( self==self->self );
- XAAdaptationBase_RemoveEventHandler( self->adapCtx, &XARecordItfImpl_AdaptCb );
- free( self );
+ XAAdaptationBase_RemoveEventHandler(self->adapCtx,
+ &XARecordItfImpl_AdaptCb);
+ free(self);
DEBUG_API("<-XARecordItfImpl_Free");
-}
+ }
/* void XARecordItfImpl_AdaptCb
* Description: Listen changes in adaptation
*/
-void XARecordItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
-{
- XARecordItfImpl* impl = (XARecordItfImpl*)pHandlerCtx;
+void XARecordItfImpl_AdaptCb(void *pHandlerCtx, XAAdaptEvent *event)
+ {
+ XARecordItfImpl* impl = (XARecordItfImpl*) pHandlerCtx;
DEBUG_API("->XARecordItfImpl_AdaptCb");
- if(!impl)
- {
+ if (!impl)
+ {
DEBUG_ERR("XARecordItfImpl_AdaptCb, invalid context pointer!");
DEBUG_API("<-XARecordItfImpl_AdaptCb");
return;
- }
+ }
assert(event);
/* check position update events */
- if( event->eventid == XA_ADAPT_POSITION_UPDATE_EVT )
- {
+ if (event->eventid == XA_ADAPT_POSITION_UPDATE_EVT)
+ {
XAuint32 newpos = 0;
assert(event->data);
- newpos = *((XAuint32*)(event->data));
+ newpos = *((XAuint32*) (event->data));
DEBUG_INFO_A1("new position %u",newpos);
/* check if marker passed and callback needed */
- if( (impl->markerPosition != NO_POSITION) &&
- (impl->eventFlags & XA_RECORDEVENT_HEADATMARKER) )
- {
- if( (impl->lastPosition < impl->markerPosition) &&
- (newpos >= impl->markerPosition) &&
- impl->callback )
+ if ((impl->markerPosition != NO_POSITION) && (impl->eventFlags
+ & XA_RECORDEVENT_HEADATMARKER))
{
- impl->callback(impl->cbPtrToSelf, impl->cbcontext, XA_RECORDEVENT_HEADATMARKER);
+ if ((impl->lastPosition < impl->markerPosition) && (newpos
+ >= impl->markerPosition) && impl->callback)
+ {
+ impl->callback(impl->cbPtrToSelf, impl->cbcontext,
+ XA_RECORDEVENT_HEADATMARKER);
+ }
}
- }
/* check if update period passed and callback needed */
- if( (impl->positionUpdatePeriod > 0) &&
- (impl->eventFlags & XA_RECORDEVENT_HEADATNEWPOS) &&
- impl->callback )
- {
- if( (XAuint32)((impl->lastPosition)/(impl->positionUpdatePeriod )) <
- (XAuint32)(newpos/(impl->positionUpdatePeriod )) )
+ if ((impl->positionUpdatePeriod > 0) && (impl->eventFlags
+ & XA_RECORDEVENT_HEADATNEWPOS) && impl->callback)
{
- impl->callback(impl->cbPtrToSelf, impl->cbcontext, XA_RECORDEVENT_HEADATNEWPOS);
+ if ((XAuint32) ((impl->lastPosition)
+ / (impl->positionUpdatePeriod)) < (XAuint32) (newpos
+ / (impl->positionUpdatePeriod)))
+ {
+ impl->callback(impl->cbPtrToSelf, impl->cbcontext,
+ XA_RECORDEVENT_HEADATNEWPOS);
+ }
}
- }
/* store position */
impl->lastPosition = newpos;
/* Check have we reached record duration limit */
- if ( impl->durationLimitSetted)
- {
- if ( impl->callback && (impl->lastPosition >= impl->durationLimit ))
+ if (impl->durationLimitSetted)
{
- impl->itf.SetRecordState(impl->cbPtrToSelf,XA_RECORDSTATE_STOPPED);
- impl->callback(impl->cbPtrToSelf, impl->cbcontext, XA_RECORDEVENT_HEADATLIMIT);
+ if (impl->callback && (impl->lastPosition >= impl->durationLimit))
+ {
+ impl->itf.SetRecordState(impl->cbPtrToSelf,
+ XA_RECORDSTATE_STOPPED);
+ impl->callback(impl->cbPtrToSelf, impl->cbcontext,
+ XA_RECORDEVENT_HEADATLIMIT);
+ }
}
}
- }
- else if( event->eventid == XA_RECORDEVENT_HEADSTALLED )
- {
+ else if (event->eventid == XA_RECORDEVENT_HEADSTALLED)
+ {
impl->recordState = XA_RECORDSTATE_PAUSED;
/* send callback if needed */
- if( (XA_RECORDEVENT_HEADSTALLED & impl->eventFlags) && impl->callback )
- {
- impl->callback(impl->cbPtrToSelf, impl->cbcontext, XA_RECORDEVENT_HEADSTALLED);
+ if ((XA_RECORDEVENT_HEADSTALLED & impl->eventFlags) && impl->callback)
+ {
+ impl->callback(impl->cbPtrToSelf, impl->cbcontext,
+ XA_RECORDEVENT_HEADSTALLED);
+ }
}
- }
- else if( event->eventid == XA_RECORDEVENT_BUFFER_FULL )
- {
+ else if (event->eventid == XA_RECORDEVENT_BUFFER_FULL)
+ {
/* Adaptation is set to pause, need to sync state with AL-layer*/
impl->recordState = XA_RECORDSTATE_STOPPED;
/* send callback if needed */
- if( (XA_RECORDEVENT_BUFFER_FULL & impl->eventFlags) && impl->callback )
- {
- impl->callback(impl->cbPtrToSelf, impl->cbcontext, XA_RECORDEVENT_BUFFER_FULL);
+ if ((XA_RECORDEVENT_BUFFER_FULL & impl->eventFlags) && impl->callback)
+ {
+ impl->callback(impl->cbPtrToSelf, impl->cbcontext,
+ XA_RECORDEVENT_BUFFER_FULL);
+ }
}
- }
- else if( event->eventid == XA_RECORDEVENT_HEADMOVING )
- {
+ else if (event->eventid == XA_RECORDEVENT_HEADMOVING)
+ {
/* send callback if needed */
- if( (XA_RECORDEVENT_HEADMOVING & impl->eventFlags) && impl->callback )
- {
- impl->callback(impl->cbPtrToSelf, impl->cbcontext, XA_RECORDEVENT_HEADMOVING);
+ if ((XA_RECORDEVENT_HEADMOVING & impl->eventFlags) && impl->callback)
+ {
+ impl->callback(impl->cbPtrToSelf, impl->cbcontext,
+ XA_RECORDEVENT_HEADMOVING);
+ }
}
- }
else
- {
+ {
/* do nothing */
+ }
+
+ DEBUG_API("<-XARecordItfImpl_AdaptCb");
}
- DEBUG_API("<-XARecordItfImpl_AdaptCb");
-}
-
--- a/khronosfws/openmax_al/src/mediarecorder/xarecorditf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mediarecorder/xarecorditf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Record Itf Impl
+ *
+ */
#ifndef XARECORDITF_H
#define XARECORDITF_H
@@ -35,7 +35,7 @@
/** STRUCTURES **/
/* Definition of XARecordItf implementation */
typedef struct XARecordItfImpl_
-{
+ {
/* parent interface */
struct XARecordItf_ itf;
/* pointer to self */
@@ -43,70 +43,66 @@
XAMediaRecorderImpl* pObjImpl;
/* variables */
- XAuint32 recordState;
- XAboolean durationLimitSetted;
- XAmillisecond durationLimit;
- XAmillisecond markerPosition;
- XAmillisecond positionUpdatePeriod;
- void *cbcontext;
- XAuint32 eventFlags;
- XAboolean positionupdateOn;
- XAmillisecond lastPosition;
+ XAuint32 recordState;
+ XAboolean durationLimitSetted;
+ XAmillisecond durationLimit;
+ XAmillisecond markerPosition;
+ XAmillisecond positionUpdatePeriod;
+ void *cbcontext;
+ XAuint32 eventFlags;
+ XAboolean positionupdateOn;
+ XAmillisecond lastPosition;
xaRecordCallback callback;
- void* context;
- XARecordItf cbPtrToSelf;
+ void* context;
+ XARecordItf cbPtrToSelf;
/*Adaptation variables*/
XAAdaptationBaseCtx *adapCtx;
-} XARecordItfImpl;
+ } XARecordItfImpl;
/** METHODS **/
/* Base interface XARecordItf implementation
* See API Specification for method documentation
*/
-XAresult XARecordItfImpl_SetRecordState( XARecordItf self,
- XAuint32 state );
+XAresult XARecordItfImpl_SetRecordState(XARecordItf self, XAuint32 state);
-XAresult XARecordItfImpl_GetRecordState( XARecordItf self,
- XAuint32 *pState );
+XAresult XARecordItfImpl_GetRecordState(XARecordItf self, XAuint32 *pState);
+
+XAresult XARecordItfImpl_SetDurationLimit(XARecordItf self,
+ XAmillisecond msec);
-XAresult XARecordItfImpl_SetDurationLimit( XARecordItf self,
- XAmillisecond msec );
+XAresult XARecordItfImpl_GetPosition(XARecordItf self, XAmillisecond *pMsec);
-XAresult XARecordItfImpl_GetPosition( XARecordItf self,
- XAmillisecond *pMsec );
+XAresult XARecordItfImpl_RegisterCallback(XARecordItf self,
+ xaRecordCallback callback, void *pContext);
-XAresult XARecordItfImpl_RegisterCallback( XARecordItf self,
- xaRecordCallback callback,
- void *pContext );
+XAresult XARecordItfImpl_SetCallbackEventsMask(XARecordItf self,
+ XAuint32 eventFlags);
-XAresult XARecordItfImpl_SetCallbackEventsMask( XARecordItf self,
- XAuint32 eventFlags );
+XAresult XARecordItfImpl_GetCallbackEventsMask(XARecordItf self,
+ XAuint32 *pEventFlags);
-XAresult XARecordItfImpl_GetCallbackEventsMask( XARecordItf self,
- XAuint32 *pEventFlags );
+XAresult XARecordItfImpl_SetMarkerPosition(XARecordItf self,
+ XAmillisecond mSec);
-XAresult XARecordItfImpl_SetMarkerPosition( XARecordItf self,
- XAmillisecond mSec );
+XAresult XARecordItfImpl_ClearMarkerPosition(XARecordItf self);
-XAresult XARecordItfImpl_ClearMarkerPosition( XARecordItf self );
-
-XAresult XARecordItfImpl_GetMarkerPosition( XARecordItf self,
- XAmillisecond *pMsec );
+XAresult XARecordItfImpl_GetMarkerPosition(XARecordItf self,
+ XAmillisecond *pMsec);
-XAresult XARecordItfImpl_SetPositionUpdatePeriod( XARecordItf self,
- XAmillisecond mSec );
+XAresult XARecordItfImpl_SetPositionUpdatePeriod(XARecordItf self,
+ XAmillisecond mSec);
-XAresult XARecordItfImpl_GetPositionUpdatePeriod( XARecordItf self,
- XAmillisecond *pMsec );
+XAresult XARecordItfImpl_GetPositionUpdatePeriod(XARecordItf self,
+ XAmillisecond *pMsec);
/* XARecordItfImpl -specific methods */
-XARecordItfImpl* XARecordItfImpl_Create( XAMediaRecorderImpl* impl );
-void XARecordItfImpl_Free( XARecordItfImpl* self );
-void XARecordItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
+XARecordItfImpl* XARecordItfImpl_Create(XAMediaRecorderImpl* impl);
+void XARecordItfImpl_Free(XARecordItfImpl* self);
+void XARecordItfImpl_AdaptCb(void *pHandlerCtx, XAAdaptEvent *event);
#endif
- /* XARECORDITF_H */
+/* XARECORDITF_H */
--- a/khronosfws/openmax_al/src/metadataextractor/xametadataextractor.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/metadataextractor/xametadataextractor.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Metadata Extractor Object Impl
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
@@ -32,18 +32,16 @@
#include "xaadaptationmmf.h"
#include "xametadataadaptctxmmf.h"
-
/* Static mapping of enumeration XAMetadataInterfaces to interface iids */
-static const XAInterfaceID* xaMetadataExtractorItfIIDs[MDE_ITFCOUNT]=
-{
- &XA_IID_OBJECT,
- &XA_IID_DYNAMICINTERFACEMANAGEMENT,
- &XA_IID_METADATAEXTRACTION,
- &XA_IID_METADATATRAVERSAL,
- &XA_IID_CONFIGEXTENSION,
- &XA_IID_DYNAMICSOURCE
-};
-
+static const XAInterfaceID* xaMetadataExtractorItfIIDs[MDE_ITFCOUNT] =
+ {
+ &XA_IID_OBJECT,
+ &XA_IID_DYNAMICINTERFACEMANAGEMENT,
+ &XA_IID_METADATAEXTRACTION,
+ &XA_IID_METADATATRAVERSAL,
+ &XA_IID_CONFIGEXTENSION,
+ &XA_IID_DYNAMICSOURCE
+ };
/*****************************************************************************
* Global methods
@@ -54,195 +52,191 @@
* Add this method to XAGlobals.h
*/
XAresult XAMetadataExtractorImpl_Create(FrameworkMap* mapper,
- XACapabilities* capabilities,
- XAObjectItf *pMetadataExtractor,
- XADataSource *pDataSource,
- XAuint32 numInterfaces,
- const XAInterfaceID * pInterfaceIds,
- const XAboolean * pInterfaceRequired)
-{
+ XACapabilities* capabilities, XAObjectItf *pMetadataExtractor,
+ XADataSource *pDataSource, XAuint32 numInterfaces,
+ const XAInterfaceID * pInterfaceIds,
+ const XAboolean * pInterfaceRequired)
+ {
XAMetadataExtractorImpl* pImpl = NULL;
XAObjectItfImpl* pBaseObj = NULL;
XAuint8 itfIndex = 0;
FWMgrFwType fwType;
- const char *uri = NULL;
+ const char *uri = NULL;
XAresult res = XA_RESULT_SUCCESS;
DEBUG_API("->XAMetadataExtractorImpl_Create");
XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaPlayer);
- if( !pMetadataExtractor )
- {
+ if (!pMetadataExtractor)
+ {
XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer);
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
/* invalid parameter */
DEBUG_API("<-XAMetadataExtractorImpl_Create");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
- res = XACommon_CheckDataSource(pDataSource,NULL);
- if(res!=XA_RESULT_SUCCESS)
- {
+ res = XACommon_CheckDataSource(pDataSource, NULL);
+ if (res != XA_RESULT_SUCCESS)
+ {
XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer);
DEBUG_API("<-XAMetadataExtractorImpl_Create");
return res;
- }
+ }
/* instantiate object implementation */
- pImpl = (XAMetadataExtractorImpl*)calloc(1,sizeof(XAMetadataExtractorImpl));
- if(!pImpl)
- {
+ pImpl = (XAMetadataExtractorImpl*) calloc(1,
+ sizeof(XAMetadataExtractorImpl));
+ if (!pImpl)
+ {
XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer);
DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
/* memory allocation failed */
DEBUG_API("<-XAMetadataExtractorImpl_Create");
return XA_RESULT_MEMORY_FAILURE;
- }
+ }
pBaseObj = &pImpl->baseObj;
/* Initialize base object default implementation */
- XAObjectItfImpl_Init(pBaseObj,
- MDE_ITFCOUNT,
- xaMetadataExtractorItfIIDs,
- XAMetadataExtractorImpl_DoRealize,
- XAMetadataExtractorImpl_DoResume,
- XAMetadataExtractorImpl_FreeResources);
+ XAObjectItfImpl_Init(pBaseObj, MDE_ITFCOUNT, xaMetadataExtractorItfIIDs,
+ XAMetadataExtractorImpl_DoRealize,
+ XAMetadataExtractorImpl_DoResume,
+ XAMetadataExtractorImpl_FreeResources);
/* Mark interfaces that need to be exposed */
/* Implicit and mandated interfaces */
- pBaseObj->interfaceMap[MDE_METADATAEXTRACTIONITF].required = XA_BOOLEAN_TRUE;
- pBaseObj->interfaceMap[MDE_METADATATRAVERSALITF].required = XA_BOOLEAN_TRUE;
+ pBaseObj->interfaceMap[MDE_METADATAEXTRACTIONITF].required
+ = XA_BOOLEAN_TRUE;
+ pBaseObj->interfaceMap[MDE_METADATATRAVERSALITF].required
+ = XA_BOOLEAN_TRUE;
pBaseObj->interfaceMap[MDE_DYNAMICSOURCEITF].required = XA_BOOLEAN_TRUE;
pBaseObj->interfaceMap[MDE_DIMITF].required = XA_BOOLEAN_TRUE;
/* Explicit interfaces */
- if ((numInterfaces != 0) && pInterfaceIds && pInterfaceRequired )
- {
+ if ((numInterfaces != 0) && pInterfaceIds && pInterfaceRequired)
+ {
/* Check required interfaces */
- for(itfIndex = 0; itfIndex < numInterfaces; itfIndex++)
- {
+ for (itfIndex = 0; itfIndex < numInterfaces; itfIndex++)
+ {
/* If mapEntry is null then required interface is not supported.*/
- XAObjItfMapEntry *entry =
- XAObjectItfImpl_GetItfEntry((XAObjectItf)&(pBaseObj), pInterfaceIds[itfIndex]);
- if( !entry )
- {
- if( pInterfaceRequired[itfIndex] )
+ XAObjItfMapEntry *entry = XAObjectItfImpl_GetItfEntry(
+ (XAObjectItf) &(pBaseObj), pInterfaceIds[itfIndex]);
+ if (!entry)
{
+ if (pInterfaceRequired[itfIndex])
+ {
/* required interface cannot be accommodated - fail creation */
- XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
+ XAObjectItfImpl_Destroy((XAObjectItf) &(pBaseObj));
XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer);
DEBUG_ERR("Required interface not found - abort creation!");
DEBUG_API("<-XAMetadataExtractorImpl_Create");
return XA_RESULT_FEATURE_UNSUPPORTED;
- }
+ }
else
- {
+ {
DEBUG_INFO("Requested (not required) interface not found - continue creation");
+ }
}
- }
else
- {
+ {
entry->required = XA_BOOLEAN_TRUE;
+ }
}
}
- }
-
// Mark interfaces that can be handled dynamically
- pBaseObj->interfaceMap[MDE_CONFIGEXTENSIONITF].isDynamic = XA_BOOLEAN_TRUE;
+ pBaseObj->interfaceMap[MDE_CONFIGEXTENSIONITF].isDynamic
+ = XA_BOOLEAN_TRUE;
- //Set ObjectItf to point to newly created object
- *pMetadataExtractor = (XAObjectItf)&(pBaseObj->self);
+ //Set ObjectItf to point to newly created object
+ *pMetadataExtractor = (XAObjectItf) &(pBaseObj->self);
- //store member variables
- pImpl->dataSrc = pDataSource;
+ //store member variables
+ pImpl->dataSrc = pDataSource;
- /* Determine framework type that can handle recording */
- fwType = (FWMgrFwType)FWMgrMOUnknown;
+ /* Determine framework type that can handle recording */
+ fwType = (FWMgrFwType) FWMgrMOUnknown;
/**/
if (pDataSource->pLocator)
- {
- XADataLocator_URI* dataLoc = (XADataLocator_URI*)pDataSource->pLocator;
+ {
+ XADataLocator_URI* dataLoc =
+ (XADataLocator_URI*) pDataSource->pLocator;
if (dataLoc->locatorType == XA_DATALOCATOR_URI)
- {
- uri = (char*)dataLoc->URI;
+ {
+ uri = (char*) dataLoc->URI;
+ }
}
- }
-
+
fwType = XAFrameworkMgr_GetFramework(mapper, uri, FWMgrMOPlayer);
if (fwType == FWMgrMOUnknown)
- {
- XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
+ {
+ XAObjectItfImpl_Destroy((XAObjectItf) &(pBaseObj));
XA_IMPL_THREAD_SAFETY_EXIT( XATSMediaPlayer );
DEBUG_API("<-XAMetadataExtractorImpl_Create");
return XA_RESULT_CONTENT_UNSUPPORTED;
- }
-
- if(fwType == FWMgrFWMMF)
- {
+ }
+
+ if (fwType == FWMgrFWMMF)
+ {
pImpl->adaptationCtxMMF = XAMetadataAdaptCtxMMF_Create(pDataSource);
-
- pImpl->curAdaptCtx = pImpl->adaptationCtxMMF;
- }
+
+ pImpl->curAdaptCtx = pImpl->adaptationCtxMMF;
+ }
else
- {
- // Create metadata adaptation context
- pImpl->adaptationCtxGst = XAMetadataAdaptCtx_Create(pDataSource);
-
- pImpl->curAdaptCtx = pImpl->adaptationCtxGst;
- }
+ {
+ // Create metadata adaptation context
+ pImpl->adaptationCtxGst = XAMetadataAdaptCtx_Create(pDataSource);
+
+ pImpl->curAdaptCtx = pImpl->adaptationCtxGst;
+ }
XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer);
DEBUG_API("<-XAMetadataExtractorImpl_Create");
return XA_RESULT_SUCCESS;
-}
+ }
/* XAResult XAMetadataExtractorImpl_QueryNumSupportedInterfaces
* Description: Statically query number of supported interfaces
*/
XAresult XAMetadataExtractorImpl_QueryNumSupportedInterfaces(
- XAuint32 *pNumSupportedInterfaces)
-{
+ XAuint32 *pNumSupportedInterfaces)
+ {
XAresult res = XA_RESULT_SUCCESS;
DEBUG_API("->XAMetadataExtractorImpl_QueryNumSupportedInterfaces");
- if(pNumSupportedInterfaces)
- {
+ if (pNumSupportedInterfaces)
+ {
*pNumSupportedInterfaces = MDE_ITFCOUNT;
res = XA_RESULT_SUCCESS;
- }
+ }
else
- {
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
res = XA_RESULT_PARAMETER_INVALID;
+ }DEBUG_API_A1("<-XAMetadataExtractorImpl_QueryNumSupportedInterfaces (%d)", (int)res);
+ return res;
}
- DEBUG_API_A1("<-XAMetadataExtractorImpl_QueryNumSupportedInterfaces (%d)", (int)res);
- return res;
-}
/* XAResult XAMetadataExtractorImpl_QuerySupportedInterfaces
* Description: Statically query supported interfaces
*/
-XAresult XAMetadataExtractorImpl_QuerySupportedInterfaces(
- XAuint32 index,
- XAInterfaceID * pInterfaceId)
-{
+XAresult XAMetadataExtractorImpl_QuerySupportedInterfaces(XAuint32 index,
+ XAInterfaceID * pInterfaceId)
+ {
XAresult res = XA_RESULT_SUCCESS;
DEBUG_API("->XAMetadataExtractorImpl_QuerySupportedInterfaces");
- if (index >= MDE_ITFCOUNT || !pInterfaceId )
- {
+ if (index >= MDE_ITFCOUNT || !pInterfaceId)
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
res = XA_RESULT_PARAMETER_INVALID;
- }
+ }
else
- {
+ {
*pInterfaceId = *(xaMetadataExtractorItfIIDs[index]);
res = XA_RESULT_SUCCESS;
- }
- DEBUG_API_A1("<-XAMetadataExtractorImpl_QuerySupportedInterfaces (%d)", (int)res);
+ }DEBUG_API_A1("<-XAMetadataExtractorImpl_QuerySupportedInterfaces (%d)", (int)res);
return res;
-}
-
+ }
/*****************************************************************************
* base object XAObjectItfImpl methods
@@ -253,11 +247,11 @@
* Create and initialize implementation-specific variables.
* Called from base object XAObjectItfImpl
*/
-XAresult XAMetadataExtractorImpl_DoRealize( XAObjectItf self )
-{
+XAresult XAMetadataExtractorImpl_DoRealize(XAObjectItf self)
+ {
XAuint8 itfIdx = 0;
- XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
- XAMetadataExtractorImpl* pObjImpl = (XAMetadataExtractorImpl*)(pObj);
+ XAObjectItfImpl* pObj = (XAObjectItfImpl*) (*self);
+ XAMetadataExtractorImpl* pObjImpl = (XAMetadataExtractorImpl*) (pObj);
void *pItf = NULL;
XAresult ret = XA_RESULT_SUCCESS;
@@ -265,124 +259,129 @@
XA_IMPL_THREAD_SAFETY_ENTRY(XATSMediaPlayer);
/* check casting from correct pointer type */
- if( !pObjImpl || pObj != pObjImpl->baseObj.self )
- {
+ if (!pObjImpl || pObj != pObjImpl->baseObj.self)
+ {
XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer);
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
/* invalid parameter */
DEBUG_API("<-XAMetadataExtractorImpl_DoRealize");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
/* Realize all implicit and explicitly wanted interfaces */
- for(itfIdx=0; itfIdx<MDE_ITFCOUNT; itfIdx++)
- {
- if(!(pObj->interfaceMap[itfIdx].pItf) &&
- pObj->interfaceMap[itfIdx].required )
+ for (itfIdx = 0; itfIdx < MDE_ITFCOUNT; itfIdx++)
{
- switch(itfIdx)
+ if (!(pObj->interfaceMap[itfIdx].pItf)
+ && pObj->interfaceMap[itfIdx].required)
{
+ switch (itfIdx)
+ {
case MDE_DIMITF:
pItf = XADIMItfImpl_Create();
- if(pItf)
- {
+ if (pItf)
+ {
XADIMItfImpl_Init(pItf, self,
- XAMetadataExtractorImpl_DoAddItf,
- XAMetadataExtractorImpl_DoResumeItf,
- XAMetadataExtractorImpl_DoRemoveItf);
- }
+ XAMetadataExtractorImpl_DoAddItf,
+ XAMetadataExtractorImpl_DoResumeItf,
+ XAMetadataExtractorImpl_DoRemoveItf);
+ }
break;
case MDE_METADATAEXTRACTIONITF:
- pItf = XAMetadataExtractionItfImpl_Create( pObjImpl->curAdaptCtx );
+ pItf = XAMetadataExtractionItfImpl_Create(
+ pObjImpl->curAdaptCtx);
break;
case MDE_METADATATRAVERSALITF:
- pItf = XAMetadataTraversalItfImpl_Create( pObjImpl->curAdaptCtx );
+ pItf = XAMetadataTraversalItfImpl_Create(
+ pObjImpl->curAdaptCtx);
break;
case MDE_CONFIGEXTENSIONITF:
pItf = XAConfigExtensionsItfImpl_Create();
- XAConfigExtensionsItfImpl_SetContext( pItf, pObjImpl->curAdaptCtx );
+ XAConfigExtensionsItfImpl_SetContext(pItf,
+ pObjImpl->curAdaptCtx);
break;
case MDE_DYNAMICSOURCEITF:
- pItf = XADynamicSourceItfImpl_Create( pObjImpl->curAdaptCtx );
+ pItf = XADynamicSourceItfImpl_Create(
+ pObjImpl->curAdaptCtx);
break;
default:
break;
- }
- if(!pItf)
- {
+ }
+ if (!pItf)
+ {
XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer);
DEBUG_ERR("XA_RESULT_MEMORY_FAILURE");
/* memory allocation failed */
DEBUG_API("<-XAMetadataExtractorImpl_DoRealize");
return XA_RESULT_MEMORY_FAILURE;
- }
+ }
else
- {
+ {
pObj->interfaceMap[itfIdx].pItf = pItf;
+ }
}
}
- }
/*Initialize adaptation context*/
/* init adaptation */
- if(pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
- {
- ret = XAMetadataAdaptCtxMMF_PostInit( (XAAdaptationMMFCtx*)pObjImpl->adaptationCtxMMF );
- }
+ if (pObjImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+ {
+ ret = XAMetadataAdaptCtxMMF_PostInit(
+ (XAAdaptationMMFCtx*) pObjImpl->adaptationCtxMMF);
+ }
else
- {
- ret = XAMetadataAdaptCtx_PostInit( (XAAdaptationGstCtx*)pObjImpl->adaptationCtxGst );
- }
+ {
+ ret = XAMetadataAdaptCtx_PostInit(
+ (XAAdaptationGstCtx*) pObjImpl->adaptationCtxGst);
+ }
- if ( ret != XA_RESULT_SUCCESS )
- {
+ if (ret != XA_RESULT_SUCCESS)
+ {
XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer);
DEBUG_ERR("Adaptation init failed!");
DEBUG_API("<-XAMetadataExtractorImpl_DoRealize");
return ret;
- }
+ }
pObj->state = XA_OBJECT_STATE_REALIZED;
XA_IMPL_THREAD_SAFETY_EXIT(XATSMediaPlayer);
DEBUG_API("<-XAMetadataExtractorImpl_DoRealize");
return XA_RESULT_SUCCESS;
-}
+ }
/* XAresult XAMetadataExtractorImpl_DoResume
* Description: Resume object from suspended state
*/
XAresult XAMetadataExtractorImpl_DoResume(XAObjectItf self)
-{
+ {
DEBUG_API("->XAMetadataExtractorImpl_DoResume");
DEBUG_API("<-XAMetadataExtractorImpl_DoResume");
/* "suspended" state not supported by this implementation */
return XA_RESULT_PRECONDITIONS_VIOLATED;
-}
+ }
/* void XAMetadataExtractorImpl_FreeResources
* Description: Free all resources reserved at XAMetadataExtractorImpl_DoRealize()
*/
void XAMetadataExtractorImpl_FreeResources(XAObjectItf self)
-{
- XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
-
+ {
+ XAObjectItfImpl* pObj = (XAObjectItfImpl*) (*self);
+
XAuint8 itfIdx = 0;
void *pItf = NULL;
- XAMetadataExtractorImpl* pImpl = (XAMetadataExtractorImpl*)(*self);
+ XAMetadataExtractorImpl* pImpl = (XAMetadataExtractorImpl*) (*self);
DEBUG_API("->XAMetadataExtractorImpl_FreeResources");
XA_IMPL_THREAD_SAFETY_ENTRY_FOR_VOID_FUNCTIONS(XATSMediaPlayer);
-
assert( pObj && pImpl && pObj == pObj->self );
- for(itfIdx = 0; itfIdx < MDE_ITFCOUNT; itfIdx++)
- {
+ for (itfIdx = 0; itfIdx < MDE_ITFCOUNT; itfIdx++)
+ {
pItf = pObj->interfaceMap[itfIdx].pItf;
- if(pItf)
- {
- switch(itfIdx)
+ if (pItf)
{
+ switch (itfIdx)
+ {
case MDE_METADATAEXTRACTIONITF:
XAMetadataExtractionItfImpl_Free(pItf);
break;
@@ -398,31 +397,33 @@
case MDE_CONFIGEXTENSIONITF:
XAConfigExtensionsItfImpl_Free(pItf);
break;
+ }
+ pObj->interfaceMap[itfIdx].pItf = NULL;
}
- pObj->interfaceMap[itfIdx].pItf = NULL;
}
- }
-
- if(pImpl->curAdaptCtx)
- {
- if(pImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
- {
- XAMetadataAdaptCtxMMF_Destroy( (XAAdaptationMMFCtx*)pImpl->adaptationCtxMMF );
- pImpl->adaptationCtxMMF = NULL;
- }
- else
- {
- XAMetadataAdaptCtx_Destroy( (XAAdaptationGstCtx*)pImpl->adaptationCtxGst );
- pImpl->adaptationCtxGst = NULL;
- }
- }
-
- pImpl->curAdaptCtx = NULL;
+
+ if (pImpl->curAdaptCtx)
+ {
+ if (pImpl->curAdaptCtx->fwtype == FWMgrFWMMF)
+ {
+ XAMetadataAdaptCtxMMF_Destroy(
+ (XAAdaptationMMFCtx*) pImpl->adaptationCtxMMF);
+ pImpl->adaptationCtxMMF = NULL;
+ }
+ else
+ {
+ XAMetadataAdaptCtx_Destroy(
+ (XAAdaptationGstCtx*) pImpl->adaptationCtxGst);
+ pImpl->adaptationCtxGst = NULL;
+ }
+ }
+
+ pImpl->curAdaptCtx = NULL;
XA_IMPL_THREAD_SAFETY_EXIT_FOR_VOID_FUNCTIONS(XATSMediaPlayer);
DEBUG_API("<-XAMetadataExtractorImpl_FreeResources");
return;
-}
+ }
/*****************************************************************************
* MetadataExtractorImpl -specific methods
@@ -431,85 +432,91 @@
/* XAMetadataExtractorImpl_DoAddItf
* Dynamically add an interface, object specific parts
*/
-XAresult XAMetadataExtractorImpl_DoAddItf(XAObjectItf self, XAObjItfMapEntry *mapEntry )
-{
+XAresult XAMetadataExtractorImpl_DoAddItf(XAObjectItf self,
+ XAObjItfMapEntry *mapEntry)
+ {
- XAObjectItfImpl* pObj = (XAObjectItfImpl*)(*self);
- XAMetadataExtractorImpl* pImpl = (XAMetadataExtractorImpl*)(pObj);
+ XAObjectItfImpl* pObj = (XAObjectItfImpl*) (*self);
+ XAMetadataExtractorImpl* pImpl = (XAMetadataExtractorImpl*) (pObj);
XAresult ret = XA_RESULT_SUCCESS;
DEBUG_API("->XAMetadataExtractorImpl_DoAddItf");
- if(mapEntry)
- {
- switch( mapEntry->mapIdx )
+ if (mapEntry)
{
+ switch (mapEntry->mapIdx)
+ {
case MDE_CONFIGEXTENSIONITF:
mapEntry->pItf = XAConfigExtensionsItfImpl_Create();
- XAConfigExtensionsItfImpl_SetContext( mapEntry->pItf, pImpl->adaptationCtxGst);
+ XAConfigExtensionsItfImpl_SetContext(mapEntry->pItf,
+ pImpl->adaptationCtxGst);
break;
default:
- DEBUG_ERR("XAMetadataExtractorImpl_DoAddItf unknown id");
+ DEBUG_ERR("XAMetadataExtractorImpl_DoAddItf unknown id")
+ ;
ret = XA_RESULT_FEATURE_UNSUPPORTED;
break;
- }
- if( !mapEntry->pItf && ret == XA_RESULT_SUCCESS)
- {
+ }
+ if (!mapEntry->pItf && ret == XA_RESULT_SUCCESS)
+ {
DEBUG_ERR("XAMetadataExtractorImpl_DoAddItf itf creation failed");
ret = XA_RESULT_MEMORY_FAILURE;
+ }
}
- }
else
- {
+ {
ret = XA_RESULT_PARAMETER_INVALID;
- }
+ }
DEBUG_API("<-XAMetadataExtractorImpl_DoAddItf");
return ret;
-}
+ }
/* XAMetadataExtractorImpl_DoResumeItf
* Try to resume lost interface, object specific parts
*/
-XAresult XAMetadataExtractorImpl_DoResumeItf(XAObjectItf self, XAObjItfMapEntry *mapEntry )
-{
+XAresult XAMetadataExtractorImpl_DoResumeItf(XAObjectItf self,
+ XAObjItfMapEntry *mapEntry)
+ {
XAresult ret = XA_RESULT_SUCCESS;
DEBUG_API("->XAMetadataExtractorImpl_DoResumeItf");
/* For now, no difference between suspended and unrealised itfs */
- ret = XAMetadataExtractorImpl_DoAddItf(self,mapEntry);
+ ret = XAMetadataExtractorImpl_DoAddItf(self, mapEntry);
DEBUG_API("<-XAMetadataExtractorImpl_DoResumeItf");
return ret;
-}
+ }
/* XAMetadataExtractorImpl_DoRemoveItf
* Dynamically remove an interface, object specific parts
*/
-XAresult XAMetadataExtractorImpl_DoRemoveItf(XAObjectItf self, XAObjItfMapEntry *mapEntry )
-{
+XAresult XAMetadataExtractorImpl_DoRemoveItf(XAObjectItf self,
+ XAObjItfMapEntry *mapEntry)
+ {
XAresult ret = XA_RESULT_SUCCESS;
DEBUG_API("->XAMetadataExtractorImpl_DoRemoveItf");
ret = XA_RESULT_SUCCESS;
- if(mapEntry)
- {
- switch( mapEntry->mapIdx )
+ if (mapEntry)
{
+ switch (mapEntry->mapIdx)
+ {
case MDE_CONFIGEXTENSIONITF:
XAConfigExtensionsItfImpl_Free(mapEntry->pItf);
break;
default:
- DEBUG_ERR("XAMetadataExtractorImpl_DoRemoveItf unknown id");
+ DEBUG_ERR("XAMetadataExtractorImpl_DoRemoveItf unknown id")
+ ;
ret = XA_RESULT_FEATURE_UNSUPPORTED;
break;
- }
+ }
mapEntry->pItf = NULL;
- }
+ }
else
- {
+ {
ret = XA_RESULT_PARAMETER_INVALID;
- }
+ }
DEBUG_API("<-XAMetadataExtractorImpl_DoRemoveItf");
return ret;
-}
+ }
/* END OF FILE */
--- a/khronosfws/openmax_al/src/metadataextractor/xametadataextractor.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/metadataextractor/xametadataextractor.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Metadata Extractor Header
+ *
+ */
#ifndef XAMETADATAEXTRACTOR_H
#define XAMETADATAEXTRACTOR_H
@@ -23,17 +23,14 @@
#include "xaglobals.h"
#include "xaadptbasectx.h"
-
/** MACROS **/
-
/** TYPES **/
-
/** ENUMERATIONS **/
/* Enumeration for interfaces that MetadataExtractor supports. */
typedef enum
-{
+ {
MDE_OBJECTITF, /* <-keep this first */
MDE_DIMITF,
MDE_METADATAEXTRACTIONITF,
@@ -41,37 +38,38 @@
MDE_CONFIGEXTENSIONITF,
MDE_DYNAMICSOURCEITF,
MDE_ITFCOUNT
-} XAMetadataExtractorInterfaces;
+ } XAMetadataExtractorInterfaces;
/** STRUCTURES **/
/* Specification for XAMetadataExtractorImpl
*/
typedef struct XAMetadataExtractorImpl_
-{
+ {
/* Parent for XAMetadataExtractorImpl */
XAObjectItfImpl baseObj; /* <-keep this first */
/* variables */
XADataSource *dataSrc;
-
+
XAAdaptationBaseCtx* curAdaptCtx;
XAAdaptationBaseCtx* adaptationCtxGst;
XAAdaptationBaseCtx* adaptationCtxMMF;
-} XAMetadataExtractorImpl;
-
+ } XAMetadataExtractorImpl;
/** METHODS **/
/* base object XAObjectItfImpl methods */
-XAresult XAMetadataExtractorImpl_DoRealize(XAObjectItf self);
-XAresult XAMetadataExtractorImpl_DoResume(XAObjectItf self);
-void XAMetadataExtractorImpl_FreeResources(XAObjectItf self);
+XAresult XAMetadataExtractorImpl_DoRealize(XAObjectItf self);
+XAresult XAMetadataExtractorImpl_DoResume(XAObjectItf self);
+void XAMetadataExtractorImpl_FreeResources(XAObjectItf self);
/* MetadataExtractorImpl -specific methods */
-XAresult XAMetadataExtractorImpl_DoAddItf(XAObjectItf self, XAObjItfMapEntry *mapEntry );
-XAresult XAMetadataExtractorImpl_DoResumeItf(XAObjectItf self, XAObjItfMapEntry *mapEntry );
-XAresult XAMetadataExtractorImpl_DoRemoveItf(XAObjectItf self, XAObjItfMapEntry *mapEntry );
-
+XAresult XAMetadataExtractorImpl_DoAddItf(XAObjectItf self,
+ XAObjItfMapEntry *mapEntry);
+XAresult XAMetadataExtractorImpl_DoResumeItf(XAObjectItf self,
+ XAObjItfMapEntry *mapEntry);
+XAresult XAMetadataExtractorImpl_DoRemoveItf(XAObjectItf self,
+ XAObjItfMapEntry *mapEntry);
#endif /* XAMETADATAEXTRACTOR_H */
--- a/khronosfws/openmax_al/src/mmf_adaptation/cmetadatautilityitf.cpp Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/cmetadatautilityitf.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -1,996 +1,1030 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "cmetadatautilityitf.h"
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Metadata backend engine
+ *
+ */
+
#include <OpenMAXAL.h>
#include <string.h>
#include <ctype.h>
#include <uri8.h>
+#include "cmetadatautilityitf.h"
#include "profileutilmacro.h"
-CMetadataUtilityItf::CMetadataUtilityItf():m_pS60Util(NULL), m_pHXUtil(NULL)
-{
-}
+CMetadataUtilityItf::CMetadataUtilityItf() :
+ m_pS60Util(NULL), m_pHXUtil(NULL)
+ {
+ }
CMetadataUtilityItf::~CMetadataUtilityItf()
-{
- if(m_pS60Util)
- {
- delete m_pS60Util;
- }
+ {
+ if (m_pS60Util)
+ {
+ delete m_pS60Util;
+ }
- if(m_pHXUtil)
- {
- delete m_pHXUtil;
- }
-}
-
+ if (m_pHXUtil)
+ {
+ delete m_pHXUtil;
+ }
+ }
CMetadataUtilityItf* CMetadataUtilityItf::New(char* uri)
-{
- CMetadataUtilityItf* p_mdutilitf = new CMetadataUtilityItf;
-
- TInt ret = p_mdutilitf->ParseSource(uri);
+ {
+ CMetadataUtilityItf* p_mdutilitf = new CMetadataUtilityItf;
- if(ret == KErrNone)
- {
- return p_mdutilitf;
- }
+ p_mdutilitf->ParseSource(uri); //ignore error
- delete p_mdutilitf;
- return NULL;
-}
+ return p_mdutilitf;
+ }
TInt CMetadataUtilityItf::OpenSource(char* pOrigUri)
-{
+ {
//Make a local copy for uri
- if ( !pOrigUri )
+ if (!pOrigUri)
return XA_RESULT_PARAMETER_INVALID;
-
+
int uriLen = strlen(pOrigUri);
- char* uri = new char[uriLen+1];
- if (! uri )
+ char* uri = new char[uriLen + 1];
+ if (!uri)
{
return XA_RESULT_MEMORY_FAILURE;
}
strncpy(uri, pOrigUri, uriLen);
uri[uriLen] = '\0';
- //
-
- _LIT8(KFileSlash,"file://");
+ ////////////////////////////////////////////
+ _LIT8(KFileSlash,"file:///");
TInt fileslashlen = KFileSlash().Length();
- TPtr8 fileuri((TUint8*)uri, strlen(uri),strlen(uri));
- TPtr8 filepath = fileuri.RightTPtr(strlen(uri)-fileslashlen);
-
+ TPtr8 fileuri((TUint8*) uri, strlen(uri), strlen(uri));
+ TPtr8 filepath = fileuri.RightTPtr(strlen(uri) - fileslashlen);
+
TInt pos = filepath.LocateReverse(':');
- if(pos != KErrNotFound)
- {
- fileuri.Delete(fileslashlen+pos,1);
- }
+ if (pos != KErrNotFound)
+ {
+ fileuri.Delete(fileslashlen + pos, 1);
+ }
TUriParser8 localfileUri;
TInt ret = localfileUri.Parse(fileuri);
- if(ret == KErrNone)
- {
- HBufC* file = NULL;
- TRAP(ret,file = localfileUri.GetFileNameL());
- if(ret == KErrNone)
+ if (ret == KErrNone)
{
- if(m_pS60Util)
- {
- ret = m_pS60Util->ParseSource(*file);
- }
- else if(m_pHXUtil)
- {
- ret = m_pHXUtil->ParseSource(*file);
- }
- else
- {
- ret = KErrNotFound;
- }
- }
-
+ HBufC* file = NULL;
+ TRAP(ret,file = localfileUri.GetFileNameL());
+ if (ret == KErrNone)
+ {
+ if (m_pS60Util)
+ {
+ ret = m_pS60Util->ParseSource(*file);
+ }
+ else if (m_pHXUtil)
+ {
+ ret = m_pHXUtil->ParseSource(*file);
+ }
+ else
+ {
+ ret = KErrNotFound;
+ }
+ }
+
delete file;
- }
-
- if(uri)
- {
- delete []uri;
- }
-
- return ret;
-}
+ }
+
+ if (uri)
+ {
+ delete[] uri;
+ }
+
+ if (ret != KErrNone)
+ {
+ //delete the utilities
+ if (m_pS60Util)
+ {
+ delete m_pS60Util;
+ m_pS60Util = NULL;
+ }
-TInt CMetadataUtilityItf::ExtractUCS2(TDesC& inDes, char* outPtr,TInt maxLen)
-{
- TPtrC tempPtr = inDes.Left((maxLen/2)-1); //save last one for null terminator
- TInt outLen = tempPtr.Length() + 1;
-
- TPtr16 outDes((unsigned short*)outPtr, outLen);
- outDes.Copy(tempPtr);
- outDes.ZeroTerminate();
+ if (m_pHXUtil)
+ {
+ delete m_pHXUtil;
+ m_pHXUtil = NULL;
+ }
+
+ }
+ return ret;
+ }
- return outLen * 2; //return size
-}
+TInt CMetadataUtilityItf::ExtractUCS2(TDesC& inDes, char* outPtr, TInt maxLen)
+ {
+ TPtrC tempPtr = inDes.Left((maxLen / 2) - 1); //save last one for null terminator
+ TInt outLen = tempPtr.Length() + 1;
+
+ TPtr16 outDes((unsigned short*) outPtr, outLen);
+ outDes.Copy(tempPtr);
+ outDes.ZeroTerminate();
+
+ return outLen * 2; //return size
+ }
TInt CMetadataUtilityItf::CalculateNumMetadataItems(TUint*numItems)
-{
- if(m_pS60Util)
- {
- return m_pS60Util->CalculateNumMetadataItems(numItems);
- }
- else
- {
- return m_pHXUtil->CalculateNumMetadataItems(numItems);
- }
-}
+ {
+ *numItems = 0;
+
+ if (m_pS60Util)
+ {
+ return m_pS60Util->CalculateNumMetadataItems(numItems);
+ }
+ else if (m_pHXUtil)
+ {
+ return m_pHXUtil->CalculateNumMetadataItems(numItems);
+ }
+
+ return KErrNone;
+ }
char* CMetadataUtilityItf::GetKey(TInt index)
-{
- if(m_pS60Util)
- {
- return m_pS60Util->GetKey(index);
- }
- else
- {
- return m_pHXUtil->GetKey(index);
- }
-}
+ {
+ if (m_pS60Util)
+ {
+ return m_pS60Util->GetKey(index);
+ }
+ else if (m_pHXUtil)
+ {
+ return m_pHXUtil->GetKey(index);
+ }
+
+ return NULL;
+ }
TInt CMetadataUtilityItf::GetValueSize(TInt index)
-{
- if(m_pS60Util)
- {
- return m_pS60Util->GetValueSize(index);
- }
- else
- {
- return m_pHXUtil->GetValueSize(index);
- }
-}
+ {
+ if (m_pS60Util)
+ {
+ return m_pS60Util->GetValueSize(index);
+ }
+ else if (m_pHXUtil)
+ {
+ return m_pHXUtil->GetValueSize(index);
+ }
+
+ return 0;
+ }
-TInt CMetadataUtilityItf::GetValue(TInt index, char* data, TInt maxLength, TInt* outSize, TInt* encodingType)
-{
- if(m_pS60Util)
- {
- return m_pS60Util->GetValue(index, data, maxLength, outSize, encodingType);
- }
- else
- {
- return m_pHXUtil->GetValue(index, data, maxLength, outSize, encodingType);
- }
-}
+TInt CMetadataUtilityItf::GetValue(TInt index, char* data, TInt maxLength,
+ TInt* outSize, TInt* encodingType)
+ {
+ if (m_pS60Util)
+ {
+ return m_pS60Util->GetValue(index, data, maxLength, outSize,
+ encodingType);
+ }
+ else if (m_pHXUtil)
+ {
+ return m_pHXUtil->GetValue(index, data, maxLength, outSize,
+ encodingType);
+ }
+
+ return 0;
+ }
TInt CMetadataUtilityItf::ParseSource(char* uri)
-{
- char* tempPtr = NULL;
- char extension[MAX_EXTENSION_SIZE] = { 0 };
-
- tempPtr = strchr(uri, (int)'.');
- strncpy(extension,tempPtr,sizeof(tempPtr));
-
- for(unsigned int i=0;i<sizeof(extension);i++)
- {
- extension[i] = tolower(extension[i]);
- }
+ {
+ char* tempPtr = NULL;
+ char extension[MAX_EXTENSION_SIZE] =
+ {
+ 0
+ };
+
+ tempPtr = strchr(uri, (int) '.');
+ strncpy(extension, tempPtr, sizeof(tempPtr));
- //if s60 util in use
- if(m_pS60Util)
- {
- //reset existing instace
- TInt ret = m_pS60Util->Reset();
- if(!CS60MetadataUtilityItf::IsSupportedExtension(extension))
- {
- delete m_pS60Util;
- m_pS60Util = NULL;
- }
- }
+ for (unsigned int i = 0; i < sizeof(extension); i++)
+ {
+ extension[i] = tolower(extension[i]);
+ }
+
+ //if s60 util in use
+ if (m_pS60Util)
+ {
+ //reset existing instace
+ TInt ret = m_pS60Util->Reset();
+ if (!CS60MetadataUtilityItf::IsSupportedExtension(extension))
+ {
+ delete m_pS60Util;
+ m_pS60Util = NULL;
+ }
+ }
- if(m_pHXUtil)
- {
- //reset existing instace
- TInt ret = m_pHXUtil->Reset();
- if(CS60MetadataUtilityItf::IsSupportedExtension(extension))
- {
- delete m_pHXUtil;
- m_pHXUtil = NULL;
- }
- }
+ if (m_pHXUtil)
+ {
+ //reset existing instace
+ TInt ret = m_pHXUtil->Reset();
+ if (CS60MetadataUtilityItf::IsSupportedExtension(extension))
+ {
+ delete m_pHXUtil;
+ m_pHXUtil = NULL;
+ }
+ }
- if(!m_pS60Util && !m_pHXUtil)
- {
-
- if(CS60MetadataUtilityItf::IsSupportedExtension(extension))
- {
- m_pS60Util = CS60MetadataUtilityItf::New();
- }
- else
- {
- m_pHXUtil = CHXMetadataUtilityItf::New();
- }
- }
+ if (!m_pS60Util && !m_pHXUtil)
+ {
- return OpenSource(uri);
-}
+ if (CS60MetadataUtilityItf::IsSupportedExtension(extension))
+ {
+ m_pS60Util = CS60MetadataUtilityItf::New();
+ }
+ else
+ {
+ m_pHXUtil = CHXMetadataUtilityItf::New();
+ }
+ }
+ return OpenSource(uri);
+ }
bool CS60MetadataUtilityItf::IsSupportedExtension(char *extn)
-{
- if( (!strcasecmp(extn, ".mp3")) ||
- (!strcasecmp(extn, ".wma")) ||
- (!strcasecmp(extn, ".aac")) ||
- (!strcasecmp(extn, ".wav")) ||
- (!strcasecmp(extn, ".m4a")))
- {
- return true;
- }
+ {
+ if ((!strcasecmp(extn, ".mp3")) || (!strcasecmp(extn, ".wma"))
+ || (!strcasecmp(extn, ".aac")) || (!strcasecmp(extn, ".wav"))
+ || (!strcasecmp(extn, ".m4a")))
+ {
+ return true;
+ }
- return false;
-}
+ return false;
+ }
CS60MetadataUtilityItf* CS60MetadataUtilityItf::New()
-{
- CS60MetadataUtilityItf* self = new CS60MetadataUtilityItf();
-
- TInt err = KErrGeneral;
- TRAP(err, self->ConstructL());
+ {
+ CS60MetadataUtilityItf* self = new CS60MetadataUtilityItf();
+
+ TInt err = KErrGeneral;
+ TRAP(err, self->ConstructL());
- if(err == KErrNone)
- {
- return self;
- }
+ if (err == KErrNone)
+ {
+ return self;
+ }
- delete self;
- return NULL;
-}
+ delete self;
+ return NULL;
+ }
-CS60MetadataUtilityItf::CS60MetadataUtilityItf():pMetaDataUtility(NULL)
-{
-}
+CS60MetadataUtilityItf::CS60MetadataUtilityItf() :
+ pMetaDataUtility(NULL)
+ {
+ }
void CS60MetadataUtilityItf::ConstructL()
-{
- TAG_TIME_PROFILING_BEGIN;
- pMetaDataUtility = CMetaDataUtility::NewL();
- TAG_TIME_PROFILING_END;
- PRINT_TO_CONSOLE_TIME_DIFF;
-}
-
+ {
+ TAG_TIME_PROFILING_BEGIN;
+ pMetaDataUtility = CMetaDataUtility::NewL();
+ TAG_TIME_PROFILING_END; PRINT_TO_CONSOLE_TIME_DIFF;
+ }
+
CS60MetadataUtilityItf::~CS60MetadataUtilityItf()
-{
- if(pMetaDataUtility)
- {
- TInt err = KErrGeneral;
-
- TAG_TIME_PROFILING_BEGIN;
- TRAP(err, pMetaDataUtility->ResetL());
- delete pMetaDataUtility;
- TAG_TIME_PROFILING_END;
- PRINT_TO_CONSOLE_TIME_DIFF;
- }
+ {
+ if (pMetaDataUtility)
+ {
+ TInt err = KErrGeneral;
- pMetaDataUtility = NULL;
-}
+ TAG_TIME_PROFILING_BEGIN;
+ TRAP(err, pMetaDataUtility->ResetL());
+ delete pMetaDataUtility;
+ TAG_TIME_PROFILING_END; PRINT_TO_CONSOLE_TIME_DIFF;
+ }
+
+ pMetaDataUtility = NULL;
+ }
TInt CS60MetadataUtilityItf::ParseSource(TDesC& fileName)
-{
- TInt err = KErrGeneral;
+ {
+ TInt err = KErrGeneral;
+
+ if (pMetaDataUtility)
+ {
- if(pMetaDataUtility)
- {
-
- TAG_TIME_PROFILING_BEGIN;
- //open with the file handle
- TRAP(err, pMetaDataUtility->OpenFileL(fileName));
- TAG_TIME_PROFILING_END;
- PRINT_TO_CONSOLE_TIME_DIFF;
+ TAG_TIME_PROFILING_BEGIN;
+ //open with the file handle
+ TRAP(err, pMetaDataUtility->OpenFileL(fileName));
+ TAG_TIME_PROFILING_END;
+ PRINT_TO_CONSOLE_TIME_DIFF;
- if(err == KErrNone)
- {
- uNumMetadataItems = pMetaDataUtility->MetaDataCount();
- }
- }
+ if (err == KErrNone)
+ {
+ uNumMetadataItems = pMetaDataUtility->MetaDataCount();
+ }
+ }
- return err;
-}
+ return err;
+ }
TInt CS60MetadataUtilityItf::CalculateNumMetadataItems(TUint* numItems)
-{
- TInt err = KErrGeneral;
+ {
+ TInt err = KErrGeneral;
- if(pMetaDataUtility && numItems)
- {
- *numItems = uNumMetadataItems;
- err = KErrNone;
- }
+ if (pMetaDataUtility && numItems)
+ {
+ *numItems = uNumMetadataItems;
+ err = KErrNone;
+ }
- return err;
-}
+ return err;
+ }
char* CS60MetadataUtilityItf::KeyMapping(TMetaDataFieldId fldID)
-{
- switch(fldID)
- {
-
- case EMetaDataSongTitle:
- {
- return "KhronosTitle";
- }
- case EMetaDataArtist:
- {
- return "KhronosArtist";
- }
- case EMetaDataAlbum:
- {
- return "KhronosAlbum";
- }
- case EMetaDataYear:
- {
- return "KhronosYear";
- }
- case EMetaDataComment:
- {
- return "KhronosComment";
- }
- case EMetaDataAlbumTrack:
- {
- return "KhronosTrackNumber";
- }
- case EMetaDataGenre:
- {
- return "KhronosGenre";
- }
- case EMetaDataComposer:
- {
- return "Composer"; //Non Standard
- }
- case EMetaDataCopyright:
- {
- return "KhronosCopyright";
- }
- case EMetaDataOriginalArtist:
- {
- return "Original Artist"; //Non Standard
- }
- case EMetaDataUserUrl:
- case EMetaDataUrl:
- {
- return "KhronosContentURL";
- }
- case EMetaDataJpeg:
- {
- return "attachedpicture";//"KhronosAlbumArtJPEG";
- }
- case EMetaDataVendor:
- {
- return "Vendor"; //Non Standard
- }
- case EMetaDataRating:
- {
- return "KhronosRating";
- }
- case EMetaDataDuration:
- {
- return "Duration"; //Non Standard
- }
- default:
- {
- }
- }
+ {
+ switch (fldID)
+ {
- return "UnSupported";
-}
+ case EMetaDataSongTitle:
+ {
+ return "KhronosTitle";
+ }
+ case EMetaDataArtist:
+ {
+ return "KhronosArtist";
+ }
+ case EMetaDataAlbum:
+ {
+ return "KhronosAlbum";
+ }
+ case EMetaDataYear:
+ {
+ return "KhronosYear";
+ }
+ case EMetaDataComment:
+ {
+ return "KhronosComment";
+ }
+ case EMetaDataAlbumTrack:
+ {
+ return "KhronosTrackNumber";
+ }
+ case EMetaDataGenre:
+ {
+ return "KhronosGenre";
+ }
+ case EMetaDataComposer:
+ {
+ return "Composer"; //Non Standard
+ }
+ case EMetaDataCopyright:
+ {
+ return "KhronosCopyright";
+ }
+ case EMetaDataOriginalArtist:
+ {
+ return "Original Artist"; //Non Standard
+ }
+ case EMetaDataUserUrl:
+ case EMetaDataUrl:
+ {
+ return "KhronosContentURL";
+ }
+ case EMetaDataJpeg:
+ {
+ return "attachedpicture";//"KhronosAlbumArtJPEG";
+ }
+ case EMetaDataVendor:
+ {
+ return "Vendor"; //Non Standard
+ }
+ case EMetaDataRating:
+ {
+ return "KhronosRating";
+ }
+ case EMetaDataDuration:
+ {
+ return "Duration"; //Non Standard
+ }
+ default:
+ {
+ }
+ }
+
+ return "UnSupported";
+ }
TInt CS60MetadataUtilityItf::ValueEncoding(TMetaDataFieldId fldID)
-{
- switch(fldID)
- {
- case EMetaDataJpeg:
- {
- return CMetadataUtilityItf::EBinaryEncoding;
- }
-
- case EMetaDataSongTitle:
- case EMetaDataArtist:
- case EMetaDataAlbum:
- case EMetaDataYear:
- case EMetaDataComment:
- case EMetaDataAlbumTrack:
- case EMetaDataGenre:
- case EMetaDataComposer:
- case EMetaDataCopyright:
- case EMetaDataOriginalArtist:
- case EMetaDataUserUrl:
- case EMetaDataUrl:
- case EMetaDataVendor:
- case EMetaDataRating:
- case EMetaDataDuration:
- default:
- {
- return CMetadataUtilityItf::EUnicodeEncoding;
- }
- }
-
-}
+ {
+ switch (fldID)
+ {
+ case EMetaDataJpeg:
+ {
+ return CMetadataUtilityItf::EBinaryEncoding;
+ }
+
+ case EMetaDataSongTitle:
+ case EMetaDataArtist:
+ case EMetaDataAlbum:
+ case EMetaDataYear:
+ case EMetaDataComment:
+ case EMetaDataAlbumTrack:
+ case EMetaDataGenre:
+ case EMetaDataComposer:
+ case EMetaDataCopyright:
+ case EMetaDataOriginalArtist:
+ case EMetaDataUserUrl:
+ case EMetaDataUrl:
+ case EMetaDataVendor:
+ case EMetaDataRating:
+ case EMetaDataDuration:
+ default:
+ {
+ return CMetadataUtilityItf::EUnicodeEncoding;
+ }
+ }
+
+ }
char* CS60MetadataUtilityItf::GetKey(TInt index)
-{
+ {
+
+ if (pMetaDataUtility && index < uNumMetadataItems)
+ {
+
+ TMetaDataFieldId fieldId;
- if(pMetaDataUtility && index < uNumMetadataItems)
- {
-
- TMetaDataFieldId fieldId;
-
- TAG_TIME_PROFILING_BEGIN;
- TInt err = KErrGeneral;
- TRAP(err, pMetaDataUtility->MetaDataFieldsL().FieldIdAt( index, fieldId ));
- TAG_TIME_PROFILING_END;
- PRINT_TO_CONSOLE_TIME_DIFF;
-
- if((err == KErrNone) && (fieldId != EUnknownMetaDataField))
- {
- return KeyMapping(fieldId);
- }
- }
- return NULL;
-}
+ TAG_TIME_PROFILING_BEGIN;
+ TInt err = KErrGeneral;
+ TRAP(err, pMetaDataUtility->MetaDataFieldsL().FieldIdAt( index, fieldId ));
+ TAG_TIME_PROFILING_END;
+ PRINT_TO_CONSOLE_TIME_DIFF;
+
+ if ((err == KErrNone) && (fieldId != EUnknownMetaDataField))
+ {
+ return KeyMapping(fieldId);
+ }
+ }
+ return NULL;
+ }
TInt CS60MetadataUtilityItf::GetValueSize(TInt index)
-{
- if(pMetaDataUtility && index < uNumMetadataItems)
- {
-
- TMetaDataFieldId fieldId;
- TInt err = KErrGeneral;
- TRAP(err, pMetaDataUtility->MetaDataFieldsL().FieldIdAt( index, fieldId ));
+ {
+ if (pMetaDataUtility && index < uNumMetadataItems)
+ {
+
+ TMetaDataFieldId fieldId;
+ TInt err = KErrGeneral;
+ TRAP(err, pMetaDataUtility->MetaDataFieldsL().FieldIdAt( index, fieldId ));
- if((err == KErrNone) && (fieldId != EUnknownMetaDataField))
- {
- const CMetaDataFieldContainer* iContainer = NULL;
- TRAP(err, iContainer = &pMetaDataUtility->MetaDataFieldsL());
- if(err == KErrNone)
- {
- if(ValueEncoding(fieldId) == CMetadataUtilityItf::EUnicodeEncoding)
- {
- TPtrC field = iContainer->Field( fieldId );
- if(field != KNullDesC)
- {
- return field.Size() + 2; //additional character (two bytes) for null terminator
- }
- }
- else //Binary
- {
- TPtrC8 field8 = iContainer->Field8( fieldId );
- if(field8 != KNullDesC8)
- {
- return field8.Size();
- }
- }
- }
- }
- }
+ if ((err == KErrNone) && (fieldId != EUnknownMetaDataField))
+ {
+ const CMetaDataFieldContainer* iContainer = NULL;
+ TRAP(err, iContainer = &pMetaDataUtility->MetaDataFieldsL());
+ if (err == KErrNone)
+ {
+ if (ValueEncoding(fieldId)
+ == CMetadataUtilityItf::EUnicodeEncoding)
+ {
+ TPtrC field = iContainer->Field(fieldId);
+ if (field != KNullDesC)
+ {
+ return field.Size() + 2; //additional character (two bytes) for null terminator
+ }
+ }
+ else //Binary
+ {
+ TPtrC8 field8 = iContainer->Field8(fieldId);
+ if (field8 != KNullDesC8)
+ {
+ return field8.Size();
+ }
+ }
+ }
+ }
+ }
- return 0;
-}
-
-TInt CS60MetadataUtilityItf::GetValue(TInt index, char* data, TInt maxLength, //in params
- TInt* outSize, TInt* encodingType) //out params
-{
+ return 0;
+ }
- TInt retValueSize = 0;
- *encodingType= CMetadataUtilityItf::EUnknownEncoding;
+TInt CS60MetadataUtilityItf::GetValue(TInt index, char* data, TInt maxLength, //in params
+ TInt* outSize, TInt* encodingType) //out params
+ {
+
+ TInt retValueSize = 0;
+ *encodingType = CMetadataUtilityItf::EUnknownEncoding;
+
+ if (pMetaDataUtility && index < uNumMetadataItems)
+ {
- if(pMetaDataUtility && index < uNumMetadataItems)
- {
-
- TMetaDataFieldId fieldId;
- TInt err = KErrGeneral;
- TRAP(err, pMetaDataUtility->MetaDataFieldsL().FieldIdAt( index, fieldId ));
-
-
- if((err==KErrNone) && (fieldId != EUnknownMetaDataField))
- {
-
- const CMetaDataFieldContainer* iContainer = NULL;
- TRAP(err, iContainer = &pMetaDataUtility->MetaDataFieldsL());
- if(err == KErrNone)
- {
- *encodingType = ValueEncoding(fieldId);
- if(*encodingType == CMetadataUtilityItf::EUnicodeEncoding)
- {
-
-
- TAG_TIME_PROFILING_BEGIN;
- TPtrC field = iContainer->Field( fieldId );
- TAG_TIME_PROFILING_END;
- PRINT_TO_CONSOLE_TIME_DIFF;
- if(field != KNullDesC)
- {
- *outSize = CMetadataUtilityItf::ExtractUCS2(field, data, maxLength);
- retValueSize = field.Size() + 2; //actual size
- }
- }
- else //Binary
- {
-
- TAG_TIME_PROFILING_BEGIN;
- TPtrC8 field8 = iContainer->Field8( fieldId );
- TAG_TIME_PROFILING_END;
- PRINT_TO_CONSOLE_TIME_DIFF;
- if(field8 != KNullDesC8)
- {
- *outSize = (maxLength > field8.Size())?field8.Size():maxLength;
- memcpy(data, field8.Ptr(), *outSize);
- retValueSize = field8.Size();
- }
- }
- }
- }
- }
+ TMetaDataFieldId fieldId;
+ TInt err = KErrGeneral;
+ TRAP(err, pMetaDataUtility->MetaDataFieldsL().FieldIdAt( index, fieldId ));
+
+ if ((err == KErrNone) && (fieldId != EUnknownMetaDataField))
+ {
+
+ const CMetaDataFieldContainer* iContainer = NULL;
+ TRAP(err, iContainer = &pMetaDataUtility->MetaDataFieldsL());
+ if (err == KErrNone)
+ {
+ *encodingType = ValueEncoding(fieldId);
+ if (*encodingType == CMetadataUtilityItf::EUnicodeEncoding)
+ {
- return retValueSize;
-}
+ TAG_TIME_PROFILING_BEGIN;
+ TPtrC field = iContainer->Field(fieldId);
+ TAG_TIME_PROFILING_END;
+ PRINT_TO_CONSOLE_TIME_DIFF;
+ if (field != KNullDesC)
+ {
+ *outSize = CMetadataUtilityItf::ExtractUCS2(field,
+ data, maxLength);
+ retValueSize = field.Size() + 2; //actual size
+ }
+ }
+ else //Binary
+ {
+
+ TAG_TIME_PROFILING_BEGIN;
+ TPtrC8 field8 = iContainer->Field8(fieldId);
+ TAG_TIME_PROFILING_END;
+ PRINT_TO_CONSOLE_TIME_DIFF;
+ if (field8 != KNullDesC8)
+ {
+ *outSize
+ = (maxLength > field8.Size())
+ ? field8.Size()
+ : maxLength;
+ memcpy(data, field8.Ptr(), *outSize);
+ retValueSize = field8.Size();
+ }
+ }
+ }
+ }
+ }
+
+ return retValueSize;
+ }
TInt CS60MetadataUtilityItf::Reset()
-{
- TInt err = KErrNone;
- if(pMetaDataUtility)
- {
- TRAP(err, pMetaDataUtility->ResetL());
- }
+ {
+ TInt err = KErrNone;
+ if (pMetaDataUtility)
+ {
+ TRAP(err, pMetaDataUtility->ResetL());
+ }
- return err;
-}
-
+ return err;
+ }
-CHXMetadataUtilityItf::CHXMetadataUtilityItf():pHXMetaDataUtility(NULL)
-{
-}
+CHXMetadataUtilityItf::CHXMetadataUtilityItf() :
+ pHXMetaDataUtility(NULL)
+ {
+ }
void CHXMetadataUtilityItf::ConstructL()
-{
- TAG_TIME_PROFILING_BEGIN;
- pHXMetaDataUtility = CHXMetaDataUtility::NewL();
- TAG_TIME_PROFILING_END;
- PRINT_TO_CONSOLE_TIME_DIFF;
-}
+ {
+ TAG_TIME_PROFILING_BEGIN;
+ pHXMetaDataUtility = CHXMetaDataUtility::NewL();
+ TAG_TIME_PROFILING_END;
+ PRINT_TO_CONSOLE_TIME_DIFF;
+ }
-
CHXMetadataUtilityItf* CHXMetadataUtilityItf::New()
-{
- CHXMetadataUtilityItf* self = new CHXMetadataUtilityItf();
+ {
+ CHXMetadataUtilityItf* self = new CHXMetadataUtilityItf();
+
+ if (self)
+ {
+ TInt err = KErrGeneral;
+ TRAP(err, self->ConstructL());
- if(self)
- {
- TInt err = KErrGeneral;
- TRAP(err, self->ConstructL());
-
- if(err != KErrNone)
- {
- delete self;
- self = NULL;
- }
- }
-
- return self;
-}
-
+ if (err != KErrNone)
+ {
+ delete self;
+ self = NULL;
+ }
+ }
+
+ return self;
+ }
+
CHXMetadataUtilityItf::~CHXMetadataUtilityItf()
-{
- if(pHXMetaDataUtility)
- {
- TInt err = KErrGeneral;
-
- TAG_TIME_PROFILING_BEGIN;
- TRAP(err, pHXMetaDataUtility->ResetL());
- delete pHXMetaDataUtility;
- TAG_TIME_PROFILING_END;
- PRINT_TO_CONSOLE_TIME_DIFF;
- }
+ {
+ if (pHXMetaDataUtility)
+ {
+ TInt err = KErrGeneral;
- pHXMetaDataUtility = NULL;
-}
+ TAG_TIME_PROFILING_BEGIN;
+ TRAP(err, pHXMetaDataUtility->ResetL());
+ delete pHXMetaDataUtility;
+ TAG_TIME_PROFILING_END;
+ PRINT_TO_CONSOLE_TIME_DIFF;
+ }
+
+ pHXMetaDataUtility = NULL;
+ }
TInt CHXMetadataUtilityItf::Reset()
-{
- TInt err = KErrNone;
- if(pHXMetaDataUtility)
- {
- TRAP(err, pHXMetaDataUtility->ResetL());
- }
+ {
+ TInt err = KErrNone;
+ if (pHXMetaDataUtility)
+ {
+ TRAP(err, pHXMetaDataUtility->ResetL());
+ }
- return err;
-}
-
-
+ return err;
+ }
TInt CHXMetadataUtilityItf::ParseSource(TDesC& fileName)
-{
- TInt err = KErrGeneral;
+ {
+ TInt err = KErrGeneral;
- if(pHXMetaDataUtility)
- {
- //open with the file handle
- TAG_TIME_PROFILING_BEGIN;
- TRAP(err, pHXMetaDataUtility->OpenFileL(fileName));
- TAG_TIME_PROFILING_END;
- PRINT_TO_CONSOLE_TIME_DIFF;
+ if (pHXMetaDataUtility)
+ {
+ //open with the file handle
+ TAG_TIME_PROFILING_BEGIN;
+ TRAP(err, pHXMetaDataUtility->OpenFileL(fileName));
+ TAG_TIME_PROFILING_END;
+ PRINT_TO_CONSOLE_TIME_DIFF;
- if(err == KErrNone)
- {
- return pHXMetaDataUtility->GetMetaDataCount(uNumMetadataItems);
- }
- }
+ if (err == KErrNone)
+ {
+ return pHXMetaDataUtility->GetMetaDataCount(uNumMetadataItems);
+ }
+ }
- return err;
-}
+ return err;
+ }
TInt CHXMetadataUtilityItf::CalculateNumMetadataItems(TUint* numItems)
-{
- TInt err = KErrGeneral;
+ {
+ TInt err = KErrGeneral;
- if(pHXMetaDataUtility && numItems)
- {
- *numItems = uNumMetadataItems;
- err = KErrNone;
- }
+ if (pHXMetaDataUtility && numItems)
+ {
+ *numItems = uNumMetadataItems;
+ err = KErrNone;
+ }
- return err;
-}
+ return err;
+ }
char* CHXMetadataUtilityItf::KeyMapping(HXMetaDataKeys::EHXMetaDataId fldID)
-{
-
- switch(fldID)
- {
-
- case HXMetaDataKeys::EHXTitle:
- {
- return "KhronosTitle";
- }
- case HXMetaDataKeys::EHXPerformer:
- {
- return "KhronosArtist";
- }
- case HXMetaDataKeys::EHXDescription:
- {
- return "KhronosComment";
- }
- case HXMetaDataKeys::EHXGenre:
- {
- return "KhronosGenre";
- }
- case HXMetaDataKeys::EHXAuthor:
- {
- return "Composer"; //Non Standard
- }
- case HXMetaDataKeys::EHXCopyright:
- {
- return "KhronosCopyright";
- }
- case HXMetaDataKeys::EHXContentURI:
- {
- return "KhronosContentURL";
- }
- case HXMetaDataKeys::EHXDuration:
- {
- return "Duration"; //Non Standard
- }
- case HXMetaDataKeys::EHXClipBitRate:
- {
- return "ClipBitRate"; //non-standard
- }
- case HXMetaDataKeys::EHXVideoBitRate:
- {
- return "VideoBitRate"; // non-standard
- }
- case HXMetaDataKeys::EHXAudioBitRate:
- {
- return "AudioBitRate";
- }
- case HXMetaDataKeys::EHXCodec:
- {
- return "Codec";
- }
- case HXMetaDataKeys::EHXFrameSize:
- {
- return "Resolution";
- }
- case HXMetaDataKeys::EHXFramesPerSecond:
- {
- return "FrameRate";
- }
- case HXMetaDataKeys::EHXStreamCount:
- {
- return "Stream Count";
- }
- case HXMetaDataKeys::EHXLiveStream:
- {
- return "Live Stream";
- }
+ {
+
+ switch (fldID)
+ {
+
+ case HXMetaDataKeys::EHXTitle:
+ {
+ return "KhronosTitle";
+ }
+ case HXMetaDataKeys::EHXPerformer:
+ {
+ return "KhronosArtist";
+ }
+ case HXMetaDataKeys::EHXDescription:
+ {
+ return "KhronosComment";
+ }
+ case HXMetaDataKeys::EHXGenre:
+ {
+ return "KhronosGenre";
+ }
+ case HXMetaDataKeys::EHXAuthor:
+ {
+ return "Composer"; //Non Standard
+ }
+ case HXMetaDataKeys::EHXCopyright:
+ {
+ return "KhronosCopyright";
+ }
+ case HXMetaDataKeys::EHXContentURI:
+ {
+ return "KhronosContentURL";
+ }
+ case HXMetaDataKeys::EHXDuration:
+ {
+ return "Duration"; //Non Standard
+ }
+ case HXMetaDataKeys::EHXClipBitRate:
+ {
+ return "ClipBitRate"; //non-standard
+ }
+ case HXMetaDataKeys::EHXVideoBitRate:
+ {
+ return "VideoBitRate"; // non-standard
+ }
+ case HXMetaDataKeys::EHXAudioBitRate:
+ {
+ return "AudioBitRate";
+ }
+ case HXMetaDataKeys::EHXCodec:
+ {
+ return "Codec";
+ }
+ case HXMetaDataKeys::EHXFrameSize:
+ {
+ return "Resolution";
+ }
+ case HXMetaDataKeys::EHXFramesPerSecond:
+ {
+ return "FrameRate";
+ }
+ case HXMetaDataKeys::EHXStreamCount:
+ {
+ return "Stream Count";
+ }
+ case HXMetaDataKeys::EHXLiveStream:
+ {
+ return "Live Stream";
+ }
case HXMetaDataKeys::EHXSeekable:
- {
- return "Seekable";
- }
+ {
+ return "Seekable";
+ }
case HXMetaDataKeys::EHXContentType:
- {
- return "Content Type";
- }
- case HXMetaDataKeys::EHXFormat:
- {
- return "Format";
- }
+ {
+ return "Content Type";
+ }
+ case HXMetaDataKeys::EHXFormat:
+ {
+ return "Format";
+ }
case HXMetaDataKeys::EHXQuality:
- {
- return "Quality";
- }
+ {
+ return "Quality";
+ }
case HXMetaDataKeys::EHXAbstract:
- {
- return "Abstract";
- }
- case HXMetaDataKeys::EHXMimeType:
- {
- return "MimeType";
- }
- case HXMetaDataKeys::EHXIconURI:
- {
- return "Icon URI";
- }
+ {
+ return "Abstract";
+ }
+ case HXMetaDataKeys::EHXMimeType:
+ {
+ return "MimeType";
+ }
+ case HXMetaDataKeys::EHXIconURI:
+ {
+ return "Icon URI";
+ }
case HXMetaDataKeys::EHXEPreviewURI:
- {
- return "Preview URI";
- }
+ {
+ return "Preview URI";
+ }
case HXMetaDataKeys::EHXContentID:
- {
- return "Content ID";
- }
+ {
+ return "Content ID";
+ }
case HXMetaDataKeys::EHXInfoURL:
- {
- return "Info URL";
- }
- default:
- {
- }
- }
+ {
+ return "Info URL";
+ }
+ default:
+ {
+ }
+ }
- return "UnSupported";
-}
+ return "UnSupported";
+ }
TInt CHXMetadataUtilityItf::ValueEncoding(HXMetaDataKeys::EHXMetaDataId fldID)
-{
- switch(fldID)
- {
- default:
- {
- return CMetadataUtilityItf::EUnicodeEncoding;
- }
- }
-
-}
+ {
+ switch (fldID)
+ {
+ default:
+ {
+ return CMetadataUtilityItf::EUnicodeEncoding;
+ }
+ }
+
+ }
char* CHXMetadataUtilityItf::GetKey(TInt index)
-{
+ {
- if(pHXMetaDataUtility && index < uNumMetadataItems)
- {
- HXMetaDataKeys::EHXMetaDataId id;
- HBufC* pDes;
-
- TAG_TIME_PROFILING_BEGIN;
- TInt err = pHXMetaDataUtility->GetMetaDataAt(index, id, pDes);
- TAG_TIME_PROFILING_END;
- PRINT_TO_CONSOLE_TIME_DIFF;
-
- if(err == KErrNone)
- {
- return KeyMapping(id);
- }
- }
- return NULL;
-}
+ if (pHXMetaDataUtility && index < uNumMetadataItems)
+ {
+ HXMetaDataKeys::EHXMetaDataId id;
+ HBufC* pDes;
+
+ TAG_TIME_PROFILING_BEGIN;
+ TInt err = pHXMetaDataUtility->GetMetaDataAt(index, id, pDes);
+ TAG_TIME_PROFILING_END;
+ PRINT_TO_CONSOLE_TIME_DIFF;
+
+ if (err == KErrNone)
+ {
+ return KeyMapping(id);
+ }
+ }
+ return NULL;
+ }
TInt CHXMetadataUtilityItf::GetValueSize(TInt index)
-{
- if(pHXMetaDataUtility && index < uNumMetadataItems)
- {
- HXMetaDataKeys::EHXMetaDataId id;
- HBufC* pDes;
-
- TInt err = pHXMetaDataUtility->GetMetaDataAt(index, id, pDes);
-
- if(err == KErrNone)
- {
- if(ValueEncoding(id) == CMetadataUtilityItf::EUnicodeEncoding)
- {
- return pDes->Size() + 2; //additional character (two bytes) for null terminator
- }
- else //Binary
- {
- //no support
- }
- }
- }
+ {
+ if (pHXMetaDataUtility && index < uNumMetadataItems)
+ {
+ HXMetaDataKeys::EHXMetaDataId id;
+ HBufC* pDes;
+
+ TInt err = pHXMetaDataUtility->GetMetaDataAt(index, id, pDes);
- return 0;
-}
-
-TInt CHXMetadataUtilityItf::GetValue(TInt index, char* data, TInt maxLength, //in params
- TInt* outSize, TInt* encodingType) //out params
-{
+ if (err == KErrNone)
+ {
+ if (ValueEncoding(id) == CMetadataUtilityItf::EUnicodeEncoding)
+ {
+ return pDes->Size() + 2; //additional character (two bytes) for null terminator
+ }
+ else //Binary
+ {
+ //no support
+ }
+ }
+ }
- TInt retValueSize = 0;
- *encodingType= CMetadataUtilityItf::EUnknownEncoding;
+ return 0;
+ }
+
+TInt CHXMetadataUtilityItf::GetValue(TInt index, char* data, TInt maxLength, //in params
+ TInt* outSize, TInt* encodingType) //out params
+ {
+
+ TInt retValueSize = 0;
+ *encodingType = CMetadataUtilityItf::EUnknownEncoding;
- if(pHXMetaDataUtility && index < uNumMetadataItems)
- {
- HXMetaDataKeys::EHXMetaDataId id;
- HBufC* pDes;
+ if (pHXMetaDataUtility && index < uNumMetadataItems)
+ {
+ HXMetaDataKeys::EHXMetaDataId id;
+ HBufC* pDes;
+
+ TAG_TIME_PROFILING_BEGIN;
+ TInt err = pHXMetaDataUtility->GetMetaDataAt(index, id, pDes);
+ TAG_TIME_PROFILING_END;
+ PRINT_TO_CONSOLE_TIME_DIFF;
+
+ *encodingType = ValueEncoding(id);
-
- TAG_TIME_PROFILING_BEGIN;
- TInt err = pHXMetaDataUtility->GetMetaDataAt(index, id, pDes);
- TAG_TIME_PROFILING_END;
- PRINT_TO_CONSOLE_TIME_DIFF;
-
- *encodingType = ValueEncoding(id);
-
- if(err == KErrNone)
- {
- if(*encodingType == CMetadataUtilityItf::EUnicodeEncoding)
- {
- *outSize = CMetadataUtilityItf::ExtractUCS2(*pDes, data, maxLength);
- retValueSize = pDes->Size() + 2; //actual Size
- }
- else //Binary
- {
- //no support
- }
- }
- }
+ if (err == KErrNone)
+ {
+ if (*encodingType == CMetadataUtilityItf::EUnicodeEncoding)
+ {
+ *outSize = CMetadataUtilityItf::ExtractUCS2(*pDes, data,
+ maxLength);
+ retValueSize = pDes->Size() + 2; //actual Size
+ }
+ else //Binary
+ {
+ //no support
+ }
+ }
+ }
- return retValueSize;
-}
+ return retValueSize;
+ }
-
-extern "C" {
+extern "C"
+ {
void* mmf_metadata_utility_init(char* uri)
- {
- return CMetadataUtilityItf::New(uri);
- }
+ {
+ return CMetadataUtilityItf::New(uri);
+ }
void mmf_metadata_utility_destroy(void* context)
- {
- delete ((CMetadataUtilityItf*)context);
- }
+ {
+ delete ((CMetadataUtilityItf*) context);
+ }
+
+ XAresult mmf_metadata_utility_parse_source(void* context, char* uri)
+ {
+ TInt err = ((CMetadataUtilityItf*) context)->ParseSource(uri);
+
+ if (err == KErrNone)
+ {
+ return XA_RESULT_SUCCESS;
+ }
- XAresult mmf_metadata_utility_parse_source(void* context, char* uri)
- {
- TInt err = ((CMetadataUtilityItf*)context)->ParseSource(uri);
-
- if(err == KErrNone)
- {
- return XA_RESULT_SUCCESS;
- }
-
- return XA_RESULT_PARAMETER_INVALID;
- }
+ return XA_RESULT_PARAMETER_INVALID;
+ }
+ XAresult mmf_get_item_count(void* context, XAuint32* itemCount)
+ {
+ if (itemCount)
+ {
+ TInt err =((CMetadataUtilityItf*) (context))->CalculateNumMetadataItems(
+ (TUint *) itemCount);
+ if (err == KErrNone)
+ {
+ return XA_RESULT_SUCCESS;
+ }
+ }
+
+ return XA_RESULT_PARAMETER_INVALID;
+ }
- XAresult mmf_get_item_count(void* context, XAuint32* itemCount)
- {
- if(itemCount)
- {
- TInt err = ((CMetadataUtilityItf*)(context))->CalculateNumMetadataItems((TUint *)itemCount);
- if(err == KErrNone)
- {
- return XA_RESULT_SUCCESS;
- }
- }
+ XAresult mmf_get_key_size(void* context, XAuint32 keyIndex,
+ XAuint32* keySize)
+ {
+ char* key = ((CMetadataUtilityItf*) (context))->GetKey(keyIndex);
+ if (key && keySize)
+ {
+ *keySize = (strlen(key) + sizeof(XAMetadataInfo));
+
+ return XA_RESULT_SUCCESS;
+ }
+
+ return XA_RESULT_PARAMETER_INVALID;
+ }
- return XA_RESULT_PARAMETER_INVALID;
- }
-
- XAresult mmf_get_key_size(void* context, XAuint32 keyIndex, XAuint32* keySize)
- {
- char* key = ((CMetadataUtilityItf*)(context))->GetKey(keyIndex);
- if(key && keySize)
- {
- *keySize = (strlen(key) + sizeof(XAMetadataInfo));
-
- return XA_RESULT_SUCCESS;
- }
-
- return XA_RESULT_PARAMETER_INVALID;
- }
-
+ XAresult mmf_get_key(void* context, XAuint32 index, XAuint32 keySize,
+ XAMetadataInfo *pKey)
+ {
+ XAresult ret = XA_RESULT_PARAMETER_INVALID;
+
+ TInt keyDataSize = keySize - sizeof(XAMetadataInfo) + 1;
+ char* ascKey = ((CMetadataUtilityItf*) (context))->GetKey(index);
- XAresult mmf_get_key(void* context, XAuint32 index,XAuint32 keySize, XAMetadataInfo *pKey)
- {
- XAresult ret = XA_RESULT_PARAMETER_INVALID;
-
- TInt keyDataSize = keySize - sizeof(XAMetadataInfo) + 1;
- char* ascKey = ((CMetadataUtilityItf*)(context))->GetKey(index);
+ if (ascKey && keyDataSize)
+ {
+ TInt ascKeySize = strlen(ascKey);
+ TInt outSize = (ascKeySize >= keyDataSize)
+ ? (keyDataSize - 1)
+ : ascKeySize;
+
+ pKey->size = outSize + 1;
+ pKey->encoding = XA_CHARACTERENCODING_ASCII;
+ strcpy((char *) (pKey->langCountry), "en-us");
+ strncpy((char *) (pKey->data), ascKey, outSize);
+ pKey->data[outSize] = '\0';
- if(ascKey && keyDataSize)
- {
- TInt ascKeySize = strlen(ascKey);
- TInt outSize = (ascKeySize >= keyDataSize) ? (keyDataSize - 1) : ascKeySize;
-
- pKey->size = outSize + 1;
- pKey->encoding = XA_CHARACTERENCODING_ASCII;
- strcpy((char *)(pKey->langCountry), "en-us");
- strncpy((char *)(pKey->data), ascKey, outSize);
- pKey->data[outSize] = '\0';
+ if (ascKeySize >= keyDataSize)
+ {
+ ret = XA_RESULT_BUFFER_INSUFFICIENT;
+ }
+ else
+ {
+ ret = XA_RESULT_SUCCESS;
+ }
+ }
+
+ ret = XA_RESULT_SUCCESS;
+ return ret;
+ }
- if(ascKeySize >= keyDataSize)
- {
- ret = XA_RESULT_BUFFER_INSUFFICIENT;
- }
- else
- {
- ret = XA_RESULT_SUCCESS;
- }
- }
+ XAresult mmf_get_value_size(void* context, XAuint32 index,
+ XAuint32 *pValueSize)
+ {
+ if (pValueSize)
+ {
+ *pValueSize = ((CMetadataUtilityItf*) (context))->GetValueSize(
+ index) + sizeof(XAMetadataInfo) - 1;
+ //XAMetadataInfo already includes one byte for Data
- ret = XA_RESULT_SUCCESS;
- return ret;
- }
+ return XA_RESULT_SUCCESS;
+ }
- XAresult mmf_get_value_size(void* context, XAuint32 index, XAuint32 *pValueSize)
- {
- if(pValueSize)
- {
- *pValueSize = ((CMetadataUtilityItf*)(context))->GetValueSize(index) + sizeof(XAMetadataInfo) - 1; //XAMetadataInfo already includes one byte for Data
-
- return XA_RESULT_SUCCESS;
- }
+ return XA_RESULT_PARAMETER_INVALID;
+ }
- return XA_RESULT_PARAMETER_INVALID;
- }
-
- XAresult mmf_get_value(void* context, XAuint32 index, XAuint32 valueSize, XAMetadataInfo *pValue)
- {
- XAresult ret = XA_RESULT_PARAMETER_INVALID;
- TInt dataSize = valueSize - sizeof(XAMetadataInfo) + 1;
- TInt outLen = 0, encodingType = CMetadataUtilityItf::EUnknownEncoding;
+ XAresult mmf_get_value(void* context, XAuint32 index, XAuint32 valueSize,
+ XAMetadataInfo *pValue)
+ {
+ XAresult ret = XA_RESULT_PARAMETER_INVALID;
+ TInt dataSize = valueSize - sizeof(XAMetadataInfo) + 1;
+ TInt outLen = 0, encodingType = CMetadataUtilityItf::EUnknownEncoding;
- if(dataSize > 0)
- {
-
- TInt actualDataSize = ((CMetadataUtilityItf*)(context))->GetValue(index, (char*)pValue->data, dataSize, &outLen, &encodingType);
+ if (dataSize > 0)
+ {
- pValue->size = outLen;
- pValue->encoding = (encodingType == CMetadataUtilityItf::EUnicodeEncoding) ? XA_CHARACTERENCODING_UTF16LE : XA_CHARACTERENCODING_BINARY;
- strcpy((char *)(pValue->langCountry), "en-us");
+ TInt actualDataSize =
+ ((CMetadataUtilityItf*) (context))->GetValue(index,
+ (char*) pValue->data, dataSize, &outLen,
+ &encodingType);
- if(!actualDataSize)
- {
- return XA_RESULT_INTERNAL_ERROR;
- }
- if(actualDataSize > dataSize)
- {
- ret = XA_RESULT_BUFFER_INSUFFICIENT;
- }
- else
- {
- ret = XA_RESULT_SUCCESS;
- }
- }
-
- return ret;
- }
-}
+ pValue->size = outLen;
+ pValue->encoding
+ = (encodingType == CMetadataUtilityItf::EUnicodeEncoding)
+ ? XA_CHARACTERENCODING_UTF16LE : XA_CHARACTERENCODING_BINARY;
+ strcpy((char *) (pValue->langCountry), "en-us");
+ if (!actualDataSize)
+ {
+ return XA_RESULT_INTERNAL_ERROR;
+ }
+ if (actualDataSize > dataSize)
+ {
+ ret = XA_RESULT_BUFFER_INSUFFICIENT;
+ }
+ else
+ {
+ ret = XA_RESULT_SUCCESS;
+ }
+ }
+
+ return ret;
+ }
+ }
+
--- a/khronosfws/openmax_al/src/mmf_adaptation/cmetadatautilityitf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/cmetadatautilityitf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,23 +1,23 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Metadata backend engine
+ *
+ */
+
#ifndef CMETADATA_UTILITY_ITF_H
#define CMETADATA_UTILITY_ITF_H
-
#ifdef __cplusplus
#include <e32base.h>
@@ -30,7 +30,6 @@
#include <MetaDataFieldContainer.h>
#include <MetaDataField.hrh>
-
#define MAX_EXTENSION_SIZE 10
#define uint32 unsigned int
@@ -38,112 +37,109 @@
class CHXMetadataUtilityItf;
NONSHARABLE_CLASS(CMetadataUtilityItf)
-{
+ {
public:
- enum TValueEncodingType
- {
- EUnknownEncoding,
- EAsciiEncoding,
- EUnicodeEncoding,
- EBinaryEncoding,
- };
-
- static CMetadataUtilityItf* New(char* uri);
+ enum TValueEncodingType
+ {
+ EUnknownEncoding, EAsciiEncoding, EUnicodeEncoding, EBinaryEncoding,
+ };
+
+ static CMetadataUtilityItf* New(char* uri);
- CMetadataUtilityItf();
- virtual ~CMetadataUtilityItf();
- TInt ParseSource(char* uri);
- TInt OpenSource(char* uri);
- TInt CalculateNumMetadataItems(TUint*);
- char* GetKey(TInt index);
- TInt GetValueSize(TInt index);
- TInt GetValue(TInt index, char* data, TInt maxLength, TInt* outSize, TInt* encodingType);
+ CMetadataUtilityItf();
+ virtual ~CMetadataUtilityItf();
+ TInt ParseSource(char* uri);
+ TInt OpenSource(char* uri);
+ TInt CalculateNumMetadataItems(TUint*);
+ char* GetKey(TInt index);
+ TInt GetValueSize(TInt index);
+ TInt GetValue(TInt index, char* data, TInt maxLength, TInt* outSize,
+ TInt* encodingType);
- //helper function
- //extracts left part of input descriptor upto (maxLen-1) and copies content in outPtr
- //append a null terminator
- static TInt ExtractUCS2(TDesC& inDes, char* outPtr,TInt maxLen);
+ //helper function
+ //extracts left part of input descriptor upto (maxLen-1) and copies content in outPtr
+ //append a null terminator
+ static TInt ExtractUCS2(TDesC& inDes, char* outPtr, TInt maxLen);
private:
- CS60MetadataUtilityItf* m_pS60Util;
- CHXMetadataUtilityItf* m_pHXUtil;
-};
-
+ CS60MetadataUtilityItf* m_pS60Util;
+ CHXMetadataUtilityItf* m_pHXUtil;
+ };
NONSHARABLE_CLASS(CS60MetadataUtilityItf)
-{
+ {
public:
- static CS60MetadataUtilityItf* New();
- ~CS60MetadataUtilityItf();
+ static CS60MetadataUtilityItf* New();
+ ~CS60MetadataUtilityItf();
- TInt CalculateNumMetadataItems(TUint*);
-
- char* GetKey(TInt index);
- TInt GetValueSize(TInt index);
- TInt GetValue(TInt index, char* data, TInt maxLength, TInt* outSize, TInt* encodingType);
+ TInt CalculateNumMetadataItems(TUint*);
- TInt ParseSource(TDesC&);
+ char* GetKey(TInt index);
+ TInt GetValueSize(TInt index);
+ TInt GetValue(TInt index, char* data, TInt maxLength, TInt* outSize,
+ TInt* encodingType);
+
+ TInt ParseSource(TDesC&);
- char* KeyMapping(TMetaDataFieldId);
- TInt ValueEncoding(TMetaDataFieldId);
+ char* KeyMapping(TMetaDataFieldId);
+ TInt ValueEncoding(TMetaDataFieldId);
- static bool IsSupportedExtension(char* extn);
+ static bool IsSupportedExtension(char* extn);
- TInt Reset();
+ TInt Reset();
private:
-
+
CS60MetadataUtilityItf();
void ConstructL();
-
- CMetaDataUtility* pMetaDataUtility; //S60MetadataUtility
-
- TUint uNumMetadataItems;
-
-};
+
+ CMetaDataUtility* pMetaDataUtility; //S60MetadataUtility
+
+ TUint uNumMetadataItems;
+
+ };
NONSHARABLE_CLASS(CHXMetadataUtilityItf)
-{
+ {
public:
- static CHXMetadataUtilityItf* New();
- ~CHXMetadataUtilityItf();
+ static CHXMetadataUtilityItf* New();
+ ~CHXMetadataUtilityItf();
+
+ TInt CalculateNumMetadataItems(TUint*);
+
+ char* GetKey(TInt index);
- TInt CalculateNumMetadataItems(TUint*);
-
- char* GetKey(TInt index);
-
- TInt ValueEncoding(HXMetaDataKeys::EHXMetaDataId fldID);
- TInt GetValueSize(TInt index);
- TInt GetValue(TInt index, char* data, TInt maxLength, TInt* outSize, TInt* encodingType);
-
- TInt ParseSource(TDesC&);
- char* KeyMapping(HXMetaDataKeys::EHXMetaDataId);
-
- TInt Reset();
+ TInt ValueEncoding(HXMetaDataKeys::EHXMetaDataId fldID);
+ TInt GetValueSize(TInt index);
+ TInt GetValue(TInt index, char* data, TInt maxLength, TInt* outSize,
+ TInt* encodingType);
+
+ TInt ParseSource(TDesC&);
+ char* KeyMapping(HXMetaDataKeys::EHXMetaDataId);
+
+ TInt Reset();
private:
- CHXMetadataUtilityItf();
+ CHXMetadataUtilityItf();
void ConstructL();
-
- CHXMetaDataUtility *pHXMetaDataUtility;
-
- TUint uNumMetadataItems;
-};
+
+ CHXMetaDataUtility *pHXMetaDataUtility;
+ TUint uNumMetadataItems;
+ };
#else
extern void* mmf_metadata_utility_init(char*);
-extern void mmf_metadata_utility_destroy(void* context);
+extern void mmf_metadata_utility_destroy(void* context);
extern XAresult mmf_metadata_utility_parse_source(void* , char*);
-extern XAresult mmf_get_item_count(void* context, XAuint32* itemCount);
-extern XAresult mmf_get_key_size(void* context, XAuint32 keyIndex, XAuint32* keySize);
-extern XAresult mmf_get_key(void* context, XAuint32 index,XAuint32 keySize, XAMetadataInfo *pKey);
-extern XAresult mmf_get_value_size(void* context, XAuint32 index, XAuint32 *pValueSize);
-extern XAresult mmf_get_value(void* context, XAuint32 index, XAuint32 valueSize, XAMetadataInfo *pValue);
+extern XAresult mmf_get_item_count(void* context, XAuint32* itemCount);
+extern XAresult mmf_get_key_size(void* context, XAuint32 keyIndex, XAuint32* keySize);
+extern XAresult mmf_get_key(void* context, XAuint32 index,XAuint32 keySize, XAMetadataInfo *pKey);
+extern XAresult mmf_get_value_size(void* context, XAuint32 index, XAuint32 *pValueSize);
+extern XAresult mmf_get_value(void* context, XAuint32 index, XAuint32 valueSize, XAMetadataInfo *pValue);
#endif //__cplusplus
-
#endif
--- a/khronosfws/openmax_al/src/mmf_adaptation/cmmfbackendengine.cpp Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/cmmfbackendengine.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -1,32 +1,33 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
-#include "cmmfbackendengine.h"
#include <string.h>
#include <ctype.h>
#include <uri8.h>
#include <uri16.h>
+#include "cmmfbackendengine.h"
#include "markerpositiontimer.h"
#include "positionupdatetimer.h"
#include "profileutilmacro.h"
-extern "C" {
+extern "C"
+ {
#include "xaadaptationmmf.h"
-}
+ }
#define RET_IF_ERR(res, val) if (res != KErrNone) return val
@@ -47,11 +48,10 @@
Destroy();
}
-CMMFBackendEngine::CMMFBackendEngine()
-:iPositionUpdatePeriod(1000), /* default is 1000 millisec */
- iUriPtr(NULL,0)
+CMMFBackendEngine::CMMFBackendEngine() :
+ iPositionUpdatePeriod(1000), /* default is 1000 millisec */
+ iUriPtr(NULL, 0)
{
-/* m_bWindowReferencePassed = FALSE;*/
iRecordState = ERecorderNotReady;
iPositionUpdateTimer = NULL;
iMediaPlayerState = XA_PLAYSTATE_PLAYERUNINITIALIZED;
@@ -69,7 +69,7 @@
if (!iAudioRecorder)
{
iBaseAudioRecorder = CMdaAudioRecorderUtility::NewL(*this);
- iAudioRecorder = (CMdaAudioRecorderUtility*)iBaseAudioRecorder;
+ iAudioRecorder = (CMdaAudioRecorderUtility*) iBaseAudioRecorder;
}
}
@@ -78,7 +78,7 @@
if (!iAudioPlayer)
{
iBaseAudioPlayer = CMdaAudioPlayerUtility::NewL(*this);
- iAudioPlayer = (CMdaAudioPlayerUtility*)iBaseAudioPlayer;
+ iAudioPlayer = (CMdaAudioPlayerUtility*) iBaseAudioPlayer;
}
InitPlayerTimersL();
}
@@ -87,8 +87,9 @@
{
if (!iVideoPlayer)
{
- iBaseVideoPlayer = CVideoPlayerUtility2::NewL(*this, EMdaPriorityNormal, EMdaPriorityPreferenceTimeAndQuality);
- iVideoPlayer = (CVideoPlayerUtility2*)iBaseVideoPlayer;
+ iBaseVideoPlayer = CVideoPlayerUtility2::NewL(*this,
+ EMdaPriorityNormal, EMdaPriorityPreferenceTimeAndQuality);
+ iVideoPlayer = (CVideoPlayerUtility2*) iBaseVideoPlayer;
iVideoPlayer->RegisterForVideoLoadingNotification(*this);
}
InitPlayerTimersL();
@@ -98,19 +99,22 @@
{
if (!iMarkerPositionTimer)
{
- iMarkerPositionTimer = CMarkerPositionTimer::NewL(iAudioPlayer, iVideoPlayer);
+ iMarkerPositionTimer = CMarkerPositionTimer::NewL(iAudioPlayer,
+ iVideoPlayer);
iMarkerPositionTimer->SetContext(iAdaptContext);
}
if (!iPlayItfPositionUpdateTimer)
{
- iPlayItfPositionUpdateTimer = CPositionUpdateTimer::NewL(iAudioPlayer, iVideoPlayer);
+ iPlayItfPositionUpdateTimer = CPositionUpdateTimer::NewL(
+ iAudioPlayer, iVideoPlayer);
iPlayItfPositionUpdateTimer->SetContext(iAdaptContext);
}
iMarkerPositionTimer->Stop();
iPlayItfPositionUpdateTimer->Stop();
}
-TInt CMMFBackendEngine::SetFileName(char* uri, XAuint32 format, TFuncInUse func)
+TInt CMMFBackendEngine::SetFileName(char* uri, XAuint32 format,
+ TFuncInUse func)
{
TInt err(KErrNone);
_LIT8(KFileSlash,"file:///");
@@ -120,7 +124,7 @@
if (iRecordState == ERecorderNotReady)
{
iFileFormat = format;
- iAPIBeingUsed = DetermineAPIToUse(uri, EPlay);
+ iAPIBeingUsed = DetermineAPIToUse(uri, ERecord);
err = XA_RESULT_INTERNAL_ERROR;
if (iAPIBeingUsed == EAudioRecorderUtility)
{
@@ -130,23 +134,23 @@
/* Initalize Recorder related objects */
TRAP(err, InitAudioRecorderUtilityL());
RET_IF_ERR(err, XA_RESULT_INTERNAL_ERROR);
-
- TRAP(err, iAudioRecorder->OpenFileL(iFileName));
+
+ TRAP(err, iAudioRecorder->OpenFileL(iUriPtr));
RET_IF_ERR(err, XA_RESULT_INTERNAL_ERROR);
/* Wait until we receive moscostatechanged callback */
- if(!iActiveSchedulerWait->IsStarted())
+ if (iActiveSchedulerWait && !iActiveSchedulerWait->IsStarted())
{
iActiveSchedulerWait->Start();
}
RET_IF_ERR(iErrorCode, XA_RESULT_INTERNAL_ERROR);
- }
+ }
}
}
else
{
/* The second one is needed for dynamic source interface */
- if ((iMediaPlayerState == XA_PLAYSTATE_PLAYERUNINITIALIZED) ||
- (iMediaPlayerState == XA_PLAYSTATE_STOPPED))
+ if ((iMediaPlayerState == XA_PLAYSTATE_PLAYERUNINITIALIZED)
+ || (iMediaPlayerState == XA_PLAYSTATE_STOPPED))
{
iFileFormat = format;
iAPIBeingUsed = DetermineAPIToUse(uri, EPlay);
@@ -162,13 +166,13 @@
TAG_TIME_PROFILING_BEGIN;
TRAP(err, iAudioPlayer->OpenFileL(iUriPtr));
- RET_IF_ERR(err, XA_RESULT_INTERNAL_ERROR);
- TAG_TIME_PROFILING_END;
+ RET_IF_ERR(err, XA_RESULT_INTERNAL_ERROR);
+ TAG_TIME_PROFILING_END;
PRINT_TO_CONSOLE_TIME_DIFF;
/* Wait until we receive mapc init complete */
PRINT_TO_CONSOLE_HOME_TIME;
- if (!iActiveSchedulerWait->IsStarted())
+ if (iActiveSchedulerWait && !iActiveSchedulerWait->IsStarted())
{
iActiveSchedulerWait->Start();
}
@@ -183,16 +187,27 @@
TRAP(err, InitVideoPlayerUtilityL());
RET_IF_ERR(err, XA_RESULT_INTERNAL_ERROR);
- /* Open file */
- TAG_TIME_PROFILING_BEGIN;
- TRAP(err, iVideoPlayer->OpenFileL(iUriPtr));
- RET_IF_ERR(err, XA_RESULT_INTERNAL_ERROR);
- TAG_TIME_PROFILING_END;
- PRINT_TO_CONSOLE_TIME_DIFF;
-
+ if (iUriType == ELocal)
+ {
+ /* Open file */
+ TAG_TIME_PROFILING_BEGIN;
+ TRAP(err, iVideoPlayer->OpenFileL(iUriPtr));
+ RET_IF_ERR(err, XA_RESULT_INTERNAL_ERROR);
+ TAG_TIME_PROFILING_END;
+ PRINT_TO_CONSOLE_TIME_DIFF;
+ }
+ else
+ {
+ /* Open URL */
+ TAG_TIME_PROFILING_BEGIN;
+ TRAP(err, iVideoPlayer->OpenUrlL(iUriPtr));
+ RET_IF_ERR(err, XA_RESULT_INTERNAL_ERROR);
+ TAG_TIME_PROFILING_END;
+ PRINT_TO_CONSOLE_TIME_DIFF;
+ }
/* Wait until we receive MvpuoOpenComplete */
PRINT_TO_CONSOLE_HOME_TIME;
- if (!iActiveSchedulerWait->IsStarted())
+ if (iActiveSchedulerWait && !iActiveSchedulerWait->IsStarted())
{
iActiveSchedulerWait->Start();
}
@@ -201,18 +216,18 @@
/* Prepare utility */
TAG_TIME_PROFILING_BEGIN_NO_VAR_DEF;
iVideoPlayer->Prepare();
- TAG_TIME_PROFILING_END_NO_VAR_DEF;
+ TAG_TIME_PROFILING_END_NO_VAR_DEF;
PRINT_TO_CONSOLE_TIME_DIFF;
/* Wait until we receive MvpuoPrepareComplete */
PRINT_TO_CONSOLE_HOME_TIME_NO_VAR_DEF;
- if (!iActiveSchedulerWait->IsStarted())
+ if (iActiveSchedulerWait && !iActiveSchedulerWait->IsStarted())
{
iActiveSchedulerWait->Start();
}
RET_IF_ERR(iErrorCode, XA_RESULT_INTERNAL_ERROR);
}
- }
+ }
}
if (err != KErrNone)
{
@@ -224,40 +239,65 @@
TInt CMMFBackendEngine::DetermineAPIToUse(char* uri, TFuncInUse aFunc)
{
char* dotPtr = NULL;
- char ext[MAX_EXTENSION_SIZE] = { 0 };
+ char ext[MAX_EXTENSION_SIZE] =
+ {
+ 0
+ };
int extLen;
- dotPtr = strrchr(uri, (int)'.');
+ int colpos;
+ char urischeme[MAX_EXTENSION_SIZE] =
+ {
+ 0
+ };
+ int urischemeLen;
+
+ dotPtr = strrchr(uri, (int) '.');
if (!dotPtr)
{
return KErrNotFound;
}
- strncpy(ext, dotPtr,strlen(dotPtr));
+ strncpy(ext, dotPtr, strlen(dotPtr));
/*Null terminate the string*/
ext[strlen(dotPtr)] = '\0';
extLen = sizeof(ext);
- for(unsigned int i=0; i < extLen; i++)
+ for (unsigned int i = 0; i < extLen; i++)
{
ext[i] = tolower(ext[i]);
}
+ colpos = strcspn(uri, ":");
+
+ strncpy(urischeme, uri, colpos + 1);
+ /*Null terminate the string*/
+ urischeme[colpos + 1] = '\0';
+ urischemeLen = sizeof(urischeme);
+ for (unsigned int i = 0; i < urischemeLen; i++)
+ {
+ urischeme[i] = tolower(urischeme[i]);
+ }
+
if (aFunc == ERecord)
{
return EAudioRecorderUtility;
}
else
{
- if (!strcasecmp(ext, ".mp3") ||
- !strcasecmp(ext, ".amr") ||
- !strcasecmp(ext, ".aac") ||
- !strcasecmp(ext, ".mid") ||
- !strcasecmp(ext, ".wav") ||
- !strcasecmp(ext, ".awb"))
+ if (!strcmp(urischeme, "file:"))
{
- return EAudioPlayerUtility;
+ if (!strcmp(ext, ".mp3") || !strcmp(ext, ".amr")
+ || !strcmp(ext, ".aac") || !strcmp(ext, ".mid")
+ || !strcmp(ext, ".wav") || !strcmp(ext, ".awb"))
+ {
+ return EAudioPlayerUtility;
+ }
+ else
+ {
+ return EVideoPlayerUtility;
+ }
}
- else
+ else
{
return EVideoPlayerUtility;
}
@@ -274,7 +314,7 @@
{
iMMFPlayerState = EPlayerOpened;
}
- if (iActiveSchedulerWait->IsStarted())
+ if (iActiveSchedulerWait && iActiveSchedulerWait->IsStarted())
{
iActiveSchedulerWait->AsyncStop();
}
@@ -294,8 +334,8 @@
{
iMMFPlayerState = EPlayerPrepared;
TAG_TIME_PROFILING_BEGIN;
- TRAP(iErrorCode, iMediaDuration = iVideoPlayer->DurationL());
- TAG_TIME_PROFILING_END;
+ TRAP(iErrorCode, iMediaDuration = iVideoPlayer->DurationL());
+ TAG_TIME_PROFILING_END;
PRINT_TO_CONSOLE_TIME_DIFF;
if (iErrorCode == KErrNone)
{
@@ -306,22 +346,22 @@
if (m_pWs && m_pScr && m_pWindow)
{
TRect videoExtent = TRect(m_pWindow->Size());
- TRect clipRect = TRect(m_pWindow->Size());
+ TRect clipRect = TRect(m_pWindow->Size());
TAG_TIME_PROFILING_BEGIN;
TRAP_IGNORE(iVideoPlayer->AddDisplayWindowL(*m_pWs, *m_pScr, *m_pWindow, videoExtent, clipRect));
- TRAP_IGNORE(iVideoPlayer->SetAutoScaleL(*m_pWindow, autoScale));
- TAG_TIME_PROFILING_END;
+ TRAP_IGNORE(iVideoPlayer->SetAutoScaleL(*m_pWindow, autoScale));
+ TAG_TIME_PROFILING_END;
PRINT_TO_CONSOLE_TIME_DIFF;
}
}
}
- if (iActiveSchedulerWait->IsStarted())
+ if (iActiveSchedulerWait && iActiveSchedulerWait->IsStarted())
{
iActiveSchedulerWait->AsyncStop();
}
}
-void CMMFBackendEngine::MvpuoFrameReady(CFbsBitmap& /*aFrame*/,TInt /*aError*/)
+void CMMFBackendEngine::MvpuoFrameReady(CFbsBitmap& /*aFrame*/, TInt /*aError*/)
{
}
@@ -340,8 +380,12 @@
{
iPlaybackHead = 0;
iMediaPlayerState = XA_PLAYSTATE_STOPPED;
- XAAdaptEvent event = {XA_PLAYITFEVENTS, XA_OBJECT_EVENT_RESOURCES_LOST, 0, NULL};
- XAAdaptationBase_SendAdaptEvents((XAAdaptationBaseCtx*)iAdaptContext, &event );
+ XAAdaptEvent event =
+ {
+ XA_PLAYITFEVENTS, XA_OBJECT_EVENT_RESOURCES_LOST, 0, NULL
+ };
+ XAAdaptationBase_SendAdaptEvents(
+ (XAAdaptationBaseCtx*) iAdaptContext, &event);
}
iMMFPlayerState = EPlayerPrepared;
iMarkerPositionTimer->Stop();
@@ -352,24 +396,28 @@
{
//RDebug::Print(_L("CMMFBackendEngine::MvpuoEvent (0x%x %d)"), event.iEventType, event.iErrorCode);
- if (event.iEventType == KMMFEventCategoryVideoPlayerGeneralError &&
- event.iErrorCode == KErrHardwareNotAvailable)
+ if (event.iEventType == KMMFEventCategoryVideoPlayerGeneralError
+ && event.iErrorCode == KErrHardwareNotAvailable)
{
//RDebug::Print(_L("CMMFBackendEngine::MvpuoEvent: Hardware Not Available"));
}
- else if (event.iEventType == KMMFEventCategoryVideoPlayerGeneralError &&
- event.iErrorCode == KErrMMPartialPlayback)
+ else if (event.iEventType == KMMFEventCategoryVideoPlayerGeneralError
+ && event.iErrorCode == KErrMMPartialPlayback)
{
//RDebug::Print(_L("CMMFBackendEngine::MvpuoEvent: Partial playback"));
- }
- if (event.iEventType == KMMFEventCategoryVideoPlayerGeneralError &&
- event.iErrorCode == -12014)
+ }
+ if (event.iEventType == KMMFEventCategoryVideoPlayerGeneralError
+ && event.iErrorCode == -12014)
{
//RDebug::Print(_L("CMMFBackendEngine::MvpuoEvent: Audio Device taken"));
PausePlayback();
- XAAdaptEvent event = {XA_PLAYITFEVENTS, XA_OBJECT_EVENT_RESOURCES_LOST, 0, NULL};
- XAAdaptationBase_SendAdaptEvents((XAAdaptationBaseCtx*)iAdaptContext, &event );
+ XAAdaptEvent event =
+ {
+ XA_PLAYITFEVENTS, XA_OBJECT_EVENT_RESOURCES_LOST, 0, NULL
+ };
+ XAAdaptationBase_SendAdaptEvents(
+ (XAAdaptationBaseCtx*) iAdaptContext, &event);
}
else if (event.iEventType == KMMFRefreshMetaData)
{
@@ -394,7 +442,7 @@
//MMdaAudioPlayerCallback
void CMMFBackendEngine::MapcInitComplete(TInt aError,
- const TTimeIntervalMicroSeconds& aDuration)
+ const TTimeIntervalMicroSeconds& aDuration)
{
PRINT_TO_CONSOLE_HOME_TIME;
@@ -413,13 +461,12 @@
iMarkerPositionTimer->UseAudioPlayer();
iPlayItfPositionUpdateTimer->UseAudioPlayer();
}
- if (iActiveSchedulerWait->IsStarted())
+ if (iActiveSchedulerWait && iActiveSchedulerWait->IsStarted())
{
iActiveSchedulerWait->AsyncStop();
}
}
-
void CMMFBackendEngine::MapcPlayComplete(TInt aError)
{
iErrorCode = aError;
@@ -439,22 +486,27 @@
iAudioPlayer->GetPosition(iPlaybackHead);
iMediaPlayerState = XA_PLAYSTATE_PAUSED;
iMMFPlayerState = EPlayerPaused;
- XAAdaptEvent event = {XA_PLAYITFEVENTS, XA_OBJECT_EVENT_RESOURCES_LOST, 0, NULL};
- XAAdaptationBase_SendAdaptEvents((XAAdaptationBaseCtx*)iAdaptContext, &event );
+ XAAdaptEvent event =
+ {
+ XA_PLAYITFEVENTS, XA_OBJECT_EVENT_RESOURCES_LOST, 0, NULL
+ };
+ XAAdaptationBase_SendAdaptEvents(
+ (XAAdaptationBaseCtx*) iAdaptContext, &event);
}
iMarkerPositionTimer->Stop();
iPlayItfPositionUpdateTimer->Stop();
}
// from MMdaObjectStateChangeObserver
-void CMMFBackendEngine::MoscoStateChangeEvent(CBase* /*aObject*/, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode)
+void CMMFBackendEngine::MoscoStateChangeEvent(CBase* /*aObject*/,
+ TInt aPreviousState, TInt aCurrentState, TInt aErrorCode)
{
TInt err(KErrNone);
iPreviousRecordState = aPreviousState;
iCurrentRecordState = aCurrentState;
iErrorCode = aErrorCode;
//RDebug::Print(_L("CMMFBackendEngine::MoscoStateChangeEvent 1 Error[%d]"),aErrorCode);
- if (iCurrentRecordState == CMdaAudioClipUtility::EOpen) //EOpen
+ if (iCurrentRecordState == CMdaAudioClipUtility::EOpen) //EOpen
{
//outputfile is open and ready for recording
iRecordState = CMMFBackendEngine::ERecorderOpen;
@@ -463,21 +515,27 @@
if (iPreviousRecordState == CMdaAudioClipUtility::ENotReady)
{
//RDebug::Print(_L("CMMFBackendEngine::MoscoStateChangeEvent 2"));
- TRAP(err,iaudioInputRecord = CAudioInput::NewL( *iAudioRecorder ));
- RArray<CAudioInput::TAudioInputPreference> inputArray;
- inputArray.Append( CAudioInput::EDefaultMic );
- // Set Audio Input
- iaudioInputRecord->SetAudioInputL( inputArray.Array( ) );
- inputArray.Close();
- TMMFMessageDestination destination(KUidMetaDataWriteCustomCommand);
- TMMFMessageDestinationPckg pckg = TMMFMessageDestinationPckg(destination);
- TInt ret = iAudioRecorder->RecordControllerCustomCommandSync(pckg, 0, KNullDesC8, KNullDesC8);
+ TRAP(err,iAudioInputRecord = CAudioInput::NewL( *iAudioRecorder ));
+ if (err == KErrNone)
+ {
+ RArray<CAudioInput::TAudioInputPreference> inputArray;
+ inputArray.Append(CAudioInput::EDefaultMic);
+ // Set Audio Input
+ TRAP(err, iAudioInputRecord->SetAudioInputL( inputArray.Array( ) ));
+ inputArray.Close();
+ }
+ TMMFMessageDestination destination(
+ KUidMetaDataWriteCustomCommand);
+ TMMFMessageDestinationPckg pckg = TMMFMessageDestinationPckg(
+ destination);
+ TInt ret = iAudioRecorder->RecordControllerCustomCommandSync(
+ pckg, 0, KNullDesC8, KNullDesC8);
//RDebug::Print(_L("CMMFBackendEngine::MoscoStateChangeEvent 3 [%d]"),ret);
if (ret != KErrNone && iFileFormat == XA_CONTAINERTYPE_MP4)
{
iPauseSupportMP4 = FALSE;
}
- if (iActiveSchedulerWait->IsStarted())
+ if (iActiveSchedulerWait && iActiveSchedulerWait->IsStarted())
{
iActiveSchedulerWait->AsyncStop();
}
@@ -485,25 +543,34 @@
}
else
{
- XAAdaptEvent event = {XA_RECORDITFEVENTS, XA_OBJECT_EVENT_RESOURCES_LOST, 0, NULL};
- XAAdaptationBase_SendAdaptEvents((XAAdaptationBaseCtx*)iAdaptContext, &event );
+ XAAdaptEvent event =
+ {
+ XA_RECORDITFEVENTS, XA_OBJECT_EVENT_RESOURCES_LOST, 0, NULL
+ };
+ XAAdaptationBase_SendAdaptEvents(
+ (XAAdaptationBaseCtx*) iAdaptContext, &event);
}
}
- else if (iCurrentRecordState == CMdaAudioClipUtility::ERecording) //ERecording
+ else if (iCurrentRecordState == CMdaAudioClipUtility::ERecording) //ERecording
{
iRecordState = CMMFBackendEngine::ERecorderRecording;
iPositionUpdateTimer->Start(iTimerDelay);
- XAAdaptEvent event = {XA_RECORDITFEVENTS, XA_RECORDEVENT_HEADMOVING, 0, NULL};
- XAAdaptationBase_SendAdaptEvents((XAAdaptationBaseCtx*)iAdaptContext, &event );
+ XAAdaptEvent event =
+ {
+ XA_RECORDITFEVENTS, XA_RECORDEVENT_HEADMOVING, 0, NULL
+ };
+ XAAdaptationBase_SendAdaptEvents(
+ (XAAdaptationBaseCtx*) iAdaptContext, &event);
}
- else //ENotReady
+ else //ENotReady
{
//outputfile is not open
iRecordState = CMMFBackendEngine::ERecorderNotReady;
}
}
-TInt CMMFBackendEngine::SetRecorderState(TRecorderState state, XAboolean stopCalled)
+TInt CMMFBackendEngine::SetRecorderState(TRecorderState state,
+ XAboolean stopCalled)
{
TInt err(KErrNone);
@@ -512,14 +579,15 @@
return XA_RESULT_INTERNAL_ERROR;
}
- switch(state)
+ switch (state)
{
case ERecorderNotReady:
iAudioRecorder->Close();
iRecordState = ERecorderNotReady;
break;
case ERecorderOpen:
- if (iFileFormat == XA_CONTAINERTYPE_MP4 && !iPauseSupportMP4 && !stopCalled)
+ if (iFileFormat == XA_CONTAINERTYPE_MP4 && !iPauseSupportMP4
+ && !stopCalled)
{
err = KErrNotSupported;
return err;
@@ -529,7 +597,8 @@
iRecordState = ERecorderOpen;
break;
case ERecorderRecording:
- TRAP(err, iAudioRecorder->RecordL());
+ TRAP(err, iAudioRecorder->RecordL())
+ ;
break;
}
return err;
@@ -548,17 +617,17 @@
if (iBaseVideoPlayer && iVideoPlayer)
{
- switch(iMMFPlayerState)
+ switch (iMMFPlayerState)
{
case EPlayerPlaying:
case EPlayerPaused:
case EPlayerPrepared:
iVideoPlayer->Stop();
case EPlayerOpened:
- if (m_pWs && m_pScr && m_pWindow)
- {
- iVideoPlayer->RemoveDisplayWindow(*m_pWindow);
- }
+ if (m_pWs && m_pScr && m_pWindow)
+ {
+ iVideoPlayer->RemoveDisplayWindow(*m_pWindow);
+ }
iVideoPlayer->Close();
case EPlayerClosed:
default:
@@ -566,6 +635,13 @@
};
}
+ // deleting the AudioInput object
+ if (iAudioInputRecord)
+ {
+ delete iAudioInputRecord;
+ iAudioInputRecord = NULL;
+ }
+
if (iBaseAudioPlayer && iAudioPlayer)
{
iAudioPlayer->Close();
@@ -576,7 +652,7 @@
iAudioRecorder->Close();
}
- if(iPositionUpdateTimer)
+ if (iPositionUpdateTimer)
{
iPositionUpdateTimer->Stop();
}
@@ -600,8 +676,6 @@
delete iBaseVideoPlayer;
iBaseVideoPlayer = NULL;
iVideoPlayer = NULL;
- delete iaudioInputRecord;
- iaudioInputRecord = NULL;
delete iBaseAudioPlayer;
iBaseAudioPlayer = NULL;
iAudioPlayer = NULL;
@@ -644,30 +718,28 @@
{
TInt err(KErrNone);
- if(iAPIBeingUsed == EAudioRecorderUtility)
+ if (iAPIBeingUsed == EAudioRecorderUtility)
{
- if(iRecordState != CMMFBackendEngine::ERecorderNotReady)
+ if (iRecordState != CMMFBackendEngine::ERecorderNotReady)
{
TFourCC dest;
TRAP(err, dest = iAudioRecorder->DestinationDataTypeL());
- if(err == KErrNone)
+ if (err == KErrNone)
{
*codecid = dest.FourCC();
}
}
}
- else if(iAPIBeingUsed == EAudioPlayerUtility)
+ else if (iAPIBeingUsed == EAudioPlayerUtility)
{
- if(iMediaPlayerState != XA_PLAYSTATE_PLAYERUNINITIALIZED)
+ if (iMediaPlayerState != XA_PLAYSTATE_PLAYERUNINITIALIZED)
{
TMMFMessageDestinationPckg pckg(KUidInterfaceMMFAudioController);
TPckgBuf<TMMFAudioConfig> configPackage;
- TInt err = iAudioPlayer->CustomCommandSync(pckg,
- EMMFAudioControllerGetSourceDataType,
- KNullDesC8,
- KNullDesC8,
- configPackage);
- if(err == KErrNone)
+ TInt err = iAudioPlayer->CustomCommandSync(pckg,
+ EMMFAudioControllerGetSourceDataType, KNullDesC8,
+ KNullDesC8, configPackage);
+ if (err == KErrNone)
{
*codecid = configPackage().iSourceDataTypeCode.FourCC();
}
@@ -680,22 +752,22 @@
{
TInt err(KErrNone);
TUint br(0);
- if(iAPIBeingUsed == EAudioRecorderUtility)
+ if (iAPIBeingUsed == EAudioRecorderUtility)
{
- if(iRecordState != CMMFBackendEngine::ERecorderNotReady)
+ if (iRecordState != CMMFBackendEngine::ERecorderNotReady)
{
TRAP(err, br = iAudioRecorder->DestinationBitRateL());
- if(err == KErrNone)
+ if (err == KErrNone)
{
*bitrate = br;
}
}
}
- else if(iAPIBeingUsed == EAudioPlayerUtility)
+ else if (iAPIBeingUsed == EAudioPlayerUtility)
{
- if(iMediaPlayerState != XA_PLAYSTATE_PLAYERUNINITIALIZED)
+ if (iMediaPlayerState != XA_PLAYSTATE_PLAYERUNINITIALIZED)
{
- TInt err = iAudioPlayer->GetBitRate(br);
+ TInt err = iAudioPlayer->GetBitRate(br);
*bitrate = br;
}
}
@@ -706,31 +778,29 @@
{
TInt err(KErrNone);
TUint sr(0);
- if(iAPIBeingUsed == EAudioRecorderUtility)
+ if (iAPIBeingUsed == EAudioRecorderUtility)
{
- if(iRecordState != CMMFBackendEngine::ERecorderNotReady)
+ if (iRecordState != CMMFBackendEngine::ERecorderNotReady)
{
TRAP(err, sr = iAudioRecorder->DestinationSampleRateL());
- if(err == KErrNone)
+ if (err == KErrNone)
{
- *samplerate = sr;
+ *samplerate = sr * 1000;
}
}
}
- else if(iAPIBeingUsed == EAudioPlayerUtility)
+ else if (iAPIBeingUsed == EAudioPlayerUtility)
{
- if(iMediaPlayerState != XA_PLAYSTATE_PLAYERUNINITIALIZED)
+ if (iMediaPlayerState != XA_PLAYSTATE_PLAYERUNINITIALIZED)
{
TMMFMessageDestinationPckg pckg(KUidInterfaceMMFAudioController);
TPckgBuf<TMMFAudioConfig> configPackage;
- TInt err = iAudioPlayer->CustomCommandSync(pckg,
- EMMFAudioControllerGetSourceSampleRate,
- KNullDesC8,
- KNullDesC8,
- configPackage);
- if(err == KErrNone)
+ TInt err = iAudioPlayer->CustomCommandSync(pckg,
+ EMMFAudioControllerGetSourceSampleRate, KNullDesC8,
+ KNullDesC8, configPackage);
+ if (err == KErrNone)
{
- *samplerate = configPackage().iSampleRate;
+ *samplerate = configPackage().iSampleRate * 1000;
}
}
}
@@ -741,29 +811,27 @@
{
TInt err(KErrNone);
TUint ch(0);
- if(iAPIBeingUsed == EAudioRecorderUtility)
+ if (iAPIBeingUsed == EAudioRecorderUtility)
{
- if(iRecordState != CMMFBackendEngine::ERecorderNotReady)
+ if (iRecordState != CMMFBackendEngine::ERecorderNotReady)
{
TRAP(err,ch = iAudioRecorder->DestinationNumberOfChannelsL());
- if(err == KErrNone)
+ if (err == KErrNone)
{
*channels = ch;
}
}
}
- else if(iAPIBeingUsed == EAudioPlayerUtility)
+ else if (iAPIBeingUsed == EAudioPlayerUtility)
{
- if(iMediaPlayerState != XA_PLAYSTATE_PLAYERUNINITIALIZED)
+ if (iMediaPlayerState != XA_PLAYSTATE_PLAYERUNINITIALIZED)
{
TMMFMessageDestinationPckg pckg(KUidInterfaceMMFAudioController);
TPckgBuf<TMMFAudioConfig> configPackage;
- TInt err = iAudioPlayer->CustomCommandSync( pckg,
- EMMFAudioControllerGetSourceNumChannels,
- KNullDesC8,
- KNullDesC8,
- configPackage );
- if(err == KErrNone)
+ TInt err = iAudioPlayer->CustomCommandSync(pckg,
+ EMMFAudioControllerGetSourceNumChannels, KNullDesC8,
+ KNullDesC8, configPackage);
+ if (err == KErrNone)
{
*channels = configPackage().iChannels;
}
@@ -775,10 +843,10 @@
TInt CMMFBackendEngine::SetDestinationBitRate(XAuint32* bitrate)
{
TInt err(KErrNone);
- if(iRecordState == CMMFBackendEngine::ERecorderOpen)
+ if (iRecordState == CMMFBackendEngine::ERecorderOpen)
{
TRAP(err, iAudioRecorder->SetDestinationBitRateL(*bitrate));
- if(err != KErrNone)
+ if (err != KErrNone)
{
return XA_RESULT_PARAMETER_INVALID;
}
@@ -789,10 +857,10 @@
TInt CMMFBackendEngine::SetDestinationSampleRate(XAmilliHertz* samplerate)
{
TInt err(KErrNone);
- if(iRecordState == CMMFBackendEngine::ERecorderOpen)
+ if (iRecordState == CMMFBackendEngine::ERecorderOpen)
{
- TRAP(err, iAudioRecorder->SetDestinationSampleRateL(*samplerate));
- if(err != KErrNone)
+ TRAP(err, iAudioRecorder->SetDestinationSampleRateL(*samplerate/1000));
+ if (err != KErrNone)
{
return XA_RESULT_PARAMETER_INVALID;
}
@@ -815,21 +883,21 @@
}
/*
-XAresult CMMFBackendEngine::SetWindowHandle(void* display_info)
- {
- XADataLocator_NativeDisplay* nativeDisplay;
- XADataSink* videoSink = (XADataSink*)display_info;
+ XAresult CMMFBackendEngine::SetWindowHandle(void* display_info)
+ {
+ XADataLocator_NativeDisplay* nativeDisplay;
+ XADataSink* videoSink = (XADataSink*)display_info;
- nativeDisplay = (XADataLocator_NativeDisplay*) (videoSink->pLocator);
+ nativeDisplay = (XADataLocator_NativeDisplay*) (videoSink->pLocator);
- m_pWindow = ((RWindow*)(nativeDisplay->hWindow));
- m_pWs = ((RWsSession*)(nativeDisplay->hDisplay));
+ m_pWindow = ((RWindow*)(nativeDisplay->hWindow));
+ m_pWs = ((RWsSession*)(nativeDisplay->hDisplay));
- m_bWindowReferencePassed = TRUE;
- return XA_RESULT_SUCCESS;
- }
+ m_bWindowReferencePassed = TRUE;
+ return XA_RESULT_SUCCESS;
+ }
-*/
+ */
XAresult CMMFBackendEngine::CreateAndConfigureWindowL()
{
#ifdef USE_LOCAL_WINDOW_RESOURCES
@@ -875,20 +943,20 @@
//display_info is of type XADataSink
//display_info.pLocator is of type XADataLocator_NativeDisplay
XADataLocator_NativeDisplay* nativeDisplay;
- XADataSink* videoSink = (XADataSink*)display_info;
+ XADataSink* videoSink = (XADataSink*) display_info;
if (videoSink)
{
nativeDisplay = (XADataLocator_NativeDisplay*) (videoSink->pLocator);
- m_pWindow = ((RWindow*)(nativeDisplay->hWindow));
- m_pWs = ((RWsSession*)(nativeDisplay->hDisplay));
- /*
- m_cropRegion = TRect(m_pWindow->Size());
- m_videoExtent = TRect(m_pWindow->Size());
- m_cropRect = TRect(m_pWindow->Size());
- m_clipRect = TRect(m_pWindow->Size());
- m_cropRegion = TRect(m_pWindow->Size());
- */
+ m_pWindow = ((RWindow*) (nativeDisplay->hWindow));
+ m_pWs = ((RWsSession*) (nativeDisplay->hDisplay));
+ /*
+ m_cropRegion = TRect(m_pWindow->Size());
+ m_videoExtent = TRect(m_pWindow->Size());
+ m_cropRect = TRect(m_pWindow->Size());
+ m_clipRect = TRect(m_pWindow->Size());
+ m_cropRegion = TRect(m_pWindow->Size());
+ */
if (m_pWs)
{
delete m_pScr;
@@ -911,24 +979,22 @@
case XA_PLAYSTATE_PAUSED:
/* If we are already at the end of clip, do nothing
* check ::MapcPlayComplete for documentation */
- if ((iPlaybackHead < iMediaDuration) &&
- ((iAPIBeingUsed == EAudioPlayerUtility) ||
- (iAPIBeingUsed == EVideoPlayerUtility)) )
+ if ((iPlaybackHead < iMediaDuration) && ((iAPIBeingUsed
+ == EAudioPlayerUtility) || (iAPIBeingUsed
+ == EVideoPlayerUtility)))
{
if (iAPIBeingUsed == EAudioPlayerUtility)
{
TAG_TIME_PROFILING_BEGIN;
iAudioPlayer->Play();
- TAG_TIME_PROFILING_END;
- PRINT_TO_CONSOLE_TIME_DIFF;
+ TAG_TIME_PROFILING_END; PRINT_TO_CONSOLE_TIME_DIFF;
}
else if (iAPIBeingUsed == EVideoPlayerUtility)
{
TAG_TIME_PROFILING_BEGIN;
//iVideoPlayer->Play( iPlaybackHead, iMediaDuration);
iVideoPlayer->Play();
- TAG_TIME_PROFILING_END;
- PRINT_TO_CONSOLE_TIME_DIFF;
+ TAG_TIME_PROFILING_END; PRINT_TO_CONSOLE_TIME_DIFF;
}
postHeadMovingEvent = ETrue;
iMediaPlayerState = XA_PLAYSTATE_PLAYING;
@@ -959,16 +1025,15 @@
{
case XA_PLAYSTATE_PLAYING:
case XA_PLAYSTATE_STOPPED:
- if ((iAPIBeingUsed == EAudioPlayerUtility) ||
- (iAPIBeingUsed == EVideoPlayerUtility) )
+ if ((iAPIBeingUsed == EAudioPlayerUtility) || (iAPIBeingUsed
+ == EVideoPlayerUtility))
{
TInt pauseOpRes(KErrNone);
if (iAPIBeingUsed == EAudioPlayerUtility)
{
TAG_TIME_PROFILING_BEGIN;
pauseOpRes = iAudioPlayer->Pause();
- TAG_TIME_PROFILING_END;
- PRINT_TO_CONSOLE_TIME_DIFF;
+ TAG_TIME_PROFILING_END; PRINT_TO_CONSOLE_TIME_DIFF;
}
else if (iAPIBeingUsed == EVideoPlayerUtility)
{
@@ -981,11 +1046,9 @@
{
iPlaybackHead = 0;
}
- }
- TAG_TIME_PROFILING_END;
- PRINT_TO_CONSOLE_TIME_DIFF;
+ } TAG_TIME_PROFILING_END; PRINT_TO_CONSOLE_TIME_DIFF;
}
- if ( pauseOpRes == KErrNone)
+ if (pauseOpRes == KErrNone)
{
iMediaPlayerState = XA_PLAYSTATE_PAUSED;
iMMFPlayerState = EPlayerPaused;
@@ -1011,15 +1074,14 @@
{
case XA_PLAYSTATE_PAUSED:
case XA_PLAYSTATE_PLAYING:
- if ((iAPIBeingUsed == EAudioPlayerUtility) ||
- (iAPIBeingUsed == EVideoPlayerUtility) )
+ if ((iAPIBeingUsed == EAudioPlayerUtility) || (iAPIBeingUsed
+ == EVideoPlayerUtility))
{
if (iAPIBeingUsed == EAudioPlayerUtility)
{
TAG_TIME_PROFILING_BEGIN;
iAudioPlayer->Stop();
- TAG_TIME_PROFILING_END;
- PRINT_TO_CONSOLE_TIME_DIFF;
+ TAG_TIME_PROFILING_END; PRINT_TO_CONSOLE_TIME_DIFF;
iMMFPlayerState = EPlayerOpened;
}
@@ -1027,9 +1089,8 @@
{
TAG_TIME_PROFILING_BEGIN;
iVideoPlayer->Stop();
- TAG_TIME_PROFILING_END;
- PRINT_TO_CONSOLE_TIME_DIFF;
-
+ TAG_TIME_PROFILING_END; PRINT_TO_CONSOLE_TIME_DIFF;
+
iMMFPlayerState = EPlayerPrepared;
}
iMediaPlayerState = XA_PLAYSTATE_STOPPED;
@@ -1110,7 +1171,7 @@
TRAP(err, pos = iVideoPlayer->PositionL());
if (err == KErrNone)
{
- *pMsec = pos.Int64() / divider;
+ *pMsec = pos.Int64() / divider;
retVal = XA_RESULT_SUCCESS;
}
}
@@ -1132,13 +1193,12 @@
case XA_PLAYSTATE_STOPPED:
case XA_PLAYSTATE_PAUSED:
case XA_PLAYSTATE_PLAYING:
- if(iAPIBeingUsed == EAudioPlayerUtility)
+ if (iAPIBeingUsed == EAudioPlayerUtility)
{
pos = pMsec * multiplier;
TAG_TIME_PROFILING_BEGIN;
iAudioPlayer->SetPosition(pos);
- TAG_TIME_PROFILING_END;
- PRINT_TO_CONSOLE_TIME_DIFF;
+ TAG_TIME_PROFILING_END; PRINT_TO_CONSOLE_TIME_DIFF;
retVal = XA_RESULT_SUCCESS;
}
@@ -1146,8 +1206,8 @@
{
pos = pMsec * multiplier;
TAG_TIME_PROFILING_BEGIN;
- TRAPD(err, iVideoPlayer->SetPositionL(pos));
- TAG_TIME_PROFILING_END;
+ TRAPD(err, iVideoPlayer->SetPositionL(pos));
+ TAG_TIME_PROFILING_END;
PRINT_TO_CONSOLE_TIME_DIFF;
if (err == KErrNone)
{
@@ -1171,7 +1231,7 @@
case XA_PLAYSTATE_STOPPED:
case XA_PLAYSTATE_PAUSED:
case XA_PLAYSTATE_PLAYING:
- if(iAPIBeingUsed == EAudioPlayerUtility)
+ if (iAPIBeingUsed == EAudioPlayerUtility)
{
numRepeats = repeat ? -2 : 0;
iAudioPlayer->SetRepeats(numRepeats, 0);
@@ -1188,7 +1248,8 @@
return retVal;
}
-XAresult CMMFBackendEngine::SetPlayWindow(XAmillisecond start, XAmillisecond end)
+XAresult CMMFBackendEngine::SetPlayWindow(XAmillisecond start,
+ XAmillisecond end)
{
XAresult retVal(XA_RESULT_INTERNAL_ERROR);
TInt64 multiplier(1000);
@@ -1200,11 +1261,11 @@
case XA_PLAYSTATE_STOPPED:
case XA_PLAYSTATE_PAUSED:
case XA_PLAYSTATE_PLAYING:
- if(iAPIBeingUsed == EAudioPlayerUtility)
+ if (iAPIBeingUsed == EAudioPlayerUtility)
{
startpos = start * multiplier;
endpos = end * multiplier;
- retVal = iAudioPlayer->SetPlayWindow(startpos,endpos);
+ retVal = iAudioPlayer->SetPlayWindow(startpos, endpos);
}
else
{
@@ -1268,7 +1329,8 @@
iPlayItfPositionUpdateTimer->SetCallbackEventMask(iPlayItfEventFlags);
iPlayItfPositionUpdateTimer->RegisterCallback(iPlayItfCBFunction);
- iPlayItfPositionUpdateTimer->SetPositionUpdatePeriod(iPositionUpdatePeriod);
+ iPlayItfPositionUpdateTimer->SetPositionUpdatePeriod(
+ iPositionUpdatePeriod);
switch (iMediaPlayerState)
{
@@ -1288,11 +1350,14 @@
void CMMFBackendEngine::DoPostEvent(XAuint32 event)
{
- if ((iPlayItfEventFlags & event) &&
- (iPlayItfCBFunction != NULL))
+ if ((iPlayItfEventFlags & event) && (iPlayItfCBFunction != NULL))
{
- XAAdaptEvent xaevent = {XA_PLAYITFEVENTS, event, 0, 0 };
- XAAdaptationBase_SendAdaptEvents((XAAdaptationBaseCtx*)iAdaptContext, &xaevent );
+ XAAdaptEvent xaevent =
+ {
+ XA_PLAYITFEVENTS, event, 0, 0
+ };
+ XAAdaptationBase_SendAdaptEvents(
+ (XAAdaptationBaseCtx*) iAdaptContext, &xaevent);
}
}
@@ -1301,7 +1366,7 @@
XAresult retVal(XA_RESULT_SUCCESS);
TInt bitRate(0);
TInt numS(0);
- if(iAPIBeingUsed == EAudioPlayerUtility)
+ if (iAPIBeingUsed == EAudioPlayerUtility)
{
numS = 1;
*numstreams = numS;
@@ -1309,15 +1374,15 @@
else if (iAPIBeingUsed == EVideoPlayerUtility)
{
TRAPD(err, bitRate = iVideoPlayer->VideoBitRateL());
- if(!err && bitRate)
+ if (!err && bitRate)
{
numS++;
*numstreams = numS;
}
-
+
bitRate = 0;
TRAP(err, bitRate = iVideoPlayer->AudioBitRateL());
- if(!err && bitRate)
+ if (!err && bitRate)
{
numS++;
*numstreams = numS;
@@ -1326,16 +1391,17 @@
return retVal;
}
-XAresult CMMFBackendEngine::GetStreamInfo(XAuint32 streamindex, XAuint32* streamtype)
+XAresult CMMFBackendEngine::GetStreamInfo(XAuint32 streamindex,
+ XAuint32* streamtype)
{
XAresult retVal(XA_RESULT_SUCCESS);
- if(iAPIBeingUsed == EAudioPlayerUtility)
+ if (iAPIBeingUsed == EAudioPlayerUtility)
{
*streamtype = XA_DOMAINTYPE_AUDIO;
}
else if (iAPIBeingUsed == EVideoPlayerUtility)
{
- switch(streamindex)
+ switch (streamindex)
{
case 1:
*streamtype = XA_DOMAINTYPE_VIDEO;
@@ -1351,18 +1417,18 @@
return retVal;
}
-
-XAresult CMMFBackendEngine::GetVideoFrameSize(XAuint32* height, XAuint32* width, XAuint32* frameRate)
+XAresult CMMFBackendEngine::GetVideoFrameSize(XAuint32* height,
+ XAuint32* width, XAuint32* frameRate)
{
XAresult retVal(XA_RESULT_SUCCESS);
- if(iAPIBeingUsed == EVideoPlayerUtility)
+ if (iAPIBeingUsed == EVideoPlayerUtility)
{
- if(iMediaPlayerState != XA_PLAYSTATE_PLAYERUNINITIALIZED)
+ if (iMediaPlayerState != XA_PLAYSTATE_PLAYERUNINITIALIZED)
{
TSize size;
TReal32 framerate(0);
TRAPD(err, iVideoPlayer->VideoFrameSizeL(size));
- if(!err)
+ if (!err)
{
*height = size.iHeight;
*width = size.iWidth;
@@ -1373,7 +1439,7 @@
}
TRAP(err, framerate = iVideoPlayer->VideoFrameRateL());
- if(!err)
+ if (!err)
{
*frameRate = framerate;
}
@@ -1390,24 +1456,27 @@
return retVal;
}
-XAresult CMMFBackendEngine::SetActiveState(XAuint32 streamindex, XAboolean active)
+XAresult CMMFBackendEngine::SetActiveState(XAuint32 streamindex,
+ XAboolean active)
{
XAresult retVal(XA_RESULT_SUCCESS);
TInt err(KErrNone);
- if(iAPIBeingUsed == EAudioPlayerUtility)
+ if (iAPIBeingUsed == EAudioPlayerUtility)
{
retVal = XA_RESULT_FEATURE_UNSUPPORTED;
}
else if (iAPIBeingUsed == EVideoPlayerUtility)
{
- switch(streamindex)
+ switch (streamindex)
{
case 1:
- TRAP(err, iVideoPlayer->SetVideoEnabledL(active));
+ TRAP(err, iVideoPlayer->SetVideoEnabledL(active))
+ ;
retVal = err;
break;
case 2:
- TRAP(err, iVideoPlayer->SetAudioEnabledL(active));
+ TRAP(err, iVideoPlayer->SetAudioEnabledL(active))
+ ;
retVal = err;
break;
default:
@@ -1423,7 +1492,7 @@
/* Initializes and save uri param into iUri structure */
TInt err(KErrNone);
TInt uriLen;
-
+
if (!uri)
return KErrArgument;
@@ -1432,26 +1501,25 @@
delete iUri;
iUri = NULL;
}
-
+
uriLen = strlen(uri);
- TPtr8 uriParam((TUint8*)uri, uriLen, uriLen);
-
+ TPtr8 uriParam((TUint8*) uri, uriLen, uriLen);
+
TRAP(err, iUri = HBufC::NewL(uriLen));
if (err != KErrNone)
return err;
iUriPtr.Set(iUri->Des());
iUriPtr.Copy(uriParam); /* Copy data*/
- iUriPtr.LowerCase();
-
+ //iUriPtr.LowerCase();
/* For file scheme convert from file:///c:/folder/file.ext
* format to c:\\folder\\file.ext using TUriParser. */
_LIT(KFileScheme,"file:///");
if (iUriPtr.Find(KFileScheme) >= 0)
{
- TPtr tmp(const_cast<TUint16 *>(iUriPtr.Ptr()) + KFileScheme().Length(),
- iUriPtr.Length(),
- iUriPtr.Length());
+ iUriType = ELocal;
+ TPtr tmp(const_cast<TUint16 *> (iUriPtr.Ptr())
+ + KFileScheme().Length(), iUriPtr.Length(), iUriPtr.Length());
/* Convert from c:/folder/file.ext format to
* c:\\folder\\file.ext using TUriParser.
* TUriParser8 accepts uri in format file:///c/folder/file.ext,
@@ -1477,15 +1545,18 @@
file = NULL;
}
+ else
+ {
+ iUriType = EStreaming;
+ }
return err;
}
-
XAresult CMMFBackendEngine::SetVolume(XAuint32 volume)
{
XAresult retVal(XA_RESULT_SUCCESS);
TInt err(KErrNone);
- if(iAPIBeingUsed == EAudioPlayerUtility)
+ if (iAPIBeingUsed == EAudioPlayerUtility)
{
retVal = iAudioPlayer->SetVolume(volume);
}
@@ -1494,17 +1565,17 @@
TRAP(err, iVideoPlayer->SetVolumeL(volume));
retVal = err;
}
- else if(iAPIBeingUsed == EAudioRecorderUtility)
+ else if (iAPIBeingUsed == EAudioRecorderUtility)
{
retVal = iAudioRecorder->SetVolume(volume);
}
- return retVal;
+ return retVal;
}
XAresult CMMFBackendEngine::GetMaxVolume(XAuint32* maxvolume)
{
XAresult retVal(XA_RESULT_SUCCESS);
- if(iAPIBeingUsed == EAudioPlayerUtility)
+ if (iAPIBeingUsed == EAudioPlayerUtility)
{
*maxvolume = iAudioPlayer->MaxVolume();
}
@@ -1512,21 +1583,21 @@
{
*maxvolume = iVideoPlayer->MaxVolume();
}
- else if(iAPIBeingUsed == EAudioRecorderUtility)
+ else if (iAPIBeingUsed == EAudioRecorderUtility)
{
*maxvolume = iAudioRecorder->MaxVolume();
}
- return retVal;
+ return retVal;
}
XAresult CMMFBackendEngine::GetVolume(XAuint32* volume)
{
XAresult retVal(XA_RESULT_SUCCESS);
TInt mmfvolume(0);
- if(iAPIBeingUsed == EAudioPlayerUtility)
+ if (iAPIBeingUsed == EAudioPlayerUtility)
{
retVal = iAudioPlayer->GetVolume(mmfvolume);
- if(retVal == XA_RESULT_SUCCESS)
+ if (retVal == XA_RESULT_SUCCESS)
{
*volume = mmfvolume;
}
@@ -1535,228 +1606,252 @@
{
*volume = iVideoPlayer->Volume();
}
- else if(iAPIBeingUsed == EAudioRecorderUtility)
+ else if (iAPIBeingUsed == EAudioRecorderUtility)
{
retVal = iAudioRecorder->GetVolume(mmfvolume);
- if(retVal == XA_RESULT_SUCCESS)
+ if (retVal == XA_RESULT_SUCCESS)
{
*volume = mmfvolume;
}
}
- return retVal;
+ return retVal;
}
-extern "C" {
+extern "C"
+ {
int mmf_backend_engine_init(void** engine)
- {
+ {
TRAPD(err, *engine = CMMFBackendEngine::NewL());
return err;
- }
+ }
void mmf_backend_engine_deinit(void* engine)
- {
- delete ((CMMFBackendEngine*)engine);
- }
+ {
+ delete ((CMMFBackendEngine*) engine);
+ }
int mmf_set_recorder_uri(void* context, char* uri, XAuint32 format)
- {
- return ((CMMFBackendEngine*)(context))->SetFileName(uri,format,CMMFBackendEngine::ERecord);
- }
+ {
+ return ((CMMFBackendEngine*) (context))->SetFileName(uri, format,
+ CMMFBackendEngine::ERecord);
+ }
int mmf_set_adapt_context(void* context, void* adaptcontext)
- {
- return ((CMMFBackendEngine*)(context))->SetAdaptContext(adaptcontext);
- }
+ {
+ return ((CMMFBackendEngine*) (context))->SetAdaptContext(adaptcontext);
+ }
void mmf_close(void* context)
- {
- ((CMMFBackendEngine*)context)->Close();
- }
+ {
+ ((CMMFBackendEngine*) context)->Close();
+ }
int mmf_start_recording(void* context)
- {
- return ((CMMFBackendEngine*)(context))->SetRecorderState(CMMFBackendEngine::ERecorderRecording,FALSE);
- }
+ {
+ return ((CMMFBackendEngine*) (context))->SetRecorderState(
+ CMMFBackendEngine::ERecorderRecording, FALSE);
+ }
- int mmf_stop_recording(void* context, XAboolean stopCalled )
- {
- return ((CMMFBackendEngine*)(context))->SetRecorderState(CMMFBackendEngine::ERecorderOpen, stopCalled);
- }
+ int mmf_stop_recording(void* context, XAboolean stopCalled)
+ {
+ return ((CMMFBackendEngine*) (context))->SetRecorderState(
+ CMMFBackendEngine::ERecorderOpen, stopCalled);
+ }
int mmf_get_record_position(void* context, XAuint64* position)
- {
- return ((CMMFBackendEngine*)(context))->GetRecordPosition(position);
- }
+ {
+ return ((CMMFBackendEngine*) (context))->GetRecordPosition(position);
+ }
- int mmf_set_record_position_update_period(void* context, XAmillisecond msec)
- {
- return ((CMMFBackendEngine*)(context))->SetPositionUpdatePerioed(msec);
- }
+ int mmf_set_record_position_update_period(void* context,
+ XAmillisecond msec)
+ {
+ return ((CMMFBackendEngine*) (context))->SetPositionUpdatePerioed(
+ msec);
+ }
int mmf_get_codec_id(void* context, XAuint32* encoderId)
- {
- return ((CMMFBackendEngine*)(context))->GetCodecId(encoderId);
- }
+ {
+ return ((CMMFBackendEngine*) (context))->GetCodecId(encoderId);
+ }
int mmf_get_channels(void* context, XAuint32* channelsIn)
- {
- return ((CMMFBackendEngine*)(context))->GetChannels(channelsIn);
- }
+ {
+ return ((CMMFBackendEngine*) (context))->GetChannels(channelsIn);
+ }
int mmf_get_samplerate(void* context, XAmilliHertz* sampleRate)
- {
- return ((CMMFBackendEngine*)(context))->GetSampleRate(sampleRate);
- }
+ {
+ return ((CMMFBackendEngine*) (context))->GetSampleRate(sampleRate);
+ }
int mmf_get_bitrate(void* context, XAuint32* bitRate)
- {
- return ((CMMFBackendEngine*)(context))->GetBitRate(bitRate);
- }
+ {
+ return ((CMMFBackendEngine*) (context))->GetBitRate(bitRate);
+ }
int mmf_set_destination_channels(void* context, XAuint32* channelsIn)
- {
- return ((CMMFBackendEngine*)(context))->SetDestinationChannels(channelsIn);
- }
+ {
+ return ((CMMFBackendEngine*) (context))->SetDestinationChannels(
+ channelsIn);
+ }
- int mmf_set_destination_samplerate(void* context, XAmilliHertz* sampleRate)
- {
- return ((CMMFBackendEngine*)(context))->SetDestinationSampleRate(sampleRate);
- }
+ int mmf_set_destination_samplerate(void* context,
+ XAmilliHertz* sampleRate)
+ {
+ return ((CMMFBackendEngine*) (context))->SetDestinationSampleRate(
+ sampleRate);
+ }
int mmf_set_destination_bitrate(void* context, XAuint32* bitRate)
- {
- return ((CMMFBackendEngine*)(context))->SetDestinationBitRate(bitRate);
- }
+ {
+ return ((CMMFBackendEngine*) (context))->SetDestinationBitRate(
+ bitRate);
+ }
XAresult mmf_set_play_adapt_context(void * context, void * adaptcontext)
- {
- return ((CMMFBackendEngine *)(context))->SetPlayAdaptContext(adaptcontext);
- }
+ {
+ return ((CMMFBackendEngine *) (context))->SetPlayAdaptContext(
+ adaptcontext);
+ }
XAresult mmf_set_player_uri(void * context, char * uri, XAuint32 format)
- {
- return ((CMMFBackendEngine *)(context))->SetFileName(uri,format,CMMFBackendEngine::EPlay);
- }
+ {
+ return ((CMMFBackendEngine *) (context))->SetFileName(uri, format,
+ CMMFBackendEngine::EPlay);
+ }
-/*
- XAresult mmf_set_window_handle(void * context, void * display_info)
- {
- return ((CMMFBackendEngine *)(context))->SetWindowHandle(display_info);
- }
+ /*
+ XAresult mmf_set_window_handle(void * context, void * display_info)
+ {
+ return ((CMMFBackendEngine *)(context))->SetWindowHandle(display_info);
+ }
-*/
+ */
XAresult mmf_setup_native_display(void * context, void * display_info)
- {
- return ((CMMFBackendEngine *)(context))->SetNativeDisplayInformation(display_info);
- }
+ {
+ return ((CMMFBackendEngine *) (context))->SetNativeDisplayInformation(
+ display_info);
+ }
XAresult mmf_playitf_resume_playback(void * context)
- {
- return ((CMMFBackendEngine *)(context))->ResumePlayback();
- }
+ {
+ return ((CMMFBackendEngine *) (context))->ResumePlayback();
+ }
XAresult mmf_playitf_pause_playback(void * context)
- {
- return ((CMMFBackendEngine *)(context))->PausePlayback();
- }
+ {
+ return ((CMMFBackendEngine *) (context))->PausePlayback();
+ }
XAresult mmf_playitf_stop_playback(void * context)
- {
- return ((CMMFBackendEngine *)(context))->StopPlayback();
- }
+ {
+ return ((CMMFBackendEngine *) (context))->StopPlayback();
+ }
XAresult mmf_playitf_get_play_state(void * context, XAuint32 * pState)
- {
- return ((CMMFBackendEngine *)(context))->GetPlayState(pState);
- }
+ {
+ return ((CMMFBackendEngine *) (context))->GetPlayState(pState);
+ }
XAresult mmf_playitf_get_duration(void * context, XAmillisecond * pMsec)
- {
- return ((CMMFBackendEngine *)(context))->GetDuration(pMsec);
- }
+ {
+ return ((CMMFBackendEngine *) (context))->GetDuration(pMsec);
+ }
XAresult mmf_playitf_get_position(void * context, XAmillisecond * pMsec)
- {
- return ((CMMFBackendEngine *)(context))->GetPosition(pMsec);
- }
+ {
+ return ((CMMFBackendEngine *) (context))->GetPosition(pMsec);
+ }
- XAresult mmf_playitf_register_callback(void * context, xaPlayCallback callback)
- {
- return ((CMMFBackendEngine *)(context))->RegisterCallback(callback);
- }
+ XAresult mmf_playitf_register_callback(void * context,
+ xaPlayCallback callback)
+ {
+ return ((CMMFBackendEngine *) (context))->RegisterCallback(callback);
+ }
- XAresult mmf_playitf_set_callback_events_mask(void * context, XAuint32 eventflags)
- {
- return ((CMMFBackendEngine *)(context))->SetCallbackEventsMask(eventflags);
- }
+ XAresult mmf_playitf_set_callback_events_mask(void * context,
+ XAuint32 eventflags)
+ {
+ return ((CMMFBackendEngine *) (context))->SetCallbackEventsMask(
+ eventflags);
+ }
- XAresult mmf_playitf_set_marker_position(void * context, XAmillisecond mSec)
- {
- return ((CMMFBackendEngine *)(context))->SetMarkerPosition(mSec);
- }
+ XAresult mmf_playitf_set_marker_position(void * context,
+ XAmillisecond mSec)
+ {
+ return ((CMMFBackendEngine *) (context))->SetMarkerPosition(mSec);
+ }
XAresult mmf_playitf_clear_marker_position(void * context)
- {
- return ((CMMFBackendEngine *)(context))->ClearMarkerPosition();
+ {
+ return ((CMMFBackendEngine *) (context))->ClearMarkerPosition();
- }
+ }
- XAresult mmf_playitf_set_position_update_period(void * context, XAmillisecond mSec)
- {
- return ((CMMFBackendEngine *)(context))->SetPositionUpdatePeriod(mSec);
- }
+ XAresult mmf_playitf_set_position_update_period(void * context,
+ XAmillisecond mSec)
+ {
+ return ((CMMFBackendEngine *) (context))->SetPositionUpdatePeriod(
+ mSec);
+ }
XAresult mmf_seekitf_set_position(void * context, XAmillisecond pMsec)
- {
- return ((CMMFBackendEngine *)(context))->SetPosition(pMsec);
- }
+ {
+ return ((CMMFBackendEngine *) (context))->SetPosition(pMsec);
+ }
- XAresult mmf_seekitf_set_playwindow(void * context, XAmillisecond start, XAmillisecond end)
- {
- return ((CMMFBackendEngine *)(context))->SetPlayWindow(start,end);
- }
+ XAresult mmf_seekitf_set_playwindow(void * context, XAmillisecond start,
+ XAmillisecond end)
+ {
+ return ((CMMFBackendEngine *) (context))->SetPlayWindow(start, end);
+ }
XAresult mmf_seekitf_set_repeats(void * context, XAboolean repeat)
- {
- return ((CMMFBackendEngine *)(context))->SetRepeats(repeat);
- }
+ {
+ return ((CMMFBackendEngine *) (context))->SetRepeats(repeat);
+ }
- XAresult mmf_streaminformationitf_get_streaminfo(void * context, XAuint32 streamindex,
- XAuint32* streamtype)
- {
- return ((CMMFBackendEngine *)(context))->GetStreamInfo(streamindex, streamtype);
- }
+ XAresult mmf_streaminformationitf_get_streaminfo(void * context,
+ XAuint32 streamindex, XAuint32* streamtype)
+ {
+ return ((CMMFBackendEngine *) (context))->GetStreamInfo(streamindex,
+ streamtype);
+ }
- XAresult mmf_streaminformationitf_get_numstreams(void * context, XAuint32* numstreams)
- {
- return ((CMMFBackendEngine *)(context))->GetNumStreams(numstreams);
- }
+ XAresult mmf_streaminformationitf_get_numstreams(void * context,
+ XAuint32* numstreams)
+ {
+ return ((CMMFBackendEngine *) (context))->GetNumStreams(numstreams);
+ }
- XAresult mmf_streaminformationitf_get_videoframesize(void * context, XAuint32* height,
- XAuint32* width, XAuint32* frameRate)
- {
- return ((CMMFBackendEngine *)(context))->GetVideoFrameSize(height,width,frameRate);
- }
+ XAresult mmf_streaminformationitf_get_videoframesize(void * context,
+ XAuint32* height, XAuint32* width, XAuint32* frameRate)
+ {
+ return ((CMMFBackendEngine *) (context))->GetVideoFrameSize(height,
+ width, frameRate);
+ }
- XAresult mmf_streaminformationitf_set_activestream(void * context, XAuint32 streamindex,
- XAboolean active)
- {
- return ((CMMFBackendEngine *)(context))->SetActiveState(streamindex, active);
- }
-
+ XAresult mmf_streaminformationitf_set_activestream(void * context,
+ XAuint32 streamindex, XAboolean active)
+ {
+ return ((CMMFBackendEngine *) (context))->SetActiveState(streamindex,
+ active);
+ }
+
XAresult mmf_volumeitf_set_volume(void * context, XAuint32 volume)
- {
- return ((CMMFBackendEngine *)(context))->SetVolume(volume);
- }
+ {
+ return ((CMMFBackendEngine *) (context))->SetVolume(volume);
+ }
XAresult mmf_volumeitf_get_maxvolume(void * context, XAuint32* volume)
- {
- return ((CMMFBackendEngine *)(context))->GetMaxVolume(volume);
- }
-
+ {
+ return ((CMMFBackendEngine *) (context))->GetMaxVolume(volume);
+ }
+
XAresult mmf_volumeitf_get_volume(void * context, XAuint32* volume)
- {
- return ((CMMFBackendEngine *)(context))->GetVolume(volume);
- }
-}
+ {
+ return ((CMMFBackendEngine *) (context))->GetVolume(volume);
+ }
+ }
--- a/khronosfws/openmax_al/src/mmf_adaptation/cmmfbackendengine.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/cmmfbackendengine.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,22 +1,22 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: MMF Backend Engine Header
+ *
+ */
-#ifndef XA_CMMFBackendEngine_H
-#define XA_CMMFBackendEngine_H
+#ifndef CMMFBackendEngine_H
+#define CMMFBackendEngine_H
#define ENABLE_GRAPHICS_SURFACE_INTEGRATION
@@ -45,46 +45,55 @@
#endif
// MetaDataWrite Custom Command UID
-const TUid KUidMetaDataWriteCustomCommand = {0x10207af9};
+const TUid KUidMetaDataWriteCustomCommand =
+ {
+ 0x10207af9
+ };
#define MAX_EXTENSION_SIZE 10
class CMarkerPositionTimer;
class CPositionUpdateTimer;
NONSHARABLE_CLASS(CMMFBackendEngine) : public CBase,
- public MVideoPlayerUtilityObserver,
- public MVideoLoadingObserver,
- public MMdaAudioPlayerCallback,
- public MMdaObjectStateChangeObserver
+ public MVideoPlayerUtilityObserver,
+ public MVideoLoadingObserver,
+ public MMdaAudioPlayerCallback,
+ public MMdaObjectStateChangeObserver
{
-public:
- enum TFuncInUse
- {
- EPlay = 0,
- ERecord
- };
-
- enum TMMFUtiltyInUse
- {
+public:
+ enum TFuncInUse
+ {
+ EPlay = 0,
+ ERecord
+ };
+
+ enum TUriType
+ {
+ ELocal = 0,
+ EStreaming
+ };
+
+ enum TMMFUtiltyInUse
+ {
ENoUtility,
EVideoPlayerUtility,
EAudioPlayerUtility,
EAudioRecorderUtility
- };
-
- enum TRecorderState
- {
- ERecorderNotReady = 0,
- ERecorderOpen,
- ERecorderRecording
- };
-
+ };
+
+ enum TRecorderState
+ {
+ ERecorderNotReady = 0,
+ ERecorderOpen,
+ ERecorderRecording
+ };
+
public:
static CMMFBackendEngine* NewL();
~CMMFBackendEngine();
-
- TInt SetFileName(char* uri,XAuint32 format,TFuncInUse func);
+
+ TInt SetFileName(char* uri, XAuint32 format, TFuncInUse func);
void Close();
void Destroy();
TInt SetRecorderState(TRecorderState state, XAboolean stopCalled);
@@ -99,11 +108,10 @@
TInt SetDestinationSampleRate(XAmilliHertz* samplerate);
TInt SetDestinationChannels(XAuint32* channels);
-/* XAresult SetWindowHandle(void* display_info);*/
XAresult CreateAndConfigureWindowL();
XAresult SetNativeDisplayInformation(void* display_info);
XAresult ResumePlayback();
- XAresult PausePlayback();
+ XAresult PausePlayback();
XAresult StopPlayback();
XAresult GetPlayState(XAuint32 *pState);
XAresult GetDuration(XAmillisecond *pMsec);
@@ -118,30 +126,27 @@
XAresult SetPosition(XAmillisecond pMsec);
XAresult SetRepeats(XAboolean repeat);
XAresult SetPlayWindow(XAmillisecond start, XAmillisecond end);
-
+
XAresult GetNumStreams(XAuint32* numstreams);
XAresult GetStreamInfo(XAuint32 streamindex, XAuint32* streamtype);
- XAresult GetVideoFrameSize(XAuint32* height, XAuint32* width, XAuint32* frameRate);
+ XAresult GetVideoFrameSize(XAuint32* height, XAuint32* width,
+ XAuint32* frameRate);
XAresult SetActiveState(XAuint32 streamindex, XAboolean active);
-
+
XAresult SetVolume(XAuint32 volume);
XAresult GetVolume(XAuint32* volume);
XAresult GetMaxVolume(XAuint32* maxvolume);
public:
// MMdaObjectStateChangeObserver
- void MoscoStateChangeEvent(
- CBase* aObject,
- TInt aPreviousState,
- TInt aCurrentState,
- TInt aErrorcCode);
+ void MoscoStateChangeEvent(CBase* aObject, TInt aPreviousState,
+ TInt aCurrentState, TInt aErrorcCode);
//MMdaAudioPlayerCallback
- void MapcInitComplete(
- TInt aError,
+ void MapcInitComplete(TInt aError,
const TTimeIntervalMicroSeconds& aDuration);
void MapcPlayComplete(TInt aError);
-
+
//From MVidePlayerUtilityObserver
void MvpuoOpenComplete(TInt aError);
void MvpuoPrepareComplete(TInt aError);
@@ -151,18 +156,18 @@
// From MRebufferCallback
void MvloLoadingStarted();
- void MvloLoadingComplete();
+ void MvloLoadingComplete();
-private:
+private:
enum TPlayerState
- {
- EPlayerClosed,
- EPlayerOpened,
- EPlayerPrepared,
- EPlayerPaused,
- EPlayerPlaying,
- };
-
+ {
+ EPlayerClosed,
+ EPlayerOpened,
+ EPlayerPrepared,
+ EPlayerPaused,
+ EPlayerPlaying,
+ };
+
private:
CMMFBackendEngine();
void ConstructL();
@@ -176,29 +181,29 @@
TInt InitializeURIForMMFUtil(char *uri);
private:
- CVideoPlayerUtility2* iVideoPlayer;
- CBase* iBaseVideoPlayer;
- CMdaAudioPlayerUtility* iAudioPlayer;
- CBase* iBaseAudioPlayer;
- CMdaAudioRecorderUtility* iAudioRecorder;
- CBase* iBaseAudioRecorder;
- TFileName iFileName;
- TInt iAPIBeingUsed;
- TInt iPreviousRecordState;
- TInt iCurrentRecordState;
- TInt iErrorCode;
- TRecorderState iRecordState;
- LocalTimer* iPositionUpdateTimer;
- TUint64 iTimerDelay;
- void* iAdaptContext;
- XAuint32 iFileFormat;
- TInt iPauseSupportMP4;
- CActiveSchedulerWait* iActiveSchedulerWait;
- CAudioInput* iaudioInputRecord;
+ CVideoPlayerUtility2* iVideoPlayer;
+ CBase* iBaseVideoPlayer;
+ CMdaAudioPlayerUtility* iAudioPlayer;
+ CBase* iBaseAudioPlayer;
+ CMdaAudioRecorderUtility* iAudioRecorder;
+ CBase* iBaseAudioRecorder;
+ TFileName iFileName;
+ TInt iAPIBeingUsed;
+ TInt iPreviousRecordState;
+ TInt iCurrentRecordState;
+ TInt iErrorCode;
+ TRecorderState iRecordState;
+ LocalTimer* iPositionUpdateTimer;
+ TUint64 iTimerDelay;
+ void* iAdaptContext;
+ XAuint32 iFileFormat;
+ TInt iPauseSupportMP4;
+ CActiveSchedulerWait* iActiveSchedulerWait;
+ CAudioInput* iAudioInputRecord;
#ifdef USE_LOCAL_WINDOW_RESOURCES
CMediaClientVideoDisplay* iMediaClientVideoDisplay;
TRect m_clipRect;
- TRect m_videoExtent;
+ TRect m_videoExtent;
TRect m_cropRegion;
TVideoAspectRatio m_pixelAspectRatio;
RWindow m_Window;
@@ -208,8 +213,8 @@
TReal32 m_scaleWidth;
TReal32 m_scaleHeight;
TInt m_horizPos;
- TInt m_vertPos;
- TInt m_displayId;
+ TInt m_vertPos;
+ TInt m_displayId;
/*TBool m_bWindowReferencePassed;*/
RWsSession m_ws;
#endif /* USE_LOCAL_WINDOW_RESOURCES */
@@ -239,21 +244,20 @@
/* Property set by client (for file without file:///) */
HBufC* iUri; /* owns */
TPtr iUriPtr;
+ TUriType iUriType;
/* Property set by client */
RWsSession* m_pWs;
/* Property set by client */
- RWindow* m_pWindow;
+ RWindow* m_pWindow;
};
#else /* __cplusplus */
-
extern int mmf_backend_engine_init(void** engine);
extern int mmf_backend_engine_deinit(void* engine);
extern int mmf_set_recorder_uri(void* context, char* uri, XAuint32 format);
-
extern void mmf_close(void* context);
extern int mmf_set_adapt_context(void* context, void* adaptcontext);
@@ -298,15 +302,15 @@
extern XAresult mmf_streaminformationitf_get_numstreams(void * context, XAuint32* numstreams);
extern XAresult mmf_streaminformationitf_get_streaminfo(void * context, XAuint32 streamindex,
- XAuint32* streamtype);
+ XAuint32* streamtype);
extern XAresult mmf_streaminformationitf_get_videoframesize(void * context, XAuint32* height,
- XAuint32* width, XAuint32* frameRate);
+ XAuint32* width, XAuint32* frameRate);
extern XAresult mmf_streaminformationitf_set_activestream(void * context, XAuint32 streamindex,
- XAboolean active);
+ XAboolean active);
extern XAresult mmf_volumeitf_set_volume(void * context, XAuint32 volume);
extern XAresult mmf_volumeitf_get_volume(void * context, XAuint32* volume);
extern XAresult mmf_volumeitf_get_maxvolume(void * context, XAuint32* volume);
#endif /* __cplusplus */
-#endif /* XA_CMMFBackendEngine_H */
+#endif /* CMMFBackendEngine_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/cmmfradiobackendengine.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -0,0 +1,616 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "cmmfradiobackendengine.h"
+
+extern "C" {
+#include "xaradioitfadaptation.h"
+#include "xanokiavolumeextitfadaptationmmf.h"
+#include "xanokialinearvolumeitfadaptationmmf.h"
+#include "xaplayitfadaptationmmf.h"
+}
+
+CMMFRadioBackendEngine *CMMFRadioBackendEngine::s_instance = 0;
+
+CMMFRadioBackendEngine* CMMFRadioBackendEngine::Instance()
+{
+ if (!s_instance)
+ {
+ s_instance = new CMMFRadioBackendEngine();
+ s_instance->ConstructL();
+ }
+ return s_instance;
+}
+
+void CMMFRadioBackendEngine::DeleteInstance()
+{
+ if (iFmTunerUtility)
+ {
+ iFmTunerUtility->Close();
+ iFmTunerUtility = NULL;
+ }
+ if (iPlayerUtility)
+ {
+ iPlayerUtility->Close();
+ iPlayerUtility = NULL;
+ }
+
+ if (iRadioUtility)
+ {
+ delete iRadioUtility;
+ iRadioUtility = NULL;
+ }
+
+}
+
+CMMFRadioBackendEngine::~CMMFRadioBackendEngine()
+{
+}
+
+CMMFRadioBackendEngine::CMMFRadioBackendEngine()
+{
+
+}
+
+void CMMFRadioBackendEngine::ConstructL()
+{
+ iAutoFlag = ETrue;
+
+ iRadioUtility = CRadioUtility::NewL( ETrue );
+ iFmTunerUtility = &iRadioUtility->RadioFmTunerUtilityL( *this );
+ iFmTunerUtility->EnableTunerInOfflineMode( ETrue );
+ iFmTunerUtility->RequestTunerControl();
+
+ iPlayerUtility = &iRadioUtility->RadioPlayerUtilityL( *this );
+
+}
+void CMMFRadioBackendEngine::StationSeek(XAboolean aUpwards)
+{
+ if (iFmTunerUtility)
+ {
+ iFmTunerUtility->StationSeek(aUpwards);
+ }
+}
+
+void CMMFRadioBackendEngine::SetFrequency(TInt aFreq)
+{
+ DEBUG_API_A1("CMMFRadioBackendEngine::SetFrequency: %d", aFreq);
+ if (iFmTunerUtility)
+ {
+ iFmTunerUtility->SetFrequency(aFreq);
+ }
+}
+
+TInt CMMFRadioBackendEngine::GetFrequency(TInt& aFreq)
+{
+ DEBUG_API("CMMFRadioBackendEngine::GetFrequency");
+ TInt ret = KErrNotFound;
+ if (iFmTunerUtility)
+ {
+ ret = iFmTunerUtility->GetFrequency(aFreq);
+ }
+ DEBUG_API_A1("CMMFRadioBackendEngine::GetFrequency RET: %d", ret);
+// RDebug::Print(_L("CMMFRadioBackendEngine::GetFrequency RET: %d"), ret);
+ return ret;
+}
+
+TInt CMMFRadioBackendEngine::GetSignalStrength(TInt& aSignalStrength)
+{
+ TInt ret = KErrNotFound;
+ if (iFmTunerUtility)
+ {
+ ret = iFmTunerUtility->GetSignalStrength(aSignalStrength);
+ }
+ DEBUG_API_A1("CMMFRadioBackendEngine::GetSignalStrength RET: %d", ret);
+// RDebug::Print(_L("CMMFRadioBackendEngine::GetSignalStrength RET: %d"), ret);
+ return ret;
+}
+
+void CMMFRadioBackendEngine::CancelSetFrequency()
+{
+ if (iFmTunerUtility)
+ {
+ iFmTunerUtility->CancelSetFrequency();
+ }
+}
+
+void CMMFRadioBackendEngine::CancelStationSeek()
+{
+ if (iFmTunerUtility)
+ {
+ iFmTunerUtility->CancelStationSeek();
+ }
+}
+
+void CMMFRadioBackendEngine::SetFreqRange(TFmRadioFrequencyRange aRange)
+{
+ if (iFmTunerUtility)
+ {
+ iFmTunerUtility->SetFrequencyRange(aRange);
+ }
+}
+
+TInt CMMFRadioBackendEngine::GetFreqRange(TFmRadioFrequencyRange& aRange)
+{
+ TInt ret = KErrNotFound;
+ TInt minFreq = 0;
+ TInt maxFreq = 0;
+
+ if (iFmTunerUtility)
+ {
+ ret = iFmTunerUtility->GetFrequencyRange((TFmRadioFrequencyRange&)aRange, (TInt&)minFreq, (TInt&)maxFreq);
+ }
+ DEBUG_API_A1("CMMFRadioBackendEngine::GetFreqRange RET: %d", ret);
+// RDebug::Print(_L("CMMFRadioBackendEngine::GetFreqRange RET: %d"), ret);
+ return ret;
+}
+
+TInt CMMFRadioBackendEngine::GetFreqRangeProperties(TFmRadioFrequencyRange& aRange, TInt& aMinFreq, TInt& aMaxFreq)
+{
+ TInt ret = KErrNotFound;
+
+ if (iFmTunerUtility)
+ {
+ ret = iFmTunerUtility->GetFrequencyRange((TFmRadioFrequencyRange&)aRange, (TInt&)aMinFreq, (TInt&)aMaxFreq);
+ }
+ DEBUG_API_A1("CMMFRadioBackendEngine::GetFreqRangeProperties RET: %d", ret);
+// RDebug::Print(_L("CMMFRadioBackendEngine::GetFreqRangeProperties RET: %d"), ret);
+ return ret;
+}
+TInt CMMFRadioBackendEngine::GetMaxVolume(TInt& aMaxVol)
+{
+ TInt ret = KErrNotFound;
+
+ if (iPlayerUtility)
+ {
+ ret = iPlayerUtility->GetMaxVolume(aMaxVol);
+ }
+ return ret;
+}
+
+TInt CMMFRadioBackendEngine::SetVolume(TInt aVol)
+{
+ TInt ret = KErrNotFound;
+
+ if (iPlayerUtility)
+ {
+ ret = iPlayerUtility->SetVolume(aVol);
+ }
+ return ret;
+}
+
+TInt CMMFRadioBackendEngine::SetMute(XAboolean aMute)
+{
+ TInt ret = KErrNotFound;
+
+ if (iPlayerUtility)
+ {
+ ret = iPlayerUtility->Mute(aMute);
+ }
+ return ret;
+}
+
+TInt CMMFRadioBackendEngine::GetVolume(TInt& aVol)
+{
+ TInt ret = KErrNotFound;
+
+ if (iPlayerUtility)
+ {
+ ret = iPlayerUtility->GetVolume(aVol);
+ }
+ return ret;
+}
+
+TInt CMMFRadioBackendEngine::GetForcedMonoReception(XAuint32& aForcedMono)
+{
+ TInt ret = KErrNotFound;
+ TBool forceMono = EFalse;
+
+ if (iFmTunerUtility)
+ {
+ ret = iFmTunerUtility->GetForcedMonoReception(forceMono);
+ if (ret != KErrNone)
+ return ret;
+ }
+
+// RDebug::Print(_L("CMMFRadioBackendEngine::GetForcedMonoReception RET: %d, aForcedMono = %d"), ret, aForcedMono);
+ if (forceMono)
+ {
+ aForcedMono = XA_STEREOMODE_MONO;
+ }
+ else
+ {
+ if (iAutoFlag)
+ aForcedMono = XA_STEREOMODE_AUTO;
+ else
+ aForcedMono = XA_STEREOMODE_STEREO;
+ }
+ return ret;
+}
+
+void CMMFRadioBackendEngine::PlayRadio()
+{
+ if (iPlayerUtility)
+ {
+ iPlayerUtility->Play();
+ }
+}
+
+void CMMFRadioBackendEngine::StopRadio()
+{
+ if (iPlayerUtility)
+ {
+ iPlayerUtility->Stop();
+ }
+}
+
+TInt CMMFRadioBackendEngine::ForceMonoReception(XAuint32 aForcedMono)
+{
+ TInt ret = KErrNotFound;
+
+ if (iFmTunerUtility)
+ {
+ if (aForcedMono == XA_STEREOMODE_MONO)
+ {
+ iAutoFlag = EFalse;
+ ret = iFmTunerUtility->ForceMonoReception(ETrue);
+ }
+ else if (aForcedMono == XA_STEREOMODE_STEREO)
+ {
+ iAutoFlag = EFalse;
+ ret = iFmTunerUtility->ForceMonoReception(EFalse);
+ }
+ else // (aForcedMono == XA_STEREOMODE_AUTO)
+ {
+ iAutoFlag = ETrue;
+ ret = iFmTunerUtility->ForceMonoReception(EFalse);
+ }
+ }
+ DEBUG_API_A1("CMMFRadioBackendEngine::ForceMonoReception RET: %d", ret);
+ // RDebug::Print(_L("CMMFRadioBackendEngine::ForceMonoReception RET: %d"), ret);
+ return ret;
+}
+
+XAresult CMMFRadioBackendEngine::SetRadioAdaptContext(void * adaptcontext)
+{
+ iRadioAdaptContext = adaptcontext;
+ return XA_RESULT_SUCCESS;
+}
+
+XAresult CMMFRadioBackendEngine::SetPlayerAdaptContext(void * adaptcontext)
+{
+ iPlayerAdaptContext = adaptcontext;
+ return XA_RESULT_SUCCESS;
+}
+
+// -----------------------------------------------------------------------------
+// CMMFRadioBackendEngine::MrpeoPresetChanged
+// Observer for Presets
+// -----------------------------------------------------------------------------
+void CMMFRadioBackendEngine::MrpeoPresetChanged(
+ TPresetChangeEvent /*aChange*/,
+ TInt /*aIndex*/ )
+{
+
+}
+
+// ----------------------------------------------------
+// CMMFRadioBackendEngine::MrftoSquelchChange
+//
+// ----------------------------------------------------
+//
+void CMMFRadioBackendEngine::MrftoSquelchChange(
+ TBool /*aSquelch*/ )
+{
+
+}
+
+// ----------------------------------------------------
+// CMMFRadioBackendEngine::MTsoForcedMonoChanged
+// Called when a client enables/disabled forced mono reception
+// ----------------------------------------------------
+//
+void CMMFRadioBackendEngine::MrftoForcedMonoChange(
+ TBool aForcedMono )
+{
+ DEBUG_API_A1("CMMFRadioBackendEngine::MrftoForcedMonoChange: aForcedMono = %d", aForcedMono);
+// RDebug::Print(_L("CMMFRadioBackendEngine::MrftoForcedMonoChange: aForcedMono = %d"), aForcedMono);
+ XARadioItfAdapt_StereoStatusChange((XAAdaptationBaseCtx*)iRadioAdaptContext, aForcedMono);
+}
+
+ // ----------------------------------------------------
+// CMMFRadioBackendEngine::MrftoFrequencyChange
+// Called when the tuned frequency changes
+// ----------------------------------------------------
+//
+void CMMFRadioBackendEngine::MrftoFrequencyChange(
+ TInt aNewFrequency)
+{
+ DEBUG_API_A1("CMMFRadioBackendEngine::MrftoFrequencyChange: aNewFrequency = %d", aNewFrequency);
+ // RDebug::Print(_L("CMMFRadioBackendEngine::MrftoFrequencyChange aNewFrequency = %d"), aNewFrequency);
+ XARadioItfAdapt_FrequencyChange((XAAdaptationBaseCtx*)iRadioAdaptContext, aNewFrequency);
+}
+
+// ----------------------------------------------------
+// CMMFRadioBackendEngine::MrftoFrequencyRangeChange
+//
+// ----------------------------------------------------
+//
+void CMMFRadioBackendEngine::MrftoFrequencyRangeChange(
+ TFmRadioFrequencyRange aNewRange )
+{
+ DEBUG_API_A1("CMMFRadioBackendEngine::MrftoFrequencyRangeChange: aNewRange = %d", aNewRange);
+// RDebug::Print(_L("CMMFRadioBackendEngine::MrftoFrequencyRangeChange: aNewRange = %d"), aNewRange);
+ XARadioItfAdapt_FrequencyRangeChange((XAAdaptationBaseCtx*)iRadioAdaptContext, aNewRange);
+}
+
+// ----------------------------------------------------
+// CMMFRadioBackendEngine::MrftoOfflineModeStatusChange
+// Called when offline mode status changes
+// ----------------------------------------------------
+//
+void CMMFRadioBackendEngine::MrftoOfflineModeStatusChange(
+ TBool /*aOfflineMode*/ )
+{
+
+}
+
+// ----------------------------------------------------
+// CMMFRadioBackendEngine::MrftoAntennaStatusChange
+// Called when antenna status changes.
+// ----------------------------------------------------
+//
+void CMMFRadioBackendEngine::MrftoAntennaStatusChange(
+ TBool /*aAttached*/ )
+{
+
+}
+
+// ----------------------------------------------------
+// CMMFRadioBackendEngine::MrftoFmTransmitterStatusChange
+// The FM tuner is turned off when FM transmitter is on.
+// ----------------------------------------------------
+//
+void CMMFRadioBackendEngine::MrftoFmTransmitterStatusChange(
+ TBool /*aActive*/ )
+{
+
+}
+
+// ----------------------------------------------------
+// CMMFRadioBackendEngine::MrftoStationSeekComplete
+//
+// ----------------------------------------------------
+//
+void CMMFRadioBackendEngine::MrftoStationSeekComplete(
+ TInt aError,
+ TInt aFrequency )
+{
+ XARadioItfAdapt_SeekComplete((XAAdaptationBaseCtx*)iRadioAdaptContext, aError, aFrequency);
+}
+
+// ----------------------------------------------------
+// CMMFRadioBackendEngine::MrftoSetFrequencyComplete
+// ----------------------------------------------------
+//
+void CMMFRadioBackendEngine::MrftoSetFrequencyComplete(
+ TInt aError )
+{
+ DEBUG_API_A1("CMMFRadioBackendEngine::MrftoSetFrequencyComplete: aError = %d", aError);
+// RDebug::Print(_L("CMMFRadioBackendEngine::MrftoFrrequencyComplete: aError = %d"), aError);
+ TInt freq = 0;
+ if (!aError)
+ {
+ iFmTunerUtility->GetFrequency(freq);
+ }
+ DEBUG_API_A1("CMMFRadioBackendEngine::MrftoSetFrequencyComplete: new freq is: %d", freq);
+// RDebug::Print(_L("CMMFRadioBackendEngine::MrftoSetFrequencyComplete: new freq is: %d"), freq);
+ XARadioItfAdapt_SetFrequencyComplete((XAAdaptationBaseCtx*)iRadioAdaptContext, aError, freq);
+}
+
+// ----------------------------------------------------
+// CMMFRadioBackendEngine::MrftoSetFrequencyRangeComplete
+//
+// ----------------------------------------------------
+//
+void CMMFRadioBackendEngine::MrftoSetFrequencyRangeComplete(
+ TInt aError )
+{
+ DEBUG_API_A1("CMMFRadioBackendEngine::MrftoSetFrequencyRangeComplete: aError = %d", aError);
+// RDebug::Print(_L("CMMFRadioBackendEngine::MrftoSetFrequencyRangeComplete: aError = %d"), aError);
+ XARadioItfAdapt_SetFrequencyRangeComplete((XAAdaptationBaseCtx*)iRadioAdaptContext, aError);
+}
+
+// ----------------------------------------------------
+// CMMFRadioBackendEngine::MrftoRequestTunerControlComplete
+// ----------------------------------------------------
+//
+void CMMFRadioBackendEngine::MrftoRequestTunerControlComplete(
+ TInt aError)
+{
+// RDebug::Print(_L("CMMFRadioBackendEngine::MrftoRequestTunerControlComplete: aError = %d"), aError);
+}
+
+// ----------------------------------------------------
+// CMMFRadioBackendEngine::MrpoBalanceChange
+//
+// ----------------------------------------------------
+//
+void CMMFRadioBackendEngine::MrpoBalanceChange(
+ TInt /*aLeftPercentage*/,
+ TInt /*aRightPercentage*/ )
+{
+
+}
+
+// ----------------------------------------------------
+// CMMFRadioBackendEngine::MrpoMuteChange
+//
+// ----------------------------------------------------
+//
+void CMMFRadioBackendEngine::MrpoMuteChange(
+ TBool aMute )
+{
+ XANokiaVolumeExtItfAdapt_MuteChange((XAAdaptationBaseCtx*)iPlayerAdaptContext, aMute);
+}
+
+// ----------------------------------------------------
+// CMMFRadioBackendEngine::MrpoVolumeChange
+//
+// ----------------------------------------------------
+//
+void CMMFRadioBackendEngine::MrpoVolumeChange(
+ TInt aVolume )
+{
+ XANokiaLinearVolumeItfAdapt_VolumeChange((XAAdaptationBaseCtx*)iPlayerAdaptContext, aVolume);
+}
+
+// ----------------------------------------------------
+// CMMFRadioBackendEngine::MrpoStateChange This is Tuner State
+// Called when the state of the tuner changes
+// ----------------------------------------------------
+//
+void CMMFRadioBackendEngine::MrpoStateChange(
+ TPlayerState aState,
+ TInt aError )
+{
+ if ( aError )
+ {
+ DEBUG_API_A1("CMMFRadioBackendEngine::MrpoStateChange: aError = %d", aError);
+ // RDebug::Print(_L("CMMFRadioBackendEngine::MrpoStateChange: aError = %d"), aError);
+ }
+
+ DEBUG_API_A1("CMMFRadioBackendEngine::MrpoStateChange: new state = %d", aState);
+// RDebug::Print(_L("CMMFRadioBackendEngine::MrpoStateChange: new state = %d"), aState);
+
+ if ( aState == ERadioPlayerPlaying )
+ {
+ XAPlayItfAdaptMMF_StateChange((XAAdaptationBaseCtx*)iPlayerAdaptContext, ETrue);
+ }
+ else // ERadioPlayerIdle
+ {
+ XAPlayItfAdaptMMF_StateChange((XAAdaptationBaseCtx*)iPlayerAdaptContext, EFalse);
+ }
+}
+
+extern "C" {
+
+ void* cmmfradiobackendengine_init()
+ {
+ return CMMFRadioBackendEngine::Instance();
+ }
+
+ void cmmfradiobackendengine_delete(void* context)
+ {
+ ((CMMFRadioBackendEngine*)(context))->DeleteInstance();
+ }
+
+ void set_frequency(void* context, XAuint32 freq)
+ {
+ ((CMMFRadioBackendEngine*)(context))->SetFrequency((TInt)freq);
+ }
+
+ XAresult get_frequency(void* context, XAuint32* freq)
+ {
+ return ((CMMFRadioBackendEngine*)(context))->GetFrequency((TInt&)*freq);
+ }
+
+ XAresult get_signal_strength(void* context, XAuint32* signalStrength)
+ {
+ return ((CMMFRadioBackendEngine*)(context))->GetSignalStrength((TInt&)*signalStrength);
+ }
+
+ void station_seek(void* context, XAboolean upwards)
+ {
+ ((CMMFRadioBackendEngine*)(context))->StationSeek(upwards);
+ }
+
+ void cancel_set_frequency(void* context)
+ {
+ ((CMMFRadioBackendEngine*)(context))->CancelSetFrequency();
+ }
+
+ void cancel_station_seek(void* context)
+ {
+ ((CMMFRadioBackendEngine*)(context))->CancelStationSeek();
+ }
+
+ void set_freq_range(void* context, XAuint8 range)
+ {
+ ((CMMFRadioBackendEngine*)(context))->SetFreqRange((TFmRadioFrequencyRange)range);
+ }
+
+ XAresult get_freq_range(void* context, XAuint8* range)
+ {
+ return ((CMMFRadioBackendEngine*)(context))->GetFreqRange((TFmRadioFrequencyRange&)*range);
+ }
+
+ XAresult get_freq_range_properties(void* context, XAuint8 range, XAuint32* aMinFreq, XAuint32* aMaxFreq)
+ {
+ return ((CMMFRadioBackendEngine*)(context))->GetFreqRangeProperties((TFmRadioFrequencyRange&)range, (TInt&) *aMinFreq, (TInt&) *aMaxFreq);
+ }
+
+ XAresult get_max_volume(void* context, XAmillibel* maxVol)
+ {
+ return ((CMMFRadioBackendEngine*)(context))->GetMaxVolume((TInt&)*maxVol);
+ }
+
+ XAresult set_volume(void* context, XAuint32 vol)
+ {
+ return ((CMMFRadioBackendEngine*)(context))->SetVolume((TInt)vol);
+ }
+
+ XAresult get_volume(void* context, XAuint32* vol)
+ {
+ return ((CMMFRadioBackendEngine*)(context))->GetVolume((TInt&)*vol);
+ }
+
+ XAresult set_mute(void* context, XAboolean mute)
+ {
+ return ((CMMFRadioBackendEngine*)(context))->SetMute(mute);
+ }
+
+ XAresult get_stereo_mode(void* context, XAuint32* mode)
+ {
+ return ((CMMFRadioBackendEngine*)(context))->GetForcedMonoReception(*mode);
+ }
+
+ XAresult set_stereo_mode(void* context, XAuint32 mode)
+ {
+ return ((CMMFRadioBackendEngine*)(context))->ForceMonoReception(mode);
+ }
+
+ void play_radio(void* context)
+ {
+ ((CMMFRadioBackendEngine*)(context))->PlayRadio();
+ }
+
+ void stop_radio(void* context)
+ {
+ ((CMMFRadioBackendEngine*)(context))->StopRadio();
+ }
+
+ XAresult mmf_set_radio_adapt_context(void * context, void * adaptcontext)
+ {
+ return ((CMMFRadioBackendEngine*)(context))->SetRadioAdaptContext(adaptcontext);
+ }
+
+ XAresult mmf_set_player_adapt_context(void * context, void * adaptcontext)
+ {
+ return ((CMMFRadioBackendEngine*)(context))->SetPlayerAdaptContext(adaptcontext);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/cmmfradiobackendengine.h Wed Jun 23 18:47:10 2010 +0300
@@ -0,0 +1,264 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef CMMFRADIOBACKENDENGINE_H
+#define CMMFRADIOBACKENDENGINE_H
+
+#ifdef __cplusplus
+
+#include <e32base.h>
+#include <RadioUtility.h>
+#include <RadioFmTunerUtility.h>
+#include <RadioPlayerUtility.h>
+#include <RadioPresetUtility.h>
+#include <RadioFmPresetUtility.h>
+#include <FMRadioTunerControl.h>
+#include "xaadaptationmmf.h"
+
+NONSHARABLE_CLASS(CMMFRadioBackendEngine) : public CBase,
+ public MRadioPlayerObserver,
+ public MRadioFmTunerObserver,
+ public MRadioPresetObserver
+ {
+public:
+
+ static CMMFRadioBackendEngine* Instance();
+ void DeleteInstance();
+ ~CMMFRadioBackendEngine();
+
+ void SetFrequency(TInt aFreq);
+ TInt GetFrequency(TInt& aFreq);
+ TInt GetSignalStrength(TInt& aFreq);
+ void StationSeek(XAboolean aUpwards);
+ void CancelSetFrequency();
+ void CancelStationSeek();
+ void SetFreqRange(TFmRadioFrequencyRange aRange);
+ TInt GetFreqRange(TFmRadioFrequencyRange& aRange);
+ TInt GetFreqRangeProperties(TFmRadioFrequencyRange& aRange, TInt& aMinFreq, TInt& aMaxFreq);
+ TInt GetMaxVolume(TInt& aMaxVol);
+ TInt SetVolume(TInt aVol);
+ TInt GetVolume(TInt& aVol);
+ TInt SetMute(XAboolean aMute);
+ TInt GetForcedMonoReception(XAuint32& aForcedMono);
+ TInt ForceMonoReception(XAuint32 aForcedMono);
+ void PlayRadio();
+ void StopRadio();
+ XAresult SetRadioAdaptContext(void * adaptcontext);
+ XAresult SetPlayerAdaptContext(void * adaptcontext);
+
+ /**
+ * From MRadioPlayerObserver.
+ * Called when Radio state changed.
+ *
+ * @since S60 3.2
+ * @param aState Radio player state
+ * @param aError A standard system error code, only used when aState is ERadioPlayerIdle
+ */
+ void MrpoStateChange( TPlayerState aState, TInt aError );
+
+ /**
+ * From MRadioPlayerObserver.
+ * Called when volume changes. This may be caused by other applications.
+ *
+ * @since S60 3.2
+ * @param aVolume Current volume.
+ */
+ void MrpoVolumeChange( TInt aVolume );
+
+ /**
+ * From MRadioPlayerObserver.
+ * Called when mute setting changes. This may be caused by other applications.
+ *
+ * @since S60 3.2
+ * @param aMute ETrue indicates audio is muted.
+ */
+ void MrpoMuteChange( TBool aMute );
+
+ /**
+ * From MRadioPlayerObserver.
+ * Called when mute setting changes. This may be caused by other applications.
+ *
+ * Called when balance setting changes. This may be caused by other applications.
+ *
+ * @since S60 3.2
+ * @param aLeftPercentage
+ * Left speaker volume percentage. This can be any value from zero to 100.
+ * Zero value means left speaker is muted.
+ * @param aRightPercentage
+ * Right speaker volume percentage. This can be any value from zero to 100.
+ * Zero value means right speaker is muted.
+ */
+ void MrpoBalanceChange( TInt aLeftPercentage, TInt aRightPercentage );
+
+ /**
+ * From MRadioFmTunerObserver.
+ * Called when Request for tuner control completes.
+ *
+ * @since S60 3.2
+ * @param aError A standard system error code or FM tuner error (TFmRadioTunerError).
+ */
+ void MrftoRequestTunerControlComplete( TInt aError );
+
+ /**
+ * From MRadioFmTunerObserver.
+ * Set frequency range complete event. This event is asynchronous and is received after
+ * a call to CRadioFmTunerUtility::SetFrequencyRange.
+ *
+ * @since S60 3.2
+ * @param aError A standard system error code or FM tuner error (TFmRadioTunerError).
+ */
+ void MrftoSetFrequencyRangeComplete( TInt aError );
+
+ /**
+ * From MRadioFmTunerObserver.
+ * Set frequency complete event. This event is asynchronous and is received after a call to
+ * CRadioFmTunerUtility::SetFrequency.
+ *
+ * @since S60 3.2
+ * @param aError A standard system error code or FM tuner error (TFmRadioTunerError).
+ */
+ void MrftoSetFrequencyComplete( TInt aError );
+
+ /**
+ * From MRadioFmTunerObserver.
+ * Station seek complete event. This event is asynchronous and is received after a call to
+ * CRadioFmTunerUtility::StationSeek.
+ *
+ * @since S60 3.2
+ * @param aError A standard system error code or FM tuner error (TFmRadioTunerError).
+ * @param aFrequency The frequency(Hz) of the radio station that was found.
+ */
+ void MrftoStationSeekComplete( TInt aError, TInt aFrequency );
+
+ /**
+ * From MRadioFmTunerObserver.
+ * Called when FM Transmitter status changes (if one is present in the device). Tuner receiver
+ * is forced to be turned off due to hardware conflicts when FM transmitter is activated.
+ *
+ * @since S60 3.2
+ * @param aActive ETrue if FM transmitter is active; EFalse otherwise.
+ */
+ void MrftoFmTransmitterStatusChange( TBool aActive );
+
+ /**
+ * From MRadioFmTunerObserver.
+ * Called when antenna status changes.
+ *
+ * @since S60 3.2
+ * @param aAttached ETrue if antenna is attached; EFalse otherwise.
+ */
+ void MrftoAntennaStatusChange(TBool aAttached );
+
+ /**
+ * From MRadioFmTunerObserver.
+ * Called when offline mode status changes.
+ * @since S60 3.2
+ *
+ * @param aOfflineMode ETrue if offline mode is enabled; EFalse otherwise.
+ */
+ void MrftoOfflineModeStatusChange(TBool aOfflineMode );
+
+ /**
+ * From MRadioFmTunerObserver.
+ * Called when the frequency range changes. This may be caused by other applications.
+ *
+ * @since S60 3.2
+ * @param aBand New frequency range.
+ */
+ void MrftoFrequencyRangeChange(TFmRadioFrequencyRange aBand );
+
+ /**
+ * From MRadioFmTunerObserver.
+ * Called when the tuned frequency changes. This may be caused by other
+ * applications or RDS if AF/TA is enabled.
+ *
+ * @since S60 3.2
+ * @param aNewFrequency The new tuned frequency(Hz).
+ */
+ void MrftoFrequencyChange( TInt aNewFrequency );
+
+ /**
+ * From MRadioFmTunerObserver.
+ * Called when the forced mono status change. This may be caused by other applications.
+ *
+ * @since S60 3.2
+ * @param aForcedMono ETrue if forced mono mode is enabled; EFalse otherwise.
+ */
+ void MrftoForcedMonoChange( TBool aForcedMono );
+
+ /**
+ * From MRadioFmTunerObserver.
+ * Called when the squelch (muting the frequencies without broadcast) status change.
+ * This may be caused by other applications.
+ *
+ * @since S60 3.2
+ * @param aSquelch ETrue if squelch is enabled; EFalse otherwise.
+ */
+ void MrftoSquelchChange( TBool aSquelch );
+
+ /**
+ * From MRadioPresetObserver.
+ * Called when a preset changes.
+ *
+ * NOTE: EPresetDeleted with aIndex == 0, indicates that all presets have been deleted.
+ *
+ * @since S60 3.2
+ * @param aChange Change event type
+ * @param aIndex Index to the preset that has changed. Zero means all presets.
+ */
+ void MrpeoPresetChanged( TPresetChangeEvent aChange, TInt aIndex );
+
+private:
+ static CMMFRadioBackendEngine* s_instance;
+ CMMFRadioBackendEngine();
+ void ConstructL();
+
+private:
+ CRadioUtility* iRadioUtility;
+ CRadioFmTunerUtility* iFmTunerUtility;
+ CRadioPlayerUtility* iPlayerUtility;
+ TBool iAutoFlag;
+ void* iRadioAdaptContext;
+ void* iPlayerAdaptContext;
+
+ };
+
+#else /* __cplusplus */
+
+extern void* cmmfradiobackendengine_init(void);
+extern void cmmfradiobackendengine_delete(void* context);
+extern void set_frequency(void* context, XAuint32 freq);
+extern void cancel_set_frequency(void* context);
+extern void station_seek(void* context, XAboolean upwards);
+extern void cancel_station_seek(void* context);
+extern XAresult get_frequency(void* context, XAuint32* freq);
+extern XAresult get_signal_strength(void* context, XAuint32* signalStrength);
+extern void set_freq_range(void* context, XAuint8 range);
+extern XAresult get_freq_range(void* context, XAuint8* range);
+extern XAresult get_freq_range_properties(void* context, XAuint8 range, XAuint32* aMinFreq, XAuint32* aMaxFreq);
+extern XAresult set_stereo_mode(void* context, XAuint32 mode);
+extern XAresult get_stereo_mode(void* context, XAuint32* mode);
+extern XAresult mmf_set_radio_adapt_context(void * context, void * adaptcontext);
+extern XAresult mmf_set_player_adapt_context(void * context, void * adaptcontext);
+extern void stop_radio(void * context);
+extern void play_radio(void* context);
+extern XAresult set_volume(void* context, XAuint32 vol);
+extern XAresult mmf_set_player_adapt_context(void * context, void * adaptcontext);
+extern XAresult set_mute(void* context, XAboolean mute);
+#endif /* __cplusplus */
+
+#endif /* CMMFRADIOBACKENDENGINE_H */
--- a/khronosfws/openmax_al/src/mmf_adaptation/markerpositiontimer.cpp Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/markerpositiontimer.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -1,38 +1,38 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Handles marker timer implementation
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Handles marker timer implementation
+ *
+ */
#include "markerpositiontimer.h"
#include <mdaaudiosampleplayer.h>
#include <videoplayer2.h>
#include <e32math.h>
-extern "C" {
+extern "C"
+ {
#include "xarecorditfadaptationmmf.h"
-}
+ }
#define RET_ERR_IF_ERR(s) if (s!=KErrNone) return s;
#define RET_IF_ERR(s) if (s!=KErrNone) return;
CMarkerPositionTimer::CMarkerPositionTimer(
CMdaAudioPlayerUtility* aAudioPlayer,
- CVideoPlayerUtility2* aVideoPlayer)
-:CActive(CActive::EPriorityStandard),
- iAudioPlayer(aAudioPlayer),
- iVideoPlayer(aVideoPlayer)
+ CVideoPlayerUtility2* aVideoPlayer) :
+ CActive(CActive::EPriorityStandard), iAudioPlayer(aAudioPlayer),
+ iVideoPlayer(aVideoPlayer)
{
CActiveScheduler::Add(this);
}
@@ -47,7 +47,8 @@
CMdaAudioPlayerUtility* aAudioPlayer,
CVideoPlayerUtility2* aVideoPlayer)
{
- CMarkerPositionTimer* self = new (ELeave)CMarkerPositionTimer(aAudioPlayer, aVideoPlayer);
+ CMarkerPositionTimer* self = new (ELeave) CMarkerPositionTimer(
+ aAudioPlayer, aVideoPlayer);
CleanupStack::PushL(self);
self->ConstructL();
CleanupStack::Pop(self);
@@ -56,12 +57,12 @@
void CMarkerPositionTimer::ConstructL()
{
- User::LeaveIfError(iTimer.CreateLocal());
+ User::LeaveIfError(iTimer.CreateLocal());
}
void CMarkerPositionTimer::SetContext(TAny* aCtx)
{
- iCtx = aCtx;
+ iCtx = aCtx;
}
void CMarkerPositionTimer::SetMarkerPosition(XAmillisecond aMarkerPos)
@@ -81,11 +82,11 @@
void CMarkerPositionTimer::UseAudioPlayer()
{
- iPlayerToUse = static_cast<CBase*>(iAudioPlayer);
+ iPlayerToUse = static_cast<CBase*> (iAudioPlayer);
}
void CMarkerPositionTimer::UseVideoPlayer()
{
- iPlayerToUse = static_cast<CBase*>(iVideoPlayer);
+ iPlayerToUse = static_cast<CBase*> (iVideoPlayer);
}
void CMarkerPositionTimer::ResetPlayer()
@@ -100,10 +101,8 @@
{
Cancel();
}
- if ((iMarkerPosition != XA_TIME_UNKNOWN) &&
- (iCallbackEventMask & XA_PLAYEVENT_HEADATMARKER) &&
- iCallback &&
- iPlayerToUse)
+ if ((iMarkerPosition != XA_TIME_UNKNOWN) && (iCallbackEventMask
+ & XA_PLAYEVENT_HEADATMARKER) && iCallback && iPlayerToUse)
{
TTimeIntervalMicroSeconds32 delay;
/* Convert milli to micro */
@@ -132,7 +131,7 @@
iSyncToPlayHeadStartPos.Int64(),
delay.Int());
#endif /* MARKERPOSITIONTIMERLOG */
- if ( delay >= TTimeIntervalMicroSeconds32(0))
+ if (delay >= TTimeIntervalMicroSeconds32(0))
{
iStatus = KRequestPending;
iTimer.After(iStatus, delay);
@@ -151,12 +150,9 @@
{
TInt retVal(KErrNone);
/* Make sure some of the attributes are not unset */
- if ((iStatus == KErrNone) &&
- iCtx &&
- (iMarkerPosition != XA_TIME_UNKNOWN) &&
- (iCallbackEventMask & XA_PLAYEVENT_HEADATMARKER) &&
- iCallback &&
- iPlayerToUse)
+ if ((iStatus == KErrNone) && iCtx && (iMarkerPosition != XA_TIME_UNKNOWN)
+ && (iCallbackEventMask & XA_PLAYEVENT_HEADATMARKER) && iCallback
+ && iPlayerToUse)
{
TTimeIntervalMicroSeconds curPlayPos;
if (iSyncToPlayHead)
@@ -168,9 +164,9 @@
if (curPlayPos == iSyncToPlayHeadStartPos)
{
#ifdef MARKERPOSITIONTIMERLOG
- RDebug::Print(_L("CMarkerPositionTimer::RunL:CurPlayPos[%u]SyncPlayHead[%u]microSec. Restart"),
- iSyncToPlayHeadStartPos.Int64(),
- curPlayPos.Int64());
+ RDebug::Print(_L("CMarkerPositionTimer::RunL:CurPlayPos[%u]SyncPlayHead[%u]microSec. Restart"),
+ iSyncToPlayHeadStartPos.Int64(),
+ curPlayPos.Int64());
#endif /* MARKERPOSITIONTIMERLOG */
Start();
return;
@@ -195,7 +191,7 @@
curPlayPos.Int64(),
delay.Int());
#endif /* MARKERPOSITIONTIMERLOG */
- if ( delay >= TTimeIntervalMicroSeconds32(0))
+ if (delay >= TTimeIntervalMicroSeconds32(0))
{
iStatus = KRequestPending;
iTimer.After(iStatus, delay);
@@ -208,8 +204,12 @@
retVal = GetCurrentPlayPosition(curPlayPos);
RDebug::Print(_L("CMarkerPositionTimer::RunL:CurPlayPos[%u]microSec. Posting XA_PLAYEVENT_HEADATMARKER."), curPlayPos.Int64());
#endif /* MARKERPOSITIONTIMERLOG */
- XAAdaptEvent xaevent = {XA_PLAYITFEVENTS, XA_PLAYEVENT_HEADATMARKER, 0, 0 };
- XAAdaptationBase_SendAdaptEvents((XAAdaptationBaseCtx*)iCtx, &xaevent );
+ XAAdaptEvent xaevent =
+ {
+ XA_PLAYITFEVENTS, XA_PLAYEVENT_HEADATMARKER, 0, 0
+ };
+ XAAdaptationBase_SendAdaptEvents((XAAdaptationBaseCtx*) iCtx,
+ &xaevent);
}
}
@@ -223,7 +223,8 @@
return KErrNone;
}
-TInt CMarkerPositionTimer::GetCurrentPlayPosition(TTimeIntervalMicroSeconds& aPos)
+TInt CMarkerPositionTimer::GetCurrentPlayPosition(
+ TTimeIntervalMicroSeconds& aPos)
{
TTimeIntervalMicroSeconds pos;
TInt err(KErrNone);
--- a/khronosfws/openmax_al/src/mmf_adaptation/markerpositiontimer.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/markerpositiontimer.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Handles marker timer implementation
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Handles marker timer implementation
+ *
+ */
#ifndef CMARKERPOSITIONTIMER_H
#define CMARKERPOSITIONTIMER_H
@@ -29,8 +29,8 @@
public:
// Construct/destruct
static CMarkerPositionTimer* NewL(CMdaAudioPlayerUtility* aAudioPlayer,
- CVideoPlayerUtility2* aVideoPlayer);
- ~CMarkerPositionTimer();
+ CVideoPlayerUtility2* aVideoPlayer);
+ virtual ~CMarkerPositionTimer();
public:
void SetContext(TAny* aCtx);
@@ -56,7 +56,7 @@
TInt GetCurrentPlayPosition(TTimeIntervalMicroSeconds& aPos);
private:
- RTimer iTimer; // Has
+ RTimer iTimer; // Has
TAny* iCtx;
CMdaAudioPlayerUtility* iAudioPlayer;
CVideoPlayerUtility2* iVideoPlayer;
--- a/khronosfws/openmax_al/src/mmf_adaptation/positionupdatetimer.cpp Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/positionupdatetimer.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -1,38 +1,38 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Handles new position timer implementation
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Handles new position timer implementation
+ *
+ */
#include "positionupdatetimer.h"
#include <mdaaudiosampleplayer.h>
#include <videoplayer2.h>
#include <e32math.h>
-extern "C" {
+extern "C"
+ {
#include "xarecorditfadaptationmmf.h"
-}
+ }
#define RET_ERR_IF_ERR(s) if (s!=KErrNone) return s;
#define RET_IF_ERR(s) if (s!=KErrNone) return;
CPositionUpdateTimer::CPositionUpdateTimer(
CMdaAudioPlayerUtility* aAudioPlayer,
- CVideoPlayerUtility2* aVideoPlayer)
-:CActive(CActive::EPriorityStandard),
- iAudioPlayer(aAudioPlayer),
- iVideoPlayer(aVideoPlayer)
+ CVideoPlayerUtility2* aVideoPlayer) :
+ CActive(CActive::EPriorityStandard), iAudioPlayer(aAudioPlayer),
+ iVideoPlayer(aVideoPlayer)
{
CActiveScheduler::Add(this);
}
@@ -47,7 +47,8 @@
CMdaAudioPlayerUtility* aAudioPlayer,
CVideoPlayerUtility2* aVideoPlayer)
{
- CPositionUpdateTimer* self = new (ELeave)CPositionUpdateTimer(aAudioPlayer, aVideoPlayer);
+ CPositionUpdateTimer* self = new (ELeave) CPositionUpdateTimer(
+ aAudioPlayer, aVideoPlayer);
CleanupStack::PushL(self);
self->CostructL();
CleanupStack::Pop(self);
@@ -56,18 +57,18 @@
void CPositionUpdateTimer::CostructL()
{
- User::LeaveIfError(iTimer.CreateLocal());
+ User::LeaveIfError(iTimer.CreateLocal());
}
void CPositionUpdateTimer::SetContext(TAny* aCtx)
{
- iCtx = aCtx;
+ iCtx = aCtx;
}
void CPositionUpdateTimer::SetPositionUpdatePeriod(XAmillisecond aPos)
{
iPositionUpdatePeriod = aPos;
- iDelay = TTimeIntervalMicroSeconds32(aPos*1000);
+ iDelay = TTimeIntervalMicroSeconds32(aPos * 1000);
}
void CPositionUpdateTimer::SetCallbackEventMask(XAuint32 aMask)
@@ -82,11 +83,11 @@
void CPositionUpdateTimer::UseAudioPlayer()
{
- iPlayerToUse = static_cast<CBase*>(iAudioPlayer);
+ iPlayerToUse = static_cast<CBase*> (iAudioPlayer);
}
void CPositionUpdateTimer::UseVideoPlayer()
{
- iPlayerToUse = static_cast<CBase*>(iVideoPlayer);
+ iPlayerToUse = static_cast<CBase*> (iVideoPlayer);
}
void CPositionUpdateTimer::ResetPlayer()
@@ -101,13 +102,13 @@
{
Cancel();
}
- if ((iCallbackEventMask & XA_PLAYEVENT_HEADATNEWPOS) &&
- iCallback &&
- iPlayerToUse)
+ if ((iCallbackEventMask & XA_PLAYEVENT_HEADATNEWPOS) && iCallback
+ && iPlayerToUse)
{
TTimeIntervalMicroSeconds curPlayPos;
/* Convert milli to micro */
- TTimeIntervalMicroSeconds posUpdatePeriod(iPositionUpdatePeriod * 1000);
+ TTimeIntervalMicroSeconds posUpdatePeriod(iPositionUpdatePeriod
+ * 1000);
TTimeIntervalMicroSeconds32 delay;
/* Convert milli to micro */
TReal res;
@@ -134,7 +135,7 @@
iSyncToPlayHeadStartPos.Int64(),
delay.Int());
#endif /* POSITIONUPDATETIMERLOG */
- if ( delay >= TTimeIntervalMicroSeconds32(0))
+ if (delay >= TTimeIntervalMicroSeconds32(0))
{
iStatus = KRequestPending;
iTimer.After(iStatus, delay);
@@ -153,11 +154,8 @@
{
TInt retVal(KErrNone);
/* Make sure some of the attributes are not unset */
- if ((iStatus == KErrNone) &&
- iCtx &&
- (iCallbackEventMask & XA_PLAYEVENT_HEADATNEWPOS) &&
- iCallback &&
- iPlayerToUse)
+ if ((iStatus == KErrNone) && iCtx && (iCallbackEventMask
+ & XA_PLAYEVENT_HEADATNEWPOS) && iCallback && iPlayerToUse)
{
TTimeIntervalMicroSeconds curPlayPos;
if (iSyncToPlayHead)
@@ -169,16 +167,17 @@
if (curPlayPos == iSyncToPlayHeadStartPos)
{
#ifdef POSITIONUPDATETIMERLOG
- RDebug::Print(_L("CPositionUpdateTimer::RunL:CurPlayPos[%u]SyncPlayHead[%u]microSec. Restart"),
- iSyncToPlayHeadStartPos.Int64(),
- curPlayPos.Int64());
+ RDebug::Print(_L("CPositionUpdateTimer::RunL:CurPlayPos[%u]SyncPlayHead[%u]microSec. Restart"),
+ iSyncToPlayHeadStartPos.Int64(),
+ curPlayPos.Int64());
#endif /* POSITIONUPDATETIMERLOG */
Start();
return;
}
/* Play head has moved. calculate remaining time and set the timer */
/* Convert milli to micro */
- TTimeIntervalMicroSeconds posUpdatePeriod(iPositionUpdatePeriod * 1000);
+ TTimeIntervalMicroSeconds posUpdatePeriod(iPositionUpdatePeriod
+ * 1000);
TReal res;
TReal p;
TReal q(posUpdatePeriod.Int64());
@@ -189,14 +188,15 @@
retVal = Math::Mod(res, p, q);
RET_IF_ERR(retVal);
- TTimeIntervalMicroSeconds32 delay = (posUpdatePeriod.Int64() - res);
+ TTimeIntervalMicroSeconds32 delay = (posUpdatePeriod.Int64()
+ - res);
#ifdef POSITIONUPDATETIMERLOG
RDebug::Print(_L("CPositionUpdateTimer::RunL:CurPlayPos[%u]SyncPlayHead[%u]Delay Reset[%u]microSec"),
iSyncToPlayHeadStartPos.Int64(),
curPlayPos.Int64(),
delay.Int());
#endif /* POSITIONUPDATETIMERLOG */
- if ( delay >= TTimeIntervalMicroSeconds32(0))
+ if (delay >= TTimeIntervalMicroSeconds32(0))
{
iStatus = KRequestPending;
iTimer.After(iStatus, delay);
@@ -209,8 +209,12 @@
retVal = GetCurrentPlayPosition(curPlayPos);
RDebug::Print(_L("CPositionUpdateTimer::RunL:CurPlayPos[%u]microSec. Posting XA_PLAYEVENT_HEADATNEWPOS."), curPlayPos.Int64());
#endif /* POSITIONUPDATETIMERLOG */
- XAAdaptEvent xaevent = {XA_PLAYITFEVENTS, XA_PLAYEVENT_HEADATNEWPOS, 0, 0 };
- XAAdaptationBase_SendAdaptEvents((XAAdaptationBaseCtx*)iCtx, &xaevent );
+ XAAdaptEvent xaevent =
+ {
+ XA_PLAYITFEVENTS, XA_PLAYEVENT_HEADATNEWPOS, 0, 0
+ };
+ XAAdaptationBase_SendAdaptEvents((XAAdaptationBaseCtx*) iCtx,
+ &xaevent);
iStatus = KRequestPending;
iTimer.After(iStatus, iDelay);
SetActive();
@@ -222,20 +226,21 @@
iTimer.Cancel();
}
-TInt CPositionUpdateTimer::RunError(TInt /*aError*/)
+TInt CPositionUpdateTimer::RunError(TInt aError)
{
- return KErrNone;
+ return aError;
}
-TInt CPositionUpdateTimer::GetCurrentPlayPosition(TTimeIntervalMicroSeconds& aPos)
+TInt CPositionUpdateTimer::GetCurrentPlayPosition(
+ TTimeIntervalMicroSeconds& aPos)
{
TTimeIntervalMicroSeconds pos;
TInt err(KErrNone);
- if (iPlayerToUse == iAudioPlayer)
+ if (iPlayerToUse && (iPlayerToUse == iAudioPlayer))
{
iAudioPlayer->GetPosition(aPos);
}
- else if (iPlayerToUse == iVideoPlayer)
+ else if (iPlayerToUse && (iPlayerToUse == iVideoPlayer))
{
TRAP(err, aPos = iVideoPlayer->PositionL());
}
--- a/khronosfws/openmax_al/src/mmf_adaptation/positionupdatetimer.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/positionupdatetimer.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Handles marker timer implementation
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Handles marker timer implementation
+ *
+ */
#ifndef CPOSITIONUPDATETIMER_H
#define CPOSITIONUPDATETIMER_H
@@ -29,8 +29,8 @@
public:
// Construct/destruct
static CPositionUpdateTimer* NewL(CMdaAudioPlayerUtility* aAudioPlayer,
- CVideoPlayerUtility2* aVideoPlayer);
- ~CPositionUpdateTimer();
+ CVideoPlayerUtility2* aVideoPlayer);
+ virtual ~CPositionUpdateTimer();
public:
void SetContext(TAny* aCtx);
@@ -56,7 +56,7 @@
TInt GetCurrentPlayPosition(TTimeIntervalMicroSeconds& aPos);
private:
- RTimer iTimer; // Has
+ RTimer iTimer; // Has
TAny* iCtx;
CMdaAudioPlayerUtility* iAudioPlayer;
CVideoPlayerUtility2* iVideoPlayer;
@@ -65,8 +65,8 @@
XAuint32 iCallbackEventMask;
xaPlayCallback iCallback;
TTimeIntervalMicroSeconds32 iDelay;
- TBool iSyncToPlayHead;
- TTimeIntervalMicroSeconds iSyncToPlayHeadStartPos;
+ TBool iSyncToPlayHead;
+ TTimeIntervalMicroSeconds iSyncToPlayHeadStartPos;
};
#endif /* CPOSITIONUPDATETIMER_H */
--- a/khronosfws/openmax_al/src/mmf_adaptation/sfmrlocaltimer.cpp Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/sfmrlocaltimer.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -1,33 +1,31 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-// sfmrlocaltimer.cpp
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Local timer to update position for recording
+ *
+ */
#include "sfmrlocaltimer.h"
-extern "C" {
+extern "C"
+ {
#include "xarecorditfadaptationmmf.h"
-}
+ }
#include "cmmfbackendengine.h"
-
-LocalTimer::LocalTimer(CMMFBackendEngine* parent, void* adaptContext)
-:CActive(CActive::EPriorityStandard),
-iTime(0)
+LocalTimer::LocalTimer(CMMFBackendEngine* parent, void* adaptContext) :
+ CActive(CActive::EPriorityStandard), iTime(0)
{
CActiveScheduler::Add(this);
iParent = parent;
@@ -77,11 +75,11 @@
{
if (iStatus == KErrNone)
{
- iTime+= iDelay;
+ iTime += iDelay;
XAuint64 position;
iParent->GetRecordPosition(&position);
-
- XARecordItfAdaptMMF_PositionUpdate(iAdaptContext,position);
+
+ XARecordItfAdaptMMF_PositionUpdate(iAdaptContext, position);
Start(iDelay);
}
}
--- a/khronosfws/openmax_al/src/mmf_adaptation/sfmrlocaltimer.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/sfmrlocaltimer.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,20 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-// sfmrlocaltimer.h
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
#ifndef SFMRLOCALTIMER_H
#define SFMRLOCALTIMER_H
@@ -28,7 +27,7 @@
// Construct/destruct
LocalTimer(CMMFBackendEngine* parent, void* adaptContext);
TInt PostInit();
- ~LocalTimer();
+ virtual ~LocalTimer();
public:
// Starts ticking after every aDelay microsecs
@@ -42,9 +41,8 @@
void RunL();
void DoCancel();
-
private:
- RTimer iTimer; // Has
+ RTimer iTimer; // Has
TUint64 iTime;
TUint64 iDelay;
CMMFBackendEngine* iParent;
--- a/khronosfws/openmax_al/src/mmf_adaptation/xaadaptationmmf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xaadaptationmmf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: MMF Adaptation Context
+ *
+ */
#include <assert.h>
#include <string.h>
@@ -27,53 +27,63 @@
* 1st phase initialization function for Adaptation Base context structure.
* Reserves memory for base context and initializes GStreamer FW.
*/
-XAresult XAAdaptationBaseMMF_Init( XAAdaptationMMFCtx* pSelf, XAuint32 ctxId )
-{
+XAresult XAAdaptationBaseMMF_Init(XAAdaptationMMFCtx* pSelf, XAuint32 ctxId)
+ {
DEBUG_API("->XAAdaptationBase_Init");
- if ( pSelf )
- {
- if(XAAdaptationBase_Init(&(pSelf->baseObj), ctxId) != XA_RESULT_SUCCESS)
+ if (pSelf)
{
- DEBUG_ERR("Failed to init base context!!!");
- free(pSelf);
- pSelf = NULL;
+ if (XAAdaptationBase_Init(&(pSelf->baseObj), ctxId)
+ != XA_RESULT_SUCCESS)
+ {
+ DEBUG_ERR("Failed to init base context!!!");
+ free(pSelf);
+ pSelf = NULL;
+ DEBUG_API("<-XAAdaptationBase_Init");
+ return XA_RESULT_MEMORY_FAILURE;
+ }
}
- }
else
- {
+ {
DEBUG_ERR("Invalid Adaptation Base Context.")
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
DEBUG_API("<-XAAdaptationBase_Init");
return XA_RESULT_SUCCESS;
-}
+ }
/*
* XAresult XAAdaptationBase_PostInit()
* 2nd phase initialization for Adaptation Base.
*/
-XAresult XAAdaptationBaseMMF_PostInit( XAAdaptationMMFCtx* ctx )
-{
+XAresult XAAdaptationBaseMMF_PostInit(XAAdaptationMMFCtx* ctx)
+ {
XAresult ret = XA_RESULT_SUCCESS;
DEBUG_API("->XAAdaptationBase_PostInit");
-
- XAAdaptationBase_PostInit(&ctx->baseObj);
-
+ if(ctx)
+ {
+ ret = XAAdaptationBase_PostInit(&ctx->baseObj);
+ }
+ else
+ {
+ ret = XA_RESULT_PARAMETER_INVALID;
+ }
DEBUG_API("<-XAAdaptationBase_PostInit");
return ret;
-}
+ }
/*
* void XAAdaptationBase_Free( XAAdaptationBaseCtx* ctx )
* Frees all Base context variables .
*/
-void XAAdaptationBaseMMF_Free( XAAdaptationMMFCtx* ctx )
-{
+void XAAdaptationBaseMMF_Free(XAAdaptationMMFCtx* ctx)
+ {
DEBUG_API("->XAAdaptationBaseMMF_Free");
- XAAdaptationBase_Free(&ctx->baseObj);
+ if(ctx)
+ {
+ XAAdaptationBase_Free(&ctx->baseObj);
+ }
DEBUG_API("<-XAAdaptationBaseMMF_Free");
-}
+ }
-
--- a/khronosfws/openmax_al/src/mmf_adaptation/xaadaptationmmf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xaadaptationmmf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
#ifndef XAADAPTATIONMMF_H_
#define XAADAPTATIONMMF_H_
@@ -25,7 +25,6 @@
#include <unistd.h>
#include "openmaxalwrapper.h"
#include "xaglobals.h"
-//#include "OpenMAXAL_ContentPipe.h"
#include "xaplatform.h"
#include "xaadptbasectx.h"
#ifdef XA_IMPL_MEASURE_GST_DELAY
@@ -41,43 +40,11 @@
#define FLIP_VERTICAL 5 /* Flip image vertically */
/* TYPEDEFS */
-//typedef gboolean (*GstBusCb)( GstBus *bus, GstMessage *message, gpointer data );
#define CONTENT_PIPE_BUFFER_SIZE 1000
#define TEST_VIDEO_WIDTH 640
#define TEST_VIDEO_HEIGHT 480
-/*
-typedef enum
-{
- XA_AUDIO_WAVENC = 0,
- XA_AUDIO_VORBISENC,
- XA_AUDIO_PCM,
- XA_NUM_OF_AUDIOENCODERS Do not move this line
-} XAAudioEnc;
-
-typedef enum
-{
- XA_VIDEO_JPEGENC = 0,
- XA_VIDEO_THEORAENC,
- XA_NUM_OF_VIDEOENCODERS Do not move this line
-} XAVideoEnc;
-
-typedef enum CP_STATE
-{
- CPStateNull =0,
- CPStateInitialized,
- CPStatePrerolling,
- CPStateStarted,
- CPStateRunning,
- CPStatePaused,
- CPStateStopped,
- CPStateWaitForData,
- CPStateEOS,
- CPStateError
-}CP_STATE;
-*/
-
/* Forward declaration of adaptation basecontext */
typedef struct XAAdaptationMMFCtx_ XAAdaptationMMFCtx;
@@ -86,68 +53,86 @@
* mmf-Adaptation context structures.
*/
typedef struct XAAdaptationMMFCtx_
-{
-XAAdaptationBaseCtx baseObj;
+ {
+ XAAdaptationBaseCtx baseObj;
-} XAAdaptationMMFCtx_;
+ } XAAdaptationMMFCtx_;
typedef struct XAEngineAdaptationMMFCtx_
-{
+ {
/* Parent*/
- XAAdaptationMMFCtx_ baseObj;
+ XAAdaptationMMFCtx_ baseObj;
-} XAEngineAdaptationMMFCtx_;
+ } XAEngineAdaptationMMFCtx_;
/*
* Structure for Media Player specific gst-adaptation.
*/
typedef struct XAMediaPlayerAdaptationMMFCtx_
-{
+ {
/* Parent*/
- XAAdaptationMMFCtx_ baseObj;
+ XAAdaptationMMFCtx_ baseObj;
/* OMX-AL Variables */
- XADataSource *xaSource, *xaBankSrc;
- XADataSink *xaAudioSink, *xaVideoSink, *xaLEDArray, *xaVibra;
+ XADataSource *xaSource, *xaBankSrc;
+ XADataSink *xaAudioSink, *xaVideoSink, *xaLEDArray, *xaVibra;
/* MMF elements */
- XAboolean isobjsrc; /*is source another XA object?*/
+ XAboolean isobjsrc; /*is source another XA object?*/
- XAboolean isobjasink; /*is audio sink another XA object?*/
- XAboolean isobjvsink; /*is video sink another XA object?*/
+ XAboolean isobjasink; /*is audio sink another XA object?*/
+ XAboolean isobjvsink; /*is video sink another XA object?*/
- XAboolean mute;
- XAuint32 premutevol;
- XAuint32 imageEffectID;
- XAboolean isStereoPosition;
- XAmillidegree curRotation;
- XAuint32 curMirror;
- XAint32 buffering;
+ XAboolean mute;
+ XAuint32 premutevol;
+ XAuint32 imageEffectID;
+ XAboolean isStereoPosition;
+ XAmillidegree curRotation;
+ XAuint32 curMirror;
+
+ XAint32 buffering;
/* internals */
- XAboolean trackpositionenabled;
- XAboolean loopingenabled;
- XAboolean cameraSinkSynced;
- void* mmfContext;
- void* mmfMetadataContext;
-/*
- XAuint32 playerState;
-*/
+ XAboolean trackpositionenabled;
+
+ XAboolean loopingenabled;
-} XAMediaPlayerAdaptationMMFCtx_;
+ XAboolean cameraSinkSynced;
+ void* mmfContext;
+ void* mmfMetadataContext;
+ XAboolean isForRadio;
+ /*
+ XAuint32 playerState;
+ */
+ } XAMediaPlayerAdaptationMMFCtx_;
typedef struct XAMetadataAdaptationMMFCtx_
-{
+ {
/* Parent*/
- XAAdaptationMMFCtx_ baseObj;
+ XAAdaptationMMFCtx_ baseObj;
/* OMX-AL Variables */
- XADataSource *xaSource;
+ XADataSource *xaSource;
+
+ void* mmfContext;
+ } XAMetadataAdaptationMMFCtx_;
- void* mmfContext;
-} XAMetadataAdaptationMMFCtx_;
+/*
+ * Structure for Radio specific variables
+ */
+typedef struct XARadioAdaptationCtx_
+ {
+ /* Parent*/
+ XAAdaptationMMFCtx_ baseObj;
+ XAuint32 frequency;
+ XAuint8 range;
+
+ pthread_t emulationThread;
+ pthread_t rdsEmulationThread;
+
+ } XARadioAdaptationCtx_;
/* FUNCTIONS */
/*
* gboolean XAAdaptationBase_GstBusCb( GstBus *bus, GstMessage *message, gpointer data );
@@ -155,8 +140,8 @@
* not implemented.
*/
-XAresult XAAdaptationBaseMMF_Init( XAAdaptationMMFCtx* pSelf, XAuint32 ctxId );
-XAresult XAAdaptationBaseMMF_PostInit( XAAdaptationMMFCtx* ctx );
-void XAAdaptationBaseMMF_Free( XAAdaptationMMFCtx* ctx );
+XAresult XAAdaptationBaseMMF_Init(XAAdaptationMMFCtx* pSelf, XAuint32 ctxId);
+XAresult XAAdaptationBaseMMF_PostInit(XAAdaptationMMFCtx* ctx);
+void XAAdaptationBaseMMF_Free(XAAdaptationMMFCtx* ctx);
#endif /* XAADAPTATIONMMF_H_ */
--- a/khronosfws/openmax_al/src/mmf_adaptation/xadynamicsourceitfadaptationmmf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xadynamicsourceitfadaptationmmf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Dynamic Src Itf MMF Adapt Implementation
+ *
+ */
#include "xamediaplayeradaptctxmmf.h"
#include "xametadataadaptctxmmf.h"
@@ -28,37 +28,44 @@
* @param XADataSource *pDataSource - new data source
* @return XAresult ret - Success value
*/
-XAresult XADynamicSourceItfAdaptMMF_SetSource(XAAdaptationMMFCtx *bCtx, XADataSource *pDataSource)
-{
+XAresult XADynamicSourceItfAdaptMMF_SetSource(XAAdaptationMMFCtx *bCtx,
+ XADataSource *pDataSource)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAuint32 origstate;
DEBUG_API("->XADynamicSourceItfAdaptMMF_SetSource");
- if( !bCtx || !pDataSource || !pDataSource->pLocator )
- {
+ if (!bCtx || !pDataSource || !pDataSource->pLocator)
+ {
DEBUG_ERR("Invalid NULL parameter");
ret = XA_RESULT_PARAMETER_INVALID;
- }
- else if(bCtx->baseObj.ctxId == XAMediaPlayerAdaptation)
- {
- XADataLocator_URI* tempUri = (XADataLocator_URI*)(pDataSource->pLocator);
- XADataFormat_MIME* tempFormat = (XADataFormat_MIME*)(pDataSource->pFormat);
- XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+ }
+ else if (bCtx->baseObj.ctxId == XAMediaPlayerAdaptation)
+ {
+ XADataLocator_URI* tempUri =
+ (XADataLocator_URI*) (pDataSource->pLocator);
+ XADataFormat_MIME* tempFormat =
+ (XADataFormat_MIME*) (pDataSource->pFormat);
+ XAMediaPlayerAdaptationMMFCtx* mCtx =
+ (XAMediaPlayerAdaptationMMFCtx*) bCtx;
ret = XAPlayItfAdaptMMF_GetPlayState(&bCtx->baseObj, &origstate);
-
- ret = XAPlayItfAdaptMMF_SetPlayState(&bCtx->baseObj, XA_PLAYSTATE_STOPPED);
-
+
+ ret = XAPlayItfAdaptMMF_SetPlayState(&bCtx->baseObj,
+ XA_PLAYSTATE_STOPPED);
+
mmf_close(mCtx->mmfContext);
mCtx->xaSource = pDataSource;
- if(mCtx->xaVideoSink)
+ if (mCtx->xaVideoSink)
{
- ret = mmf_setup_native_display(mCtx->mmfContext, mCtx->xaVideoSink);
+ ret = mmf_setup_native_display(mCtx->mmfContext,
+ mCtx->xaVideoSink);
}
if (ret == XA_RESULT_SUCCESS)
{
- ret = mmf_set_player_uri(mCtx->mmfContext, (char *)(tempUri->URI), tempFormat->containerType);
+ ret = mmf_set_player_uri(mCtx->mmfContext,
+ (char *) (tempUri->URI), tempFormat->containerType);
}
- if(ret == XA_RESULT_SUCCESS)
+ if (ret == XA_RESULT_SUCCESS)
{
ret = XAPlayItfAdaptMMF_SetPlayState(&bCtx->baseObj, origstate);
}
@@ -67,22 +74,25 @@
DEBUG_ERR("Set Play state failed");
ret = XA_RESULT_INTERNAL_ERROR;
}
- if((ret == XA_RESULT_SUCCESS) && (mCtx->mmfMetadataContext))
+ if ((ret == XA_RESULT_SUCCESS) && (mCtx->mmfMetadataContext))
{
- ret = mmf_metadata_utility_parse_source(mCtx->mmfMetadataContext, (char *)(tempUri->URI));
+ mmf_metadata_utility_parse_source(mCtx->mmfMetadataContext,
+ (char *) (tempUri->URI));
}
- }
- else if(bCtx->baseObj.ctxId == XAMDAdaptation)
- {
-
+ }
+ else if (bCtx->baseObj.ctxId == XAMDAdaptation)
+ {
+
XAMetadataAdaptationMMFCtx* mCtx = (XAMetadataAdaptationMMFCtx*) bCtx;
- if(mCtx->mmfContext)
- {
+ if (mCtx->mmfContext)
+ {
mCtx->xaSource = pDataSource;
- ret = mmf_metadata_utility_parse_source(mCtx->mmfContext, (char *)(( (XADataLocator_URI*)(pDataSource->pLocator))->URI));
+ mmf_metadata_utility_parse_source(
+ mCtx->mmfContext,
+ (char *) (((XADataLocator_URI*) (pDataSource->pLocator))->URI));
+ }
}
- }
DEBUG_API("<-XADynamicSourceItfAdaptMMF_SetSource");
return ret;
-}
+ }
--- a/khronosfws/openmax_al/src/mmf_adaptation/xadynamicsourceitfadaptationmmf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xadynamicsourceitfadaptationmmf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,28 +1,28 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Dynamic Src Itf MMF Adapt header
+ *
+ */
#ifndef XADYNAMICSOURCEITFADAPTATIONMMF_H
#define XADYNAMICSOURCEITFADAPTATIONMMF_H
#include "xaadaptationmmf.h"
-
/* FUNCTIONS */
-XAresult XADynamicSourceItfAdaptMMF_SetSource(XAAdaptationMMFCtx *bCtx, XADataSource *pDataSource);
+XAresult XADynamicSourceItfAdaptMMF_SetSource(XAAdaptationMMFCtx *bCtx,
+ XADataSource *pDataSource);
#endif /* XADYNAMICSOURCEITFADAPTATION_H */
--- a/khronosfws/openmax_al/src/mmf_adaptation/xamediaplayeradaptctxmmf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xamediaplayeradaptctxmmf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Media Player Adapt Code MMF
+ *
+ */
#include <assert.h>
#include <stdlib.h>
@@ -21,11 +21,8 @@
#include "xaadaptationmmf.h"
#include "xaobjectitf.h"
#include "cmmfbackendengine.h"
-
#include "cmetadatautilityitf.h"
-
-
/*
* XAMediaPlayerAdaptationMMFCtx* XAMediaPlayerAdapt_Create()
* Allocates memory for Media Player Adaptation Context and makes 1st phase initialization
@@ -35,29 +32,43 @@
* @param XADataSink *pImageVideoSnk - pointer to OMX-AL image and video sink definition
* @returns XAMediaPlayerAdaptationMMFCtx* - Pointer to created context, NULL if error occurs.
*/
-XAAdaptationBaseCtx* XAMediaPlayerAdaptMMF_Create(XADataSource *pDataSrc, XADataSource *pBankSrc,
- XADataSink *pAudioSnk, XADataSink *pImageVideoSnk,
- XADataSink *pVibra, XADataSink *pLEDArray)
-{
+XAAdaptationBaseCtx* XAMediaPlayerAdaptMMF_Create(XADataSource *pDataSrc,
+ XADataSource *pBankSrc, XADataSink *pAudioSnk,
+ XADataSink *pImageVideoSnk, XADataSink *pVibra, XADataSink *pLEDArray)
+ {
XAMediaPlayerAdaptationMMFCtx *pSelf = NULL;
XAuint32 locType = 0;
+ XADataLocator_IODevice *ioDevice;
XAresult res;
DEBUG_API("->XAMediaPlayerAdaptMMF_Create");
-
+
pSelf = calloc(1, sizeof(XAMediaPlayerAdaptationMMFCtx));
- if ( pSelf)
- {
-
- if( XAAdaptationBaseMMF_Init(&(pSelf->baseObj),XAMediaPlayerAdaptation)
- != XA_RESULT_SUCCESS )
+ if (pSelf)
{
+ if (pDataSrc)
+ {
+ locType = *((XAuint32*) (pDataSrc->pLocator));
+ if (locType == XA_DATALOCATOR_IODEVICE)
+ {
+ ioDevice = (XADataLocator_IODevice*) (pDataSrc->pLocator);
+ if (ioDevice->deviceType == XA_IODEVICE_RADIO)
+ {
+ return XAMediaPlayerAdaptMMF_CreateRadio(pSelf, pDataSrc,
+ pBankSrc, pAudioSnk, pImageVideoSnk, pVibra,
+ pLEDArray);
+ }
+ }
+ }
+ if (XAAdaptationBaseMMF_Init(&(pSelf->baseObj),
+ XAMediaPlayerAdaptation) != XA_RESULT_SUCCESS)
+ {
DEBUG_ERR("Failed to init base context!!!");
free(pSelf);
pSelf = NULL;
- }
+ }
else
-
- {
+ {
+ pSelf->isForRadio = XA_BOOLEAN_FALSE;
pSelf->baseObj.baseObj.fwtype = FWMgrFWMMF;
pSelf->xaSource = pDataSrc;
pSelf->xaBankSrc = pBankSrc;
@@ -69,58 +80,96 @@
pSelf->curRotation = 0;
pSelf->isobjsrc = XA_BOOLEAN_FALSE;
pSelf->cameraSinkSynced = XA_BOOLEAN_FALSE;
- /*pSelf->waitData = XA_BOOLEAN_FALSE;*/
+ }
}
-
-
- if ( pDataSrc )
- {
- locType = *((XAuint32*)(pDataSrc->pLocator));
- if ( locType == XA_DATALOCATOR_IODEVICE )
- {
- //XADataLocator_IODevice *ioDevice = (XADataLocator_IODevice*)(pDataSrc->pLocator);
- }
- }
- }
-
else
{
DEBUG_ERR("Failed to create XAMediaPlayerAdaptationMMFCtx !!!");
return NULL;
}
- if(pSelf)
- {
- res = mmf_backend_engine_init(&(pSelf->mmfContext));
- if(!(pSelf->mmfContext) || (res != XA_RESULT_SUCCESS))
+
+ if (pSelf)
{
+ res = mmf_backend_engine_init(&(pSelf->mmfContext));
+ if (!(pSelf->mmfContext) || (res != XA_RESULT_SUCCESS))
+ {
/* TODO Check to make sure there is no undeleted MMF objects here*/
DEBUG_ERR("Failed to init mmf context!!!");
free(pSelf);
pSelf = NULL;
return NULL;
- }
- res = mmf_set_play_adapt_context(pSelf->mmfContext, &(pSelf->baseObj));
- if(pDataSrc)
- {
- pSelf->mmfMetadataContext = mmf_metadata_utility_init((char *)(( (XADataLocator_URI*)(pDataSrc->pLocator))->URI));
- if(!pSelf->mmfMetadataContext)
+ }
+ res = mmf_set_play_adapt_context(pSelf->mmfContext,
+ &(pSelf->baseObj));
+ if (pDataSrc)
+ {
+ pSelf->mmfMetadataContext
+ = mmf_metadata_utility_init(
+ (char *) (((XADataLocator_URI*) (pDataSrc->pLocator))->URI));
+ if (!pSelf->mmfMetadataContext)
{
- DEBUG_ERR("Failed to init mmf metadata context!!!");
- pSelf->mmfMetadataContext = NULL;
+ DEBUG_ERR("Failed to init mmf metadata context!!!");
+ pSelf->mmfMetadataContext = NULL;
}
- }
- else
- {
- DEBUG_ERR("Failed to create XAMediaPlayerAdaptationMMFCtx !!!");
- return NULL;
- }
+ }
+ else
+ {
+ DEBUG_ERR("Failed to create XAMediaPlayerAdaptationMMFCtx !!!");
+ return NULL;
+ }
+ }
+
+ DEBUG_API("<-XAMediaPlayerAdaptMMF_Create");
+ return (XAAdaptationBaseCtx*) (&pSelf->baseObj.baseObj);
}
- DEBUG_API("<-XAMediaPlayerAdaptMMF_Create");
- return (XAAdaptationBaseCtx*)(&pSelf->baseObj.baseObj);
-}
+/*
+ * XAMediaPlayerAdaptationMMFCtx* XAMediaPlayerAdapt_CreateRadio()
+
+ * @returns XAMediaPlayerAdaptationMMFCtx* - Pointer to created context, NULL if error occurs.
+ */
+XAAdaptationBaseCtx* XAMediaPlayerAdaptMMF_CreateRadio(
+ XAMediaPlayerAdaptationMMFCtx *pSelf, XADataSource *pDataSrc,
+ XADataSource *pBankSrc, XADataSink *pAudioSnk,
+ XADataSink *pImageVideoSnk, XADataSink *pVibra, XADataSink *pLEDArray)
+ {
+ XAresult res;
+ DEBUG_API("->XAMediaPlayerAdaptMMF_CreateRadio");
+
+ res = XAAdaptationBaseMMF_Init(&(pSelf->baseObj), XARadioAdaptation);
+ if (res != XA_RESULT_SUCCESS)
+ {
+ DEBUG_ERR("Failed to init base context!!!");
+ free(pSelf);
+ pSelf = NULL;
+ return NULL;
+ }
+ pSelf->isForRadio = XA_BOOLEAN_TRUE;
+ pSelf->baseObj.baseObj.fwtype = FWMgrFWMMF;
+ pSelf->xaSource = pDataSrc;
+ pSelf->xaBankSrc = pBankSrc;
+ pSelf->xaAudioSink = pAudioSnk;
+ pSelf->xaVideoSink = pImageVideoSnk;
+ pSelf->xaLEDArray = pLEDArray;
+ pSelf->xaVibra = pVibra;
+ pSelf->curMirror = XA_VIDEOMIRROR_NONE;
+ pSelf->curRotation = 0;
+ pSelf->isobjsrc = XA_BOOLEAN_FALSE;
+ pSelf->cameraSinkSynced = XA_BOOLEAN_FALSE;
+ /*pSelf->waitData = XA_BOOLEAN_FALSE;*/
+ res = mmf_backend_engine_init(&(pSelf->mmfContext));
+ if (!(pSelf->mmfContext) || (res != XA_RESULT_SUCCESS))
+ {
+ /* TODO Check to make sure there is no undeleted MMF objects here*/
+ DEBUG_ERR("Failed to init mmf context!!!");
+ free(pSelf);
+ pSelf = NULL;
+ return NULL;
+ }DEBUG_API("<-XAMediaPlayerAdaptMMF_Create");
+ return (XAAdaptationBaseCtx*) (&pSelf->baseObj.baseObj);
+ }
/*
* XAresult XAMediaPlayerAdaptMMF_PostInit()
@@ -128,68 +177,85 @@
* @param XAMediaPlayerAdaptationMMFCtx* ctx - pointer to Media Player adaptation context
* @return XAresult - Success value
*/
-XAresult XAMediaPlayerAdaptMMF_PostInit( XAAdaptationMMFCtx* bCtx )
-{
+XAresult XAMediaPlayerAdaptMMF_PostInit(XAAdaptationMMFCtx* bCtx)
+ {
XAresult ret = XA_RESULT_PRECONDITIONS_VIOLATED;
- XAMediaPlayerAdaptationMMFCtx *pSelf = (XAMediaPlayerAdaptationMMFCtx*)bCtx;
+ XAMediaPlayerAdaptationMMFCtx *pSelf = NULL;
+ if(!bCtx)
+ {
+ ret = XA_RESULT_PARAMETER_INVALID;
+ return ret;
+ }
+
+ pSelf = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
DEBUG_API("->XAMediaPlayerAdaptMMF_PostInit");
-
- XAAdaptationBaseMMF_PostInit(bCtx);
+
+ ret = XAAdaptationBaseMMF_PostInit(bCtx);
+ if(ret == XA_RESULT_SUCCESS)
+ {
+ if (pSelf->isForRadio)
+ {
+ DEBUG_API("<-XAMediaPlayerAdaptMMF_PostInit");
+ return XA_RESULT_SUCCESS;
+ }
- if(pSelf->mmfContext)
- {
- XADataLocator_URI* tempUri = (XADataLocator_URI*)(pSelf->xaSource->pLocator);
- XADataFormat_MIME* tempFormat = (XADataFormat_MIME*)(pSelf->xaSource->pFormat);
- ret = XA_RESULT_SUCCESS;
- if(pSelf->xaVideoSink)
- {
- ret = mmf_setup_native_display(pSelf->mmfContext, pSelf->xaVideoSink);
- }
- if (ret == XA_RESULT_SUCCESS)
- {
- ret = mmf_set_player_uri(pSelf->mmfContext, (char *)(tempUri->URI), tempFormat->containerType);
+ if (pSelf->mmfContext)
+ {
+ XADataLocator_URI* tempUri =
+ (XADataLocator_URI*) (pSelf->xaSource->pLocator);
+ XADataFormat_MIME* tempFormat =
+ (XADataFormat_MIME*) (pSelf->xaSource->pFormat);
+ ret = XA_RESULT_SUCCESS;
+ if (pSelf->xaVideoSink)
+ {
+ ret = mmf_setup_native_display(pSelf->mmfContext,
+ pSelf->xaVideoSink);
+ }
+ if (ret == XA_RESULT_SUCCESS)
+ {
+ ret = mmf_set_player_uri(pSelf->mmfContext,
+ (char *) (tempUri->URI), tempFormat->containerType);
+ }
+ }
}
- }
DEBUG_API("<-XAMediaPlayerAdaptMMF_PostInit");
return ret;
-}
+ }
/*
* void XAMediaPlayerAdaptMMF_Destroy( XAMediaPlayerAdaptationMMFCtx* ctx )
* Destroys Media Player Adaptation Context
* @param ctx - Media Player Adaptation context to be destroyed
*/
-void XAMediaPlayerAdaptMMF_Destroy( XAAdaptationMMFCtx* bCtx )
-{
+void XAMediaPlayerAdaptMMF_Destroy(XAAdaptationMMFCtx* bCtx)
+ {
XAMediaPlayerAdaptationMMFCtx* ctx = NULL;
-
DEBUG_API("->XAMediaPlayerAdaptMMF_Destroy");
- if(bCtx == NULL)
- {
+ if (bCtx == NULL)
+ {
DEBUG_ERR("Invalid parameter!!");
DEBUG_API("<-XAMediaPlayerAdaptMMF_Destroy");
return;
- }
- ctx = (XAMediaPlayerAdaptationMMFCtx*)bCtx;
+ }
+ ctx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
- if(ctx->mmfContext)
+ if (ctx->mmfContext)
{
mmf_backend_engine_deinit(ctx->mmfContext);
}
- if(ctx->mmfMetadataContext)
- {
- mmf_metadata_utility_destroy(ctx->mmfMetadataContext);
- }
-
- XAAdaptationBaseMMF_Free( bCtx );
-
+ if (ctx->mmfMetadataContext)
+ {
+ mmf_metadata_utility_destroy(ctx->mmfMetadataContext);
+ }
+
+ XAAdaptationBaseMMF_Free(bCtx);
+
free(ctx);
ctx = NULL;
DEBUG_API("<-XAMediaPlayerAdaptMMF_Destroy");
-}
+ }
-
--- a/khronosfws/openmax_al/src/mmf_adaptation/xamediaplayeradaptctxmmf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xamediaplayeradaptctxmmf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: MediaPlayer Adapt MMF HEader
+ *
+ */
#ifndef XAMEDIAPLAYERADAPTCTXMMF_H
#define XAMEDIAPLAYERADAPTCTXMMF_H
@@ -25,11 +25,18 @@
typedef struct XAMediaPlayerAdaptationMMFCtx_ XAMediaPlayerAdaptationMMFCtx;
/* FUNCTIONS */
-XAAdaptationBaseCtx* XAMediaPlayerAdaptMMF_Create( XADataSource *pDataSrc, XADataSource *pBankSrc,
- XADataSink *pAudioSnk, XADataSink *pImageVideoSnk,
- XADataSink *pVibra, XADataSink *pLEDArray);
-XAresult XAMediaPlayerAdaptMMF_PostInit( XAAdaptationMMFCtx* bCtx );
-void XAMediaPlayerAdaptMMF_Destroy( XAAdaptationMMFCtx* bCtx );
+XAAdaptationBaseCtx
+ * XAMediaPlayerAdaptMMF_Create(XADataSource *pDataSrc,
+ XADataSource *pBankSrc, XADataSink *pAudioSnk,
+ XADataSink *pImageVideoSnk, XADataSink *pVibra,
+ XADataSink *pLEDArray);
+XAAdaptationBaseCtx
+* XAMediaPlayerAdaptMMF_CreateRadio(XAMediaPlayerAdaptationMMFCtx *pSelf,
+ XADataSource *pDataSrc, XADataSource *pBankSrc,
+ XADataSink *pAudioSnk, XADataSink *pImageVideoSnk,
+ XADataSink *pVibra, XADataSink *pLEDArray);
+XAresult XAMediaPlayerAdaptMMF_PostInit(XAAdaptationMMFCtx* bCtx);
+void XAMediaPlayerAdaptMMF_Destroy(XAAdaptationMMFCtx* bCtx);
//XAresult XAMediaPlayerAdapt_InitContentPipeSrc(XAMediaPlayerAdaptationCtx* ctx);
#endif /*XAMEDIAPLAYERADAPTCTXMMF_H*/
--- a/khronosfws/openmax_al/src/mmf_adaptation/xamediarecorderadaptctxmmf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xamediarecorderadaptctxmmf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: MediaRecorder MMF Adaptation
+ *
+ */
#include <string.h>
#include <assert.h>
@@ -21,16 +21,9 @@
#include "xaadaptationmmf.h"
#include "cmmfbackendengine.h"
#include "xaadptbasectx.h"
-//#include "XAMetadataAdaptation.h"
-//#include "XAStaticCapsAdaptation.h"
-
extern XAboolean cameraRealized;
-//extern XACameraAdaptationCtx_* cameraCtx;
-
-
-
/*
* XAAdaptationBaseCtx* XAMediaRecorderAdaptMMF_Create()
* Allocates memory for Media Recorder Adaptation Context and makes 1st phase initialization
@@ -48,9 +41,10 @@
XADataLocator_IODevice *ioDevice;
DEBUG_API("->XAMediaRecorderAdaptMMF_Create");
- pSelf = (XAMediaRecorderAdaptationMMFCtx*)calloc(1, sizeof(XAMediaRecorderAdaptationMMFCtx));
+ pSelf = (XAMediaRecorderAdaptationMMFCtx*) calloc(1,
+ sizeof(XAMediaRecorderAdaptationMMFCtx));
if (pSelf)
- {
+ {
if (XAAdaptationBaseMMF_Init(&(pSelf->baseObj),
XAMediaRecorderAdaptation) != XA_RESULT_SUCCESS)
{
@@ -58,7 +52,7 @@
free(pSelf);
pSelf = NULL;
}
- else
+ else
{
pSelf->xaAudioSource = pAudioSrc;
pSelf->xaVideoSource = pImageVideoSrc;
@@ -96,10 +90,10 @@
ioDevice
= (XADataLocator_IODevice*) (pImageVideoSrc->pLocator);
if (ioDevice->deviceType == XA_IODEVICE_CAMERA
-
- && !cameraRealized
-
- )
+
+ && !cameraRealized
+
+ )
{
DEBUG_ERR("Preconditions violated - Camera object not realized");
XAAdaptationBaseMMF_Free(&pSelf->baseObj);
@@ -109,18 +103,23 @@
}
}
}
-
- if(pSelf)
+ else
{
- res = mmf_backend_engine_init(&(pSelf->mmfContext) );
- if(!(pSelf->mmfContext) || (res != XA_RESULT_SUCCESS))
+ DEBUG_ERR("Failed to create XAMediaRecorderAdaptationMMFCtx !!!");
+ return NULL;
+ }
+
+ if (pSelf)
+ {
+ res = mmf_backend_engine_init(&(pSelf->mmfContext));
+ if (!(pSelf->mmfContext) || (res != XA_RESULT_SUCCESS))
{
DEBUG_ERR("Failed to init mmf context!!!");
free(pSelf);
- pSelf = NULL;
- }
+ pSelf = NULL;
+ }
}
-
+
DEBUG_API("<-XAMediaRecorderAdaptMMF_Create");
return (XAAdaptationBaseCtx*) (&pSelf->baseObj.baseObj);
}
@@ -135,16 +134,27 @@
{
XAresult ret = XA_RESULT_SUCCESS;
- XADataLocator_URI* tempUri;
+ XADataLocator_URI* tempUri;
XADataFormat_MIME* tempFormat;
- XAMediaRecorderAdaptationMMFCtx *pSelf = (XAMediaRecorderAdaptationMMFCtx*)bCtx;
+ XAMediaRecorderAdaptationMMFCtx *pSelf;
DEBUG_API("->XAMediaRecorderAdapt_PostInit");
- if(pSelf->mmfContext)
+ if(bCtx)
+ {
+ ret = XA_RESULT_PARAMETER_INVALID;
+ return ret;
+ }
+
+ pSelf = (XAMediaRecorderAdaptationMMFCtx*) bCtx;
+ if (pSelf->mmfContext)
{
- tempUri = (XADataLocator_URI*)(pSelf->xaSink->pLocator);
- tempFormat = (XADataFormat_MIME*)(pSelf->xaSink->pFormat);
- mmf_set_recorder_uri(pSelf->mmfContext, (char *)(tempUri->URI), tempFormat->containerType);
- mmf_set_adapt_context(pSelf->mmfContext, &(pSelf->baseObj));
+ tempUri = (XADataLocator_URI*) (pSelf->xaSink->pLocator);
+ tempFormat = (XADataFormat_MIME*) (pSelf->xaSink->pFormat);
+ ret = mmf_set_recorder_uri(pSelf->mmfContext, (char *) (tempUri->URI),
+ tempFormat->containerType);
+ if(ret == XA_RESULT_SUCCESS)
+ {
+ ret = mmf_set_adapt_context(pSelf->mmfContext, &(pSelf->baseObj));
+ }
}
DEBUG_API("<-XAMediaRecorderAdapt_PostInit");
@@ -159,17 +169,18 @@
void XAMediaRecorderAdaptMMF_Destroy(XAAdaptationMMFCtx* bCtx)
{
XAMediaRecorderAdaptationMMFCtx* ctx = NULL;
-
+
DEBUG_API("->XAMediaRecorderAdaptMMF_Destroy");
if (bCtx == NULL)
- {
- DEBUG_ERR("Invalid parameter!!");DEBUG_API("<-XAMediaRecorderAdaptMMF_Destroy");
+ {
+ DEBUG_ERR("Invalid parameter!!");
+ DEBUG_API("<-XAMediaRecorderAdaptMMF_Destroy");
return;
- }
+ }
ctx = (XAMediaRecorderAdaptationMMFCtx*) bCtx;
- if(ctx->mmfContext)
+ if (ctx->mmfContext)
{
mmf_backend_engine_deinit(ctx->mmfContext);
}
@@ -181,5 +192,3 @@
DEBUG_API("<-XAMediaRecorderAdaptMMF_Destroy");
}
-/***************** INTERNAL FUNCTIONS *******************************/
-
--- a/khronosfws/openmax_al/src/mmf_adaptation/xamediarecorderadaptctxmmf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xamediarecorderadaptctxmmf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,75 +1,73 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: MediaRecorder Adaptation MMF header
+ *
+ */
#ifndef XAMEDIARECORDERADAPTCTXMMF_H_
#define XAMEDIARECORDERADAPTCTXMMF_H_
#include "xaadaptationmmf.h"
-
/* TYPEDEFS */
-typedef struct XAMediaRecorderAdaptationMMFCtx_ XAMediaRecorderAdaptationMMFCtx;
+typedef struct XAMediaRecorderAdaptationMMFCtx_
+ XAMediaRecorderAdaptationMMFCtx;
typedef struct XAMediaRecorderAdaptationMMFCtx_
-{
+ {
/* Parent*/
XAAdaptationMMFCtx_ baseObj;
/* OMX-AL Variables */
- XADataSource *xaAudioSource, *xaVideoSource;
- XADataSink *xaSink;
- XAuint8 recModes;
+ XADataSource *xaAudioSource, *xaVideoSource;
+ XADataSink *xaSink;
+ XAuint8 recModes;
/* GST elements */
- XAboolean isobjsink; /*is sink another XA object?*/
- XAboolean isobjasrc; /*is audio source another XA object?*/
- XAboolean isobjvsrc; /*is video source another XA object?*/
- XAboolean encodingchanged;
+ XAboolean isobjsink; /*is sink another XA object?*/
+ XAboolean isobjasrc; /*is audio source another XA object?*/
+ XAboolean isobjvsrc; /*is video source another XA object?*/
+ XAboolean encodingchanged;
- XAboolean mute;
- XAuint32 premutevol;
- XAuint32 imageEffectID;
- XAboolean isStereoPosition;
- XAuint32 xaRecordState;
- XAmillidegree curRotation;
- XAuint32 curMirror;
- XAboolean isRecord;
+ XAboolean mute;
+ XAuint32 premutevol;
+ XAuint32 imageEffectID;
+ XAboolean isStereoPosition;
+ XAuint32 xaRecordState;
+ XAmillidegree curRotation;
+ XAuint32 curMirror;
+ XAboolean isRecord;
/* internals */
- XAboolean trackpositionenabled;
- gboolean runpositiontimer;
+ XAboolean trackpositionenabled;
+ gboolean runpositiontimer;
- XAImplThreadHandle recordingEventThr;
+ XAImplThreadHandle recordingEventThr;
/* Variables for encoders */
- XAAudioEncoderSettings audioEncSettings;
- XAVideoSettings videoEncSettings;
- XAImageSettings imageEncSettings;
-
- void* mmfContext;
+ XAAudioEncoderSettings audioEncSettings;
+ XAVideoSettings videoEncSettings;
+ XAImageSettings imageEncSettings;
+ void* mmfContext;
-} XAMediaRecorderAdaptationMMFCtx_;
+ } XAMediaRecorderAdaptationMMFCtx_;
/* FUNCTIONS */
-XAAdaptationBaseCtx* XAMediaRecorderAdaptMMF_Create( XADataSource* pAudioSrc,
- XADataSource* pImageVideoSrc, XADataSink* pDataSnk, XAuint8 recModes );
-XAresult XAMediaRecorderAdaptMMF_PostInit( XAAdaptationMMFCtx* bCtx );
-void XAMediaRecorderAdaptMMF_Destroy( XAAdaptationMMFCtx* bCtx );
-
+XAAdaptationBaseCtx* XAMediaRecorderAdaptMMF_Create(XADataSource* pAudioSrc,
+ XADataSource* pImageVideoSrc, XADataSink* pDataSnk, XAuint8 recModes);
+XAresult XAMediaRecorderAdaptMMF_PostInit(XAAdaptationMMFCtx* bCtx);
+void XAMediaRecorderAdaptMMF_Destroy(XAAdaptationMMFCtx* bCtx);
#endif /* XAMEDIARECORDERADAPTCTXMMF_H_ */
--- a/khronosfws/openmax_al/src/mmf_adaptation/xametadataadaptctxmmf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xametadataadaptctxmmf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,20 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Metadata Adaptation MMF
+ *
+ */
+
#include <assert.h>
#include <stdlib.h>
#include "xametadataadaptctxmmf.h"
@@ -21,46 +22,53 @@
#include "cmetadatautilityitf.h"
XAAdaptationBaseCtx* XAMetadataAdaptCtxMMF_Create(XADataSource * pDataSrc)
-{
+ {
XAMetadataAdaptationMMFCtx *pSelf = NULL;
DEBUG_API("->XAMetadataAdaptCtxMMF_Create");
-
+
pSelf = calloc(1, sizeof(XAMetadataAdaptationMMFCtx));
- if ( pSelf)
- {
-
- if( XAAdaptationBaseMMF_Init(&(pSelf->baseObj),XAMDAdaptation)
- != XA_RESULT_SUCCESS )
+ if (pSelf)
{
+
+ if (XAAdaptationBaseMMF_Init(&(pSelf->baseObj), XAMDAdaptation)
+ != XA_RESULT_SUCCESS)
+ {
DEBUG_ERR("Failed to init base context!!!");
free(pSelf);
pSelf = NULL;
- }
+ }
else
-
- {
+
+ {
pSelf->baseObj.baseObj.fwtype = FWMgrFWMMF;
pSelf->xaSource = pDataSrc;
- }
+ }
- if(pDataSrc)
- {
- pSelf->mmfContext = mmf_metadata_utility_init((char *)(( (XADataLocator_URI*)(pDataSrc->pLocator))->URI));
- if(!pSelf->mmfContext)
+ if (pDataSrc)
{
- DEBUG_ERR("Failed to init mmf context!!!");
- free(pSelf);
- pSelf = NULL;
+ pSelf->mmfContext
+ = mmf_metadata_utility_init(
+ (char *) (((XADataLocator_URI*) (pDataSrc->pLocator))->URI));
+ if (!pSelf->mmfContext)
+ {
+ DEBUG_ERR("Failed to init mmf context!!!");
+ free(pSelf);
+ pSelf = NULL;
+ }
}
- }
- }
+ }
+ else
+ {
+ DEBUG_ERR("Failed to create XAMetadataAdaptationMMFCtx !!!");
+ return NULL;
+ }
+
DEBUG_API("<- XAMetadataAdaptCtxMMF_Create");
- return (XAAdaptationBaseCtx*)(&pSelf->baseObj.baseObj);
-}
-
+ return (XAAdaptationBaseCtx*) (&pSelf->baseObj.baseObj);
+ }
/*
* XAresult XAMediaPlayerAdaptMMF_PostInit()
@@ -68,39 +76,38 @@
* @param XAMediaPlayerAdaptationMMFCtx* ctx - pointer to Media Player adaptation context
* @return XAresult - Success value
*/
-XAresult XAMetadataAdaptCtxMMF_PostInit( XAAdaptationMMFCtx* bCtx )
-{
- XAresult ret = XA_RESULT_SUCCESS;
-
- DEBUG_API("<-XAMetadataAdaptCtxMMF_PostInit");
- return ret;
-}
+XAresult XAMetadataAdaptCtxMMF_PostInit(XAAdaptationMMFCtx* bCtx)
+ {
+ XAresult ret = XA_RESULT_SUCCESS;
+
+ DEBUG_API("<-XAMetadataAdaptCtxMMF_PostInit");
+ return ret;
+ }
/*
* void XAMediaPlayerAdaptMMF_Destroy( XAMediaPlayerAdaptationMMFCtx* ctx )
* Destroys Media Player Adaptation Context
* @param ctx - Media Player Adaptation context to be destroyed
*/
-void XAMetadataAdaptCtxMMF_Destroy( XAAdaptationMMFCtx* bCtx )
-{
+void XAMetadataAdaptCtxMMF_Destroy(XAAdaptationMMFCtx* bCtx)
+ {
DEBUG_API("->XAMetadataAdaptCtxMMF_Destroy");
- if(bCtx == NULL)
- {
- DEBUG_ERR("Invalid parameter!!");
- DEBUG_API("<-XAMetadataAdaptCtxMMF_Destroy");
+ if (bCtx == NULL)
+ {
+ DEBUG_ERR("Invalid parameter!!");DEBUG_API("<-XAMetadataAdaptCtxMMF_Destroy");
return;
- }
-
- if(((XAMetadataAdaptationMMFCtx*)bCtx)->mmfContext)
- {
- mmf_metadata_utility_destroy(((XAMetadataAdaptationMMFCtx*)bCtx)->mmfContext);
- }
+ }
- XAAdaptationBase_Free( &bCtx->baseObj );
+ if (((XAMetadataAdaptationMMFCtx*) bCtx)->mmfContext)
+ {
+ mmf_metadata_utility_destroy(
+ ((XAMetadataAdaptationMMFCtx*) bCtx)->mmfContext);
+ }
+
+ XAAdaptationBase_Free(&bCtx->baseObj);
free(bCtx);
bCtx = NULL;
DEBUG_API("<-XAMetadataExtractorAdaptMMF_Destroy");
-}
+ }
-
--- a/khronosfws/openmax_al/src/mmf_adaptation/xametadataadaptctxmmf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xametadataadaptctxmmf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,20 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Metadata Adaptation MMF
+ *
+ */
+
#ifndef XAMETADATAADAPTCTXMMF_H
#define XAMETADATAADAPTCTXMMF_H
@@ -24,8 +25,8 @@
typedef struct XAMetadataAdaptationMMFCtx_ XAMetadataAdaptationMMFCtx;
/* FUNCTIONS */
-XAAdaptationBaseCtx* XAMetadataAdaptCtxMMF_Create( XADataSource *pDataSrc );
-XAresult XAMetadataAdaptCtxMMF_PostInit( XAAdaptationMMFCtx* bCtx );
-void XAMetadataAdaptCtxMMF_Destroy( XAAdaptationMMFCtx* bCtx );
+XAAdaptationBaseCtx* XAMetadataAdaptCtxMMF_Create(XADataSource *pDataSrc);
+XAresult XAMetadataAdaptCtxMMF_PostInit(XAAdaptationMMFCtx* bCtx);
+void XAMetadataAdaptCtxMMF_Destroy(XAAdaptationMMFCtx* bCtx);
#endif /*XAMETADATAADAPTCTXMMF_H*/
--- a/khronosfws/openmax_al/src/mmf_adaptation/xammfcapabilitiesmgr.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xammfcapabilitiesmgr.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,35 +1,37 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "xammfcapabilitiesmgr.h"
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: MMF capabilities mgr
+ *
+ */
#include <stdio.h>
#include <string.h>
+#include "xammfcapabilitiesmgr.h"
-static XAresult XAMMFCapabilitiesMgr_GetAudioAACEncoderCapabilities(XACapabilities **ppNode);
-static XAresult XAMMFCapabilitiesMgr_GetAudioAMREncoderCapabilities(XACapabilities **ppNode);
-static XAresult XAMMFCapabilitiesMgr_GetAudioPCMEncoderCapabilities(XACapabilities **ppNode);
+static XAresult XAMMFCapabilitiesMgr_GetAudioAACEncoderCapabilities(
+ XACapabilities **ppNode);
+static XAresult XAMMFCapabilitiesMgr_GetAudioAMREncoderCapabilities(
+ XACapabilities **ppNode);
+static XAresult XAMMFCapabilitiesMgr_GetAudioPCMEncoderCapabilities(
+ XACapabilities **ppNode);
/* XAresult XAMMFCapabilitiesMgr_UpdateCapabilitieList
* Description: Update the capabilities list supported by GStreamer framework.
*/
XAresult XAMMFCapabilitiesMgr_UpdateCapabilitieList(
- FrameworkMap *frameworkMap,
- XACapabilities **ppListHead)
+ FrameworkMap *frameworkMap, XACapabilities **ppListHead)
-{
+ {
XAresult res = XA_RESULT_SUCCESS;
XACapabilities *lastNode;
XACapabilities *firstNode;
@@ -38,28 +40,25 @@
char *uri = NULL;
DEBUG_API("->XAGSTCapabilitiesMgr_UpdateCapabilitieList");
- if(!frameworkMap || !ppListHead)
- {
+ if (!frameworkMap || !ppListHead)
+ {
res = XA_RESULT_PARAMETER_INVALID;
return res;
- }
+ }
lastNode = firstNode = *ppListHead;
-
+
/* traverse and point to the last node in the list */
- while(lastNode && lastNode->next)
- {
+ while (lastNode && lastNode->next)
+ {
lastNode = lastNode->next;
- }
+ }
uri = "file:///c:/test.mp4";
- fwtype = XAFrameworkMgr_GetFramework(
- frameworkMap,
- uri,
- FWMgrMORecorder);
-
- if(fwtype == FWMgrFWMMF)
- {
+ fwtype = XAFrameworkMgr_GetFramework(frameworkMap, uri, FWMgrMORecorder);
+
+ if (fwtype == FWMgrFWMMF)
+ {
/* Add codec capabilities */
newNode = NULL;
res = XAMMFCapabilitiesMgr_GetAudioAACEncoderCapabilities(&newNode);
@@ -68,26 +67,24 @@
return res;
}
if (lastNode)
- {
+ {
lastNode->next = newNode;
- }
+ }
if (newNode)
- { /* if a new node is created move lastNode to the new item */
+ { /* if a new node is created move lastNode to the new item */
if (!firstNode)
+ {
firstNode = newNode;
+ }
lastNode = newNode;
+ }
}
- }
-
uri = "file:///c:/test.amr";
- fwtype = XAFrameworkMgr_GetFramework(
- frameworkMap,
- uri,
- FWMgrMORecorder);
-
- if(fwtype == FWMgrFWMMF)
- {
+ fwtype = XAFrameworkMgr_GetFramework(frameworkMap, uri, FWMgrMORecorder);
+
+ if (fwtype == FWMgrFWMMF)
+ {
newNode = NULL;
res = XAMMFCapabilitiesMgr_GetAudioAMREncoderCapabilities(&newNode);
if (res != XA_RESULT_SUCCESS)
@@ -95,25 +92,24 @@
return res;
}
if (lastNode)
- {
+ {
lastNode->next = newNode;
- }
+ }
if (newNode)
- { /* if a new node is created move lastNode to the new item */
+ { /* if a new node is created move lastNode to the new item */
if (!firstNode)
+ {
firstNode = newNode;
+ }
lastNode = newNode;
+ }
}
- }
uri = "file:///c:/test.wav";
- fwtype = XAFrameworkMgr_GetFramework(
- frameworkMap,
- uri,
- FWMgrMORecorder);
-
- if(fwtype == FWMgrFWMMF)
- {
+ fwtype = XAFrameworkMgr_GetFramework(frameworkMap, uri, FWMgrMORecorder);
+
+ if (fwtype == FWMgrFWMMF)
+ {
newNode = NULL;
res = XAMMFCapabilitiesMgr_GetAudioPCMEncoderCapabilities(&newNode);
if (res != XA_RESULT_SUCCESS)
@@ -121,68 +117,71 @@
return res;
}
if (lastNode)
- {
+ {
lastNode->next = newNode;
- }
+ }
if (newNode)
- { /* if a new node is created move lastNode to the new item */
+ { /* if a new node is created move lastNode to the new item */
if (!firstNode)
+ {
firstNode = newNode;
+ }
lastNode = newNode;
+ }
}
- }
/* if empty list, then append first node as the head */
if (!(*ppListHead))
{
*ppListHead = firstNode;
- }
- DEBUG_API("<-XAGSTCapabilitiesMgr_UpdateCapabilitieList");
+ }DEBUG_API("<-XAGSTCapabilitiesMgr_UpdateCapabilitieList");
return res;
-}
-
+ }
-XAresult XAMMFCapabilitiesMgr_GetAudioAACEncoderCapabilities(XACapabilities **ppNode)
-{
+XAresult XAMMFCapabilitiesMgr_GetAudioAACEncoderCapabilities(
+ XACapabilities **ppNode)
+ {
XAresult res = XA_RESULT_SUCCESS;
XACapabilities *newNode = NULL;
XAAudioCodecDescriptor *entries = NULL;
- newNode = (XACapabilities *)calloc(1, sizeof(XACapabilities));
+ newNode = (XACapabilities *) calloc(1, sizeof(XACapabilities));
if (!newNode)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
return res;
- }
+ }
newNode->capsType = AUD_E;
newNode->xaid = XA_AUDIOCODEC_AAC;
newNode->noOfEntries = 1;
/* Allocate array */
- entries = (XAAudioCodecDescriptor*)calloc(1, sizeof(XAAudioCodecDescriptor));
+ entries = (XAAudioCodecDescriptor*) calloc(1,
+ sizeof(XAAudioCodecDescriptor));
if (!entries)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
return res;
- }
+ }
- newNode->pEntry = (void*)entries;
-
+ newNode->pEntry = (void*) entries;
+
entries->maxChannels = 2;
entries->minBitsPerSample = 16;
entries->maxBitsPerSample = 16;
- entries->minSampleRate = 8000000; /*milliHz*/
+ entries->minSampleRate = 8000000; /*milliHz*/
entries->maxSampleRate = 48000000;
- entries->isFreqRangeContinuous=XA_BOOLEAN_FALSE;
+ entries->isFreqRangeContinuous = XA_BOOLEAN_FALSE;
entries->numSampleRatesSupported = 7;
- entries->pSampleRatesSupported = (XAmilliHertz*)calloc(entries->numSampleRatesSupported, sizeof(XAmilliHertz));
+ entries->pSampleRatesSupported = (XAmilliHertz*) calloc(
+ entries->numSampleRatesSupported, sizeof(XAmilliHertz));
if (!entries->pSampleRatesSupported)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
return res;
- }
+ }
/* entries in milliHz */
entries->pSampleRatesSupported[0] = 8000000;
entries->pSampleRatesSupported[1] = 11025000;
@@ -196,13 +195,14 @@
entries->maxBitRate = 256000;
entries->isBitrateRangeContinuous = XA_BOOLEAN_FALSE;
entries->numBitratesSupported = 8;
- entries->pBitratesSupported = (XAuint32*)calloc(entries->numBitratesSupported, sizeof(XAuint32));
+ entries->pBitratesSupported = (XAuint32*) calloc(
+ entries->numBitratesSupported, sizeof(XAuint32));
if (!entries->pBitratesSupported)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
return res;
- }
+ }
(entries->pBitratesSupported)[0] = 32000;
(entries->pBitratesSupported)[1] = 64000;
(entries->pBitratesSupported)[2] = 96000;
@@ -215,58 +215,59 @@
entries->profileSetting = XA_AUDIOPROFILE_AAC_AAC;
entries->modeSetting = XA_AUDIOMODE_AAC_LC;
- newNode->pEntry = (void*)entries;
-
*ppNode = newNode;
return res;
-}
+ }
-XAresult XAMMFCapabilitiesMgr_GetAudioAMREncoderCapabilities(XACapabilities **ppNode)
-{
+XAresult XAMMFCapabilitiesMgr_GetAudioAMREncoderCapabilities(
+ XACapabilities **ppNode)
+ {
XAresult res = XA_RESULT_SUCCESS;
XACapabilities *newNode = NULL;
XAAudioCodecDescriptor *entries = NULL;
-
- newNode = (XACapabilities *)calloc(1, sizeof(XACapabilities));
+
+ newNode = (XACapabilities *) calloc(1, sizeof(XACapabilities));
if (!newNode)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
return res;
- }
+ }
newNode->capsType = AUD_E;
newNode->xaid = XA_AUDIOCODEC_AMR;
newNode->noOfEntries = 1;
/* Allocate array */
- entries = (XAAudioCodecDescriptor*)calloc(1, sizeof(XAAudioCodecDescriptor));
+ entries = (XAAudioCodecDescriptor*) calloc(1,
+ sizeof(XAAudioCodecDescriptor));
if (!entries)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
return res;
- }
+ }
- newNode->pEntry = (void*)entries;
-
+ newNode->pEntry = (void*) entries;
+
entries->maxChannels = 1;
entries->minBitsPerSample = 8;
entries->maxBitsPerSample = 8;
- entries->minSampleRate = 8000000; /*milliHz*/
+ entries->minSampleRate = 8000000; /*milliHz*/
entries->maxSampleRate = 8000000;
- entries->isFreqRangeContinuous=XA_BOOLEAN_TRUE;
+ entries->isFreqRangeContinuous = XA_BOOLEAN_TRUE;
entries->numSampleRatesSupported = 1;
- entries->minBitRate=4750;
- entries->maxBitRate=12200;
- entries->isBitrateRangeContinuous=XA_BOOLEAN_FALSE;
+ entries->minBitRate = 4750;
+ entries->maxBitRate = 12200;
+ entries->isBitrateRangeContinuous = XA_BOOLEAN_FALSE;
entries->numBitratesSupported = 8;
- entries->pBitratesSupported = (XAuint32*)calloc(entries->numBitratesSupported, sizeof(XAuint32));
+ entries->pBitratesSupported = (XAuint32*) calloc(
+ entries->numBitratesSupported, sizeof(XAuint32));
if (!entries->pBitratesSupported)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
return res;
- }
+ }
(entries->pBitratesSupported)[0] = 4750;
(entries->pBitratesSupported)[1] = 5150;
(entries->pBitratesSupported)[2] = 5900;
@@ -279,54 +280,55 @@
entries->profileSetting = XA_AUDIOPROFILE_AMR;
entries->modeSetting = 0;
- newNode->pEntry = (void*)entries;
-
*ppNode = newNode;
return res;
-}
+ }
-XAresult XAMMFCapabilitiesMgr_GetAudioPCMEncoderCapabilities(XACapabilities **ppNode)
-{
+XAresult XAMMFCapabilitiesMgr_GetAudioPCMEncoderCapabilities(
+ XACapabilities **ppNode)
+ {
XAresult res = XA_RESULT_SUCCESS;
XACapabilities *newNode = NULL;
XAAudioCodecDescriptor *entries = NULL;
- newNode = (XACapabilities *)calloc(1, sizeof(XACapabilities));
+ newNode = (XACapabilities *) calloc(1, sizeof(XACapabilities));
if (!newNode)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
return res;
- }
+ }
newNode->capsType = AUD_E;
newNode->xaid = XA_AUDIOCODEC_PCM;
newNode->noOfEntries = 1;
/* Allocate array */
- entries = (XAAudioCodecDescriptor*)calloc(1, sizeof(XAAudioCodecDescriptor));
+ entries = (XAAudioCodecDescriptor*) calloc(1,
+ sizeof(XAAudioCodecDescriptor));
if (!entries)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
return res;
- }
+ }
- newNode->pEntry = (void*)entries;
+ newNode->pEntry = (void*) entries;
entries->maxChannels = 2;
entries->minBitsPerSample = 16;
entries->maxBitsPerSample = 16;
- entries->minSampleRate = 8000000; /*milliHz*/
+ entries->minSampleRate = 8000000; /*milliHz*/
entries->maxSampleRate = 96000000;
- entries->isFreqRangeContinuous=XA_BOOLEAN_FALSE;
+ entries->isFreqRangeContinuous = XA_BOOLEAN_FALSE;
entries->numSampleRatesSupported = 10;
- entries->pSampleRatesSupported = (XAmilliHertz*)calloc(entries->numSampleRatesSupported, sizeof(XAmilliHertz));
+ entries->pSampleRatesSupported = (XAmilliHertz*) calloc(
+ entries->numSampleRatesSupported, sizeof(XAmilliHertz));
if (!entries->pSampleRatesSupported)
- {
+ {
res = XA_RESULT_MEMORY_FAILURE;
XACapabilitiesMgr_DeleteCapabilitieList(&newNode);
return res;
- }
+ }
/* entries in milliHz */
entries->pSampleRatesSupported[0] = 12000000;
entries->pSampleRatesSupported[1] = 16000000;
@@ -347,8 +349,6 @@
entries->profileSetting = XA_AUDIOPROFILE_PCM;
entries->modeSetting = 0;
- newNode->pEntry = (void*)entries;
-
*ppNode = newNode;
return res;
-}
+ }
--- a/khronosfws/openmax_al/src/mmf_adaptation/xammfcapabilitiesmgr.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xammfcapabilitiesmgr.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: MMF capability manager
+ *
+ */
#ifndef XAMMFCAPABILITIESMGR_H
#define XAMMFCAPABILITIESMGR_H
@@ -23,7 +23,6 @@
#include "xacapabilitiesmgr.h"
XAresult XAMMFCapabilitiesMgr_UpdateCapabilitieList(
- FrameworkMap *frameworkMap,
- XACapabilities** ppListHead);
+ FrameworkMap *frameworkMap, XACapabilities** ppListHead);
#endif /* XAGSTCAPABILITIESMGR_H */
--- a/khronosfws/openmax_al/src/mmf_adaptation/xanokialinearvolumeitfadaptationmmf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xanokialinearvolumeitfadaptationmmf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,26 +1,26 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Nokia Linear Volume MMF impl
+ *
+ */
-
-//#include <mixer.h>
#include "xaadaptationmmf.h"
#include "xanokialinearvolumeitfadaptationmmf.h"
#include "xamediaplayeradaptctxmmf.h"
#include "cmmfbackendengine.h"
+#include "cmmfradiobackendengine.h"
+
/*
* XAresult XANokiaLinearVolumeItfAdapt_SetVolumeLevel(void *ctx, AdaptationContextIDS ctx->baseObj.ctxId,
* XAuint32 percentage)
@@ -28,69 +28,79 @@
* XAuint32 percentage - Requested volume level, in between MIN_VOLUME_LEVEL and MAX_VOLUME_LEVEL
* @return XAresult ret - Success value
*/
-XAresult XANokiaLinearVolumeItfAdapt_SetVolumeLevel(XAAdaptationMMFCtx *ctx, XAuint32 percentage)
-{
+XAresult XANokiaLinearVolumeItfAdapt_SetVolumeLevel(XAAdaptationMMFCtx *ctx,
+ XAuint32 percentage)
+ {
XAresult res = XA_RESULT_SUCCESS;
XAuint32 maxvol;
XAuint32 vol;
DEBUG_API_A1("->XANokiaLinearVolumeItfAdapt_SetVolumeLevel to: %d", percentage);
- if(!ctx || ( ctx->baseObj.ctxId != XAMediaPlayerAdaptation &&
- ctx->baseObj.ctxId != XAMediaRecorderAdaptation &&
- ctx->baseObj.ctxId != XARadioAdaptation) )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XANokiaLinearVolumeItfAdapt_SetVolumeLevel");
+ if (!ctx || (ctx->baseObj.ctxId != XAMediaPlayerAdaptation
+ && ctx->baseObj.ctxId != XAMediaRecorderAdaptation
+ && ctx->baseObj.ctxId != XARadioAdaptation))
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaLinearVolumeItfAdapt_SetVolumeLevel");
/* invalid parameter */
- return XA_RESULT_PARAMETER_INVALID;
- }
-
- if(ctx->baseObj.ctxId == XAMediaPlayerAdaptation)
+ res = XA_RESULT_PARAMETER_INVALID;
+ return res;
+ }
+
+ if (ctx->baseObj.ctxId == XAMediaPlayerAdaptation)
{
- mmf_volumeitf_get_maxvolume(((XAMediaPlayerAdaptationMMFCtx*)ctx)->mmfContext,
- &maxvol);
-
- vol = (percentage * maxvol) / MAX_PERCENTAGE_VOLUME;
-
- mmf_volumeitf_set_volume(((XAMediaPlayerAdaptationMMFCtx*)ctx)->mmfContext,
- vol);
+ res = mmf_volumeitf_get_maxvolume(
+ ((XAMediaPlayerAdaptationMMFCtx*) ctx)->mmfContext, &maxvol);
+
+ if(res == XA_RESULT_SUCCESS)
+ {
+ vol = (percentage * maxvol) / MAX_PERCENTAGE_VOLUME;
+ res = mmf_volumeitf_set_volume(
+ ((XAMediaPlayerAdaptationMMFCtx*) ctx)->mmfContext, vol);
+ }
+
}
- DEBUG_API("<-XANokiaLinearVolumeItfAdapt_SetVolumeLevel");
+ else if (ctx->baseObj.ctxId == XARadioAdaptation)
+ {
+ mmf_set_player_adapt_context(cmmfradiobackendengine_init(), ctx);
+ res = set_volume(cmmfradiobackendengine_init(), percentage);
+ }DEBUG_API("<-XANokiaLinearVolumeItfAdapt_SetVolumeLevel");
return res;
-}
+ }
XAresult XANokiaLinearVolumeItfAdapt_GetStepCount(XAAdaptationMMFCtx *ctx,
- XAuint32* stepcount)
+ XAuint32* stepcount)
{
XAresult res = XA_RESULT_SUCCESS;
- DEBUG_API_A1("->XANokiaLinearVolumeItfAdapt_SetVolumeLevel to: %d",
- percentage);
- if(!ctx || ( ctx->baseObj.ctxId != XAMediaPlayerAdaptation &&
- ctx->baseObj.ctxId != XAMediaRecorderAdaptation &&
- ctx->baseObj.ctxId != XARadioAdaptation) )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XANokiaLinearVolumeItfAdapt_SetVolumeLevel");
+ DEBUG_API("->XANokiaLinearVolumeItfAdapt_GetStepCount ");
+ if (!ctx || (ctx->baseObj.ctxId != XAMediaPlayerAdaptation
+ && ctx->baseObj.ctxId != XAMediaRecorderAdaptation
+ && ctx->baseObj.ctxId != XARadioAdaptation))
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaLinearVolumeItfAdapt_SetVolumeLevel");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
+ }
+
+ if (ctx->baseObj.ctxId == XAMediaPlayerAdaptation)
+ {
+ res = mmf_volumeitf_get_maxvolume(
+ ((XAMediaPlayerAdaptationMMFCtx*) ctx)->mmfContext, stepcount);
+ }
+
+ DEBUG_API("<-XANokiaLinearVolumeItfAdapt_GetStepCount");
+ return res;
}
- if(ctx->baseObj.ctxId == XAMediaPlayerAdaptation)
+void XANokiaLinearVolumeItfAdapt_VolumeChange(XAAdaptationBaseCtx *ctx,
+ TInt aVolume)
+ {
+ XAAdaptEvent event =
{
- mmf_volumeitf_get_maxvolume(((XAMediaPlayerAdaptationMMFCtx*)ctx)->mmfContext,
- stepcount);
+ XA_NOKIALINEARVOLITFEVENTS, XA_ADAPT_VOLUME_VOLUME_CHANGED, 1, 0
+ };
+ if (ctx)
+ {
+ event.data = &aVolume;
+ XAAdaptationBase_SendAdaptEvents(ctx, &event);
}
-
- DEBUG_API("<-XANokiaLinearVolumeItfAdapt_SetVolumeLevel");
- return res;
}
-void XANokiaLinearVolumeItfAdapt_VolumeChange(XAAdaptationBaseCtx *ctx, TInt aVolume)
-{
- XAAdaptEvent event = {XA_NOKIALINEARVOLITFEVENTS, XA_ADAPT_VOLUME_VOLUME_CHANGED,1,0};
- if (ctx)
- {
- event.data = &aVolume;
- XAAdaptationBase_SendAdaptEvents(ctx, &event );
- }
-}
-
--- a/khronosfws/openmax_al/src/mmf_adaptation/xanokialinearvolumeitfadaptationmmf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xanokialinearvolumeitfadaptationmmf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Nokia Linear Volume Header
+ *
+ */
#ifndef XANOKIALINEARVOLUMEITFADAPTATIONMMF_H
#define XANOKIALINEARVOLUMEITFADAPTATIONMMF_H
@@ -27,13 +27,14 @@
/* FUNCTIONS */
XAresult XANokiaLinearVolumeItfAdapt_SetVolumeLevel(XAAdaptationMMFCtx *ctx,
- XAuint32 percentage);
-XAresult XANokiaLinearVolumeItfAdapt_GetMaxVolumeLevel(XAAdaptationMMFCtx *ctx,
- XAuint32 * pPercentage);
-
+ XAuint32 percentage);
+XAresult XANokiaLinearVolumeItfAdapt_GetMaxVolumeLevel(
+ XAAdaptationMMFCtx *ctx, XAuint32 * pPercentage);
+
XAresult XANokiaLinearVolumeItfAdapt_GetStepCount(XAAdaptationMMFCtx *ctx,
- XAuint32 * pStepCount);
+ XAuint32 * pStepCount);
-void XANokiaLinearVolumeItfAdapt_VolumeChange(XAAdaptationBaseCtx *ctx, TInt volume);
+void XANokiaLinearVolumeItfAdapt_VolumeChange(XAAdaptationBaseCtx *ctx,
+ TInt volume);
#endif /* XANOKIALINEARVOLUMEITFADAPTATIONMMF_H */
--- a/khronosfws/openmax_al/src/mmf_adaptation/xanokiavolumeextitfadaptationmmf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xanokiavolumeextitfadaptationmmf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,24 +1,25 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Nokia Volume Ext Impl
+ *
+ */
#include "xanokiavolumeextitfadaptationmmf.h"
#include "xamediaplayeradaptctxmmf.h"
#include "xamediarecorderadaptctxmmf.h"
#include "cmmfbackendengine.h"
+#include "cmmfradiobackendengine.h"
/*
* XAresult XANokiaVolumeExtItfAdapt_SetMute(void *ctx, AdaptationContextIDS ctx->ctxId, XAboolean mute)
@@ -27,62 +28,77 @@
* @param XAboolean mute - status of mute value
* @return XAresult ret - Success value
*/
-XAresult XANokiaVolumeExtItfAdapt_SetMute(XAAdaptationMMFCtx *ctx, XAboolean mute)
-{
+XAresult XANokiaVolumeExtItfAdapt_SetMute(XAAdaptationMMFCtx *ctx,
+ XAboolean mute)
+ {
XAuint32 volume;
+ XAresult res = XA_RESULT_SUCCESS;
+
DEBUG_API("->XANokiaVolumeExtItfAdapt_SetMute");
- if(!ctx || ( ctx->baseObj.ctxId != XAMediaPlayerAdaptation &&
- ctx->baseObj.ctxId != XAMediaRecorderAdaptation &&
- ctx->baseObj.ctxId != XARadioAdaptation ) )
- {
+ if (!ctx || (ctx->baseObj.ctxId != XAMediaPlayerAdaptation
+ && ctx->baseObj.ctxId != XAMediaRecorderAdaptation
+ && ctx->baseObj.ctxId != XARadioAdaptation))
+ {
DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
DEBUG_API("<-XANokiaVolumeExtItfAdapt_SetMute");
/* invalid parameter */
- return XA_RESULT_PARAMETER_INVALID;
- }
+ res = XA_RESULT_PARAMETER_INVALID;
+ return res;
+ }
+
+ if (ctx->baseObj.ctxId == XAMediaPlayerAdaptation)
+ {
+ if (mute)
+ {
- if ( ctx->baseObj.ctxId == XAMediaPlayerAdaptation )
- {
- if(mute)
+ res = mmf_volumeitf_get_volume(
+ ((XAMediaPlayerAdaptationMMFCtx*) ctx)->mmfContext,
+ &volume);
+ if(res == XA_RESULT_SUCCESS)
+ {
+ ((XAMediaPlayerAdaptationMMFCtx*) ctx)->premutevol = volume;
+ res = mmf_volumeitf_set_volume(
+ ((XAMediaPlayerAdaptationMMFCtx*) ctx)->mmfContext, 0);
+ }
+ }
+ else
+ {
+ res = mmf_volumeitf_set_volume(
+ ((XAMediaPlayerAdaptationMMFCtx*) ctx)->mmfContext,
+ ((XAMediaPlayerAdaptationMMFCtx*) ctx)->premutevol);
+ }
+ }
+ else if (ctx->baseObj.ctxId == XAMediaRecorderAdaptation)
{
-
- mmf_volumeitf_get_volume(((XAMediaPlayerAdaptationMMFCtx*)ctx)->mmfContext,
- &volume);
- ((XAMediaPlayerAdaptationMMFCtx*)ctx)->premutevol = volume;
- mmf_volumeitf_set_volume(((XAMediaPlayerAdaptationMMFCtx*)ctx)->mmfContext,
- 0);
+ if (mute)
+ {
+
+ res = mmf_volumeitf_get_volume(
+ ((XAMediaRecorderAdaptationMMFCtx*) ctx)->mmfContext,
+ &volume);
+ if(res == XA_RESULT_SUCCESS)
+ {
+ ((XAMediaRecorderAdaptationMMFCtx*) ctx)->premutevol = volume;
+ res = mmf_volumeitf_set_volume(
+ ((XAMediaRecorderAdaptationMMFCtx*) ctx)->mmfContext, 0);
+ }
+ }
+ else
+ {
+ res = mmf_volumeitf_set_volume(
+ ((XAMediaRecorderAdaptationMMFCtx*) ctx)->mmfContext,
+ ((XAMediaRecorderAdaptationMMFCtx*) ctx)->premutevol);
+ }
}
- else
+ else if (ctx->baseObj.ctxId == XARadioAdaptation)
{
- mmf_volumeitf_set_volume(((XAMediaPlayerAdaptationMMFCtx*)ctx)->mmfContext,
- ((XAMediaPlayerAdaptationMMFCtx*)ctx)->premutevol);
+ mmf_set_player_adapt_context(cmmfradiobackendengine_init(), ctx);
+ res = set_mute(cmmfradiobackendengine_init(), mute);
}
+
+ DEBUG_API("<-XANokiaVolumeExtItfAdapt_SetMute");
+ return res;
}
- else if ( ctx->baseObj.ctxId == XAMediaRecorderAdaptation )
- {
- if(mute)
- {
-
- mmf_volumeitf_get_volume(((XAMediaRecorderAdaptationMMFCtx*)ctx)->mmfContext,
- &volume);
- ((XAMediaRecorderAdaptationMMFCtx*)ctx)->premutevol = volume;
- mmf_volumeitf_set_volume(((XAMediaRecorderAdaptationMMFCtx*)ctx)->mmfContext,
- 0);
- }
- else
- {
- mmf_volumeitf_set_volume(((XAMediaRecorderAdaptationMMFCtx*)ctx)->mmfContext,
- ((XAMediaRecorderAdaptationMMFCtx*)ctx)->premutevol);
- }
- }
- else if ( ctx->baseObj.ctxId == XARadioAdaptation )
- {
-
- }
-
- DEBUG_API("<-XANokiaVolumeExtItfAdapt_SetMute");
- return XA_RESULT_SUCCESS;
-}
/*
* XAresult XANokiaVolumeExtItfAdapt_EnableStereoPosition(XAAdaptationBaseCtx *ctx, XAboolean enable)
@@ -90,31 +106,36 @@
* @param XAboolean enable - Enable Stereo Position
* @return XAresult - Success value
*/
-XAresult XANokiaVolumeExtItfAdapt_EnableStereoPosition(XAAdaptationMMFCtx *ctx, XAboolean enable)
-{
+XAresult XANokiaVolumeExtItfAdapt_EnableStereoPosition(
+ XAAdaptationMMFCtx *ctx, XAboolean enable)
+ {
+ XAresult res = XA_RESULT_SUCCESS;
DEBUG_API("->XANokiaVolumeExtItfAdapt_EnableStereoPosition");
- if(!ctx || ( ctx->baseObj.ctxId != XAMediaPlayerAdaptation &&
- ctx->baseObj.ctxId != XAMediaRecorderAdaptation ) )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XANokiaVolumeExtItfAdapt_EnableStereoPosition");
+ if (!ctx || (ctx->baseObj.ctxId != XAMediaPlayerAdaptation
+ && ctx->baseObj.ctxId != XAMediaRecorderAdaptation))
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfAdapt_EnableStereoPosition");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
-
- if ( ctx->baseObj.ctxId == XAMediaPlayerAdaptation )
- {
+ }
- }
- else if ( ctx->baseObj.ctxId == XAMediaRecorderAdaptation )
- {
-
- }
+ if (ctx->baseObj.ctxId == XAMediaPlayerAdaptation)
+ {
+ res = XA_RESULT_FEATURE_UNSUPPORTED;
+ }
+ else if (ctx->baseObj.ctxId == XAMediaRecorderAdaptation)
+ {
+ res = XA_RESULT_FEATURE_UNSUPPORTED;
+ }
+ else if (ctx->baseObj.ctxId == XARadioAdaptation)
+ {
+ res = XA_RESULT_FEATURE_UNSUPPORTED;
+ }
DEBUG_API("<-XANokiaVolumeExtItfAdapt_EnableStereoPosition");
- return XA_RESULT_SUCCESS;
-}
+ return res;
+ }
/*
* XAresult XANokiaVolumeExtItfAdapt_SetStereoPosition(XAAdaptationMMFCtx *ctx, XApermille stereoPosition)
@@ -123,38 +144,46 @@
* @return XAresult - Success value
*/
XAresult XANokiaVolumeExtItfAdapt_SetStereoPosition(XAAdaptationMMFCtx *ctx,
- XApermille stereoPosition)
-{
+ XApermille stereoPosition)
+ {
+ XAresult res = XA_RESULT_SUCCESS;
DEBUG_API("->XANokiaVolumeExtItfAdapt_SetStereoPosition");
-
- if(!ctx || ( ctx->baseObj.ctxId != XAMediaPlayerAdaptation &&
- ctx->baseObj.ctxId != XAMediaRecorderAdaptation ) )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XANokiaVolumeExtItfAdapt_SetStereoPosition");
+
+ if (!ctx || (ctx->baseObj.ctxId != XAMediaPlayerAdaptation
+ && ctx->baseObj.ctxId != XAMediaRecorderAdaptation))
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XANokiaVolumeExtItfAdapt_SetStereoPosition");
return XA_RESULT_PARAMETER_INVALID;
+ }
+
+ if (ctx->baseObj.ctxId == XAMediaPlayerAdaptation)
+ {
+ res = XA_RESULT_FEATURE_UNSUPPORTED;
+ }
+ else if (ctx->baseObj.ctxId == XAMediaRecorderAdaptation)
+ {
+ res = XA_RESULT_FEATURE_UNSUPPORTED;
+ }
+ else if (ctx->baseObj.ctxId == XARadioAdaptation)
+ {
+ res = XA_RESULT_FEATURE_UNSUPPORTED;
+ }
+
+ DEBUG_API("<-XANokiaVolumeExtItfAdapt_SetStereoPosition");
+ return res;
}
- if ( ctx->baseObj.ctxId == XAMediaPlayerAdaptation )
+void XANokiaVolumeExtItfAdapt_MuteChange(XAAdaptationBaseCtx* ctx,
+ XAboolean aMute)
{
-
- }
- else if ( ctx->baseObj.ctxId == XAMediaRecorderAdaptation )
- {
-
+ XAAdaptEvent event =
+ {
+ XA_NOKIAEXTVOLITFEVENTS, XA_ADAPT_VOLUME_MUTE_CHANGED, 1, 0
+ };
+ if (ctx)
+ {
+ event.data = &aMute;
+ XAAdaptationBase_SendAdaptEvents(ctx, &event);
+ }
}
- DEBUG_API("<-XANokiaVolumeExtItfAdapt_SetStereoPosition");
- return XA_RESULT_SUCCESS;
-}
-
-void XANokiaVolumeExtItfAdapt_MuteChange(XAAdaptationBaseCtx* ctx, XAboolean aMute)
-{
- XAAdaptEvent event = {XA_NOKIAEXTVOLITFEVENTS, XA_ADAPT_VOLUME_MUTE_CHANGED,1,0};
- if (ctx)
- {
- event.data = &aMute;
- XAAdaptationBase_SendAdaptEvents(ctx, &event );
- }
-}
-
--- a/khronosfws/openmax_al/src/mmf_adaptation/xanokiavolumeextitfadaptationmmf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xanokiavolumeextitfadaptationmmf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
#ifndef XANOKIAVOLUMEEXTITFADAPTATIONMMF_H
#define XANOKIAVOLUMEEXTITFADAPTATIONMMF_H
@@ -28,14 +28,16 @@
/* FUNCTIONS */
-XAresult XANokiaVolumeExtItfAdapt_SetMute(XAAdaptationMMFCtx *ctx, XAboolean mute);
+XAresult XANokiaVolumeExtItfAdapt_SetMute(XAAdaptationMMFCtx *ctx,
+ XAboolean mute);
-XAresult XANokiaVolumeExtItfAdapt_EnableStereoPosition(XAAdaptationMMFCtx *ctx,
- XAboolean enable);
+XAresult XANokiaVolumeExtItfAdapt_EnableStereoPosition(
+ XAAdaptationMMFCtx *ctx, XAboolean enable);
XAresult XANokiaVolumeExtItfAdapt_SetStereoPosition(XAAdaptationMMFCtx *ctx,
- XApermille stereoPosition);
+ XApermille stereoPosition);
-void XANokiaVolumeExtItfAdapt_MuteChange(XAAdaptationBaseCtx* ctx, XAboolean aMute);
+void XANokiaVolumeExtItfAdapt_MuteChange(XAAdaptationBaseCtx* ctx,
+ XAboolean aMute);
#endif /* XANOKIAVOLUMEEXTITFADAPTATIONMMF_H */
--- a/khronosfws/openmax_al/src/mmf_adaptation/xaplayitfadaptationmmf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xaplayitfadaptationmmf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,25 +1,26 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Play Itf Adapt MMF
+ *
+ */
#include "unistd.h"
#include "xamediaplayeradaptctxmmf.h"
#include "xaplayitfadaptationmmf.h"
#include "xaadaptationmmf.h"
#include "cmmfbackendengine.h"
+#include "cmmfradiobackendengine.h"
#include <glib.h>
extern XAboolean cameraRealized;
@@ -34,38 +35,65 @@
* XAuint32 state - Play state to be set
* @return XAresult ret - Success value
*/
-XAresult XAPlayItfAdaptMMF_SetPlayState(XAAdaptationBaseCtx *bCtx, XAuint32 state)
-{
+XAresult XAPlayItfAdaptMMF_SetPlayState(XAAdaptationBaseCtx *bCtx,
+ XAuint32 state)
+ {
XAresult ret = XA_RESULT_SUCCESS;
- XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+ XAMediaPlayerAdaptationMMFCtx* mCtx;
+ if (!bCtx)
+ {
+ ret = XA_RESULT_PARAMETER_INVALID;
+ return ret;
+ }
+
+ mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+
DEBUG_API_A1("->XAPlayItfAdaptMMF_SetPlayState %s",PLAYSTATENAME(state));
/* bCtx and parameter pointer validation happens in the calling function.
* We don't need to repeat it here*/
- switch ( state )
- {
- case XA_PLAYSTATE_STOPPED:
+ switch (state)
{
- ret = mmf_playitf_stop_playback(mCtx->mmfContext);
+ case XA_PLAYSTATE_STOPPED:
+ {
+ if (bCtx->ctxId == XARadioAdaptation)
+ {
+ mmf_set_player_adapt_context(cmmfradiobackendengine_init(),
+ bCtx);
+ stop_radio(cmmfradiobackendengine_init());
+ }
+ else
+ {
+ ret = mmf_playitf_stop_playback(mCtx->mmfContext);
+ }
break;
- }
+ }
case XA_PLAYSTATE_PAUSED:
ret = mmf_playitf_pause_playback(mCtx->mmfContext);
break;
case XA_PLAYSTATE_PLAYING:
- {
- ret = mmf_playitf_resume_playback(mCtx->mmfContext);
+ {
+ if (bCtx->ctxId == XARadioAdaptation)
+ {
+ mmf_set_player_adapt_context(cmmfradiobackendengine_init(),
+ bCtx);
+ play_radio(cmmfradiobackendengine_init());
+ }
+ else
+ {
+ ret = mmf_playitf_resume_playback(mCtx->mmfContext);
+ }
break;
- }
+ }
default:
ret = XA_RESULT_PARAMETER_INVALID;
break;
- }
+ }
DEBUG_API("<-XAPlayItfAdaptMMF_SetPlayState");
return ret;
-}
+ }
/*
* XAresult XAPlayItfAdaptMMF_GetPlayState(XAAdaptationBaseCtx *bCtx, XAuint32 *pState)
@@ -73,16 +101,24 @@
* XAuint32 *state - XAmillisecond *pMsec - Pointer where to store play state
* @return XAresult ret - Success value
*/
-XAresult XAPlayItfAdaptMMF_GetPlayState(XAAdaptationBaseCtx *bCtx, XAuint32 *pState)
+XAresult XAPlayItfAdaptMMF_GetPlayState(XAAdaptationBaseCtx *bCtx,
+ XAuint32 *pState)
{
XAresult ret = XA_RESULT_SUCCESS;
- XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+ XAMediaPlayerAdaptationMMFCtx* pSelf;
+ if (!bCtx || !pState)
+ {
+ ret = XA_RESULT_PARAMETER_INVALID;
+ return ret;
+ }
+
+ pSelf = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
DEBUG_API("->XAPlayItfAdaptMMF_GetPlayState");
/* If playhead reaches eof, state will transition to paused.
* This object does not have visibility to callback*/
- ret = mmf_playitf_get_play_state(mCtx->mmfContext, pState);
+ ret = mmf_playitf_get_play_state(pSelf->mmfContext, pState);
DEBUG_API("<-XAPlayItfAdaptMMF_GetPlayState");
return ret;
@@ -95,18 +131,26 @@
* XAmillisecond *pMsec - Pointer where to store duration of stream.
* @return XAresult ret - Success value
*/
-XAresult XAPlayItfAdaptMMF_GetDuration(XAAdaptationBaseCtx *bCtx, XAmillisecond *pMsec)
-{
+XAresult XAPlayItfAdaptMMF_GetDuration(XAAdaptationBaseCtx *bCtx,
+ XAmillisecond *pMsec)
+ {
XAresult ret = XA_RESULT_SUCCESS;
- XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+ XAMediaPlayerAdaptationMMFCtx* pSelf;
+ if (!bCtx || !pMsec)
+ {
+ ret = XA_RESULT_PARAMETER_INVALID;
+ return ret;
+ }
+
+ pSelf = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
DEBUG_API("->XAPlayItfAdaptMMF_GetDuration");
- ret = mmf_playitf_get_duration(mCtx->mmfContext, pMsec);
+ ret = mmf_playitf_get_duration(pSelf->mmfContext, pMsec);
DEBUG_API("<-XAPlayItfAdaptMMF_GetDuration");
return ret;
-}
+ }
/*
* XAresult XAPlayItfAdaptMMF_GetPosition(XAAdaptationBaseCtx *bCtx, XAmillisecond *pMsec)
@@ -114,100 +158,172 @@
* XAmillisecond *pMsec - Pointer where to store current position in stream.
* @return XAresult ret - Success value
*/
-XAresult XAPlayItfAdaptMMF_GetPosition(XAAdaptationBaseCtx *bCtx, XAmillisecond *pMsec)
-{
+XAresult XAPlayItfAdaptMMF_GetPosition(XAAdaptationBaseCtx *bCtx,
+ XAmillisecond *pMsec)
+ {
XAresult ret = XA_RESULT_SUCCESS;
- XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+ XAMediaPlayerAdaptationMMFCtx* pSelf;
+ if (!bCtx || !pMsec)
+ {
+ ret = XA_RESULT_PARAMETER_INVALID;
+ return ret;
+ }
+
+ pSelf = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
DEBUG_API("->XAPlayItfAdaptMMF_GetPosition");
- ret = mmf_playitf_get_position(mCtx->mmfContext, pMsec);
+ ret = mmf_playitf_get_position(pSelf->mmfContext, pMsec);
DEBUG_API("<-XAPlayItfAdaptMMF_GetPosition");
return ret;
-}
+ }
/*
* XAresult XAPlayItfAdaptMMF_RegisterCallback(XAAdaptationBaseCtx *bCtx, xaPlayCallback callback)
* Description: Sets the playback callback function.
*/
-XAresult XAPlayItfAdaptMMF_RegisterCallback(XAAdaptationBaseCtx *bCtx, xaPlayCallback callback)
-{
+XAresult XAPlayItfAdaptMMF_RegisterCallback(XAAdaptationBaseCtx *bCtx,
+ xaPlayCallback callback)
+ {
XAresult ret = XA_RESULT_SUCCESS;
- XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+ XAMediaPlayerAdaptationMMFCtx* pSelf;
+ if (!bCtx)
+ {
+ ret = XA_RESULT_PARAMETER_INVALID;
+ return ret;
+ }
+
+ pSelf = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
DEBUG_API("->XAPlayItfAdaptMMF_RegisterCallback");
- ret = mmf_playitf_register_callback(mCtx->mmfContext, callback);
+ ret = mmf_playitf_register_callback(pSelf->mmfContext, callback);
DEBUG_API("<-XAPlayItfAdaptMMF_RegisterCallback");
return ret;
-}
+ }
/**
* XAresult XAPlayItfAdaptMMF_SetCallbackEventsMask(XAAdaptationBaseCtx *bCtx, XAuint32 eventFlags)
* Description: Enables/disables notification of playback events.
**/
-XAresult XAPlayItfAdaptMMF_SetCallbackEventsMask(XAAdaptationBaseCtx *bCtx, XAuint32 eventFlags)
-{
+XAresult XAPlayItfAdaptMMF_SetCallbackEventsMask(XAAdaptationBaseCtx *bCtx,
+ XAuint32 eventFlags)
+ {
XAresult ret = XA_RESULT_SUCCESS;
- XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+ XAMediaPlayerAdaptationMMFCtx* pSelf;
+ if (!bCtx)
+ {
+ ret = XA_RESULT_PARAMETER_INVALID;
+ return ret;
+ }
+
+ pSelf = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
DEBUG_API("->XAPlayItfAdaptMMF_SetCallbackEventsMask");
- ret = mmf_playitf_set_callback_events_mask(mCtx->mmfContext, eventFlags);
+ ret = mmf_playitf_set_callback_events_mask(pSelf->mmfContext, eventFlags);
DEBUG_API("<-XAPlayItfAdaptMMF_SetCallbackEventsMask");
return ret;
-}
+ }
/**
* XAresult XAPlayItfAdaptMMF_SetMarkerPosition(XAAdaptationBaseCtx *bCtx, XAmillisecond mSec)
* Description: Sets marker position.
**/
-XAresult XAPlayItfAdaptMMF_SetMarkerPosition(XAAdaptationBaseCtx *bCtx, XAmillisecond mSec)
-{
+XAresult XAPlayItfAdaptMMF_SetMarkerPosition(XAAdaptationBaseCtx *bCtx,
+ XAmillisecond mSec)
+ {
XAresult ret = XA_RESULT_SUCCESS;
- XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+ XAMediaPlayerAdaptationMMFCtx* pSelf;
+ if (!bCtx)
+ {
+ ret = XA_RESULT_PARAMETER_INVALID;
+ return ret;
+ }
+
+ pSelf = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
DEBUG_API("->XAPlayItfAdaptMMF_SetMarkerPosition");
- ret = mmf_playitf_set_marker_position(mCtx->mmfContext, mSec);
+ ret = mmf_playitf_set_marker_position(pSelf->mmfContext, mSec);
DEBUG_API("<-XAPlayItfAdaptMMF_SetMarkerPosition");
return ret;
-}
+ }
/**
* XAresult XAPlayItfAdaptMMF_SetCallbackEventsMask(XAAdaptationBaseCtx *bCtx, XAuint32 eventFlags)
* Description: Clears marker position.
**/
XAresult XAPlayItfAdaptMMF_ClearMarkerPosition(XAAdaptationBaseCtx *bCtx)
-{
+ {
XAresult ret = XA_RESULT_SUCCESS;
- XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+ XAMediaPlayerAdaptationMMFCtx* pSelf;
+ if (!bCtx)
+ {
+ ret = XA_RESULT_PARAMETER_INVALID;
+ return ret;
+ }
+
+ pSelf = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
DEBUG_API("->XAPlayItfAdaptMMF_ClearMarkerPosition");
- ret = mmf_playitf_clear_marker_position(mCtx->mmfContext);
+ ret = mmf_playitf_clear_marker_position(pSelf->mmfContext);
DEBUG_API("<-XAPlayItfAdaptMMF_ClearMarkerPosition");
return ret;
-}
+ }
/**
* XAPlayItfAdaptMMF_SetPositionUpdatePeriod(XAAdaptationBaseCtx *bCtx, XAmillisecond mSec)
* Description: Sets position update period.
**/
-XAresult XAPlayItfAdaptMMF_SetPositionUpdatePeriod(XAAdaptationBaseCtx *bCtx, XAmillisecond mSec)
-{
+XAresult XAPlayItfAdaptMMF_SetPositionUpdatePeriod(XAAdaptationBaseCtx *bCtx,
+ XAmillisecond mSec)
+ {
XAresult ret = XA_RESULT_SUCCESS;
- XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+ XAMediaPlayerAdaptationMMFCtx* pSelf;
+ if (!bCtx)
+ {
+ ret = XA_RESULT_PARAMETER_INVALID;
+ return ret;
+ }
+
+ pSelf = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
DEBUG_API("->XAPlayItfAdaptMMF_SetPositionUpdatePeriod");
- ret = mmf_playitf_set_position_update_period(mCtx->mmfContext, mSec);
+ ret = mmf_playitf_set_position_update_period(pSelf->mmfContext, mSec);
DEBUG_API("<-XAPlayItfAdaptMMF_SetPositionUpdatePeriod");
return ret;
-}
+ }
+/*
+ * XAresult XAPlayItfAdapt_StateChange
+ * Handle callback from Radio utility
+ */
+void XAPlayItfAdaptMMF_StateChange(XAAdaptationBaseCtx *bCtx,
+ XAboolean playing)
+ {
+ if (playing)
+ {
+ XAAdaptEvent event =
+ {
+ XA_PLAYITFEVENTS, XA_PLAYEVENT_HEADMOVING, 1, 0
+ };
+ XAAdaptationBase_SendAdaptEvents(bCtx, &event);
+ }
+ else
+ {
+ XAAdaptEvent event =
+ {
+ XA_PLAYITFEVENTS, XA_PLAYEVENT_HEADSTALLED, 1, 0
+ };
+ XAAdaptationBase_SendAdaptEvents(bCtx, &event);
+ }
+
+ }
--- a/khronosfws/openmax_al/src/mmf_adaptation/xaplayitfadaptationmmf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xaplayitfadaptationmmf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,48 +1,53 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Play Itf Adaptation MMF Header
+ *
+ */
#ifndef XAPLAYITFADAPTATIONMMF_H
#define XAPLAYITFADAPTATIONMMF_H
#include "xaadaptationmmf.h"
-
#ifdef _DEBUG
/*parse state names for debug prints*/
static const char* playstatenamemmf[3] =
-{
- "XA_PLAYSTATE_STOPPED",
- "XA_PLAYSTATE_PAUSED",
- "XA_PLAYSTATE_PLAYING"
-};
-#define PLAYSTATENAME(i) (const char*)((i>0&&i<4)?playstatenamesmmf[i-1]:"INVALID")
+ {
+ "XA_PLAYSTATE_STOPPED", "XA_PLAYSTATE_PAUSED", "XA_PLAYSTATE_PLAYING"
+ };
+#define PLAYSTATENAME(i) (const char*)((i>0&&i<4)?playstatenamemmf[i-1]:"INVALID")
#endif /*_DEBUG*/
-
/* FUNCTIONS */
-XAresult XAPlayItfAdaptMMF_SetPlayState(XAAdaptationBaseCtx *bCtx, XAuint32 state);
-XAresult XAPlayItfAdaptMMF_GetPlayState(XAAdaptationBaseCtx *bCtx, XAuint32 *pState);
-XAresult XAPlayItfAdaptMMF_GetDuration(XAAdaptationBaseCtx *bCtx, XAmillisecond *pMsec);
-XAresult XAPlayItfAdaptMMF_GetPosition(XAAdaptationBaseCtx *bCtx, XAmillisecond *pMsec);
-XAresult XAPlayItfAdaptMMF_RegisterCallback(XAAdaptationBaseCtx *bCtx, xaPlayCallback callback);
-XAresult XAPlayItfAdaptMMF_SetCallbackEventsMask(XAAdaptationBaseCtx *bCtx, XAuint32 eventFlags);
-XAresult XAPlayItfAdaptMMF_SetMarkerPosition(XAAdaptationBaseCtx *bCtx, XAmillisecond mSec);
+XAresult XAPlayItfAdaptMMF_SetPlayState(XAAdaptationBaseCtx *bCtx,
+ XAuint32 state);
+XAresult XAPlayItfAdaptMMF_GetPlayState(XAAdaptationBaseCtx *bCtx,
+ XAuint32 *pState);
+XAresult XAPlayItfAdaptMMF_GetDuration(XAAdaptationBaseCtx *bCtx,
+ XAmillisecond *pMsec);
+XAresult XAPlayItfAdaptMMF_GetPosition(XAAdaptationBaseCtx *bCtx,
+ XAmillisecond *pMsec);
+XAresult XAPlayItfAdaptMMF_RegisterCallback(XAAdaptationBaseCtx *bCtx,
+ xaPlayCallback callback);
+XAresult XAPlayItfAdaptMMF_SetCallbackEventsMask(XAAdaptationBaseCtx *bCtx,
+ XAuint32 eventFlags);
+XAresult XAPlayItfAdaptMMF_SetMarkerPosition(XAAdaptationBaseCtx *bCtx,
+ XAmillisecond mSec);
XAresult XAPlayItfAdaptMMF_ClearMarkerPosition(XAAdaptationBaseCtx *bCtx);
-XAresult XAPlayItfAdaptMMF_SetPositionUpdatePeriod(XAAdaptationBaseCtx *bCtx, XAmillisecond mSec);
-
+XAresult XAPlayItfAdaptMMF_SetPositionUpdatePeriod(XAAdaptationBaseCtx *bCtx,
+ XAmillisecond mSec);
+void XAPlayItfAdaptMMF_StateChange(XAAdaptationBaseCtx *bCtx,
+ XAboolean playing);
#endif /* XAPLAYITFADAPTATIONMMF_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xaradioadaptctx.c Wed Jun 23 18:47:10 2010 +0300
@@ -0,0 +1,111 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "xaradioadaptctx.h"
+#include "xaadaptationmmf.h"
+#include "cmmfradiobackendengine.h"
+#include "assert.h"
+
+/*
+ * XAAdaptationMMFCtx* XARadioAdapt_Create()
+ * Allocates memory for Radio Adaptation Context and makes 1st phase initialization
+ * @returns XARadioAdaptationCtx* - Pointer to created context
+ */
+XAAdaptationBaseCtx* XARadioAdapt_Create()
+{
+ XARadioAdaptationCtx *pSelf = (XARadioAdaptationCtx*)calloc(1, sizeof(XARadioAdaptationCtx));
+ DEBUG_API("->XARadioAdapt_Create");
+
+ if ( pSelf)
+ {
+ if( XAAdaptationBase_Init(&(pSelf->baseObj.baseObj),XARadioAdaptation)
+ != XA_RESULT_SUCCESS )
+ {
+ DEBUG_ERR("Failed to init base context!!!");
+ free(pSelf);
+ pSelf = NULL;
+ }
+ else
+ {
+ pSelf->range = RADIO_DEFAULT_FREQ_RANGE;
+ pSelf->frequency = RADIO_DEFAULT_FREQ;
+ pSelf->rdsEmulationThread = 0;
+ pSelf->emulationThread = 0;
+ }
+ }
+
+ DEBUG_API("<-XARadioAdapt_Create");
+ return (XAAdaptationBaseCtx*)&pSelf->baseObj;
+}
+
+/*
+ * XAresult XARadioAdapt_PostInit()
+ * 2nd phase initialization of Radio Adaptation Context
+ */
+XAresult XARadioAdapt_PostInit(XAAdaptationBaseCtx* bCtx)
+{
+ XAresult ret = XA_RESULT_SUCCESS;
+ XARadioAdaptationCtx* ctx = NULL;
+ DEBUG_API("->XARadioAdapt_PostInit");
+ if(bCtx == NULL || bCtx->ctxId != XARadioAdaptation )
+ {
+ DEBUG_ERR("Invalid parameter!!");
+ DEBUG_API("<-XARadioAdapt_PostInit");
+ return XA_RESULT_PARAMETER_INVALID;
+ }
+ ctx = (XARadioAdaptationCtx*)bCtx;
+ assert(ctx);
+
+ ret = XAAdaptationBase_PostInit( &ctx->baseObj.baseObj );
+ if( ret!=XA_RESULT_SUCCESS )
+ {
+ DEBUG_ERR("Base context postinit failed!!");
+ DEBUG_API("<-XARadioAdapt_PostInit");
+ return ret;
+ }
+
+ cmmfradiobackendengine_init();
+
+ DEBUG_API("<-XARadioAdapt_PostInit");
+ return ret;
+}
+
+/*
+ * void XARadioAdapt_Destroy(XAAdaptationMMFCtx* bCtx)
+ * Destroys Radio Adaptation Context
+ * @param ctx - Radio Adaptation context to be destroyed
+ */
+void XARadioAdapt_Destroy(XAAdaptationBaseCtx* bCtx)
+{
+ XARadioAdaptationCtx* ctx = NULL;
+ DEBUG_API("->XARadioAdapt_Destroy");
+
+ cmmfradiobackendengine_delete(cmmfradiobackendengine_init());
+
+ if(bCtx == NULL || bCtx->ctxId != XARadioAdaptation )
+ {
+ DEBUG_ERR("Invalid parameter!!");
+ DEBUG_API("<-XARadioAdapt_Destroy");
+ return;
+ }
+ ctx = (XARadioAdaptationCtx*)bCtx;
+ XAAdaptationBase_Free(&(ctx->baseObj.baseObj));
+
+ free(ctx);
+
+ DEBUG_API("<-XARadioAdapt_Destroy");
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xaradioadaptctx.h Wed Jun 23 18:47:10 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef XARADIOADAPTCTX_H
+#define XARADIOADAPTCTX_H
+
+#include "xaadaptationmmf.h"
+
+
+#define RADIO_DEFAULT_FREQ_RANGE XA_FREQRANGE_FMEUROAMERICA
+#define RADIO_DEFAULT_FREQ 88000000
+
+/* TYPEDEFS */
+typedef struct XARadioAdaptationCtx_ XARadioAdaptationCtx;
+
+/* FUNCTIONS */
+XAAdaptationBaseCtx* XARadioAdapt_Create(void);
+XAresult XARadioAdapt_PostInit(XAAdaptationBaseCtx* bCtx);
+void XARadioAdapt_Destroy(XAAdaptationBaseCtx* bCtx);
+
+#endif /* XARADIOADAPTCTX_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xaradioitfadaptation.c Wed Jun 23 18:47:10 2010 +0300
@@ -0,0 +1,324 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <unistd.h>
+#include "xadebug.h"
+#include "xaadaptationmmf.h"
+#include "xaradioitfadaptation.h"
+#include "xaradioadaptctx.h"
+#include "cmmfradiobackendengine.h"
+
+/*
+ * XAresult XARadioItfAdapt_SetFreqRange(XAAdaptationMMFCtx *bCtx, XAuint8 range)
+ */
+XAresult XARadioItfAdapt_SetFreqRange(XAAdaptationMMFCtx *bCtx, XAuint8 range)
+{
+ XAresult ret = XA_RESULT_SUCCESS;
+ DEBUG_API("->XARadioItfAdapt_SetFreqRange");
+ mmf_set_radio_adapt_context(cmmfradiobackendengine_init(), bCtx);
+ set_freq_range(cmmfradiobackendengine_init(), range);
+ DEBUG_API("<-XARadioItfAdapt_SetFreqRange");
+ return ret;
+}
+
+/*
+ * XAresult XARadioItfAdapt_GetFreqRange(XAuint8 * pFreqRange)
+ *
+ */
+XAresult XARadioItfAdapt_GetFreqRange(XAuint8 * pFreqRange)
+{
+ XAresult res = XA_RESULT_SUCCESS;
+ DEBUG_API("->XARadioItfAdapt_GetFreqRange");
+ res = get_freq_range(cmmfradiobackendengine_init(), pFreqRange);
+ DEBUG_API("<-XARadioItfAdapt_GetFreqRange");
+ return res;
+}
+
+/*
+ * XAresult XARadioItfAdapt_IsFreqRangeSupported(XAuint8 range,
+ * XAboolean * pSupported)
+ */
+XAresult XARadioItfAdapt_IsFreqRangeSupported(XAuint8 range,
+ XAboolean * pSupported)
+{
+ XAresult ret = XA_RESULT_SUCCESS;
+ DEBUG_API("->XARadioItfAdapt_IsFreqRangeSupported");
+ *pSupported = XA_BOOLEAN_TRUE; // No radio utility API for this, set to true automatically.
+ DEBUG_API("<-XARadioItfAdapt_IsFreqRangeSupported");
+ return ret;
+}
+
+/*
+ * XAresult XARadioItfAdapt_GetFreqRangeProperties(XAAdaptationMMFCtx *bCtx,
+ * XAuint8 * pRange,
+ * XAuint32 * pMinFreq,
+ * XAuint32 * pMaxFreq)
+ */
+XAresult XARadioItfAdapt_GetFreqRangeProperties(XAAdaptationMMFCtx *bCtx,
+ XAuint8 range,
+ XAuint32 * pMinFreq,
+ XAuint32 * pMaxFreq)
+{
+ XAresult res = XA_RESULT_SUCCESS;
+ DEBUG_API("->XARadioItfAdapt_GetFreqRangeProperties");
+ mmf_set_radio_adapt_context(cmmfradiobackendengine_init(), bCtx);
+ res = get_freq_range_properties(cmmfradiobackendengine_init(), range, pMinFreq, pMaxFreq);
+ DEBUG_API("<-XARadioItfAdapt_GetFreqRangeProperties");
+ return res;
+}
+
+/*
+ * XAresult XARadioItfAdapt_SetFrequency(XAAdaptationMMFCtx *bCtx, XAuint32 freq)
+ */
+XAresult XARadioItfAdapt_SetFrequency(XAAdaptationMMFCtx *bCtx, XAuint32 freq)
+{
+ XAresult ret = XA_RESULT_SUCCESS;
+ DEBUG_API("->XARadioItfAdapt_SetFrequency");
+ mmf_set_radio_adapt_context(cmmfradiobackendengine_init(), bCtx);
+ set_frequency(cmmfradiobackendengine_init(), freq);
+ DEBUG_API("<-XARadioItfAdapt_SetFrequency");
+ return ret;
+}
+
+
+/*
+ * XAresult XARadioItfAdapt_GetFrequency(XAAdaptationMMFCtx *bCtx,
+ * XAuint32* pFrequency)
+ */
+XAresult XARadioItfAdapt_GetFrequency(XAuint32* pFrequency)
+{
+ XAresult ret = XA_RESULT_SUCCESS;
+ DEBUG_API("->XARadioItfAdapt_GetFrequency");
+ ret = get_frequency(cmmfradiobackendengine_init(), pFrequency);
+ DEBUG_API("<-XARadioItfAdapt_GetFrequency");
+ return ret;
+}
+
+
+/*
+ * XAresult XARadioItfAdapt_CancelSetFrequency()
+ */
+XAresult XARadioItfAdapt_CancelSetFrequency()
+{
+ XAresult ret = XA_RESULT_SUCCESS;
+ DEBUG_API("->XARadioItfAdapt_CancelSetFrequency");
+ cancel_set_frequency(cmmfradiobackendengine_init());
+ DEBUG_API("<-XARadioItfAdapt_CancelSetFrequency");
+ return ret;
+}
+
+/*
+ * XAresult XARadioItfAdapt_CancelStationSeek()
+ */
+XAresult XARadioItfAdapt_CancelStationSeek()
+{
+ XAresult ret = XA_RESULT_SUCCESS;
+ DEBUG_API("->XARadioItfAdapt_CancelStationSeek");
+ cancel_station_seek(cmmfradiobackendengine_init());
+ DEBUG_API("<-XARadioItfAdapt_CancelStationSeek");
+ return ret;
+}
+
+/*
+ * XAresult XARadioItfAdapt_SetSquelch(XAboolean squelch)
+ */
+XAresult XARadioItfAdapt_SetSquelch(XAboolean squelch)
+{
+ XAresult ret = XA_RESULT_FEATURE_UNSUPPORTED;
+ DEBUG_API("->XARadioItfAdapt_SetSquelch");
+ return ret;
+}
+
+/*
+ * XAresult XARadioItfAdapt_GetSquelch(XAboolean *squelch)
+ */
+XAresult XARadioItfAdapt_GetSquelch(XAboolean* squelch)
+{
+ XAresult ret = XA_RESULT_FEATURE_UNSUPPORTED;
+ DEBUG_API("->XARadioItfAdapt_GetSquelch");
+ return ret;
+}
+
+/*
+ * XAresult XARadioItfAdapt_SetStereoMode(XAAdaptationMMFCtx *bCtx, XAuint32 mode)
+ */
+XAresult XARadioItfAdapt_SetStereoMode(XAAdaptationMMFCtx *bCtx, XAuint32 mode)
+{
+ XAresult res = XA_RESULT_SUCCESS;
+ DEBUG_API("->XARadioItfAdapt_SetStereoMode");
+ mmf_set_radio_adapt_context(cmmfradiobackendengine_init(), bCtx);
+ res = set_stereo_mode(cmmfradiobackendengine_init(), mode);
+ DEBUG_API("<-XARadioItfAdapt_SetStereoMode");
+ return res;
+}
+
+/*
+ * XAresult XARadioItfAdapt_GetSignalStrength(XAuint32 * pStrength)
+ */
+XAresult XARadioItfAdapt_GetSignalStrength(XAuint32 * pStrength)
+{
+ XAresult ret = XA_RESULT_SUCCESS;
+ DEBUG_API("->XARadioItfAdapt_GetSignalStrength");
+ ret = get_signal_strength(cmmfradiobackendengine_init(), pStrength);
+ DEBUG_API("<-XARadioItfAdapt_GetSignalStrength");
+ return ret;
+}
+
+/*
+ * XAresult XARadioItfAdapt_Seek(XAAdaptationMMFCtx *bCtx, XAboolean upwards)
+ */
+XAresult XARadioItfAdapt_Seek(XAAdaptationMMFCtx *bCtx, XAboolean upwards)
+{
+ XAboolean direction;
+ XAresult ret = XA_RESULT_SUCCESS;
+ if (!upwards)
+ direction = XA_BOOLEAN_FALSE;
+ else
+ direction = XA_BOOLEAN_TRUE;
+ DEBUG_API("->XARadioItfAdapt_Seek");
+ mmf_set_radio_adapt_context(cmmfradiobackendengine_init(), bCtx);
+ station_seek(cmmfradiobackendengine_init(), direction);
+ DEBUG_API("<-XARadioItfAdapt_Seek");
+ return ret;
+}
+
+/*
+ * void XARadioItfAdapt_StopSeeking(XAAdaptationMMFCtx *bCtx)
+ */
+void XARadioItfAdapt_StopSeeking(XAAdaptationMMFCtx *bCtx)
+{
+ DEBUG_API("->XARadioItfAdapt_StopSeeking");
+ mmf_set_radio_adapt_context(cmmfradiobackendengine_init(), bCtx);
+ cancel_station_seek(cmmfradiobackendengine_init());
+ DEBUG_API("<-XARadioItfAdapt_StopSeeking");
+}
+
+/*
+ * XAresult XARadioItfAdapt_GetStereoMode(XAuint32 * pMode)
+ */
+XAresult XARadioItfAdapt_GetStereoMode(XAuint32 * pMode)
+{
+ XAresult ret = XA_RESULT_SUCCESS;
+ DEBUG_API("->XARadioItfAdapt_GetStereoMode");
+ ret = get_stereo_mode(cmmfradiobackendengine_init(), pMode);
+ DEBUG_API("<-XARadioItfAdapt_GetStereoMode");
+ return ret;
+}
+
+/*
+ * void XARadioItfAdapt_Free()
+ */
+void XARadioItfAdapt_Free()
+{
+ DEBUG_API("->XARadioItfAdapt_Free");
+
+}
+
+void XARadioItfAdapt_SeekComplete(XAAdaptationBaseCtx *ctx, TInt aError, TInt aFrequency)
+{
+ XAAdaptEvent event = {XA_RADIOITFEVENTS, XA_ADAPT_RADIO_SEEK_COMPLETE,1,0};
+ if (ctx)
+ {
+ if (aError)
+ {
+ event.data = &aError;
+ }
+ else
+ {
+ event.data = &aFrequency;
+ }
+
+ XAAdaptationBase_SendAdaptEvents(ctx, &event );
+ }
+}
+
+void XARadioItfAdapt_FrequencyChange(XAAdaptationBaseCtx *ctx, TInt aFrequency)
+{
+ // Currently: Bug in FM Radio Utility: SetFrequency calls this callback as well as SetFrequencyComplete
+ // (So client will end up getting 2 events on a SetFrequency call)
+ XAuint32 freq = aFrequency;
+ XAAdaptEvent event = {XA_RADIOITFEVENTS, XA_ADAPT_RADIO_FREQUENCY_CHANGED,1,0};
+ if (ctx)
+ {
+ event.data = &freq;
+ XAAdaptationBase_SendAdaptEvents(ctx, &event );
+ }
+}
+
+void XARadioItfAdapt_FrequencyRangeChange(XAAdaptationBaseCtx* ctx, TInt aFreqRangeChange)
+{
+ // Currently: Bug in FM Radio Utility: SetFrequencyRange triggers this callback as well as SetFrequencyRangeComplete
+
+ /* XAAdaptEvent event = {XA_RADIOITFEVENTS, XA_ADAPT_RADIO_FREQUENCY_RANGE_CHANGED,1,0};
+ if (baseCtx)
+ {
+ event.data = &aFreqRangeChange;
+ XAAdaptationBase_SendAdaptEvents(&baseCtx->baseObj, &event );
+ }
+ */
+}
+
+void XARadioItfAdapt_SetFrequencyComplete(XAAdaptationBaseCtx *ctx, TInt aError, TInt aFrequency)
+{
+ // Currently: Qt API has no event for SetFrequencyComplete, so must use this one:
+ XAAdaptEvent event = {XA_RADIOITFEVENTS, XA_ADAPT_RADIO_FREQUENCY_CHANGED,1,0};
+ XAuint32 freq = aFrequency;
+ if (ctx)
+ {
+ if (!aError)
+ {
+ event.data = &freq;
+ }
+ else
+ {
+ event.data = &aError;
+ }
+ XAAdaptationBase_SendAdaptEvents(ctx, &event );
+ }
+}
+
+void XARadioItfAdapt_SetFrequencyRangeComplete(XAAdaptationBaseCtx *ctx, TInt aError)
+{
+ XAAdaptEvent event = {XA_RADIOITFEVENTS, XA_ADAPT_RADIO_FREQUENCY_RANGE_CHANGED,1,0};
+ if (ctx)
+ {
+ event.data = &aError;
+ XAAdaptationBase_SendAdaptEvents(ctx, &event );
+ }
+}
+
+void XARadioItfAdapt_StereoStatusChange(XAAdaptationBaseCtx *ctx, XAboolean aStereoStatus)
+{
+ XAAdaptEvent event = {XA_RADIOITFEVENTS, XA_ADAPT_RADIO_STEREO_STATUS_CHANGED,1,0};
+ DEBUG_INFO_A1("XARadioItfAdapt_StereoStatusChange to: %s", aStereoStatus);
+ if (ctx)
+ {
+ event.data = &aStereoStatus;
+ XAAdaptationBase_SendAdaptEvents(ctx, &event );
+ }
+}
+
+void XARadioItfAdapt_SignalStrengthChange(XAAdaptationBaseCtx *ctx, TInt aSignalStrength)
+{
+ XAAdaptEvent event = {XA_RADIOITFEVENTS, XA_ADAPT_RADIO_SIGNAL_STRENGTH_CHANGED,1,0};
+ DEBUG_INFO_A1("XARadioItfAdapt_SignalStrengthChange to: %s", aSignalStrength);
+ if (ctx)
+ {
+ event.data = &aSignalStrength;
+ XAAdaptationBase_SendAdaptEvents(ctx, &event );
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xaradioitfadaptation.h Wed Jun 23 18:47:10 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef XARADIOITFFADAPTATION_H
+#define XARADIOITFFADAPTATION_H
+
+#include "xaadaptationmmf.h"
+#include "xadebug.h"
+
+/* FUNCTIONS */
+
+XAresult XARadioItfAdapt_SetFreqRange(XAAdaptationMMFCtx *bCtx, XAuint8 range);
+
+XAresult XARadioItfAdapt_GetFreqRange(XAuint8 * pFreqRange);
+
+XAresult XARadioItfAdapt_IsFreqRangeSupported(XAuint8 range,
+ XAboolean * pSupported);
+
+XAresult XARadioItfAdapt_GetFreqRangeProperties(XAAdaptationMMFCtx *bCtx,
+ XAuint8 range,
+ XAuint32 * pMinFreq,
+ XAuint32 * pMaxFreq);
+
+XAresult XARadioItfAdapt_SetFrequency(XAAdaptationMMFCtx *bCtx, XAuint32 freq);
+
+XAresult XARadioItfAdapt_GetFrequency(XAuint32 * pFrequency);
+
+XAresult XARadioItfAdapt_CancelSetFrequency(void);
+
+XAresult XARadioItfAdapt_CancelStationSeek(void);
+
+XAresult XARadioItfAdapt_SetSquelch(XAboolean squelch);
+
+XAresult XARadioItfAdapt_GetSquelch(XAboolean* squelch);
+
+XAresult XARadioItfAdapt_SetStereoMode(XAAdaptationMMFCtx *bCtx, XAuint32 mode);
+
+XAresult XARadioItfAdapt_GetSignalStrength(XAuint32 * pStrength);
+
+XAresult XARadioItfAdapt_Seek(XAAdaptationMMFCtx *bCtx, XAboolean upwards);
+
+void XARadioItfAdapt_StopSeeking(XAAdaptationMMFCtx *bCtx);
+
+void XARadioItfAdapt_Free(void);
+
+void XARadioItfAdapt_SeekComplete(XAAdaptationBaseCtx *ctx, TInt aError, TInt aFrequency);
+
+void XARadioItfAdapt_FrequencyChange(XAAdaptationBaseCtx *ctx, TInt aError);
+
+void XARadioItfAdapt_FrequencyRangeChange(XAAdaptationBaseCtx *ctx, TInt aFreqRangeChange);
+
+void XARadioItfAdapt_SetFrequencyComplete(XAAdaptationBaseCtx *ctx, TInt aError, TInt aFrequency);
+
+void XARadioItfAdapt_SetFrequencyRangeComplete(XAAdaptationBaseCtx *ctx, TInt aError);
+
+XAresult XARadioItfAdapt_GetStereoMode(XAuint32 * pMode);
+
+void XARadioItfAdapt_StereoStatusChange(XAAdaptationBaseCtx *ctx, XAboolean aStereoStatus);
+
+void XARadioItfAdapt_SignalStrengthChange(XAAdaptationBaseCtx *ctx, TInt aSignalStrength);
+
+#endif /* XARADIOITFADAPTATION_H */
--- a/khronosfws/openmax_al/src/mmf_adaptation/xarecorditfadaptationmmf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xarecorditfadaptationmmf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
#include "xamediarecorderadaptctxmmf.h"
#include "xarecorditfadaptationmmf.h"
@@ -28,88 +28,92 @@
* XAuint32 state - Record state to be set
* @return XAresult ret - Success value
*/
-XAresult XARecordItfAdaptMMF_SetRecordState(XAAdaptationMMFCtx *bCtx, XAuint32 state)
-{
+XAresult XARecordItfAdaptMMF_SetRecordState(XAAdaptationMMFCtx *bCtx,
+ XAuint32 state)
+ {
XAresult ret = XA_RESULT_SUCCESS;
int mmfretCode;
- XAAdaptEvent stalledevent = {XA_RECORDITFEVENTS, XA_RECORDEVENT_HEADSTALLED, 0, NULL};
+ XAAdaptEvent stalledevent =
+ {
+ XA_RECORDITFEVENTS, XA_RECORDEVENT_HEADSTALLED, 0, NULL
+ };
XAMediaRecorderAdaptationMMFCtx* mCtx = NULL;
DEBUG_API_A1("->XARecordItfAdaptMMF_SetRecordState %s",RECORDSTATENAME(state));
- if(!bCtx)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XARecordItfAdaptMMF_SetRecordState");
+ if (!bCtx)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XARecordItfAdaptMMF_SetRecordState");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
mCtx = (XAMediaRecorderAdaptationMMFCtx*) bCtx;
mCtx->isRecord = XA_BOOLEAN_TRUE;
- switch ( state )
- {
+ switch (state)
+ {
case XA_RECORDSTATE_STOPPED:
- {
- mmfretCode= mmf_stop_recording(mCtx->mmfContext, TRUE);
- if(mmfretCode != XA_RESULT_SUCCESS)
+ {
+ mmfretCode = mmf_stop_recording(mCtx->mmfContext, TRUE);
+ if (mmfretCode != XA_RESULT_SUCCESS)
{
ret = XA_RESULT_PARAMETER_INVALID;
}
break;
- }
+ }
case XA_RECORDSTATE_PAUSED:
- {
- mmfretCode = mmf_stop_recording(mCtx->mmfContext,FALSE);
- if(mmfretCode != XA_RESULT_SUCCESS)
+ {
+ mmfretCode = mmf_stop_recording(mCtx->mmfContext, FALSE);
+ if (mmfretCode != XA_RESULT_SUCCESS)
{
ret = XA_RESULT_PARAMETER_INVALID;
}
else
{
- XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &stalledevent );
+ XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj,
+ &stalledevent);
}
break;
- }
+ }
case XA_RECORDSTATE_RECORDING:
- {
+ {
mmfretCode = mmf_start_recording(mCtx->mmfContext);
- if(mmfretCode != XA_RESULT_SUCCESS)
+ if (mmfretCode != XA_RESULT_SUCCESS)
{
ret = XA_RESULT_PARAMETER_INVALID;
}
break;
- }
+ }
default:
- DEBUG_ERR("Unhandled state");
+ DEBUG_ERR("Unhandled state")
+ ;
ret = XA_RESULT_PARAMETER_INVALID;
break;
- }
+ }
- if( ret == XA_RESULT_SUCCESS )
- {
+ if (ret == XA_RESULT_SUCCESS)
+ {
mCtx->xaRecordState = state;
- }
-
+ }
DEBUG_API("<-XARecordItfAdaptMMF_SetRecordState %d");
return ret;
-}
+ }
/*
* XAresult XARecordItfAdapt_GetRecordState(XAAdaptationBaseCtx *bCtx, XAuint32 *state)
* Description: Return record state
*/
-XAresult XARecordItfAdaptMMF_GetRecordState(XAAdaptationMMFCtx *bCtx, XAuint32 *state)
-{
+XAresult XARecordItfAdaptMMF_GetRecordState(XAAdaptationMMFCtx *bCtx,
+ XAuint32 *state)
+ {
XAMediaRecorderAdaptationMMFCtx* mCtx = NULL;
DEBUG_API("->XARecordItfAdaptMMF_GetRecordState");
- if(!bCtx)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XARecordItfAdaptMMF_GetRecordState");
+ if (!bCtx)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XARecordItfAdaptMMF_GetRecordState");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
mCtx = (XAMediaRecorderAdaptationMMFCtx*) bCtx;
@@ -117,7 +121,7 @@
DEBUG_API("<-XARecordItfAdaptMMF_GetRecordState");
return XA_RESULT_SUCCESS;
-}
+ }
/*
* XAresult XARecordItfAdapt_GetPosition(XAAdaptationBaseCtx *ctx, AdaptationContextIDS ctxIDs, XAmillisecond *pMsec)
@@ -125,28 +129,29 @@
* XAmillisecond *pMsec - Pointer where to store current position in stream.
* @return XAresult ret - Success value
*/
-XAresult XARecordItfAdaptMMF_GetPosition(XAAdaptationMMFCtx *bCtx, XAmillisecond *pMsec)
-{
+XAresult XARecordItfAdaptMMF_GetPosition(XAAdaptationMMFCtx *bCtx,
+ XAmillisecond *pMsec)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAuint64 position;
XAMediaRecorderAdaptationMMFCtx* mCtx = NULL;
DEBUG_API("->XARecordItfAdaptMMF_GetPosition");
- if(!bCtx)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XARecordItfAdaptMMF_GetPosition");
+ if (!bCtx)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XARecordItfAdaptMMF_GetPosition");
/* invalid parameter */
- return XA_RESULT_PARAMETER_INVALID;
- }
+ ret = XA_RESULT_PARAMETER_INVALID;
+ return ret;
+ }
mCtx = (XAMediaRecorderAdaptationMMFCtx*) bCtx;
- mmf_get_record_position(mCtx->mmfContext, &position);
-
- *pMsec = (XAmillisecond)position;
-
+ ret = mmf_get_record_position(mCtx->mmfContext, &position);
+
+ *pMsec = (XAmillisecond) position;
+
DEBUG_API("<-XARecordItfAdaptMMF_GetPosition");
return ret;
-}
+ }
/*
* gboolean XARecordItfAdapt_PositionUpdate(gpointer ctx)
@@ -155,79 +160,84 @@
* @return false to stop periodic calls
*/
gboolean XARecordItfAdaptMMF_PositionUpdate(gpointer ctx, XAuint64 position)
-{
+ {
XAAdaptationMMFCtx *bCtx = (XAAdaptationMMFCtx*) ctx;
- XAMediaRecorderAdaptationMMFCtx* mCtx = (XAMediaRecorderAdaptationMMFCtx*) ctx;
- XAAdaptEvent event = {XA_RECORDITFEVENTS, XA_ADAPT_POSITION_UPDATE_EVT, 1, NULL};
+ XAMediaRecorderAdaptationMMFCtx* mCtx =
+ (XAMediaRecorderAdaptationMMFCtx*) ctx;
+ XAAdaptEvent event =
+ {
+ XA_RECORDITFEVENTS, XA_ADAPT_POSITION_UPDATE_EVT, 1, NULL
+ };
DEBUG_API("->XARecordItfAdapt_PositionUpdate");
- if( mCtx && mCtx->trackpositionenabled )
- {
+ if (mCtx && mCtx->trackpositionenabled)
+ {
XAmillisecond posInMsec = 0;
- {
- XARecordItfAdaptMMF_GetPosition(bCtx , &posInMsec);
+ {
+ XARecordItfAdaptMMF_GetPosition(bCtx, &posInMsec);
event.data = &posInMsec;
DEBUG_API_A1("XARecordItfAdapt_PositionUpdate: pos %lu ms", posInMsec);
- XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event );
+ XAAdaptationBase_SendAdaptEvents(&bCtx->baseObj, &event);
+ }DEBUG_API_A1("<-XARecordItfAdapt_PositionUpdate: %d", mCtx->runpositiontimer);
+ return (mCtx->runpositiontimer);
}
- DEBUG_API_A1("<-XARecordItfAdapt_PositionUpdate: %d", mCtx->runpositiontimer);
- return( mCtx->runpositiontimer );
- }
/* return false to stop timer */
return FALSE;
-}
+ }
/*
* XAresult XARecordItfAdapt_EnablePositionTracking
* Enable/disable periodic position tracking callbacks
*/
-XAresult XARecordItfAdaptMMF_EnablePositionTracking(XAAdaptationMMFCtx *bCtx, XAboolean enable)
-{
- XAMediaRecorderAdaptationMMFCtx* mCtx = (XAMediaRecorderAdaptationMMFCtx*) bCtx;
+XAresult XARecordItfAdaptMMF_EnablePositionTracking(XAAdaptationMMFCtx *bCtx,
+ XAboolean enable)
+ {
+ XAMediaRecorderAdaptationMMFCtx* mCtx =
+ (XAMediaRecorderAdaptationMMFCtx*) bCtx;
DEBUG_API_A1("->XARecordItfAdapt_EnablePositionTracking (enable: %lu)", enable);
- if(!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XARecordItfAdapt_EnablePositionTracking");
+ if (!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XARecordItfAdapt_EnablePositionTracking");
/* invalid parameter */
return XA_RESULT_PARAMETER_INVALID;
- }
-
+ }
/* create a timer to track position of playback */
- if(enable && !(mCtx->trackpositionenabled))
- {
+ if (enable && !(mCtx->trackpositionenabled))
+ {
mCtx->trackpositionenabled = XA_BOOLEAN_TRUE;
//mCtx->positionCb = &XARecordItfAdaptMMF_PositionUpdate;
- }
+ }
else if (!enable && (mCtx->trackpositionenabled))
- {
+ {
mCtx->trackpositionenabled = XA_BOOLEAN_FALSE;
- if(mCtx->runpositiontimer > 0)
- {
- mCtx->runpositiontimer=0;
+ if (mCtx->runpositiontimer > 0)
+ {
+ mCtx->runpositiontimer = 0;
+ }
}
- }
DEBUG_API("<-XARecordItfAdapt_EnablePositionTracking");
return XA_RESULT_SUCCESS;
-}
+ }
-XAresult XARecordItfAdaptMMF_SetPositionUpdatePeriod(XAAdaptationMMFCtx *bCtx, XAmillisecond pMsec)
+XAresult XARecordItfAdaptMMF_SetPositionUpdatePeriod(
+ XAAdaptationMMFCtx *bCtx, XAmillisecond pMsec)
{
- XAMediaRecorderAdaptationMMFCtx* mCtx = (XAMediaRecorderAdaptationMMFCtx*) bCtx;
+ XAresult ret = XA_RESULT_SUCCESS;
+ XAMediaRecorderAdaptationMMFCtx* mCtx =
+ (XAMediaRecorderAdaptationMMFCtx*) bCtx;
DEBUG_API_A1("->XARecordItfAdaptMMF_SetPositionUpdatePeriod (pMsec: %lu)", pMsec);
- if(!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
+ if (!bCtx || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation)
{
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("<-XARecordItfAdapt_EnablePositionTracking");
- /* invalid parameter */
- return XA_RESULT_PARAMETER_INVALID;
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("<-XARecordItfAdapt_EnablePositionTracking");
+ /* invalid parameter */
+ return XA_RESULT_PARAMETER_INVALID;
}
-
- mmf_set_record_position_update_period(mCtx->mmfContext, pMsec);
- return XA_RESULT_SUCCESS;
+
+ ret = mmf_set_record_position_update_period(mCtx->mmfContext, pMsec);
+ return ret;
}
--- a/khronosfws/openmax_al/src/mmf_adaptation/xarecorditfadaptationmmf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xarecorditfadaptationmmf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Record Itf adapt header
+ *
+ */
#ifndef XARECORDITFADAPTATIONMMF_H
#define XARECORDITFADAPTATIONMMF_H
@@ -22,28 +22,31 @@
#include "xadebug.h"
#include <glib.h>
-
#ifdef _DEBUG
/*parse state names for debug prints*/
static const char* recordstatenamesmmf[3] =
-{
- "XA_RECORDSTATE_STOPPED",
- "XA_RECORDSTATE_PAUSED",
- "XA_RECORDSTATE_RECORDING",
-};
+ {
+ "XA_RECORDSTATE_STOPPED",
+ "XA_RECORDSTATE_PAUSED",
+ "XA_RECORDSTATE_RECORDING",
+ };
#define RECORDSTATENAME(i) ((i>0&&i<4)?recordstatenamesmmf[i-1]:"INVALID")
#endif /*_DEBUG*/
/*forward declaration of position updater callback*/
gboolean XARecordItfAdaptMMF_PositionUpdate(gpointer ctx, XAuint64 position);
-
/* FUNCTIONS */
-XAresult XARecordItfAdaptMMF_SetRecordState(XAAdaptationMMFCtx *ctx, XAuint32 state );
-XAresult XARecordItfAdaptMMF_GetPosition( XAAdaptationMMFCtx *ctx, XAmillisecond *pMsec );
-XAresult XARecordItfAdaptMMF_GetRecordState(XAAdaptationMMFCtx *bCtx, XAuint32 *state);
-XAresult XARecordItfAdaptMMF_EnablePositionTracking(XAAdaptationMMFCtx *ctx, XAboolean enable);
-XAresult XARecordItfAdaptMMF_SetPositionUpdatePeriod(XAAdaptationMMFCtx *ctx, XAmillisecond pMsec);
+XAresult XARecordItfAdaptMMF_SetRecordState(XAAdaptationMMFCtx *ctx,
+ XAuint32 state);
+XAresult XARecordItfAdaptMMF_GetPosition(XAAdaptationMMFCtx *ctx,
+ XAmillisecond *pMsec);
+XAresult XARecordItfAdaptMMF_GetRecordState(XAAdaptationMMFCtx *bCtx,
+ XAuint32 *state);
+XAresult XARecordItfAdaptMMF_EnablePositionTracking(XAAdaptationMMFCtx *ctx,
+ XAboolean enable);
+XAresult XARecordItfAdaptMMF_SetPositionUpdatePeriod(XAAdaptationMMFCtx *ctx,
+ XAmillisecond pMsec);
#endif /* XARECORDITFADAPTATIONMMF_H */
--- a/khronosfws/openmax_al/src/mmf_adaptation/xaseekitfadaptationmmf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xaseekitfadaptationmmf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,25 +1,25 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Seek Itf Adaptation MMF
+ *
+ */
+#include <glib.h>
#include "unistd.h"
#include "xamediaplayeradaptctxmmf.h"
#include "xaseekitfadaptationmmf.h"
#include "cmmfbackendengine.h"
-#include <glib.h>
/*
* XAresult XAPlayItfAdaptMMF_SetPlayState(XAAdaptationBaseCtx *bCtx, XAuint32 state)
@@ -28,10 +28,12 @@
* XAuint32 state - Play state to be set
* @return XAresult ret - Success value
*/
-XAresult XASeekItfAdaptMMF_SetPosition(XAAdaptationBaseCtx *bCtx, XAmillisecond pos, XAuint32 seekMode)
-{
+XAresult XASeekItfAdaptMMF_SetPosition(XAAdaptationBaseCtx *bCtx,
+ XAmillisecond pos, XAuint32 seekMode)
+ {
XAresult ret = XA_RESULT_SUCCESS;
- XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
+ XAMediaPlayerAdaptationMMFCtx* mCtx =
+ (XAMediaPlayerAdaptationMMFCtx*) bCtx;
DEBUG_API("->XASeekItfAdaptMMF_SetPosition ");
ret = mmf_seekitf_set_position(mCtx->mmfContext, pos);
@@ -40,24 +42,23 @@
DEBUG_API("<-XASeekItfAdaptMMF_SetPosition");
return ret;
-}
+ }
-XAresult XASeekItfAdaptMMF_SetLoop(XAAdaptationBaseCtx *bCtx, XAboolean loopEnable,
- XAmillisecond startPos, XAmillisecond endPos)
+XAresult XASeekItfAdaptMMF_SetLoop(XAAdaptationBaseCtx *bCtx,
+ XAboolean loopEnable, XAmillisecond startPos, XAmillisecond endPos)
{
- XAresult ret = XA_RESULT_SUCCESS;
- XAMediaPlayerAdaptationMMFCtx* mCtx = (XAMediaPlayerAdaptationMMFCtx*) bCtx;
-
- DEBUG_API("->XASeekItfAdaptMMF_SetLoop ");
+ XAresult ret = XA_RESULT_SUCCESS;
+ XAMediaPlayerAdaptationMMFCtx* mCtx =
+ (XAMediaPlayerAdaptationMMFCtx*) bCtx;
- /* bCtx and parameter pointer validation happens in the calling function.
- * We don't need to repeat it here*/
- ret = mmf_seekitf_set_repeats(mCtx->mmfContext, loopEnable);
-
- ret = mmf_seekitf_set_playwindow(mCtx->mmfContext, startPos, endPos);
-
-
-
- DEBUG_API("<-XASeekItfAdaptMMF_SetLoop");
- return ret;
+ DEBUG_API("->XASeekItfAdaptMMF_SetLoop ");
+
+ /* bCtx and parameter pointer validation happens in the calling function.
+ * We don't need to repeat it here*/
+ ret = mmf_seekitf_set_repeats(mCtx->mmfContext, loopEnable);
+
+ ret = mmf_seekitf_set_playwindow(mCtx->mmfContext, startPos, endPos);
+
+ DEBUG_API("<-XASeekItfAdaptMMF_SetLoop");
+ return ret;
}
--- a/khronosfws/openmax_al/src/mmf_adaptation/xaseekitfadaptationmmf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xaseekitfadaptationmmf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,30 +1,30 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Seek Itf Adaptation Header
+ *
+ */
#ifndef XASEEKITFADAPTATIONMMF_H
#define XASEEKITFADAPTATIONMMF_H
#include "xaadaptationmmf.h"
-
/* FUNCTIONS */
-XAresult XASeekItfAdaptMMF_SetPosition(XAAdaptationBaseCtx *bCtx, XAmillisecond pos, XAuint32 seekMode);
-XAresult XASeekItfAdaptMMF_SetLoop(XAAdaptationBaseCtx *bCtx, XAboolean loopEnable,
- XAmillisecond startPos, XAmillisecond endPos);
+XAresult XASeekItfAdaptMMF_SetPosition(XAAdaptationBaseCtx *bCtx,
+ XAmillisecond pos, XAuint32 seekMode);
+XAresult XASeekItfAdaptMMF_SetLoop(XAAdaptationBaseCtx *bCtx,
+ XAboolean loopEnable, XAmillisecond startPos, XAmillisecond endPos);
#endif /* XASEEKITFADAPTATIONMMF_H */
--- a/khronosfws/openmax_al/src/mmf_adaptation/xastreaminformationitfadaptationmmf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xastreaminformationitfadaptationmmf.c Wed Jun 23 18:47:10 2010 +0300
@@ -1,20 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: StreamInfo Itf Adaptation MMF
+ *
+ */
#include "xadebug.h"
#include "xathreadsafety.h"
@@ -28,55 +27,51 @@
* XAMediaContainerInformation *info);
* Description: Obtains media container information
*/
-XAresult XAStreamInformationItfAdaptMMF_QueryMediaContainerInformation(
- XAAdaptationBaseCtx *adaptCtx,
- XAuint32 *containerType,
- XAmillisecond *mediaDuration,
- XAuint32 *numStreams)
-{
+XAresult XAStreamInformationItfAdaptMMF_QueryMediaContainerInformation(
+ XAAdaptationBaseCtx *adaptCtx, XAuint32 *containerType,
+ XAmillisecond *mediaDuration, XAuint32 *numStreams)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XADataSource *xaDataSource = NULL;
DEBUG_API("->XAStreamInformationItfAdaptMMF_QueryMediaContainerInformation");
/* Both Media Player and Metadata Extractor objec uses the same ctxId */
- if( !adaptCtx ||
- (adaptCtx->ctxId != XAMediaPlayerAdaptation) )
-/* !((adaptCtx->ctxId == XAMediaPlayerAdaptation) ||
- (adaptCtx->ctxId == XAMDAdaptation) ) )
-*/
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryMediaContainerInformation");
+ if (!adaptCtx || (adaptCtx->ctxId != XAMediaPlayerAdaptation))
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryMediaContainerInformation");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
/* Initialize to unspecified */
*containerType = XA_CONTAINERTYPE_UNSPECIFIED;
xaDataSource = ((XAMediaPlayerAdaptationMMFCtx*) adaptCtx)->xaSource;
-/* DEBUG_INFO("Obtained handle to xaDataSource");*/
- if ( xaDataSource &&
- xaDataSource->pFormat &&
- ( (*(XAuint32*)xaDataSource->pFormat ) == XA_DATAFORMAT_MIME) )
- {
- *containerType = ((XADataFormat_MIME*)(xaDataSource->pFormat))->containerType;
+ /* DEBUG_INFO("Obtained handle to xaDataSource");*/
+ if (xaDataSource && xaDataSource->pFormat
+ && ((*(XAuint32*) xaDataSource->pFormat) == XA_DATAFORMAT_MIME))
+ {
+ *containerType
+ = ((XADataFormat_MIME*) (xaDataSource->pFormat))->containerType;
DEBUG_INFO_A1("Container type obtained from xaDataSource->pFormat is [%u]", (unsigned int)(*containerType));
- }
+ }
else
- {
+ {
DEBUG_INFO("Container type unspecified");
- }
+ }
/* Get media duration */
ret = XAPlayItfAdaptMMF_GetDuration(adaptCtx, mediaDuration);
- if ( ret != XA_RESULT_SUCCESS )
+ if (ret != XA_RESULT_SUCCESS)
+ {
return ret;
+ }
- ret = mmf_streaminformationitf_get_numstreams(((XAMediaPlayerAdaptationMMFCtx*)adaptCtx)->mmfContext,
- numStreams);
+ ret = mmf_streaminformationitf_get_numstreams(
+ ((XAMediaPlayerAdaptationMMFCtx*) adaptCtx)->mmfContext,
+ numStreams);
DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryMediaContainerInformation");
return ret;
-}
+ }
/*
* XAresult XAStreamInformationItfAdaptMMF_QueryStreamType(
@@ -86,51 +81,55 @@
* Description: Obtains stream type information
*/
XAresult XAStreamInformationItfAdaptMMF_QueryStreamType(
- XAAdaptationBaseCtx *adaptCtx,
- XAuint32 streamIndex,
- XAuint32 *domain)
-{
+ XAAdaptationBaseCtx *adaptCtx, XAuint32 streamIndex, XAuint32 *domain)
+ {
XAresult ret;
XAuint32 numStreams;
XADataSource *xaDataSource = NULL;
+ if (!adaptCtx || !domain)
+ {
+ ret = XA_RESULT_PARAMETER_INVALID;
+ return ret;
+ }
DEBUG_API("->XAStreamInformationItfAdaptMMF_QueryStreamType");
- ret = mmf_streaminformationitf_get_numstreams(((XAMediaPlayerAdaptationMMFCtx*)adaptCtx)->mmfContext,
- &numStreams);
+ ret = mmf_streaminformationitf_get_numstreams(
+ ((XAMediaPlayerAdaptationMMFCtx*) adaptCtx)->mmfContext,
+ &numStreams);
if (ret != XA_RESULT_SUCCESS)
- {
- DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);
- DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamType");
+ {
+ DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamType");
return ret;
- }
+ }
/* validate stream index */
- if ( streamIndex > numStreams )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamType");
+ if (streamIndex > numStreams)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamType");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
/* if format type is raw image */
xaDataSource = ((XAMediaPlayerAdaptationMMFCtx*) adaptCtx)->xaSource;
- if( xaDataSource->pFormat &&
- ( (*(XAuint32*)xaDataSource->pFormat ) == XA_DATAFORMAT_RAWIMAGE) )
- {
+ if (xaDataSource && xaDataSource->pFormat
+ && ((*(XAuint32*) xaDataSource->pFormat)
+ == XA_DATAFORMAT_RAWIMAGE))
+ {
*domain = XA_DOMAINTYPE_IMAGE;
return XA_RESULT_SUCCESS;
- }
+ }
else
- {
- ret = mmf_streaminformationitf_get_streaminfo(((XAMediaPlayerAdaptationMMFCtx*)adaptCtx)->mmfContext,
- streamIndex,domain);
- }
+ {
+ ret = mmf_streaminformationitf_get_streaminfo(
+ ((XAMediaPlayerAdaptationMMFCtx*) adaptCtx)->mmfContext,
+ streamIndex, domain);
+ }
DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamType");
return ret;
-}
+ }
/*
* XAresult XAStreamInformationItfAdaptMMF_QueryStreamInformation(
@@ -140,10 +139,8 @@
* Description: Obtains stream information
*/
XAresult XAStreamInformationItfAdaptMMF_QueryStreamInformation(
- XAAdaptationBaseCtx *adaptCtx,
- XAuint32 streamIndex,
- void * info)
-{
+ XAAdaptationBaseCtx *adaptCtx, XAuint32 streamIndex, void * info)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAuint32 domain;
XAuint32 codecId;
@@ -155,31 +152,30 @@
XAuint32 height;
XAuint32 frameRate;
void* mmfctx;
-
- mmfctx = ((XAMediaPlayerAdaptationMMFCtx*)adaptCtx)->mmfContext;
-/* GstElement *codecbin = NULL;*/
+
+ if (!adaptCtx || !info)
+ {
+ ret = XA_RESULT_PARAMETER_INVALID;
+ return ret;
+ }
+
+ mmfctx = ((XAMediaPlayerAdaptationMMFCtx*) adaptCtx)->mmfContext;
DEBUG_API("->XAStreamInformationItfAdaptMMF_QueryStreamInformation");
/* stream index is validated in XAStreamInformationItfAdaptMMF_QueryStreamType */
- ret = XAStreamInformationItfAdaptMMF_QueryStreamType(
- adaptCtx, streamIndex, &domain);
+ ret = XAStreamInformationItfAdaptMMF_QueryStreamType(adaptCtx,
+ streamIndex, &domain);
if (ret != XA_RESULT_SUCCESS)
- {
+ {
DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);
DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamInformation");
return ret;
- }
- if ( domain == XA_DOMAINTYPE_UNKNOWN )
- {
- DEBUG_ERR("XA_RESULT_CONTENT_UNSUPPORTED");
- DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamInformation");
- return XA_RESULT_CONTENT_UNSUPPORTED;
- }
+ }
- switch(domain)
- {
+ switch (domain)
+ {
case XA_DOMAINTYPE_AUDIO:
DEBUG_INFO("Getting Audio Stream Info from Backend Engine");
ret = mmf_get_channels(mmfctx, &channels);
@@ -190,31 +186,35 @@
case XA_DOMAINTYPE_VIDEO:
DEBUG_INFO("Getting Video Stream Info from Backend Engine");
ret = mmf_get_bitrate(mmfctx, &bitRate);
- ret = mmf_get_codec_id(mmfctx, &codecId);
- ret = mmf_streaminformationitf_get_videoframesize(mmfctx, &height, &width, &frameRate);
+ ret = mmf_get_codec_id(mmfctx, &codecId);
+ ret = mmf_streaminformationitf_get_videoframesize(mmfctx,
+ &height, &width, &frameRate);
break;
case XA_DOMAINTYPE_IMAGE:
DEBUG_INFO("Getting Image Stream Info from SrcPad");
break;
default:
+ DEBUG_ERR("XA_RESULT_CONTENT_UNSUPPORTED");
+ DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamInformation");
+ ret = XA_RESULT_CONTENT_UNSUPPORTED;
break;
- };
+ };
-
- if ( ret == XA_RESULT_SUCCESS)
- {
+ if (ret == XA_RESULT_SUCCESS)
+ {
DEBUG_INFO("Getting media duration");
ret = XAPlayItfAdaptMMF_GetDuration(adaptCtx, &duration);
- }
+ }
/* Now assign properties to data structure */
- if ( ret == XA_RESULT_SUCCESS)
- {
- switch(domain)
+ if (ret == XA_RESULT_SUCCESS)
{
- case XA_DOMAINTYPE_AUDIO:
+ switch (domain)
{
- XAAudioStreamInformation* streamInfo = (XAAudioStreamInformation*)info;
+ case XA_DOMAINTYPE_AUDIO:
+ {
+ XAAudioStreamInformation* streamInfo =
+ (XAAudioStreamInformation*) info;
DEBUG_INFO("Assigning values for XAAudioStreamInformation");
streamInfo->codecId = codecId;
streamInfo->channels = channels;
@@ -222,11 +222,12 @@
streamInfo->bitRate = bitRate;
streamInfo->langCountry[0] = '\0';
streamInfo->duration = duration;
- }
+ }
break;
case XA_DOMAINTYPE_MIDI:
- {
- XAMIDIStreamInformation* streamInfo = (XAMIDIStreamInformation*)info;
+ {
+ XAMIDIStreamInformation* streamInfo =
+ (XAMIDIStreamInformation*) info;
DEBUG_INFO("Assigning values for XAMIDIStreamInformation");
/*currently there is no way to get these information from gstreamer*/
streamInfo->channels = XA_MIDI_UNKNOWN;
@@ -235,11 +236,12 @@
/*streamInfo->bitRate = 0;*/
streamInfo->langCountry[0] = '\0';
streamInfo->duration = duration;
- }
+ }
break;
case XA_DOMAINTYPE_VIDEO:
- {
- XAVideoStreamInformation* streamInfo = (XAVideoStreamInformation*)info;
+ {
+ XAVideoStreamInformation* streamInfo =
+ (XAVideoStreamInformation*) info;
DEBUG_INFO("Assigning values for XAVideoStreamInformation");
streamInfo->codecId = codecId;
streamInfo->width = width;
@@ -247,26 +249,27 @@
streamInfo->bitRate = bitRate;
streamInfo->duration = duration;
streamInfo->frameRate = frameRate;
- }
+ }
break;
case XA_DOMAINTYPE_IMAGE:
- {
- XAImageStreamInformation* streamInfo = (XAImageStreamInformation*)info;
+ {
+ XAImageStreamInformation* streamInfo =
+ (XAImageStreamInformation*) info;
DEBUG_INFO("Assigning values for XAImageStreamInformation");
streamInfo->codecId = codecId;
streamInfo->width = width;
streamInfo->height = height;
streamInfo->presentationDuration = duration;
- }
+ }
break;
default:
break;
- };
- } /*if ( ret == XA_RESULT_SUCCESS)*/
+ };
+ } /*if ( ret == XA_RESULT_SUCCESS)*/
DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamInformation");
return ret;
-}
+ }
/*
* XAresult XAStreamInformationItfAdaptMMF_QueryStreamName(
@@ -277,53 +280,49 @@
* Description: Obtains stream name
*/
XAresult XAStreamInformationItfAdaptMMF_QueryStreamName(
- XAAdaptationBaseCtx *adaptCtx,
- XAuint32 streamIndex,
- XAuint16 * pNameSize,
- XAchar * pName)
-{
+ XAAdaptationBaseCtx *adaptCtx, XAuint32 streamIndex,
+ XAuint16 * pNameSize, XAchar * pName)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAuint32 numStreams;
DEBUG_API("->XAStreamInformationItfAdaptMMF_QueryStreamName");
/* Both Media Player and Metadata Extractor objec uses the same ctxId */
- if( !adaptCtx ||
- (adaptCtx->ctxId != XAMediaPlayerAdaptation) )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamName");
+ if (!adaptCtx || !pNameSize || (adaptCtx->ctxId
+ != XAMediaPlayerAdaptation))
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamName");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
/* validate stream index */
- ret = mmf_streaminformationitf_get_numstreams(((XAMediaPlayerAdaptationMMFCtx*)adaptCtx)->mmfContext,
- &numStreams);
+ ret = mmf_streaminformationitf_get_numstreams(
+ ((XAMediaPlayerAdaptationMMFCtx*) adaptCtx)->mmfContext,
+ &numStreams);
if (ret != XA_RESULT_SUCCESS)
- {
- DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);
- DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamName");
+ {
+ DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamName");
return ret;
- }
+ }
/* validate stream index */
- if ( streamIndex > numStreams )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamName");
+ if (streamIndex > numStreams)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamName");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
/* TODO there is no straight way to retreive stream name from mmf*/
/*XAuint16 inputNameSize = *pNameSize;*/
*pNameSize = 0; /* Replace this with actual size*/
- if ( pName )
- {
- /* TODO copy stream name into pName taking into account inputNameSize */
- }
+ if (pName)
+ {
+ /* TODO copy stream name into pName taking into account inputNameSize */
+ }
DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryStreamName");
return ret;
-}
+ }
/*
* XAresult XAStreamInformationItfAdaptMMF_QueryActiveStreams(
@@ -332,59 +331,54 @@
* XAboolean *activeStreams);
* Description: Obtains active stream information
*/
- XAresult XAStreamInformationItfAdaptMMF_QueryActiveStreams(
- XAAdaptationBaseCtx *adaptCtx,
- XAuint32 *numStreams,
- XAboolean *activeStreams)
-{
+XAresult XAStreamInformationItfAdaptMMF_QueryActiveStreams(
+ XAAdaptationBaseCtx *adaptCtx, XAuint32 *numStreams,
+ XAboolean *activeStreams)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAuint32 inputNumStreams;
DEBUG_API("->XAStreamInformationItfAdaptMMF_QueryActiveStreams");
/* Both Media Player and Metadata Extractor objec uses the same ctxId */
- if( !adaptCtx ||
- (adaptCtx->ctxId != XAMediaPlayerAdaptation) )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryActiveStreams");
+ if (!adaptCtx || !numStreams || (adaptCtx->ctxId
+ != XAMediaPlayerAdaptation))
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryActiveStreams");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
- if( adaptCtx->ctxId == XAMDAdaptation)
- {
- DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
- DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryActiveStreams");
+ if (adaptCtx->ctxId == XAMDAdaptation)
+ {
+ DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryActiveStreams");
return XA_RESULT_PRECONDITIONS_VIOLATED;
- }
+ }
/* Determine number of streams */
- ret = mmf_streaminformationitf_get_numstreams(((XAMediaPlayerAdaptationMMFCtx*)adaptCtx)->mmfContext,
- &inputNumStreams);
+ ret = mmf_streaminformationitf_get_numstreams(
+ ((XAMediaPlayerAdaptationMMFCtx*) adaptCtx)->mmfContext,
+ &inputNumStreams);
if (ret != XA_RESULT_SUCCESS)
- {
- DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);
- DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryActiveStreams");
+ {
+ DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryActiveStreams");
return ret;
- }
+ }
- if ( activeStreams )
- {
+ if (activeStreams)
+ {
XAuint32 loopIndex;
if (*numStreams < inputNumStreams)
- {
- DEBUG_INFO("numStreams param value is smaller than number of streams");
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryActiveStreams");
+ {
+ DEBUG_INFO("numStreams param value is smaller than number of streams");DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryActiveStreams");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
for (loopIndex = 0; loopIndex < inputNumStreams; loopIndex++)
- {
+ {
/* TODO currently gstreamer doesn't allow multiple dynamic streams
* all streams are active streams */
activeStreams[loopIndex] = XA_BOOLEAN_TRUE;
+ }
}
- }
else
{
*numStreams = inputNumStreams;
@@ -392,61 +386,55 @@
DEBUG_API("->XAStreamInformationItfAdaptMMF_QueryActiveStreams");
return XA_RESULT_SUCCESS;
-}
+ }
XAresult XAStreamInformationItfAdaptMMF_SetActiveStream(
- XAAdaptationBaseCtx *adaptCtx,
- XAuint32 streamNum,
- XAboolean active,
- XAboolean commitNow)
-{
+ XAAdaptationBaseCtx *adaptCtx, XAuint32 streamNum, XAboolean active,
+ XAboolean commitNow)
+ {
XAresult ret = XA_RESULT_SUCCESS;
XAuint32 numStreams;
DEBUG_API("->XAStreamInformationItfAdaptMMF_SetActiveStream");
/* Both Media Player and Metadata Extractor objec uses the same ctxId */
- if( !adaptCtx ||
- (adaptCtx->ctxId != XAMediaPlayerAdaptation) )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("-<XAStreamInformationItfAdaptMMF_SetActiveStream");
+ if (!adaptCtx || (adaptCtx->ctxId != XAMediaPlayerAdaptation))
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("-<XAStreamInformationItfAdaptMMF_SetActiveStream");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
- if( adaptCtx->ctxId == XAMDAdaptation)
- {
- DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");
- DEBUG_API("-<XAStreamInformationItfAdaptMMF_SetActiveStream");
+ if (adaptCtx->ctxId == XAMDAdaptation)
+ {
+ DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED");DEBUG_API("-<XAStreamInformationItfAdaptMMF_SetActiveStream");
return XA_RESULT_PRECONDITIONS_VIOLATED;
- }
+ }
/* Determine number of streams */
- ret = mmf_streaminformationitf_get_numstreams(((XAMediaPlayerAdaptationMMFCtx*)adaptCtx)->mmfContext,
- &numStreams);
+ ret = mmf_streaminformationitf_get_numstreams(
+ ((XAMediaPlayerAdaptationMMFCtx*) adaptCtx)->mmfContext,
+ &numStreams);
if (ret != XA_RESULT_SUCCESS)
- {
- DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);
- DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryActiveStreams");
+ {
+ DEBUG_ERR_A1("XA_RESULT_[0x%x]", (unsigned int)ret);DEBUG_API("-<XAStreamInformationItfAdaptMMF_QueryActiveStreams");
return ret;
- }
+ }
/* validate stream index */
- if ( streamNum > numStreams )
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- DEBUG_API("-<XAStreamInformationItfAdaptMMF_SetActiveStream");
+ if (streamNum > numStreams)
+ {
+ DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");DEBUG_API("-<XAStreamInformationItfAdaptMMF_SetActiveStream");
return XA_RESULT_PARAMETER_INVALID;
- }
+ }
- if(commitNow)
+ if (commitNow)
{
- ret = mmf_streaminformationitf_set_activestream(((XAMediaPlayerAdaptationMMFCtx*)adaptCtx)->mmfContext,
- streamNum, active);
+ ret = mmf_streaminformationitf_set_activestream(
+ ((XAMediaPlayerAdaptationMMFCtx*) adaptCtx)->mmfContext,
+ streamNum, active);
}
DEBUG_API("->XAStreamInformationItfAdaptMMF_SetActiveStream");
return ret;
-}
+ }
-
--- a/khronosfws/openmax_al/src/mmf_adaptation/xastreaminformationitfadaptationmmf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xastreaminformationitfadaptationmmf.h Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: StreamInfo Itf Adaptation MMF header
+ *
+ */
#ifndef XASTREAMINFORMATIONITFADAPTATIONMMF_H
#define XASTREAMINFORMATIONITFADAPTATIONMMF_H
@@ -24,36 +24,26 @@
/* FUNCTIONS */
XAresult XAStreamInformationItfAdaptMMF_QueryMediaContainerInformation(
- XAAdaptationBaseCtx *adaptCtx,
- XAuint32 *containerType,
- XAmillisecond *mediaDuration,
- XAuint32 *numStreams);
+ XAAdaptationBaseCtx *adaptCtx, XAuint32 *containerType,
+ XAmillisecond *mediaDuration, XAuint32 *numStreams);
XAresult XAStreamInformationItfAdaptMMF_QueryStreamType(
- XAAdaptationBaseCtx *adaptCtx,
- XAuint32 streamIndex,
+ XAAdaptationBaseCtx *adaptCtx, XAuint32 streamIndex,
XAuint32 *domain);
XAresult XAStreamInformationItfAdaptMMF_QueryStreamInformation(
- XAAdaptationBaseCtx *adaptCtx,
- XAuint32 streamIndex,
- void * info);
+ XAAdaptationBaseCtx *adaptCtx, XAuint32 streamIndex, void * info);
XAresult XAStreamInformationItfAdaptMMF_QueryStreamName(
- XAAdaptationBaseCtx *adaptCtx,
- XAuint32 streamIndex,
- XAuint16 * pNameSize,
- XAchar * pName);
+ XAAdaptationBaseCtx *adaptCtx, XAuint32 streamIndex,
+ XAuint16 * pNameSize, XAchar * pName);
XAresult XAStreamInformationItfAdaptMMF_QueryActiveStreams(
- XAAdaptationBaseCtx *adaptCtx,
- XAuint32 *numStreams,
- XAboolean *activeStreams);
+ XAAdaptationBaseCtx *adaptCtx, XAuint32 *numStreams,
+ XAboolean *activeStreams);
XAresult XAStreamInformationItfAdaptMMF_SetActiveStream(
- XAAdaptationBaseCtx *adaptCtx,
- XAuint32 streamNum,
- XAboolean active,
- XAboolean commitNow);
+ XAAdaptationBaseCtx *adaptCtx, XAuint32 streamNum, XAboolean active,
+ XAboolean commitNow);
#endif /* XASTREAMINFORMATIONITFADAPTATION_H */
--- a/khronosfws/openmax_al/src/radio/xaradiodevice.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/radio/xaradiodevice.c Wed Jun 23 18:47:10 2010 +0300
@@ -42,8 +42,7 @@
/* XAResult XARadioDeviceImpl_Create
* Description: Create object
*/
-XAresult XARadioDeviceImpl_CreateRadioDevice(FrameworkMap* mapper,
- XAObjectItf* pDevice,
+XAresult XARadioDeviceImpl_CreateRadioDevice(XAObjectItf* pDevice,
XAuint32 numInterfaces,
const XAInterfaceID * pInterfaceIds,
const XAboolean * pInterfaceRequired)
@@ -120,25 +119,14 @@
}
}
}
-
- /* This code is put here to return Feature Not Supported since adaptation is not present*/
- /*************************************************/
- DEBUG_ERR("Required interface not found - abort creation!");
- XAObjectItfImpl_Destroy((XAObjectItf)&(pBaseObj));
- XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
- DEBUG_API("<-XARadioDeviceImpl_CreateRadioDevice");
- return XA_RESULT_FEATURE_UNSUPPORTED;
- /*************************************************/
-
-/* // Initialize XARadioDeviceImpl variables
- pImpl->adaptationCtx = XARadioAdapt_Create();
- //Set ObjectItf to point to newly created object
*pDevice = (XAObjectItf)&(pBaseObj->self);
+ pImpl->adaptationCtx = XARadioAdapt_Create();
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
+
DEBUG_API("<-XARadioDeviceImpl_Create");
- return XA_RESULT_SUCCESS;*/
+ return XA_RESULT_SUCCESS;
}
/* XAResult XARadioDeviceImpl_QueryNumSupportedInterfaces
--- a/khronosfws/openmax_al/src/radio/xaradioitf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/radio/xaradioitf.c Wed Jun 23 18:47:10 2010 +0300
@@ -19,11 +19,12 @@
#include <stdlib.h>
#include <assert.h>
#include <string.h>
+#include <xaradioitfext.h>
#include "xaradioitf.h"
-
#include "xaradioitfadaptation.h"
+#include "xathreadsafety.h"
-#include "xathreadsafety.h"
+#define FREQINTERVAL 20
/**
* XARadioItfImpl* GetImpl(XARadioItf self)
@@ -54,9 +55,7 @@
XAresult XARadioItfImpl_SetFreqRange(XARadioItf self, XAuint8 range)
{
XAresult ret = XA_RESULT_SUCCESS;
-
XAboolean isSupported = XA_BOOLEAN_FALSE;
-
XARadioItfImpl* impl = GetImpl(self);
DEBUG_API("->XARadioItfImpl_SetFreqRange");
@@ -72,15 +71,13 @@
return XA_RESULT_PARAMETER_INVALID;
}
-
- ret = XARadioItfAdapt_IsFreqRangeSupported((XAAdaptationGstCtx*)impl->adapCtx, range, &isSupported);
+ ret = XARadioItfAdapt_IsFreqRangeSupported(range, &isSupported);
if ( ret == XA_RESULT_SUCCESS && isSupported == XA_BOOLEAN_TRUE )
{
- ret = XARadioItfAdapt_SetFreqRange((XAAdaptationGstCtx*)impl->adapCtx, range);
+ ret = XARadioItfAdapt_SetFreqRange((XAAdaptationMMFCtx*)impl->adapCtx, range);
}
-
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARadioItfImpl_SetFreqRange");
return ret;
@@ -106,8 +103,7 @@
return XA_RESULT_PARAMETER_INVALID;
}
-
- ret = XARadioItfAdapt_GetFreqRange( (XAAdaptationGstCtx*)impl->adapCtx, pRange);
+ ret = XARadioItfAdapt_GetFreqRange(pRange);
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARadioItfImpl_GetFreqRange");
@@ -138,8 +134,7 @@
return XA_RESULT_PARAMETER_INVALID;
}
-
- ret = XARadioItfAdapt_IsFreqRangeSupported( (XAAdaptationGstCtx*)impl->adapCtx, range, pSupported );
+ ret = XARadioItfAdapt_IsFreqRangeSupported( range, pSupported );
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARadioItfImpl_IsFreqRangeSupported");
@@ -165,6 +160,9 @@
XAresult ret = XA_RESULT_SUCCESS;
XAboolean isSupported = XA_BOOLEAN_FALSE;
XARadioItfImpl* impl = GetImpl(self);
+
+ *pFreqInterval = FREQINTERVAL;
+
DEBUG_API("->XARadioItfImpl_GetFreqRangeProperties");
XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
@@ -176,8 +174,7 @@
DEBUG_API("<-XARadioItfImpl_GetFreqRangeProperties");
return XA_RESULT_PARAMETER_INVALID;
}
-
- ret = XARadioItfAdapt_IsFreqRangeSupported( (XAAdaptationGstCtx*)impl->adapCtx, range, &isSupported );
+ ret = XARadioItfAdapt_IsFreqRangeSupported( range, &isSupported );
if (isSupported != XA_BOOLEAN_TRUE || ret != XA_RESULT_SUCCESS)
{
@@ -187,10 +184,9 @@
DEBUG_API("<-XARadioItfImpl_GetFreqRangeProperties");
return XA_RESULT_PARAMETER_INVALID;
}
-
-
- ret = XARadioItfAdapt_GetFreqRangeProperties( (XAAdaptationGstCtx*)impl->adapCtx,
- range, pMinFreq, pMaxFreq, pFreqInterval );
+
+ ret = XARadioItfAdapt_GetFreqRangeProperties( (XAAdaptationMMFCtx*)impl->adapCtx,
+ range, pMinFreq, pMaxFreq );
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARadioItfImpl_GetFreqRangeProperties");
@@ -220,8 +216,7 @@
return XA_RESULT_PARAMETER_INVALID;
}
-
- ret = XARadioItfAdapt_SetFrequency( (XAAdaptationGstCtx*)impl->adapCtx, freq );
+ ret = XARadioItfAdapt_SetFrequency( (XAAdaptationMMFCtx*)impl->adapCtx, freq );
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARadioItfImpl_SetFrequency");
@@ -251,8 +246,7 @@
return XA_RESULT_PARAMETER_INVALID;
}
-
- ret = XARadioItfAdapt_CancelSetFrequency( (XAAdaptationGstCtx*)impl->adapCtx );
+ ret = XARadioItfAdapt_CancelSetFrequency();
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARadioItfImpl_CancelSetFrequency");
@@ -279,8 +273,7 @@
return XA_RESULT_PARAMETER_INVALID;
}
-
- ret = XARadioItfAdapt_GetFrequency( (XAAdaptationGstCtx*)impl->adapCtx, pFreq);
+ ret = XARadioItfAdapt_GetFrequency(pFreq);
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARadioItfImpl_GetFrequency");
@@ -309,9 +302,7 @@
if (impl->squelch != squelch)
{
-
- ret = XARadioItfAdapt_SetSquelch( (XAAdaptationGstCtx*)impl->adapCtx, squelch );
-
+ ret = XARadioItfAdapt_SetSquelch( squelch );
if ( ret == XA_RESULT_SUCCESS )
{
impl->squelch = squelch;
@@ -340,7 +331,7 @@
return XA_RESULT_PARAMETER_INVALID;
}
- *pSquelch = impl->squelch;
+ ret = XARadioItfAdapt_GetSquelch( pSquelch );
DEBUG_API("<-XARadioItfImpl_GetSquelch");
return ret;
@@ -357,7 +348,7 @@
DEBUG_API("->XARadioItfImpl_SetStereoMode");
XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio);
- if(!impl || mode > XA_STEREOMODE_AUTO )
+ if( !impl || mode > XA_STEREOMODE_AUTO )
{
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
/* invalid parameter */
@@ -365,18 +356,14 @@
DEBUG_API("<-XARadioItfImpl_SetStereoMode");
return XA_RESULT_PARAMETER_INVALID;
}
-
if ( impl->stereoMode != mode)
{
-
- ret = XARadioItfAdapt_SetStereoMode( (XAAdaptationGstCtx*)impl->adapCtx, mode );
-
- if ( ret == XA_RESULT_SUCCESS )
+ ret = XARadioItfAdapt_SetStereoMode( (XAAdaptationMMFCtx*)impl->adapCtx, mode );
+ if ( ret == XA_RESULT_SUCCESS )
{
- impl->stereoMode = mode;
+ impl->stereoMode = mode;
}
- }
-
+ }
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARadioItfImpl_SetStereoMode");
return ret;
@@ -400,7 +387,7 @@
return XA_RESULT_PARAMETER_INVALID;
}
- *pMode = impl->stereoMode;
+ ret = XARadioItfAdapt_GetStereoMode( pMode );
DEBUG_API("<-XARadioItfImpl_GetStereoMode");
return ret;
@@ -426,8 +413,7 @@
return XA_RESULT_PARAMETER_INVALID;
}
-
- ret = XARadioItfAdapt_GetSignalStrength( (XAAdaptationGstCtx*)impl->adapCtx, pStrength );
+ ret = XARadioItfAdapt_GetSignalStrength( pStrength );
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARadioItfImpl_GetSignalStrength");
@@ -458,8 +444,7 @@
return XA_RESULT_PARAMETER_INVALID;
}
-
- ret = XARadioItfAdapt_Seek( (XAAdaptationGstCtx*)impl->adapCtx, upwards );
+ ret = XARadioItfAdapt_Seek( (XAAdaptationMMFCtx*)impl->adapCtx, upwards );
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARadioItfImpl_Seek");
@@ -488,8 +473,7 @@
return XA_RESULT_PARAMETER_INVALID;
}
-
- ret = XARadioItfAdapt_StopSeeking( (XAAdaptationGstCtx*)impl->adapCtx );
+ XARadioItfAdapt_StopSeeking( (XAAdaptationMMFCtx*)impl->adapCtx );
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARadioItfImpl_StopSeeking");
@@ -502,21 +486,10 @@
**/
XAresult XARadioItfImpl_GetNumberOfPresets(XARadioItf self, XAuint32 * pNumPresets)
{
- XAresult ret = XA_RESULT_SUCCESS;
- XARadioItfImpl* impl = GetImpl(self);
+ XAresult ret = XA_RESULT_FEATURE_UNSUPPORTED;
+
DEBUG_API("->XARadioItfImpl_GetNumberOfPresets");
- if(!impl || !pNumPresets)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- /* invalid parameter */
- DEBUG_API("<-XARadioItfImpl_GetNumberOfPresets");
- return XA_RESULT_PARAMETER_INVALID;
- }
-
- *pNumPresets = impl->numOfPresets;
-
- DEBUG_API("<-XARadioItfImpl_GetNumberOfPresets");
return ret;
}
@@ -536,60 +509,8 @@
XAuint32 mode,
const XAchar * name)
{
- XAresult ret = XA_RESULT_SUCCESS;
- XAboolean supported = XA_BOOLEAN_FALSE;
- XAuint32 minFreq = 0;
- XAuint32 maxFreq = 0;
- XAuint32 freqInterval = 0;
-
- XARadioItfImpl* impl = GetImpl(self);
- DEBUG_API("->XARadioItfImpl_SetPreset");
+ XAresult ret = XA_RESULT_FEATURE_UNSUPPORTED;
- if(!impl || !name)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- /* invalid parameter */
- DEBUG_API("<-XARadioItfImpl_SetPreset");
- return XA_RESULT_PARAMETER_INVALID;
- }
- ret = (*self)->IsFreqRangeSupported(self, range, &supported);
- if(supported != XA_BOOLEAN_TRUE || ret != XA_RESULT_SUCCESS)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- /* invalid range */
- DEBUG_API("<-XARadioItfImpl_SetPreset");
- return XA_RESULT_PARAMETER_INVALID;
- }
- ret = (*self)->GetFreqRangeProperties(self, range, &minFreq, &maxFreq, &freqInterval);
- if (freq < minFreq || freq > maxFreq || ((freq-minFreq)%freqInterval != 0) ||
- ret != XA_RESULT_SUCCESS)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- /* invalid freq */
- DEBUG_API("<-XARadioItfImpl_SetPreset");
- return XA_RESULT_PARAMETER_INVALID;
- }
- if (preset < 1 || preset >= impl->numOfPresets ||
- mode > XA_STEREOMODE_AUTO ||
- strlen((char*)name) > RADIO_PRESET_NAME_MAX_LENGTH)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- /* invalid preset, name or mode*/
- DEBUG_API("<-XARadioItfImpl_SetPreset");
- return XA_RESULT_PARAMETER_INVALID;
- }
-
-
-
- free(impl->presets[preset].name);
-
- impl->presets[preset].freq = freq;
- impl->presets[preset].range = range;
- impl->presets[preset].stereoMode = mode;
- impl->presets[preset].name = calloc(1, RADIO_PRESET_NAME_MAX_LENGTH+1);
- strncpy( impl->presets[preset].name, (char*)name, RADIO_PRESET_NAME_MAX_LENGTH );
-
- DEBUG_API("<-XARadioItfImpl_SetPreset");
return ret;
}
@@ -611,45 +532,8 @@
XAchar * pName,
XAuint16 * pNameLength)
{
- /* Supporting CT tester the API signature is newer, but API functionality reflects required spec version.
- Implement newer specification in terms of handling pName and pNameLength*/
- XAresult ret = XA_RESULT_SUCCESS;
- XARadioItfImpl* impl = GetImpl(self);
- DEBUG_API("->XARadioItfImpl_GetPreset");
-
- if(!impl || !pFreq || !pRange || !pMode || !pNameLength)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- /* invalid parameter */
- DEBUG_API("<-XARadioItfImpl_GetPreset");
- return XA_RESULT_PARAMETER_INVALID;
- }
- if (pName)
- {
- if(preset < 1 || preset > impl->numOfPresets)
- {
- DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
- /* invalid parameter */
- DEBUG_API("<-XARadioItfImpl_GetPreset");
- return XA_RESULT_PARAMETER_INVALID;
- }
-
- *pFreq = impl->presets[preset].freq;
- *pRange = impl->presets[preset].range;
- *pMode = impl->presets[preset].stereoMode;
- if(*pNameLength<RADIO_PRESET_NAME_MAX_LENGTH)
- {
- strncpy( (char*)pName, impl->presets[preset].name, *pNameLength );
- ret = XA_RESULT_BUFFER_INSUFFICIENT;
- }
- else
- {
- strncpy( (char*)pName, impl->presets[preset].name, RADIO_PRESET_NAME_MAX_LENGTH );
- }
-
- }
- /*Just adding some meaninful value, when supporting new spec this must be fetch the system*/
- *pNameLength = RADIO_PRESET_NAME_MAX_LENGTH;
+
+ XAresult ret = XA_RESULT_FEATURE_UNSUPPORTED;
DEBUG_API("<-XARadioItfImpl_GetPreset");
return ret;
@@ -695,7 +579,6 @@
**/
XARadioItfImpl* XARadioItfImpl_Create(XAAdaptationBaseCtx *adapCtx)
{
- XAuint16 index = 0;
XARadioItfImpl *self = (XARadioItfImpl*)
calloc(1,sizeof(XARadioItfImpl));
@@ -719,32 +602,15 @@
self->itf.GetSignalStrength = XARadioItfImpl_GetSignalStrength;
self->itf.Seek = XARadioItfImpl_Seek;
self->itf.StopSeeking = XARadioItfImpl_StopSeeking;
- self->itf.GetNumberOfPresets = XARadioItfImpl_GetNumberOfPresets;
- self->itf.SetPreset = XARadioItfImpl_SetPreset;
- self->itf.GetPreset = XARadioItfImpl_GetPreset;
self->itf.RegisterRadioCallback = XARadioItfImpl_RegisterRadioCallback;
/* init variables */
self->squelch = XA_BOOLEAN_FALSE;
self->stereoMode = RADIO_DEFAULT_STEREO_MODE;
-
- self->preset = 0;
- self->numOfPresets = RADIO_NUM_OF_PRESETS;
-
- for (index = 0; index < self->numOfPresets; index++)
- {
- self->presets[index].freq = RADIO_DEFAULT_FREQ;
- self->presets[index].range = RADIO_DEFAULT_FREQ_RANGE;
- self->presets[index].stereoMode = RADIO_DEFAULT_STEREO_MODE;
- self->presets[index].name = calloc(1, RADIO_PRESET_NAME_MAX_LENGTH+1);
- strncpy( self->presets[index].name, RadioPresetDefaultName, RADIO_PRESET_NAME_MAX_LENGTH );
- }
-
self->callback = NULL;
self->context = NULL;
self->cbPtrToSelf = NULL;
-
self->adapCtx = adapCtx;
XAAdaptationBase_AddEventHandler( adapCtx, &XARadioItfImpl_AdaptCb, XA_RADIOITFEVENTS, self );
@@ -762,20 +628,11 @@
**/
void XARadioItfImpl_Free(XARadioItfImpl* self)
{
- XAuint16 index = 0;
DEBUG_API("->XARadioItfImpl_Free");
XA_IMPL_THREAD_SAFETY_ENTRY_FOR_VOID_FUNCTIONS(XATSRadio);
-
-
XAAdaptationBase_RemoveEventHandler( self->adapCtx, &XARadioItfImpl_AdaptCb );
- XARadioItfAdapt_Free(self->adapCtx);
-
- for (index = 0; index < self->numOfPresets; index++)
- {
- free(self->presets[index].name);
- }
-
+ XARadioItfAdapt_Free();
assert(self==self->self);
free(self);
@@ -789,6 +646,9 @@
void XARadioItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event )
{
XARadioItfImpl* impl =(XARadioItfImpl*)pHandlerCtx;
+ XAuint32 eventData = 0;
+ XAboolean eventBoolean = XA_BOOLEAN_FALSE;
+
DEBUG_API("->XARadioItfimpl_AdaptCb");
if(!impl)
@@ -801,19 +661,37 @@
if( event->eventid == XA_ADAPT_RADIO_FREQUENCY_CHANGED && impl->callback )
{
- DEBUG_API("Frequency changed in adaptation");
- impl->callback( impl->cbPtrToSelf, impl->context, XA_RADIO_EVENT_FREQUENCY_CHANGED, 0, XA_BOOLEAN_FALSE );
+ DEBUG_API("Frequency changed in adaptation");
+ eventData = *(XAuint32*)event->data;
+ impl->callback( impl->cbPtrToSelf, impl->context, XA_RADIO_EVENT_FREQUENCY_CHANGED, eventData, eventBoolean );
}
+
else if( event->eventid == XA_ADAPT_RADIO_FREQUENCY_RANGE_CHANGED && impl->callback )
{
DEBUG_API("Frequency range changed in adaptation");
- impl->callback( impl->cbPtrToSelf, impl->context, XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED, 0, XA_BOOLEAN_FALSE );
+
+ impl->callback( impl->cbPtrToSelf, impl->context, XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED, eventData, eventBoolean );
}
+
else if( event->eventid == XA_ADAPT_RADIO_SEEK_COMPLETE && impl->callback )
{
DEBUG_API("Seek complete in adaptation");
- impl->callback( impl->cbPtrToSelf, impl->context, XA_RADIO_EVENT_SEEK_COMPLETED, 0, XA_BOOLEAN_FALSE );
+ eventBoolean = *(XAboolean*)event->data;
+ impl->callback( impl->cbPtrToSelf, impl->context, XA_RADIO_EVENT_SEEK_COMPLETED, eventData, eventBoolean );
}
+
+ else if( event->eventid == XA_ADAPT_RADIO_STEREO_STATUS_CHANGED && impl->callback )
+ {
+ DEBUG_API("Stereo status change in adaptation");
+ eventBoolean = *(XAboolean*)event->data;
+ impl->callback( impl->cbPtrToSelf, impl->context, XA_RADIO_EVENT_STEREO_STATUS_CHANGED, eventData, eventBoolean );
+ }
+
+ else if( event->eventid == XA_ADAPT_RADIO_SIGNAL_STRENGTH_CHANGED && impl->callback )
+ {
+ DEBUG_API("Signal Strength Change in adaptation");
+ impl->callback( impl->cbPtrToSelf, impl->context, XA_RADIO_EVENT_SIGNAL_STRENGTH_CHANGED, eventData, eventBoolean );
+ }
else
{
/* do nothing */
@@ -821,4 +699,3 @@
DEBUG_API("<-XARadioItfimpl_AdaptCb");
}
-
--- a/khronosfws/openmax_al/src/radio/xaradioitf.h Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/radio/xaradioitf.h Wed Jun 23 18:47:10 2010 +0300
@@ -22,15 +22,13 @@
#include "xaradioitfadaptation.h"
/** MACROS **/
-#define RADIO_PRESET_NAME_MAX_LENGTH 20
-
+#define RADIO_DEFAULT_STEREO_MODE 2
+#define RADIO_NUM_OF_PRESETS 20
/** TYPES **/
/** ENUMERATIONS **/
/** STRUCTURES **/
-
-/* Definition of radio preset */
typedef struct RadioPreset_
{
XAuint32 freq;
@@ -39,6 +37,7 @@
char* name;
} RadioPreset;
+
/* Definition of XAEqualizerItf implementation */
typedef struct XARadioItfImpl_
{
@@ -51,14 +50,13 @@
XAboolean squelch;
XAuint32 stereoMode;
- XAuint32 preset;
- XAuint32 numOfPresets;
-
- RadioPreset presets[RADIO_NUM_OF_PRESETS];
-
XARadioItf cbPtrToSelf;
xaRadioCallback callback;
void *context;
+ XAuint32 preset;
+ XAuint32 numOfPresets;
+
+ RadioPreset presets[RADIO_NUM_OF_PRESETS];
/*Adaptation variables*/
XAAdaptationBaseCtx *adapCtx;
@@ -101,6 +99,10 @@
XAresult XARadioItfImpl_StopSeeking(XARadioItf self);
+XAresult XARadioItfImpl_RegisterRadioCallback(XARadioItf self,
+ xaRadioCallback callback,
+ void * pContext);
+
XAresult XARadioItfImpl_GetNumberOfPresets(XARadioItf self, XAuint32 * pNumPresets);
XAresult XARadioItfImpl_SetPreset(XARadioItf self,
@@ -116,11 +118,7 @@
XAuint8 * pRange,
XAuint32 * pMode,
XAchar * pName,
- XAuint16 * pNameLength);
-
-XAresult XARadioItfImpl_RegisterRadioCallback(XARadioItf self,
- xaRadioCallback callback,
- void * pContext);
+ XAuint16 * pNameLength);
/* XARadioItfImpl -specific methods */
XARadioItfImpl* XARadioItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
@@ -128,4 +126,5 @@
void XARadioItfImpl_Free(XARadioItfImpl* self);
+
#endif /* XARADIOITF_H */
--- a/khronosfws/openmax_al/src/radio/xardsitf.c Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/radio/xardsitf.c Wed Jun 23 18:47:10 2010 +0300
@@ -63,7 +63,7 @@
}
- ret = XARDSItfAdapt_QueryRDSSignal((XAAdaptationGstCtx*)impl->adapCtx, isSignal);
+// ret = XARDSItfAdapt_QueryRDSSignal((XAAdaptationGstCtx*)impl->adapCtx, isSignal);
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARDSItfImpl_QueryRDSSignal");
@@ -88,7 +88,7 @@
}
- ret = XARDSItfAdapt_GetProgrammeServiceName((XAAdaptationGstCtx*)impl->adapCtx, ps);
+// ret = XARDSItfAdapt_GetProgrammeServiceName((XAAdaptationGstCtx*)impl->adapCtx, ps);
DEBUG_API("<-XARDSItfImpl_GetProgrammeServiceName");
return ret;
@@ -115,7 +115,7 @@
}
- ret = XARDSItfAdapt_GetRadioText((XAAdaptationGstCtx*)impl->adapCtx, rt);
+// ret = XARDSItfAdapt_GetRadioText((XAAdaptationGstCtx*)impl->adapCtx, rt);
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARDSItfImpl_GetRadioText");
@@ -153,8 +153,8 @@
}
- ret = XARDSItfAdapt_GetRadioTextPlus((XAAdaptationGstCtx*)impl->adapCtx, contentType, informationElement,
- descriptor, descriptorContentType);
+ // ret = XARDSItfAdapt_GetRadioTextPlus((XAAdaptationGstCtx*)impl->adapCtx, contentType, informationElement,
+ // descriptor, descriptorContentType);
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARDSItfImpl_GetRadioTextPlus");
@@ -183,7 +183,7 @@
}
- ret = XARDSItfAdapt_GetProgrammeType((XAAdaptationGstCtx*)impl->adapCtx, pty);
+// ret = XARDSItfAdapt_GetProgrammeType((XAAdaptationGstCtx*)impl->adapCtx, pty);
DEBUG_API("<-XARDSItfImpl_GetProgrammeType");
return ret;
@@ -217,7 +217,7 @@
}
- ret = XARDSItfAdapt_GetProgrammeTypeString((XAAdaptationGstCtx*)impl->adapCtx, isLengthMax16, pty);
+// ret = XARDSItfAdapt_GetProgrammeTypeString((XAAdaptationGstCtx*)impl->adapCtx, isLengthMax16, pty);
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARDSItfImpl_GetProgrammeTypeString");
@@ -248,7 +248,7 @@
}
- ret = XARDSItfAdapt_GetProgrammeIdentificationCode((XAAdaptationGstCtx*)impl->adapCtx, pi);
+// ret = XARDSItfAdapt_GetProgrammeIdentificationCode((XAAdaptationGstCtx*)impl->adapCtx, pi);
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARDSItfImpl_GetProgrammeIdentificationCode");
@@ -276,7 +276,7 @@
}
- ret = XARDSItfAdapt_GetClockTime((XAAdaptationGstCtx*)impl->adapCtx, dateAndTime);
+ // ret = XARDSItfAdapt_GetClockTime((XAAdaptationGstCtx*)impl->adapCtx, dateAndTime);
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARDSItfImpl_GetClockTime");
@@ -304,7 +304,7 @@
}
- ret = XARDSItfAdapt_GetTrafficAnnouncement((XAAdaptationGstCtx*)impl->adapCtx, ta);
+// ret = XARDSItfAdapt_GetTrafficAnnouncement((XAAdaptationGstCtx*)impl->adapCtx, ta);
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARDSItfImpl_GetTrafficAnnouncement");
@@ -332,7 +332,7 @@
}
- ret = XARDSItfAdapt_GetTrafficProgramme((XAAdaptationGstCtx*)impl->adapCtx, tp);
+// ret = XARDSItfAdapt_GetTrafficProgramme((XAAdaptationGstCtx*)impl->adapCtx, tp);
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARDSItfImpl_GetTrafficProgramme");
@@ -369,7 +369,7 @@
}
- ret = XARDSItfAdapt_SeekByProgrammeType((XAAdaptationGstCtx*)impl->adapCtx, pty, upwards);
+ // ret = XARDSItfAdapt_SeekByProgrammeType((XAAdaptationGstCtx*)impl->adapCtx, pty, upwards);
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARDSItfImpl_SeekByProgrammeType");
@@ -402,7 +402,7 @@
}
- ret = XARDSItfAdapt_SeekTrafficAnnouncement((XAAdaptationGstCtx*)impl->adapCtx, upwards);
+ // ret = XARDSItfAdapt_SeekTrafficAnnouncement((XAAdaptationGstCtx*)impl->adapCtx, upwards);
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARDSItfImpl_SeekTrafficAnnouncement");
@@ -435,7 +435,7 @@
}
- ret = XARDSItfAdapt_SeekTrafficProgramme((XAAdaptationGstCtx*)impl->adapCtx, upwards);
+ // ret = XARDSItfAdapt_SeekTrafficProgramme((XAAdaptationGstCtx*)impl->adapCtx, upwards);
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARDSItfImpl_SeekTrafficProgramme");
@@ -465,7 +465,7 @@
}
- ret = XARDSItfAdapt_SetAutomaticSwitching((XAAdaptationGstCtx*)impl->adapCtx, automatic);
+ // ret = XARDSItfAdapt_SetAutomaticSwitching((XAAdaptationGstCtx*)impl->adapCtx, automatic);
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARDSItfImpl_SetAutomaticSwitching");
@@ -493,7 +493,7 @@
}
- ret = XARDSItfAdapt_GetAutomaticSwitching((XAAdaptationGstCtx*)impl->adapCtx, automatic);
+// ret = XARDSItfAdapt_GetAutomaticSwitching((XAAdaptationGstCtx*)impl->adapCtx, automatic);
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARDSItfImpl_GetAutomaticSwitching");
@@ -522,7 +522,7 @@
}
- ret = XARDSItfAdapt_SetAutomaticTrafficAnnouncement((XAAdaptationGstCtx*)impl->adapCtx, automatic);
+// ret = XARDSItfAdapt_SetAutomaticTrafficAnnouncement((XAAdaptationGstCtx*)impl->adapCtx, automatic);
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARDSItfImpl_SetAutomaticTrafficAnnouncement");
@@ -552,7 +552,7 @@
}
- ret = XARDSItfAdapt_GetAutomaticTrafficAnnouncement((XAAdaptationGstCtx*)impl->adapCtx, automatic);
+ // ret = XARDSItfAdapt_GetAutomaticTrafficAnnouncement((XAAdaptationGstCtx*)impl->adapCtx, automatic);
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARDSItfImpl_GetAutomaticTrafficAnnouncement");
@@ -597,7 +597,7 @@
if (callback)
{
- ret = XARDSItfAdapt_GetODAGroup((XAAdaptationGstCtx*)impl->adapCtx, AID);
+ // ret = XARDSItfAdapt_GetODAGroup((XAAdaptationGstCtx*)impl->adapCtx, AID);
}
@@ -635,7 +635,7 @@
}
- ret = XARDSItfAdapt_SubscribeODAGroup((XAAdaptationGstCtx*)impl->adapCtx, group, useErrorCorrection);
+// ret = XARDSItfAdapt_SubscribeODAGroup((XAAdaptationGstCtx*)impl->adapCtx, group, useErrorCorrection);
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARDSItfImpl_SubscribeODAGroup");
@@ -667,7 +667,7 @@
}
- ret = XARDSItfAdapt_UnsubscribeODAGroup((XAAdaptationGstCtx*)impl->adapCtx, group);
+ // ret = XARDSItfAdapt_UnsubscribeODAGroup((XAAdaptationGstCtx*)impl->adapCtx, group);
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARDSItfImpl_UnsubscribeODAGroup");
@@ -699,7 +699,7 @@
}
- XARDSItfAdapt_ListODAGroupSubscriptions((XAAdaptationGstCtx*)impl->adapCtx, pGroups, pLength);
+// XARDSItfAdapt_ListODAGroupSubscriptions((XAAdaptationGstCtx*)impl->adapCtx, pGroups, pLength);
XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio);
DEBUG_API("<-XARDSItfImpl_ListODAGroupSubscriptions");
--- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/AdvancedAudioController/Inc/AdvancedAudioPlayController.h Thu May 27 13:20:50 2010 +0300
+++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/AdvancedAudioController/Inc/AdvancedAudioPlayController.h Wed Jun 23 18:47:10 2010 +0300
@@ -832,7 +832,7 @@
// sets the repeat count and trailing silence timer value supplied by the client
TInt DoSetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence);
// handles the loop play of seekable and non-seekable sources
- void DoRepeat();
+ void DoRepeatL();
TBool IsLoopPlayEnabled() const;
public: // Functions from base classes (MTrailingSilenceObserver)
@@ -976,6 +976,7 @@
mutable CActiveSchedulerWait* iWait;
mutable CActiveSchedulerWait* iBlockSetPos;
+ mutable CActiveSchedulerWait* iBlockPrime;
TUint32 iPlayStartTime;
TUint32 iZeroTime;
--- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/AdvancedAudioController/Src/AdvancedAudioPlayController.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/AdvancedAudioController/Src/AdvancedAudioPlayController.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -123,6 +123,8 @@
delete iDataSourceAdapter;
delete iWait;
delete iBlockSetPos;
+ delete iBlockPrime;
+
iSharedBuffers.ResetAndDestroy();
iSharedBuffers.Close();
DP0(_L("CAdvancedAudioPlayController::~CAdvancedAudioPlayController end"));
@@ -679,7 +681,13 @@
iBlockSetPos->AsyncStop();
}
}
-
+ if(iBlockPrime)
+ {
+ if(iBlockPrime->IsStarted())
+ {
+ iBlockPrime->AsyncStop();
+ }
+ }
iRequestState = EPaused;
TRAP(err, DoPauseL(ETrue)); // this is a preemption pause
// In case of pre-emption we should only Pause ... but not Stop.
@@ -986,11 +994,6 @@
{
DP0(_L("CAdvancedAudioPlayController::RemoveDataSinkL"));
- if (!iDataSink)
- {
- User::Leave(KErrNotReady);
- }
-
if (iDataSink != &aDataSink)
{
User::Leave(KErrArgument);
@@ -1000,9 +1003,12 @@
{
User::Leave(KErrNotReady);
}
-
- iDataSink->SinkStopL(); // should always stop source before logoff
- iDataSink->SinkThreadLogoff();
+
+ if (iDataSink)
+ {
+ iDataSink->SinkStopL(); // should always stop source before logoff
+ iDataSink->SinkThreadLogoff();
+ }
// dereference Decoder from Utility before deleting AudioOutput (which took ownership of decoder)
if (iAudioUtility)
@@ -1010,8 +1016,8 @@
iAudioUtility->DeReferenceDecoder();
}
- delete iAudioOutput;
- iAudioOutput = NULL;
+ delete iAudioOutput;
+ iAudioOutput = NULL;
iDataSink = NULL;
iDecoderExists = EFalse;
}
@@ -1025,7 +1031,12 @@
DP0(_L("CAdvancedAudioPlayController::ResetL"));
RemoveDataSourceL(*iDataSource);
- RemoveDataSinkL(*iDataSink);
+
+ if (iDataSink)
+ {
+ DP0(_L("CAdvancedAudioPlayController::ResetL, calling RemoveDataSinkL"));
+ RemoveDataSinkL(*iDataSink);
+ }
}
// -----------------------------------------------------------------------------
@@ -1349,6 +1360,21 @@
{// we got preempted during a seek
// we're already seeking to a position. When we get there we'll come here again, but handle it below
DP0(_L("CAdvancedAudioPlayController::DoPauseL got a preemption during seek"));
+
+ // if we are seeking, we need to flush the devsound buffers regardless of loop play
+ DP0(_L("CAdvancedAudioPlayController::DoPauseL AudioOutput->StopL()"));
+ iAudioOutput->StopL();
+
+ if (iPlayingForInitPos)
+ {
+ iState = EInitialized;
+ }
+ else
+ {
+ iState = EPaused;
+ }
+ iPlayingForPauseSeek = EFalse;
+ iPlayingForInitPos = EFalse;
return;
}
@@ -1613,7 +1639,11 @@
iBlockSetPos->AsyncStop();
}
}
-
+ if(iBlockPrime)
+ {
+ if(iBlockPrime->IsStarted())
+ iBlockPrime->AsyncStop();
+ }
iPlayingForDuration = EFalse;
iBlockDuration = EFalse;
iPlayingForPauseSeek = EFalse;
@@ -1702,11 +1732,17 @@
case EInitializing:
if (position != 0)
{ // if we are priming, we will already be ready to play from 0.
- DP2(_L("CAdvancedAudioPlayController::SetPositionL, saving pos iReadHeader[%d] iState[%d]"),iReadHeader,iState);
- iInitPosition = position;
+ DP2(_L("CAdvancedAudioPlayController::SetPositionL, saving pos iReadHeader[%d] iState[%d]"),iReadHeader,iState);
+ iInitPosition = position;
}
- DP0(_L("CAdvancedAudioPlayController::SetPositionL, can ignore"));
- break;
+ DP0(_L("CAdvancedAudioPlayController::SetPositionL, can ignore"));
+ DP0(_L("CAdvancedAudioController::PrimeL() blocking"));
+ iBlockPrime= new (ELeave) CActiveSchedulerWait();
+ iBlockPrime->Start();
+ DP0(_L("CAdvancedAudioController::PrimeL() continuing"));
+ delete iBlockPrime;
+ iBlockPrime= NULL;
+
case EInitialized:
case EPaused:
iSavedSetPosition = position;
@@ -1881,6 +1917,14 @@
return;
}
iState = EInitialized;
+ if(iBlockPrime)
+ {
+ if(iBlockPrime->IsStarted())
+ {
+ iBlockPrime->AsyncStop();
+ }
+ }
+
// when playwindow is active for a non-seekable source during loop play
// we must seek to the playwindow start position and then start the playback
if (iPlayWindowStartPosition > 0) // do we need additional checks as loop play / non-seekable source ??
@@ -1907,7 +1951,7 @@
}
else
{
- // This is needed for non-seekable sources as DoRepeat() calls DoInitialize in this case
+ // This is needed for non-seekable sources as DoRepeatL() calls DoInitialize in this case
// this resets the source to read from 0 and sets the iState to EInitializing.
// BufferFilled will not read the header again, change state to EInitialized and seek to the iInitPosition.
// The next BufferFilled will come here, where we will continue playback from byte position 0
@@ -2409,20 +2453,20 @@
DP0(_L("CAdvancedAudioPlayController::LastBufferSent End"));
}
-void CAdvancedAudioPlayController::DoRepeat()
+void CAdvancedAudioPlayController::DoRepeatL()
{
- DP0(_L("CAdvancedAudioPlayController::DoRepeat Begin"));
+ DP0(_L("CAdvancedAudioPlayController::DoRepeatL Begin"));
// save the current position, this will be used to calculate the position in loop play when
// client calls for PositionL() or Pause() operations
// TODO: need to check this position when loop play is going on in a play window
iSavedTimePositionInMicroSecs = iAudioOutput->CalculateAudioOutputPositionL();
- DP1(_L("CAdvancedAudioPlayController::DoRepeat iSavedTimePositionInMicroSecs[%u]"), iSavedTimePositionInMicroSecs);
+ DP1(_L("CAdvancedAudioPlayController::DoRepeatL iSavedTimePositionInMicroSecs[%u]"), iSavedTimePositionInMicroSecs);
if ((!iRepeatForever) && (iCurrentRepeatCount < iRepeatCount))
{
iCurrentRepeatCount++;
}
- DP1(_L("CAdvancedAudioPlayController::DoRepeat Number of times played till now = %d"), iCurrentRepeatCount);
+ DP1(_L("CAdvancedAudioPlayController::DoRepeatL Number of times played till now = %d"), iCurrentRepeatCount);
if (iSourceIsTimeSeekable || iSourceIsPosSeekable)
{ // For seekable source
@@ -2431,25 +2475,25 @@
// SetPlayWindow(iPlayWindowStartPosition, iPlayWindowEndPosition);
if (iPlayWindowStartPosition > 0)
{
- DP1(_L("CAdvancedAudioPlayController::DoRepeat SetPositionL[%d]ms"), I64LOW(iPlayWindowStartPosition.Int64()/1000));
+ DP1(_L("CAdvancedAudioPlayController::DoRepeatL SetPositionL[%d]ms"), I64LOW(iPlayWindowStartPosition.Int64()/1000));
SetPositionL(iPlayWindowStartPosition);
}
else
{
- DP0(_L("CAdvancedAudioPlayController::DoRepeat SetPositionL(0)"));
+ DP0(_L("CAdvancedAudioPlayController::DoRepeatL SetPositionL(0)"));
SetPositionL(0);
}
// Register for PlayWindow end position as the FrameTable has set its playwindowendpostime to zero
if (iPlayWindowEndPosition > 0)
{
- DP1(_L("CAdvancedAudioPlayController::DoRepeat iAudioUtility->SetPlayWindowEndTimeMs(%d)"), I64LOW(iPlayWindowEndPosition.Int64()/1000));
+ DP1(_L("CAdvancedAudioPlayController::DoRepeatL iAudioUtility->SetPlayWindowEndTimeMs(%d)"), I64LOW(iPlayWindowEndPosition.Int64()/1000));
iAudioUtility->SetPlayWindowEndTimeMs(iPlayWindowEndPosition.Int64() / 1000);
}
}
else
{ // For non-seekable source
// Stop and start playback
- DP0(_L("CAdvancedAudioPlayController::DoRepeat Non-Seekable source."));
+ DP0(_L("CAdvancedAudioPlayController::DoRepeatL Non-Seekable source."));
iAudioOutput->StopL(EFalse);
iDataSourceAdapter->SourceStopL(); // clear the buffers in the source before seeking and priming it
DoInitializeL();
@@ -2457,13 +2501,19 @@
// and the current position is adjusted to be placed after the header.
iReadHeader = ETrue;
}
- DP0(_L("CAdvancedAudioPlayController::DoRepeat End") );
+ DP0(_L("CAdvancedAudioPlayController::DoRepeatL End") );
}
EXPORT_C void CAdvancedAudioPlayController::TrailingSilenceTimerComplete()
{
DP0(_L("CAdvancedAudioPlayController::TrailingSilenceTimerComplete "));
- DoRepeat();
+
+ TRAPD(err,DoRepeatL()); //Fix for Bug ECWG-84WE9J
+ DP1(_L("CAdvancedAudioPlayController::TrailingSilenceTimerComplete: DoRepeatL [%d]"), err);
+ if(err)
+ {
+ SendEventToClient(TMMFEvent(KMMFEventCategoryPlaybackComplete,err));
+ }
}
EXPORT_C TInt CAdvancedAudioPlayController::GetCodecConfigData(RArray<TInt>& aCodecConfigData)
--- a/mmfenh/advancedaudiocontroller/audiotonecontrollerplugin/src/mmfaudiotonecontroller.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmfenh/advancedaudiocontroller/audiotonecontrollerplugin/src/mmfaudiotonecontroller.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -114,6 +114,7 @@
void CMMFAudioToneController::ConstructL()
{
iSourceAndSinkAdded = EFalse;
+ iDataSink = NULL;
// Construct custom command parsers
CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
@@ -138,7 +139,15 @@
{
User::LeaveIfError(iFactory->CreateAudioOutputControlUtility(iAudioOutputControlUtility));
}
-//end drm cr
+ //end drm cr
+
+
+ //For Error : Update s60 tone controller to update the DRM rights
+ CMMFDRMCustomCommandParser* drmParser = CMMFDRMCustomCommandParser::NewL(*this);
+ CleanupStack::PushL(drmParser);
+ AddCustomCommandParserL(*drmParser);
+ CleanupStack::Pop(drmParser);
+
// [ assert the invariant now that we are constructed ]
__ASSERT_ALWAYS( Invariant(), Panic( EStateNotConstructed));
}
@@ -235,6 +244,9 @@
//Only support playing to audio output
if (aSink.DataSinkType() != KUidMmfAudioOutput)
User::Leave( KErrNotSupported );
+
+
+ iDataSink = &aSink;
iMMFDevSound = CMMFDevSound::NewL();
@@ -280,6 +292,22 @@
User::Leave(err);
}
}
+
+ //For Error : Update s60 tone controller to update the DRM rights
+ if (iDataSource->DataSourceType()==KUidMmfFileSource)
+ {
+ CMMFFile* file = static_cast<CMMFFile*>(iDataSource);
+ // we only support protected files for playback
+ if (file->IsProtectedL())
+ {
+ if (iDataSink->DataSinkType()!=KUidMmfAudioOutput)
+ {
+ // Conversion is not allowed for DRM protected files
+ User::Leave(KErrNotSupported);
+ }
+ }
+ }
+
// for drm CR/Error 417-45879/ESLM-82JAHL
if (iDataSource->DataSourceType()==KUidMmfFileSource)
{
@@ -381,6 +409,18 @@
}
}
+ //For Error : Update s60 tone controller to update the DRM rights
+ //Getting the Intent for Play if AutomaticIntent is Enabled
+ if (!iDisableAutoIntent && iDataSource->DataSourceType()==KUidMmfFileSource)
+ {
+ CMMFFile* file = static_cast<CMMFFile*>(iDataSource);
+ TInt err = file->ExecuteIntent(ContentAccess::EPlay);
+ if (err != KErrNone)
+ {
+ User::LeaveIfError(err);
+ }
+ }
+
if(State() == EPausePlaying && iIsResumeSupported)
{
User::LeaveIfError(iMMFDevSound->Resume());
@@ -414,6 +454,18 @@
__ASSERT_ALWAYS(iMMFDevSound, Panic(EMMFAudioControllerPanicDataSinkDoesNotExist));
+ //For Error : Update s60 tone controller to update the DRM rights
+ //Getting the Intent for Pause if AutomaticIntent is Enabled
+ if (!iDisableAutoIntent && iDataSource->DataSourceType()==KUidMmfFileSource)
+ {
+ CMMFFile* file = static_cast<CMMFFile*>(iDataSource);
+ TInt err = file->ExecuteIntent(ContentAccess::EPause);
+
+ if (err != KErrNone)
+ {
+ User::LeaveIfError(err);
+ }
+ }
if(iIsResumeSupported)
{
iMMFDevSound->Pause();
@@ -450,6 +502,19 @@
// Due to the asynchronous nature of the controller
// interaction the response to stopped when stopped
// should not be an error ]
+
+
+ //For Error : Update s60 tone controller to update the DRM rights
+ //Getting the Intent for Stop if AutomaticIntent is Enabled
+ if (!iDisableAutoIntent && iDataSource->DataSourceType()==KUidMmfFileSource)
+ {
+ CMMFFile* file = static_cast<CMMFFile*>(iDataSource);
+ TInt err = file->ExecuteIntent(ContentAccess::EStop);
+ if (err != KErrNone)
+ {
+ User::LeaveIfError(err);
+ }
+ }
if (State() != EStopped)
{
//[ update state to stopped propogate to devsound ]
@@ -1061,3 +1126,63 @@
}
return err;
}
+
+//For Error : Update s60 tone controller to update the DRM rights
+//Methods from MMMFDRMCustomCommandImplementor
+//Checking for the Intents if AutomaticIntent is Disabled
+
+TInt CMMFAudioToneController::MdcExecuteIntent(ContentAccess::TIntent aIntent)
+ {
+
+ if (iDataSource->DataSourceType()==KUidMmfFileSource)
+ {
+ CMMFFile* file = static_cast<CMMFFile*>(iDataSource);
+ TInt err = file->ExecuteIntent(aIntent);
+ return err;
+ }
+ else
+ {
+ // Evaluating intent will always succeed on sinks that
+ // don't support DRM
+ return KErrNone;
+ }
+
+ }
+
+TInt CMMFAudioToneController::MdcEvaluateIntent(ContentAccess::TIntent aIntent)
+ {
+ if (iDataSource->DataSourceType()==KUidMmfFileSource)
+ {
+ CMMFFile* file = static_cast<CMMFFile*>(iDataSource);
+ TInt err = file->EvaluateIntent(aIntent);
+ return err;
+ }
+ else
+ {
+ // Evaluating intent will always succeed on sinks that
+ // don't support DRM
+ return KErrNone;
+ }
+ }
+
+TInt CMMFAudioToneController::MdcDisableAutomaticIntent(TBool aDisableAutoIntent)
+ {
+ iDisableAutoIntent = aDisableAutoIntent;
+ return KErrNone;
+ }
+
+
+TInt CMMFAudioToneController::MdcSetAgentProperty(ContentAccess::TAgentProperty aProperty, TInt aValue)
+ {
+ if (iDataSource->DataSourceType()==KUidMmfFileSource)
+ {
+ CMMFFile* file = static_cast<CMMFFile*>(iDataSource);
+ TInt err = file->SetAgentProperty(aProperty, aValue);
+ return err;
+ }
+ else
+ {
+ return KErrNone;
+ }
+ }
+
--- a/mmfenh/advancedaudiocontroller/audiotonecontrollerplugin/src/mmfaudiotonecontroller.h Thu May 27 13:20:50 2010 +0300
+++ b/mmfenh/advancedaudiocontroller/audiotonecontrollerplugin/src/mmfaudiotonecontroller.h Wed Jun 23 18:47:10 2010 +0300
@@ -28,6 +28,7 @@
#include <mmf/common/mmfstandardcustomcommands.h>
#include <mmf/server/sounddevice.h>
+#include <mmf/common/mmfdrmcustomcommands.h>
/**
@@ -52,7 +53,8 @@
public MMMFAudioPlayDeviceCustomCommandImplementor,
public MMMFAudioPlayControllerCustomCommandImplementor,
public MDevSoundObserver,
- public MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor
+ public MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor,
+ public MMMFDRMCustomCommandImplementor
{
public:
static CMMFController* NewL();
@@ -109,6 +111,12 @@
//from MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor
virtual TInt MapcSetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence);
+
+ // From MMMFDRMCustomCommandImplementor
+ virtual TInt MdcExecuteIntent(ContentAccess::TIntent aIntent);
+ virtual TInt MdcEvaluateIntent(ContentAccess::TIntent aIntent);
+ virtual TInt MdcDisableAutomaticIntent(TBool aDisableAutoIntent);
+ virtual TInt MdcSetAgentProperty(ContentAccess::TAgentProperty aProperty, TInt aValue);
public:
@@ -141,7 +149,8 @@
TBool IsValidStateTransition( TControllerState aState ) const;
TBool Invariant() const;
TBool IsValidState( TControllerState aState ) const ;
- TBool ResetPostCondition() const;
+ TBool ResetPostCondition() const;
+
void CalculateLeftRightBalance( TInt& aLeft, TInt& aRight, TInt aBalance ) const;
void CalculateBalance( TInt& aBalance, TInt aLeft, TInt aRight ) const;
@@ -177,6 +186,10 @@
/** Used to store message */
TMMFMessage* iMessage;
+
+ TBool iDisableAutoIntent;
+
+ MDataSink* iDataSink;
};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioPlaybackTestModule/conf/Playbackplugin_FH_Regression_10.1.cfg Wed Jun 23 18:47:10 2010 +0300
@@ -0,0 +1,4574 @@
+//**************************
+//* Play 3GPP , 3g2 and MP4
+//**************************
+// Testing Playback to EOF
+
+[TestCase]
+id 120
+Title Plugin.3GP.3g2.mp4.FH.1 - Play mp4 audio
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+Expected Duration 28 978 000
+ErrorRange 1 500 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.3GP.3g2.mp4.FH.2 - Play 3gpp-aac audio
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+Expected Duration 29 120 000
+ErrorRange 1 500 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.3GP.3g2.mp4.FH.3 - Play 3gpp-amr audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+Expected Duration 37 420 000
+ErrorRange 1 500 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.3GP.3g2.mp4.FH.4 - Play 3gpp-awb audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+Expected Duration 38 460 000
+ErrorRange 1 500 000
+[End_TestCase]
+
+
+[TestCase]
+id 120
+Title Plugin.3GP.3g2.mp4.FH.5 - Play 3gpp2-aac audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+ErrorRange 1 500 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.3GP.3g2.mp4.FH.6 - Play 3gpp2-amr audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+ErrorRange 1 500 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.3GP.3g2.mp4.FH.7 - Play 3gpp2-awb audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+ErrorRange 1 500 000
+[End_TestCase]
+
+
+
+
+//**************************
+//* Play and Stop (ID 121)
+//**************************
+
+[TestCase]
+id 121
+Title Plugin.3GP.3g2.mp4.FH.8 - PlayStop mp4 audio
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.3GP.3g2.mp4.FH.9 - PlayStop 3gpp-aac audio
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.3GP.3g2.mp4.FH.10 - PlayStop 3gpp-amr audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.3GP.3g2.mp4.FH.11 - PlayStop 3gpp-awb audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.3GP.3g2.mp4.FH.12 - Play 3gpp2-aac audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.3GP.3g2.mp4.FH.13 - Play 3gpp2-amr audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.3GP.3g2.mp4.FH.14 - Play 3gpp2-awb audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+Delay 1000000
+[End_TestCase]
+
+
+//**************************
+//* Play Pause Play (ID 122)
+//**************************
+
+[TestCase]
+id 122
+Title Plugin.3GP.3g2.mp4.FH.15 - PlayPausePlay mp4 audio
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 500 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.3GP.3g2.mp4.FH.16 - PlayPausePlay 3gpp-aac audio
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 500 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.3GP.3g2.mp4.FH.17 - PlayPausePlay 3gpp-amr audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 500 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.3GP.3g2.mp4.FH.18 - PlayPausePlay 3gpp-awb audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 500 000
+[End_TestCase]
+
+
+[TestCase]
+id 122
+Title Plugin.3GP.3g2.mp4.FH.19 - Play 3gpp2-aac audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 500 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.3GP.3g2.mp4.FH.20 - Play 3gpp2-amr audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 500 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.3GP.3g2.mp4.FH.21 - Play 3gpp2-awb audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 500 000
+[End_TestCase]
+
+
+//**************************
+//* Set Position - Play (ID 124)
+//**************************
+
+[TestCase]
+id 124
+Title Plugin.3GP.3g2.mp4.FH.22 - SetPosition_Play mp4 audio
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.3GP.3g2.mp4.FH.23 - SetPosition_Play 3gpp-aac audio
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.3GP.3g2.mp4.FH.24 - SetPosition_Play 3gpp-amr audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.3GP.3g2.mp4.FH.25 - SetPosition_Play 3gpp-awb audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.3GP.3g2.mp4.FH.26 - Play 3gpp2-aac audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.3GP.3g2.mp4.FH.27 - Play 3gpp2-amr audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.3GP.3g2.mp4.FH.28 - Play 3gpp2-awb audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//**************************
+//* Play - Get Position (ID 125)
+//**************************
+// Delay is the setting position, meaning every delay value, the get position is called.
+// This info be seen on the log file.
+
+[TestCase]
+id 125
+Title Plugin.3GP.3g2.mp4.FH.29 - GetPosition_Play mp4 audio
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.3GP.3g2.mp4.FH.30 - GetPosition_Play 3gpp-aac audio
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.3GP.3g2.mp4.FH.31 - GetPosition_Play 3gpp-amr audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.3GP.3g2.mp4.FH.32 - GetPosition_Play 3gpp-awb audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.3GP.3g2.mp4.FH.33 - Play 3gpp2-aac audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.3GP.3g2.mp4.FH.34 - Play 3gpp2-amr audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.3GP.3g2.mp4.FH.35 - Play 3gpp2-awb audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Get Duration (ID 126)
+//**************************
+
+[TestCase]
+id 126
+Title Plugin.3GP.3g2.mp4.FH.36 - GetDuration mp4 audio
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.3GP.3g2.mp4.FH.37 - GetDuration 3gpp-aac audio
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.3GP.3g2.mp4.FH.38 - GetDuration 3gpp-amr audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.3GP.3g2.mp4.FH.39 - GetDuration 3gpp-awb audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.3GP.3g2.mp4.FH.40 - GetDuration 3gpp2-aac audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.3GP.3g2.mp4.FH.41 - GetDuration 3gpp2-amr audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.3GP.3g2.mp4.FH.42 - GetDuration 3gpp2-awb audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+Delay 1000000
+[End_TestCase]
+
+
+
+
+//**************************
+//* Play - Volume Ramping (ID 123)
+//**************************
+
+[TestCase]
+id 123
+Title Plugin.3GP.3g2.mp4.FH.43 - VolumeRamping mp4 audio
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.3GP.3g2.mp4.FH.44 - VolumeRamping 3gpp-aac audio
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.3GP.3g2.mp4.FH.45 - VolumeRamping 3gpp-amr audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.3GP.3g2.mp4.FH.46 - VolumeRamping 3gpp-awb audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.3GP.3g2.mp4.FH.47 - VolumeRamping 3gpp2-aac audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.3GP.3g2.mp4.FH.48 - VolumeRamping 3gpp2-amr audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.3GP.3g2.mp4.FH.49 - VolumeRamping 3gpp2-awb audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Set Playback Window (ID 127)
+//**************************
+
+[TestCase]
+id 127
+Title Plugin.3GP.3g2.mp4.FH.50 - SetPlaybackWindow mp4 audio
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+//StartPosition 10 000 000
+//EndPosition 25 000 000
+StartPosition 03 000 000
+EndPosition 05 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.3GP.3g2.mp4.FH.51 - SetPlaybackWindow 3gpp-aac audio
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+//StartPosition 10 000 000
+//EndPosition 25 000 000
+StartPosition 03 000 000
+EndPosition 05 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.3GP.3g2.mp4.FH.52 - SetPlaybackWindow 3gpp-amr audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 03 000 000
+EndPosition 05 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.3GP.3g2.mp4.FH.53 - SetPlaybackWindow 3gpp-awb audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 03 000 000
+EndPosition 05 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.3GP.3g2.mp4.FH.54 - SetPlaybackWindow 3gpp2-aac audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 03 000 000
+EndPosition 06 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.3GP.3g2.mp4.FH.55 - SetPlaybackWindow 3gpp2-amr audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 03 000 000
+EndPosition 05 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.3GP.3g2.mp4.FH.56 - SetPlaybackWindow 3gpp2-awb audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 03 000 000
+EndPosition 05 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+
+//**************************
+//* Play - Delete Playback Window (ID 128)
+//**************************
+
+[TestCase]
+id 128
+Title Plugin.3GP.3g2.mp4.FH.57 - DeletePlaybackWindow mp4 audio
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.3GP.3g2.mp4.FH.58 - DeletePlaybackWindow 3gpp-aac audio
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.3GP.3g2.mp4.FH.59 - DeletePlaybackWindow 3gpp-amr audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.3GP.3g2.mp4.FH.60 - DeletePlaybackWindow 3gpp-awb audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 128
+Title Plugin.3GP.3g2.mp4.FH.61 - DeletePlaybackWindow 3gpp2-aac audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+StartPosition 15 000 000
+EndPosition 35 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.3GP.3g2.mp4.FH.62 - DeletePlaybackWindow 3gpp2-amr audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+StartPosition 15 000 000
+EndPosition 35 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.3GP.3g2.mp4.FH.63 - DeletePlaybackWindow 3gpp2-awb audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+StartPosition 15 000 000
+EndPosition 35 000 000
+Delay 1000000
+[End_TestCase]
+
+//************************************
+//* Play AAC-ADTS LC (ID 120)
+//************************************
+// Testing Playback to EOF
+
+[TestCase]
+id 120
+Title Plugin.AAC.FH.1 - Play 8Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_16kbps_8khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AAC.FH.2 - Play 11Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_16kbps_11.025khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AAC.FH.3 - Play 12Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_20kbps_12khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AAC.FH.4 - Play 16Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_20kbps_16khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AAC.FH.5 - Play 22Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_20kbps_22.05khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AAC.FH.6 - Play 24Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_24khz_stereo.aac
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AAC.FH.7 - Play 32Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_32khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AAC.FH.8 - Play 44Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_44.1khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AAC.FH.9 - Play 48Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_16kbps_48khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AAC.FH.10 - Play 64Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_44kbps_64khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AAC.FH.11 - Play 88Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_44kbps_88khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AAC.FH.12 - Play 96Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_44kbps_96khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+
+
+//************************************
+//* Play AAC-ADTS MPEG2 (ID 120)
+//************************************
+// Testing Playback to EOF
+
+[TestCase]
+id 120
+Title Plugin.AAC.FH.13 - Play 44Khz ADTS MPEG2
+SoundFile e:\sounds\aac\ADTS\MPEG2\10s_AAC_LC_42kbps_44.1khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 120
+Title Plugin.AAC.FH.14 - Play 88Khz ADTS MPEG2
+SoundFile e:\sounds\aac\ADTS\MPEG2\10s_AAC_LC_68kbps_88khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+
+//************************************
+//* Play AAC-ADTS MPEG4 (ID 120)
+//************************************
+// Testing Playback to EOF
+
+[TestCase]
+id 120
+Title Plugin.AAC.FH.15 - Play 11Khz ADTS MPEG4
+SoundFile e:\sounds\aac\ADTS\MPEG4\10s_AAC_LC_64kbps_11.025khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 120
+Title Plugin.AAC.FH.16 - Play 48Khz ADTS MPEG4
+SoundFile e:\sounds\aac\ADTS\MPEG4\10s_AAC_LC_44kbps_48khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 120
+Title Plugin.AAC.FH.17 - Play 88Khz ADTS MPEG4
+SoundFile e:\sounds\aac\ADTS\MPEG4\10s_AAC_LC_83kbps_88khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+
+//************************************
+//* Play AAC-ADTS LC (ID 121)
+//************************************
+// Testing Play Stop Play to EOF
+
+[TestCase]
+id 121
+Title Plugin.AAC.FH.18 - PlayStop 8Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_16kbps_8khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_16kbps_8khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AAC.FH.19 - PlayStop 11Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_16kbps_11.025khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_16kbps_11.025khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AAC.FH.20 - PlayStop 12Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_20kbps_12khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_20kbps_12khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AAC.FH.21 - PlayStop 16Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_20kbps_16khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_20kbps_16khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AAC.FH.22 - PlayStop 22Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_20kbps_22.05khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_20kbps_22.05khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AAC.FH.23 - PlayStop 24Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_24khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_24khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AAC.FH.24 - PlayStop 32Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_32khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_32khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AAC.FH.25 - PlayStop 44Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_44.1khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_44.1khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AAC.FH.26 - PlayStop 48Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_16kbps_48khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_16kbps_48khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AAC.FH.27 - PlayStop 64Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_44kbps_64khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_44kbps_64khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AAC.FH.28 - PlayStop 88Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_44kbps_88khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_44kbps_88khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AAC.FH.29 - PlayStop 96Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_44kbps_96khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_44kbps_96khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+
+//************************************
+//* Play AAC-ADIF (ID 120)
+//************************************
+// Testing Playback to EOF
+
+[TestCase]
+id 120
+Title Plugin.AAC.FH.30 - Play ADIF mono
+SoundFile e:\sounds\aac\ADIF\10s_AAC_44khz_mono.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AAC.FH.31 - Play ADIF stereo
+SoundFile e:\sounds\aac\ADIF\10s_AAC_LC_56kbps_44.1khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+
+//************************************
+//* Play AAC-ADIF (ID 121)
+//************************************
+// Testing Play Stop Play to EOF
+
+[TestCase]
+id 121
+Title Plugin.AAC.FH.32 - PlayStop ADIF mono
+SoundFile e:\sounds\aac\ADIF\10s_AAC_44khz_mono.aac
+SoundFile e:\sounds\aac\ADIF\10s_AAC_44khz_mono.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AAC.FH.33 - PlayStop ADIF stereo
+SoundFile e:\sounds\aac\ADIF\10s_AAC_LC_56kbps_44.1khz_stereo.aac
+SoundFile e:\sounds\aac\ADIF\10s_AAC_LC_56kbps_44.1khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+
+
+//********************************
+//* Play - Volume Ramping (ID 123)
+//********************************
+
+[TestCase]
+id 123
+Title Plugin.AAC.FH.34 - VolumeRamping AAC ADTS
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_16kbps_11.025khz_stereo.aac
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.AAC.FH.35 - VolumeRamping AAC ADTS
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_20kbps_22.05khz_stereo.aac
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.AAC.FH.36 - VolumeRamping AAC ADIF
+SoundFile e:\sounds\aac\ADIF\10s_AAC_44khz_mono.aac
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+
+//----------------------------
+//Add following cases for Inc9
+//----------------------------
+
+
+//**************************
+//* Play Pause Play (ID 122)
+//**************************
+[TestCase]
+id 122
+Title Plugin.AAC.FH.37 - PlayPausePlay AAC 24Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_24khz_stereo.aac
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 5 000 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.AAC.FH.38 - PlayPausePlay AAC 44Khz ADTS MPEG2
+SoundFile e:\sounds\aac\ADTS\MPEG2\10s_AAC_LC_42kbps_44.1khz_stereo.aac
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 5 000 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.AAC.FH.39 - PlayPausePlay AAC 48Khz ADTS MPEG4
+SoundFile e:\sounds\aac\ADTS\MPEG4\10s_AAC_LC_44kbps_48khz_stereo.aac
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 4 000 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.AAC.FH.40 - PlayPausePlay AAC ADIF mono
+SoundFile e:\sounds\aac\ADIF\10s_AAC_44khz_mono.aac
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 4 000 000
+[End_TestCase]
+
+
+
+//******************************
+//* Set Position - Play (ID 124)
+//******************************
+
+[TestCase]
+id 124
+Title Plugin.AAC.FH.41 - SetPosition_Play AAC 24Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_24khz_stereo.aac
+Position 000 500 000
+ErrorRange 4 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.AAC.FH.42 - SetPosition_Play AAC 44Khz ADTS MPEG2
+SoundFile e:\sounds\aac\ADTS\MPEG2\10s_AAC_LC_42kbps_44.1khz_stereo.aac
+Position 10 000 000
+ErrorRange 5 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.AAC.FH.43 - SetPosition_Play AAC 48Khz ADTS MPEG4
+SoundFile e:\sounds\aac\ADTS\MPEG4\10s_AAC_LC_44kbps_48khz_stereo.aac
+//Position 30 000 000
+Position 05 000 000
+ErrorRange 4 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.AAC.FH.44 - SetPosition_Play AAC ADIF mono
+SoundFile e:\sounds\aac\ADIF\10s_AAC_44khz_mono.aac
+Position 10 000 000
+ErrorRange 4 000 000
+[End_TestCase]
+
+
+
+//*******************************
+//* Play - Get Position (ID 125)
+//*******************************
+// Delay is the setting position, meaning every delay value, the get position is called.
+// This info be seen on the log file.
+
+
+[TestCase]
+id 125
+Title Plugin.AAC.FH.45 - GetPosition_Play AAC 24Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_24khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.AAC.FH.46 - GetPosition_Play AAC 44Khz ADTS MPEG2
+SoundFile e:\sounds\aac\ADTS\MPEG2\10s_AAC_LC_42kbps_44.1khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.AAC.FH.47 - GetPosition_Play AAC 48Khz ADTS MPEG4
+SoundFile e:\sounds\aac\ADTS\MPEG4\10s_AAC_LC_44kbps_48khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.AAC.FH.48 - GetPosition_Play AAC ADIF mono
+SoundFile e:\sounds\aac\ADIF\10s_AAC_44khz_mono.aac
+Delay 1000000
+[End_TestCase]
+
+
+//******************************
+//* Play - Get Duration (ID 126)
+//******************************
+
+[TestCase]
+id 126
+Title Plugin.AAC.FH.49 - GetDuration AAC 24Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_24khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.AAC.FH.50 - GetDuration AAC 44Khz ADTS MPEG2
+SoundFile e:\sounds\aac\ADTS\MPEG2\10s_AAC_LC_42kbps_44.1khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.AAC.FH.51 - GetDuration AAC 48Khz ADTS MPEG4
+SoundFile e:\sounds\aac\ADTS\MPEG4\10s_AAC_LC_44kbps_48khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.AAC.FH.52 - GetDuration AAC ADIF mono
+SoundFile e:\sounds\aac\ADIF\10s_AAC_44khz_mono.aac
+Delay 1000000
+[End_TestCase]
+
+//*************************************
+//* Play - Set Playback Window (ID 127)
+//*************************************
+
+[TestCase]
+id 127
+Title Plugin.AAC.FH.53 - SetPlaybackWindow AAC 24Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_24khz_stereo.aac
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.AAC.FH.54 - SetPlaybackWindow AAC 44Khz ADTS MPEG2
+SoundFile e:\sounds\aac\ADTS\MPEG2\10s_AAC_LC_42kbps_44.1khz_stereo.aac
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.AAC.FH.55 - SetPlaybackWindow AAC 48Khz ADTS MPEG4
+SoundFile e:\sounds\aac\ADTS\MPEG4\10s_AAC_LC_44kbps_48khz_stereo.aac
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.AAC.FH.56 - SetPlaybackWindow AAC ADIF mono
+SoundFile e:\sounds\aac\ADIF\10s_AAC_44khz_mono.aac
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+
+
+//****************************************
+//* Play - Delete Playback Window (ID 128)
+//****************************************
+[TestCase]
+id 128
+Title Plugin.AAC.FH.57 - DeletePlaybackWindow AAC 24Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_24khz_stereo.aac
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.AAC.FH.58 - DeletePlaybackWindow AAC 44Khz ADTS MPEG2
+SoundFile e:\sounds\aac\ADTS\MPEG2\10s_AAC_LC_42kbps_44.1khz_stereo.aac
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.AAC.FH.59 - DeletePlaybackWindow AAC 48Khz ADTS MPEG4
+SoundFile e:\sounds\aac\ADTS\MPEG4\10s_AAC_LC_44kbps_48khz_stereo.aac
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.AAC.FH.60 - DeletePlaybackWindow AAC ADIF mono
+SoundFile e:\sounds\aac\ADIF\10s_AAC_44khz_mono.aac
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play AMR NB Modes 0-7 (ID 120)
+//**************************
+// Testing Playback to EOF
+
+[TestCase]
+id 120
+Title Plugin.AMR.FH.1 - Play 10s_AMR_NB_mode0.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AMR.FH.2 - Play 10s_AMR_NB_mode1.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode1.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AMR.FH.3 - Play 10s_AMR_NB_mode1.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode1.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AMR.FH.4 - Play 10s_AMR_NB_mode3.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode3.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AMR.FH.5 - Play 10s_AMR_NB_mode4.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode4.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AMR.FH.6 - Play 10s_AMR_NB_mode5.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode5.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AMR.FH.7 - Play 10s_AMR_NB_mode6.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode6.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AMR.FH.8 - Play 10s_AMR_NB_mode7.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode7.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AMR.FH.9 - Play AMR without ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode4_no_ext
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AMR.FH.10 - Play AMR with other ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode7_other_ext.3gp
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+//**************************
+//* Play and Stop (ID 121)
+//**************************
+
+[TestCase]
+id 121
+Title Plugin.AMR.FH.11 - PlayStop 10s_AMR_NB_mode0.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AMR.FH.12 - PlayStop 10s_AMR_NB_mode1.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode1.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode1.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AMR.FH.13 - PlayStop 10s_AMR_NB_mode1.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode1.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode1.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AMR.FH.14 - PlayStop 10s_AMR_NB_mode3.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode3.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode3.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AMR.FH.15 - PlayStop 10s_AMR_NB_mode4.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode4.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode4.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AMR.FH.16 - PlayStop 10s_AMR_NB_mode5.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode5.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode5.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AMR.FH.17 - PlayStop 10s_AMR_NB_mode6.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode6.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode6.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AMR.FH.18 - PlayStop 10s_AMR_NB_mode7.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode7.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode7.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AMR.FH.19 - PlayStop AMR without ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode4_no_ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode4_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AMR.FH.20 - PlayStop AMR with other ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode7_other_ext.3gp
+SoundFile e:\sounds\amr\10s_AMR_NB_mode7_other_ext.3gp
+Delay 1000000
+[End_TestCase]
+
+
+//**************************
+//* Play Pause Play (ID 122)
+//**************************
+
+[TestCase]
+id 122
+Title Plugin.AMR.FH.21 - PlayPausePlay 10s_AMR_NB_mode0.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0.amr
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.AMR.FH.22 - PlayPausePlay AMR without ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_no_ext
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.AMR.FH.23 - PlayPausePlay AMR with other ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_other_ext.3gp
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+//**************************
+//* Set Position - Play (ID 124)
+//**************************
+
+[TestCase]
+id 124
+Title Plugin.AMR.FH.24 - SetPosition_Play 10s_AMR_NB_mode0.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0.amr
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.AMR.FH.25 - SetPosition_Play AMR without ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_no_ext
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.AMR.FH.26 - SetPosition_Play AMR with other ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_other_ext.3gp
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+//**************************
+//* Play - Get Position (ID 125)
+//**************************
+// Delay is the setting position, meaning every delay value, the get position is called.
+// This info be seen on the log file.
+
+[TestCase]
+id 125
+Title Plugin.AMR.FH.27 - GetPosition_Play 10s_AMR_NB_mode0.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.AMR.FH.28 - GetPosition_Play AMR without ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.AMR.FH.29 - GetPosition_Play AMR with other ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_other_ext.3gp
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Get Duration (ID 126)
+//**************************
+
+[TestCase]
+id 126
+Title Plugin.AMR.FH.30 - GetDuration 10s_AMR_NB_mode0.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.AMR.FH.31 - GetDuration AMR without ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.AMR.FH.32 - GetDuration AMR with other ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_other_ext.3gp
+Delay 1000000
+[End_TestCase]
+
+
+//**************************
+//* Play - Volume Ramping (ID 123)
+//**************************
+
+[TestCase]
+id 123
+Title Plugin.AMR.FH.33 - VolumeRamping 10s_AMR_NB_mode0.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0.amr
+RampDuration 3 000 000
+Delay 2000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.AMR.FH.34 - VolumeRamping AMR without ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_no_ext
+RampDuration 3 000 000
+Delay 2000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.AMR.FH.35 - VolumeRamping AMR with other ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_other_ext.3gp
+RampDuration 3 000 000
+Delay 2000000
+[End_TestCase]
+
+//**************************
+//* Play - Set Playback Window (ID 127)
+//**************************
+
+[TestCase]
+id 127
+Title Plugin.AMR.FH.36 - SetPlaybackWindow 10s_AMR_NB_mode7.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode7.amr
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 02 000 000
+EndPosition 08 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.AMR.FH.37 - SetPlaybackWindow AMR without ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode7_no_ext
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 03 000 000
+EndPosition 05 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.AMR.FH.38 - SetPlaybackWindow AMR with other ext
+SoundFile e:\sounds\amr\10s_3GP_AMR_NB_12.2kbps.3gp
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 03 000 000
+EndPosition 07 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Delete Playback Window (ID 128)
+//**************************
+
+[TestCase]
+id 128
+Title Plugin.AMR.FH.39 - DeletePlaybackWindow 10s_AMR_NB_mode0.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0.amr
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.AMR.FH.40 - DeletePlaybackWindow AMR without ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_no_ext
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.AMR.FH.41 - DeletePlaybackWindow AMR with other ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_other_ext.3gp
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+
+//**************************
+//* Play AMR WB Modes 0-8 (ID 120)
+//**************************
+// Testing Playback to EOF
+
+[TestCase]
+id 120
+Title Plugin.AWB.FH.1 - Play 10s_AMR_WB_6.6kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_6.6kbps.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AWB.FH.2 - Play 10s_AMR_WB_8.85kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_8.85kbps.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AWB.FH.3 - Play 10s_AMR_WB_12.65kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_12.65kbps.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AWB.FH.4 - Play 10s_AMR_WB_14.25kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_14.25kbps.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AWB.FH.5 - Play 10s_AMR_WB_15.85kbps.awb
+SoundFile e:\sounds\awb\10s_AMR_WB_15.85kbps.awb
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AWB.FH.6 - Play 10s_AMR_WB_18.25kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_18.25kbps.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AWB.FH.7 - Play 10s_AMR_WB_19.85kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_19.85kbps.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AWB.FH.8 - Play 10s_AMR_WB_23.05kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_23.05kbps.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AWB.FH.9 - Play 10s_AMR_WB_23.85kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AWB.FH.10 - Play AWB without ext
+SoundFile e:\sounds\awb\10s_AMR_WB_mode8_no_ext
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.AWB.FH.11 - Play AWB with other ext
+SoundFile e:\sounds\awb\10s_3GP_AMR_WB_mode8.3gp
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+//**************************
+//* Play and Stop (ID 121)
+//**************************
+
+[TestCase]
+id 121
+Title Plugin.AWB.FH.12 - PlayStop 10s_AMR_WB_6.6kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_6.6kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_6.6kbps.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AWB.FH.13 - PlayStop 10s_AMR_WB_8.85kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_8.85kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_8.85kbps.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AWB.FH.14 - PlayStop 10s_AMR_WB_12.65kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_12.65kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_12.65kbps.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AWB.FH.15 - PlayStop 10s_AMR_WB_14.25kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_14.25kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_14.25kbps.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AWB.FH.16 - PlayStop 10s_AMR_WB_15.85kbps.awb
+SoundFile e:\sounds\awb\10s_AMR_WB_15.85kbps.awb
+SoundFile e:\sounds\awb\10s_AMR_WB_15.85kbps.awb
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AWB.FH.17 - PlayStop 10s_AMR_WB_18.25kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_18.25kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_18.25kbps.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AWB.FH.18 - PlayStop 10s_AMR_WB_19.85kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_19.85kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_19.85kbps.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AWB.FH.19 - PlayStop 10s_AMR_WB_23.05kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_23.05kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_23.05kbps.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AWB.FH.20 - PlayStop 10s_AMR_WB_23.85kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AWB.FH.21 - PlayStop AWB without ext
+SoundFile e:\sounds\awb\10s_AMR_WB_mode8_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.AWB.FH.22 - PlayStop AWB with other ext
+SoundFile e:\sounds\awb\10s_3GP_AMR_WB_mode8.3gp
+Delay 1000000
+[End_TestCase]
+
+
+
+//**************************
+//* Play Pause Play (ID 122)
+//**************************
+
+[TestCase]
+id 122
+Title Plugin.AWB.FH.23 - PlayPausePlay 10s_AMR_WB_23.85kbps_Generic.awb
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic.awb
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.AWB.FH.24 - PlayPausePlay AWB without ext
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic_no_ext
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.AWB.FH.25 - PlayPausePlay AWB with other ext
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic_other_ext.3gp
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+//**************************
+//* Set Position - Play (ID 124)
+//**************************
+
+[TestCase]
+id 124
+Title Plugin.AWB.FH.26 - SetPosition_Play 10s_AMR_WB_15.85kbps.awb
+SoundFile e:\sounds\awb\10s_AMR_WB_15.85kbps.awb
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.AWB.FH.27 - SetPosition_Play AWB without ext
+SoundFile e:\sounds\awb\10s_AMR_WB_15.85kbps_no_ext
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.AWB.FH.28 - SetPosition_Play AWB with other ext
+SoundFile e:\sounds\awb\10s_AMR_WB_15.85kbps_other_ext.3gp
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+//**************************
+//* Play - Get Position (ID 125)
+//**************************
+// Delay is the setting position, meaning every delay value, the get position is called.
+// This info be seen on the log file.
+
+[TestCase]
+id 125
+Title Plugin.AWB.FH.29 - GetPosition_Play 10s_AMR_WB_15.85kbps.awb
+SoundFile e:\sounds\awb\10s_AMR_WB_15.85kbps.awb
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.AWB.FH.30 - GetPosition_Play AWB without ext
+SoundFile e:\sounds\awb\10s_AMR_WB_15.85kbps_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.AWB.FH.31 - GetPosition_Play AWB with other ext
+SoundFile e:\sounds\awb\10s_AMR_WB_15.85kbps_other_ext.3gp
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Get Duration (ID 126)
+//**************************
+
+[TestCase]
+id 126
+Title Plugin.AWB.FH.32 - GetDuration 10s_AMR_WB_23.85kbps_Generic.awb
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic.awb
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.AWB.FH.33 - GetDuration AWB without ext
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.AWB.FH.34 - GetDuration AWB with other ext
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic_other_ext.3gp
+Delay 1000000
+[End_TestCase]
+
+
+//**************************
+//* Play - Volume Ramping (ID 123)
+//**************************
+
+[TestCase]
+id 123
+Title Plugin.AWB.FH.35 - VolumeRamping 10s_AMR_WB_23.85kbps_Generic.awb
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic.awb
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.AWB.FH.36 - VolumeRamping AWB without ext
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic_no_ext
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.AWB.FH.37 - VolumeRamping AWB with other ext
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic_other_ext.3gp
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Set Playback Window (ID 127)
+//**************************
+
+[TestCase]
+id 127
+Title Plugin.AWB.FH.38 - SetPlaybackWindow 10s_AMR_WB_23.05kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_23.05kbps.amr
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 03 000 000
+EndPosition 06 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.AWB.FH.39 - SetPlaybackWindow AWB without ext
+SoundFile e:\sounds\awb\10s_AMR_WB_23.05kbps_no_ext
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 03 000 000
+EndPosition 06 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.AWB.FH.40 - SetPlaybackWindow AWB with other ext
+SoundFile e:\sounds\awb\10s_3GP_AMR_WB_23.05kbps.3gp
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 03 000 000
+EndPosition 06 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Delete Playback Window (ID 128)
+//**************************
+
+[TestCase]
+id 128
+Title Plugin.AWB.FH.41 - DeletePlaybackWindow 10s_AMR_WB_23.85kbps_Generic.awb
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic.awb
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.AWB.FH.42 - DeletePlaybackWindow AWB without ext
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic_no_ext
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.AWB.FH.43 - DeletePlaybackWindow AWB with other ext
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic_other_ext.3gp
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+
+//*******************************************
+//* Play M4a Sample Rate and BiteRate(ID 120)
+//*******************************************
+// Testing Playback to EOF
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.1 - Play Mono 8kbps 11kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_8kbps_11.025khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.2 - Play Mono 16kbps 22kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_16kbps_22.05khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.3 - Play Mono 20kbps 24kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_20kbps_24khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.4 - Play Mono 24kbps 32kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_24kbps_32khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.5 - Play 28kbps 32kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_28kbps_32khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.6 - Play Mono 32kbps 32kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_32kbps_32khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.7 - Play Mono 40kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_40kbps_44.1khz_mono.m4a
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.8 - Play Mono 48kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_48kbps_44.1khz_mono.m4a
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.9 - Play Mono 56kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_56kbps_44.1khz_mono.m4a
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.10 - Play Mono 64kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_64kbps_44.1khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.11 - Play Mono 80kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_80kbps_44.1khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.12 - Play Mono 96kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_96kbps_44.1khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.13 - Play Mono 112kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_112kbps_44.1khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.14 - Play Mono 128kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_128kbps_44.1khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.15 - Play Mono 160kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_160kbps_44.1khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.16 - Play Stereo 16kbps 11kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_16kbps_11.025khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.17 - Play Stereo 20kbps 11kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_20kbps_16khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.18 - Play Stereo 24kbps 16kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_24kbps_16khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.19 - Play Stereo 28kbps 16kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_28kbps_16khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.20 - Play Stereo 32kbps 22kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_32kbps_22.05khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.21 - Play Stereo 40kbps 24kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_40kbps_24khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.22 - Play Stereo 48kbps 32kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_48kbps_32khz_stereo.m4a
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.23 - Play Stereo 56kbps 32kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_56kbps_32khz_stereo.m4a
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.24 - Play Stereo 64kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_64kbps_44.1khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.25 - Play Stereo 80kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_80kbps_44.1khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.26 - Play Stereo 96kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_96kbps_44.1khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.27 - Play Stereo 112kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_112kbps_44.1khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.28 - Play Stereo 128kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_128kbps_44.1khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.29 - Play Stereo 160kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_160kbps_44.1khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.30 - Play Stereo 192kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_192kbps_44.1khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.31 - Play Stereo 224kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_224kbps_44.1khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.32 - Play Stereo 256kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_256kbps_44.1khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.33 - Play Stereo 320kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_320kbps_44.1khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.34 - Play Stereo 112kbps 48kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_112kbps_48khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.35 - Play Stereo 128kbps 48kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_128kbps_48khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.36 - Play Stereo 160kbps 48kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_160kbps_48khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.37 - Play Stereo 192kbps 48kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_192kbps_48khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.38 - Play Stereo 224kbps 48kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_224kbps_48khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.39 - Play Stereo 256kbps 48kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_256kbps_48khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.M4a.FH.40 - Play Stereo 320kbps 48kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_320kbps_48khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+
+//************************************
+//* Play M4a (ID 121)
+//************************************
+// Testing Play Stop Play to EOF
+
+[TestCase]
+id 121
+Title Plugin.M4a.FH.41 - PlayStop Mono 8kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_8kbps_11.025khz_mono.m4a
+SoundFile e:\sounds\M4a\10s_AAC_LC_8kbps_11.025khz_mono.m4a
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 121
+Title Plugin.M4a.FH.42 - PlayStop Stereo 16kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_16kbps_11.025khz_stereo.m4a
+SoundFile e:\sounds\M4a\10s_AAC_LC_16kbps_11.025khz_stereo.m4a
+Delay 1000000
+[End_TestCase]
+
+
+
+//********************************
+//* Play - Volume Ramping (ID 123)
+//********************************
+
+[TestCase]
+id 123
+Title Plugin.M4a.FH.43 - VolumeRamping Mono 8kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_8kbps_11.025khz_mono.m4a
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 123
+Title Plugin.M4a.FH.44 - VolumeRamping Stereo 16kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_16kbps_11.025khz_stereo.m4a
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+
+//**************************
+//* Play Pause Play (ID 122)
+//**************************
+
+[TestCase]
+id 122
+Title Plugin.M4a.FH.45 - PlayPausePlay Mono 8kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_8kbps_11.025khz_mono.m4a
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 122
+Title Plugin.M4a.FH.46 - PlayPausePlay Stereo 16kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_16kbps_11.025khz_stereo.m4a
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//******************************
+//* Set Position - Play (ID 124)
+//******************************
+
+[TestCase]
+id 124
+Title Plugin.M4a.FH.47 - SetPosition_Play Mono 8kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_8kbps_11.025khz_mono.m4a
+Position 000 500 000
+ErrorRange 3 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 124
+Title Plugin.M4a.FH.48 - SetPosition_Play Stereo 16kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_16kbps_11.025khz_stereo.m4a
+Position 000 500 000
+ErrorRange 3 000 000
+[End_TestCase]
+
+
+
+//*******************************
+//* Play - Get Position (ID 125)
+//*******************************
+// Delay is the setting position, meaning every delay value, the get position is called.
+// This info be seen on the log file.
+
+
+[TestCase]
+id 125
+Title Plugin.M4a.FH.49 - GetPosition_Play Mono 8kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_8kbps_11.025khz_mono.m4a
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 125
+Title Plugin.M4a.FH.50 - GetPosition_Play Stereo 16kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_16kbps_11.025khz_stereo.m4a
+Delay 1000000
+[End_TestCase]
+
+
+
+//******************************
+//* Play - Get Duration (ID 126)
+//******************************
+
+[TestCase]
+id 126
+Title Plugin.M4a.FH.51 - GetDuration Mono 8kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_8kbps_11.025khz_mono.m4a
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 126
+Title Plugin.M4a.FH.52 - GetDuration Stereo 16kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_16kbps_11.025khz_stereo.m4a
+Delay 1000000
+[End_TestCase]
+
+
+//*************************************
+//* Play - Set Playback Window (ID 127)
+//*************************************
+
+
+[TestCase]
+id 127
+Title Plugin.M4a.FH.53 - SetPlaybackWindow Mono 8kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_8kbps_11.025khz_mono.m4a
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 127
+Title Plugin.M4a.FH.54 - SetPlaybackWindow Stereo 16kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_16kbps_11.025khz_stereo.m4a
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+
+
+//****************************************
+//* Play - Delete Playback Window (ID 128)
+//****************************************
+
+
+[TestCase]
+id 128
+Title Plugin.M4a.FH.55 - DeletePlaybackWindow Mono 8kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_8kbps_11.025khz_mono.m4a
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 128
+Title Plugin.M4a.FH.56 - DeletePlaybackWindow Stereo 16kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_16kbps_11.025khz_stereo.m4a
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play MIDI, SP-MIDI, RMF audio file (ID 120)
+//**************************
+// Testing Playback to EOF
+
+[TestCase]
+id 120
+Title Plugin.MIDI.FH.1 - Play midi 10s_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_MID_Generic.mid
+//Expected Duration 4 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MIDI.FH.2 - Play midi without ext
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext
+//Expected Duration 4 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MIDI.FH.3 - Play midi with different ext
+SoundFile e:\sounds\mid\10s_MID_Generic_other_ext.3gp
+//Expected Duration 4 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MIDI.FH.4 - Play sp-midi 10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+//Expected Duration 13 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MIDI.FH.5 - Play sp-midi 10s_SP_MID_Generic_no_ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+//Expected Duration 13 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MIDI.FH.6 - Play sp-midi 10s_SP_MID_Generic_other_ext.amr
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.amr
+//Expected Duration 13 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MIDI.FH.7 - Play rmf 10s_RMF_MID.rmf
+SoundFile e:\sounds\mid\10s_RMF_MID.rmf
+//Expected Duration 12 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MIDI.FH.8 - Play rmf piano
+SoundFile e:\sounds\mid\10s_RMF_MID_no_ext
+//Expected Duration 12 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MIDI.FH.9 - Play rmf piano.awb
+SoundFile e:\sounds\mid\10s_RMF_MID_other_ext.awb
+//Expected Duration 12 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MIDI.FH.10 - Play mxmf 10s_MXMF.mxmf
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+//Expected Duration 12 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MIDI.FH.11 - Play mxmf 10s_MXMF_no_ext
+SoundFile e:\sounds\mxmf\10s_MXMF_no_ext
+//Expected Duration 12 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MIDI.FH.12 - Play mxmf 10s_MXMF_other_ext.awb
+SoundFile e:\sounds\mxmf\10s_MXMF_other_ext.awb
+//Expected Duration 12 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+//**************************
+//* Play and Stop (ID 121)
+//**************************
+
+[TestCase]
+id 121
+Title Plugin.MIDI.FH.13 - PlayStop midi 10s_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext.mid
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext.mid
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MIDI.FH.14 - PlayStop midi 10s_MID_Generic_no_ext
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MIDI.FH.15 - PlayStop midi 10s_MID_Generic_other_ext.amr
+SoundFile e:\sounds\mid\10s_MID_Generic_other_ext.amr
+SoundFile e:\sounds\mid\10s_MID_Generic_other_ext.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MIDI.FH.16 - PlayStop sp-midi 10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MIDI.FH.17 - PlayStop sp-midi 10s_SP_MID_Generic_no_ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MIDI.FH.18 - PlayStop sp-midi 10s_SP_MID_Generic_other_ext.amr
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.amr
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MIDI.FH.19 - PlayStop rmf 10s_RMF_MID.rmf
+SoundFile e:\sounds\mid\10s_RMF_MID.rmf
+SoundFile e:\sounds\mid\10s_RMF_MID.rmf
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MIDI.FH.20 - PlayStop rmf piano
+SoundFile e:\sounds\mid\10s_RMF_MID_no_ext
+SoundFile e:\sounds\mid\10s_RMF_MID_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MIDI.FH.21 - PlayStop rmf piano.awb
+SoundFile e:\sounds\mid\10s_RMF_MID_other_ext.awb
+SoundFile e:\sounds\mid\10s_RMF_MID_other_ext.awb
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MIDI.FH.22 - PlayStop mxmf 10s_MXMF.mxmf
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MIDI.FH.23 - PlayStop mxmf 10s_MXMF_no_ext
+SoundFile e:\sounds\mxmf\10s_MXMF_no_ext
+SoundFile e:\sounds\mxmf\10s_MXMF_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MIDI.FH.24 - PlayStop mxmf 10s_MXMF_other_ext.awb
+SoundFile e:\sounds\mxmf\10s_MXMF_other_ext.awb
+SoundFile e:\sounds\mxmf\10s_MXMF_other_ext.awb
+Delay 1000000
+[End_TestCase]
+
+
+
+//**************************
+//* Play Pause Play (ID 122)
+//**************************
+
+[TestCase]
+id 122
+Title Plugin.MIDI.FH.25 - PlayPausePlay midi 10s_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext.mid
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.MIDI.FH.26 - PlayPausePlay midi without ext
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.MIDI.FH.27 - PlayPausePlay midi with other ext
+SoundFile e:\sounds\mid\10s_MID_Generic_other_ext.amr
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.MIDI.FH.28 - PlayPausePlay sp-midi 10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.MIDI.FH.29 - PlayPausePlay sp-midi without ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.MIDI.FH.30 - PlayPausePlay sp-midi with other ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.amr
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.MIDI.FH.31 - PlayPausePlay rmf 10s_RMF_MID.rmf
+SoundFile e:\sounds\mid\10s_RMF_MID.rmf
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.MIDI.FH.32 - PlayPausePlay rmf without ext
+SoundFile e:\sounds\mid\10s_RMF_MID_no_ext
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.MIDI.FH.33 - PlayPausePlay rmf with other ext
+SoundFile e:\sounds\mid\10s_RMF_MID_other_ext.awb
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.MIDI.FH.34 - PlayPausePlay mxmf 10s_MXMF.mxmf
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.MIDI.FH.35 - PlayPausePlay mxmf without ext
+SoundFile e:\sounds\mxmf\10s_MXMF_no_ext
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.MIDI.FH.36 - PlayPausePlay mxmf with other ext
+SoundFile e:\sounds\mxmf\10s_MXMF_other_ext.awb
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+
+//**************************
+//* Set Position - Play (ID 124)
+//**************************
+
+[TestCase]
+id 124
+Title Plugin.MIDI.FH.37 - SetPosition_Play midi 10s_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext.mid
+//Position 10 000 000
+Position 02 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.MIDI.FH.38 - SetPosition_Play midi without ext
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext
+//Position 10 000 000
+Position 02 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.MIDI.FH.39 - SetPosition_Play midi with other ext
+SoundFile e:\sounds\mid\10s_MID_Generic_other_ext.amr
+//Position 10 000 000
+Position 02 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.MIDI.FH.40 - SetPosition_Play sp-midi 10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+Position 10 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.MIDI.FH.41 - SetPosition_Play sp-midi without ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+Position 10 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.MIDI.FH.42 - SetPosition_Play sp-midi with other ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.amr
+Position 10 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.MIDI.FH.43 - SetPosition_Play rmf 10s_RMF_MID.rmf
+SoundFile e:\sounds\mid\10s_RMF_MID.rmf
+Position 10 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.MIDI.FH.44 - SetPosition_Play rmf without ext
+SoundFile e:\sounds\mid\10s_RMF_MID_no_ext
+Position 10 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.MIDI.FH.45 - SetPosition_Play rmf with other ext
+SoundFile e:\sounds\mid\10s_RMF_MID_other_ext.awb
+Position 10 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.MIDI.FH.46 - SetPosition_Play mxmf 10s_MXMF.mxmf
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+Position 10 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.MIDI.FH.47 - SetPosition_Play mxmf without ext
+SoundFile e:\sounds\mxmf\10s_MXMF_no_ext
+Position 10 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.MIDI.FH.48 - SetPosition_Play mxmf with other ext
+SoundFile e:\sounds\mxmf\10s_MXMF_other_ext.awb
+Position 10 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+//**************************
+//* Play - Get Position (ID 125)
+//**************************
+// Delay is the setting position, meaning every delay value, the get position is called.
+// This info be seen on the log file.
+
+[TestCase]
+id 125
+Title Plugin.MIDI.FH.49 - GetPosition_Play midi 10s_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext.mid
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.MIDI.FH.50 - GetPosition_Play midi without ext
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.MIDI.FH.51 - GetPosition_Play midi with other ext
+SoundFile e:\sounds\mid\10s_MID_Generic_other_ext.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.MIDI.FH.52 - GetPosition_Play sp-midi 10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.MIDI.FH.53 - GetPosition_Play sp-midi without ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.MIDI.FH.54 - GetPosition_Play sp-midi with other ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.MIDI.FH.55 - GetPosition_Play rmf 10s_RMF_MID.rmf
+SoundFile e:\sounds\mid\10s_RMF_MID.rmf
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.MIDI.FH.56 - GetPosition_Play rmf without ext
+SoundFile e:\sounds\mid\10s_RMF_MID_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.MIDI.FH.57 - GetPosition_Play rmf with other ext
+SoundFile e:\sounds\mid\10s_RMF_MID_other_ext.awb
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.MIDI.FH.58 - GetPosition_Play mxmf 10s_MXMF.mxmf
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.MIDI.FH.59 - GetPosition_Play mxmf without ext
+SoundFile e:\sounds\mxmf\10s_MXMF_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.MIDI.FH.60 - GetPosition_Play mxmf with other ext
+SoundFile e:\sounds\mxmf\10s_MXMF_other_ext.awb
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Get Duration (ID 126)
+//**************************
+
+[TestCase]
+id 126
+Title Plugin.MIDI.FH.61 - GetDuration mid 10s_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext.mid
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.MIDI.FH.62 - GetDuration mid without ext
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.MIDI.FH.63 - GetDuration mid with other ext
+SoundFile e:\sounds\mid\10s_MID_Generic_other_ext.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.MIDI.FH.64 - GetDuration sp-mid 10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.MIDI.FH.65 - GetDuration sp-mid without ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.MIDI.FH.66 - GetDuration sp-mid with other ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.MIDI.FH.67 - GetDuration rmf 10s_RMF_MID.rmf
+SoundFile e:\sounds\mid\10s_RMF_MID.rmf
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.MIDI.FH.68 - GetDuration rmf without ext
+SoundFile e:\sounds\mid\10s_RMF_MID_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.MIDI.FH.69 - GetDuration rmf with other ext
+SoundFile e:\sounds\mid\10s_RMF_MID_other_ext.awb
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 126
+Title Plugin.MIDI.FH.70 - GetDuration mxmf 10s_MXMF.mxmf
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.MIDI.FH.71 - GetDuration mxmf without ext
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.MIDI.FH.72 - GetDuration mxmf with other ext
+SoundFile e:\sounds\mxmf\10s_MXMF_other_ext.awb
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Volume Ramping (ID 123)
+//**************************
+
+[TestCase]
+id 123
+Title Plugin.MIDI.FH.73 - VolumeRamping mid 10s_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext.mid
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.MIDI.FH.74 - VolumeRamping mid without ext
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.MIDI.FH.75 - VolumeRamping mid with other ext
+SoundFile e:\sounds\mid\10s_MID_Generic_other_ext.amr
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.MIDI.FH.76 - VolumeRamping sp-mid 10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.MIDI.FH.77 - VolumeRamping sp-mid without ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.MIDI.FH.78 - VolumeRamping sp-mid with other ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.amr
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.MIDI.FH.79 - VolumeRamping rmf 10s_RMF_MID.rmf
+SoundFile e:\sounds\mid\10s_RMF_MID.rmf
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.MIDI.FH.80 - VolumeRamping rmf without ext
+SoundFile e:\sounds\mid\10s_RMF_MID_no_ext
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.MIDI.FH.81 - VolumeRamping rmf with other ext
+SoundFile e:\sounds\mid\10s_RMF_MID_other_ext.awb
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.MIDI.FH.82 - VolumeRamping mxmf 10s_MXMF.mxmf
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.MIDI.FH.83 - VolumeRamping mxmf without ext
+SoundFile e:\sounds\mxmf\10s_MXMF_no_ext
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.MIDI.FH.84 - VolumeRamping mxmf with other ext
+SoundFile e:\sounds\mxmf\10s_MXMF_other_ext.awb
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Set Playback Window (ID 127)
+//**************************
+
+[TestCase]
+id 127
+Title Plugin.MIDI.FH.85 - SetPlaybackWindow midi 10s_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext.mid
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.MIDI.FH.86 - SetPlaybackWindow midi without ext
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.MIDI.FH.87 - SetPlaybackWindow midi with other ext
+SoundFile e:\sounds\mid\10s_MID_Generic_other_ext.amr
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[[TestCase]
+id 127
+Title Plugin.MIDI.FH.88 - SetPlaybackWindow sp-midi 10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+//StartPosition 10 000 000
+//EndPosition 20 000 000
+StartPosition 03 000 000
+EndPosition 05 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.MIDI.FH.89 - SetPlaybackWindow sp-midi without ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+//StartPosition 10 000 000
+//EndPosition 20 000 000
+StartPosition 03 000 000
+EndPosition 05 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.MIDI.FH.90 - SetPlaybackWindow sp-midi with other ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.awb
+//StartPosition 10 000 000
+//EndPosition 20 000 000
+StartPosition 03 000 000
+EndPosition 09 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.MIDI.FH.91 - SetPlaybackWindow rmf 10s_RMF_MID.rmf
+SoundFile e:\sounds\mid\10s_RMF_MID.rmf
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.MIDI.FH.92 - SetPlaybackWindow rmf without ext
+SoundFile e:\sounds\mid\10s_RMF_MID_no_ext
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.MIDI.FH.93 - SetPlaybackWindow rmf with other ext
+SoundFile e:\sounds\mid\10s_RMF_MID_other_ext.3gp
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.MIDI.FH.94 - SetPlaybackWindow mxmf 10s_MXMF.mxmf
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.MIDI.FH.95 - SetPlaybackWindow mxmf without ext
+SoundFile e:\sounds\mxmf\10s_MXMF_no_ext
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.MIDI.FH.96 - SetPlaybackWindow mxmf with other ext
+SoundFile e:\sounds\mxmf\10s_MXMF_other_ext.awb
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Delete Playback Window (ID 128)
+//**************************
+
+[TestCase]
+id 128
+Title Plugin.MIDI.FH.97 - DeletePlaybackWindow midi 10s_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext.mid
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.MIDI.FH.98 - DeletePlaybackWindow midi without ext
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.MIDI.FH.99 - DeletePlaybackWindow midi with other ext
+SoundFile e:\sounds\mid\10s_MID_Generic_other_ext.amr
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.MIDI.FH.100 - DeletePlaybackWindow sp-midi 10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.MIDI.FH.101 - DeletePlaybackWindow sp-midi without ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.MIDI.FH.102 - DeletePlaybackWindow sp-midi with other ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.awb
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.MIDI.FH.103 - DeletePlaybackWindow rmf 10s_RMF_MID.rmf
+SoundFile e:\sounds\mid\10s_RMF_MID.rmf
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.MIDI.FH.104 - DeletePlaybackWindow rmf without ext
+SoundFile e:\sounds\mid\10s_RMF_MID_no_ext
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.MIDI.FH.105 - DeletePlaybackWindow rmf with other ext
+SoundFile e:\sounds\mid\10s_RMF_MID_other_ext.3gp
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.MIDI.FH.106 - DeletePlaybackWindow mxmf 10s_MXMF.mxmf
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.MIDI.FH.107 - DeletePlaybackWindow mxmf without ext
+SoundFile e:\sounds\mxmf\10s_MXMF_no_ext
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.MIDI.FH.108 - DeletePlaybackWindow mxmf with other ext
+SoundFile e:\sounds\mxmf\10s_MXMF_other_ext.awb
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play MP3 Sample Rate (ID 120)
+//**************************
+// Testing Playback to EOF
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.1 - Play 8Khz MPEG2.5
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2.5_8kbps_8khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.2 - Play 11Khz MPEG2.5
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2.5_16kbps_11.025khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.3 - Play 12Khz MPEG2.5
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2.5_8kbps_12khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.4 - Play 16Khz MPEG2
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_16kbps_24khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.5 - Play 22Khz MPEG2
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_8kbps_22.05khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.6 - Play 24 Khz MPEG2
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_112kbps_24khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.7 - Play 32 Khz MPEG1
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_32kbps_32khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.8 - Play 44 Khz MPEG1
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_32kbps_44.1khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.9 - Play 48 Khz MPEG1
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_32kbps_48khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//**********************************
+//* Play and Stop SampleRate(ID 121)
+//**********************************
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.10 - PlayStop 8Khz MPEG2.5
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2.5_8kbps_8khz_mono.mp3
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2.5_8kbps_8khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.11 - PlayStop 11Khz MPEG2.5
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2.5_16kbps_11.025khz_stereo.mp3
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2.5_16kbps_11.025khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.12 - PlayStop 12Khz MPEG2.5
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2.5_8kbps_12khz_stereo.mp3
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2.5_8kbps_12khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.13 - PlayStop 16Khz MPEG2
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_16kbps_24khz_stereo.mp3
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_16kbps_24khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.14 - PlayStop 22Khz MPEG2
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_8kbps_22.05khz_stereo.mp3
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_8kbps_22.05khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.15 - PlayStop 24Khz MPEG2
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_112kbps_24khz_mono.mp3
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_112kbps_24khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.16 - PlayStop 32Khz MPEG1
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_32kbps_32khz_mono.mp3
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_32kbps_32khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.17 - PlayStop 44Khz MPEG1
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_32kbps_44.1khz_mono.mp3
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_32kbps_44.1khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.18 - PlayStop 48Khz MPEG1
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_32kbps_48khz_mono.mp3
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_32kbps_48khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+
+
+//**********************************
+//* Play MP3 Bit Rate MPEG1 (ID 120)
+//**********************************
+// Testing Playback to EOF
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.19 - Play 32Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_32kbps_32khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.20 - Play 40Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_40kbps_32khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.21 - Play 48Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_48kbps_48khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.22 - Play 56Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_56kbps_44.1khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.23 - Play 64Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_64kbps_32khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.24 - Play 80Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_80kbps_32khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.25 - Play 96Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_96kbps_32khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.26 - Play 112Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_112kbps_44.1khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.27 - Play 128Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_128kbps_44.1khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.28 - Play 160Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_160kbps_48khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.29 - Play 192Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_192kbps_32khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.30 - Play 224Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_224kbps_48khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.31 - Play 256Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_256kbps_32khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.32 - Play 320Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_320kbps_44.1khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//*******************************************
+//* Play and Stop MP3 Bit Rate MPEG1 (ID 121)
+//*******************************************
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.33 - PlayStop 32Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_32kbps_32khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_32kbps_32khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.34 - PlayStop 40Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_40kbps_32khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_40kbps_32khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.35 - PlayStop 48Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_48kbps_48khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_48kbps_48khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.36 - PlayStop 56Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_56kbps_44.1khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_56kbps_44.1khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.37 - PlayStop 64Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_64kbps_32khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_64kbps_32khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.38 - PlayStop 80Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_80kbps_32khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_80kbps_32khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.39 - PlayStop 96Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_96kbps_32khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_96kbps_32khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.40 - PlayStop 112Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_112kbps_44.1khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_112kbps_44.1khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.41 - PlayStop 128Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_128kbps_44.1khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_128kbps_44.1khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.42 - PlayStop 160Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_160kbps_48khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_160kbps_48khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.43 - PlayStop 192Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_192kbps_32khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_192kbps_32khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.44 - PlayStop 224Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_224kbps_48khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_224kbps_48khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.45 - PlayStop 256Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_256kbps_32khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_256kbps_32khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.46 - PlayStop 320Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_320kbps_44.1khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_320kbps_44.1khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+
+
+
+
+
+//**************************************
+//* Play MP3 Bit Rate MPEG2/2.5 (ID 120)
+//**************************************
+// Testing Playback to EOF
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.47 - Play 8Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_8kbps_16khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.48 - Play 16Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_16kbps_22.05khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.49 - Play 24Kbps MPEG2.5
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_24kbps_12khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.50 - Play 32Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_32kbps_16khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.51 - Play 40Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_40kbps_16khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.52 - Play 48Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_48kbps_22.05khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.53 - Play 56Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_56kbps_24khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.54 - Play 64Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_64kbps_24khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.55 - Play 80Kbps MPEG2.5
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_80kbps_11.025khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.56 - Play 96Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_96kbps_16khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.57 - Play 112Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_112kbps_16khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.58 - Play 128Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_128kbps_16khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.59 - Play 144Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_144kbps_24khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.MP3.FH.60 - Play 160Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_160kbps_16khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//******************************************
+//* PlayStop MP3 Bit Rate MPEG2/2.5 (ID 121)
+//******************************************
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.61 - PlayStop 8Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_8kbps_16khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_8kbps_16khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.62 - PlayStop 16Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_16kbps_22.05khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_16kbps_22.05khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.63 - PlayStop 24Kbps MPEG2.5
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_24kbps_12khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_24kbps_12khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.64 - PlayStop 32Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_32kbps_16khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_32kbps_16khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.65 - PlayStop 40Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_40kbps_16khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_40kbps_16khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.66 - PlayStop 48Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_48kbps_22.05khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_48kbps_22.05khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.67 - PlayStop 56Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_56kbps_24khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_56kbps_24khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.68 - PlayStop 64Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_64kbps_24khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_64kbps_24khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.69 - PlayStop 80Kbps MPEG2.5
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_80kbps_11.025khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_80kbps_11.025khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.70 - PlayStop 96Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_96kbps_16khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_96kbps_16khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.71 - PlayStop 112Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_112kbps_16khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_112kbps_16khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.72 - PlayStop 128Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_128kbps_16khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_128kbps_16khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.73 - PlayStop 144Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_144kbps_24khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_144kbps_24khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.MP3.FH.74 - PlayStop 160Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_160kbps_16khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_160kbps_16khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+
+
+
+
+//**************************
+//* Play Pause Play (ID 122)
+//**************************
+
+[TestCase]
+id 122
+Title Plugin.MP3.FH.75 - PlayPausePlay MP3 MPEG2 24KHz 160Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_160kbps_22.05khz_stereo.mp3
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.MP3.FH.76 - PlayPausePlay MP3 MPEG2 24KHz 56Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_56kbps_24khz_stereo.mp3
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 122
+Title Plugin.MP3.FH.77 - PlayPausePlay MP3 MPEG1 48KHz 224Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_224kbps_48khz_stereo.mp3
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//******************************
+//* Set Position - Play (ID 124)
+//******************************
+
+[TestCase]
+id 124
+Title Plugin.MP3.FH.78 - SetPosition_Play MP3 MPEG1 48KHz 224Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_224kbps_48khz_stereo.mp3
+Position 000 500 000
+ErrorRange 3 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 124
+Title Plugin.MP3.FH.79 - SetPosition_Play MP3 MPEG1 48KHz 96Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_96kbps_48khz_stereo.mp3
+Position 05 000 000
+ErrorRange 3 000 000
+[End_TestCase]
+
+[TestCase]
+id 124
+Title Plugin.MP3.FH.80 - SetPosition_Play MP3 MPEG2 24KHz 56Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_56kbps_24khz_stereo.mp3
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//*******************************
+//* Play - Get Position (ID 125)
+//*******************************
+// Delay is the setting position, meaning every delay value, the get position is called.
+// This info be seen on the log file.
+
+[TestCase]
+id 125
+Title Plugin.MP3.FH.81 - GetPosition_Play MP3 MPEG2 24KHz 160Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_160kbps_22.05khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.MP3.FH.82 - GetPosition_Play MP3 MPEG2 24KHz 56Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_56kbps_24khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 125
+Title Plugin.MP3.FH.83 - GetPosition_Play MP3 MPEG1 48KHz 96Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_96kbps_48khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+//******************************
+//* Play - Get Duration (ID 126)
+//******************************
+
+[TestCase]
+id 126
+Title Plugin.MP3.FH.84 - GetDuration MP3 MPEG1 48KHz 96Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_96kbps_48khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.MP3.FH.85 - GetDuration MP3 MPEG1 48KHz 224Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_224kbps_48khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 126
+Title Plugin.MP3.FH.86 - GetDuration MP3 MPEG2 24KHz 56Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_56kbps_24khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+
+//********************************
+//* Play - Volume Ramping (ID 123)
+//********************************
+
+[TestCase]
+id 123
+Title Plugin.MP3.FH.87 - VolumeRamping MP3 MPEG2 24KHz 56Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_56kbps_24khz_stereo.mp3
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.MP3.FH.88 - VolumeRamping MP3 MPEG2 24KHz 160Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_160kbps_22.05khz_stereo.mp3
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 123
+Title Plugin.MP3.FH.89 - VolumeRamping MPEG1 48KHz 224Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_224kbps_48khz_stereo.mp3
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+//*************************************
+//* Play - Set Playback Window (ID 127)
+//*************************************
+
+[TestCase]
+id 127
+Title Plugin.MP3.FH.90 - SetPlaybackWindow MP3 MPEG1 48KHz 224Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_224kbps_48khz_stereo.mp3
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.MP3.FH.91 - SetPlaybackWindow MP3 MPEG1 48KHz 96Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_96kbps_48khz_stereo.mp3
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 127
+Title Plugin.MP3.FH.92 - SetPlaybackWindow MP3 MPEG2 24KHz 56Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_56kbps_24khz_stereo.mp3
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+//****************************************
+//* Play - Delete Playback Window (ID 128)
+//****************************************
+
+[TestCase]
+id 128
+Title Plugin.MP3.FH.93 - DeletePlaybackWindow MP3 MPEG1 48KHz 224Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_224kbps_48khz_stereo.mp3
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.MP3.FH.94 - DeletePlaybackWindow MP3 MPEG1 48KHz 96Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_96kbps_48khz_stereo.mp3
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 128
+Title Plugin.MP3.FH.95 - DeletePlaybackWindow MP3 MPEG2 24KHz 160Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_160kbps_22.05khz_stereo.mp3
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+//*******************************************
+//* Play 3gp EAAC+ audio files (ID 120)
+//*******************************************
+// Testing Playback to EOF
+
+[TestCase]
+id 120
+Title Plugin.HeAAC.FH.1 - Play implicit stereo 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode0.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 120
+Title Plugin.HeAAC.FH.2 - Play explicit non-backwards compatible stereo 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode2.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.HeAAC.FH.3 - Play 20kbps 32khz 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AAC+_20kbps_32khz_Mono.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.HeAAC.FH.4 - Play 16kbps 32khz mono 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AAC+_16kbps_32khz_Mono.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.HeAAC.FH.5 - Play 24kbps 32khz stereo 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AAC+_24kbps_32khz_Stereo.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.HeAAC.FH.6 - Play 20kbps 32khz 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AAC+_20kbps_32khz_Stereo.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.HeAAC.FH.7 - Play 16kbps 32khz mono 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AAC+_16kbps_32khz_Mono.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.HeAAC.FH.8 - Play 24kbps 32khz stereo 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AAC+_24kbps_32khz_Stereo.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.HeAAC.FH.9 - Play 20kbps 32khz stereo 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AAC+_20kbps_32khz_Mono.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.HeAAC.FH.10 - Play 16kbps 32khz 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AAC+_16kbps_32khz_Mono.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 120
+Title Plugin.HeAAC.FH.11 - Play 24kbps 32khz stereo 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AAC+_24kbps_32khz_Stereo.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//*******************************************
+//* Play mp4 EAAC+ audio files (ID 120)
+//*******************************************
+// Testing Playback to EOF
+
+[TestCase]
+id 120
+Title Plugin.HeAAC.FH.12 - Play implicit pstereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_0.mp4
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+
+[TestCase]
+id 120
+Title Plugin.HeAAC.FH.13 - Play explicit backwards compatible pstereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_1.mp4
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 120
+Title Plugin.HeAAC.FH.14 - Play explicit non-backwards compatible pstereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_2.mp4
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 120
+Title Plugin.HeAAC.FH.15 - Play implicit stereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_0.mp4
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 120
+Title Plugin.HeAAC.FH.16 - Play explicit backwards compatible stereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_1.mp4
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 120
+Title Plugin.HeAAC.FH.17 - Play explicit non-backwards compatible stereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_2.mp4
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//************************************
+//* Play EAAC+ (ID 121)
+//************************************
+// Testing Play Stop Play to EOF
+
+[TestCase]
+id 121
+Title Plugin.HeAAC.FH.18 - PlayStop implicit stereo 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode0.3gp
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode0.3gp
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 121
+Title Plugin.HeAAC.FH.19 - PlayStop explicit non-backwards compatible stereo 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode2.3gp
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode2.3gp
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 121
+Title Plugin.HeAAC.FH.20 - PlayStop implicit pstereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_0.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_0.mp4
+Delay 1000000
+[End_TestCase]
+
+
+
+[TestCase]
+id 121
+Title Plugin.HeAAC.FH.21 - PlayStop explicit backwards compatible pstereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_1.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_1.mp4
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 121
+Title Plugin.HeAAC.FH.22 - PlayStop explicit non-backwards compatible pstereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_2.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_2.mp4
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 121
+Title Plugin.HeAAC.FH.23 - PlayStop implicit stereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_0.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_0.mp4
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 121
+Title Plugin.HeAAC.FH.24 - PlayStop explicit backwards compatible stereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_1.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_1.mp4
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 121
+Title Plugin.HeAAC.FH.25 - PlayStop explicit non-backwards compatible stereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_2.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_2.mp4
+Delay 1000000
+[End_TestCase]
+
+
+//********************************
+//* Play - Volume Ramping (ID 123)
+//********************************
+
+[TestCase]
+id 123
+Title Plugin.HeAAC.FH.26 - VolumeRamping 10s_MP4_stereo_0.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_0.mp4
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 123
+Title Plugin.HeAAC.FH.27 - VolumeRamping 10s_3GP_AMR_NB_mode2.3gp
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode2.3gp
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 123
+Title Plugin.HeAAC.FH.28 - VolumeRamping 10s_MP4_pstereo_1.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_1.mp4
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+
+//**************************
+//* Play Pause Play (ID 122)
+//**************************
+
+[TestCase]
+id 122
+Title Plugin.HeAAC.FH.29 - PlayPausePlay 10s_MP4_stereo_0.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_0.mp4
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 122
+Title Plugin.HeAAC.FH.30 - PlayPausePlay 10s_3GP_AMR_NB_mode2.3gp
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode2.3gp
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 122
+Title Plugin.HeAAC.FH.31 - PlayPausePlay 10s_MP4_pstereo_1.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_1.mp4
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+
+//******************************
+//* Set Position - Play (ID 124)
+//******************************
+
+[TestCase]
+id 124
+Title Plugin.HeAAC.FH.32 - SetPosition_Play 10s_MP4_stereo_0.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_0.mp4
+Position 000 500 000
+ErrorRange 3 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 124
+Title Plugin.HeAAC.FH.33 - SetPosition_Play 10s_3GP_AMR_NB_mode2.3gp
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode2.3gp
+Position 000 500 000
+ErrorRange 3 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 124
+Title Plugin.HeAAC.FH.34 - SetPosition_Play 10s_MP4_pstereo_1.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_1.mp4
+Position 000 500 000
+ErrorRange 3 000 000
+[End_TestCase]
+
+
+
+//*******************************
+//* Play - Get Position (ID 125)
+//*******************************
+// Delay is the setting position, meaning every delay value, the get position is called.
+// This info be seen on the log file.
+[TestCase]
+id 125
+Title Plugin.HeAAC.FH.35 - GetPosition_Play 10s_MP4_stereo_0.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_0.mp4
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 125
+Title Plugin.HeAAC.FH.36 - GetPosition_Play 10s_3GP_AMR_NB_mode2.3gp
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode2.3gp
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 125
+Title Plugin.HeAAC.FH.37 - GetPosition_Play 10s_MP4_pstereo_1.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_1.mp4
+Delay 1000000
+[End_TestCase]
+
+
+
+//******************************
+//* Play - Get Duration (ID 126)
+//******************************
+[TestCase]
+id 126
+Title Plugin.HeAAC.FH.38 - GetDuration 10s_MP4_stereo_0.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_0.mp4
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 126
+Title Plugin.HeAAC.FH.39 - GetDuration 10s_3GP_AMR_NB_mode2.3gp
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode2.3gp
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 126
+Title Plugin.HeAAC.FH.40 - GetDuration 10s_MP4_pstereo_1.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_1.mp4
+Delay 1000000
+[End_TestCase]
+
+
+//*************************************
+//* Play - Set Playback Window (ID 127)
+//*************************************
+
+[TestCase]
+id 127
+Title Plugin.HeAAC.FH.41 - SetPlaybackWindow 10s_MP4_stereo_0.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_0.mp4
+StartPosition 3 000 000
+EndPosition 7 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 127
+Title Plugin.HeAAC.FH.42 - SetPlaybackWindow 10s_3GP_AMR_NB_mode2.3gp
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode2.3gp
+StartPosition 3 000 000
+EndPosition 7 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 127
+Title Plugin.HeAAC.FH.43 - SetPlaybackWindow 10s_MP4_pstereo_1.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_1.mp4
+StartPosition 0 000 000
+EndPosition 5 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+
+
+//****************************************
+//* Play - Delete Playback Window (ID 128)
+//****************************************
+
+
+[TestCase]
+id 128
+Title Plugin.HeAAC.FH.44 - DeletePlaybackWindow 10s_MP4_stereo_0.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_0.mp4
+StartPosition 3 000 000
+EndPosition 7 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 128
+Title Plugin.HeAAC.FH.45 - DeletePlaybackWindow 10s_3GP_AMR_NB_mode2.3gp
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode2.3gp
+StartPosition 3 000 000
+EndPosition 7 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 128
+Title Plugin.HeAAC.FH.46 - DeletePlaybackWindow 10s_MP4_pstereo_1.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_1.mp4
+StartPosition 0 000 000
+EndPosition 5 000 000
+Delay 1000000
+[End_TestCase]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioPlaybackTestModule/conf/Playbackplugin_Regression_10.1.cfg Wed Jun 23 18:47:10 2010 +0300
@@ -0,0 +1,6171 @@
+# Configuration Filename: PluginTest_AAC.cfg
+# DESCRIPTION: This config file is to test the AAC audio.
+#
+# History
+# 2005-03-21 Sue Xu 64 test cases
+//************************************
+//* Play AAC-ADTS LC (ID 102)
+//************************************
+// Testing Playback to EOF
+
+[TestCase]
+id 102
+Title Plugin.AAC.1 - Play 8Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_16kbps_8khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AAC.2 - Play 11Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_16kbps_11.025khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AAC.3 - Play 12Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_20kbps_12khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AAC.4 - Play 16Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_20kbps_16khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AAC.5 - Play 22Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_20kbps_22.05khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AAC.6 - Play 24Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_24khz_stereo.aac
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AAC.7 - Play 32Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_32khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AAC.8 - Play 44Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_44.1khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AAC.9 - Play 48Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_16kbps_48khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AAC.10 - Play 64Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_44kbps_64khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AAC.11 - Play 88Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_44kbps_88khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AAC.12 - Play 96Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_44kbps_96khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+
+
+//************************************
+//* Play AAC-ADTS MPEG2 (ID 102)
+//************************************
+// Testing Playback to EOF
+
+[TestCase]
+id 102
+Title Plugin.AAC.13 - Play 44Khz ADTS MPEG2
+SoundFile e:\sounds\aac\ADTS\MPEG2\10s_AAC_LC_42kbps_44.1khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 102
+Title Plugin.AAC.14 - Play 88Khz ADTS MPEG2
+SoundFile e:\sounds\aac\ADTS\MPEG2\10s_AAC_LC_68kbps_88khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+
+//************************************
+//* Play AAC-ADTS MPEG4 (ID 102)
+//************************************
+// Testing Playback to EOF
+
+[TestCase]
+id 102
+Title Plugin.AAC.15 - Play 11Khz ADTS MPEG4
+SoundFile e:\sounds\aac\ADTS\MPEG4\10s_AAC_LC_64kbps_11.025khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 102
+Title Plugin.AAC.16 - Play 48Khz ADTS MPEG4
+SoundFile e:\sounds\aac\ADTS\MPEG4\10s_AAC_LC_44kbps_48khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 102
+Title Plugin.AAC.17 - Play 88Khz ADTS MPEG4
+SoundFile e:\sounds\aac\ADTS\MPEG4\10s_AAC_LC_83kbps_88khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+
+//************************************
+//* Play AAC-ADTS LC (ID 103)
+//************************************
+// Testing Play Stop Play to EOF
+
+[TestCase]
+id 103
+Title Plugin.AAC.18 - PlayStop 8Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_16kbps_8khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_16kbps_8khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AAC.19 - PlayStop 11Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_16kbps_11.025khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_16kbps_11.025khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AAC.20 - PlayStop 12Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_20kbps_12khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_20kbps_12khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AAC.21 - PlayStop 16Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_20kbps_16khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_20kbps_16khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AAC.22 - PlayStop 22Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_20kbps_22.05khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_20kbps_22.05khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AAC.23 - PlayStop 24Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_24khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_24khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AAC.24 - PlayStop 32Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_32khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_32khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AAC.25 - PlayStop 44Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_44.1khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_44.1khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AAC.26 - PlayStop 48Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_16kbps_48khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_16kbps_48khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AAC.27 - PlayStop 64Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_44kbps_64khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_44kbps_64khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AAC.28 - PlayStop 88Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_44kbps_88khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_44kbps_88khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AAC.29 - PlayStop 96Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_44kbps_96khz_stereo.aac
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_44kbps_96khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+
+//************************************
+//* Play AAC-ADIF (ID 102)
+//************************************
+// Testing Playback to EOF
+
+[TestCase]
+id 102
+Title Plugin.AAC.30 - Play ADIF mono
+SoundFile e:\sounds\aac\ADIF\10s_AAC_44khz_mono.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AAC.31 - Play ADIF stereo
+SoundFile e:\sounds\aac\ADIF\10s_AAC_LC_56kbps_44.1khz_stereo.aac
+# ErrorRange 1 000 000
+[End_TestCase]
+
+
+//************************************
+//* Play AAC-ADIF (ID 103)
+//************************************
+// Testing Play Stop Play to EOF
+
+[TestCase]
+id 103
+Title Plugin.AAC.32 - PlayStop ADIF mono
+SoundFile e:\sounds\aac\ADIF\10s_AAC_44khz_mono.aac
+SoundFile e:\sounds\aac\ADIF\10s_AAC_44khz_mono.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AAC.33 - PlayStop ADIF stereo
+SoundFile e:\sounds\aac\ADIF\10s_AAC_LC_56kbps_44.1khz_stereo.aac
+SoundFile e:\sounds\aac\ADIF\10s_AAC_LC_56kbps_44.1khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+
+
+//***************************************
+//* Play - Volume Max and Medium (ID 112)
+//***************************************
+
+[TestCase]
+id 112
+Title Plugin.AAC.34 - SettingVolume AAC ADTS
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_32khz_stereo.aac
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.AAC.35 - SettingVolume AAC ADTS
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_16kbps_8khz_stereo.aac
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.AAC.36 - SettingVolume AAC ADIF
+SoundFile e:\sounds\aac\ADIF\10s_AAC_Generic_ADIF_meta_full.aac
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.AAC.37 - SettingVolume AAC ADIF
+SoundFile e:\sounds\aac\ADIF\10s_AAC_44khz_mono.aac
+[End_TestCase]
+
+//********************************
+//* Play - Volume Ramping (ID 113)
+//********************************
+
+[TestCase]
+id 113
+Title Plugin.AAC.38 - VolumeRamping AAC ADTS
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_16kbps_11.025khz_stereo.aac
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.AAC.39 - VolumeRamping AAC ADTS
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_20kbps_22.05khz_stereo.aac
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.AAC.40 - VolumeRamping AAC ADIF
+SoundFile e:\sounds\aac\ADIF\10s_AAC_44khz_mono.aac
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+
+//----------------------------
+//Add following cases for Inc9
+//----------------------------
+
+
+//**************************
+//* Play Pause Play (ID 108)
+//**************************
+[TestCase]
+id 108
+Title Plugin.AAC.41 - PlayPausePlay AAC 64Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_24khz_stereo.aac
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 5 000 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.AAC.42 - PlayPausePlay AAC 44Khz ADTS MPEG2
+SoundFile e:\sounds\aac\ADTS\MPEG2\10s_AAC_LC_42kbps_44.1khz_stereo.aac
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 5 000 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.AAC.43 - PlayPausePlay AAC 48Khz ADTS MPEG4
+SoundFile e:\sounds\aac\ADTS\MPEG4\10s_AAC_LC_44kbps_48khz_stereo.aac
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 4 000 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.AAC.44 - PlayPausePlay AAC ADIF mono
+SoundFile e:\sounds\aac\ADIF\10s_AAC_44khz_mono.aac
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 4 000 000
+[End_TestCase]
+
+
+
+//******************************
+//* Set Position - Play (ID 109)
+//******************************
+
+[TestCase]
+id 109
+Title Plugin.AAC.45 - SetPosition_Play AAC 64Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_24khz_stereo.aac
+Position 000 500 000
+ErrorRange 4 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.AAC.46 - SetPosition_Play AAC 44Khz ADTS MPEG2
+SoundFile e:\sounds\aac\ADTS\MPEG2\10s_AAC_LC_42kbps_44.1khz_stereo.aac
+//Position 50 000 000
+Position 10 000 000
+ErrorRange 5 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.AAC.47 - SetPosition_Play AAC 48Khz ADTS MPEG4
+SoundFile e:\sounds\aac\ADTS\MPEG4\10s_AAC_LC_44kbps_48khz_stereo.aac
+//Position 30 000 000
+Position 05 000 000
+ErrorRange 4 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.AAC.48 - SetPosition_Play AAC ADIF mono
+SoundFile e:\sounds\aac\ADIF\10s_AAC_44khz_mono.aac
+Position 10 000 000
+ErrorRange 4 000 000
+[End_TestCase]
+
+
+
+//*******************************
+//* Play - Get Position (ID 110)
+//*******************************
+// Delay is the setting position, meaning every delay value, the get position is called.
+// This info be seen on the log file.
+
+
+[TestCase]
+id 110
+Title Plugin.AAC.49 - GetPosition_Play AAC 64Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_24khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.AAC.50 - GetPosition_Play AAC 44Khz ADTS MPEG2
+SoundFile e:\sounds\aac\ADTS\MPEG2\10s_AAC_LC_42kbps_44.1khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.AAC.51 - GetPosition_Play AAC 48Khz ADTS MPEG4
+SoundFile e:\sounds\aac\ADTS\MPEG4\10s_AAC_LC_44kbps_48khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.AAC.52 - GetPosition_Play AAC ADIF mono
+SoundFile e:\sounds\aac\ADIF\10s_AAC_44khz_mono.aac
+Delay 1000000
+[End_TestCase]
+
+
+//******************************
+//* Play - Get Duration (ID 111)
+//******************************
+
+[TestCase]
+id 111
+Title Plugin.AAC.53 - GetDuration AAC 64Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_24khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.AAC.54 - GetDuration AAC 44Khz ADTS MPEG2
+SoundFile e:\sounds\aac\ADTS\MPEG2\10s_AAC_LC_42kbps_44.1khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.AAC.55 - GetDuration AAC 48Khz ADTS MPEG4
+SoundFile e:\sounds\aac\ADTS\MPEG4\10s_AAC_LC_44kbps_48khz_stereo.aac
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.AAC.56 - GetDuration AAC ADIF mono
+SoundFile e:\sounds\aac\ADIF\10s_AAC_44khz_mono.aac
+Delay 1000000
+[End_TestCase]
+
+//*************************************
+//* Play - Set Playback Window (ID 115)
+//*************************************
+
+[TestCase]
+id 115
+Title Plugin.AAC.57 - SetPlaybackWindow AAC 64Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_56kbps_24khz_stereo.aac
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.AAC.58 - SetPlaybackWindow AAC 44Khz ADTS MPEG2
+SoundFile e:\sounds\aac\ADTS\MPEG2\10s_AAC_LC_42kbps_44.1khz_stereo.aac
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.AAC.59 - SetPlaybackWindow AAC 48Khz ADTS MPEG4
+SoundFile e:\sounds\aac\ADTS\MPEG4\10s_AAC_LC_44kbps_48khz_stereo.aac
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.AAC.60 - SetPlaybackWindow AAC ADIF mono
+SoundFile e:\sounds\aac\ADIF\10s_AAC_44khz_mono.aac
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+
+
+//****************************************
+//* Play - Delete Playback Window (ID 116)
+//****************************************
+[TestCase]
+id 116
+Title Plugin.AAC.61 - DeletePlaybackWindow AAC 64Khz ADTS LC
+SoundFile e:\sounds\aac\ADTS\SampleRate\10s_AAC_LC_44kbps_64khz_stereo.aac
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.AAC.62 - DeletePlaybackWindow AAC 44Khz ADTS MPEG2
+SoundFile e:\sounds\aac\ADTS\MPEG2\10s_AAC_LC_42kbps_44.1khz_stereo.aac
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.AAC.63 - DeletePlaybackWindow AAC 48Khz ADTS MPEG4
+SoundFile e:\sounds\aac\ADTS\MPEG4\10s_AAC_LC_44kbps_48khz_stereo.aac
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.AAC.64 - DeletePlaybackWindow AAC ADIF mono
+SoundFile e:\sounds\aac\ADIF\10s_AAC_44khz_mono.aac
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+
+#Configuration Filename: PluginTest_AMR.cfg
+# DESCRIPTION: This config file is to test the AMR audio.
+#
+# History
+# 2005-03-21 Sue Xu 44 Test cases
+//**************************
+//* Play AMR NB Modes 0-7 (ID 102)
+//**************************
+// Testing Playback to EOF
+
+[TestCase]
+id 102
+Title Plugin.AMR.1 - Play 10s_AMR_NB_mode0.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AMR.2 - Play 10s_AMR_NB_mode1.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode1.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AMR.3 - Play 10s_AMR_NB_mode1.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode1.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AMR.4 - Play 10s_AMR_NB_mode3.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode3.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AMR.5 - Play 10s_AMR_NB_mode4.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode4.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AMR.6 - Play 10s_AMR_NB_mode5.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode5.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AMR.7 - Play 10s_AMR_NB_mode6.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode6.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AMR.8 - Play 10s_AMR_NB_mode7.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode7.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AMR.9 - Play AMR without ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode4_no_ext
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AMR.10 - Play AMR with other ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode7_other_ext.3gp
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+//**************************
+//* Play and Stop (ID 103)
+//**************************
+
+[TestCase]
+id 103
+Title Plugin.AMR.11 - PlayStop 10s_AMR_NB_mode0.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AMR.12 - PlayStop 10s_AMR_NB_mode1.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode1.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode1.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AMR.13 - PlayStop 10s_AMR_NB_mode1.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode1.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode1.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AMR.14 - PlayStop 10s_AMR_NB_mode3.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode3.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode3.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AMR.15 - PlayStop 10s_AMR_NB_mode4.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode4.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode4.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AMR.16 - PlayStop 10s_AMR_NB_mode5.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode5.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode5.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AMR.17 - PlayStop 10s_AMR_NB_mode6.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode6.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode6.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AMR.18 - PlayStop 10s_AMR_NB_mode7.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode7.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode7.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AMR.19 - PlayStop AMR without ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode4_no_ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode4_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AMR.20 - PlayStop AMR with other ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode7_other_ext.3gp
+SoundFile e:\sounds\amr\10s_AMR_NB_mode7_other_ext.3gp
+Delay 1000000
+[End_TestCase]
+
+
+
+//**************************
+//* Play Pause Play (ID 108)
+//**************************
+
+[TestCase]
+id 108
+Title Plugin.AMR.21 - PlayPausePlay 10s_AMR_NB_mode0.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0.amr
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.AMR.22 - PlayPausePlay AMR without ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_no_ext
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.AMR.23 - PlayPausePlay AMR with other ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_other_ext.3gp
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+//**************************
+//* Set Position - Play (ID 109)
+//**************************
+
+[TestCase]
+id 109
+Title Plugin.AMR.24 - SetPosition_Play 10s_AMR_NB_mode0.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0.amr
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.AMR.25 - SetPosition_Play AMR without ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_no_ext
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.AMR.26 - SetPosition_Play AMR with other ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_other_ext.3gp
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+//**************************
+//* Play - Get Position (ID 110)
+//**************************
+// Delay is the setting position, meaning every delay value, the get position is called.
+// This info be seen on the log file.
+
+[TestCase]
+id 110
+Title Plugin.AMR.27 - GetPosition_Play 10s_AMR_NB_mode0.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.AMR.28 - GetPosition_Play AMR without ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.AMR.29 - GetPosition_Play AMR with other ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_other_ext.3gp
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Get Duration (ID 111)
+//**************************
+
+[TestCase]
+id 111
+Title Plugin.AMR.30 - GetDuration 10s_AMR_NB_mode0.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.AMR.31 - GetDuration AMR without ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.AMR.32 - GetDuration AMR with other ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_other_ext.3gp
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Volume Max and Medium (ID 112)
+//**************************
+
+[TestCase]
+id 112
+Title Plugin.AMR.33 - SettingVolume 10s_AMR_NB_mode7.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0.amr
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.AMR.34 - SettingVolume AMR without ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_no_ext
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.AMR.35 - SettingVolume AMR with other ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_other_ext.3gp
+[End_TestCase]
+
+//**************************
+//* Play - Volume Ramping (ID 113)
+//**************************
+
+[TestCase]
+id 113
+Title Plugin.AMR.36 - VolumeRamping 10s_AMR_NB_mode0.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0.amr
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.AMR.37 - VolumeRamping AMR without ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_no_ext
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.AMR.38 - VolumeRamping AMR with other ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_other_ext.3gp
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Set Playback Window (ID 115)
+//**************************
+
+
+[TestCase]
+id 115
+Title Plugin.AMR.39 - SetPlaybackWindow 10s_AMR_NB_mode7.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode7.amr
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 02 000 000
+EndPosition 05 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.AMR.40 - SetPlaybackWindow AMR without ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode7_no_ext
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 02 000 000
+EndPosition 05 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 115
+Title Plugin.AMR.41 - SetPlaybackWindow AMR with other ext
+SoundFile e:\sounds\amr\10s_3GP_AMR_NB_12.2kbps.3gp
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 02 000 000
+EndPosition 05 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Delete Playback Window (ID 116)
+//**************************
+
+[TestCase]
+id 116
+Title Plugin.AMR.42 - DeletePlaybackWindow 10s_AMR_NB_mode0.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0.amr
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.AMR.43 - DeletePlaybackWindow AMR without ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_no_ext
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.AMR.44 - DeletePlaybackWindow AMR with other ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode0_other_ext.3gp
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+# Configuration Filename: PluginTest_AWB.cfg
+# DESCRIPTION: This config file is to test the AWB audio.
+#
+# History
+# 2005-03-21 Sue Xu 46 Test cases
+
+//**************************
+//* Play AMR WB Modes 0-8 (ID 102)
+//**************************
+// Testing Playback to EOF
+
+[TestCase]
+id 102
+Title Plugin.AWB.1 - Play 10s_AMR_WB_6.6kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_6.6kbps.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AWB.2 - Play 10s_AMR_WB_8.85kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_8.85kbps.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AWB.3 - Play 10s_AMR_WB_12.65kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_12.65kbps.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AWB.4 - Play 10s_AMR_WB_14.25kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_14.25kbps.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AWB.5 - Play 10s_AMR_WB_15.85kbps.awb
+SoundFile e:\sounds\awb\10s_AMR_WB_15.85kbps.awb
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AWB.6 - Play 10s_AMR_WB_18.25kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_18.25kbps.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AWB.7 - Play 10s_AMR_WB_19.85kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_19.85kbps.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AWB.8 - Play 10s_AMR_WB_23.05kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_23.05kbps.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AWB.9 - Play 10s_AMR_WB_23.85kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps.amr
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AWB.10 - Play AWB without ext
+SoundFile e:\sounds\awb\10s_AMR_WB_mode8_no_ext
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.AWB.11 - Play AWB with other ext
+SoundFile e:\sounds\awb\10s_3GP_AMR_WB_mode8.3gp
+Expected Duration 2 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+//**************************
+//* Play and Stop (ID 103)
+//**************************
+
+[TestCase]
+id 103
+Title Plugin.AWB.12 - PlayStop 10s_AMR_WB_6.6kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_6.6kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_6.6kbps.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AWB.13 - PlayStop 10s_AMR_WB_8.85kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_8.85kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_8.85kbps.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AWB.14 - PlayStop 10s_AMR_WB_12.65kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_12.65kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_12.65kbps.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AWB.15 - PlayStop 10s_AMR_WB_14.25kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_14.25kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_14.25kbps.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AWB.16 - PlayStop 10s_AMR_WB_15.85kbps.awb
+SoundFile e:\sounds\awb\10s_AMR_WB_15.85kbps.awb
+SoundFile e:\sounds\awb\10s_AMR_WB_15.85kbps.awb
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AWB.17 - PlayStop 10s_AMR_WB_18.25kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_18.25kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_18.25kbps.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AWB.18 - PlayStop 10s_AMR_WB_19.85kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_19.85kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_19.85kbps.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AWB.19 - PlayStop 10s_AMR_WB_23.05kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_23.05kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_23.05kbps.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AWB.20 - PlayStop 10s_AMR_WB_23.85kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AWB.21 - PlayStop AWB without ext
+SoundFile e:\sounds\awb\10s_AMR_WB_mode8_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.AWB.22 - PlayStop AWB with other ext
+SoundFile e:\sounds\awb\10s_3GP_AMR_WB_mode8.3gp
+Delay 1000000
+[End_TestCase]
+
+
+//**************************
+//* Play Pause Play (ID 108)
+//**************************
+
+[TestCase]
+id 108
+Title Plugin.AWB.23 - PlayPausePlay 10s_AMR_WB_23.85kbps_Generic.awb
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic.awb
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.AWB.24 - PlayPausePlay AWB without ext
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic_no_ext
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.AWB.25 - PlayPausePlay AWB with other ext
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic_other_ext.3gp
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+//**************************
+//* Set Position - Play (ID 109)
+//**************************
+
+[TestCase]
+id 109
+Title Plugin.AWB.26 - SetPosition_Play 10s_AMR_WB_15.85kbps.awb
+SoundFile e:\sounds\awb\10s_AMR_WB_15.85kbps.awb
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.AWB.27 - SetPosition_Play AWB without ext
+SoundFile e:\sounds\awb\10s_AMR_WB_15.85kbps_no_ext
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.AWB.28 - SetPosition_Play AWB with other ext
+SoundFile e:\sounds\awb\10s_AMR_WB_15.85kbps_other_ext.3gp
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+//**************************
+//* Play - Get Position (ID 110)
+//**************************
+// Delay is the setting position, meaning every delay value, the get position is called.
+// This info be seen on the log file.
+
+[TestCase]
+id 110
+Title Plugin.AWB.29 - GetPosition_Play 10s_AMR_WB_15.85kbps.awb
+SoundFile e:\sounds\awb\10s_AMR_WB_15.85kbps.awb
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.AWB.30 - GetPosition_Play AWB without ext
+SoundFile e:\sounds\awb\10s_AMR_WB_15.85kbps_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.AWB.31 - GetPosition_Play AWB with other ext
+SoundFile e:\sounds\awb\10s_AMR_WB_15.85kbps_other_ext.3gp
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Get Duration (ID 111)
+//**************************
+
+[TestCase]
+id 111
+Title Plugin.AWB.32 - GetDuration 10s_AMR_WB_23.85kbps_Generic.awb
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic.awb
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.AWB.33 - GetDuration AWB without ext
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.AWB.34 - GetDuration AWB with other ext
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic_other_ext.3gp
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Volume Max and Medium (ID 112)
+//**************************
+
+[TestCase]
+id 112
+Title Plugin.AWB.35 - SettingVolume 10s_AMR_WB_15.85kbps.awb
+SoundFile e:\sounds\awb\10s_AMR_WB_15.85kbps.awb
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.AWB.36 - SettingVolume AWB without ext
+SoundFile e:\sounds\awb\10s_AMR_WB_15.85kbps_no_ext
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.AWB.37 - SettingVolume AWB with other ext
+SoundFile e:\sounds\awb\10s_AMR_WB_15.85kbps_other_ext.3gp
+[End_TestCase]
+
+//**************************
+//* Play - Volume Ramping (ID 113)
+//**************************
+
+[TestCase]
+id 113
+Title Plugin.AWB.38 - VolumeRamping 10s_AMR_WB_23.85kbps_Generic.awb
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic.awb
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.AWB.39 - VolumeRamping AWB without ext
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic_no_ext
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.AWB.40 - VolumeRamping AWB with other ext
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic_other_ext.3gp
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Set Playback Window (ID 115)
+//**************************
+
+[TestCase]
+id 115
+Title Plugin.AWB.41 - SetPlaybackWindow 10s_AMR_WB_23.05kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_23.05kbps.amr
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 02 000 000
+EndPosition 05 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.AWB.42 - SetPlaybackWindow AWB without ext
+SoundFile e:\sounds\awb\10s_AMR_WB_23.05kbps_no_ext
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 03 000 000
+EndPosition 06 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.AWB.43 - SetPlaybackWindow AWB with other ext
+SoundFile e:\sounds\awb\10s_3GP_AMR_WB_23.05kbps.3gp
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 03 000 000
+EndPosition 06 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Delete Playback Window (ID 116)
+//**************************
+
+[TestCase]
+id 116
+Title Plugin.AWB.44 - DeletePlaybackWindow 10s_AMR_WB_23.85kbps_Generic.awb
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic.awb
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.AWB.45 - DeletePlaybackWindow AWB without ext
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic_no_ext
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.AWB.46 - DeletePlaybackWindow AWB with other ext
+SoundFile e:\sounds\awb\10s_AMR_WB_23.85kbps_Generic_other_ext.3gp
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+# Configuration Filename: PluginTest_EAACplus.cfg
+# DESCRIPTION: This config file is to test the EAAC+ audio.
+#
+# History
+# 2005-04-12 Sue Xu - 49 Test cases
+//*******************************************
+//* Play 3gp EAAC+ audio files (ID 102)
+//*******************************************
+// Testing Playback to EOF
+
+[TestCase]
+id 102
+Title Plugin.HeAAC.1 - Play implicit stereo 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode0.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 102
+Title Plugin.HeAAC.2 - Play explicit non-backwards compatible stereo 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode2.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.HeAAC.3 - Play 20kbps 32khz 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AAC+_20kbps_32khz_Mono.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.HeAAC.4 - Play 16kbps 32khz mono 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AAC+_16kbps_32khz_Mono.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.HeAAC.5 - Play 24kbps 32khz stereo 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AAC+_24kbps_32khz_Stereo.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.HeAAC.6 - Play 20kbps 32khz 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AAC+_20kbps_32khz_Stereo.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.HeAAC.7 - Play 16kbps 32khz mono 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AAC+_16kbps_32khz_Mono.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.HeAAC.8 - Play 24kbps 32khz stereo 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AAC+_24kbps_32khz_Stereo.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.HeAAC.9 - Play 20kbps 32khz stereo 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AAC+_20kbps_32khz_Mono.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.HeAAC.10 - Play 16kbps 32khz 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AAC+_16kbps_32khz_Mono.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.HeAAC.11 - Play 24kbps 32khz stereo 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AAC+_24kbps_32khz_Stereo.3gp
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//*******************************************
+//* Play mp4 EAAC+ audio files (ID 102)
+//*******************************************
+// Testing Playback to EOF
+
+[TestCase]
+id 102
+Title Plugin.HeAAC.12 - Play implicit pstereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_0.mp4
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+
+[TestCase]
+id 102
+Title Plugin.HeAAC.13 - Play explicit backwards compatible pstereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_1.mp4
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 102
+Title Plugin.HeAAC.14 - Play explicit non-backwards compatible pstereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_2.mp4
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 102
+Title Plugin.HeAAC.15 - Play implicit stereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_0.mp4
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 102
+Title Plugin.HeAAC.16 - Play explicit backwards compatible stereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_1.mp4
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 102
+Title Plugin.HeAAC.17 - Play explicit non-backwards compatible stereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_2.mp4
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//************************************
+//* Play EAAC+ (ID 103)
+//************************************
+// Testing Play Stop Play to EOF
+
+[TestCase]
+id 103
+Title Plugin.HeAAC.18 - PlayStop implicit stereo 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode0.3gp
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode0.3gp
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 103
+Title Plugin.HeAAC.19 - PlayStop explicit non-backwards compatible stereo 3gp audio
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode2.3gp
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode2.3gp
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.HeAAC.20 - PlayStop implicit pstereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_0.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_0.mp4
+Delay 1000000
+[End_TestCase]
+
+
+
+[TestCase]
+id 103
+Title Plugin.HeAAC.21 - PlayStop explicit backwards compatible pstereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_1.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_1.mp4
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 103
+Title Plugin.HeAAC.22 - PlayStop explicit non-backwards compatible pstereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_2.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_2.mp4
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 103
+Title Plugin.HeAAC.23 - PlayStop implicit stereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_0.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_0.mp4
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 103
+Title Plugin.HeAAC.24 - PlayStop explicit backwards compatible stereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_1.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_1.mp4
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 103
+Title Plugin.HeAAC.25 - PlayStop explicit non-backwards compatible stereo mp4 audio
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_2.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_2.mp4
+Delay 1000000
+[End_TestCase]
+
+
+
+//***************************************
+//* Play - Volume Max and Medium (ID 112)
+//***************************************
+
+[TestCase]
+id 112
+Title Plugin.HeAAC.26 - SettingVolume 10s_MP4_stereo_0.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_0.mp4
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 112
+Title Plugin.HeAAC.27 - SettingVolume 10s_3GP_AMR_NB_mode2.3gp
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode2.3gp
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 112
+Title Plugin.HeAAC.28 - SettingVolume 10s_MP4_pstereo_1.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_1.mp4
+Delay 1000000
+[End_TestCase]
+
+
+//********************************
+//* Play - Volume Ramping (ID 113)
+//********************************
+
+[TestCase]
+id 113
+Title Plugin.HeAAC.29 - VolumeRamping 10s_MP4_stereo_0.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_0.mp4
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 113
+Title Plugin.HeAAC.30 - VolumeRamping 10s_3GP_AMR_NB_mode2.3gp
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode2.3gp
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 113
+Title Plugin.HeAAC.31 - VolumeRamping 10s_MP4_pstereo_1.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_1.mp4
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+
+//**************************
+//* Play Pause Play (ID 108)
+//**************************
+
+[TestCase]
+id 108
+Title Plugin.HeAAC.32 - PlayPausePlay 10s_MP4_stereo_0.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_0.mp4
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 108
+Title Plugin.HeAAC.33 - PlayPausePlay 10s_3GP_AMR_NB_mode2.3gp
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode2.3gp
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 108
+Title Plugin.HeAAC.34 - PlayPausePlay 10s_MP4_pstereo_1.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_1.mp4
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+
+//******************************
+//* Set Position - Play (ID 109)
+//******************************
+
+[TestCase]
+id 109
+Title Plugin.HeAAC.35 - SetPosition_Play 10s_MP4_stereo_0.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_0.mp4
+Position 000 500 000
+ErrorRange 3 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 109
+Title Plugin.HeAAC.36 - SetPosition_Play 10s_3GP_AMR_NB_mode2.3gp
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode2.3gp
+Position 000 500 000
+ErrorRange 3 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 109
+Title Plugin.HeAAC.37 - SetPosition_Play 10s_MP4_pstereo_1.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_1.mp4
+Position 000 500 000
+ErrorRange 3 000 000
+[End_TestCase]
+
+
+
+//*******************************
+//* Play - Get Position (ID 110)
+//*******************************
+// Delay is the setting position, meaning every delay value, the get position is called.
+// This info be seen on the log file.
+[TestCase]
+id 110
+Title Plugin.HeAAC.38 - GetPosition_Play 10s_MP4_stereo_0.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_0.mp4
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 110
+Title Plugin.HeAAC.39 - GetPosition_Play 10s_3GP_AMR_NB_mode2.3gp
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode2.3gp
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 110
+Title Plugin.HeAAC.40 - GetPosition_Play 10s_MP4_pstereo_1.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_1.mp4
+Delay 1000000
+[End_TestCase]
+
+
+
+//******************************
+//* Play - Get Duration (ID 111)
+//******************************
+[TestCase]
+id 111
+Title Plugin.HeAAC.41 - GetDuration 10s_MP4_stereo_0.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_0.mp4
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 111
+Title Plugin.HeAAC.42 - GetDuration 10s_3GP_AMR_NB_mode2.3gp
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode2.3gp
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 111
+Title Plugin.HeAAC.43 - GetDuration 10s_MP4_pstereo_1.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_1.mp4
+Delay 1000000
+[End_TestCase]
+
+
+//*************************************
+//* Play - Set Playback Window (ID 115)
+//*************************************
+
+[TestCase]
+id 115
+Title Plugin.HeAAC.44 - SetPlaybackWindow 10s_MP4_stereo_0.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_0.mp4
+StartPosition 3 000 000
+EndPosition 7 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 115
+Title Plugin.HeAAC.45 - SetPlaybackWindow 10s_3GP_AMR_NB_mode2.3gp
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode2.3gp
+StartPosition 3 000 000
+EndPosition 7 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 115
+Title Plugin.HeAAC.46 - SetPlaybackWindow 10s_MP4_pstereo_1.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_1.mp4
+StartPosition 0 000 000
+EndPosition 5 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+
+
+//****************************************
+//* Play - Delete Playback Window (ID 116)
+//****************************************
+
+
+[TestCase]
+id 116
+Title Plugin.HeAAC.47 - DeletePlaybackWindow 10s_MP4_stereo_0.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_stereo_0.mp4
+StartPosition 3 000 000
+EndPosition 7 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 116
+Title Plugin.HeAAC.48 - DeletePlaybackWindow 10s_3GP_AMR_NB_mode2.3gp
+SoundFile e:\sounds\HeAAC\10s_3GP_AMR_NB_mode2.3gp
+StartPosition 3 000 000
+EndPosition 7 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 116
+Title Plugin.HeAAC.49 - DeletePlaybackWindow 10s_MP4_pstereo_1.mp4
+SoundFile e:\sounds\HeAAC\10s_MP4_pstereo_1.mp4
+StartPosition 0 000 000
+EndPosition 5 000 000
+Delay 1000000
+[End_TestCase]
+
+# Configuration Filename: PluginTest_m4a.cfg
+# DESCRIPTION: This config file is to test the m4a audio.
+#
+# History
+# 2005-03-21 Sue Xu - 56 Test cases
+
+//*******************************************
+//* Play M4a Sample Rate and BiteRate(ID 102)
+//*******************************************
+// Testing Playback to EOF
+
+[TestCase]
+id 102
+Title Plugin.M4a.1 - Play Mono 8kbps 11kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_8kbps_11.025khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 102
+Title Plugin.M4a.2 - Play Mono 16kbps 22kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_16kbps_22.05khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.3 - Play Mono 20kbps 24kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_20kbps_24khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.4 - Play Mono 24kbps 32kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_24kbps_32khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.5 - Play 28kbps 32kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_28kbps_32khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.6 - Play Mono 32kbps 32kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_32kbps_32khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.7 - Play Mono 40kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_40kbps_44.1khz_mono.m4a
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.8 - Play Mono 48kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_48kbps_44.1khz_mono.m4a
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.9 - Play Mono 56kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_56kbps_44.1khz_mono.m4a
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.10 - Play Mono 64kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_64kbps_44.1khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.11 - Play Mono 80kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_80kbps_44.1khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.12 - Play Mono 96kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_96kbps_44.1khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.13 - Play Mono 112kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_112kbps_44.1khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.14 - Play Mono 128kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_128kbps_44.1khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.15 - Play Mono 160kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_160kbps_44.1khz_mono.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.16 - Play Stereo 16kbps 11kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_16kbps_11.025khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.17 - Play Stereo 20kbps 11kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_20kbps_16khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.18 - Play Stereo 24kbps 16kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_24kbps_16khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.19 - Play Stereo 28kbps 16kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_28kbps_16khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.20 - Play Stereo 32kbps 22kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_32kbps_22.05khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.21 - Play Stereo 40kbps 24kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_40kbps_24khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.22 - Play Stereo 48kbps 32kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_48kbps_32khz_stereo.m4a
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.23 - Play Stereo 56kbps 32kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_56kbps_32khz_stereo.m4a
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.24 - Play Stereo 64kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_64kbps_44.1khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.25 - Play Stereo 80kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_80kbps_44.1khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.26 - Play Stereo 96kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_96kbps_44.1khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.27 - Play Stereo 112kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_112kbps_44.1khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.28 - Play Stereo 128kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_128kbps_44.1khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.29 - Play Stereo 160kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_160kbps_44.1khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.30 - Play Stereo 192kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_192kbps_44.1khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.31 - Play Stereo 224kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_224kbps_44.1khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.32 - Play Stereo 256kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_256kbps_44.1khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.33 - Play Stereo 320kbps 44kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_320kbps_44.1khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.34 - Play Stereo 112kbps 48kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_112kbps_48khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.35 - Play Stereo 128kbps 48kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_128kbps_48khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.36 - Play Stereo 160kbps 48kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_160kbps_48khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.37 - Play Stereo 192kbps 48kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_192kbps_48khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.38 - Play Stereo 224kbps 48kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_224kbps_48khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.39 - Play Stereo 256kbps 48kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_256kbps_48khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.M4a.40 - Play Stereo 320kbps 48kHz m4a audio
+SoundFile e:\sounds\m4a\10s_AAC_LC_320kbps_48khz_stereo.m4a
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+
+//************************************
+//* Play M4a (ID 103)
+//************************************
+// Testing Play Stop Play to EOF
+
+[TestCase]
+id 103
+Title Plugin.M4a.41 - PlayStop Mono 8kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_8kbps_11.025khz_mono.m4a
+SoundFile e:\sounds\M4a\10s_AAC_LC_8kbps_11.025khz_mono.m4a
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 103
+Title Plugin.M4a.42 - PlayStop Stereo 16kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_16kbps_11.025khz_stereo.m4a
+SoundFile e:\sounds\M4a\10s_AAC_LC_16kbps_11.025khz_stereo.m4a
+Delay 1000000
+[End_TestCase]
+
+
+//***************************************
+//* Play - Volume Max and Medium (ID 112)
+//***************************************
+
+[TestCase]
+id 112
+Title Plugin.M4a.43 - SettingVolume Mono 8kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_8kbps_11.025khz_mono.m4a
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 112
+Title Plugin.M4a.44 - SettingVolume Stereo 16kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_16kbps_11.025khz_stereo.m4a
+Delay 1000000
+[End_TestCase]
+
+
+//********************************
+//* Play - Volume Ramping (ID 113)
+//********************************
+
+[TestCase]
+id 113
+Title Plugin.M4a.45 - VolumeRamping Mono 8kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_8kbps_11.025khz_mono.m4a
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 113
+Title Plugin.M4a.46 - VolumeRamping Stereo 16kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_16kbps_11.025khz_stereo.m4a
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+
+//**************************
+//* Play Pause Play (ID 108)
+//**************************
+
+[TestCase]
+id 108
+Title Plugin.M4a.47 - PlayPausePlay Mono 8kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_8kbps_11.025khz_mono.m4a
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 108
+Title Plugin.M4a.48 - PlayPausePlay Stereo 16kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_16kbps_11.025khz_stereo.m4a
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//******************************
+//* Set Position - Play (ID 109)
+//******************************
+
+[TestCase]
+id 109
+Title Plugin.M4a.49 - SetPosition_Play Mono 8kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_8kbps_11.025khz_mono.m4a
+Position 000 500 000
+ErrorRange 3 000 000
+[End_TestCase]
+
+
+[TestCase]
+id 109
+Title Plugin.M4a.50 - SetPosition_Play Stereo 16kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_16kbps_11.025khz_stereo.m4a
+Position 000 500 000
+ErrorRange 3 000 000
+[End_TestCase]
+
+
+
+//*******************************
+//* Play - Get Position (ID 110)
+//*******************************
+// Delay is the setting position, meaning every delay value, the get position is called.
+// This info be seen on the log file.
+
+
+[TestCase]
+id 110
+Title Plugin.M4a.51 - GetPosition_Play Mono 8kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_8kbps_11.025khz_mono.m4a
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 110
+Title Plugin.M4a.52 - GetPosition_Play Stereo 16kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_16kbps_11.025khz_stereo.m4a
+Delay 1000000
+[End_TestCase]
+
+
+
+//******************************
+//* Play - Get Duration (ID 111)
+//******************************
+
+[TestCase]
+id 111
+Title Plugin.M4a.53 - GetDuration Mono 8kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_8kbps_11.025khz_mono.m4a
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 111
+Title Plugin.M4a.54 - GetDuration Stereo 16kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_16kbps_11.025khz_stereo.m4a
+Delay 1000000
+[End_TestCase]
+
+
+//*************************************
+//* Play - Set Playback Window (ID 115)
+//*************************************
+
+
+[TestCase]
+id 115
+Title Plugin.M4a.55 - SetPlaybackWindow Mono 8kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_8kbps_11.025khz_mono.m4a
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 115
+Title Plugin.M4a.56 - SetPlaybackWindow Stereo 16kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_16kbps_11.025khz_stereo.m4a
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+
+
+//****************************************
+//* Play - Delete Playback Window (ID 116)
+//****************************************
+
+
+[TestCase]
+id 116
+Title Plugin.M4a.57 - DeletePlaybackWindow Mono 8kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_8kbps_11.025khz_mono.m4a
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 116
+Title Plugin.M4a.58 - DeletePlaybackWindow Stereo 16kbps 11kHz m4a audio
+SoundFile e:\sounds\M4a\10s_AAC_LC_16kbps_11.025khz_stereo.m4a
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+# Configuration Filename: PluginTest_Midi.cfg
+# DESCRIPTION: This config file is to test the MIDI, SP-MIDI, and RMF audio.
+#
+# History
+# 2005-10-17 Sue Xu 120 Test cases
+
+//**************************
+//* Play MIDI, SP-MIDI, RMF audio file (ID 102)
+//**************************
+// Testing Playback to EOF
+
+[TestCase]
+id 102
+Title Plugin.MIDI.1 - Play midi 10s_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_MID_Generic.mid
+//Expected Duration 4 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MIDI.2 - Play midi without ext
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext
+//Expected Duration 4 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MIDI.3 - Play midi with different ext
+SoundFile e:\sounds\mid\10s_MID_Generic_other_ext.3gp
+//Expected Duration 4 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MIDI.4 - Play sp-midi 10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+//Expected Duration 13 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MIDI.5 - Play sp-midi 10s_SP_MID_Generic_no_ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+//Expected Duration 13 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MIDI.6 - Play sp-midi 10s_SP_MID_Generic_other_ext.amr
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.amr
+//Expected Duration 13 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MIDI.7 - Play rmf 10s_RMF_MID.rmf
+SoundFile e:\sounds\mid\10s_RMF_MID.rmf
+//Expected Duration 12 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MIDI.8 - Play rmf piano
+SoundFile e:\sounds\mid\10s_RMF_MID_no_ext
+//Expected Duration 12 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MIDI.9 - Play rmf piano.awb
+SoundFile e:\sounds\mid\10s_RMF_MID_other_ext.awb
+//Expected Duration 12 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MIDI.10 - Play mxmf 10s_MXMF.mxmf
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+//Expected Duration 12 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MIDI.11 - Play mxmf 10s_MXMF_no_ext
+SoundFile e:\sounds\mxmf\10s_MXMF_no_ext
+//Expected Duration 12 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MIDI.12 - Play mxmf 10s_MXMF_other_ext.awb
+SoundFile e:\sounds\mxmf\10s_MXMF_other_ext.awb
+//Expected Duration 12 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+//**************************
+//* Play and Stop (ID 103)
+//**************************
+
+[TestCase]
+id 103
+Title Plugin.MIDI.13 - PlayStop midi 10s_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext.mid
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext.mid
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MIDI.14 - PlayStop midi 10s_MID_Generic_no_ext
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MIDI.15 - PlayStop midi 10s_MID_Generic_other_ext.amr
+SoundFile e:\sounds\mid\10s_MID_Generic_other_ext.amr
+SoundFile e:\sounds\mid\10s_MID_Generic_other_ext.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MIDI.16 - PlayStop sp-midi 10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MIDI.17 - PlayStop sp-midi 10s_SP_MID_Generic_no_ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MIDI.18 - PlayStop sp-midi 10s_SP_MID_Generic_other_ext.amr
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.amr
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MIDI.19 - PlayStop rmf 10s_RMF_MID.rmf
+SoundFile e:\sounds\mid\10s_RMF_MID.rmf
+SoundFile e:\sounds\mid\10s_RMF_MID.rmf
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MIDI.20 - PlayStop rmf piano
+SoundFile e:\sounds\mid\10s_RMF_MID_no_ext
+SoundFile e:\sounds\mid\10s_RMF_MID_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MIDI.21 - PlayStop rmf piano.awb
+SoundFile e:\sounds\mid\10s_RMF_MID_other_ext.awb
+SoundFile e:\sounds\mid\10s_RMF_MID_other_ext.awb
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MIDI.22 - PlayStop mxmf 10s_MXMF.mxmf
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MIDI.23 - PlayStop mxmf 10s_MXMF_no_ext
+SoundFile e:\sounds\mxmf\10s_MXMF_no_ext
+SoundFile e:\sounds\mxmf\10s_MXMF_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MIDI.24 - PlayStop mxmf 10s_MXMF_other_ext.awb
+SoundFile e:\sounds\mxmf\10s_MXMF_other_ext.awb
+SoundFile e:\sounds\mxmf\10s_MXMF_other_ext.awb
+Delay 1000000
+[End_TestCase]
+
+
+
+//**************************
+//* Play Pause Play (ID 108)
+//**************************
+
+[TestCase]
+id 108
+Title Plugin.MIDI.25 - PlayPausePlay midi 10s_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext.mid
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.MIDI.26 - PlayPausePlay midi without ext
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.MIDI.27 - PlayPausePlay midi with other ext
+SoundFile e:\sounds\mid\10s_MID_Generic_other_ext.amr
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.MIDI.28 - PlayPausePlay sp-midi 10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.MIDI.29 - PlayPausePlay sp-midi without ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.MIDI.30 - PlayPausePlay sp-midi with other ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.amr
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.MIDI.31 - PlayPausePlay rmf 10s_RMF_MID.rmf
+SoundFile e:\sounds\mid\10s_RMF_MID.rmf
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.MIDI.32 - PlayPausePlay rmf without ext
+SoundFile e:\sounds\mid\10s_RMF_MID_no_ext
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.MIDI.33 - PlayPausePlay rmf with other ext
+SoundFile e:\sounds\mid\10s_RMF_MID_other_ext.awb
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.MIDI.34 - PlayPausePlay mxmf 10s_MXMF.mxmf
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.MIDI.35 - PlayPausePlay mxmf without ext
+SoundFile e:\sounds\mxmf\10s_MXMF_no_ext
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.MIDI.36 - PlayPausePlay mxmf with other ext
+SoundFile e:\sounds\mxmf\10s_MXMF_other_ext.awb
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+
+//**************************
+//* Set Position - Play (ID 109)
+//**************************
+
+[TestCase]
+id 109
+Title Plugin.MIDI.37 - SetPosition_Play midi 10s_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext.mid
+//Position 10 000 000
+Position 02 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.MIDI.38 - SetPosition_Play midi without ext
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext
+//Position 10 000 000
+Position 02 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.MIDI.39 - SetPosition_Play midi with other ext
+SoundFile e:\sounds\mid\10s_MID_Generic_other_ext.amr
+//Position 10 000 000
+Position 02 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.MIDI.40 - SetPosition_Play sp-midi 10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+Position 10 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.MIDI.41 - SetPosition_Play sp-midi without ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+Position 10 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.MIDI.42 - SetPosition_Play sp-midi with other ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.amr
+Position 10 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.MIDI.43 - SetPosition_Play rmf 10s_RMF_MID.rmf
+SoundFile e:\sounds\mid\10s_RMF_MID.rmf
+Position 10 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.MIDI.44 - SetPosition_Play rmf without ext
+SoundFile e:\sounds\mid\10s_RMF_MID_no_ext
+Position 10 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.MIDI.45 - SetPosition_Play rmf with other ext
+SoundFile e:\sounds\mid\10s_RMF_MID_other_ext.awb
+Position 10 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.MIDI.46 - SetPosition_Play mxmf 10s_MXMF.mxmf
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+Position 10 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.MIDI.47 - SetPosition_Play mxmf without ext
+SoundFile e:\sounds\mxmf\10s_MXMF_no_ext
+Position 10 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.MIDI.48 - SetPosition_Play mxmf with other ext
+SoundFile e:\sounds\mxmf\10s_MXMF_other_ext.awb
+Position 10 000 000
+ErrorRange 2 000 000
+[End_TestCase]
+
+//**************************
+//* Play - Get Position (ID 110)
+//**************************
+// Delay is the setting position, meaning every delay value, the get position is called.
+// This info be seen on the log file.
+
+[TestCase]
+id 110
+Title Plugin.MIDI.49 - GetPosition_Play midi 10s_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext.mid
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.MIDI.50 - GetPosition_Play midi without ext
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.MIDI.51 - GetPosition_Play midi with other ext
+SoundFile e:\sounds\mid\10s_MID_Generic_other_ext.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.MIDI.52 - GetPosition_Play sp-midi 10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.MIDI.53 - GetPosition_Play sp-midi without ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.MIDI.54 - GetPosition_Play sp-midi with other ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.MIDI.55 - GetPosition_Play rmf 10s_RMF_MID.rmf
+SoundFile e:\sounds\mid\10s_RMF_MID.rmf
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.MIDI.56 - GetPosition_Play rmf without ext
+SoundFile e:\sounds\mid\10s_RMF_MID_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.MIDI.57 - GetPosition_Play rmf with other ext
+SoundFile e:\sounds\mid\10s_RMF_MID_other_ext.awb
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.MIDI.58 - GetPosition_Play mxmf 10s_MXMF.mxmf
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.MIDI.59 - GetPosition_Play mxmf without ext
+SoundFile e:\sounds\mxmf\10s_MXMF_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.MIDI.60 - GetPosition_Play mxmf with other ext
+SoundFile e:\sounds\mxmf\10s_MXMF_other_ext.awb
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Get Duration (ID 111)
+//**************************
+
+[TestCase]
+id 111
+Title Plugin.MIDI.61 - GetDuration mid 10s_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext.mid
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.MIDI.62 - GetDuration mid without ext
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.MIDI.63 - GetDuration mid with other ext
+SoundFile e:\sounds\mid\10s_MID_Generic_other_ext.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.MIDI.64 - GetDuration sp-mid 10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.MIDI.65 - GetDuration sp-mid without ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.MIDI.66 - GetDuration sp-mid with other ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.amr
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.MIDI.67 - GetDuration rmf 10s_RMF_MID.rmf
+SoundFile e:\sounds\mid\10s_RMF_MID.rmf
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.MIDI.68 - GetDuration rmf without ext
+SoundFile e:\sounds\mid\10s_RMF_MID_no_ext
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.MIDI.69 - GetDuration rmf with other ext
+SoundFile e:\sounds\mid\10s_RMF_MID_other_ext.awb
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 111
+Title Plugin.MIDI.70 - GetDuration mxmf 10s_MXMF.mxmf
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.MIDI.71 - GetDuration mxmf without ext
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.MIDI.72 - GetDuration mxmf with other ext
+SoundFile e:\sounds\mxmf\10s_MXMF_other_ext.awb
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Volume Max and Medium (ID 112)
+//**************************
+
+[TestCase]
+id 112
+Title Plugin.MIDI.73 - SettingVolume mid 10s_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext.mid
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.MIDI.74 - SettingVolume mid without ext
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.MIDI.75 - SettingVolume mid with other ext
+SoundFile e:\sounds\mid\10s_MID_Generic_other_ext.amr
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.MIDI.76 - SettingVolume sp-mid 10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.MIDI.77 - SettingVolume sp-mid without ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.MIDI.78 - SettingVolume sp-mid with other ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.amr
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.MIDI.79 - SettingVolume rmf 10s_RMF_MID.rmf
+SoundFile e:\sounds\mid\10s_RMF_MID.rmf
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.MIDI.80 - SettingVolume rmf without ext
+SoundFile e:\sounds\mid\10s_RMF_MID_no_ext
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.MIDI.81 - SettingVolume rmf with other ext
+SoundFile e:\sounds\mid\10s_RMF_MID_other_ext.awb
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.MIDI.82 - SettingVolume mxmf 10s_MXMF.mxmf
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.MIDI.83 - SettingVolume mxmf without ext
+SoundFile e:\sounds\mxmf\10s_MXMF_no_ext
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.MIDI.84 - SettingVolume mxmf with other ext
+SoundFile e:\sounds\mxmf\10s_MXMF_other_ext.awb
+[End_TestCase]
+
+//**************************
+//* Play - Volume Ramping (ID 113)
+//**************************
+
+[TestCase]
+id 113
+Title Plugin.MIDI.85 - VolumeRamping mid 10s_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext.mid
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.MIDI.86 - VolumeRamping mid without ext
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.MIDI.87 - VolumeRamping mid with other ext
+SoundFile e:\sounds\mid\10s_MID_Generic_other_ext.amr
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.MIDI.88 - VolumeRamping sp-mid 10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.MIDI.89 - VolumeRamping sp-mid without ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.MIDI.90 - VolumeRamping sp-mid with other ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.amr
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.MIDI.91 - VolumeRamping rmf 10s_RMF_MID.rmf
+SoundFile e:\sounds\mid\10s_RMF_MID.rmf
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.MIDI.92 - VolumeRamping rmf without ext
+SoundFile e:\sounds\mid\10s_RMF_MID_no_ext
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.MIDI.93 - VolumeRamping rmf with other ext
+SoundFile e:\sounds\mid\10s_RMF_MID_other_ext.awb
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.MIDI.94 - VolumeRamping mxmf 10s_MXMF.mxmf
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.MIDI.95 - VolumeRamping mxmf without ext
+SoundFile e:\sounds\mxmf\10s_MXMF_no_ext
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.MIDI.96 - VolumeRamping mxmf with other ext
+SoundFile e:\sounds\mxmf\10s_MXMF_other_ext.awb
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Set Playback Window (ID 115)
+//**************************
+
+[TestCase]
+id 115
+Title Plugin.MIDI.97 - SetPlaybackWindow midi 10s_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext.mid
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.MIDI.98 - SetPlaybackWindow midi without ext
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.MIDI.99 - SetPlaybackWindow midi with other ext
+SoundFile e:\sounds\mid\10s_MID_Generic_other_ext.amr
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.MIDI.100 - SetPlaybackWindow sp-midi 10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+//StartPosition 10 000 000
+//EndPosition 20 000 000
+StartPosition 03 000 000
+EndPosition 06 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 115
+Title Plugin.MIDI.101 - SetPlaybackWindow sp-midi without ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+//StartPosition 10 000 000
+//EndPosition 20 000 000
+StartPosition 02 000 000
+EndPosition 06 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.MIDI.102 - SetPlaybackWindow sp-midi with other ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.awb
+//StartPosition 10 000 000
+//EndPosition 20 000 000
+StartPosition 02 000 000
+EndPosition 06 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.MIDI.103 - SetPlaybackWindow rmf 10s_RMF_MID.rmf
+SoundFile e:\sounds\mid\10s_RMF_MID.rmf
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.MIDI.104 - SetPlaybackWindow rmf without ext
+SoundFile e:\sounds\mid\10s_RMF_MID_no_ext
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.MIDI.105 - SetPlaybackWindow rmf with other ext
+SoundFile e:\sounds\mid\10s_RMF_MID_other_ext.3gp
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.MIDI.106 - SetPlaybackWindow mxmf 10s_MXMF.mxmf
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.MIDI.107 - SetPlaybackWindow mxmf without ext
+SoundFile e:\sounds\mxmf\10s_MXMF_no_ext
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.MIDI.108 - SetPlaybackWindow mxmf with other ext
+SoundFile e:\sounds\mxmf\10s_MXMF_other_ext.awb
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Delete Playback Window (ID 116)
+//**************************
+
+[TestCase]
+id 116
+Title Plugin.MIDI.109 - DeletePlaybackWindow midi 10s_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext.mid
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.MIDI.110 - DeletePlaybackWindow midi without ext
+SoundFile e:\sounds\mid\10s_MID_Generic_no_ext
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.MIDI.111 - DeletePlaybackWindow midi with other ext
+SoundFile e:\sounds\mid\10s_MID_Generic_other_ext.amr
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.MIDI.112 - DeletePlaybackWindow sp-midi 10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.MIDI.113 - DeletePlaybackWindow sp-midi without ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.MIDI.114 - DeletePlaybackWindow sp-midi with other ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.awb
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.MIDI.115 - DeletePlaybackWindow rmf 10s_RMF_MID.rmf
+SoundFile e:\sounds\mid\10s_RMF_MID.rmf
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.MIDI.116 - DeletePlaybackWindow rmf without ext
+SoundFile e:\sounds\mid\10s_RMF_MID_no_ext
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.MIDI.117 - DeletePlaybackWindow rmf with other ext
+SoundFile e:\sounds\mid\10s_RMF_MID_other_ext.3gp
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.MIDI.118 - DeletePlaybackWindow mxmf 10s_MXMF.mxmf
+SoundFile e:\sounds\mxmf\10s_MXMF.mxmf
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.MIDI.119 - DeletePlaybackWindow mxmf without ext
+SoundFile e:\sounds\mxmf\10s_MXMF_no_ext
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.MIDI.120 - DeletePlaybackWindow mxmf with other ext
+SoundFile e:\sounds\mxmf\10s_MXMF_other_ext.awb
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+# Configuration Filename: PluginTest_MP3.cfg
+# DESCRIPTION: This config file is to test the MP3 audio.
+#
+# History
+# 2005-03-21 Sue Xu - 137 Test cases
+
+//**************************
+//* Play MP3 Sample Rate (ID 102)
+//**************************
+// Testing Playback to EOF
+
+[TestCase]
+id 102
+Title Plugin.MP3.1 - Play 8Khz MPEG2.5
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2.5_8kbps_8khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.2 - Play 11Khz MPEG2.5
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2.5_8kbps_11.025khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.3 - Play 12Khz MPEG2.5
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2.5_8kbps_12khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.4 - Play 16Khz MPEG2
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_16kbps_16khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.5 - Play 22Khz MPEG2
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_16kbps_22.05khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.6 - Play 24 Khz MPEG2
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_16kbps_24khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.7 - Play 32 Khz MPEG1
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_32kbps_32khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.8 - Play 44 Khz MPEG1
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_32kbps_44.1khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.9 - Play 48 Khz MPEG1
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_32kbps_48khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//**********************************
+//* Play and Stop SampleRate(ID 103)
+//**********************************
+
+[TestCase]
+id 103
+Title Plugin.MP3.10 - PlayStop 8Khz MPEG2.5
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2.5_8kbps_8khz_stereo.mp3
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2.5_8kbps_8khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.11 - PlayStop 11Khz MPEG2.5
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2.5_24kbps_11.025khz_stereo.mp3
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2.5_24kbps_11.025khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.12 - PlayStop 12Khz MPEG2.5
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2.5_24kbps_12khz_stereo.mp3
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2.5_24kbps_12khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.13 - PlayStop 16Khz MPEG2
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_16kbps_16khz_stereo.mp3
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_16kbps_16khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.14 - PlayStop 22Khz MPEG2
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_16kbps_22.05khz_stereo.mp3
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_16kbps_22.05khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.15 - PlayStop 24Khz MPEG2
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_16kbps_24khz_stereo.mp3
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_16kbps_24khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.16 - PlayStop 32Khz MPEG1
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_32kbps_32khz_stereo.mp3
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_32kbps_32khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.17 - PlayStop 44Khz MPEG1
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_32kbps_44.1khz_stereo.mp3
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_32kbps_44.1khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.18 - PlayStop 48Khz MPEG1
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_32kbps_48khz_stereo.mp3
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_32kbps_48khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+
+//*****************************************
+//* Play MP3 Sample Rate Descriptor(ID 104)
+//*****************************************
+// Testing Play Descriptor to EOF
+
+
+
+//**********************************
+//* Play MP3 Bit Rate MPEG1 (ID 102)
+//**********************************
+// Testing Playback to EOF
+
+[TestCase]
+id 102
+Title Plugin.MP3.19 - Play 32Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_32kbps_44.1khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.20 - Play 40Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_40kbps_48khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.21 - Play 48Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_48kbps_48khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.22 - Play 56Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_56kbps_48khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.23 - Play 64Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_64kbps_48khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.24 - Play 80Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_80kbps_48khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.25 - Play 96Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_96kbps_48khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.26 - Play 112Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_112kbps_48khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.27 - Play 128Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_128kbps_48khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.28 - Play 160Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_160kbps_48khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.29 - Play 192Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_192kbps_48khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.30 - Play 224Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_224kbps_48khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.31 - Play 256Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_256kbps_48khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.32 - Play 320Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_320kbps_48khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//*******************************************
+//* Play and Stop MP3 Bit Rate MPEG1 (ID 103)
+//*******************************************
+
+[TestCase]
+id 103
+Title Plugin.MP3.33 - PlayStop 32Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_32kbps_44.1khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_32kbps_44.1khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.34 - PlayStop 40Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_40kbps_48khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_40kbps_48khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.35 - PlayStop 48Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_48kbps_48khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_48kbps_48khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.36 - PlayStop 56Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_56kbps_48khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_56kbps_48khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.37 - PlayStop 64Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_64kbps_48khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_64kbps_48khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.38 - PlayStop 80Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_80kbps_48khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_80kbps_48khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.39 - PlayStop 96Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_96kbps_48khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_96kbps_48khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.40 - PlayStop 112Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_112kbps_48khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_112kbps_48khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.41 - PlayStop 128Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_128kbps_48khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_128kbps_48khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.42 - PlayStop 160Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_160kbps_48khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_160kbps_48khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.43 - PlayStop 192Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_192kbps_48khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_192kbps_48khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.44 - PlayStop 224Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_224kbps_48khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_224kbps_48khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.45 - PlayStop 256Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_256kbps_48khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_256kbps_48khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.46 - PlayStop 320Kbps MPEG1
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_320kbps_48khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_320kbps_48khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+
+//********************************************
+//* Play MP3 Bit Rate MPEG1 Descriptor(ID 104)
+//********************************************
+
+
+
+
+//**************************************
+//* Play MP3 Bit Rate MPEG2/2.5 (ID 102)
+//**************************************
+// Testing Playback to EOF
+
+[TestCase]
+id 102
+Title Plugin.MP3.47 - Play 8Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_8kbps_24khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.48 - Play 16Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_16kbps_24khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.49 - Play 24Kbps MPEG2.5
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_24kbps_12khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.50 - Play 32Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_32kbps_24khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.51 - Play 40Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_40kbps_24khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.52 - Play 48Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_48kbps_24khz_mono.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.53 - Play 56Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_56kbps_24khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.54 - Play 64Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_64kbps_24khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.55 - Play 80Kbps MPEG2.5
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_80kbps_12khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.56 - Play 96Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_96kbps_12khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.57 - Play 112Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_112kbps_12khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.58 - Play 128Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_128kbps_12khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.59 - Play 144Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_144kbps_24khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.MP3.60 - Play 160Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_160kbps_12khz_stereo.mp3
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//******************************************
+//* PlayStop MP3 Bit Rate MPEG2/2.5 (ID 103)
+//******************************************
+
+[TestCase]
+id 103
+Title Plugin.MP3.61 - PlayStop 8Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_8kbps_24khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_8kbps_24khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.62 - PlayStop 16Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_16kbps_24khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_16kbps_24khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.63 - PlayStop 24Kbps MPEG2.5
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_24kbps_12khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_24kbps_12khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.64 - PlayStop 32Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_32kbps_24khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_32kbps_24khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.65 - PlayStop 40Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_40kbps_24khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_40kbps_24khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.66 - PlayStop 48Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_48kbps_24khz_mono.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_48kbps_24khz_mono.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.67 - PlayStop 56Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_56kbps_24khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_56kbps_24khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.68 - PlayStop 64Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_64kbps_24khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_64kbps_24khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.69 - PlayStop 80Kbps MPEG2.5
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_80kbps_12khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_80kbps_12khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.70 - PlayStop 96Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_96kbps_12khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_96kbps_12khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.71 - PlayStop 112Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_112kbps_12khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_112kbps_12khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.72 - PlayStop 128Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_128kbps_12khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_128kbps_12khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.73 - PlayStop 144Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_144kbps_24khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2_144kbps_24khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.MP3.74 - PlayStop 160Kbps MPEG2
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_160kbps_12khz_stereo.mp3
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_160kbps_12khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+
+
+//************************************************
+//* Play MP3 Bit Rate MPEG2/2.5 Descriptor(ID 104)
+//************************************************
+
+
+//***************************************
+//* Play Descriptor after another (ID 105)
+//***************************************
+
+
+//**************************
+//* Play Pause Play (ID 108)
+//**************************
+
+[TestCase]
+id 108
+Title Plugin.MP3.75 - PlayPausePlay MP3 MPEG2 24KHz 160Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_160kbps_24khz_stereo.mp3
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.MP3.76 - PlayPausePlay MP3 MPEG2 24KHz 56Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_56kbps_24khz_stereo.mp3
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.MP3.77 - PlayPausePlay MP3 MPEG1 48KHz 224Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_224kbps_48khz_stereo.mp3
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//******************************
+//* Set Position - Play (ID 109)
+//******************************
+
+[TestCase]
+id 109
+Title Plugin.MP3.78 - SetPosition_Play MP3 MPEG1 48KHz 224Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_224kbps_48khz_stereo.mp3
+Position 000 500 000
+ErrorRange 3 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.MP3.79 - SetPosition_Play MP3 MPEG1 48KHz 96Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_96kbps_48khz_stereo.mp3
+Position 05 000 000
+ErrorRange 3 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.MP3.80 - SetPosition_Play MP3 MPEG2 24KHz 56Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_56kbps_24khz_stereo.mp3
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//*******************************
+//* Play - Get Position (ID 110)
+//*******************************
+// Delay is the setting position, meaning every delay value, the get position is called.
+// This info be seen on the log file.
+
+[TestCase]
+id 110
+Title Plugin.MP3.81 - GetPosition_Play MP3 MPEG2 24KHz 160Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_160kbps_24khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.MP3.82 - GetPosition_Play MP3 MPEG2 24KHz 56Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_56kbps_24khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.MP3.83 - GetPosition_Play MP3 MPEG1 48KHz 96Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_96kbps_48khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+//******************************
+//* Play - Get Duration (ID 111)
+//******************************
+
+[TestCase]
+id 111
+Title Plugin.MP3.84 - GetDuration MP3 MPEG1 48KHz 96Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_96kbps_48khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.MP3.85 - GetDuration MP3 MPEG1 48KHz 224Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_224kbps_48khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.MP3.86 - GetDuration MP3 MPEG2 24KHz 56Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_56kbps_24khz_stereo.mp3
+Delay 1000000
+[End_TestCase]
+
+//***************************************
+//* Play - Volume Max and Medium (ID 112)
+//***************************************
+
+[TestCase]
+id 112
+Title Plugin.MP3.87 - SettingVolume MP3 MPEG2 16KHz
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_16kbps_16khz_stereo.mp3
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.MP3.88 - SettingVolume MP3 MPEG2.5 24Kbps
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_MPEG2.5_24kbps_12khz_stereo.mp3
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.MP3.89 - SettingVolume MP3 MPEG1 128Kbps
+SoundFile e:\sounds\mp3\BitRate\10s_MP3_128kbps_48khz_stereo.mp3
+[End_TestCase]
+
+//********************************
+//* Play - Volume Ramping (ID 113)
+//********************************
+
+[TestCase]
+id 113
+Title Plugin.MP3.90 - VolumeRamping MP3 MPEG2 24KHz 56Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_56kbps_24khz_stereo.mp3
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.MP3.91 - VolumeRamping MP3 MPEG2 24KHz 160Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_160kbps_24khz_stereo.mp3
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.MP3.92 - VolumeRamping MPEG1 48KHz 224Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_224kbps_48khz_stereo.mp3
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+//*************************************
+//* Play - Set Playback Window (ID 115)
+//*************************************
+
+[TestCase]
+id 115
+Title Plugin.MP3.93 - SetPlaybackWindow MP3 MPEG1 48KHz 224Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_224kbps_48khz_stereo.mp3
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.MP3.94 - SetPlaybackWindow MP3 MPEG1 48KHz 96Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_96kbps_48khz_stereo.mp3
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.MP3.95 - SetPlaybackWindow MP3 MPEG2 24KHz 56Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_56kbps_24khz_stereo.mp3
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+//****************************************
+//* Play - Delete Playback Window (ID 116)
+//****************************************
+
+[TestCase]
+id 116
+Title Plugin.MP3.96 - DeletePlaybackWindow MP3 MPEG1 48KHz 224Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_224kbps_48khz_stereo.mp3
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.MP3.97 - DeletePlaybackWindow MP3 MPEG1 48KHz 96Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_96kbps_48khz_stereo.mp3
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.MP3.98 - DeletePlaybackWindow MP3 MPEG2 24KHz 160Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_MPEG2_160kbps_24khz_stereo.mp3
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+# Configuration Filename: PluginTest_wav.cfg
+# DESCRIPTION: This config file is to test the wav audio.
+#
+# History
+# 2005-03-21 Sue Xu - 137 Test cases
+
+//**************************
+//* Play WAV Sample Rate (ID 102)
+//**************************
+// Testing Playback to EOF
+
+[TestCase]
+id 102
+Title Plugin.wav.1 - maintst2.wav
+SoundFile e:\sounds\wav\maintst2.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.2 - Play 11Khz MPEG2.5
+SoundFile e:\sounds\wav\maintst2.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.3 - Play 12Khz MPEG2.5
+SoundFile e:\sounds\wav\maintst2.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.4 - Play 16Khz MPEG2
+SoundFile e:\sounds\wav\maintst2.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.5 - Play 22Khz MPEG2
+SoundFile e:\sounds\wav\maintst2.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.6 - Play 24 Khz MPEG2
+SoundFile e:\sounds\wav\maintst2.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.7 - Play 32 Khz MPEG1
+SoundFile e:\sounds\wav\maintst2.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.8 - Play 44 Khz MPEG1
+SoundFile e:\sounds\wav\maintst2.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.9 - Play 48 Khz MPEG1
+SoundFile e:\sounds\wav\maintst2.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//**********************************
+//* Play and Stop SampleRate(ID 103)
+//**********************************
+
+[TestCase]
+id 103
+Title Plugin.wav.10 - PlayStop 8Khz MPEG2.5
+SoundFile e:\sounds\wav\maintst2.wav
+SoundFile e:\sounds\wav\maintst2.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.11 - PlayStop 11Khz MPEG2.5
+SoundFile e:\sounds\wav\maintst2.wav
+SoundFile e:\sounds\wav\maintst2.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.12 - PlayStop 12Khz MPEG2.5
+SoundFile e:\sounds\wav\maintst2.wav
+SoundFile e:\sounds\wav\maintst2.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.13 - PlayStop 16Khz MPEG2
+SoundFile e:\sounds\wav\maintst2.wav
+SoundFile e:\sounds\wav\maintst2.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.14 - PlayStop 22Khz MPEG2
+SoundFile e:\sounds\wav\maintst2.wav
+SoundFile e:\sounds\wav\maintst2.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.15 - PlayStop 24Khz MPEG2
+SoundFile e:\sounds\wav\maintst2.wav
+SoundFile e:\sounds\wav\maintst2.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.16 - PlayStop 32Khz MPEG1
+SoundFile e:\sounds\wav\maintst2.wav
+SoundFile e:\sounds\wav\maintst2.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.17 - PlayStop 44Khz MPEG1
+SoundFile e:\sounds\wav\maintst2.wav
+SoundFile e:\sounds\wav\maintst2.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.18 - PlayStop 48Khz MPEG1
+SoundFile e:\sounds\wav\maintst2.wav
+SoundFile e:\sounds\wav\maintst2.wav
+Delay 1000000
+[End_TestCase]
+
+
+//*****************************************
+//* Play wav Sample Rate Descriptor(ID 104)
+//*****************************************
+// Testing Play Descriptor to EOF
+
+
+//**********************************
+//* Play wav Bit Rate MPEG1 (ID 102)
+//**********************************
+// Testing Playback to EOF
+
+[TestCase]
+id 102
+Title Plugin.wav.19 - Play 32Kbps MPEG1
+SoundFile e:\sounds\wav\maintst3.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.20 - Play 40Kbps MPEG1
+SoundFile e:\sounds\wav\maintst3.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.21 - Play 48Kbps MPEG1
+SoundFile e:\sounds\wav\maintst3.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.22 - Play 56Kbps MPEG1
+SoundFile e:\sounds\wav\maintst3.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.23 - Play 64Kbps MPEG1
+SoundFile e:\sounds\wav\maintst3.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.24 - Play 80Kbps MPEG1
+SoundFile e:\sounds\wav\maintst3.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.25 - Play 96Kbps MPEG1
+SoundFile e:\sounds\wav\maintst3.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.26 - Play 112Kbps MPEG1
+SoundFile e:\sounds\wav\maintst3.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.27 - Play 128Kbps MPEG1
+SoundFile e:\sounds\wav\maintst3.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.28 - Play 160Kbps MPEG1
+SoundFile e:\sounds\wav\maintst3.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.29 - Play 192Kbps MPEG1
+SoundFile e:\sounds\wav\maintst3.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.30 - Play 224Kbps MPEG1
+SoundFile e:\sounds\wav\maintst3.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.31 - Play 256Kbps MPEG1
+SoundFile e:\sounds\wav\maintst3.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.32 - Play 320Kbps MPEG1
+SoundFile e:\sounds\wav\maintst3.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//*******************************************
+//* Play and Stop wav Bit Rate MPEG1 (ID 103)
+//*******************************************
+
+[TestCase]
+id 103
+Title Plugin.wav.33 - PlayStop 32Kbps MPEG1
+SoundFile e:\sounds\wav\maintst.wav
+SoundFile e:\sounds\wav\maintst.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.34 - PlayStop 40Kbps MPEG1
+SoundFile e:\sounds\wav\maintst.wav
+SoundFile e:\sounds\wav\maintst.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.35 - PlayStop 48Kbps MPEG1
+SoundFile e:\sounds\wav\maintst.wav
+SoundFile e:\sounds\wav\maintst.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.36 - PlayStop 56Kbps MPEG1
+SoundFile e:\sounds\wav\maintst.wav
+SoundFile e:\sounds\wav\maintst.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.37 - PlayStop 64Kbps MPEG1
+SoundFile e:\sounds\wav\maintst.wav
+SoundFile e:\sounds\wav\maintst.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.38 - PlayStop 80Kbps MPEG1
+SoundFile e:\sounds\wav\maintst.wav
+SoundFile e:\sounds\wav\maintst.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.39 - PlayStop 96Kbps MPEG1
+SoundFile e:\sounds\wav\maintst.wav
+SoundFile e:\sounds\wav\maintst.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.40 - PlayStop 112Kbps MPEG1
+SoundFile e:\sounds\wav\maintst.wav
+SoundFile e:\sounds\wav\maintst.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.41 - PlayStop 128Kbps MPEG1
+SoundFile e:\sounds\wav\maintst.wav
+SoundFile e:\sounds\wav\maintst.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.42 - PlayStop 160Kbps MPEG1
+SoundFile e:\sounds\wav\maintst.wav
+SoundFile e:\sounds\wav\maintst.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.43 - PlayStop 192Kbps MPEG1
+SoundFile e:\sounds\wav\maintst.wav
+SoundFile e:\sounds\wav\maintst.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.44 - PlayStop 224Kbps MPEG1
+SoundFile e:\sounds\wav\maintst.wav
+SoundFile e:\sounds\wav\maintst.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.45 - PlayStop 256Kbps MPEG1
+SoundFile e:\sounds\wav\maintst.wav
+SoundFile e:\sounds\wav\maintst.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.46 - PlayStop 320Kbps MPEG1
+SoundFile e:\sounds\wav\maintst.wav
+SoundFile e:\sounds\wav\maintst.wav
+Delay 1000000
+[End_TestCase]
+
+
+//********************************************
+//* Play wav Bit Rate MPEG1 Descriptor(ID 104)
+//********************************************
+
+
+
+
+//**************************************
+//* Play wav Bit Rate MPEG2/2.5 (ID 102)
+//**************************************
+// Testing Playback to EOF
+
+[TestCase]
+id 102
+Title Plugin.wav.47 - Play 8Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav10s.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.48 - Play 16Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav10s.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.49 - Play 24Kbps MPEG2.5
+SoundFile e:\sounds\wav\recordwav10s.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.50 - Play 32Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav10s.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.51 - Play 40Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav10s.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.52 - Play 48Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav10s.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.53 - Play 56Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav10s.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.54 - Play 64Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav10s.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.55 - Play 80Kbps MPEG2.5
+SoundFile e:\sounds\wav\recordwav10s.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.56 - Play 96Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav10s.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.57 - Play 112Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav10s.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.58 - Play 128Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav10s.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.59 - Play 144Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav10s.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.wav.60 - Play 160Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav10s.wav
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//******************************************
+//* PlayStop wav Bit Rate MPEG2/2.5 (ID 103)
+//******************************************
+
+[TestCase]
+id 103
+Title Plugin.wav.61 - PlayStop 8Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav30s.wav
+SoundFile e:\sounds\wav\recordwav30s.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.62 - PlayStop 16Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav30s.wav
+SoundFile e:\sounds\wav\recordwav30s.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.63 - PlayStop 24Kbps MPEG2.5
+SoundFile e:\sounds\wav\recordwav30s.wav
+SoundFile e:\sounds\wav\recordwav30s.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.64 - PlayStop 32Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav30s.wav
+SoundFile e:\sounds\wav\recordwav30s.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.65 - PlayStop 40Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav30s.wav
+SoundFile e:\sounds\wav\recordwav30s.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.66 - PlayStop 48Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav30s.wav
+SoundFile e:\sounds\wav\recordwav30s.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.67 - PlayStop 56Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav30s.wav
+SoundFile e:\sounds\wav\recordwav30s.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.68 - PlayStop 64Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav30s.wav
+SoundFile e:\sounds\wav\recordwav30s.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.69 - PlayStop 80Kbps MPEG2.5
+SoundFile e:\sounds\wav\recordwav30s.wav
+SoundFile e:\sounds\wav\recordwav30s.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.70 - PlayStop 96Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav30s.wav
+SoundFile e:\sounds\wav\recordwav30s.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.71 - PlayStop 112Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav30s.wav
+SoundFile e:\sounds\wav\recordwav30s.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.72 - PlayStop 128Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav30s.wav
+SoundFile e:\sounds\wav\recordwav30s.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.73 - PlayStop 144Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav30s.wav
+SoundFile e:\sounds\wav\recordwav30s.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.wav.74 - PlayStop 160Kbps MPEG2
+SoundFile e:\sounds\wav\recordwav30s.wav
+SoundFile e:\sounds\wav\recordwav30s.wav
+Delay 1000000
+[End_TestCase]
+
+
+
+//************************************************
+//* Play wav Bit Rate MPEG2/2.5 Descriptor(ID 104)
+//************************************************
+
+
+//***************************************
+//* Play Descriptor after another (ID 105)
+//***************************************
+
+
+[TestCase]
+id 108
+Title Plugin.wav.76 - PlayPausePlay wav MPEG2 24KHz 56Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.wav.77 - PlayPausePlay wav MPEG1 48KHz 224Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//******************************
+//* Set Position - Play (ID 109)
+//******************************
+
+[TestCase]
+id 109
+Title Plugin.wav.78 - SetPosition_Play wav MPEG1 48KHz 224Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+Position 000 500 000
+ErrorRange 3 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.wav.79 - SetPosition_Play wav MPEG1 48KHz 96Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+Position 20 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.wav.80 - SetPosition_Play wav MPEG2 24KHz 56Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//*******************************
+//* Play - Get Position (ID 110)
+//*******************************
+// Delay is the setting position, meaning every delay value, the get position is called.
+// This info be seen on the log file.
+
+[TestCase]
+id 110
+Title Plugin.wav.81 - GetPosition_Play wav MPEG2 24KHz 160Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.wav.82 - GetPosition_Play wav MPEG2 24KHz 56Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.wav.83 - GetPosition_Play wav MPEG1 48KHz 96Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+Delay 1000000
+[End_TestCase]
+
+//******************************
+//* Play - Get Duration (ID 111)
+//******************************
+
+[TestCase]
+id 111
+Title Plugin.wav.84 - GetDuration wav MPEG1 48KHz 96Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.wav.85 - GetDuration wav MPEG1 48KHz 224Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.wav.86 - GetDuration wav MPEG2 24KHz 56Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+Delay 1000000
+[End_TestCase]
+
+//***************************************
+//* Play - Volume Max and Medium (ID 112)
+//***************************************
+
+[TestCase]
+id 112
+Title Plugin.wav.87 - SettingVolume wav MPEG2 16KHz
+SoundFile e:\sounds\wav\recordwav30s.wav
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.wav.88 - SettingVolume wav MPEG2.5 24Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.wav.89 - SettingVolume wav MPEG1 128Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+[End_TestCase]
+
+//********************************
+//* Play - Volume Ramping (ID 113)
+//********************************
+
+[TestCase]
+id 113
+Title Plugin.wav.90 - VolumeRamping wav MPEG2 24KHz 56Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.wav.91 - VolumeRamping wav MPEG2 24KHz 160Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.wav.92 - VolumeRamping MPEG1 48KHz 224Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+RampDuration 5 000 000
+Delay 1000000
+[End_TestCase]
+
+//*************************************
+//* Play - Set Playback Window (ID 115)
+//*************************************
+
+[TestCase]
+id 115
+Title Plugin.wav.93 - SetPlaybackWindow wav MPEG1 48KHz 224Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.wav.94 - SetPlaybackWindow wav MPEG1 48KHz 96Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.wav.95 - SetPlaybackWindow wav MPEG2 24KHz 56Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+StartPosition 10 000 000
+EndPosition 20 000 000
+ErrorRange 2 000 000
+Delay 1000000
+[End_TestCase]
+
+//****************************************
+//* Play - Delete Playback Window (ID 116)
+//****************************************
+
+[TestCase]
+id 116
+Title Plugin.wav.96 - DeletePlaybackWindow wav MPEG1 48KHz 224Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.wav.97 - DeletePlaybackWindow wav MPEG1 48KHz 96Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.wav.98 - DeletePlaybackWindow wav MPEG2 24KHz 160Kbps
+SoundFile e:\sounds\wav\recordwav30s.wav
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+# Configuration Filename: PluginTest_3GPP-MP4.cfg
+# DESCRIPTION: This config file is to test the 3GPP and MP4 audio.
+#
+# History
+# 2005-11-01 Sue Xu 70 Test cases
+//**************************
+//* Play 3GPP , 3g2 and MP4
+//**************************
+// Testing Playback to EOF
+
+[TestCase]
+id 102
+Title Plugin.3GP.3g2.mp4.1 - Play mp4 audio
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+Expected Duration 28 978 000
+ErrorRange 1 500 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.3GP.3g2.mp4.2 - Play 3gpp-aac audio
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+Expected Duration 29 120 000
+ErrorRange 1 500 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.3GP.3g2.mp4.3 - Play 3gpp-amr audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+Expected Duration 37 420 000
+ErrorRange 1 500 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.3GP.3g2.mp4.4 - Play 3gpp-awb audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+Expected Duration 38 460 000
+ErrorRange 1 500 000
+[End_TestCase]
+
+
+[TestCase]
+id 102
+Title Plugin.3GP.3g2.mp4.5 - Play 3gpp2-aac audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+ErrorRange 1 500 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.3GP.3g2.mp4.6 - Play 3gpp2-amr audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+ErrorRange 1 500 000
+[End_TestCase]
+
+[TestCase]
+id 102
+Title Plugin.3GP.3g2.mp4.7 - Play 3gpp2-awb audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+ErrorRange 1 500 000
+[End_TestCase]
+
+
+
+
+//**************************
+//* Play and Stop (ID 103)
+//**************************
+
+[TestCase]
+id 103
+Title Plugin.3GP.3g2.mp4.8 - PlayStop mp4 audio
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.3GP.3g2.mp4.9 - PlayStop 3gpp-aac audio
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.3GP.3g2.mp4.10 - PlayStop 3gpp-amr audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.3GP.3g2.mp4.11 - PlayStop 3gpp-awb audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.3GP.3g2.mp4.12 - Play 3gpp2-aac audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.3GP.3g2.mp4.13 - Play 3gpp2-amr audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 103
+Title Plugin.3GP.3g2.mp4.14 - Play 3gpp2-awb audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+Delay 1000000
+[End_TestCase]
+
+
+//**************************
+//* Play Pause Play (ID 108)
+//**************************
+
+[TestCase]
+id 108
+Title Plugin.3GP.3g2.mp4.15 - PlayPausePlay mp4 audio
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 500 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.3GP.3g2.mp4.16 - PlayPausePlay 3gpp-aac audio
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 500 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.3GP.3g2.mp4.17 - PlayPausePlay 3gpp-amr audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 500 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.3GP.3g2.mp4.18 - PlayPausePlay 3gpp-awb audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 500 000
+[End_TestCase]
+
+
+[TestCase]
+id 108
+Title Plugin.3GP.3g2.mp4.19 - Play 3gpp2-aac audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 500 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.3GP.3g2.mp4.20 - Play 3gpp2-amr audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 500 000
+[End_TestCase]
+
+[TestCase]
+id 108
+Title Plugin.3GP.3g2.mp4.21 - Play 3gpp2-awb audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+PauseDelay 5000000
+PlayDelay 10000000
+ErrorRange 1 500 000
+[End_TestCase]
+
+
+//**************************
+//* Set Position - Play (ID 109)
+//**************************
+
+[TestCase]
+id 109
+Title Plugin.3GP.3g2.mp4.22 - SetPosition_Play mp4 audio
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.3GP.3g2.mp4.23 - SetPosition_Play 3gpp-aac audio
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.3GP.3g2.mp4.24 - SetPosition_Play 3gpp-amr audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.3GP.3g2.mp4.25 - SetPosition_Play 3gpp-awb audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.3GP.3g2.mp4.26 - Play 3gpp2-aac audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.3GP.3g2.mp4.27 - Play 3gpp2-amr audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+[TestCase]
+id 109
+Title Plugin.3GP.3g2.mp4.28 - Play 3gpp2-awb audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+Position 10 000 000
+ErrorRange 1 000 000
+[End_TestCase]
+
+
+//**************************
+//* Play - Get Position (ID 110)
+//**************************
+// Delay is the setting position, meaning every delay value, the get position is called.
+// This info be seen on the log file.
+
+[TestCase]
+id 110
+Title Plugin.3GP.3g2.mp4.29 - GetPosition_Play mp4 audio
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.3GP.3g2.mp4.30 - GetPosition_Play 3gpp-aac audio
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.3GP.3g2.mp4.31 - GetPosition_Play 3gpp-amr audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.3GP.3g2.mp4.32 - GetPosition_Play 3gpp-awb audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.3GP.3g2.mp4.33 - Play 3gpp2-aac audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.3GP.3g2.mp4.34 - Play 3gpp2-amr audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 110
+Title Plugin.3GP.3g2.mp4.35 - Play 3gpp2-awb audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Get Duration (ID 111)
+//**************************
+
+[TestCase]
+id 111
+Title Plugin.3GP.3g2.mp4.36 - GetDuration mp4 audio
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.3GP.3g2.mp4.37 - GetDuration 3gpp-aac audio
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.3GP.3g2.mp4.38 - GetDuration 3gpp-amr audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.3GP.3g2.mp4.39 - GetDuration 3gpp-awb audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.3GP.3g2.mp4.40 - GetDuration 3gpp2-aac audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.3GP.3g2.mp4.41 - GetDuration 3gpp2-amr audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 111
+Title Plugin.3GP.3g2.mp4.42 - GetDuration 3gpp2-awb audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+Delay 1000000
+[End_TestCase]
+
+
+
+//**************************
+//* Play - Volume Max and Medium (ID 112)
+//**************************
+
+[TestCase]
+id 112
+Title Plugin.3GP.3g2.mp4.43 - SettingVolume mp4 audio
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.3GP.3g2.mp4.44 - SettingVolume 3gpp-aac audio
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.3GP.3g2.mp4.45 - SettingVolume 3gpp-amr audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.3GP.3g2.mp4.46 - SettingVolume 3gpp-awb audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.3GP.3g2.mp4.47 - SettingVolume 3gpp2-aac audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.3GP.3g2.mp4.48 - SettingVolume 3gpp2-amr audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 112
+Title Plugin.3GP.3g2.mp4.49 - SettingVolume 3gpp2-awb audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Volume Ramping (ID 113)
+//**************************
+
+[TestCase]
+id 113
+Title Plugin.3GP.3g2.mp4.50 - VolumeRamping mp4 audio
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.3GP.3g2.mp4.51 - VolumeRamping 3gpp-aac audio
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.3GP.3g2.mp4.52 - VolumeRamping 3gpp-amr audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.3GP.3g2.mp4.53 - VolumeRamping 3gpp-awb audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.3GP.3g2.mp4.54 - VolumeRamping 3gpp2-aac audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.3GP.3g2.mp4.55 - VolumeRamping 3gpp2-amr audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 113
+Title Plugin.3GP.3g2.mp4.56 - VolumeRamping 3gpp2-awb audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+RampDuration 3 000 000
+Delay 1000000
+[End_TestCase]
+
+//**************************
+//* Play - Set Playback Window (ID 115)
+//**************************
+
+[TestCase]
+id 115
+Title Plugin.3GP.3g2.mp4.57 - SetPlaybackWindow mp4 audio
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+//StartPosition 10 000 000
+//EndPosition 25 000 000
+StartPosition 02 000 000
+EndPosition 07 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.3GP.3g2.mp4.58 - SetPlaybackWindow 3gpp-aac audio
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+//StartPosition 10 000 000
+//EndPosition 25 000 000
+StartPosition 02 000 000
+EndPosition 07 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.3GP.3g2.mp4.59 - SetPlaybackWindow 3gpp-amr audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 03 000 000
+EndPosition 05 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.3GP.3g2.mp4.60 - SetPlaybackWindow 3gpp-awb audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 03 000 000
+EndPosition 05 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.3GP.3g2.mp4.61 - SetPlaybackWindow 3gpp2-aac audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 03 000 000
+EndPosition 05 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.3GP.3g2.mp4.62 - SetPlaybackWindow 3gpp2-amr audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 03 000 000
+EndPosition 05 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.3GP.3g2.mp4.63 - SetPlaybackWindow 3gpp2-awb audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+//StartPosition 15 000 000
+//EndPosition 35 000 000
+StartPosition 02 000 000
+EndPosition 06 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+
+//**************************
+//* Play - Delete Playback Window (ID 116)
+//**************************
+
+[TestCase]
+id 116
+Title Plugin.3GP.3g2.mp4.64 - DeletePlaybackWindow mp4 audio
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.3GP.3g2.mp4.65 - DeletePlaybackWindow 3gpp-aac audio
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.3GP.3g2.mp4.66 - DeletePlaybackWindow 3gpp-amr audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.3GP.3g2.mp4.67 - DeletePlaybackWindow 3gpp-awb audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+StartPosition 10 000 000
+EndPosition 20 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 116
+Title Plugin.3GP.3g2.mp4.68 - DeletePlaybackWindow 3gpp2-aac audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+StartPosition 15 000 000
+EndPosition 35 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.3GP.3g2.mp4.69 - DeletePlaybackWindow 3gpp2-amr audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+StartPosition 15 000 000
+EndPosition 35 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 116
+Title Plugin.3GP.3g2.mp4.70 - DeletePlaybackWindow 3gpp2-awb audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+StartPosition 15 000 000
+EndPosition 35 000 000
+Delay 1000000
+[End_TestCase]
+
+//Get Formats. Required: id
+// Optional: Title, InterfaceId
+[TestCase]
+id 101
+Title MMFTS.PLAY.1 - Get playback formats (KUidInterfaceMMFAudioPlayDevice)
+InterfaceId 270497494
+[End_TestCase]
+
+//Get Formats. Required: id
+// Optional: Title, InterfaceId
+[TestCase]
+id 101
+Title MMFTS.PLAY.1 - Get playback formats (KUidInterfaceMMFAudioPlayController)
+InterfaceId 270497496
+[End_TestCase]
+
+//Play. Required: id (to specify the type of test case), SoundFile (the clip to be played)
+// Optional: Title (to differentiate this case by name from other cases)
+[TestCase]
+id 102
+Title MMFTS.PLAY.2 - Play PCM_08_08_m.wav
+SoundFile e:\sounds\PCM_08_08_m.wav
+ErrorRange 0 800 000
+ExpectedDuration 2 000 000
+[End_TestCase]
+
+//Play. Required: id (to specify the type of test case), SoundFile (the clip to be played)
+// Optional: Title (to differentiate this case by name from other cases)
+[TestCase]
+id 102
+Title MMFTS.PLAY.2 - Play PCM_08_08_m.wav (don't check duration)
+SoundFile e:\sounds\PCM_08_08_m.wav
+#ErrorRange 0 800 000
+#ExpectedDuration 2 000 000
+[End_TestCase]
+
+//Play. Stop and then open and play a second file. Required id, SoundFile (x2)
+// Optional: Title, Delay (Microseconds)
+[TestCase]
+id 103
+Title MMFTS.PLAY.3 - PlayStop PCM_08_08_m / SOUND24
+SoundFile e:\sounds\secretag.wav
+SoundFile e:\sounds\SOUND24.WAV
+Delay 5000000
+[End_TestCase]
+
+//Play using descriptor based sound. Required: id, SoundDes
+// Optional: Title
+[TestCase]
+id 104
+Title MMFTS.PLAY.4 - Descriptor SOUND24.WAV
+SoundDes e:\sounds\SOUND24.WAV
+ErrorRange 0 500 000
+ExpectedDuration 1 080 000
+[End_TestCase]
+
+//Play. Stop and then open and play a second descriptor. Required id, SoundDes (x2)
+// Optional: Title, Delay (Microseconds)
+[TestCase]
+id 105
+Title MMFTS.PLAY.5 - PlayStopDes CLAP / SOUND24
+SoundDes e:\sounds\kissapp.wav
+SoundDes e:\sounds\SOUND24.WAV
+Delay 3000000
+[End_TestCase]
+
+//Play url. Required: id, SoundUrl
+// Optional: Title, MimeType (default is KNullDesC8), IapId
+#[TestCase]
+#id 106
+#Title MMFTS.PLAY.6 - Url PCM_08_08_m.wav
+#SoundUrl http://www.freewebs.com/tpcconline/wav/texasfight.wav
+#MimeType audio/x-wav
+#IapId -1
+#[End_TestCase]
+
+//Play url. Stop then open another url. Required: id, SoundUrl
+// Optional: Title, MimeType (KNullDesC8), IapId, Delay, another set of SoundUrl, Mimetype, IapId
+#[TestCase]
+#id 107
+#Title MMFTS.PLAY.7 - Url Stop/Open PCM_08_08_m / CLAP.WAV
+#SoundUrl http://www.freewebs.com/tpcconline/wav/texasfight.wav
+#MimeType audio/x-wav
+#IapId 12
+#Delay 1 500 0
+#SoundUrl http://www.freewebs.com/tpcconline/wav/texasfight.wav
+#MimeType audio/wav
+#IapId 11
+#[End_TestCase]
+
+//Play a file. Pause for a few seconds. Required id, SoundFile
+// Optional: Title, PauseDelay (Microseconds), PlayDelay (Microseconds).
+// Note, if the play delay is shorter than the pause delay they'll be swapped
+// The PauseDelay and PlayDelay represent the amount of time that has passed since the
+// clip began playing. So in this example the clip will be paused half a second after it started,
+// and then continue playing 1.5 seconds later (this means 2 seconds after it started playing)
+//
+// Think about this timeline:
+// |-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|
+// Start 0.5s 1 sec 1.5 sec 2 sec 2.5 sec
+// Pause Resume Playback
+[TestCase]
+id 108
+Title MMFTS.PLAY.8 - PlayPause kissapp.wav
+SoundFile e:\sounds\kissapp.wav
+PauseDelay 3000000
+PlayDelay 5000000
+ErrorRange 2 000 000
+[End_TestCase]
+
+//Set Play Position. Required: id, SoundFile
+// Optional: Title, Position (seconds miliseconds microseconds, added), ErrorRange (seconds miliseconds microseconds, added)
+[TestCase]
+id 109
+Title MMFTS.PLAY.9 - Position kissapp.wav
+SoundFile e:\sounds\kissapp.wav
+Position 2 000 000
+ErrorRange 3 000 000
+[End_TestCase]
+
+//Play and report position. Required: id, SoundFile
+// Optional: Title, Delay
+[TestCase]
+id 110
+Title MMFTS.PLAY.10 - report position DRUMROLL.wav
+SoundFile e:\sounds\DRUMROLL.wav
+Delay 250000
+[End_TestCase]
+
+//Play and report duration. Required: id, SoundFile
+// Optional: Title, Delay(Microseconds), Expected duration (seconds miliseconds microseconds)
+[TestCase]
+id 111
+Title MMFTS.PLAY.11 - Report duration SOUND24.WAV
+SoundFile e:\sounds\SOUND24.WAV
+Delay 1500
+ExpectedDuration 1 085 351
+[End_TestCase]
+
+//Play two files with different volumes. Required: id, SoundFile
+// Optional: Title, SoundFile (second file to play)
+[TestCase]
+id 112
+Title MMFTS.PLAY.12 - Volumes SOUND24 / CLAP
+SoundFile e:\sounds\SOUND24.WAV
+SoundFile e:\sounds\CLAP.WAV
+[End_TestCase]
+
+//Required: id, Title, SoundFile
+// Optional: Ramp (seconds miliseconds microseconds, added), Delay (Microseconds)
+[TestCase]
+id 113
+Title MMFTS.PLAY.13 - Ramp SOUND24.WAV
+SoundFile e:\sounds\SOUND24.WAV
+RampDuration 0 750
+Delay 2500
+[End_TestCase]
+
+//Metainformation. Required: id, SoundFile
+// Optional: Title
+[TestCase]
+id 114
+Title MMFTS.PLAY.14 - MetaInfo (Radioboy - Nike)
+SoundFile e:\Sounds\Radioboy-Nike.mp3
+[End_TestCase]
+
+//Metainformation. Required: id, SoundFile
+// Optional: Title
+#[TestCase]
+#id 114
+#itle MMFTS.PLAY.14 - MetaInfo (canyon.mid)
+#SoundFile e:\Sounds\canyon.mid
+#[End_TestCase]
+
+//Play with window. Required: id, SoundFile
+// Optional: Title, StartPosition, EndPosition (seconds miliseconds microseconds, added), Delay (Microseconds)
+[TestCase]
+id 115
+Title MMFTS.PLAY.15 - Window
+SoundFile e:\sounds\kissapp.wav
+StartPosition 2 000 000
+EndPosition 4 000 000
+ErrorRange 3 000 000
+Delay 500000
+[End_TestCase]
+
+//Play with window. Required: id, SoundFile
+// Optional: Title, StartPosition, EndPosition (seconds miliseconds microseconds, added), Delay (Microseconds)
+[TestCase]
+id 116
+Title MMFTS.PLAY.16 - Window Clear
+SoundFile e:\sounds\kissapp.wav
+StartPosition 2 000 000
+EndPosition 4 000 000
+ErrorRange 3 000 000
+Delay 100000
+[End_TestCase]
+
+//Required: id, SoundFile
+// Optional: Title, RepeatTimes, SilenceDuration, ErrorRange (leave out so that expected duration is not checked)
+[TestCase]
+id 117
+Title MMFTS.PLAY.17 - Repeat PCM_08_08_m
+SoundFile e:\sounds\PCM_08_08_m.wav
+RepeatTimes 3
+SilenceDuration 3 000 000
+ErrorRange 2 0 0
+ExpectedDuration 2 000 000
+[End_TestCase]
+
+//Required: id, SoundFile
+// Optional: Title, RepeatTimes, SilenceDuration, ErrorRange (leave out so that expected duration is not checked), ExpectedDuration (leave out to use GetDuration())
+[TestCase]
+id 117
+Title MMFTS.PLAY.17 - Repeat PCM_08_08_m (don't check duration)
+SoundFile e:\sounds\PCM_08_08_m.wav
+RepeatTimes 3
+SilenceDuration 3 000 000
+#ErrorRange 0 500 0
+#ExpectedDuration 2 000 000
+[End_TestCase]
+
+//Balance. Required: id, SoundFile
+// Optional: Title, Balance
+[TestCase]
+id 118
+Title MMFTS.PLAY.18 - balance ULAW_08_08_s.wav
+SoundFile e:\sounds\ULAW_08_08_s.wav
+Balance 90
+[End_TestCase]
+
+//Play two files with different priorities. Required: id, SoundFile
+// Optional: Title, SoundFile (second file), Priority (either specify two values or none. If only one is specified then the behavior is undefined)
+[TestCase]
+id 119
+Title MMFTS.PLAY.19 - SOUND24.WAV
+SoundFile e:\sounds\SOUND24.WAV
+SoundFile e:\sounds\CLAP.WAV
+Priority 3
+Priority 23
+
+PriorityPreference 2
+PriorityPreference 1
+[End_TestCase]
+
+
+//******************NEGATIVE TEST CASE******************//
+
+[TestCase]
+id 115
+Title Plugin.AMR.01 - SetPlaybackWindow 10s_AMR_NB_mode7.amr
+SoundFile e:\sounds\amr\10s_AMR_NB_mode7.amr
+NegativeValue 1
+StartPosition 15 000 000
+EndPosition 35 000 000
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.AMR.02 - SetPlaybackWindow AMR without ext
+SoundFile e:\sounds\amr\10s_AMR_NB_mode7_no_ext
+StartPosition 15 000 000
+EndPosition 35 000 000
+NegativeValue 1
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 115
+Title Plugin.AMR.03 - SetPlaybackWindow AMR with other ext
+SoundFile e:\sounds\amr\10s_3GP_AMR_NB_12.2kbps.3gp
+StartPosition 15 000 000
+EndPosition 35 000 000
+NegativeValue 1
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.AWB.04 - SetPlaybackWindow 10s_AMR_WB_23.05kbps.amr
+SoundFile e:\sounds\awb\10s_AMR_WB_23.05kbps.amr
+StartPosition 15 000 000
+EndPosition 35 000 000
+NegativeValue 1
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.AWB.05 - SetPlaybackWindow AWB without ext
+SoundFile e:\sounds\awb\10s_AMR_WB_23.05kbps_no_ext
+StartPosition 15 000 000
+EndPosition 35 000 000
+NegativeValue 1
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.AWB.06 - SetPlaybackWindow AWB with other ext
+SoundFile e:\sounds\awb\10s_3GP_AMR_WB_23.05kbps.3gp
+StartPosition 15 000 000
+EndPosition 35 000 000
+NegativeValue 1
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.MIDI.07 - SetPlaybackWindow sp-midi 10s_SP_MID_Generic.mid
+SoundFile e:\sounds\mid\10s_SP_MID_Generic.mid
+StartPosition 10 000 000
+EndPosition 25 000 000
+NegativeValue 1
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+
+[TestCase]
+id 115
+Title Plugin.MIDI.08 - SetPlaybackWindow sp-midi without ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_no_ext
+StartPosition 10 000 000
+EndPosition 25 000 000
+NegativeValue 1
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.MIDI.09 - SetPlaybackWindow sp-midi with other ext
+SoundFile e:\sounds\mid\10s_SP_MID_Generic_other_ext.awb
+StartPosition 10 000 000
+EndPosition 25 000 000
+NegativeValue 1
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.3GP.3g2.mp4.10 - SetPlaybackWindow mp4 audio
+SoundFile e:\sounds\3gpp\10s_MP4_16kbps_22.05khz_mono.mp4
+StartPosition 10 000 000
+EndPosition 25 000 000
+NegativeValue 1
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.3GP.3g2.mp4.11 - SetPlaybackWindow 3gpp-aac audio
+SoundFile e:\sounds\3gpp\10s_3GP_AAC+_24kbps_16khz_mono.3gp
+StartPosition 10 000 000
+EndPosition 25 000 000
+NegativeValue 1
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.3GP.3g2.mp4.12 - SetPlaybackWindow 3gpp-amr audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_NB_mode3.3gp
+StartPosition 15 000 000
+EndPosition 35 000 000
+NegativeValue 1
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.3GP.3g2.mp4.13 - SetPlaybackWindow 3gpp-awb audio
+SoundFile e:\sounds\3gpp\10s_3GP_AMR_WB_mode0.3gp
+StartPosition 15 000 000
+EndPosition 35 000 000
+NegativeValue 1
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.3GP.3g2.mp4.14 - SetPlaybackWindow 3gpp2-aac audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AAC_Generic.3g2
+StartPosition 15 000 000
+EndPosition 35 000 000
+NegativeValue 1
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.3GP.3g2.mp4.15 - SetPlaybackWindow 3gpp2-amr audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AMR_Generic.3g2
+StartPosition 15 000 000
+EndPosition 35 000 000
+NegativeValue 1
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.3GP.3g2.mp4.16 - SetPlaybackWindow 3gpp2-awb audio
+SoundFile e:\sounds\3gpp2\10s_3GPP2_AWB_Generic.3g2
+StartPosition 15 000 000
+EndPosition 35 000 000
+NegativeValue 1
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
+[TestCase]
+id 115
+Title Plugin.MP3.17 - SetPlaybackWindow MP3 MPEG1 48KHz 96Kbps
+SoundFile e:\sounds\mp3\SampleRate\10s_MP3_96kbps_48khz_stereo.mp3
+StartPosition 15 000 000
+EndPosition 35 000 000
+NegativeValue 1
+ErrorRange 3 000 000
+Delay 1000000
+[End_TestCase]
+
--- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioPlaybackTestModule/inc/MmfTsPlay.h Thu May 27 13:20:50 2010 +0300
+++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioPlaybackTestModule/inc/MmfTsPlay.h Wed Jun 23 18:47:10 2010 +0300
@@ -80,7 +80,10 @@
_LIT(KTagExpectedDuration, "ExpectedDuration");
_LIT(KTagWindowStart, "StartPosition");
_LIT(KTagWindowEnd, "EndPosition");
+
+ _LIT(KNegativeTag, "NegativeValue");
+
_LIT(KTagMime, "MimeType");
_LIT(KTagIapId, "IapId");
--- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioPlaybackTestModule/inc/SimpleSoundPlayer.h Thu May 27 13:20:50 2010 +0300
+++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioPlaybackTestModule/inc/SimpleSoundPlayer.h Wed Jun 23 18:47:10 2010 +0300
@@ -204,6 +204,8 @@
TBool playVolume;
TBool metaInfo;
TBool playWindow;
+
+ TBool iNegativePlayBackWindow;
TBool clearWindow;
TBool setBalance;
TBool iDontPlayAudioClip; // Binh
--- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioPlaybackTestModule/src/MmfTsPlay_core.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioPlaybackTestModule/src/MmfTsPlay_core.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -1934,7 +1934,7 @@
if ( !section->GetLine(KTagSoundFile, FileNamePtr, ENoTag) )
{
- TBool UsingStartDefault, UsingEndDefault, UsingDefaultReportDelay;
+ TBool UsingStartDefault, UsingEndDefault, UsingDefaultReportDelay ,UsingNegativeTestCaseDefault;
TFileName FileName = FileNamePtr;
// TInt WindowError;
@@ -1956,6 +1956,14 @@
ReportDelay = GetTimeIntervalL(section, KTagDelay, UsingDefaultReportDelay, (TTimeIntervalMicroSeconds32)KDefaultReportDelay);
iLogger->Log(_L("Setting delays to report position to [%d]"), ReportDelay.Int());
+
+
+ TInt NegativeTestCaseValue = GetIntL(section, KNegativeTag, UsingNegativeTestCaseDefault,0);
+
+ if (NegativeTestCaseValue == 1)
+ {
+ sndPlayer->iNegativePlayBackWindow = true;
+ }
CParameters *reportParams = new(ELeave)CParameters(CSimpleSoundPlayer::KPlayerActionReportPosition);
CleanupStack::PushL(reportParams);
@@ -1975,8 +1983,14 @@
TTimeIntervalMicroSeconds ExpectedDuration = TTimeIntervalMicroSeconds(I64INT(EndPosition.Int64()) - I64INT(StartPosition.Int64()));
iLogger->Log(_L("ExpectedDuration: %d") ,ExpectedDuration.Int64() );
-
- if ( Abs(ExpectedDuration.Int64() - PerceivedDuration.Int64()) > ErrorRange.Int64() )
+
+ if((ExpectedDuration > (sndPlayer->GetDuration())) && (sndPlayer->iNegativePlayBackWindow))
+ {
+ iLogger->Log(_L("ExpectedDuration is greater than the actual duration of the file"));
+ iLogger->Log(_L("Negative Test was successful"));
+ aResult.iResultDes.Copy(KTestCaseResultSuccess());
+ }
+ else if ( Abs(ExpectedDuration.Int64() - PerceivedDuration.Int64()) > ErrorRange.Int64() )
{ //Durations too different
iLogger->Log(_L("The clips duration is too different from the actual duration + position") );
aResult.iResult = KErrExpectedValueDifferent;
--- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioPlaybackTestModule/src/SimpleSoundPlayer.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioPlaybackTestModule/src/SimpleSoundPlayer.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -448,12 +448,14 @@
}
-
+
+ TInt pwErr =0;
+
if (playWindow)
{
iLogger.Log(_L("SetPlayWindow, start=[%d]"),startPosition.Int64());
iLogger.Log(_L("SetPlayWindow, end=[%d]"), endPosition.Int64() );
- TInt pwErr = iMdaPlayer->SetPlayWindow(startPosition, endPosition);
+ pwErr = iMdaPlayer->SetPlayWindow(startPosition, endPosition);
iLogger.Log(_L("SetPlayWindow err=[%d]"), pwErr);
if (clearWindow)
{
@@ -462,7 +464,11 @@
}
}
-
+ if (iNegativePlayBackWindow && pwErr )
+ {
+ iLogger.Log(_L("SetPlayWindow Expected Err for negative test case"));
+ CActiveScheduler::Stop();
+ }
if (setBalance)
{
SetBalance(aBalance);
--- a/mmmw_info/mmmw_metadata/mmmw_metadata.mrp Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_info/mmmw_metadata/mmmw_metadata.mrp Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,3 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
component mmmw_metadata
source \sf\mw\mmmw\mmmw_info\mmmw_metadata
source \sf\mw\mmmw\package_definition.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/group/bld.inf Wed Jun 23 18:47:10 2010 +0300
@@ -0,0 +1,24 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_TESTMMPFILES
+#include "../openmaxaltestmodule/group/bld.inf"
+
+// End of File
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_common.cfg Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_common.cfg Wed Jun 23 18:47:10 2010 +0300
@@ -52,6 +52,7 @@
MO_ENGINE 1
MO_PLAYER 4
MO_RECORDER 5
+MO_RADIO 6
XA_BOOLEAN_FALSE 0
XA_BOOLEAN_TRUE 1
@@ -107,6 +108,7 @@
XA_PLAYSTATE_STOPPED 1
XA_PLAYSTATE_PAUSED 2
XA_PLAYSTATE_PLAYING 3
+XA_IODEVICE_RADIO 5
WinPtX 0
WinPtY 300
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_common_noklinvolitf.cfg Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_common_noklinvolitf.cfg Wed Jun 23 18:47:10 2010 +0300
@@ -79,7 +79,7 @@
[Endtest]
[Test]
-title 17.4 NokiaLinearVolumeItf GetStereoPosition
+title 17.4 NokiaLinearVolumeItf RegisterVolumeCallback
create openmaxaltestmodule ALImpl
ALImpl al_createEngine 1 1 0 0
ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_common_nokvolextitf.cfg Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_common_nokvolextitf.cfg Wed Jun 23 18:47:10 2010 +0300
@@ -148,6 +148,7 @@
ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIAVOLUMEEXT
ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIAVOLUMEEXT
+allownextresult 12
ALImpl al_nokiavolumeextitf_EnableStereoPosition 1
ALImpl al_objitf_Destroy MO_PLAYER
ALImpl al_objitf_Destroy MO_ENGINE
@@ -167,6 +168,7 @@
ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIAVOLUMEEXT
ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIAVOLUMEEXT
+allownextresult 12
ALImpl al_nokiavolumeextitf_EnableStereoPosition 1
ALImpl al_nokiavolumeextitf_IsEnabledStereoPosition
ALImpl al_objitf_Destroy MO_PLAYER
@@ -187,6 +189,7 @@
ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIAVOLUMEEXT
ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIAVOLUMEEXT
+allownextresult 12
ALImpl al_nokiavolumeextitf_EnableStereoPosition 1
ALImpl al_nokiavolumeextitf_SetStereoPosition 1000
ALImpl al_objitf_Destroy MO_PLAYER
@@ -207,6 +210,7 @@
ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_NOKIAVOLUMEEXT
ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIAVOLUMEEXT
+allownextresult 12
ALImpl al_nokiavolumeextitf_EnableStereoPosition 1
ALImpl al_nokiavolumeextitf_SetStereoPosition 1000
ALImpl al_nokiavolumeextitf_GetStereoPosition
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_common_volumeitf.cfg Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_common_volumeitf.cfg Wed Jun 23 18:47:10 2010 +0300
@@ -148,6 +148,7 @@
ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_VOLUME
ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_VOLUME
+allownextresult 12
ALImpl al_volumeitf_EnableStereoPosition 1
ALImpl al_objitf_Destroy MO_PLAYER
ALImpl al_objitf_Destroy MO_ENGINE
@@ -167,6 +168,7 @@
ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_VOLUME
ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_VOLUME
+allownextresult 12
ALImpl al_volumeitf_EnableStereoPosition 1
ALImpl al_volumeitf_IsEnabledStereoPosition
ALImpl al_objitf_Destroy MO_PLAYER
@@ -187,6 +189,7 @@
ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_VOLUME
ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_VOLUME
+allownextresult 12
ALImpl al_volumeitf_EnableStereoPosition 1
ALImpl al_volumeitf_SetStereoPosition 1000
ALImpl al_objitf_Destroy MO_PLAYER
@@ -207,6 +210,7 @@
ALImpl al_engitf_CreateMediaPlayer 1 XA_IID_VOLUME
ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_VOLUME
+allownextresult 12
ALImpl al_volumeitf_EnableStereoPosition 1
ALImpl al_volumeitf_SetStereoPosition 1000
ALImpl al_volumeitf_GetStereoPosition
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_engine_engineitf.cfg Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_engine_engineitf.cfg Wed Jun 23 18:47:10 2010 +0300
@@ -72,14 +72,13 @@
[Endtest]
[Test]
-title 2.2 EngItf CreateRadioDvice
+title 2.2 EngItf CreateRadioDevice
create openmaxaltestmodule ALImpl
ALImpl al_createEngine 1 1 0 0
ALImpl al_objitf_Realize 1 0
ALImpl al_objitf_GetInterface 1 5
-allownextresult 12
ALImpl al_engitf_CreateRadioDevice
-//ALImpl al_objitf_Destroy 6
+ALImpl al_objitf_Destroy 6
ALImpl al_objitf_Destroy 1
delete ALImpl
[Endtest]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_mp_streaming.cfg Wed Jun 23 18:47:10 2010 +0300
@@ -0,0 +1,148 @@
+//
+// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+[Test]
+title 22.1 PlayItf RTSP
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 rtsp:\/\/10.48.2.51/Copyright_Free_Test_Content/Clips/Video/3GP/176x144/h263/h263_176x144_15fps_384kbps_AAC-LC_128kbps_mono_44.1kHz.3gp
+ALImpl al_SetDataFormat 1 video/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 20000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 22.2 PlayItf RTSPU
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 rtspu:\/\/10.48.2.56/WMTest/192k_WMV9_VBR_CIF_WMA9_60fps.wmv
+ALImpl al_SetDataFormat 1 audio/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 40000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 22.3 PlayItf RTSPT
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 rtspt:\/\/10.48.2.56/WMTest/128k_WMV9_VBR_QCIF_WMA9_30fps.wmv
+ALImpl al_SetDataFormat 1 audio/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 20000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+[Test]
+title 22.4 PlayItf MMS
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 mms:\/\/10.48.2.56:443/WMTest/128k_WMV9_VBR_QCIF_WMA9_30fps.wmv
+ALImpl al_SetDataFormat 1 audio/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 20000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
+
+[Test]
+title 22.5 PlayItf HTTP
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_SetDataLocator 1 http:\/\/10.48.2.51/Copyright_Free_Test_Content/Clips/Video/3GP/176x144/mpeg4/mpeg4_176x144_15fps_384kbps_AAC-LC_128kbps_mono_44.1kHz.3gp
+ALImpl al_SetDataFormat 1 audio/3gp 17
+ALImpl al_SetDataSource 1 1 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_CreateWindow WinPtX WinPtY WinTopLeft WinTopRight WinBotLeft WinBotRight
+ALImpl al_SetDataSink 5 3 2
+ALImpl al_engitf_CreateMediaPlayer 0
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_PLAY
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_PLAYING
+pause 20000
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_playitf_GetPlayState XA_PLAYSTATE_STOPPED
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+ALImpl al_DeleteWindow
+delete ALImpl
+[Endtest]
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/conf/openmaxaltestmodule_radioitf.cfg Wed Jun 23 18:47:10 2010 +0300
@@ -0,0 +1,729 @@
+[Test]
+title 21.1 RadioItf Start Radio
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+request Event_XA_PLAYEVENT_HEADMOVING
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+wait Event_XA_PLAYEVENT_HEADMOVING
+release Event_XA_PLAYEVENT_HEADMOVING
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.2 RadioItf Set Freq 106.0 MHz
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback
+
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 1
+ALImpl al_SetDataSink 3 6 1
+
+ALImpl al_engitf_CreateMediaPlayer 0
+
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+request Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+ALImpl al_radioitf_SetFrequency 106000000
+wait Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+release Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.3 RadioItf Get Freq
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback
+
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 1
+ALImpl al_SetDataSink 3 6 1
+
+ALImpl al_engitf_CreateMediaPlayer 0
+
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+request Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+ALImpl al_radioitf_SetFrequency 106000000
+wait Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+release Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+
+ALImpl al_radioitf_GetFrequency 106000000
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.4 RadioItf Set Freq Range
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback
+
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 1
+ALImpl al_SetDataSink 3 6 1
+
+ALImpl al_engitf_CreateMediaPlayer 0
+
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+request Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED
+ALImpl al_radioitf_SetFreqRange 1 // EFmRangeJapan
+wait Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED
+release Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED
+
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.5 RadioItf Get Freq Range
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 1
+ALImpl al_SetDataSink 3 6 1
+
+ALImpl al_engitf_CreateMediaPlayer 0
+
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+request Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED
+ALImpl al_radioitf_SetFreqRange 1 // EFmRangeJapan
+wait Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED
+release Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED
+
+ALImpl al_radioitf_GetFreqRange 1 // EFmRangeJapan
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.6 RadioItf Get FR Properties
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback
+
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 1
+ALImpl al_SetDataSink 3 6 1
+
+ALImpl al_engitf_CreateMediaPlayer 0
+
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+request Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED
+ALImpl al_radioitf_SetFreqRange 0 // EFmRangeEuroAmerica
+wait Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED
+release Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED
+
+ALImpl al_radioitf_GetFreqRangeProperties 0 87500000 108000000 20 // range expected: min freq, max freq, freq interval
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.7 RadioItf Is Freq Range Supported
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback
+
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 1
+ALImpl al_SetDataSink 3 6 1
+
+ALImpl al_engitf_CreateMediaPlayer 0
+
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+ALImpl al_radioitf_IsFreqRangeSupported 1
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.8 RadioItf Set Squelch
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 1
+ALImpl al_SetDataSink 3 6 1
+
+ALImpl al_engitf_CreateMediaPlayer 0
+
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+allownextresult XA_RESULT_FEATURE_UNSUPPORTED
+ALImpl al_radioitf_SetSquelch 1
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.9 RadioItf Get Squelch
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 1
+ALImpl al_SetDataSink 3 6 1
+
+ALImpl al_engitf_CreateMediaPlayer 0
+
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+allownextresult XA_RESULT_FEATURE_UNSUPPORTED
+ALImpl al_radioitf_GetSquelch 1
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.10 RadioItfSetStereoModeMONO
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 1
+ALImpl al_SetDataSink 3 6 1
+
+ALImpl al_engitf_CreateMediaPlayer 0
+
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+request Event_XA_PLAYEVENT_HEADMOVING
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+wait Event_XA_PLAYEVENT_HEADMOVING
+release Event_XA_PLAYEVENT_HEADMOVING
+
+ALImpl al_radioitf_SetStereoMode 0
+ALImpl al_radioitf_GetStereoMode 0
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.11 RadioItf SetStereoModeSTEREO
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 1
+ALImpl al_SetDataSink 3 6 1
+
+ALImpl al_engitf_CreateMediaPlayer 0
+
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+request Event_XA_PLAYEVENT_HEADMOVING
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+wait Event_XA_PLAYEVENT_HEADMOVING
+release Event_XA_PLAYEVENT_HEADMOVING
+
+ALImpl al_radioitf_SetStereoMode 1
+ALImpl al_radioitf_GetStereoMode 1
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.12 RadioItf SetStereoModeAUTO
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 1
+ALImpl al_SetDataSink 3 6 1
+
+ALImpl al_engitf_CreateMediaPlayer 0
+
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+request Event_XA_PLAYEVENT_HEADMOVING
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+wait Event_XA_PLAYEVENT_HEADMOVING
+release Event_XA_PLAYEVENT_HEADMOVING
+
+ALImpl al_radioitf_SetStereoMode 2
+ALImpl al_radioitf_GetStereoMode 2
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+[Test]
+title 21.13 RadioItf Get Signal Strength
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 1
+ALImpl al_SetDataSink 3 6 1
+
+ALImpl al_engitf_CreateMediaPlayer 0
+
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+request Event_XA_PLAYEVENT_HEADMOVING
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+wait Event_XA_PLAYEVENT_HEADMOVING
+release Event_XA_PLAYEVENT_HEADMOVING
+
+ALImpl al_radioitf_GetSignalStrength
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.14 RadioItf Seek
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 1
+ALImpl al_SetDataSink 3 6 1
+
+ALImpl al_engitf_CreateMediaPlayer 0
+
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+request Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+ALImpl al_radioitf_SetFrequency 103700000
+wait Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+release Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+
+request Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+ALImpl al_radioitf_SetFrequency 106000000
+wait Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+release Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+
+request Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+ALImpl al_radioitf_SetFrequency 090900000
+wait Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+release Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+
+request Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+ALImpl al_radioitf_SetFrequency 096100000
+wait Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+release Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+
+request Event_XA_RADIO_EVENT_SEEK_COMPLETED
+ALImpl al_radioitf_Seek 1
+wait Event_XA_RADIO_EVENT_SEEK_COMPLETED
+release Event_XA_RADIO_EVENT_SEEK_COMPLETED
+
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.15 RadioItf Stop Seeking
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 1
+ALImpl al_SetDataSink 3 6 1
+
+ALImpl al_engitf_CreateMediaPlayer 0
+
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+request Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+ALImpl al_radioitf_SetFrequency 103700000
+wait Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+release Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+
+request Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+ALImpl al_radioitf_SetFrequency 106000000
+wait Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+release Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+
+request Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+ALImpl al_radioitf_SetFrequency 090900000
+wait Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+release Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+
+request Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+ALImpl al_radioitf_SetFrequency 096100000
+wait Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+release Event_XA_RADIO_EVENT_FREQUENCY_CHANGED
+
+ALImpl al_radioitf_Seek 1
+ALImpl al_radioitf_StopSeeking
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.16 RadioItf Cancel Set Freq
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 1
+ALImpl al_SetDataSink 3 6 1
+
+ALImpl al_engitf_CreateMediaPlayer 0
+
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+ALImpl al_radioitf_CancelSetFrequency
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.17 RadioItf Set Volume
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 2 XA_IID_NOKIALINEARVOLUME XA_IID_NOKIAVOLUMEEXT
+
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIAVOLUMEEXT
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIALINEARVOLUME
+ALImpl al_nokiavolumeextitf_RegisterVolumeCallback
+ALImpl al_nokialinearvolumeitf_RegisterVolumeCallback
+
+ALImpl al_nokialinearvolumeitf_SetGetVolumeLevel 20
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.18 RadioItf Get Step Count
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 2 XA_IID_NOKIALINEARVOLUME XA_IID_NOKIAVOLUMEEXT
+
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIAVOLUMEEXT
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIALINEARVOLUME
+ALImpl al_nokiavolumeextitf_RegisterVolumeCallback
+ALImpl al_nokialinearvolumeitf_RegisterVolumeCallback
+
+ALImpl al_nokialinearvolumeitf_GetStepCount
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.19 RadioItf SetMute On
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 2 XA_IID_NOKIALINEARVOLUME XA_IID_NOKIAVOLUMEEXT
+
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIAVOLUMEEXT
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIALINEARVOLUME
+ALImpl al_nokiavolumeextitf_RegisterVolumeCallback
+ALImpl al_nokialinearvolumeitf_RegisterVolumeCallback
+
+ALImpl al_nokiavolumeextitf_SetMute 1
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.20 RadioItf SetMute Off
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 2 XA_IID_NOKIALINEARVOLUME XA_IID_NOKIAVOLUMEEXT
+
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIAVOLUMEEXT
+ALImpl al_objitf_GetInterface MO_PLAYER XA_IID_NOKIALINEARVOLUME
+ALImpl al_nokiavolumeextitf_RegisterVolumeCallback
+ALImpl al_nokialinearvolumeitf_RegisterVolumeCallback
+
+ALImpl al_nokiavolumeextitf_SetMute 0
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
+
+[Test]
+title 21.21 RadioItf Stop Radio
+create openmaxaltestmodule ALImpl
+ALImpl al_createEngine 1 1 0 0
+ALImpl al_objitf_Realize MO_ENGINE XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_ENGINE XA_IID_ENGINE
+ALImpl al_engitf_CreateRadioDevice 0
+ALImpl al_objitf_Realize MO_RADIO XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface MO_RADIO XA_IID_RADIO
+ALImpl al_radioitf_RegisterRadioCallback
+
+ALImpl al_SetDataLocator 3 5 0 1
+ALImpl al_SetDataSource 3 0 1
+ALImpl al_SetDataSink 3 6 1
+ALImpl al_engitf_CreateMediaPlayer 0
+
+ALImpl al_objitf_Realize MO_PLAYER XA_BOOLEAN_FALSE
+ALImpl al_objitf_GetInterface 4 XA_IID_PLAY
+ALImpl al_playitf_RegisterCallback
+
+request Event_XA_PLAYEVENT_HEADMOVING
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_PLAYING
+wait Event_XA_PLAYEVENT_HEADMOVING
+release Event_XA_PLAYEVENT_HEADMOVING
+
+request Event_XA_PLAYEVENT_HEADSTALLED
+ALImpl al_playitf_SetPlayState XA_PLAYSTATE_STOPPED
+wait Event_XA_PLAYEVENT_HEADSTALLED
+release Event_XA_PLAYEVENT_HEADSTALLED
+
+ALImpl al_objitf_Destroy MO_RADIO
+ALImpl al_objitf_Destroy MO_PLAYER
+ALImpl al_objitf_Destroy MO_ENGINE
+delete ALImpl
+[Endtest]
\ No newline at end of file
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/group/bld.inf Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/group/bld.inf Wed Jun 23 18:47:10 2010 +0300
@@ -43,6 +43,8 @@
../conf/openmaxaltestmodule_mp_preemption.cfg /epoc32/winscw/c/testframework/openmaxaltestmodule_mp_preemption.cfg
../conf/openmaxaltestmodule_mo_mdextractionitf.cfg /epoc32/winscw/c/testframework/openmaxaltestmodule_mo_mdextractionitf.cfg
../conf/openmaxaltestmodule_mp_mdextractionitf.cfg /epoc32/winscw/c/testframework/openmaxaltestmodule_mp_mdextractionitf.cfg
+../conf/openmaxaltestmodule_radioitf.cfg /epoc32/winscw/c/testframework/openmaxaltestmodule_radioitf.cfg
+../conf/openmaxaltestmodule_mp_streaming.cfg /epoc32/winscw/c/testframework/openmaxaltestmodule_mp_streaming.cfg
../data/c/omxaltestdata/test.wav /epoc32/winscw/c/testing/data/omxaltestdata/test.wav
../data/c/omxaltestdata/test.mp3 /epoc32/winscw/c/testing/data/omxaltestdata/test.mp3
../data/c/omxaltestdata/test.3gp /epoc32/winscw/c/testing/data/omxaltestdata/test.3gp
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/group/openmaxaltestmodule.mmp Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/group/openmaxaltestmodule.mmp Wed Jun 23 18:47:10 2010 +0300
@@ -79,6 +79,9 @@
SOURCEPATH ../src/metadata
SOURCE openmaxalmetadataextractionitftests.cpp
+SOURCEPATH ../src/radio
+SOURCE openmaxalradioitftests.cpp
+
LIBRARY euser.lib
LIBRARY libglib.lib
LIBRARY stiftestinterface.lib
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/group/openmaxaltestmodule.pkg Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/group/openmaxaltestmodule.pkg Wed Jun 23 18:47:10 2010 +0300
@@ -65,12 +65,14 @@
"..\conf\openmaxaltestmodule_mp_objectitf.cfg" - "!:\testframework\openmaxaltestmodule_mp_objectitf.cfg"
"..\conf\openmaxaltestmodule_mp_playitf.cfg" - "!:\testframework\openmaxaltestmodule_mp_playitf.cfg"
"..\conf\openmaxaltestmodule_mp_seekitf.cfg" - "!:\testframework\openmaxaltestmodule_mp_seekitf.cfg"
-"..\conf\openmaxaltestmodule_common_dynsrcitf.cfg" - "!:\testframework\openmaxaltestmodule_common_dynsrcitf.cfg"
+"..\conf\openmaxaltestmodule_common_dynsrcitf.cfg" - "!:\testframework\openmaxaltestmodule_common_dynsrcitf.cfg"
"..\conf\openmaxaltestmodule_mp_strminfoitf.cfg" - "!:\testframework\openmaxaltestmodule_mp_strminfoitf.cfg"
"..\conf\openmaxaltestmodule_mp_preemption.cfg" - "!:\testframework\openmaxaltestmodule_mp_preemption.cfg"
"..\conf\openmaxaltestmodule_mo_mdextractionitf.cfg" - "!:\testframework\openmaxaltestmodule_mo_mdextractionitf.cfg"
"..\conf\openmaxaltestmodule_mp_mdextractionitf.cfg" - "!:\testframework\openmaxaltestmodule_mp_mdextractionitf.cfg"
"..\conf\openmaxaltestmodule_mp_variousformats.cfg" - "!:\testframework\openmaxaltestmodule_mp_variousformats.cfg"
+"..\conf\openmaxaltestmodule_radioitf.cfg" - "!:\testframework\openmaxaltestmodule_radioitf.cfg"
+"..\conf\openmaxaltestmodule_mp_streaming.cfg" - "!:\testframework\openmaxaltestmodule_mp_streaming.cfg"
;data files
"..\data\c\omxaltestdata\test.wav" - "!:\testing\data\omxaltestdata\test.wav"
"..\data\c\omxaltestdata\test.mp3" - "!:\testing\data\omxaltestdata\test.mp3"
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/inc/openmaxaltestmodule.h Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/inc/openmaxaltestmodule.h Wed Jun 23 18:47:10 2010 +0300
@@ -98,6 +98,7 @@
virtual ~COpenMAXALTestModule();
virtual void HandlePlayItfCallback( XAPlayItf caller, XAuint32 event );
+ virtual void HandleRadioItfCallback(XARadioItf caller, XAuint32 event );
virtual void HandleObjectCallback(XAObjectItf caller,XAuint32 event,
XAresult result,XAuint32 param, void * pInterface);
@@ -354,6 +355,21 @@
virtual TInt al_dynsrcitf_SetSource( CStifItemParser& aItem );
+ virtual TInt al_radioitf_SetFreqRange(CStifItemParser& aItem );
+ virtual TInt al_radioitf_GetFreqRange(CStifItemParser& aItem );
+ virtual TInt al_radioitf_IsFreqRangeSupported(CStifItemParser& aItem );
+ virtual TInt al_radioitf_GetFreqRangeProperties(CStifItemParser& aItem );
+ virtual TInt al_radioitf_SetFrequency(CStifItemParser& aItem );
+ virtual TInt al_radioitf_CancelSetFrequency(CStifItemParser& aItem );
+ virtual TInt al_radioitf_GetFrequency(CStifItemParser& aItem );
+ virtual TInt al_radioitf_SetSquelch(CStifItemParser& aItem );
+ virtual TInt al_radioitf_GetSquelch(CStifItemParser& aItem );
+ virtual TInt al_radioitf_SetStereoMode(CStifItemParser& aItem );
+ virtual TInt al_radioitf_GetStereoMode(CStifItemParser& aItem );
+ virtual TInt al_radioitf_GetSignalStrength(CStifItemParser& aItem );
+ virtual TInt al_radioitf_Seek(CStifItemParser& aItem );
+ virtual TInt al_radioitf_StopSeeking(CStifItemParser& aItem );
+ virtual TInt al_radioitf_RegisterRadioCallback(CStifItemParser& aItem );
virtual TInt al_strminfoitf_QueryMediaContainerInformation( CStifItemParser& aItem );
virtual TInt al_strminfoitf_QueryStreamType( CStifItemParser& aItem );
virtual TInt al_strminfoitf_QueryStreamInformation( CStifItemParser& aItem );
@@ -387,6 +403,7 @@
virtual TInt al_nokialinearvolumeitf_SetVolumeLevel( CStifItemParser& aItem );
virtual TInt al_nokialinearvolumeitf_GetVolumeLevel( CStifItemParser& aItem );
+ virtual TInt al_nokialinearvolumeitf_SetGetVolumeLevel( CStifItemParser& aItem );
virtual TInt al_nokialinearvolumeitf_GetStepCount( CStifItemParser& aItem );
virtual TInt al_nokialinearvolumeitf_RegisterVolumeCallback( CStifItemParser& aItem );
virtual TInt al_nokialinearvolumeitf_SetCallbackEventsMask( CStifItemParser& aItem );
@@ -467,6 +484,7 @@
XAPlayItf m_PlayItf;
XASeekItf m_SeekItf;
+ XARadioItf m_RadioItf;
XADynamicSourceItf m_DynSrcItf;
XAVolumeItf m_VolumeItf;
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/init/testframework.ini Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/init/testframework.ini Wed Jun 23 18:47:10 2010 +0300
@@ -131,6 +131,8 @@
TestCaseFile= c:\testframework\openmaxaltestmodule_mp_mdextractionitf.cfg
TestCaseFile= c:\testframework\openmaxaltestmodule_mo.cfg
#TestCaseFile= c:\testframework\openmaxaltestmodule_mp_variousformats.cfg
+TestCaseFile= c:\testframework\openmaxaltestmodule_radioitf.cfg
+TestCaseFile= c:\testframework\openmaxaltestmodule_mp_streaming.cfg
[End_Module]
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxalnokialinearvolumeitftests.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxalnokialinearvolumeitftests.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -98,6 +98,40 @@
return status;
}
+TInt COpenMAXALTestModule::al_nokialinearvolumeitf_SetGetVolumeLevel( CStifItemParser& aItem )
+ {
+ TInt status(KErrNone);
+ TInt volume(0);
+ XAuint32 alvol;
+ XAuint32 getVol(0);
+ status = aItem.GetNextInt(volume);
+ RET_ERR_IF_ERR(status);
+ XAuint32 expectedVol = volume;
+
+ if(m_NokiaLinearVolumeItf)
+ {
+ alvol = volume;
+ status = (*m_NokiaLinearVolumeItf)->SetVolumeLevel(m_NokiaLinearVolumeItf, &alvol);
+ if (status != KErrNone)
+ {
+ return status;
+ }
+ status = (*m_NokiaLinearVolumeItf)->GetVolumeLevel(m_NokiaLinearVolumeItf, &getVol);
+ if (status != KErrNone)
+ {
+ return status;
+ }
+ if (getVol != expectedVol)
+ status = KErrCompletion;
+ }
+ else
+ {
+ return KErrNotFound;
+ }
+
+ return status;
+ }
+
TInt COpenMAXALTestModule::al_nokialinearvolumeitf_GetVolumeLevel( CStifItemParser& /*aItem*/ )
{
TInt status(KErrNone);
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxalstrminfoitftests.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxalstrminfoitftests.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -100,7 +100,6 @@
{
TInt status(KErrNone);
XAresult res;
- TInt async(0);
TInt index(0);
XAuint32 streamType;
@@ -222,7 +221,6 @@
{
TInt status(KErrNone);
XAresult res;
- TInt streamindex(0);
XAuint32 size(0);
TInt inpsize;
XAboolean arr[2];
--- a/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxaltestmoduleblocks.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/common/openmaxaltestmoduleblocks.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -245,6 +245,23 @@
ENTRY( "al_dynsrcitf_SetSource", COpenMAXALTestModule::al_dynsrcitf_SetSource ),
/*DynamicSourceItf ends*/
+ /*RadioItf begins*/
+ ENTRY( "al_radioitf_SetFreqRange", COpenMAXALTestModule::al_radioitf_SetFreqRange ),
+ ENTRY( "al_radioitf_GetFreqRange", COpenMAXALTestModule::al_radioitf_GetFreqRange ),
+ ENTRY( "al_radioitf_IsFreqRangeSupported", COpenMAXALTestModule::al_radioitf_IsFreqRangeSupported ),
+ ENTRY( "al_radioitf_GetFreqRangeProperties", COpenMAXALTestModule::al_radioitf_GetFreqRangeProperties ),
+ ENTRY( "al_radioitf_SetFrequency", COpenMAXALTestModule::al_radioitf_SetFrequency ),
+ ENTRY( "al_radioitf_CancelSetFrequency", COpenMAXALTestModule::al_radioitf_CancelSetFrequency ),
+ ENTRY( "al_radioitf_GetFrequency", COpenMAXALTestModule::al_radioitf_GetFrequency ),
+ ENTRY( "al_radioitf_SetSquelch", COpenMAXALTestModule::al_radioitf_SetSquelch ),
+ ENTRY( "al_radioitf_GetSquelch", COpenMAXALTestModule::al_radioitf_GetSquelch ),
+ ENTRY( "al_radioitf_SetStereoMode", COpenMAXALTestModule::al_radioitf_SetStereoMode ),
+ ENTRY( "al_radioitf_GetStereoMode", COpenMAXALTestModule::al_radioitf_GetStereoMode ),
+ ENTRY( "al_radioitf_GetSignalStrength", COpenMAXALTestModule::al_radioitf_GetSignalStrength ),
+ ENTRY( "al_radioitf_Seek", COpenMAXALTestModule::al_radioitf_Seek ),
+ ENTRY( "al_radioitf_StopSeeking", COpenMAXALTestModule::al_radioitf_StopSeeking ),
+ ENTRY( "al_radioitf_RegisterRadioCallback", COpenMAXALTestModule::al_radioitf_RegisterRadioCallback ),
+ /*RadioItf ends*/
/*StreamInformationItf begins*/
ENTRY( "al_strminfoitf_QueryMediaContainerInformation", COpenMAXALTestModule::al_strminfoitf_QueryMediaContainerInformation ),
ENTRY( "al_strminfoitf_QueryStreamType", COpenMAXALTestModule::al_strminfoitf_QueryStreamType ),
@@ -285,6 +302,7 @@
/*NokiaLinearVolumeItf begins*/
ENTRY( "al_nokialinearvolumeitf_SetVolumeLevel", COpenMAXALTestModule::al_nokialinearvolumeitf_SetVolumeLevel ),
ENTRY( "al_nokialinearvolumeitf_GetVolumeLevel", COpenMAXALTestModule::al_nokialinearvolumeitf_GetVolumeLevel ),
+ ENTRY( "al_nokialinearvolumeitf_SetGetVolumeLevel", COpenMAXALTestModule::al_nokialinearvolumeitf_SetGetVolumeLevel ),
ENTRY( "al_nokialinearvolumeitf_GetStepCount", COpenMAXALTestModule::al_nokialinearvolumeitf_GetStepCount ),
ENTRY( "al_nokialinearvolumeitf_RegisterVolumeCallback", COpenMAXALTestModule::al_nokialinearvolumeitf_RegisterVolumeCallback ),
ENTRY( "al_nokialinearvolumeitf_SetCallbackEventsMask", COpenMAXALTestModule::al_nokialinearvolumeitf_SetCallbackEventsMask ),
@@ -919,6 +937,7 @@
/* XA_IID_OUTPUTMIX;*/
break;
case 27:
+ m_RadioItf = XARadioItf(id);
/* XA_IID_RADIO;*/
break;
case 28:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/src/radio/openmaxalradioitftests.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -0,0 +1,468 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains testclass implementation.
+*
+*/
+
+// [INCLUDE FILES] - do not remove
+#include <e32svr.h>
+#include <StifParser.h>
+#include <StifTestInterface.h>
+#include <StifTestEventInterface.h>
+#include "openmaxaltestmodule.h"
+
+// EXTERNAL DATA STRUCTURES
+//extern ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+void RadioItfCallback(XARadioItf caller,
+void* pContext,
+XAuint32 event,
+XAuint32 eventIntData,
+XAboolean eventBooleanData);
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+// ?value_n: ?description_line1
+// ?description_line2
+// -----------------------------------------------------------------------------
+//
+/*
+?type ?function_name(
+ ?arg_type arg, // ?description
+ ?arg_type arg) // ?description
+ {
+
+ ?code // ?comment
+
+ // ?comment
+ ?code
+ }
+*/
+
+TInt COpenMAXALTestModule::al_radioitf_SetFreqRange( CStifItemParser& aItem )
+ {
+ TInt status(KErrNone);
+ TInt freqRange(0);
+ status = aItem.GetNextInt(freqRange);
+ RET_ERR_IF_ERR(status);
+
+ if(m_RadioItf)
+ {
+ status = (*m_RadioItf)->SetFreqRange(
+ m_RadioItf, freqRange);
+ }
+ else
+ {
+ status = KErrNotFound;
+ }
+ return status;
+ }
+
+TInt COpenMAXALTestModule::al_radioitf_GetFreqRange( CStifItemParser& aItem )
+ {
+ TInt status(KErrNone);
+ XAuint8 freqRange;
+ TInt expectedRange;
+ status = aItem.GetNextInt(expectedRange);
+ RET_ERR_IF_ERR(status);
+
+ if (m_RadioItf)
+ {
+ status = (*m_RadioItf)->GetFreqRange(
+ m_RadioItf, &freqRange);
+ if (!status)
+ {
+ if (freqRange != (TInt)expectedRange)
+ {
+ status = KErrCompletion;
+ }
+ }
+ }
+ else
+ {
+ status = KErrNotFound;
+ }
+ return status;
+ }
+
+TInt COpenMAXALTestModule::al_radioitf_IsFreqRangeSupported( CStifItemParser& aItem )
+ {
+ TInt status(KErrNone);
+ TInt freqRange;
+ XAboolean isSupported;
+ status = aItem.GetNextInt(freqRange);
+ if (m_RadioItf)
+ {
+ status = (*m_RadioItf)->IsFreqRangeSupported(
+ m_RadioItf, (XAuint8)freqRange, &isSupported);
+ if (!isSupported)
+ status = KErrCompletion;
+ }
+ else
+ {
+ status = KErrNotFound;
+ }
+ return status;
+ }
+
+TInt COpenMAXALTestModule::al_radioitf_GetFreqRangeProperties( CStifItemParser& aItem )
+ {
+ TInt status(KErrNone);
+ TInt range;
+ status = aItem.GetNextInt(range);
+ RET_ERR_IF_ERR(status);
+ TInt expectedMinFreq;
+ status = aItem.GetNextInt(expectedMinFreq);
+ RET_ERR_IF_ERR(status);
+ TInt expectedMaxFreq;
+ status = aItem.GetNextInt(expectedMaxFreq);
+ RET_ERR_IF_ERR(status);
+ TInt expectedFreqInterval;
+ status = aItem.GetNextInt(expectedFreqInterval);
+ RET_ERR_IF_ERR(status);
+ XAuint32 minFreq;
+ XAuint32 maxFreq;
+ XAuint32 freqInterval;
+
+ if (m_RadioItf)
+ {
+ status = (*m_RadioItf)->GetFreqRangeProperties(
+ m_RadioItf, range, &minFreq, &maxFreq, &freqInterval);
+ if (!status)
+ {
+ /* If duration does not fall between the range we expected fail the case */
+ if ( ( minFreq != (XAuint32)expectedMinFreq) || (maxFreq != (XAuint32)expectedMaxFreq) || (freqInterval != (XAuint32)expectedFreqInterval) )
+ {
+ status = KErrCompletion;
+ }
+ }
+ }
+ else
+ {
+ status = KErrNotFound;
+ }
+ return status;
+ }
+
+TInt COpenMAXALTestModule::al_radioitf_SetFrequency( CStifItemParser& aItem )
+ {
+ TInt status(KErrNone);
+ TInt freq;
+ status = aItem.GetNextInt(freq);
+ RET_ERR_IF_ERR(status);
+ if (m_RadioItf)
+ {
+ status = (*m_RadioItf)->SetFrequency(
+ m_RadioItf, freq);
+ if (status != KErrNone)
+ status = KErrCompletion;
+ }
+ else
+ {
+ status = KErrNotFound;
+ }
+ return status;
+ }
+
+TInt COpenMAXALTestModule::al_radioitf_GetFrequency( CStifItemParser& aItem)
+ {
+ TInt status(KErrNone);
+ TInt expectedFreq;
+ status = aItem.GetNextInt(expectedFreq);
+ RET_ERR_IF_ERR(status);
+ XAuint32 freq;
+
+ if (m_RadioItf)
+ {
+ status = (*m_RadioItf)->GetFrequency(
+ m_RadioItf, &freq);
+ if (!status)
+ {
+ if ( freq != expectedFreq )
+ {
+ status = KErrCompletion;
+ }
+ }
+ }
+ else
+ {
+ status = KErrNotFound;
+ }
+ return status;
+ }
+
+TInt COpenMAXALTestModule::al_radioitf_RegisterRadioCallback( CStifItemParser& /*aItem*/ )
+ {
+ TInt status(KErrNone);
+ XAresult res;
+
+ if(m_RadioItf)
+ {
+ res = (*m_RadioItf)->RegisterRadioCallback(
+ m_RadioItf, &RadioItfCallback, (void*)this);
+ status = res;
+ }
+ else
+ {
+ status = KErrNotFound;
+ }
+
+ return status;
+ }
+
+
+TInt COpenMAXALTestModule::al_radioitf_SetSquelch( CStifItemParser& aItem )
+ {
+ TInt status(KErrNone);
+ TBool squelch;
+ status = aItem.GetNextInt(squelch);
+ RET_ERR_IF_ERR(status);
+
+ if(m_RadioItf)
+ {
+ status = (*m_RadioItf)->SetSquelch(
+ m_RadioItf, squelch);
+
+ }
+ else
+ {
+ status = KErrNotFound;
+ }
+ return status;
+ }
+
+TInt COpenMAXALTestModule::al_radioitf_GetSquelch( CStifItemParser& aItem )
+ {
+ TInt status(KErrNone);
+ TBool expectedSquelch;
+ status = aItem.GetNextInt(expectedSquelch);
+ RET_ERR_IF_ERR(status);
+ XAboolean squelch;
+
+ if(m_RadioItf)
+ {
+ status = (*m_RadioItf)->GetSquelch(
+ m_RadioItf, &squelch);
+ if (!status)
+ {
+ if (squelch != (XAboolean)expectedSquelch)
+ {
+ status = KErrCompletion;
+ }
+ }
+ }
+ else
+ {
+ status = KErrNotFound;
+ }
+ return status;
+ }
+
+TInt COpenMAXALTestModule::al_radioitf_CancelSetFrequency( CStifItemParser& /*aItem*/ )
+ {
+ TInt status(KErrNone);
+
+ if(m_RadioItf)
+ {
+ status = (*m_RadioItf)->CancelSetFrequency(
+ m_RadioItf);
+ }
+ else
+ {
+ status = KErrNotFound;
+ }
+ return status;
+ }
+
+TInt COpenMAXALTestModule::al_radioitf_SetStereoMode( CStifItemParser& aItem )
+ {
+ TInt status(KErrNone);
+ TInt stereoMode;
+ status = aItem.GetNextInt(stereoMode);
+ RET_ERR_IF_ERR(status);
+
+ if(m_RadioItf)
+ {
+ status = (*m_RadioItf)->SetStereoMode(
+ m_RadioItf, (XAuint32)stereoMode);
+ }
+ else
+ {
+ status = KErrNotFound;
+ }
+ return status;
+ }
+
+TInt COpenMAXALTestModule::al_radioitf_GetStereoMode( CStifItemParser& aItem )
+ {
+ TInt status(KErrNone);
+ TInt expectedStereoMode;
+ status = aItem.GetNextInt(expectedStereoMode);
+ RET_ERR_IF_ERR(status);
+ XAuint32 stereoMode;
+
+ if(m_RadioItf)
+ {
+ status = (*m_RadioItf)->GetStereoMode(
+ m_RadioItf, &stereoMode);
+ if (!status)
+ {
+ if (stereoMode != (XAboolean)expectedStereoMode)
+ {
+ status = KErrCompletion;
+ }
+ }
+ }
+ else
+ {
+ status = KErrNotFound;
+ }
+ return status;
+ }
+
+TInt COpenMAXALTestModule::al_radioitf_GetSignalStrength( CStifItemParser& /*aItem*/ )
+ {
+ TInt status(KErrNone);
+ XAuint32 signalStrength;
+
+ if(m_RadioItf)
+ {
+ status = (*m_RadioItf)->GetSignalStrength(
+ m_RadioItf, &signalStrength);
+ }
+ else
+ {
+ status = KErrNotFound;
+ }
+ return status;
+ }
+
+TInt COpenMAXALTestModule::al_radioitf_Seek( CStifItemParser& aItem )
+ {
+ TInt status(KErrNone);
+ TBool upwards;
+ status = aItem.GetNextInt(upwards);
+ RET_ERR_IF_ERR(status);
+
+ if(m_RadioItf)
+ {
+ status = (*m_RadioItf)->Seek(
+ m_RadioItf, upwards);
+ }
+ else
+ {
+ status = KErrNotFound;
+ }
+ return status;
+ }
+
+TInt COpenMAXALTestModule::al_radioitf_StopSeeking( CStifItemParser& /*aItem*/ )
+ {
+ TInt status(KErrNone);
+
+ if(m_RadioItf)
+ {
+ status = (*m_RadioItf)->StopSeeking(
+ m_RadioItf);
+ }
+ else
+ {
+ status = KErrNotFound;
+ }
+ return status;
+ }
+
+
+void COpenMAXALTestModule::HandleRadioItfCallback(
+ XARadioItf caller,
+ XAuint32 event
+)
+{
+
+ switch (event)
+ {
+ case XA_RADIO_EVENT_ANTENNA_STATUS_CHANGED:
+ {
+ TEventIf antennaStatusEvent( TEventIf::ESetEvent, _L("Event_XA_RADIO_EVENT_ANTENNA_STATUS_CHANGED:") );
+ TestModuleIf().Event( antennaStatusEvent );
+ }
+ break;
+
+ case XA_RADIO_EVENT_FREQUENCY_CHANGED:
+ {
+ TEventIf freqChangedEvent( TEventIf::ESetEvent, _L("Event_XA_RADIO_EVENT_FREQUENCY_CHANGED") );
+ TestModuleIf().Event( freqChangedEvent );
+ }
+ break;
+
+ case XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED:
+ {
+ TEventIf freqRangeChangedEvent( TEventIf::ESetEvent,_L("Event_XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED"));
+ TestModuleIf().Event( freqRangeChangedEvent );
+ }
+ break;
+
+ case XA_RADIO_EVENT_SEEK_COMPLETED:
+ {
+ TEventIf seekEvent( TEventIf::ESetEvent, _L("Event_XA_RADIO_EVENT_SEEK_COMPLETED") );
+ TestModuleIf().Event( seekEvent );
+ }
+ break;
+
+ default:
+ break;
+ }
+
+}
+
+void RadioItfCallback (
+ XARadioItf caller,
+ void * pContext,
+ XAuint32 event,
+ XAuint32 eventIntData,
+ XAboolean eventBooleanData
+ )
+ {
+ if (pContext)
+ {
+ ((COpenMAXALTestModule*)pContext)->HandleRadioItfCallback(caller, event);
+ }
+ }
+
--- a/mmmw_plat/openmax_al_ext_api/group/bld.inf Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/openmax_al_ext_api/group/bld.inf Wed Jun 23 18:47:10 2010 +0300
@@ -25,5 +25,6 @@
#ifdef FF_OPENMAX_AL
../inc/xanokiavolumeextitf.h MW_LAYER_PLATFORM_EXPORT_PATH(khronos/xanokiavolumeextitf.h)
../inc/xanokialinearvolumeitf.h MW_LAYER_PLATFORM_EXPORT_PATH(khronos/xanokialinearvolumeitf.h)
+../inc/xaradioitfext.h MW_LAYER_PLATFORM_EXPORT_PATH(khronos/xaradioitfext.h)
../readme_ext.txt MW_LAYER_PLATFORM_EXPORT_PATH(khronos/readme_ext.txt)
#endif
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/openmax_al_ext_api/inc/xaradioitfext.h Wed Jun 23 18:47:10 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef XARADIOITFEXT_H
+#define XARADIOITFEXT_H
+
+// Currently defined in OpenMAXAL.h for RADIO:
+//#define XA_RADIO_EVENT_ANTENNA_STATUS_CHANGED ((XAuint32) 0x00000001)
+//#define XA_RADIO_EVENT_FREQUENCY_CHANGED ((XAuint32) 0x00000002)
+//#define XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED ((XAuint32) 0x00000003)
+//#define XA_RADIO_EVENT_PRESET_CHANGED ((XAuint32) 0x00000004)
+//#define XA_RADIO_EVENT_SEEK_COMPLETED ((XAuint32) 0x00000005)
+
+// ADDED:
+#define XA_RADIO_EVENT_STEREO_STATUS_CHANGED ((XAuint32) 0x00000006)
+#define XA_RADIO_EVENT_SIGNAL_STRENGTH_CHANGED ((XAuint32) 0x00000007)
+
+#endif /* XARADIOITFEXT_H */
--- a/mmmw_plat/system_tone_service_api/tsrc/conf/systemtoneservicestif.cfg Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/system_tone_service_api/tsrc/conf/systemtoneservicestif.cfg Wed Jun 23 18:47:10 2010 +0300
@@ -61,6 +61,126 @@
[Enddefine]
[Test]
+title 01 Play EmailAlert
+create systemtoneservicestif STSSTIF
+STSSTIF Create
+STSSTIF PlayTone EmailAlert
+pause 5000
+STSSTIF Delete
+delete STSSTIF
+[Endtest]
+
+[Test]
+title 02 Play SmsAlert
+create systemtoneservicestif STSSTIF
+STSSTIF Create
+STSSTIF PlayTone SmsAlert
+pause 5000
+STSSTIF Delete
+delete STSSTIF
+[Endtest]
+
+[Test]
+title 03 Play ChatAlert
+create systemtoneservicestif STSSTIF
+STSSTIF Create
+STSSTIF PlayTone ChatAlert
+pause 5000
+STSSTIF Delete
+delete STSSTIF
+[Endtest]
+
+[Test]
+title 04 Play MmsAlert
+create systemtoneservicestif STSSTIF
+STSSTIF Create
+STSSTIF PlayTone MmsAlert
+pause 5000
+STSSTIF Delete
+delete STSSTIF
+[Endtest]
+
+[Test]
+title 05 Play WarningBeep
+create systemtoneservicestif STSSTIF
+STSSTIF Create
+STSSTIF PlayTone WarningBeep
+pause 5000
+STSSTIF Delete
+delete STSSTIF
+[Endtest]
+
+
+[Test]
+title 06 Play DeafultBeep
+create systemtoneservicestif STSSTIF
+STSSTIF Create
+STSSTIF PlayTone DefaultBeep
+pause 5000
+STSSTIF Delete
+delete STSSTIF
+[Endtest]
+
+
+[Test]
+title 07 Play IncomingCall
+create systemtoneservicestif STSSTIF
+STSSTIF Create
+STSSTIF PlayAlarm IncomingCall
+pause 10000
+STSSTIF StopAlarm True
+pause 5000
+STSSTIF Delete
+delete STSSTIF
+[Endtest]
+
+
+[Test]
+title 08 Play IncomingCall2
+create systemtoneservicestif STSSTIF
+STSSTIF Create
+STSSTIF PlayAlarm IncomingCallLine2
+pause 10000
+STSSTIF StopAlarm True
+pause 5000
+STSSTIF Delete
+delete STSSTIF
+[Endtest]
+
+
+[Test]
+title 09 Play VideoCall
+create systemtoneservicestif STSSTIF
+STSSTIF Create
+STSSTIF PlayAlarm IncomingDataCall
+pause 10000
+STSSTIF StopAlarm True
+pause 5000
+STSSTIF Delete
+delete STSSTIF
+[Endtest]
+
+
+[Test]
+title 10 Play DefaultAlarm
+create systemtoneservicestif STSSTIF
+STSSTIF Create
+STSSTIF PlayAlarm ToDoAlarm
+pause 10000
+STSSTIF StopAlarm True
+pause 5000
+STSSTIF Delete
+delete STSSTIF
+[Endtest]
+
+
+
+
+
+
+
+
+[Test]
title NFT
create systemtoneservicestif STSSTIF
STSSTIF Create
@@ -74,7 +194,7 @@
[Test]
-title 01 Create systemtoneservicestif
+title 11 Create systemtoneservicestif
create systemtoneservicestif STSSTIF
STSSTIF Create
delete STSSTIF
@@ -83,7 +203,7 @@
[Test]
-title 02 Play ClockAlarm Ringtone
+title 12 Play ClockAlarm Ringtone
create systemtoneservicestif STSSTIF
STSSTIF Create
STSSTIF PlayAlarm ClockAlarm
@@ -94,17 +214,17 @@
[Test]
-title 03 Play ClockAlarmContext Ringtone
+title 13 Play ClockAlarmContext Ringtone
create systemtoneservicestif STSSTIF
STSSTIF Create
-STSSTIF PlayAlarm ClockAlarm
-pause 10000
+STSSTIF PlayTone EmailAlert
+pause 5000
STSSTIF Delete
delete STSSTIF
[Endtest]
[Test]
-title 04 Stop ClockAlarm with recognized Context
+title 14 Stop ClockAlarm with recognized Context
create systemtoneservicestif STSSTIF
STSSTIF Create
STSSTIF PlayAlarm ClockAlarm
@@ -117,7 +237,7 @@
[Test]
-title 05 Stop ClockAlarm with non-recognized Context
+title 15 Stop ClockAlarm with non-recognized Context
create systemtoneservicestif STSSTIF
STSSTIF Create
STSSTIF PlayAlarm ClockAlarm
@@ -130,12 +250,12 @@
[Test]
-title 06 Play two tones
+title 16 Play two tones
create systemtoneservicestif STSSTIF
STSSTIF Create
STSSTIF PlayAlarm ClockAlarm
-pause 10000
-STSSTIF PlayTone DefaultTone
+pause 5000
+STSSTIF PlayTone DefaultBeep
pause 10000
STSSTIF StopAlarm True
STSSTIF Delete
--- a/mmmw_plat/system_tone_service_api/tsrc/group/systemtoneservicestif.pkg Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/system_tone_service_api/tsrc/group/systemtoneservicestif.pkg Wed Jun 23 18:47:10 2010 +0300
@@ -47,7 +47,9 @@
; Install files
"\epoc32\release\armv5\udeb\systemtoneservicestif.dll" - "!:\Sys\Bin\systemtoneservicestif.dll"
-
+"..\conf\systemtoneservicestif.cfg" - "C:\testframework\systemtoneservicestif.cfg"
+"..\init\TestFramework.ini" - "C:\TestFramework\TestFramework.ini"
+
; Embedded SIS
; None
--- a/mmmw_plat/system_tone_service_api/tsrc/inc/systemtoneservicesactiveobj.h Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/system_tone_service_api/tsrc/inc/systemtoneservicesactiveobj.h Wed Jun 23 18:47:10 2010 +0300
@@ -18,9 +18,12 @@
#include <e32base.h>
+#include <e32svr.h>
+#include <StifParser.h>
+#include <StifLogger.h>
+#include <StifTestInterface.h>
#include <systemtoneservice.h>
-
@@ -28,10 +31,9 @@
{
public:
- CStsActiveObj( MStsPlayAlarmObserver* aObserver);
+ static CStsActiveObj* NewL( MStsPlayAlarmObserver* aObserver,CStifLogger* aLogger );
~CStsActiveObj();
-
-
+
public: // Functions from base classes
/**
@@ -48,11 +50,23 @@
* RunError derived from CActive handles errors from active handler.
*/
TInt RunError( TInt aError );
-
+
+ private:
+
+ /**
+ * By default Symbian OS constructor is private.
+ */
+ void ConstructL(MStsPlayAlarmObserver* aObserver, CStifLogger* aLogger);
+
+ /**
+ * C++ constructor.
+ */
+ CStsActiveObj();
private: // Data
MStsPlayAlarmObserver* iObserver;
+ CStifLogger* iLog;
};
--- a/mmmw_plat/system_tone_service_api/tsrc/src/systemtoneservicesactiveobj.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/system_tone_service_api/tsrc/src/systemtoneservicesactiveobj.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -19,14 +19,29 @@
#include <systemtoneservice.h>
#include "systemtoneservicesactiveobj.h"
-CStsActiveObj::CStsActiveObj(MStsPlayAlarmObserver* aObserver) : CActive (EPriorityStandard)
+
+CStsActiveObj::CStsActiveObj() : CActive (CActive::EPriorityStandard)
{
+
+}
+
+
+void CStsActiveObj::ConstructL(MStsPlayAlarmObserver* aObserver, CStifLogger* aLogger)
+{
+ iObserver = aObserver;
+ iLog = aLogger;
CActiveScheduler::Add(this);
}
-
+CStsActiveObj* CStsActiveObj::NewL( MStsPlayAlarmObserver* aTestClass, CStifLogger* aLogger)
+{
+ CStsActiveObj* self = new ( ELeave ) CStsActiveObj();
+ CleanupStack::PushL( self );
+ self->ConstructL( aTestClass, aLogger);
+ CleanupStack::Pop( self );
+ return self;
-
+}
CStsActiveObj::~ CStsActiveObj()
{
@@ -39,12 +54,12 @@
void CStsActiveObj::RunL()
{
- if(IsActive())
+ /*(if(IsActive())
{
Cancel();
}
- SetActive();
+ SetActive();*/
}
--- a/mmmw_plat/system_tone_service_api/tsrc/src/systemtoneservicestifblocks.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/system_tone_service_api/tsrc/src/systemtoneservicestifblocks.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -229,15 +229,13 @@
if (aAlarmContext == iCurrentContext)
{
- _LIT( Ksystemtoneservicestif, "STS" );
+ _LIT( Ksystemtoneservicestif, "STS" );
_LIT( KPrint, "PlayAlarmComplete" );
TestModuleIf().Printf( 0, Ksystemtoneservicestif, KPrint );
- // Print to log file
- iLog->Log( KPrint );
-
- iPlayState = EStopped;
- iCallbackController->Cancel();
- //HandleEvent();
+
+ iPlayState = EStopped;
+ iCallbackController->Cancel();
+ //HandleEvent();
}
}
--- a/mmmw_plat/telephony_multimedia_service_api/inc/tms.h Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/telephony_multimedia_service_api/inc/tms.h Wed Jun 23 18:47:10 2010 +0300
@@ -24,6 +24,7 @@
namespace TMS {
+// FORWARD DECLARATION
class TMSFormat;
// Result codes
@@ -69,21 +70,22 @@
// Event codes
#define TMS_EVENT_STREAM_STATE_CHANGED ((gint)0x00000000)
-#define TMS_EVENT_SOURCE_FILL_BUFFER ((gint)0x00000001)
-#define TMS_EVENT_SOURCE_PROCESSED_BUFFER ((gint)0x00000002)
-#define TMS_EVENT_SINK_PROCESS_BUFFER ((gint)0x00000003)
-#define TMS_EVENT_EFFECT_VOL_CHANGED ((gint)0x00000004)
-#define TMS_EVENT_EFFECT_GAIN_CHANGED ((gint)0x00000005)
-#define TMS_EVENT_ROUTING_AVAIL_OUTPUTS_CHANGED ((gint)0x00000006)
-#define TMS_EVENT_ROUTING_OUTPUT_CHANGED ((gint)0x00000007)
-#define TMS_EVENT_ROUTING_SET_OUTPUT_COMPLETE ((gint)0x00000008)
-#define TMS_EVENT_RINGTONE_OPEN_COMPLETE ((gint)0x00000009)
-#define TMS_EVENT_RINGTONE_PLAY_COMPLETE ((gint)0x0000000A)
-#define TMS_EVENT_RINGTONE_DEINIT_COMPLETE ((gint)0x0000000B)
-#define TMS_EVENT_DTMF_TONE_STARTED ((gint)0x0000000C)
-#define TMS_EVENT_DTMF_TONE_STOPPED ((gint)0x0000000D)
-#define TMS_EVENT_INBAND_TONE_STARTED ((gint)0x0000000E)
-#define TMS_EVENT_INBAND_TONE_STOPPED ((gint)0x0000000F)
+#define TMS_EVENT_STREAM_STATE_CHANGE_ERROR ((gint)0x00000001)
+#define TMS_EVENT_SOURCE_FILL_BUFFER ((gint)0x00000002)
+#define TMS_EVENT_SOURCE_PROCESSED_BUFFER ((gint)0x00000003)
+#define TMS_EVENT_SINK_PROCESS_BUFFER ((gint)0x00000004)
+#define TMS_EVENT_EFFECT_VOL_CHANGED ((gint)0x00000005)
+#define TMS_EVENT_EFFECT_GAIN_CHANGED ((gint)0x00000006)
+#define TMS_EVENT_ROUTING_AVAIL_OUTPUTS_CHANGED ((gint)0x00000007)
+#define TMS_EVENT_ROUTING_OUTPUT_CHANGED ((gint)0x00000008)
+#define TMS_EVENT_ROUTING_SET_OUTPUT_COMPLETE ((gint)0x00000009)
+#define TMS_EVENT_RINGTONE_OPEN_COMPLETE ((gint)0x0000000A)
+#define TMS_EVENT_RINGTONE_PLAY_COMPLETE ((gint)0x0000000B)
+#define TMS_EVENT_RINGTONE_DEINIT_COMPLETE ((gint)0x0000000C)
+#define TMS_EVENT_DTMF_TONE_STARTED ((gint)0x0000000D)
+#define TMS_EVENT_DTMF_TONE_STOPPED ((gint)0x0000000E)
+#define TMS_EVENT_INBAND_TONE_STARTED ((gint)0x0000000F)
+#define TMS_EVENT_INBAND_TONE_STOPPED ((gint)0x00000010)
// Stream states
typedef gint TMSStreamState;
--- a/mmmw_plat/telephony_multimedia_service_api/inc/tmsfactory.h Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/telephony_multimedia_service_api/inc/tmsfactory.h Wed Jun 23 18:47:10 2010 +0300
@@ -394,6 +394,8 @@
IMPORT_C gint DeleteDTMF(TMSDTMF*& dtmf);
/**
+ * FEATURE IS CURRENTLY NOT SUPPORTED
+ *
* Creates TMSRTPSession object.
*
* @param rtpsession
@@ -406,22 +408,21 @@
* Buffer processing mode: either PULL or PUSH.
*
* @return
- * TMS_RESULT_SUCCESS when object is created successfully.
- * TMS_RESULT_INSUFFICIENT_MEMORY when object creation failed due to
- * insufficient memory.
+ * TMS_RESULT_FEATURE_NOT_SUPPORTED
*/
IMPORT_C gint CreateRTPSession(TMSRTPSession*& rtpsession, guint8* sdp,
guint mode);
/**
+ * FEATURE IS CURRENTLY NOT SUPPORTED
+ *
* Deletes TMSRTPSession object.
*
* @param rtpsession
* RTP Session object to be deleted.
*
* @return
- * TMS_RESULT_SUCCESS when object is deleted successfully.
- * TMS_RESULT_INVALID_ARGUMENT if RTP session object is invalid.
+ * TMS_RESULT_FEATURE_NOT_SUPPORTED
*/
IMPORT_C gint DeleteRTPSession(TMSRTPSession*& rtpsession);
--- a/mmmw_plat/telephony_multimedia_service_api/inc/tmsringtone.h Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/telephony_multimedia_service_api/inc/tmsringtone.h Wed Jun 23 18:47:10 2010 +0300
@@ -137,7 +137,7 @@
IMPORT_C gint Stop();
/**
- * Pause ring tone playback.
+ * Pause video ring tone playback.
*
* @return
* TMS_RESULT_SUCCESS if the operation was successful otherwise
--- a/mmmw_plat/telephony_multimedia_service_api/inc/tmsstream.h Thu May 27 13:20:50 2010 +0300
+++ b/mmmw_plat/telephony_multimedia_service_api/inc/tmsstream.h Wed Jun 23 18:47:10 2010 +0300
@@ -429,17 +429,27 @@
* IP call: UPL: mic source, codec format and client sink
* IP call: DNL: client source, codec format and speaker sink
*
+ * @param retrytime
+ * Indicates (in seconds) for how long TMS should retry stream
+ * initialization in case of an error. When stream initialization
+ * fails within specified retry time, TMS will return
+ * TMS_EVENT_STREAM_STATE_CHANGE_ERROR. If set to 0, TMS will return
+ * TMS_EVENT_STREAM_STATE_CHANGE_ERROR immediately without retrying.
+ * If set to -1, TMS will keep retrying until user cancels by calling
+ * either Stop() or Deinit().
+ *
* @return
+ * Common return codes:
* TMS_RESULT_SUCCESS if stream transitioned to the initialized state.
* TMS_RESULT_INVALID_STATE if stream has not transitioned to the
- * TMS_STREAM_UNINITIALIZED state.
+ * TMS_STREAM_INITIALIZED state.
* TMS_RESULT_FORMAT_TYPE_UNSPECIFIED (IP call only) when stream
* has no format attached to it.
* TMS_RESULT_UNINITIALIZED_OBJECT when stream has no sink or source
* element attached to it.
*
*/
- IMPORT_C gint Init();
+ IMPORT_C gint Init(gint retrytime = 0);
/**
* Trigger stream to transition to the paused state.
@@ -456,10 +466,11 @@
* Note: In TMS Ver 1.0.0.0, pausing stream for CS call is not supported.
*
* @return
- * TMS_RESULT_SUCCESS if stream successfully transitioned to the paused
- * state.
+ * Common return codes:
+ * TMS_RESULT_SUCCESS if stream successfully transitioned to the
+ * paused state.
* TMS_RESULT_INVALID_STATE if stream is not in the
- * TMS_STREAM_INITIALIZED or TMS_STREAM_STARTED state.
+ * TMS_STREAM_INITIALIZED or TMS_STREAM_PAUSED state.
*
*/
IMPORT_C gint Pause();
@@ -480,14 +491,24 @@
* Upon stream's successful transition to the started state, the stream will
* be in the TMS_STREAM_STARTED state.
*
+ * @param retrytime
+ * Indicates (in seconds) for how long TMS should attempt to start
+ * a stream in case of an error. When stream starting fails within
+ * specified retry time, TMS will return
+ * TMS_EVENT_STREAM_STATE_CHANGE_ERROR. If set to 0, TMS will return
+ * TMS_EVENT_STREAM_STATE_CHANGE_ERROR immediately without retrying.
+ * If set to -1, TMS will keep retrying until user cancels by calling
+ * either Stop() or Deinit().
+ *
* @return
- * TMS_RESULT_SUCCESS if stream successfully transitioned to the paused
- * state.
+ * Common return codes:
+ * TMS_RESULT_SUCCESS if stream successfully transitioned to the
+ * started state.
* TMS_RESULT_INVALID_STATE if stream is not in the
- * TMS_STREAM_INITIALIZED or TMS_STREAM_PAUSED state.
+ * TMS_STREAM_INITIALIZED or TMS_STREAM_STARTED state.
*
*/
- IMPORT_C gint Start();
+ IMPORT_C gint Start(gint retrytime = 0);
/**
* Trigger stream to transition to the initialized state.
@@ -502,8 +523,9 @@
* be in the TMS_STREAM_INITIALIZED state.
*
* @return
- * TMS_RESULT_SUCCESS if stream successfully transitioned to the paused
- * state.
+ * Common return codes:
+ * TMS_RESULT_SUCCESS if stream successfully transitioned to the
+ * stopped state.
* TMS_RESULT_INVALID_STATE if stream is not in the
* TMS_STREAM_STARTED or TMS_STREAM_PAUSED state.
*
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/telephony_multimedia_service_api/telephony_multimedia_service_api.metaxml Wed Jun 23 18:47:10 2010 +0300
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<api id="e1fff71a33909022430461d13e338a8f" dataversion="2.0">
+ <name>telephony_multimedia_service_api</name>
+ <description>API to Telephony Multimedia Server</description>
+ <type>c++</type>
+ <collection>mmserv</collection>
+ <libs>
+ <lib name="tmsapi.lib"/>
+ <lib name="tmsfactory.lib"/>
+ </libs>
+ <release category="platform" sinceversion="0"/>
+ <attributes>
+ <htmldocprovided>no</htmldocprovided>
+ <adaptation>no</adaptation>
+ </attributes>
+</api>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmmw_plat/telephony_multimedia_service_api/tsrc/TmsAudioServicesTestClass/sis/create_sis.bat Wed Jun 23 18:47:10 2010 +0300
@@ -0,0 +1,22 @@
+cls
+@echo off
+echo.
+
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of the "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+echo Description: TMS SIS package creation utility
+rem
+
+del TmsAudioServicesTestClass.sis*
+makesis ..\group\TmsAudioServicesTestClass.pkg TmsAudioServicesTestClass.sis
+rem signsis TmsAudioServicesTestClass.sis TmsAudioServicesTestClass.sisx rd.crt rd.key
--- a/mmserv/radioutility/presetutility/group/bld.inf Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/radioutility/presetutility/group/bld.inf Wed Jun 23 18:47:10 2010 +0300
@@ -28,6 +28,9 @@
../conf/presetutility_10207B87.crml MW_LAYER_CRML(presetutility_10207B87.crml)
+backup_registration.xml z:/private/10207B87/backup_registration.xml
+
+
// iby files
../rom/fmpresetutility.iby CORE_MW_LAYER_IBY_EXPORT_PATH(fmpresetutility.iby)
../rom/presetutility.iby CORE_MW_LAYER_IBY_EXPORT_PATH(presetutility.iby)
--- a/mmserv/radioutility/presetutility/tsrc/group/RestoreOrigCenrep.cmd Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/radioutility/presetutility/tsrc/group/RestoreOrigCenrep.cmd Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description:
-@rem
-
+@REM
+@REM Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+@REM All rights reserved.
+@REM This component and the accompanying materials are made available
+@REM under the terms of "Eclipse Public License v1.0"
+@REM which accompanies this distribution, and is available
+@REM at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@REM
+@REM Initial Contributors:
+@REM Nokia Corporation - initial contribution.
+@REM
+@REM Contributors:
+@REM
+@REM Description: Wins Command file for Preset Utility
+@REM
+@REM
@echo Original environment restoration by presetutilitytestmodule...
del \epoc32\winscw\c\TestFramework\PresetUtilityTestModule.cfg
del \epoc32\wins\c\TestFramework\TestFramework.ini
--- a/mmserv/radioutility/presetutility/tsrc/group/TestEnvInit.cmd Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/radioutility/presetutility/tsrc/group/TestEnvInit.cmd Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description:
-@rem
-
+@REM
+@REM Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+@REM All rights reserved.
+@REM This component and the accompanying materials are made available
+@REM under the terms of "Eclipse Public License v1.0"
+@REM which accompanies this distribution, and is available
+@REM at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@REM
+@REM Initial Contributors:
+@REM Nokia Corporation - initial contribution.
+@REM
+@REM Contributors:
+@REM
+@REM Description: Wins Command file for Preset Utility
+@REM
+@REM
@echo Initializing test environment for presetutilitytestmodule...
copy ..\conf\PresetUtilityTestModule.cfg \epoc32\winscw\c\TestFramework\PresetUtilityTestModule.cfg
copy ..\init\PresetUtilityTestModule.ini \epoc32\wins\c\TestFramework\TestFramework.ini
--- a/mmserv/radioutility/radio_utility/inc/traceconfiguration.hrh Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/radioutility/radio_utility/inc/traceconfiguration.hrh Wed Jun 23 18:47:10 2010 +0300
@@ -11,12 +11,11 @@
*
* Contributors:
*
-* Description:
+* Description:
* Trace Macro Configurations.
*
*/
-
#ifndef TRACECONFIGURATION_HRH
#define TRACECONFIGURATION_HRH
--- a/mmserv/radioutility/radioserver/Server/Src/RadioServer.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/radioutility/radioserver/Server/Src/RadioServer.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -1435,6 +1435,7 @@
iState = EStateTunerOff;
iPreEmpted = ETrue;
iSettings->SetRadioOff(aError);
+ RADIO_RDEBUG(_L("[RADIO-SVR] PlayError() - Call TunerOff and start waiting"));
iTunerControl->TunerOff(); //The adaptation is expected to call TunerOffComplete() upon completion
// wait for TunerOffComplete callback
iSchedulerWait->Start();
@@ -1680,12 +1681,6 @@
return;
}
- if ( iState != EStateStarted )
- {
- CompleteAsyncRequest(KErrAlreadyExists);
- return;
- }
-
TInt err = KErrNone;
if ( !iTunerControl )
{
@@ -1832,7 +1827,7 @@
break;
case EStateTunerOff:
if ( iSettings->IsAntennaAttached() && AllowRadioInOfflineMode()
- && !iSettings->IsTransmitterActive() )
+ && !iSettings->IsTransmitterActive() && !iPreEmpted )
{
RADIO_RDEBUG(_L("[RADIO-SVR] ProcessSetFrequency() - Sent TunerOn request"));
RecreateFmTunerControl();
--- a/mmserv/radioutility/radioserver/Session/Src/traceconfiguration.hrh Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/radioutility/radioserver/Session/Src/traceconfiguration.hrh Wed Jun 23 18:47:10 2010 +0300
@@ -11,12 +11,11 @@
*
* Contributors:
*
-* Description:
+* Description:
* Trace Macro Configurations.
*
*/
-
#ifndef TRACECONFIGURATION_HRH
#define TRACECONFIGURATION_HRH
--- a/mmserv/sts/rom/mmmwsystemtoneservice.iby Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/sts/rom/mmmwsystemtoneservice.iby Wed Jun 23 18:47:10 2010 +0300
@@ -19,8 +19,8 @@
*
*/
-#ifndef SYSTEMTONESERVICE_IBY
-#define SYSTEMTONESERVICE_IBY
+#ifndef MMMWSYSTEMTONESERVICE_IBY
+#define MMMWSYSTEMTONESERVICE_IBY
#include <bldvariant.hrh>
@@ -30,6 +30,6 @@
//STS_Stub
data=ZSYSTEM/install/sts_stub.sis System/Install/sts_stub.sis
-#endif //SYSTEMTONESERVICE_IBY
+#endif //MMMWSYSTEMTONESERVICE_IBY
//End of File
\ No newline at end of file
--- a/mmserv/sts/sts/group/sts.mmp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/sts/sts/group/sts.mmp Wed Jun 23 18:47:10 2010 +0300
@@ -21,6 +21,7 @@
TARGET sts.lib
TARGETTYPE lib
+APP_LAYER_SYSTEMINCLUDE
MW_LAYER_SYSTEMINCLUDE
OS_LAYER_LIBC_SYSTEMINCLUDE
OS_LAYER_STDCPP_SYSTEMINCLUDE
--- a/mmserv/sts/sts/inc/stsplayer.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/sts/sts/inc/stsplayer.h Wed Jun 23 18:47:10 2010 +0300
@@ -21,6 +21,9 @@
#include <mdaaudiosampleplayer.h>
#include <systemtoneservice.h>
+class MProEngEngine;
+class MProEngProfile;
+
class MStsPlayerObserver
{
public:
@@ -30,6 +33,7 @@
class CStsPlayer : private MMdaAudioPlayerCallback
{
public:
+
static CStsPlayer* CreateTonePlayer(MStsPlayerObserver& aObserver,
CSystemToneService::TToneType aTone, unsigned int aContext);
static CStsPlayer* CreateAlarmPlayer(MStsPlayerObserver& aObserver,
@@ -38,9 +42,14 @@
void Play();
void Stop();
+
protected:
+
+ void LoadActiveProfileSettingsL();
+ void SetToneSettings(CSystemToneService::TToneType aTone);
+ void SetAlarmSettings(CSystemToneService::TAlarmType aAlarm);
CStsPlayer(MStsPlayerObserver& aObserver, const TDesC& aFileName,
- int aRepeatNumberOfTimes, unsigned int aContext);
+ int aRepeatNumberOfTimes, unsigned int aContext);
bool Init();
private:
@@ -53,6 +62,15 @@
TPtrC iFileName;
int iRepeatNumberOfTimes;
unsigned int iContext;
+
+ MProEngEngine* iEngine;
+ MProEngProfile* iProfile;
+
+ TInt iVolume;
+ TBool iWarningToneEnabled;
+ TUint iAudioPreference;
+ TUint iAudioPriority;
+
};
#endif // STSPLAYER_H_
--- a/mmserv/sts/sts/src/stsplayer.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/sts/sts/src/stsplayer.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -15,30 +15,51 @@
* This file provides the implementation for creating and deleting a
* an MMF based player for playing and stopping a tone playback.
*/
+#include "stsplayer.h"
+#include <AudioPreference.h>
+#include <MProEngEngine.h>
+#include <MProEngProfile.h>
+#include <MProEngTones.h>
+#include <MProEngToneSettings.h>
+#include <ProEngFactory.h>
+#include <systemtoneservice.h>
-#include "stsplayer.h"
_LIT(KDefaultFile,"z:\\data\\sounds\\digital\\clock.aac");
+
+
+
+
/*static*/CStsPlayer* CStsPlayer::CreateTonePlayer(
MStsPlayerObserver& aObserver, CSystemToneService::TToneType aTone,
unsigned int aContext)
{
CStsPlayer* self = 0;
- switch (aTone)
+
+ self = new CStsPlayer(aObserver, KDefaultFile, 0, aContext);
+
+ if( self != 0)
+ {
+ TRAPD(err,self->LoadActiveProfileSettingsL());
+
+ if( err == KErrNone )
+ self->SetToneSettings(aTone);
+ else
{
- default:
- self = new CStsPlayer(aObserver, KDefaultFile, 0, aContext);
- break;
- }
- if (self != 0)
- {
- bool successful = self->Init();
- if (!successful)
+ delete self;
+ self = 0;
+ }
+
+ if (self != 0)
+ {
+ bool successful = self->Init();
+ if (!successful)
{
- delete self;
- self = 0;
+ delete self;
+ self = 0;
}
+ }
}
return self;
}
@@ -48,43 +69,181 @@
unsigned int aContext)
{
CStsPlayer* self = 0;
- switch (aAlarm)
- {
- case CSystemToneService::EClockAlarm:
- self = new CStsPlayer(aObserver, KDefaultFile, 10, aContext);
- break;
- default:
- self = new CStsPlayer(aObserver, KDefaultFile, 10, aContext);
- break;
- }
- if (self != 0)
- {
- bool successful = self->Init();
- if (!successful)
+
+ self = new CStsPlayer(aObserver, KDefaultFile, 10, aContext);
+
+ if( self != 0)
+ {
+ TRAPD(err,self->LoadActiveProfileSettingsL());
+
+ if( err == KErrNone )
+ self->SetAlarmSettings(aAlarm);
+ else
+ {
+ delete self;
+ self = 0;
+ }
+
+ if (self != 0)
+ {
+ bool successful = self->Init();
+ if (!successful)
{
- delete self;
- self = 0;
- }
+ delete self;
+ self = 0;
+ }
+ }
}
return self;
}
+void CStsPlayer::LoadActiveProfileSettingsL()
+ {
+ if(!iEngine)
+ {
+ iEngine = ProEngFactory::NewEngineL();
+ }
+
+ if (iEngine)
+ iProfile = iEngine->ActiveProfileL();
+
+ if (iProfile)
+ {
+ MProEngToneSettings& settings = iProfile->ToneSettings();
+ iWarningToneEnabled = settings.WarningAndGameTones();
+ }
+
+
+
+
+ }
+
+void CStsPlayer::SetToneSettings(CSystemToneService::TToneType aTone)
+ {
+
+ if(iProfile)
+
+ {
+ MProEngTones& tones = iProfile->ProfileTones();
+
+ switch (aTone)
+ {
+ case CSystemToneService::EEmailAlert:
+ iFileName.Set(tones.EmailAlertTone());
+ iAudioPreference = KAudioPrefNewSMS;
+ iAudioPriority = KAudioPriorityRecvMsg ;
+ break;
+ case CSystemToneService::ESmsAlert:
+ iFileName.Set(tones.MessageAlertTone());
+ iAudioPreference = KAudioPrefNewSMS;
+ iAudioPriority = KAudioPriorityRecvMsg;
+ break;
+ case CSystemToneService::EMmsAlert:
+ iFileName.Set(tones.MessageAlertTone());
+ iAudioPreference = KAudioPrefNewSMS;
+ iAudioPriority = KAudioPriorityRecvMsg;
+ break;
+ case CSystemToneService::EChatAlert:
+ iFileName.Set(tones.MessageAlertTone());
+ iAudioPreference = KAudioPrefNewSMS ;
+ iAudioPriority = KAudioPriorityRecvMsg;
+ break;
+ case CSystemToneService::EWarningBeep:
+ iAudioPreference = KAudioPrefWarning;
+ iAudioPriority = KAudioPriorityWarningTone ;
+ if (iWarningToneEnabled)
+ iFileName.Set(KDefaultFile);
+ else
+ iVolume = 0;
+
+ break;
+ default:
+ iAudioPreference = KAudioPrefDefaultTone;
+ iAudioPriority = KAudioPriorityWarningTone ;
+ break;
+ }
+ }
+
+ else
+ {
+ iAudioPreference = KAudioPrefDefaultTone;
+ iAudioPriority = KAudioPriorityWarningTone ;
+ }
+
+ }
+
+
+void CStsPlayer::SetAlarmSettings(CSystemToneService::TAlarmType aAlarm)
+ {
+ if(iProfile)
+
+ {
+ MProEngTones& tones = iProfile->ProfileTones();
+
+ switch (aAlarm)
+ {
+ case CSystemToneService::EIncomingCall:
+ iFileName.Set(tones.RingingTone1());
+ iAudioPreference = KAudioPrefIncomingCall ;
+ iAudioPriority = KAudioPriorityRingingTone ;
+ break;
+ case CSystemToneService::EIncomingCallLine2:
+ iFileName.Set(tones.RingingTone2());
+ iAudioPreference = KAudioPrefIncomingCall;
+ iAudioPriority = KAudioPriorityRingingTone ;
+ break;
+ case CSystemToneService::EIncomingDataCall:
+ iFileName.Set(tones.VideoCallRingingTone());
+ iAudioPreference = KAudioPrefIncomingDataCall;
+ iAudioPriority = KAudioPriorityRealOnePlayer;
+ break;
+ default:
+ iAudioPreference = KAudioPrefAlarmClock ;
+ iAudioPriority = KAudioPriorityAlarm;
+ break;
+ }
+ }
+ else
+ {
+ iAudioPreference = KAudioPrefDefaultTone;
+ iAudioPriority = KAudioPriorityWarningTone ;
+ }
+ }
+
+
+
+
CStsPlayer::CStsPlayer(MStsPlayerObserver& aObserver, const TDesC& aFileName,
int aRepeatNumberOfTimes, unsigned int aContext) :
iObserver(aObserver), iPlayer(0), iFileName(aFileName),
iRepeatNumberOfTimes(aRepeatNumberOfTimes), iContext(aContext)
{
+ iEngine = ProEngFactory::NewEngineL();
}
bool CStsPlayer::Init()
{
- TRAPD(result, iPlayer = CMdaAudioPlayerUtility::NewL(*this));
- return result == KErrNone;
+
+
+ TRAPD(result, iPlayer = CMdaAudioPlayerUtility::NewL(*this));
+ return result == KErrNone;
+
}
+
CStsPlayer::~CStsPlayer()
{
- delete iPlayer;
+ if (iProfile)
+ {
+ iProfile->Release();
+ }
+ if (iEngine)
+ {
+ iEngine->Release();
+ }
+
+ delete iPlayer;
+
}
void CStsPlayer::Play()
@@ -111,6 +270,8 @@
if (aError == KErrNone)
{
TTimeIntervalMicroSeconds delay = 0;
+ // Set PriorityPref
+ iPlayer->SetPriority(iAudioPriority,iAudioPreference);
iPlayer->SetRepeats(iRepeatNumberOfTimes, delay);
iPlayer->Play();
}
@@ -118,6 +279,7 @@
{
//TODO: add trace
// Since there is an error, indicate that the playback is complete
+ RDebug::Print(_L("InitCompleteReturned"), aError);
iObserver.PlayComplete(iContext);
}
}
--- a/mmserv/sts/stsserver/group/stsserver.mmp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/sts/stsserver/group/stsserver.mmp Wed Jun 23 18:47:10 2010 +0300
@@ -49,3 +49,4 @@
LIBRARY libc.lib
LIBRARY libstdcpp.lib
LIBRARY mediaclientaudio.lib
+LIBRARY profileengine.lib
\ No newline at end of file
--- a/mmserv/thumbnailengine/TneAPIInc/HXTneserver.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/thumbnailengine/TneAPIInc/HXTneserver.h Wed Jun 23 18:47:10 2010 +0300
@@ -55,7 +55,7 @@
/////////////////Session class///////////////////////////
-class CTneSession : public CSession2, public MHXThumbnailUtilityImplObserver
+class CTneSession : public CSession2,public CActive, public MHXThumbnailUtilityImplObserver
{
public:
@@ -72,15 +72,20 @@
void PacketReady(TInt aError, void *pData, TUint32 aDataSize);
void EndOfPackets();
+ // CActive methods
+ virtual void RunL();
+ virtual void DoCancel();
+
protected:
- void CompleteRequest(TInt aError); // Completes the Rmessage corresponding to Getthumb
+ void CompleteRequest(const RMessage2& aMessage, TInt aError); // Completes the RMessage corresponding to Getthumb
void FetchBasicMetaData(); // Extract metadata from Util
void DoGetThumb(); // Calls Notification of Thumbpending to client on Clients request to Get thumb
TBool IsGoodFrame(TUint8* aYUVDataPtr); // checks on the value of each frame wrt width and height
void StopServer();
void NotifyIfGetThumbPending(TInt aError, TUint8 *&pYUVBuffer); // Notifies client of thumb pending
+ void NotifyIfGetMetaDataPending(TInt aError); // Notifies client of metadata pending
TInt ReOpenFile(RFile &aFileHandle); // Called in case the clip is required to be open not from 0 index but from middle of clip
TInt DoOpenFile(RFile &aFileHandle, TUint uStartTime);
TInt GetStartingTime(TUint &uStartingTime);
@@ -116,21 +121,25 @@
// Concatenated YUV data for decoded frame
TUint8* iYUVBuffer;
TUint8** iClientYUVBufferPtrPtr;
- TBool m_bOpenFileLPending;
+ TBool iReOpenFileLPending;
TBool iGetThumbPending;
TBool iCloseHandle;
TBool ibOpenFilePending;
TInt iThumbIndex;
- RMessage2 iClientRequest;
- RMessage2 iCancelRequest;
+ RMessage2 iClientRequest; // This message will handle Open related request.
+ RMessage2 iCancelRequest; // This message will handle Cancel request
+ RMessage2 iMetaDataRequest; // This message will handle MetaData Request
+ RMessage2 iThumbnailRequest;// This message will handle thumbnail message
+
// helix thumbnail utility
CHXThumbnailUtility* iUtil;
EThumbnailUtilState m_State;
RFile iFileHandle;
TBool m_bMetaDataReady;
+ TUint iPosition;
};
--- a/mmserv/thumbnailengine/TneAPISrc/HXTneserver.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/thumbnailengine/TneAPISrc/HXTneserver.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -94,7 +94,7 @@
{
cleanup =CTrapCleanup::New();
pA = new CActiveScheduler;
- pS = new CTneServer(EPriorityStandard);
+ pS = new CTneServer(EPriorityHigh);
}
@@ -162,7 +162,7 @@
////////////////////////ServerSession//////////////////////////////
-CTneSession::CTneSession():
+CTneSession::CTneSession():CActive(EPriorityStandard),
iWidth(0),
iHeight(0) ,
iDuration(0) ,
@@ -173,24 +173,29 @@
iFs(NULL),
iYUVBuffer(NULL),
iClientYUVBufferPtrPtr(NULL),
- m_bOpenFileLPending(EFalse),
+ iReOpenFileLPending(EFalse),
iGetThumbPending(EFalse),
iCloseHandle(EFalse),
ibOpenFilePending(EFalse),
iThumbIndex(0),
iUtil(NULL),
m_State( ENotReady),
- m_bMetaDataReady(EFalse)
- {
- FLOG(_L("CTneSession::CTneSession()in this=%x"), this);
- FLOG(_L("CTneSession::CTneSession()out this=%x"), this);
- }
+ m_bMetaDataReady(EFalse),
+ iPosition(0)
+{
+ CActiveScheduler::Add(this);
+ FLOG(_L("CTneSession::CTneSession()in this=%x"), this);
+ FLOG(_L("CTneSession::CTneSession()out this=%x"), this);
+}
CTneSession::~CTneSession()
{
- FLOG(_L("CTneSession::~CTneSession()in this=%x"), this);
+ FLOG(_L("CTneSession::~CTneSession()in this=%x"), this);
+
+ Cancel();
+
if(iYUVBuffer)
{
User::Free(iYUVBuffer);
@@ -212,7 +217,9 @@
delete iFs;
iFs = NULL;
}
- CompleteRequest(KErrCancel);
+ CompleteRequest(iClientRequest,KErrCancel);
+ CompleteRequest(iMetaDataRequest,KErrCancel);
+ CompleteRequest(iThumbnailRequest,KErrCancel);
CompleteCancelRequest();
CActiveScheduler::Stop();
@@ -237,7 +244,6 @@
RFile* pFileHandle;
TFileName *pFileName;
TInt aPosition;
- TNEMetaData* pMetaData;
TNEThumbRequest *pThumbRequestData;
RFile64 aFilehandle;
@@ -247,24 +253,23 @@
{
case EOpenFileRFmsg:
m_State = EStartGettingMetadata;
- bCompleteRequest = ETrue;
+ bCompleteRequest = EFalse;
+ CompleteRequest(iClientRequest,KErrNotReady); // Any previous pending request
iClientRequest = aMessage;
pFileHandle = ( RFile* ) aMessage.Ptr0(); // Handle to read Message data
aPosition = (TInt ) aMessage.Ptr1();
lError = iFileHandle.Duplicate(*pFileHandle);
+ iPosition = aPosition;
+
if (lError == KErrNone)
{
iCloseHandle = ETrue;
- lError = DoOpenFile(iFileHandle, aPosition);
+ iStatus = KRequestPending;
+ SetActive();
+ TRequestStatus* pStatus = &iStatus;
+ User::RequestComplete(pStatus, KErrNone);
}
-
- if( m_State == EStartGettingThumbNailWithIndex)
- {
- lError = ReOpenFile(iFileHandle);
- }
-
- CompleteCancelRequest(); // it will check also if cancel needs to be done.
break;
@@ -272,51 +277,41 @@
case EOpenFIleNamemsg:
iFs = NULL;
m_State = EStartGettingMetadata;
+ CompleteRequest(iClientRequest,KErrNotReady); // Any previous pending request
iClientRequest = aMessage;
pFileName = (TFileName* ) aMessage.Ptr0();
aPosition = (TInt ) aMessage.Ptr1();
-
- iFs = new RFs;
- if(iFs == NULL)
- {
- lError = KErrNoMemory;
- bCompleteRequest = ETrue;
- }
- else if ( (lError = iFs->Connect())!= KErrNone)
- {
- bCompleteRequest = ETrue;
- }
- else if ((lError = aFilehandle.Open(*iFs,*pFileName, EFileShareReadersOnly | EFileStream | EFileRead))!= KErrNone)
- {
- bCompleteRequest = ETrue;
- }
- else if ((lError = iFileHandle.Duplicate(aFilehandle))!= KErrNone)
- {
- bCompleteRequest = ETrue;
- aFilehandle.Close();
+
+ iFs = new RFs;
+ if(iFs == NULL)
+ {
+ lError = KErrNoMemory;
+ bCompleteRequest = ETrue;
+ }
+ else if ( (lError = iFs->Connect())!= KErrNone)
+ {
+ bCompleteRequest = ETrue;
+ }
+ else if ((lError = aFilehandle.Open(*iFs,*pFileName, EFileShareReadersOnly | EFileStream | EFileRead))!= KErrNone)
+ {
+ bCompleteRequest = ETrue;
+ }
+ else if ((lError = iFileHandle.Duplicate(aFilehandle))!= KErrNone)
+ {
+ bCompleteRequest = ETrue;
+ aFilehandle.Close();
+ }
+ else
+ {
+ bCompleteRequest = EFalse;
+ aFilehandle.Close();
+ iStatus = KRequestPending;
+ iCloseHandle = ETrue;
+ SetActive();
+ TRequestStatus* pStatus = &iStatus;
+ User::RequestComplete(pStatus, KErrNone);
+ }
- }
- else if ( (lError = DoOpenFile(iFileHandle, aPosition)) != KErrNone )
- {
- bCompleteRequest = ETrue;
- aFilehandle.Close();
- iCloseHandle = ETrue;
- }
- else
- {
- bCompleteRequest = ETrue;
- aFilehandle.Close();
- iCloseHandle = ETrue;
- }
-
-
- if( m_State == EStartGettingThumbNailWithIndex)
- {
- lError = ReOpenFile(iFileHandle);
- }
-
- CompleteCancelRequest(); // it will check also if cancel needs to be done.
-
if (lError != KErrNone)
{
bCompleteRequest = ETrue;
@@ -324,18 +319,16 @@
break;
case EGetMetaDatamsg:
- iClientRequest = aMessage;
- pMetaData = ( TNEMetaData* ) aMessage.Ptr0();
- pMetaData->iWidth = iWidth;
- pMetaData->iHeight = iHeight;
- pMetaData->iFrameCount = iFrameCount;
- bCompleteRequest = ETrue;
-
+
+ CompleteRequest(iMetaDataRequest,KErrNotReady); // Any previous pending request
+ iMetaDataRequest = aMessage;
+ NotifyIfGetMetaDataPending(m_LastError);
break;
case EGetThumbmsg:
- iClientRequest = aMessage;
+ CompleteRequest(iThumbnailRequest,KErrNotReady); // Any previous pending request
+ iThumbnailRequest = aMessage;
pThumbRequestData = ( TNEThumbRequest * ) aMessage.Ptr0();
// store thumb request parameters
iClientYUVBufferPtrPtr = &(pThumbRequestData->iYUVBuffer);
@@ -350,11 +343,26 @@
m_State = EStartGettingThumbNailWithIndex;
if (!ibOpenFilePending)
{
- lError = ReOpenFile(iFileHandle);
- }
+ lError = ReOpenFile(iFileHandle);
+ if(lError)
+ {
+ m_LastError = lError;
+ CompleteRequest(iThumbnailRequest,m_LastError);
+ }
+ }
+ else
+ { // Previous thumbnail generation is in progress so cancel it
+ if(iUtil)
+ {
+ iUtil->CancelThumb();
+ }
+ // Once control returns and if m_State is EStartGettingThumbNailWithIndex call ReOpenFile
+ iReOpenFileLPending = ETrue;
+ }
}
break;
case ECancelThumbmsg:
+ FLOG(_L("CTneSession::DispatchMessageL cancellation ++"));
iGetThumbPending = EFalse;
iCancelRequest = aMessage;
m_State = ECancelling;
@@ -364,12 +372,15 @@
}
// cancel any pending getthumb or openfile request.
lError = KErrCancel;
- CompleteRequest(lError);
+ CompleteRequest(iClientRequest,lError);
+ CompleteRequest(iThumbnailRequest,lError);
if (!ibOpenFilePending)
{
CompleteCancelRequest();
}
+ FLOG(_L("CTneSession::DispatchMessageL cancellation --"));
+
break;
default:
@@ -377,12 +388,12 @@
return;
}
-
- if (bCompleteRequest)
- {
- CompleteRequest(lError);
- }
-
+
+ // If any error occured during file opening
+ if (bCompleteRequest)
+ {
+ CompleteRequest(iClientRequest,lError);
+ }
FLOG(_L("CTneSession::DispatchMessageL out type=%d"), aMessage.Function());
}
@@ -425,10 +436,18 @@
delete iUtil;
iUtil = NULL;
}
-
- lError = DoOpenFile(aFileHandle, uStartingTime);
- }
-
+
+ iPosition = uStartingTime;
+
+ if(!IsActive())
+ {
+ iStatus = KRequestPending;
+ SetActive();
+ TRequestStatus* pStatus = &iStatus;
+ User::RequestComplete(pStatus, KErrNone);
+ }
+ }
+
return lError;
}
@@ -561,13 +580,14 @@
// it will be completed after the DoOpenFile() returns.
if (aError != KErrNone)
{
- CompleteRequest(aError);
+ CompleteRequest(iClientRequest,aError);
}
}
FLOG(_L("CTneSession::MetaDataReady out aError=%d"), aError);
- m_bMetaDataReady = ETrue;
-
+ m_bMetaDataReady = ETrue;
+
+ NotifyIfGetMetaDataPending(m_LastError);
}
@@ -583,6 +603,12 @@
if (m_State == ECancelling)
{
FLOG(_L("CTneSession::PacketReady no op"));
+ // Calling cancel thumbnail
+ if(iUtil)
+ {
+ iUtil->CancelThumb();
+ }
+
return;
}
if(aDataSize < (iWidth*iHeight*3/2 )) // check to avoid getting very low size
@@ -838,11 +864,11 @@
-void CTneSession::CompleteRequest(TInt aError)
+void CTneSession::CompleteRequest(const RMessage2& aMessage, TInt aError)
{
- if(!iClientRequest.IsNull())
+ if(!aMessage.IsNull())
{
- iClientRequest.Complete(aError);
+ aMessage.Complete(aError);
}
}
@@ -852,18 +878,33 @@
// ownership of pBitMap will be passed to Observer
void CTneSession::NotifyIfGetThumbPending(TInt aError, TUint8 *&pYUVBuffer)
{
- if (iGetThumbPending && !iClientRequest.IsNull())
+ if (iGetThumbPending && !iThumbnailRequest.IsNull())
{
iGetThumbPending = EFalse;
*iClientYUVBufferPtrPtr = pYUVBuffer;
- iClientRequest.Complete(aError);
+ iThumbnailRequest.Complete(aError);
}
}
+void CTneSession::NotifyIfGetMetaDataPending(TInt aError)
+{
+ if (m_bMetaDataReady && !iMetaDataRequest.IsNull())
+ {
+ TNEMetaData* pMetaData;
+ pMetaData = ( TNEMetaData* ) iMetaDataRequest.Ptr0();
+ pMetaData->iWidth = iWidth;
+ pMetaData->iHeight = iHeight;
+ pMetaData->iFrameCount = iFrameCount;
+ iMetaDataRequest.Complete(aError);
+ }
+
+}
+
void CTneSession::CompleteCancelRequest()
{
-
+ FLOG(_L("CTneSession::CompleteCancelRequest ++"));
+
if (!iCancelRequest.IsNull())
{
@@ -871,7 +912,63 @@
{
delete iUtil;
iUtil = NULL;
- }
- iCancelRequest.Complete(KErrNone);
- }
+ }
+ iCancelRequest.Complete(KErrNone);
+ FLOG(_L("CTneSession::CompleteCancelRequest message sent "));
+ }
+ FLOG(_L("CTneSession::CompleteCancelRequest --"));
+
}
+// Open the file
+void CTneSession::RunL()
+{
+ TInt lError = KErrNone;
+ m_bDone = EFalse;
+ m_uPacketsReceived = 0;
+ FLOG(_L("CTneSession::RunL ++"));
+
+ lError = DoOpenFile(iFileHandle, iPosition);
+
+ if(lError)
+ {
+ if(iUtil)
+ {
+ iUtil->CancelThumb();
+ delete iUtil;
+ iUtil = NULL;
+ }
+ }
+
+ CompleteRequest(iClientRequest,lError); // Complete client request
+ ibOpenFilePending = EFalse;
+ // If any cancel call is pending
+ CompleteCancelRequest();
+
+ // This mean App has requested thumbnail based on index when last file opening was still in progress
+ if(iReOpenFileLPending)
+ {
+ lError = ReOpenFile(iFileHandle);
+ // If some error sent notification to client
+ if(lError)
+ {
+ m_LastError = lError;
+ CompleteRequest(iThumbnailRequest,m_LastError);
+ }
+ iReOpenFileLPending = EFalse;
+ }
+ FLOG(_L("CTneSession::RunL -- "));
+}
+
+// Cancel file open and pending thumbnail
+void CTneSession::DoCancel()
+{
+ CompleteRequest(iClientRequest,KErrCancel); // Complete any request
+ CompleteRequest(iMetaDataRequest,KErrCancel); // Complete any request
+ CompleteRequest(iThumbnailRequest,KErrCancel); // Complete any request
+ ibOpenFilePending = EFalse;
+ iReOpenFileLPending = EFalse;
+ iGetThumbPending = EFalse;
+ // If any cancel call is pending
+ CompleteCancelRequest();
+
+}
--- a/mmserv/tms/inc/tmscallclisrv.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/inc/tmscallclisrv.h Wed Jun 23 18:47:10 2010 +0300
@@ -89,6 +89,7 @@
TMSStreamType StreamType;
gint StreamId;
TMSFormatType FormatType;
+ gint RetryTime;
};
typedef TPckgBuf<TMSCliSrvStreamInitDataStruct>
TMSCliSrvStreamInitDataStructBufPckg;
@@ -98,6 +99,7 @@
TMSCallType CallType;
TMSStreamType StreamType;
gint StreamId;
+ gint RetryTime;
};
typedef TPckgBuf<TMSCliSrvStreamOpDataStruct>
TMSCliSrvStreamOpDataStructBufPckg;
--- a/mmserv/tms/inc/tmscallproxy.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/inc/tmscallproxy.h Wed Jun 23 18:47:10 2010 +0300
@@ -42,9 +42,10 @@
const TMSStreamType strmType, gint& strmId);
IMPORT_C gint InitStream(const TMSCallType callType,
const TMSStreamType strmType, gint strmId,
- const TMSFormatType frmtType, RHandleBase* msgQueue);
+ const TMSFormatType frmtType, RHandleBase* msgQueue,
+ const gint retrytime);
IMPORT_C gint StartStream(const TMSCallType callType,
- const TMSStreamType strmType, gint strmId);
+ const TMSStreamType strmType, gint strmId, const gint retrytime);
IMPORT_C gint PauseStream(const TMSCallType callType,
const TMSStreamType strmType, gint strmId);
IMPORT_C gint StopStream(const TMSCallType callType,
--- a/mmserv/tms/inc/tmsclientsinkimpl.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/inc/tmsclientsinkimpl.h Wed Jun 23 18:47:10 2010 +0300
@@ -24,7 +24,7 @@
namespace TMS {
// FORWARD DECLARATIONS
-class TMSCallProxy;
+class TMSGlobalContext;
// TMSClientSinkImpl class
class TMSClientSinkImpl : public TMSClientSink
@@ -32,7 +32,7 @@
public:
virtual ~TMSClientSinkImpl();
static gint Create(TMSSink*& tmssink);
- gint SetProxy(TMSCallProxy* aProxy, gpointer queuehandler);
+ gint SetProxy(TMSGlobalContext* context, gpointer queuehandler);
private:
TMSClientSinkImpl();
--- a/mmserv/tms/inc/tmsclientsourceimpl.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/inc/tmsclientsourceimpl.h Wed Jun 23 18:47:10 2010 +0300
@@ -24,6 +24,7 @@
namespace TMS {
// FORWARD DECLARATIONS
+class TMSGlobalContext;
class TMSCallProxy;
// TMSClientSourceImpl class
@@ -32,7 +33,7 @@
public:
virtual ~TMSClientSourceImpl();
static gint Create(TMSSource*& tmssource);
- gint SetProxy(TMSCallProxy* aProxy, gint strmid, gpointer queuehandler);
+ gint SetProxy(TMSGlobalContext* context, gpointer queuehandler);
private:
TMSClientSourceImpl();
--- a/mmserv/tms/inc/tmsqueuehandler.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/inc/tmsqueuehandler.h Wed Jun 23 18:47:10 2010 +0300
@@ -27,7 +27,7 @@
namespace TMS {
// FORWARD DECLARATIONS
-class TMSBuffer; //TMSDataBuffer
+class TMSBuffer;
class TMSGlobalContext;
/**
@@ -73,24 +73,28 @@
*/
TRequestStatus* Status();
+ /*
+ * Add and remove observer to buffer events
+ */
gint AddObserver(MQueueHandlerObserver& obsvr, gint aClientId);
gint RemoveObserver(MQueueHandlerObserver& obsvr);
private:
/**
- * constructor
+ * Constructors
*/
TMSQueueHandler(RMsgQueue<TmsMsgBuf>* aMsgQueue,
TMSGlobalContext* glblCtx);
void ConstructL();
- // from CActive
+ // From CActive
void DoCancel();
void RunL();
TInt RunError(TInt aError);
+ // For buffer processing upon handler events
void DoFillBuffer(gint aBufLen, gint aStatus, gboolean flag, guint32 key);
void DoEmptyBuffer(gint aBufLen, gint aStatus, gboolean flag, guint32 key);
gint FindStreamInList();
@@ -99,7 +103,6 @@
TMSStreamState ConvertToStreamState(gint request);
private:
- // data
RPointerArray<MQueueHandlerObserver> iObserversList; // (not owned)
MQueueHandlerObserver* iObserver; //not owned
@@ -109,7 +112,7 @@
RChunk iChunk;
TPtr8 iChunkDataPtr;
TMSBuffer* iBuffer;
- TMSGlobalContext *iTMSGlobalContext;
+ TMSGlobalContext* iTMSGlobalContext;
};
} //namespace TMS
--- a/mmserv/tms/inc/tmsstreambody.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/inc/tmsstreambody.h Wed Jun 23 18:47:10 2010 +0300
@@ -50,9 +50,9 @@
virtual gint GetState() = 0;
virtual gint GetStreamType() = 0;
virtual gint GetStreamId() = 0;
- virtual gint Init() = 0;
+ virtual gint Init(gint retrytime) = 0;
virtual gint Pause() = 0;
- virtual gint Start() = 0;
+ virtual gint Start(gint retrytime) = 0;
virtual gint Stop() = 0;
virtual void Deinit() = 0;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/tms/inc/tmstimer.h Wed Jun 23 18:47:10 2010 +0300
@@ -0,0 +1,128 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * Utility class for CTimer object
+ *
+ */
+
+#ifndef TMSTIMER_H
+#define TMSTIMER_H
+
+// INCLUDES
+#include <e32base.h>
+#include <glib.h>
+
+namespace TMS {
+
+/**
+ * TMSTimerObserver observer.
+ */
+class TMSTimerObserver
+ {
+public:
+
+ /**
+ * Called upon timer timeout.
+ */
+ virtual void TimerEvent() = 0;
+ };
+
+// CLASS DECLARATION
+/**
+ * TMSTimer - Timer service.
+ */
+class TMSTimer : protected CTimer
+ {
+public:
+
+ /**
+ * Two-phased constructor.
+ */
+ IMPORT_C static TMSTimer* NewL(gint aPriority = CActive::EPriorityStandard);
+
+ /**
+ * Destructor.
+ */
+ IMPORT_C virtual ~TMSTimer();
+
+ /**
+ * Call callback method upon timer timeout event.
+ * All former request will be canceled first
+ */
+ IMPORT_C void NotifyAfter(gint timeout, TCallBack aCallBack);
+
+ /**
+ * Call client observer upon timer timeout event.
+ * All former request will be canceled first
+ */
+ IMPORT_C void NotifyAfter(gint timeout, TMSTimerObserver& observer);
+
+ /**
+ * Cancel the timer
+ */
+ IMPORT_C void CancelNotify();
+
+ /**
+ * Determines if the timer is running.
+ */
+ IMPORT_C gboolean IsRunning();
+
+protected:
+
+ /**
+ * From CTimer::RunL()
+ */
+ virtual void RunL();
+
+ /**
+ * From CTimer::RunL()
+ */
+ virtual TInt RunError(TInt aError);
+
+ /**
+ * From CTimer::DoCancel()
+ */
+ virtual void DoCancel();
+
+private:
+
+ /**
+ * C++ default constructor.
+ */
+ TMSTimer(gint aPriority);
+
+ /**
+ * Symbian OS constructor.
+ */
+ void ConstructL();
+
+ // By default, prohibit copy constructor
+ TMSTimer(const TMSTimer&);
+
+ // Prohibit assigment operator
+ TMSTimer& operator = (const TMSTimer&);
+
+private:
+
+ // Optional callback instead of observer
+ TCallBack iCallBack;
+
+ // Observer for notify service.
+ TMSTimerObserver* iObserver;
+ };
+
+} //namespace TMS
+
+#endif //TMSTIMER_H
+
--- a/mmserv/tms/inc/tmsutility.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/inc/tmsutility.h Wed Jun 23 18:47:10 2010 +0300
@@ -15,8 +15,8 @@
*
*/
-#ifndef __TMSUTILITY_H__
-#define __TMSUTILITY_H__
+#ifndef TMSUTILITY_H
+#define TMSUTILITY_H
#include <e32std.h>
#include <tms.h>
@@ -40,7 +40,9 @@
#define TRACE_PRN_N(str) RDebug::Print(str)
#define TRACE_PRN_N1(str, val1) RDebug::Print(str, val1)
#define TRACE_PRN_N2(str, val1, val2) RDebug::Print(str, val1, val2)
+
#else
+
#define TRACE_PRN_FN_ENT
#define TRACE_PRN_FN_EXT
#define TRACE_PRN_IF_ERR(err)
@@ -50,11 +52,11 @@
#define TRACE_PRN_N(str)
#define TRACE_PRN_N1(str, val1)
#define TRACE_PRN_N2(str, val1, val2)
+
#endif //_DEBUG
-
// MACRO DEFINITIONS
-#define RET_ERR_IF_ERR(err) if ( err != 0) return err;
+#define RET_ERR_IF_ERR(err) if (err != 0) return err;
#define RET_REASON_IF_ERR(s) if(s!=0) return s
#define TMSRESULT(result) TMSUtility::TMSResult(result)
@@ -82,5 +84,5 @@
} //namespace TMS
-#endif //__TMSUTILITY_H__
+#endif //TMSUTILITY_H
--- a/mmserv/tms/tmsapi/bwins/tmsapi.def Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmsapi/bwins/tmsapi.def Wed Jun 23 18:47:10 2010 +0300
@@ -23,56 +23,56 @@
?GetType@TMSGainEffect@TMS@@UAEHAAH@Z @ 22 NONAME ; int TMS::TMSGainEffect::GetType(int &)
?GetCNG@TMSILBCFormat@TMS@@QAEHAAH@Z @ 23 NONAME ; int TMS::TMSILBCFormat::GetCNG(int &)
?AddObserver@TMSStream@TMS@@QAEHAAVTMSStreamObserver@2@PAX@Z @ 24 NONAME ; int TMS::TMSStream::AddObserver(class TMS::TMSStreamObserver &, void *)
- ??0TMSG729Format@TMS@@IAE@XZ @ 25 NONAME ; TMS::TMSG729Format::TMSG729Format(void)
- ?RemoveObserver@TMSVolumeEffect@TMS@@QAEHAAVTMSEffectObserver@2@@Z @ 26 NONAME ; int TMS::TMSVolumeEffect::RemoveObserver(class TMS::TMSEffectObserver &)
- ?GetType@TMSGlobalVolEffect@TMS@@UAEHAAH@Z @ 27 NONAME ; int TMS::TMSGlobalVolEffect::GetType(int &)
- ??1TMSSpeakerSink@TMS@@UAE@XZ @ 28 NONAME ; TMS::TMSSpeakerSink::~TMSSpeakerSink(void)
- ?GetPreviousOutput@TMSGlobalRouting@TMS@@QAEHAAH@Z @ 29 NONAME ; int TMS::TMSGlobalRouting::GetPreviousOutput(int &)
- ?GetMaxLevel@TMSVolumeEffect@TMS@@QAEHAAI@Z @ 30 NONAME ; int TMS::TMSVolumeEffect::GetMaxLevel(unsigned int &)
- ?SetPlc@TMSG711Format@TMS@@QAEHH@Z @ 31 NONAME ; int TMS::TMSG711Format::SetPlc(int)
- ?GetStreamType@TMSStream@TMS@@QAEHXZ @ 32 NONAME ; int TMS::TMSStream::GetStreamType(void)
- ?AddSource@TMSStream@TMS@@QAEHPAVTMSSource@2@@Z @ 33 NONAME ; int TMS::TMSStream::AddSource(class TMS::TMSSource *)
- ??0TMSAMRFormat@TMS@@IAE@XZ @ 34 NONAME ; TMS::TMSAMRFormat::TMSAMRFormat(void)
- ??1TMSDTMF@TMS@@UAE@XZ @ 35 NONAME ; TMS::TMSDTMF::~TMSDTMF(void)
- ?AddObserver@TMSRingTone@TMS@@QAEHAAVTMSRingToneObserver@2@PAX@Z @ 36 NONAME ; int TMS::TMSRingTone::AddObserver(class TMS::TMSRingToneObserver &, void *)
- ?AddObserver@TMSDTMF@TMS@@QAEHAAVTMSDTMFObserver@2@PAX@Z @ 37 NONAME ; int TMS::TMSDTMF::AddObserver(class TMS::TMSDTMFObserver &, void *)
- ??0TMSGlobalVolEffect@TMS@@IAE@XZ @ 38 NONAME ; TMS::TMSGlobalVolEffect::TMSGlobalVolEffect(void)
- ??0TMSInbandTone@TMS@@IAE@XZ @ 39 NONAME ; TMS::TMSInbandTone::TMSInbandTone(void)
- ?GetType@TMSModemSource@TMS@@UAEHAAH@Z @ 40 NONAME ; int TMS::TMSModemSource::GetType(int &)
- ??0TMSVolumeEffect@TMS@@IAE@XZ @ 41 NONAME ; TMS::TMSVolumeEffect::TMSVolumeEffect(void)
- ??1TMSG711Format@TMS@@UAE@XZ @ 42 NONAME ; TMS::TMSG711Format::~TMSG711Format(void)
- ??1TMSGlobalVolEffect@TMS@@UAE@XZ @ 43 NONAME ; TMS::TMSGlobalVolEffect::~TMSGlobalVolEffect(void)
- ?GetType@TMSClientSink@TMS@@UAEHAAH@Z @ 44 NONAME ; int TMS::TMSClientSink::GetType(int &)
- ?AddObserver@TMSVolumeEffect@TMS@@QAEHAAVTMSEffectObserver@2@PAX@Z @ 45 NONAME ; int TMS::TMSVolumeEffect::AddObserver(class TMS::TMSEffectObserver &, void *)
- ?SetMode@TMSG711Format@TMS@@QAEHH@Z @ 46 NONAME ; int TMS::TMSG711Format::SetMode(int)
- ?Play@TMSRingTone@TMS@@QAEHXZ @ 47 NONAME ; int TMS::TMSRingTone::Play(void)
- ?RemoveObserver@TMSClientSink@TMS@@QAEHAAVTMSClientSinkObserver@2@@Z @ 48 NONAME ; int TMS::TMSClientSink::RemoveObserver(class TMS::TMSClientSinkObserver &)
- ?GetVADMode@TMSG711Format@TMS@@QAEHAAH@Z @ 49 NONAME ; int TMS::TMSG711Format::GetVADMode(int &)
- ??1TMSGlobalRouting@TMS@@UAE@XZ @ 50 NONAME ; TMS::TMSGlobalRouting::~TMSGlobalRouting(void)
- ??1TMSCall@TMS@@UAE@XZ @ 51 NONAME ; TMS::TMSCall::~TMSCall(void)
- ??1TMSILBCFormat@TMS@@UAE@XZ @ 52 NONAME ; TMS::TMSILBCFormat::~TMSILBCFormat(void)
- ??0TMSGainEffect@TMS@@IAE@XZ @ 53 NONAME ; TMS::TMSGainEffect::TMSGainEffect(void)
- ?GetMaxLevel@TMSGlobalVolEffect@TMS@@QAEHAAI@Z @ 54 NONAME ; int TMS::TMSGlobalVolEffect::GetMaxLevel(unsigned int &)
- ??1TMSFormat@TMS@@UAE@XZ @ 55 NONAME ; TMS::TMSFormat::~TMSFormat(void)
- ??1TMSModemSource@TMS@@UAE@XZ @ 56 NONAME ; TMS::TMSModemSource::~TMSModemSource(void)
- ?GetBitRate@TMSFormat@TMS@@QAEHAAI@Z @ 57 NONAME ; int TMS::TMSFormat::GetBitRate(unsigned int &)
- ?GetLevel@TMSGlobalGainEffect@TMS@@QAEHAAI@Z @ 58 NONAME ; int TMS::TMSGlobalGainEffect::GetLevel(unsigned int &)
- ?AddObserver@TMSGlobalGainEffect@TMS@@QAEHAAVTMSEffectObserver@2@PAX@Z @ 59 NONAME ; int TMS::TMSGlobalGainEffect::AddObserver(class TMS::TMSEffectObserver &, void *)
- ?RemoveObserver@TMSDTMF@TMS@@QAEHAAVTMSDTMFObserver@2@@Z @ 60 NONAME ; int TMS::TMSDTMF::RemoveObserver(class TMS::TMSDTMFObserver &)
- ??1TMSVolumeEffect@TMS@@UAE@XZ @ 61 NONAME ; TMS::TMSVolumeEffect::~TMSVolumeEffect(void)
- ?Start@TMSDTMF@TMS@@QAEHXZ @ 62 NONAME ; int TMS::TMSDTMF::Start(void)
- ??0TMSStream@TMS@@IAE@XZ @ 63 NONAME ; TMS::TMSStream::TMSStream(void)
- ?GetVADMode@TMSILBCFormat@TMS@@QAEHAAH@Z @ 64 NONAME ; int TMS::TMSILBCFormat::GetVADMode(int &)
- ?GetCallContextId@TMSCall@TMS@@QAEHAAI@Z @ 65 NONAME ; int TMS::TMSCall::GetCallContextId(unsigned int &)
- ?RemoveObserver@TMSClientSource@TMS@@QAEHAAVTMSClientSourceObserver@2@@Z @ 66 NONAME ; int TMS::TMSClientSource::RemoveObserver(class TMS::TMSClientSourceObserver &)
- ??0TMSSpeakerSink@TMS@@IAE@XZ @ 67 NONAME ; TMS::TMSSpeakerSink::TMSSpeakerSink(void)
- ?ProcessBuffer@TMSClientSource@TMS@@QAEHPAVTMSBuffer@2@@Z @ 68 NONAME ; int TMS::TMSClientSource::ProcessBuffer(class TMS::TMSBuffer *)
- ?Stop@TMSDTMF@TMS@@QAEHXZ @ 69 NONAME ; int TMS::TMSDTMF::Stop(void)
- ??1TMSRingTone@TMS@@UAE@XZ @ 70 NONAME ; TMS::TMSRingTone::~TMSRingTone(void)
- ?SetMode@TMSILBCFormat@TMS@@QAEHH@Z @ 71 NONAME ; int TMS::TMSILBCFormat::SetMode(int)
- ?GetEnqueueMode@TMSClientSource@TMS@@QAEHAAH@Z @ 72 NONAME ; int TMS::TMSClientSource::GetEnqueueMode(int &)
- ??1TMSModemSink@TMS@@UAE@XZ @ 73 NONAME ; TMS::TMSModemSink::~TMSModemSink(void)
- ?Init@TMSStream@TMS@@QAEHXZ @ 74 NONAME ; int TMS::TMSStream::Init(void)
+ ?Init@TMSStream@TMS@@QAEHH@Z @ 25 NONAME ; int TMS::TMSStream::Init(int)
+ ??0TMSG729Format@TMS@@IAE@XZ @ 26 NONAME ; TMS::TMSG729Format::TMSG729Format(void)
+ ?RemoveObserver@TMSVolumeEffect@TMS@@QAEHAAVTMSEffectObserver@2@@Z @ 27 NONAME ; int TMS::TMSVolumeEffect::RemoveObserver(class TMS::TMSEffectObserver &)
+ ?GetType@TMSGlobalVolEffect@TMS@@UAEHAAH@Z @ 28 NONAME ; int TMS::TMSGlobalVolEffect::GetType(int &)
+ ??1TMSSpeakerSink@TMS@@UAE@XZ @ 29 NONAME ; TMS::TMSSpeakerSink::~TMSSpeakerSink(void)
+ ?GetPreviousOutput@TMSGlobalRouting@TMS@@QAEHAAH@Z @ 30 NONAME ; int TMS::TMSGlobalRouting::GetPreviousOutput(int &)
+ ?GetMaxLevel@TMSVolumeEffect@TMS@@QAEHAAI@Z @ 31 NONAME ; int TMS::TMSVolumeEffect::GetMaxLevel(unsigned int &)
+ ?SetPlc@TMSG711Format@TMS@@QAEHH@Z @ 32 NONAME ; int TMS::TMSG711Format::SetPlc(int)
+ ?GetStreamType@TMSStream@TMS@@QAEHXZ @ 33 NONAME ; int TMS::TMSStream::GetStreamType(void)
+ ?AddSource@TMSStream@TMS@@QAEHPAVTMSSource@2@@Z @ 34 NONAME ; int TMS::TMSStream::AddSource(class TMS::TMSSource *)
+ ??0TMSAMRFormat@TMS@@IAE@XZ @ 35 NONAME ; TMS::TMSAMRFormat::TMSAMRFormat(void)
+ ??1TMSDTMF@TMS@@UAE@XZ @ 36 NONAME ; TMS::TMSDTMF::~TMSDTMF(void)
+ ?AddObserver@TMSRingTone@TMS@@QAEHAAVTMSRingToneObserver@2@PAX@Z @ 37 NONAME ; int TMS::TMSRingTone::AddObserver(class TMS::TMSRingToneObserver &, void *)
+ ?AddObserver@TMSDTMF@TMS@@QAEHAAVTMSDTMFObserver@2@PAX@Z @ 38 NONAME ; int TMS::TMSDTMF::AddObserver(class TMS::TMSDTMFObserver &, void *)
+ ??0TMSGlobalVolEffect@TMS@@IAE@XZ @ 39 NONAME ; TMS::TMSGlobalVolEffect::TMSGlobalVolEffect(void)
+ ??0TMSInbandTone@TMS@@IAE@XZ @ 40 NONAME ; TMS::TMSInbandTone::TMSInbandTone(void)
+ ?GetType@TMSModemSource@TMS@@UAEHAAH@Z @ 41 NONAME ; int TMS::TMSModemSource::GetType(int &)
+ ??0TMSVolumeEffect@TMS@@IAE@XZ @ 42 NONAME ; TMS::TMSVolumeEffect::TMSVolumeEffect(void)
+ ??1TMSG711Format@TMS@@UAE@XZ @ 43 NONAME ; TMS::TMSG711Format::~TMSG711Format(void)
+ ??1TMSGlobalVolEffect@TMS@@UAE@XZ @ 44 NONAME ; TMS::TMSGlobalVolEffect::~TMSGlobalVolEffect(void)
+ ?GetType@TMSClientSink@TMS@@UAEHAAH@Z @ 45 NONAME ; int TMS::TMSClientSink::GetType(int &)
+ ?AddObserver@TMSVolumeEffect@TMS@@QAEHAAVTMSEffectObserver@2@PAX@Z @ 46 NONAME ; int TMS::TMSVolumeEffect::AddObserver(class TMS::TMSEffectObserver &, void *)
+ ?SetMode@TMSG711Format@TMS@@QAEHH@Z @ 47 NONAME ; int TMS::TMSG711Format::SetMode(int)
+ ?Play@TMSRingTone@TMS@@QAEHXZ @ 48 NONAME ; int TMS::TMSRingTone::Play(void)
+ ?RemoveObserver@TMSClientSink@TMS@@QAEHAAVTMSClientSinkObserver@2@@Z @ 49 NONAME ; int TMS::TMSClientSink::RemoveObserver(class TMS::TMSClientSinkObserver &)
+ ?GetVADMode@TMSG711Format@TMS@@QAEHAAH@Z @ 50 NONAME ; int TMS::TMSG711Format::GetVADMode(int &)
+ ??1TMSGlobalRouting@TMS@@UAE@XZ @ 51 NONAME ; TMS::TMSGlobalRouting::~TMSGlobalRouting(void)
+ ??1TMSCall@TMS@@UAE@XZ @ 52 NONAME ; TMS::TMSCall::~TMSCall(void)
+ ??1TMSILBCFormat@TMS@@UAE@XZ @ 53 NONAME ; TMS::TMSILBCFormat::~TMSILBCFormat(void)
+ ??0TMSGainEffect@TMS@@IAE@XZ @ 54 NONAME ; TMS::TMSGainEffect::TMSGainEffect(void)
+ ?GetMaxLevel@TMSGlobalVolEffect@TMS@@QAEHAAI@Z @ 55 NONAME ; int TMS::TMSGlobalVolEffect::GetMaxLevel(unsigned int &)
+ ??1TMSFormat@TMS@@UAE@XZ @ 56 NONAME ; TMS::TMSFormat::~TMSFormat(void)
+ ??1TMSModemSource@TMS@@UAE@XZ @ 57 NONAME ; TMS::TMSModemSource::~TMSModemSource(void)
+ ?GetBitRate@TMSFormat@TMS@@QAEHAAI@Z @ 58 NONAME ; int TMS::TMSFormat::GetBitRate(unsigned int &)
+ ?GetLevel@TMSGlobalGainEffect@TMS@@QAEHAAI@Z @ 59 NONAME ; int TMS::TMSGlobalGainEffect::GetLevel(unsigned int &)
+ ?AddObserver@TMSGlobalGainEffect@TMS@@QAEHAAVTMSEffectObserver@2@PAX@Z @ 60 NONAME ; int TMS::TMSGlobalGainEffect::AddObserver(class TMS::TMSEffectObserver &, void *)
+ ?RemoveObserver@TMSDTMF@TMS@@QAEHAAVTMSDTMFObserver@2@@Z @ 61 NONAME ; int TMS::TMSDTMF::RemoveObserver(class TMS::TMSDTMFObserver &)
+ ??1TMSVolumeEffect@TMS@@UAE@XZ @ 62 NONAME ; TMS::TMSVolumeEffect::~TMSVolumeEffect(void)
+ ?Start@TMSDTMF@TMS@@QAEHXZ @ 63 NONAME ; int TMS::TMSDTMF::Start(void)
+ ??0TMSStream@TMS@@IAE@XZ @ 64 NONAME ; TMS::TMSStream::TMSStream(void)
+ ?GetVADMode@TMSILBCFormat@TMS@@QAEHAAH@Z @ 65 NONAME ; int TMS::TMSILBCFormat::GetVADMode(int &)
+ ?GetCallContextId@TMSCall@TMS@@QAEHAAI@Z @ 66 NONAME ; int TMS::TMSCall::GetCallContextId(unsigned int &)
+ ?RemoveObserver@TMSClientSource@TMS@@QAEHAAVTMSClientSourceObserver@2@@Z @ 67 NONAME ; int TMS::TMSClientSource::RemoveObserver(class TMS::TMSClientSourceObserver &)
+ ??0TMSSpeakerSink@TMS@@IAE@XZ @ 68 NONAME ; TMS::TMSSpeakerSink::TMSSpeakerSink(void)
+ ?ProcessBuffer@TMSClientSource@TMS@@QAEHPAVTMSBuffer@2@@Z @ 69 NONAME ; int TMS::TMSClientSource::ProcessBuffer(class TMS::TMSBuffer *)
+ ?Stop@TMSDTMF@TMS@@QAEHXZ @ 70 NONAME ; int TMS::TMSDTMF::Stop(void)
+ ??1TMSRingTone@TMS@@UAE@XZ @ 71 NONAME ; TMS::TMSRingTone::~TMSRingTone(void)
+ ?SetMode@TMSILBCFormat@TMS@@QAEHH@Z @ 72 NONAME ; int TMS::TMSILBCFormat::SetMode(int)
+ ?GetEnqueueMode@TMSClientSource@TMS@@QAEHAAH@Z @ 73 NONAME ; int TMS::TMSClientSource::GetEnqueueMode(int &)
+ ??1TMSModemSink@TMS@@UAE@XZ @ 74 NONAME ; TMS::TMSModemSink::~TMSModemSink(void)
?Flush@TMSClientSource@TMS@@QAEHXZ @ 75 NONAME ; int TMS::TMSClientSource::Flush(void)
?GetType@TMSMicSource@TMS@@UAEHAAH@Z @ 76 NONAME ; int TMS::TMSMicSource::GetType(int &)
?GetMaxLevel@TMSGainEffect@TMS@@QAEHAAI@Z @ 77 NONAME ; int TMS::TMSGainEffect::GetMaxLevel(unsigned int &)
@@ -81,57 +81,57 @@
?AddObserver@TMSGlobalVolEffect@TMS@@QAEHAAVTMSEffectObserver@2@PAX@Z @ 80 NONAME ; int TMS::TMSGlobalVolEffect::AddObserver(class TMS::TMSEffectObserver &, void *)
?GetType@TMSSpeakerSink@TMS@@UAEHAAH@Z @ 81 NONAME ; int TMS::TMSSpeakerSink::GetType(int &)
??1TMSStream@TMS@@QAE@XZ @ 82 NONAME ; TMS::TMSStream::~TMSStream(void)
- ?Start@TMSStream@TMS@@QAEHXZ @ 83 NONAME ; int TMS::TMSStream::Start(void)
- ?AddObserver@TMSClientSource@TMS@@QAEHAAVTMSClientSourceObserver@2@PAX@Z @ 84 NONAME ; int TMS::TMSClientSource::AddObserver(class TMS::TMSClientSourceObserver &, void *)
- ?AddObserver@TMSGlobalRouting@TMS@@QAEHAAVTMSGlobalRoutingObserver@2@PAX@Z @ 85 NONAME ; int TMS::TMSGlobalRouting::AddObserver(class TMS::TMSGlobalRoutingObserver &, void *)
- ?RemoveObserver@TMSGainEffect@TMS@@QAEHAAVTMSEffectObserver@2@@Z @ 86 NONAME ; int TMS::TMSGainEffect::RemoveObserver(class TMS::TMSEffectObserver &)
- ??0TMSModemSource@TMS@@IAE@XZ @ 87 NONAME ; TMS::TMSModemSource::TMSModemSource(void)
- ??1TMSAMRFormat@TMS@@UAE@XZ @ 88 NONAME ; TMS::TMSAMRFormat::~TMSAMRFormat(void)
- ??0TMSFormat@TMS@@IAE@XZ @ 89 NONAME ; TMS::TMSFormat::TMSFormat(void)
- ?SetLevel@TMSVolumeEffect@TMS@@QAEHI@Z @ 90 NONAME ; int TMS::TMSVolumeEffect::SetLevel(unsigned int)
- ??1TMSClientSink@TMS@@UAE@XZ @ 91 NONAME ; TMS::TMSClientSink::~TMSClientSink(void)
- ??0TMSDTMF@TMS@@IAE@XZ @ 92 NONAME ; TMS::TMSDTMF::TMSDTMF(void)
- ?ContinueDTMFStringSending@TMSDTMF@TMS@@QAEHH@Z @ 93 NONAME ; int TMS::TMSDTMF::ContinueDTMFStringSending(int)
- ?SetOutput@TMSGlobalRouting@TMS@@QAEHH@Z @ 94 NONAME ; int TMS::TMSGlobalRouting::SetOutput(int)
- ?GetType@TMSVolumeEffect@TMS@@UAEHAAH@Z @ 95 NONAME ; int TMS::TMSVolumeEffect::GetType(int &)
- ?BufferFilled@TMSClientSource@TMS@@QAEHAAVTMSBuffer@2@@Z @ 96 NONAME ; int TMS::TMSClientSource::BufferFilled(class TMS::TMSBuffer &)
- ?RemoveObserver@TMSGlobalRouting@TMS@@QAEHAAVTMSGlobalRoutingObserver@2@@Z @ 97 NONAME ; int TMS::TMSGlobalRouting::RemoveObserver(class TMS::TMSGlobalRoutingObserver &)
- ?Pause@TMSStream@TMS@@QAEHXZ @ 98 NONAME ; int TMS::TMSStream::Pause(void)
- ?SetBitRate@TMSFormat@TMS@@QAEHI@Z @ 99 NONAME ; int TMS::TMSFormat::SetBitRate(unsigned int)
- ?SetLevel@TMSGlobalGainEffect@TMS@@QAEHI@Z @ 100 NONAME ; int TMS::TMSGlobalGainEffect::SetLevel(unsigned int)
- ??0TMSGlobalRouting@TMS@@IAE@XZ @ 101 NONAME ; TMS::TMSGlobalRouting::TMSGlobalRouting(void)
- ?SetTone@TMSDTMF@TMS@@QAEHPAU_GString@@@Z @ 102 NONAME ; int TMS::TMSDTMF::SetTone(struct _GString *)
- ?RemoveObserver@TMSRingTone@TMS@@QAEHAAVTMSRingToneObserver@2@@Z @ 103 NONAME ; int TMS::TMSRingTone::RemoveObserver(class TMS::TMSRingToneObserver &)
- ?GetLevel@TMSGainEffect@TMS@@QAEHAAI@Z @ 104 NONAME ; int TMS::TMSGainEffect::GetLevel(unsigned int &)
- ??0TMSPCMFormat@TMS@@IAE@XZ @ 105 NONAME ; TMS::TMSPCMFormat::TMSPCMFormat(void)
- ??1TMSG729Format@TMS@@UAE@XZ @ 106 NONAME ; TMS::TMSG729Format::~TMSG729Format(void)
- ?SetLevel@TMSGainEffect@TMS@@QAEHI@Z @ 107 NONAME ; int TMS::TMSGainEffect::SetLevel(unsigned int)
- ?AddObserver@TMSGainEffect@TMS@@QAEHAAVTMSEffectObserver@2@PAX@Z @ 108 NONAME ; int TMS::TMSGainEffect::AddObserver(class TMS::TMSEffectObserver &, void *)
- ?SetVADMode@TMSG729Format@TMS@@QAEHH@Z @ 109 NONAME ; int TMS::TMSG729Format::SetVADMode(int)
- ??0TMSCall@TMS@@IAE@XZ @ 110 NONAME ; TMS::TMSCall::TMSCall(void)
- ?GetVADMode@TMSG729Format@TMS@@QAEHAAH@Z @ 111 NONAME ; int TMS::TMSG729Format::GetVADMode(int &)
- ?GetOutput@TMSGlobalRouting@TMS@@QAEHAAH@Z @ 112 NONAME ; int TMS::TMSGlobalRouting::GetOutput(int &)
- ?SetVADMode@TMSG711Format@TMS@@QAEHH@Z @ 113 NONAME ; int TMS::TMSG711Format::SetVADMode(int)
- ??1TMSInbandTone@TMS@@UAE@XZ @ 114 NONAME ; TMS::TMSInbandTone::~TMSInbandTone(void)
- ??0TMSG711Format@TMS@@IAE@XZ @ 115 NONAME ; TMS::TMSG711Format::TMSG711Format(void)
- ?GetState@TMSStream@TMS@@QAEHXZ @ 116 NONAME ; int TMS::TMSStream::GetState(void)
- ?GetStreamId@TMSStream@TMS@@QAEHXZ @ 117 NONAME ; int TMS::TMSStream::GetStreamId(void)
- ?AddSink@TMSStream@TMS@@QAEHPAVTMSSink@2@@Z @ 118 NONAME ; int TMS::TMSStream::AddSink(class TMS::TMSSink *)
- ?ResetFormat@TMSStream@TMS@@QAEHPAVTMSFormat@2@@Z @ 119 NONAME ; int TMS::TMSStream::ResetFormat(class TMS::TMSFormat *)
- ??1TMSGlobalGainEffect@TMS@@UAE@XZ @ 120 NONAME ; TMS::TMSGlobalGainEffect::~TMSGlobalGainEffect(void)
- ?RemoveEffect@TMSStream@TMS@@QAEHPAVTMSEffect@2@@Z @ 121 NONAME ; int TMS::TMSStream::RemoveEffect(class TMS::TMSEffect *)
- ??0TMSILBCFormat@TMS@@IAE@XZ @ 122 NONAME ; TMS::TMSILBCFormat::TMSILBCFormat(void)
- ?GetPlc@TMSG711Format@TMS@@QAEHAAH@Z @ 123 NONAME ; int TMS::TMSG711Format::GetPlc(int &)
- ?SetFormat@TMSStream@TMS@@QAEHPAVTMSFormat@2@@Z @ 124 NONAME ; int TMS::TMSStream::SetFormat(class TMS::TMSFormat *)
- ?GetLevel@TMSVolumeEffect@TMS@@QAEHAAI@Z @ 125 NONAME ; int TMS::TMSVolumeEffect::GetLevel(unsigned int &)
- ?GetType@TMSGlobalGainEffect@TMS@@UAEHAAH@Z @ 126 NONAME ; int TMS::TMSGlobalGainEffect::GetType(int &)
- ?GetCallType@TMSCall@TMS@@QAEHXZ @ 127 NONAME ; int TMS::TMSCall::GetCallType(void)
- ?GetMaxLevel@TMSGlobalGainEffect@TMS@@QAEHAAI@Z @ 128 NONAME ; int TMS::TMSGlobalGainEffect::GetMaxLevel(unsigned int &)
- ?GetType@TMSFormat@TMS@@UAEHAAH@Z @ 129 NONAME ; int TMS::TMSFormat::GetType(int &)
- ?RemoveObserver@TMSInbandTone@TMS@@QAEHAAVTMSInbandToneObserver@2@@Z @ 130 NONAME ; int TMS::TMSInbandTone::RemoveObserver(class TMS::TMSInbandToneObserver &)
- ??1TMSGainEffect@TMS@@UAE@XZ @ 131 NONAME ; TMS::TMSGainEffect::~TMSGainEffect(void)
- ?SetCNG@TMSG711Format@TMS@@QAEHH@Z @ 132 NONAME ; int TMS::TMSG711Format::SetCNG(int)
- ??0TMSClientSource@TMS@@IAE@XZ @ 133 NONAME ; TMS::TMSClientSource::TMSClientSource(void)
+ ?AddObserver@TMSClientSource@TMS@@QAEHAAVTMSClientSourceObserver@2@PAX@Z @ 83 NONAME ; int TMS::TMSClientSource::AddObserver(class TMS::TMSClientSourceObserver &, void *)
+ ?AddObserver@TMSGlobalRouting@TMS@@QAEHAAVTMSGlobalRoutingObserver@2@PAX@Z @ 84 NONAME ; int TMS::TMSGlobalRouting::AddObserver(class TMS::TMSGlobalRoutingObserver &, void *)
+ ?RemoveObserver@TMSGainEffect@TMS@@QAEHAAVTMSEffectObserver@2@@Z @ 85 NONAME ; int TMS::TMSGainEffect::RemoveObserver(class TMS::TMSEffectObserver &)
+ ??0TMSModemSource@TMS@@IAE@XZ @ 86 NONAME ; TMS::TMSModemSource::TMSModemSource(void)
+ ??1TMSAMRFormat@TMS@@UAE@XZ @ 87 NONAME ; TMS::TMSAMRFormat::~TMSAMRFormat(void)
+ ??0TMSFormat@TMS@@IAE@XZ @ 88 NONAME ; TMS::TMSFormat::TMSFormat(void)
+ ?SetLevel@TMSVolumeEffect@TMS@@QAEHI@Z @ 89 NONAME ; int TMS::TMSVolumeEffect::SetLevel(unsigned int)
+ ??1TMSClientSink@TMS@@UAE@XZ @ 90 NONAME ; TMS::TMSClientSink::~TMSClientSink(void)
+ ??0TMSDTMF@TMS@@IAE@XZ @ 91 NONAME ; TMS::TMSDTMF::TMSDTMF(void)
+ ?ContinueDTMFStringSending@TMSDTMF@TMS@@QAEHH@Z @ 92 NONAME ; int TMS::TMSDTMF::ContinueDTMFStringSending(int)
+ ?SetOutput@TMSGlobalRouting@TMS@@QAEHH@Z @ 93 NONAME ; int TMS::TMSGlobalRouting::SetOutput(int)
+ ?GetType@TMSVolumeEffect@TMS@@UAEHAAH@Z @ 94 NONAME ; int TMS::TMSVolumeEffect::GetType(int &)
+ ?BufferFilled@TMSClientSource@TMS@@QAEHAAVTMSBuffer@2@@Z @ 95 NONAME ; int TMS::TMSClientSource::BufferFilled(class TMS::TMSBuffer &)
+ ?RemoveObserver@TMSGlobalRouting@TMS@@QAEHAAVTMSGlobalRoutingObserver@2@@Z @ 96 NONAME ; int TMS::TMSGlobalRouting::RemoveObserver(class TMS::TMSGlobalRoutingObserver &)
+ ?Pause@TMSStream@TMS@@QAEHXZ @ 97 NONAME ; int TMS::TMSStream::Pause(void)
+ ?SetBitRate@TMSFormat@TMS@@QAEHI@Z @ 98 NONAME ; int TMS::TMSFormat::SetBitRate(unsigned int)
+ ?SetLevel@TMSGlobalGainEffect@TMS@@QAEHI@Z @ 99 NONAME ; int TMS::TMSGlobalGainEffect::SetLevel(unsigned int)
+ ??0TMSGlobalRouting@TMS@@IAE@XZ @ 100 NONAME ; TMS::TMSGlobalRouting::TMSGlobalRouting(void)
+ ?SetTone@TMSDTMF@TMS@@QAEHPAU_GString@@@Z @ 101 NONAME ; int TMS::TMSDTMF::SetTone(struct _GString *)
+ ?RemoveObserver@TMSRingTone@TMS@@QAEHAAVTMSRingToneObserver@2@@Z @ 102 NONAME ; int TMS::TMSRingTone::RemoveObserver(class TMS::TMSRingToneObserver &)
+ ?GetLevel@TMSGainEffect@TMS@@QAEHAAI@Z @ 103 NONAME ; int TMS::TMSGainEffect::GetLevel(unsigned int &)
+ ??0TMSPCMFormat@TMS@@IAE@XZ @ 104 NONAME ; TMS::TMSPCMFormat::TMSPCMFormat(void)
+ ??1TMSG729Format@TMS@@UAE@XZ @ 105 NONAME ; TMS::TMSG729Format::~TMSG729Format(void)
+ ?SetLevel@TMSGainEffect@TMS@@QAEHI@Z @ 106 NONAME ; int TMS::TMSGainEffect::SetLevel(unsigned int)
+ ?AddObserver@TMSGainEffect@TMS@@QAEHAAVTMSEffectObserver@2@PAX@Z @ 107 NONAME ; int TMS::TMSGainEffect::AddObserver(class TMS::TMSEffectObserver &, void *)
+ ?SetVADMode@TMSG729Format@TMS@@QAEHH@Z @ 108 NONAME ; int TMS::TMSG729Format::SetVADMode(int)
+ ??0TMSCall@TMS@@IAE@XZ @ 109 NONAME ; TMS::TMSCall::TMSCall(void)
+ ?GetVADMode@TMSG729Format@TMS@@QAEHAAH@Z @ 110 NONAME ; int TMS::TMSG729Format::GetVADMode(int &)
+ ?GetOutput@TMSGlobalRouting@TMS@@QAEHAAH@Z @ 111 NONAME ; int TMS::TMSGlobalRouting::GetOutput(int &)
+ ?SetVADMode@TMSG711Format@TMS@@QAEHH@Z @ 112 NONAME ; int TMS::TMSG711Format::SetVADMode(int)
+ ??1TMSInbandTone@TMS@@UAE@XZ @ 113 NONAME ; TMS::TMSInbandTone::~TMSInbandTone(void)
+ ??0TMSG711Format@TMS@@IAE@XZ @ 114 NONAME ; TMS::TMSG711Format::TMSG711Format(void)
+ ?GetState@TMSStream@TMS@@QAEHXZ @ 115 NONAME ; int TMS::TMSStream::GetState(void)
+ ?GetStreamId@TMSStream@TMS@@QAEHXZ @ 116 NONAME ; int TMS::TMSStream::GetStreamId(void)
+ ?AddSink@TMSStream@TMS@@QAEHPAVTMSSink@2@@Z @ 117 NONAME ; int TMS::TMSStream::AddSink(class TMS::TMSSink *)
+ ?ResetFormat@TMSStream@TMS@@QAEHPAVTMSFormat@2@@Z @ 118 NONAME ; int TMS::TMSStream::ResetFormat(class TMS::TMSFormat *)
+ ??1TMSGlobalGainEffect@TMS@@UAE@XZ @ 119 NONAME ; TMS::TMSGlobalGainEffect::~TMSGlobalGainEffect(void)
+ ?RemoveEffect@TMSStream@TMS@@QAEHPAVTMSEffect@2@@Z @ 120 NONAME ; int TMS::TMSStream::RemoveEffect(class TMS::TMSEffect *)
+ ??0TMSILBCFormat@TMS@@IAE@XZ @ 121 NONAME ; TMS::TMSILBCFormat::TMSILBCFormat(void)
+ ?GetPlc@TMSG711Format@TMS@@QAEHAAH@Z @ 122 NONAME ; int TMS::TMSG711Format::GetPlc(int &)
+ ?SetFormat@TMSStream@TMS@@QAEHPAVTMSFormat@2@@Z @ 123 NONAME ; int TMS::TMSStream::SetFormat(class TMS::TMSFormat *)
+ ?GetLevel@TMSVolumeEffect@TMS@@QAEHAAI@Z @ 124 NONAME ; int TMS::TMSVolumeEffect::GetLevel(unsigned int &)
+ ?GetType@TMSGlobalGainEffect@TMS@@UAEHAAH@Z @ 125 NONAME ; int TMS::TMSGlobalGainEffect::GetType(int &)
+ ?GetCallType@TMSCall@TMS@@QAEHXZ @ 126 NONAME ; int TMS::TMSCall::GetCallType(void)
+ ?GetMaxLevel@TMSGlobalGainEffect@TMS@@QAEHAAI@Z @ 127 NONAME ; int TMS::TMSGlobalGainEffect::GetMaxLevel(unsigned int &)
+ ?GetType@TMSFormat@TMS@@UAEHAAH@Z @ 128 NONAME ; int TMS::TMSFormat::GetType(int &)
+ ?RemoveObserver@TMSInbandTone@TMS@@QAEHAAVTMSInbandToneObserver@2@@Z @ 129 NONAME ; int TMS::TMSInbandTone::RemoveObserver(class TMS::TMSInbandToneObserver &)
+ ??1TMSGainEffect@TMS@@UAE@XZ @ 130 NONAME ; TMS::TMSGainEffect::~TMSGainEffect(void)
+ ?SetCNG@TMSG711Format@TMS@@QAEHH@Z @ 131 NONAME ; int TMS::TMSG711Format::SetCNG(int)
+ ??0TMSClientSource@TMS@@IAE@XZ @ 132 NONAME ; TMS::TMSClientSource::TMSClientSource(void)
+ ?Start@TMSStream@TMS@@QAEHH@Z @ 133 NONAME ; int TMS::TMSStream::Start(int)
?GetAvailableOutputs@TMSGlobalRouting@TMS@@QAEHAAV?$vector@IV?$allocator@I@std@@@std@@@Z @ 134 NONAME ; int TMS::TMSGlobalRouting::GetAvailableOutputs(class std::vector<unsigned int, class std::allocator<unsigned int> > &)
?Deinit@TMSRingTone@TMS@@QAEHXZ @ 135 NONAME ; int TMS::TMSRingTone::Deinit(void)
?AddObserver@TMSClientSink@TMS@@QAEHAAVTMSClientSinkObserver@2@PAX@Z @ 136 NONAME ; int TMS::TMSClientSink::AddObserver(class TMS::TMSClientSinkObserver &, void *)
--- a/mmserv/tms/tmsapi/eabi/tmsapi.def Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmsapi/eabi/tmsapi.def Wed Jun 23 18:47:10 2010 +0300
@@ -200,10 +200,10 @@
_ZN3TMS9TMSStream12RemoveSourceEPNS_9TMSSourceE @ 199 NONAME
_ZN3TMS9TMSStream13GetStreamTypeEv @ 200 NONAME
_ZN3TMS9TMSStream14RemoveObserverERNS_17TMSStreamObserverE @ 201 NONAME
- _ZN3TMS9TMSStream4InitEv @ 202 NONAME
+ _ZN3TMS9TMSStream4InitEi @ 202 NONAME
_ZN3TMS9TMSStream4StopEv @ 203 NONAME
_ZN3TMS9TMSStream5PauseEv @ 204 NONAME
- _ZN3TMS9TMSStream5StartEv @ 205 NONAME
+ _ZN3TMS9TMSStream5StartEi @ 205 NONAME
_ZN3TMS9TMSStream6DeinitEv @ 206 NONAME
_ZN3TMS9TMSStream7AddSinkEPNS_7TMSSinkE @ 207 NONAME
_ZN3TMS9TMSStream8GetStateEv @ 208 NONAME
--- a/mmserv/tms/tmsapi/src/tmsstream.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmsapi/src/tmsstream.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -161,12 +161,12 @@
return status;
}
-EXPORT_C gint TMSStream::Init()
+EXPORT_C gint TMSStream::Init(gint retrytime)
{
gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
if (iBody)
{
- status = iBody->Init();
+ status = iBody->Init(retrytime);
}
return status;
}
@@ -181,12 +181,12 @@
return status;
}
-EXPORT_C gint TMSStream::Start()
+EXPORT_C gint TMSStream::Start(gint retrytime)
{
gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
if (iBody)
{
- status = iBody->Start();
+ status = iBody->Start(retrytime);
}
return status;
}
--- a/mmserv/tms/tmscallproxy/bwins/tmscallproxy.def Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallproxy/bwins/tmscallproxy.def Wed Jun 23 18:47:10 2010 +0300
@@ -1,35 +1,35 @@
EXPORTS
?GetVolume@TMSCallProxy@TMS@@QAEHAAI@Z @ 1 NONAME ; int TMS::TMSCallProxy::GetVolume(unsigned int &)
- ?StartStream@TMSCallProxy@TMS@@QAEHHHH@Z @ 2 NONAME ; int TMS::TMSCallProxy::StartStream(int, int, int)
- ?SetCNG@TMSCallProxy@TMS@@QAEHHH@Z @ 3 NONAME ; int TMS::TMSCallProxy::SetCNG(int, int)
- ?BufferFilled@TMSCallProxy@TMS@@QAEHHHHAAVTMSBuffer@2@@Z @ 4 NONAME ; int TMS::TMSCallProxy::BufferFilled(int, int, int, class TMS::TMSBuffer &)
- ?CreateStream@TMSCallProxy@TMS@@QAEHHHAAH@Z @ 5 NONAME ; int TMS::TMSCallProxy::CreateStream(int, int, int &)
- ?GetSupportedBitRates@TMSCallProxy@TMS@@QAEHAAV?$vector@IV?$allocator@I@std@@@std@@@Z @ 6 NONAME ; int TMS::TMSCallProxy::GetSupportedBitRates(class std::vector<unsigned int, class std::allocator<unsigned int> > &)
- ?Close@TMSCallProxy@TMS@@QAEXXZ @ 7 NONAME ; void TMS::TMSCallProxy::Close(void)
- ?InitStream@TMSCallProxy@TMS@@QAEHHHHHPAVRHandleBase@@@Z @ 8 NONAME ; int TMS::TMSCallProxy::InitStream(int, int, int, int, class RHandleBase *)
- ?GetCNG@TMSCallProxy@TMS@@QAEHHAAH@Z @ 9 NONAME ; int TMS::TMSCallProxy::GetCNG(int, int &)
- ?GetMaxVolume@TMSCallProxy@TMS@@QAEHAAI@Z @ 10 NONAME ; int TMS::TMSCallProxy::GetMaxVolume(unsigned int &)
- ?GetVADMode@TMSCallProxy@TMS@@QAEHHAAH@Z @ 11 NONAME ; int TMS::TMSCallProxy::GetVADMode(int, int &)
- ?PauseStream@TMSCallProxy@TMS@@QAEHHHH@Z @ 12 NONAME ; int TMS::TMSCallProxy::PauseStream(int, int, int)
- ?GetBitRate@TMSCallProxy@TMS@@QAEHAAI@Z @ 13 NONAME ; int TMS::TMSCallProxy::GetBitRate(unsigned int &)
- ?SetFormatCodecMode@TMSCallProxy@TMS@@QAEHHHH@Z @ 14 NONAME ; int TMS::TMSCallProxy::SetFormatCodecMode(int, int, int)
- ?GetPlc@TMSCallProxy@TMS@@QAEHHAAH@Z @ 15 NONAME ; int TMS::TMSCallProxy::GetPlc(int, int &)
- ?StopStream@TMSCallProxy@TMS@@QAEHHHH@Z @ 16 NONAME ; int TMS::TMSCallProxy::StopStream(int, int, int)
- ?SetVolume@TMSCallProxy@TMS@@QAEHI@Z @ 17 NONAME ; int TMS::TMSCallProxy::SetVolume(unsigned int)
- ?GetGain@TMSCallProxy@TMS@@QAEHAAI@Z @ 18 NONAME ; int TMS::TMSCallProxy::GetGain(unsigned int &)
- ?SetPlc@TMSCallProxy@TMS@@QAEHHH@Z @ 19 NONAME ; int TMS::TMSCallProxy::SetPlc(int, int)
- ??1TMSCallProxy@TMS@@UAE@XZ @ 20 NONAME ; TMS::TMSCallProxy::~TMSCallProxy(void)
- ?GetMaxGain@TMSCallProxy@TMS@@QAEHAAI@Z @ 21 NONAME ; int TMS::TMSCallProxy::GetMaxGain(unsigned int &)
- ?CreateCall@TMSCallProxy@TMS@@QAEHH@Z @ 22 NONAME ; int TMS::TMSCallProxy::CreateCall(int)
- ?SetVADMode@TMSCallProxy@TMS@@QAEHHH@Z @ 23 NONAME ; int TMS::TMSCallProxy::SetVADMode(int, int)
- ?DeleteCall@TMSCallProxy@TMS@@QAEXXZ @ 24 NONAME ; void TMS::TMSCallProxy::DeleteCall(void)
- ?GetDataXferChunkHandle@TMSCallProxy@TMS@@QAEHHHHI@Z @ 25 NONAME ; int TMS::TMSCallProxy::GetDataXferChunkHandle(int, int, int, unsigned int)
- ?DeleteStream@TMSCallProxy@TMS@@QAEHHHAAH@Z @ 26 NONAME ; int TMS::TMSCallProxy::DeleteStream(int, int, int &)
- ??0TMSCallProxy@TMS@@QAE@XZ @ 27 NONAME ; TMS::TMSCallProxy::TMSCallProxy(void)
- ?BufferEmptied@TMSCallProxy@TMS@@QAEHHHHAAVTMSBuffer@2@@Z @ 28 NONAME ; int TMS::TMSCallProxy::BufferEmptied(int, int, int, class TMS::TMSBuffer &)
- ?Connect@TMSCallProxy@TMS@@QAEHXZ @ 29 NONAME ; int TMS::TMSCallProxy::Connect(void)
- ?SetGain@TMSCallProxy@TMS@@QAEHI@Z @ 30 NONAME ; int TMS::TMSCallProxy::SetGain(unsigned int)
- ?SetBitRate@TMSCallProxy@TMS@@QAEHI@Z @ 31 NONAME ; int TMS::TMSCallProxy::SetBitRate(unsigned int)
+ ?GetGain@TMSCallProxy@TMS@@QAEHAAI@Z @ 2 NONAME ; int TMS::TMSCallProxy::GetGain(unsigned int &)
+ ?SetPlc@TMSCallProxy@TMS@@QAEHHH@Z @ 3 NONAME ; int TMS::TMSCallProxy::SetPlc(int, int)
+ ??1TMSCallProxy@TMS@@UAE@XZ @ 4 NONAME ; TMS::TMSCallProxy::~TMSCallProxy(void)
+ ?SetCNG@TMSCallProxy@TMS@@QAEHHH@Z @ 5 NONAME ; int TMS::TMSCallProxy::SetCNG(int, int)
+ ?GetMaxGain@TMSCallProxy@TMS@@QAEHAAI@Z @ 6 NONAME ; int TMS::TMSCallProxy::GetMaxGain(unsigned int &)
+ ?BufferFilled@TMSCallProxy@TMS@@QAEHHHHAAVTMSBuffer@2@@Z @ 7 NONAME ; int TMS::TMSCallProxy::BufferFilled(int, int, int, class TMS::TMSBuffer &)
+ ?CreateCall@TMSCallProxy@TMS@@QAEHH@Z @ 8 NONAME ; int TMS::TMSCallProxy::CreateCall(int)
+ ?CreateStream@TMSCallProxy@TMS@@QAEHHHAAH@Z @ 9 NONAME ; int TMS::TMSCallProxy::CreateStream(int, int, int &)
+ ?SetVADMode@TMSCallProxy@TMS@@QAEHHH@Z @ 10 NONAME ; int TMS::TMSCallProxy::SetVADMode(int, int)
+ ?GetSupportedBitRates@TMSCallProxy@TMS@@QAEHAAV?$vector@IV?$allocator@I@std@@@std@@@Z @ 11 NONAME ; int TMS::TMSCallProxy::GetSupportedBitRates(class std::vector<unsigned int, class std::allocator<unsigned int> > &)
+ ?InitStream@TMSCallProxy@TMS@@QAEHHHHHPAVRHandleBase@@H@Z @ 12 NONAME ; int TMS::TMSCallProxy::InitStream(int, int, int, int, class RHandleBase *, int)
+ ?GetDataXferChunkHandle@TMSCallProxy@TMS@@QAEHHHHI@Z @ 13 NONAME ; int TMS::TMSCallProxy::GetDataXferChunkHandle(int, int, int, unsigned int)
+ ?Close@TMSCallProxy@TMS@@QAEXXZ @ 14 NONAME ; void TMS::TMSCallProxy::Close(void)
+ ?DeleteCall@TMSCallProxy@TMS@@QAEXXZ @ 15 NONAME ; void TMS::TMSCallProxy::DeleteCall(void)
+ ?GetCNG@TMSCallProxy@TMS@@QAEHHAAH@Z @ 16 NONAME ; int TMS::TMSCallProxy::GetCNG(int, int &)
+ ?StartStream@TMSCallProxy@TMS@@QAEHHHHH@Z @ 17 NONAME ; int TMS::TMSCallProxy::StartStream(int, int, int, int)
+ ?GetMaxVolume@TMSCallProxy@TMS@@QAEHAAI@Z @ 18 NONAME ; int TMS::TMSCallProxy::GetMaxVolume(unsigned int &)
+ ??0TMSCallProxy@TMS@@QAE@XZ @ 19 NONAME ; TMS::TMSCallProxy::TMSCallProxy(void)
+ ?DeleteStream@TMSCallProxy@TMS@@QAEHHHAAH@Z @ 20 NONAME ; int TMS::TMSCallProxy::DeleteStream(int, int, int &)
+ ?BufferEmptied@TMSCallProxy@TMS@@QAEHHHHAAVTMSBuffer@2@@Z @ 21 NONAME ; int TMS::TMSCallProxy::BufferEmptied(int, int, int, class TMS::TMSBuffer &)
+ ?GetVADMode@TMSCallProxy@TMS@@QAEHHAAH@Z @ 22 NONAME ; int TMS::TMSCallProxy::GetVADMode(int, int &)
+ ?Connect@TMSCallProxy@TMS@@QAEHXZ @ 23 NONAME ; int TMS::TMSCallProxy::Connect(void)
+ ?PauseStream@TMSCallProxy@TMS@@QAEHHHH@Z @ 24 NONAME ; int TMS::TMSCallProxy::PauseStream(int, int, int)
+ ?GetBitRate@TMSCallProxy@TMS@@QAEHAAI@Z @ 25 NONAME ; int TMS::TMSCallProxy::GetBitRate(unsigned int &)
+ ?SetFormatCodecMode@TMSCallProxy@TMS@@QAEHHHH@Z @ 26 NONAME ; int TMS::TMSCallProxy::SetFormatCodecMode(int, int, int)
+ ?SetGain@TMSCallProxy@TMS@@QAEHI@Z @ 27 NONAME ; int TMS::TMSCallProxy::SetGain(unsigned int)
+ ?SetBitRate@TMSCallProxy@TMS@@QAEHI@Z @ 28 NONAME ; int TMS::TMSCallProxy::SetBitRate(unsigned int)
+ ?GetPlc@TMSCallProxy@TMS@@QAEHHAAH@Z @ 29 NONAME ; int TMS::TMSCallProxy::GetPlc(int, int &)
+ ?StopStream@TMSCallProxy@TMS@@QAEHHHH@Z @ 30 NONAME ; int TMS::TMSCallProxy::StopStream(int, int, int)
+ ?DeinitStream@TMSCallProxy@TMS@@QAEHHHH@Z @ 31 NONAME ; int TMS::TMSCallProxy::DeinitStream(int, int, int)
?GetFormatCodecMode@TMSCallProxy@TMS@@QAEHHHAAH@Z @ 32 NONAME ; int TMS::TMSCallProxy::GetFormatCodecMode(int, int, int &)
- ?DeinitStream@TMSCallProxy@TMS@@QAEHHHH@Z @ 33 NONAME ; int TMS::TMSCallProxy::DeinitStream(int, int, int)
+ ?SetVolume@TMSCallProxy@TMS@@QAEHI@Z @ 33 NONAME ; int TMS::TMSCallProxy::SetVolume(unsigned int)
--- a/mmserv/tms/tmscallproxy/eabi/tmscallproxy.def Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallproxy/eabi/tmscallproxy.def Wed Jun 23 18:47:10 2010 +0300
@@ -4,12 +4,12 @@
_ZN3TMS12TMSCallProxy10GetBitRateERj @ 3 NONAME
_ZN3TMS12TMSCallProxy10GetMaxGainERj @ 4 NONAME
_ZN3TMS12TMSCallProxy10GetVADModeEiRi @ 5 NONAME
- _ZN3TMS12TMSCallProxy10InitStreamEiiiiP11RHandleBase @ 6 NONAME
+ _ZN3TMS12TMSCallProxy10InitStreamEiiiiP11RHandleBasei @ 6 NONAME
_ZN3TMS12TMSCallProxy10SetBitRateEj @ 7 NONAME
_ZN3TMS12TMSCallProxy10SetVADModeEii @ 8 NONAME
_ZN3TMS12TMSCallProxy10StopStreamEiii @ 9 NONAME
_ZN3TMS12TMSCallProxy11PauseStreamEiii @ 10 NONAME
- _ZN3TMS12TMSCallProxy11StartStreamEiii @ 11 NONAME
+ _ZN3TMS12TMSCallProxy11StartStreamEiiii @ 11 NONAME
_ZN3TMS12TMSCallProxy12BufferFilledEiiiRNS_9TMSBufferE @ 12 NONAME
_ZN3TMS12TMSCallProxy12CreateStreamEiiRi @ 13 NONAME
_ZN3TMS12TMSCallProxy12DeinitStreamEiii @ 14 NONAME
--- a/mmserv/tms/tmscallproxy/src/tmscallproxy.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallproxy/src/tmscallproxy.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -119,7 +119,8 @@
//
EXPORT_C gint TMSCallProxy::InitStream(const TMSCallType callType,
const TMSStreamType strmType, gint strmId,
- const TMSFormatType frmtType, RHandleBase* msgQueue)
+ const TMSFormatType frmtType, RHandleBase* msgQueue,
+ const gint retrytime)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_SUCCESS);
@@ -128,6 +129,7 @@
inPckg().StreamType = strmType;
inPckg().StreamId = strmId;
inPckg().FormatType = frmtType;
+ inPckg().RetryTime = retrytime;
status = RSessionBase::SendReceive(TMS_INIT_STREAM, TIpcArgs(&inPckg,
*msgQueue));
TRACE_PRN_FN_EXT;
@@ -140,7 +142,7 @@
// -----------------------------------------------------------------------------
//
EXPORT_C gint TMSCallProxy::StartStream(const TMSCallType callType,
- const TMSStreamType strmType, gint strmId)
+ const TMSStreamType strmType, gint strmId, const gint retrytime)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_SUCCESS);
@@ -148,6 +150,7 @@
inPckg().CallType = callType;
inPckg().StreamType = strmType;
inPckg().StreamId = strmId;
+ inPckg().RetryTime = retrytime;
status = RSessionBase::SendReceive(TMS_START_STREAM, TIpcArgs(&inPckg));
TRACE_PRN_FN_EXT;
return TMSRESULT(status);
--- a/mmserv/tms/tmscallserver/inc/tmscalladpt.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallserver/inc/tmscalladpt.h Wed Jun 23 18:47:10 2010 +0300
@@ -31,24 +31,28 @@
virtual ~TMSCallAdpt();
// From TMSStream
- virtual gint CreateStream(TMSCallType callType,
- TMSStreamType strmType, gint& outStrmId) = 0;
- virtual gint InitStream(TMSCallType callType, TMSStreamType strmType,
- gint strmId, TMSFormatType frmtType, const RMessage2& aMessage) = 0;
- virtual gint StartStream(TMSCallType callType,
- TMSStreamType strmType, gint strmId) = 0;
- virtual gint PauseStream(TMSCallType callType,
- TMSStreamType strmType, gint strmId) = 0;
- virtual gint StopStream(TMSCallType callType, TMSStreamType strmType,
- gint strmId) = 0;
- virtual gint DeinitStream(TMSCallType callType,
- TMSStreamType strmType, gint strmId) = 0;
- virtual gint DeleteStream(TMSCallType callType,
- TMSStreamType strmType, gint strmId) = 0;
- virtual gint DataXferBufferEmptied(TMSCallType callType,
- TMSStreamType strmType, gint strmId) = 0;
- virtual gint DataXferBufferFilled(TMSCallType callType,
- TMSStreamType strmType, gint strmId, guint datasize) = 0;
+ virtual gint CreateStream(const TMSCallType callType,
+ const TMSStreamType strmType, gint& outStrmId) = 0;
+ virtual gint InitStream(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId,
+ const TMSFormatType frmtType, const gint retrytime,
+ const RMessage2& aMessage) = 0;
+ virtual gint StartStream(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId,
+ const gint retrytime) = 0;
+ virtual gint PauseStream(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId) = 0;
+ virtual gint StopStream(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId) = 0;
+ virtual gint DeinitStream(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId) = 0;
+ virtual gint DeleteStream(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId) = 0;
+ virtual gint DataXferBufferEmptied(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId) = 0;
+ virtual gint DataXferBufferFilled(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId,
+ const guint datasize) = 0;
virtual gint GetDataXferBufferHndl(const TMSCallType callType,
const TMSStreamType strmType, const gint strmId,
const guint32 key, RChunk& chunk) = 0;
@@ -84,20 +88,19 @@
virtual gint SetPlc(const TMSFormatType fmttype, const gboolean plc) = 0;
// From TMS routing
- virtual gint SetOutput(TMSAudioOutput output) = 0;
+ virtual gint SetOutput(const TMSAudioOutput output) = 0;
virtual gint GetOutput(TMSAudioOutput& output) = 0;
virtual gint GetPreviousOutput(TMSAudioOutput& output) = 0;
- virtual gint GetAvailableOutputsL(gint& count,
- CBufFlat*& outputsbuffer) = 0;
+ virtual gint GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuf) = 0;
// From TMSDTMF
- virtual gint StartDTMF(TMSStreamType streamtype, TDes& dtmfstring) = 0;
- virtual gint StopDTMF(TMSStreamType streamtype) = 0;
- virtual gint ContinueDTMF(TBool continuesending) = 0;
+ virtual gint StartDTMF(const TMSStreamType streamtype, TDes& dtmfstr) = 0;
+ virtual gint StopDTMF(const TMSStreamType streamtype) = 0;
+ virtual gint ContinueDTMF(const gboolean sending) = 0;
protected:
TMSCallAdpt();
- virtual gint PostConstruct();
+ virtual gint PostConstruct() = 0;
protected:
gint iGlobalVol;
--- a/mmserv/tms/tmscallserver/inc/tmscallcsadpt.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallserver/inc/tmscallcsadpt.h Wed Jun 23 18:47:10 2010 +0300
@@ -18,6 +18,7 @@
#ifndef CALLCSADPT_H
#define CALLCSADPT_H
+// INCLUDES
#include <TelephonyAudioRouting.h>
#include <MTelephonyAudioRoutingObserver.h>
#include <e32msgqueue.h>
@@ -40,37 +41,42 @@
class TMSDtmfNotifier;
/*
- * CallCSAdapt class
+ * TMSCallCSAdpt class
*/
class TMSCallCSAdpt : public TMSCallAdpt,
- public TMSCSPDevSoundObserver,
+ public TMSCSDevSoundObserver,
public MTelephonyAudioRoutingObserver,
public TMSDTMFTonePlayerObserver,
public TMSDTMFObserver
{
public:
- TMSCallCSAdpt();
+ static TMSCallCSAdpt* NewL();
virtual ~TMSCallCSAdpt();
virtual gint PostConstruct();
- virtual gint CreateStream(TMSCallType callType, TMSStreamType strmType,
- gint& outStrmId);
- virtual gint InitStream(TMSCallType callType, TMSStreamType strmType,
- gint strmId, TMSFormatType frmtType, const RMessage2& message);
- virtual gint StartStream(TMSCallType callType, TMSStreamType strmType,
- gint strmId);
- virtual gint PauseStream(TMSCallType callType, TMSStreamType strmType,
- gint strmId);
- virtual gint StopStream(TMSCallType callType, TMSStreamType strmType,
- gint strmId);
- virtual gint DeinitStream(TMSCallType callType, TMSStreamType strmType,
- gint strmId);
- virtual gint DeleteStream(TMSCallType callType, TMSStreamType strmType,
- gint strmId);
- virtual gint DataXferBufferEmptied(TMSCallType callType,
- TMSStreamType strmType, gint strmId);
- virtual gint DataXferBufferFilled(TMSCallType callType,
- TMSStreamType strmType, gint strmId, guint datasize);
+ // From TMSStream
+ virtual gint CreateStream(const TMSCallType callType,
+ const TMSStreamType strmType, gint& outStrmId);
+ virtual gint InitStream(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId,
+ const TMSFormatType frmtType, const gint retryTime,
+ const RMessage2& message);
+ virtual gint StartStream(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId,
+ const gint retrytime);
+ virtual gint PauseStream(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId);
+ virtual gint StopStream(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId);
+ virtual gint DeinitStream(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId);
+ virtual gint DeleteStream(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId);
+ virtual gint DataXferBufferEmptied(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId);
+ virtual gint DataXferBufferFilled(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId,
+ const guint datasize);
virtual gint GetDataXferBufferHndl(const TMSCallType callType,
const TMSStreamType strmType, const gint strmId,
const guint32 key, RChunk& chunk);
@@ -106,45 +112,47 @@
virtual gint SetPlc(const TMSFormatType fmttype, const gboolean plc);
// From TMS audio routing
- virtual gint SetOutput(TMSAudioOutput output);
+ virtual gint SetOutput(const TMSAudioOutput output);
virtual gint GetOutput(TMSAudioOutput& output);
virtual gint GetPreviousOutput(TMSAudioOutput& output);
- virtual gint GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuffer);
-
+ virtual gint GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuf);
+
// From TMSDTMF
- virtual gint StartDTMF(TMSStreamType streamtype, TDes& dtmfstring);
- virtual gint StopDTMF(TMSStreamType streamtype);
- virtual gint ContinueDTMF(TBool continuesending);
+ virtual gint StartDTMF(const TMSStreamType streamtype, TDes& dtmfstr);
+ virtual gint StopDTMF(const TMSStreamType streamtype);
+ virtual gint ContinueDTMF(const gboolean sending);
- //From TMSCSPDevSoundObserver
- void DownlinkInitCompleted(TInt status);
- void UplinkInitCompleted(TInt status);
- void UplinkActivatedSuccessfully();
- void DownlinkActivatedSuccessfully();
- void UplinkActivationFailed();
- void DownlinkActivationFailed();
+ //From TMSCSDevSoundObserver
+ void DownlinkInitCompleted(gint status);
+ void UplinkInitCompleted(gint status);
+ void DownlinkActivationCompleted(gint status);
+ void UplinkActivationCompleted(gint status);
- //From DTMFTonePlayerObserver
- void DTMFInitCompleted(TInt error);
- void DTMFToneFinished(TInt error);
+ //From TMSDTMFTonePlayerObserver
+ void DTMFInitCompleted(gint status);
+ void DTMFToneFinished(gint status);
//From TMSDTMFObserver
- void HandleDTMFEvent(const TMSDTMFObserver::TCCPDtmfEvent aEvent,
- const TInt aError, const TChar aTone);
+ void HandleDTMFEvent(const TMSDTMFObserver::TCCPDtmfEvent event,
+ const gint status, const TChar tone);
private:
+ TMSCallCSAdpt();
+ void ConstructL();
+
+ gint InitUplink(const gint retrytime);
+ gint InitDownlink(const gint retrytime);
void AvailableOutputsChanged(
CTelephonyAudioRouting& aTelephonyAudioRouting);
void OutputChanged(CTelephonyAudioRouting& aTelephonyAudioRouting);
void SetOutputComplete(CTelephonyAudioRouting& aTelephonyAudioRouting,
- gint aError);
+ gint status);
void GetSupportedBitRatesL(CBufFlat*& brbuffer);
void NotifyClient(const gint strmId, const gint command,
const gint status = KErrNone, const gint64 int64 = TInt64(0));
private:
gint iNextStreamId;
-
TMSCSUplink* iCSUplink;
TMSCSDownlink* iCSDownlink;
CTelephonyAudioRouting* iRouting;
@@ -152,8 +160,8 @@
TMSAudioDtmfTonePlayer* iDTMFDnlinkPlayer;
TMSDtmfNotifier* iDTMFNotifier;
TMSDTMFProvider* iDTMFUplinkPlayer;
- TMSStreamType iStrmtype;
+ // Message queues for communication and data transfer back to the client
RMsgQueue<TmsMsgBuf> iMsgQueueUp;
RMsgQueue<TmsMsgBuf> iMsgQueueDn;
TmsMsgBuf iMsgBuffer;
--- a/mmserv/tms/tmscallserver/inc/tmscallipadpt.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallserver/inc/tmscallipadpt.h Wed Jun 23 18:47:10 2010 +0300
@@ -15,8 +15,8 @@
*
*/
-#ifndef __CALLIPADAPT_H
-#define __CALLIPADAPT_H
+#ifndef CALLIPADAPT_H
+#define CALLIPADAPT_H
// INCLUDES
#include <e32msgqueue.h>
@@ -24,6 +24,7 @@
#include "tmsclientserver.h"
#include "tmsshared.h"
#include "tmscalladpt.h"
+#include "tmsipcallstream.h"
#include "tmsdtmftoneplayer.h"
#include "tmsdtmfnotifier.h"
@@ -33,35 +34,41 @@
class TMSIPDownlink;
class TMSIPUplink;
-// TMSCallIPAdpt class
+/*
+ * TMSCallIPAdpt class
+ */
class TMSCallIPAdpt : public TMSCallAdpt,
+ public TMSIPDevSoundObserver,
public TMSDTMFTonePlayerObserver
{
public:
- // Constractor
static TMSCallIPAdpt* NewL();
virtual ~TMSCallIPAdpt();
virtual gint PostConstruct();
// From TMSStream
- virtual gint CreateStream(TMSCallType callType, TMSStreamType strmType,
- gint& outStrmId);
- virtual gint InitStream(TMSCallType callType, TMSStreamType strmType,
- gint strmId, TMSFormatType frmtType, const RMessage2& message);
- virtual gint StartStream(TMSCallType callType, TMSStreamType strmType,
- gint strmId);
- virtual gint PauseStream(TMSCallType callType, TMSStreamType strmType,
- gint strmId);
- virtual gint StopStream(TMSCallType callType, TMSStreamType strmType,
- gint strmId);
- virtual gint DeinitStream(TMSCallType callType, TMSStreamType strmType,
- gint strmId);
- virtual gint DeleteStream(TMSCallType callType, TMSStreamType strmType,
- gint strmId);
- virtual gint DataXferBufferEmptied(TMSCallType callType,
- TMSStreamType strmType, gint strmId);
- virtual gint DataXferBufferFilled(TMSCallType callType,
- TMSStreamType strmType, gint strmId, guint datasize);
+ virtual gint CreateStream(const TMSCallType callType,
+ const TMSStreamType strmType, gint& outStrmId);
+ virtual gint InitStream(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId,
+ const TMSFormatType frmtType, const gint retryTime,
+ const RMessage2& message);
+ virtual gint StartStream(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId,
+ const gint retrytime);
+ virtual gint PauseStream(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId);
+ virtual gint StopStream(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId);
+ virtual gint DeinitStream(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId);
+ virtual gint DeleteStream(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId);
+ virtual gint DataXferBufferEmptied(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId);
+ virtual gint DataXferBufferFilled(const TMSCallType callType,
+ const TMSStreamType strmType, const gint strmId,
+ const guint datasize);
virtual gint GetDataXferBufferHndl(const TMSCallType callType,
const TMSStreamType strmType, const gint strmId,
const guint32 key, RChunk& chunk);
@@ -96,16 +103,16 @@
virtual gint GetPlc(const TMSFormatType fmttype, gboolean& plc);
virtual gint SetPlc(const TMSFormatType fmttype, const gboolean plc);
- // From TMS audio output
- virtual gint SetOutput(TMSAudioOutput output);
+ // From TMS audio routing
+ virtual gint SetOutput(const TMSAudioOutput output);
virtual gint GetOutput(TMSAudioOutput& output);
virtual gint GetPreviousOutput(TMSAudioOutput& output);
- virtual gint GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuffer);
+ virtual gint GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuf);
- // From TMSDTMF
- virtual gint StartDTMF(TMSStreamType streamtype, TDes& dtmfstring);
- virtual gint StopDTMF(TMSStreamType streamtype);
- virtual gint ContinueDTMF(gboolean continuesending);
+ // From TMSDTMF
+ virtual gint StartDTMF(const TMSStreamType streamtype, TDes& dtmfstr);
+ virtual gint StopDTMF(const TMSStreamType streamtype);
+ virtual gint ContinueDTMF(const gboolean sending);
// From TMS codec formats
gint SetIlbcCodecMode(const gint mode, const TMSStreamType strmtype);
@@ -118,8 +125,6 @@
gint ConcealErrorForNextBuffer();
gint BadLsfNextBuffer();
- gint OpenDownlinkL(const RMessage2& message);
- gint OpenUplinkL(const RMessage2& message);
void SetFormat(const gint strmId, const guint32 aFormat);
void BufferFilledL(guint dataSize);
@@ -127,34 +132,45 @@
gint GetDataXferChunkHndl(const TMSStreamType strmType,
const guint32 key, RChunk& chunk);
- //From DTMFTonePlayerObserver
- void DTMFInitCompleted(gint error);
- void DTMFToneFinished(gint error);
+ //From TMSIPDevSoundObserver
+ void DownlinkInitCompleted(gint status);
+ void UplinkInitCompleted(gint status);
+ void DownlinkStarted(gint status);
+ void UplinkStarted(gint status);
+
+ //From TMSDTMFTonePlayerObserver
+ void DTMFInitCompleted(gint status);
+ void DTMFToneFinished(gint status);
private:
+ TMSCallIPAdpt();
void ConstructL();
- TMSCallIPAdpt();
+
+ gint OpenDownlink(const RMessage2& message, const gint retrytime);
+ gint OpenUplink(const RMessage2& message, const gint retrytime);
gint InitDTMF(TMSStreamType strmtype);
- void NotifyClient(const gint strmId, const gint aCommand,
- const gint aStatus = KErrNone, const gint64 aInt64 = gint64(0));
void GetSupportedBitRatesL(CBufFlat*& brbuffer);
+ void NotifyClient(const gint strmId, const gint command,
+ const gint status = KErrNone, const gint64 int64 = TInt64(0));
private:
gint iNextStreamId;
+ TMSIPUplink* iIPUplink;
+ TMSIPDownlink* iIPDownlink;
+ TMSAudioDtmfTonePlayer* iDTMFDnlinkPlayer;
+ TMSDtmfNotifier* iDTMFNotifier;
+ TMSAudioDtmfTonePlayer* iDTMFUplinkPlayer;
+ // Message queues for communication and data transfer back to the client
+ RMsgQueue<TmsMsgBuf> iMsgQueueUp;
+ RMsgQueue<TmsMsgBuf> iMsgQueueDn;
+ TmsMsgBuf iMsgBuffer;
+
gboolean iUplinkInitialized;
gint iUplinkStreamId;
gboolean iDnlinkInitialized;
gint iDnlinkStreamId;
- TMSIPDownlink* iIPDownlink;
- TMSIPUplink* iIPUplink;
-
- // Message queues for communication and data transfer back to the client
- RMsgQueue<TmsMsgBuf> iMsgQueueUp;
- RMsgQueue<TmsMsgBuf> iMsgQueueDn;
-
- TmsMsgBuf iMsgBuffer;
TMMFPrioritySettings iPriority;
guint32 iUpFourCC;
guint32 iDnFourCC;
@@ -163,14 +179,10 @@
RArray<guint> iArrBitrates;
RArray<TFourCC> iCodecs;
gint iCodecsCount;
-
- TMSAudioDtmfTonePlayer* iDTMFDnlinkPlayer;
- TMSAudioDtmfTonePlayer* iDTMFUplinkPlayer;
- TMSDtmfNotifier* iDTMFNotifier;
};
} //namespace TMS
-#endif //__CALLIPADAPT_H
+#endif //CALLIPADPT_H
// End of file
--- a/mmserv/tms/tmscallserver/inc/tmscsdevsound.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallserver/inc/tmscsdevsound.h Wed Jun 23 18:47:10 2010 +0300
@@ -19,58 +19,50 @@
#define TMSCSDEVSOUND_H
#include <sounddevice.h>
+#include "tmstimer.h"
namespace TMS {
-class TMSCSPDevSoundObserver;
+// FORWARD DECLARATIONS
+class TMSTimer;
+class TMSCSDevSoundObserver;
/**
* Wrapper for CMMFDevSound
*
*/
-NONSHARABLE_CLASS(TMSCSPDevSound) : public CBase,
- public MDevSoundObserver
+NONSHARABLE_CLASS(TMSCSDevSound) : public CBase,
+ public MDevSoundObserver,
+ public TMSTimerObserver
{
public:
/**
* Destructor.
*/
- virtual ~TMSCSPDevSound();
-
- /**
- * Activates the dev sound stream. TMSCSPDevSoundObserver methods are called
- * when activation goes ok or fails. If the stream is already active or
- * activating then nothing is done.
- */
- virtual void Activate();
-
- /**
- * Deactivates the devsound stream. If stream is not active or
- * activation is not ongoing then nothing is done.
- */
- virtual void Deactivate();
+ virtual ~TMSCSDevSound();
/**
- * Indicates that activation is ongoing,
- * but the result of the activation is still unknown.
- * @return ETrue - activation ongoing, EFalse - activation not ongoing.
+ * Activates the DevSound stream.
+ * Stream activation status is indicated by TMSCSDevSoundObserver callback
+ * methods. If the stream is already active or being activated, call to
+ * this will result in no action.
*/
- TBool IsActivationOngoing() const;
+ virtual void Activate(const gint retrytime);
/**
- * Determines wether the devsound stream is active or not.
- * @return ETrue - Stream is active, EFalse - Stream not active.
+ * Deactivates an active DevSound stream.
*/
- TBool IsActive() const;
+ virtual void Deactivate(gboolean reset = TRUE);
+ /*
+ * Returns DevSound instance associated with the stream.
+ */
CMMFDevSound& DevSound();
- // from base class MDevSoundObserver
-
/**
* From MDevSoundObserver
- * Empty implementation
+ * Indicates DevSound initialization status.
*/
void InitializeComplete(TInt aError);
@@ -78,50 +70,58 @@
* From MDevSoundObserver
* Empty implementation
*/
- void BufferToBeFilled(CMMFBuffer* aBuffer);
+ void BufferToBeFilled(CMMFBuffer* /*aBuffer*/) {}
/**
* From MDevSoundObserver
* Empty implementation
*/
- void PlayError(TInt aError);
+ void PlayError(TInt /*aError*/) {}
/**
* From MDevSoundObserver
* Empty implementation
*/
- void ToneFinished(TInt aError);
+ void ToneFinished(TInt /*aError*/) {}
+
+ /**
+ * From MDevSoundObserver
+ * Empty implementation
+ */
+ void BufferToBeEmptied(CMMFBuffer* /*aBuffer*/) {}
/**
* From MDevSoundObserver
* Empty implementation
*/
- void BufferToBeEmptied(CMMFBuffer* aBuffer);
+ void RecordError(TInt /*aError*/) {}
/**
* From MDevSoundObserver
* Empty implementation
*/
- void RecordError(TInt aError);
+ void ConvertError(TInt /*aError*/) {}
/**
* From MDevSoundObserver
* Empty implementation
*/
- void ConvertError(TInt aError);
+ void DeviceMessage(TUid /*aMessageType*/, const TDesC8& /*aMsg*/) {}
- /**
- * From MDevSoundObserver
- * Empty implementation
+ /*
+ * From TMSTimerObserver.
+ * Called upon timer timeout event.
*/
- void DeviceMessage(TUid aMessageType, const TDesC8& aMsg);
+ void TimerEvent();
protected:
- TMSCSPDevSound(TMSCSPDevSoundObserver& aObserver);
-
- void ConstructL(TMMFState aMode, gint aAudioPreference,
- gint aAudioPriority);
+ TMSCSDevSound(TMSCSDevSoundObserver& observer);
+ void ConstructL(const TMSStreamType strmtype, const gint retrytime);
+ void InitializeL();
+ void NotifyEvent(gint error);
+ void StartTimer();
+ void CancelTimer();
private:
@@ -132,31 +132,40 @@
protected:
- TUint iStreamType;
-
/**
- * Indication if device is activated. Derived class has to update this.
+ * Indication of DevSound activated state. TRUE == stream activated.
+ * Derived class has to update this.
*/
- TBool iActive;
+ gboolean iActive;
/**
- * Indication if activation is ongoing.
+ * Indication of an ongoing DevSound activation.
* Derived class has to update this.
*/
- TBool iActivationOngoing;
+ gboolean iActivationOngoing;
/**
- * Devsound instance
- * Own.
+ * Devsound instance associated with the stream.
*/
CMMFDevSound* iDevSound;
/**
- * Observer for successfull activation.
- * Not own.
+ * An observer subscribing to TMSCSDevSound notifications.
*/
- TMSCSPDevSoundObserver& iObserver;
+ TMSCSDevSoundObserver& iObserver;
+
+ TMSStreamType iStreamType;
+ gint iPreference;
+ gint iPriority;
+ TMMFState iMode;
+ /*
+ * For retry timer
+ */
+ gint iInitRetryTime;
+ gint iStartRetryTime;
+ TMSTimer* iTimer;
+ gint iTimeout;
};
} //namespace TMS
--- a/mmserv/tms/tmscallserver/inc/tmscsdevsoundobserver.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallserver/inc/tmscsdevsoundobserver.h Wed Jun 23 18:47:10 2010 +0300
@@ -21,39 +21,16 @@
namespace TMS {
/**
- * Observer interface for knowing when audio streams have been
- * successfully ramped up.
- *
+ * TMSCSDevSoundObserver
+ * An observer interface providing TMSCSDevSound event notifications.
*/
-class TMSCSPDevSoundObserver
+class TMSCSDevSoundObserver
{
public:
- virtual void DownlinkInitCompleted(TInt status) = 0;
- virtual void UplinkInitCompleted(TInt status) = 0;
-
- /**
- * Notification that Mic has been activated successfully
- *
- */
- virtual void UplinkActivatedSuccessfully() = 0;
-
- /**
- * Notification that speaker has been activated successfully
- *
- */
- virtual void DownlinkActivatedSuccessfully() = 0;
-
- /**
- * Notification that Mic initialisation failed.
- *
- */
- virtual void UplinkActivationFailed() = 0;
-
- /**
- * Notification that Speaker activation failed.
- *
- */
- virtual void DownlinkActivationFailed() = 0;
+ virtual void DownlinkInitCompleted(gint status) = 0;
+ virtual void UplinkInitCompleted(gint status) = 0;
+ virtual void UplinkActivationCompleted(gint status) = 0;
+ virtual void DownlinkActivationCompleted(gint status) = 0;
};
} //namespace TMS
--- a/mmserv/tms/tmscallserver/inc/tmscsdownlink.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallserver/inc/tmscsdownlink.h Wed Jun 23 18:47:10 2010 +0300
@@ -23,26 +23,24 @@
namespace TMS {
-//
-class TMSCSPDevSoundObserver;
-
/**
- * Provides Downlink functionality.
+ * Provides Downlink stream functionality.
*
*/
-NONSHARABLE_CLASS(TMSCSDownlink) : public TMSCSPDevSound
+NONSHARABLE_CLASS(TMSCSDownlink) : public TMSCSDevSound
{
public:
- static TMSCSDownlink* NewL(TMSCSPDevSoundObserver& aObserver);
+ static TMSCSDownlink* NewL(TMSCSDevSoundObserver& observer,
+ const gint retrytime);
virtual ~TMSCSDownlink();
/**
* Sets volume.
- * @param aVolume Volume.
+ * @param volume Volume.
*/
- void SetVolume(gint aVolume);
+ void SetVolume(gint volume);
/**
* Gets volume.
@@ -60,31 +58,29 @@
/**
* From MDevSoundObserver.
- * Indication from devsound that stream (Downlink) has been activated
+ * Indication from the devsound that Downlink has been activated
* successfully.
*/
void BufferToBeFilled(CMMFBuffer* /*aBuffer*/);
/**
* From MDevSoundObserver.
- * Indication from devsound that activation of stream( Downlink)
- * failed.
+ * Indication from devsound that Downlink activation has failed.
*/
void PlayError(TInt aErrorCode);
private:
/**
- * From CSPDevSound.
+ * From TMSCSDevSound.
* Tries to activate the mic stream.
*/
void DoActivateL();
protected:
- TMSCSDownlink(TMSCSPDevSoundObserver& aObserver);
-
- void ConstructL();
+ TMSCSDownlink(TMSCSDevSoundObserver& observer);
+ void ConstructL(const gint retrytime);
};
} //namespace TMS
--- a/mmserv/tms/tmscallserver/inc/tmscsuplink.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallserver/inc/tmscsuplink.h Wed Jun 23 18:47:10 2010 +0300
@@ -24,14 +24,15 @@
namespace TMS {
/**
- * Provides uplink functionality.
+ * Provides Uplink stream functionality.
*
*/
-NONSHARABLE_CLASS(TMSCSUplink) : public TMSCSPDevSound
+NONSHARABLE_CLASS(TMSCSUplink) : public TMSCSDevSound
{
public:
- static TMSCSUplink* NewL(TMSCSPDevSoundObserver& aObserver);
+ static TMSCSUplink* NewL(TMSCSDevSoundObserver& observer,
+ const gint retrytime);
virtual ~TMSCSUplink();
@@ -40,22 +41,12 @@
*
* @return ETrue - mic is muted, EFalse - mic is not muted.
*/
- TBool IsMuted();
-
- /**
- * Set mic muted.
- */
- void SetMuted();
-
- /**
- * Set mic unmuted.
- */
- void SetUnmuted();
+ gboolean IsMuted();
/**
* Set mic gain.
*/
- void SetGain(gint aGain);
+ void SetGain(gint gain);
/**
* Get mic muted.
@@ -70,33 +61,30 @@
// from base class MDevSoundObserver
/**
- * From MDevSoundObserver
- * Notification from Devsound that stream (mic) is
- * activated successfully.
+ * From MDevSoundObserver.
+ * Indication from the devsound that Uplink has been activated
+ * successfully.
*/
void BufferToBeEmptied(CMMFBuffer* aBuffer);
/**
* From MDevSoundObserver
- * Notification from devsound that downstream(mic) activation
- * feiled.
+ * Indication from devsound that Uplink activation has failed.
*/
void RecordError(TInt aError);
private:
- // from base class MCSPDevSound
-
/**
- * From MCSPDevSound.
+ * From TMSCSDevSound.
* Tries to activate the mic stream.
*/
void DoActivateL();
protected:
- TMSCSUplink(TMSCSPDevSoundObserver& aObserver);
- void ConstructL();
+ TMSCSUplink(TMSCSDevSoundObserver& aObserver);
+ void ConstructL(const gint retrytime);
};
} //namespace TMS
--- a/mmserv/tms/tmscallserver/inc/tmsdtmfobserver.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallserver/inc/tmsdtmfobserver.h Wed Jun 23 18:47:10 2010 +0300
@@ -63,13 +63,13 @@
/**
* HandleDTMFEvents.
- * @param aEvent Event type
- * @param aError Error code
- * @param aTone Character
+ * @param event Event type
+ * @param status Error code
+ * @param tone Character
* @return none
*/
- virtual void HandleDTMFEvent(const TMSDTMFObserver::TCCPDtmfEvent aEvent,
- const TInt aError, const TChar aTone) /*const*/ = 0;
+ virtual void HandleDTMFEvent(const TMSDTMFObserver::TCCPDtmfEvent event,
+ const gint status, const TChar tone) /*const*/ = 0;
};
} //namespace TMS
--- a/mmserv/tms/tmscallserver/inc/tmsdtmftoneplayerobserver.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallserver/inc/tmsdtmftoneplayerobserver.h Wed Jun 23 18:47:10 2010 +0300
@@ -18,6 +18,8 @@
#ifndef DTMFTONEPLAYEROBSERVER_H
#define DTMFTONEPLAYEROBSERVER_H
+#include <glib.h>
+
namespace TMS {
/**
@@ -26,8 +28,8 @@
class TMSDTMFTonePlayerObserver
{
public:
- virtual void DTMFInitCompleted(TInt error) = 0;
- virtual void DTMFToneFinished(TInt error) = 0;
+ virtual void DTMFInitCompleted(gint status) = 0;
+ virtual void DTMFToneFinished(gint status) = 0;
};
} //namespace TMS
--- a/mmserv/tms/tmscallserver/inc/tmsipcallstream.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallserver/inc/tmsipcallstream.h Wed Jun 23 18:47:10 2010 +0300
@@ -56,6 +56,19 @@
namespace TMS {
+/**
+ * TMSIPDevSoundObserver
+ * An observer interface providing TMSIPCallStreamBase event notifications.
+ */
+class TMSIPDevSoundObserver
+ {
+public:
+ virtual void DownlinkInitCompleted(gint status) = 0;
+ virtual void UplinkInitCompleted(gint status) = 0;
+ virtual void UplinkStarted(gint status) = 0;
+ virtual void DownlinkStarted(gint status) = 0;
+ };
+
// -----------------------------------------------------------------------------
// Class Name: TMSIPCallStreamBase
//
@@ -78,7 +91,7 @@
public:
virtual ~TMSIPCallStreamBase();
- virtual void Start() = 0;
+ virtual void Start(const gint retrytime) = 0;
virtual void Stop() = 0;
virtual gint SetCodecCi() = 0;
@@ -91,6 +104,8 @@
gint ConfigureMedia(const guint32 aCodecID);
protected:
+ TMSIPCallStreamBase(TMSIPDevSoundObserver& observer);
+
#ifndef __USE_GSTREAMER__
// From MDevSoundObserver
virtual void InitializeComplete(TInt aError) = 0;
@@ -105,7 +120,7 @@
#endif //__USE_GSTREAMER__
protected:
-
+ TMSIPDevSoundObserver& iObserver;
CActiveScheduler* iActiveScheduler;
TStreamState iStatus;
@@ -145,14 +160,13 @@
static void cb_raw_playback_handoff(GstElement* appsrc, guint size);
static gboolean bus_call(GstBus* bus, GstMessage* msg, gpointer data);
#endif //__USE_GSTREAMER__
- static TMSIPDownlink* NewL(const guint32 codecID,
- const TMMFPrioritySettings priority);
- TMSIPDownlink();
- void ConstructL(const guint32 codecID,
- const TMMFPrioritySettings priority);
+
+ static TMSIPDownlink* NewL(TMSIPDevSoundObserver& observer,
+ const guint32 codecID, const TMMFPrioritySettings priority,
+ const gint retrytime);
gint SetCodecCi();
- void Start();
+ void Start(const gint retrytime);
void Stop();
void BufferFilled(const guint buflen);
gint SetVolume(const guint volume);
@@ -178,6 +192,11 @@
void SetAudioDeviceL(TMSAudioOutput output);
void GetAudioDeviceL(TMSAudioOutput& output);
+protected:
+ TMSIPDownlink(TMSIPDevSoundObserver& observer);
+ void ConstructL(const guint32 codecID,
+ const TMMFPrioritySettings priority, const gint retrytime);
+
private:
void SetCodecCiL();
@@ -214,9 +233,6 @@
GstElement* iSink;
GstBus* iBusPlay;
#endif //__USE_GSTREAMER__
-#ifdef _DEBUG
- gint iSamplesPlayedCount;
-#endif
#ifdef __PLAY_WAV_FROM_FILE__
RFile iFile;
@@ -242,14 +258,13 @@
static void cb_record_raw_handoff(GstElement *sink);
static gboolean bus_call(GstBus* bus, GstMessage* msg, gpointer data);
#endif //__USE_GSTREAMER__
- static TMSIPUplink* NewL(const guint32 codecID,
- const TMMFPrioritySettings priority);
- TMSIPUplink();
- void ConstructL(const guint32 codecID,
- const TMMFPrioritySettings priority);
+
+ static TMSIPUplink* NewL(TMSIPDevSoundObserver& observer,
+ const guint32 codecID, const TMMFPrioritySettings priority,
+ const gint retrytime);
gint SetCodecCi();
- void Start();
+ void Start(const gint retrytime);
void Stop();
void BufferEmptied();
gint SetGain(const guint gain);
@@ -268,6 +283,11 @@
gint SetVad(const TMSFormatType fmttype, const gboolean vad);
gint GetVad(const TMSFormatType fmttype, gboolean& vad);
+protected:
+ TMSIPUplink(TMSIPDevSoundObserver& observer);
+ void ConstructL(const guint32 codecID,
+ const TMMFPrioritySettings priority, const gint retrytime);
+
private:
void SetCodecCiL();
@@ -300,9 +320,6 @@
GstElement* iAppSink;
GstBus* iBusRec;
#endif //__USE_GSTREAMER__
-#ifdef _DEBUG
- gint iSamplesRecCount;
-#endif
};
} //namespace TMS
--- a/mmserv/tms/tmscallserver/src/tmscalladpt.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/tmscalladpt.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -73,7 +73,7 @@
case TMS_CALL_CS:
retVal = TMS_RESULT_INSUFFICIENT_MEMORY;
- self = new TMSCallCSAdpt();
+ self = TMSCallCSAdpt::NewL();
if (self)
{
retVal = self->PostConstruct();
@@ -93,14 +93,4 @@
return retVal;
}
-// -----------------------------------------------------------------------------
-// TMSCallAdpt::PostConstruct
-//
-// -----------------------------------------------------------------------------
-//
-gint TMSCallAdpt::PostConstruct()
- {
- return TMS_RESULT_SUCCESS;
- }
-
// End of file
--- a/mmserv/tms/tmscallserver/src/tmscallcsadpt.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/tmscallcsadpt.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -33,14 +33,27 @@
using namespace TMS;
// -----------------------------------------------------------------------------
-// TMSCallCSAdpt::TMSCallCSAdpt
-//
+// TMSCallCSAdpt::NewL
+// Symbian constructor.
// -----------------------------------------------------------------------------
//
-TMSCallCSAdpt::TMSCallCSAdpt()
+TMSCallCSAdpt* TMSCallCSAdpt::NewL()
+ {
+ TMSCallCSAdpt* self = new (ELeave) TMSCallCSAdpt();
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ CleanupStack::Pop(self);
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
+// TMSCallCSAdpt::ConstructL
+// 2-nd phase constructor.
+// -----------------------------------------------------------------------------
+//
+void TMSCallCSAdpt::ConstructL()
{
TRACE_PRN_FN_ENT;
-
iCSDownlink = NULL;
iCSUplink = NULL;
iRouting = NULL;
@@ -48,8 +61,16 @@
iDTMFDnlinkPlayer = NULL;
iDTMFUplinkPlayer = NULL;
iDTMFNotifier = NULL;
+ TRACE_PRN_FN_EXT;
+ }
- TRACE_PRN_FN_EXT;
+// -----------------------------------------------------------------------------
+// TMSCallCSAdpt::TMSCallCSAdpt
+//
+// -----------------------------------------------------------------------------
+//
+TMSCallCSAdpt::TMSCallCSAdpt()
+ {
}
// -----------------------------------------------------------------------------
@@ -60,19 +81,19 @@
TMSCallCSAdpt::~TMSCallCSAdpt()
{
TRACE_PRN_FN_ENT;
- delete iCSDownlink;
- delete iCSUplink;
+
delete iRouting;
delete iTarSettings;
+ delete iDTMFUplinkPlayer;
delete iDTMFDnlinkPlayer;
- delete iDTMFUplinkPlayer;
delete iDTMFNotifier;
+ delete iCSUplink;
+ delete iCSDownlink;
if (iMsgQueueUp.Handle() > 0)
{
iMsgQueueUp.Close();
}
-
if (iMsgQueueDn.Handle() > 0)
{
iMsgQueueDn.Close();
@@ -93,7 +114,6 @@
iNextStreamId = 1;
iUplinkInitialized = FALSE;
iDnlinkInitialized = FALSE;
-
TRACE_PRN_FN_EXT;
return status;
}
@@ -103,40 +123,44 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallCSAdpt::CreateStream(TMSCallType /*callType*/,
- TMSStreamType strmType, gint& outStrmId)
+gint TMSCallCSAdpt::CreateStream(const TMSCallType /*callType*/,
+ const TMSStreamType strmType, gint& outStrmId)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_SUCCESS);
switch (strmType)
{
case TMS_STREAM_UPLINK:
+ {
status = TMS_RESULT_ALREADY_EXIST;
if (!iUplinkInitialized)
{
- iUplinkInitialized = TRUE;
iUplinkStreamId = iNextStreamId;
outStrmId = iUplinkStreamId;
iNextStreamId++;
- iUplinkInitialized = TRUE;
+ //iUplinkInitialized = TRUE; //not initialized yet!
status = TMS_RESULT_SUCCESS;
}
break;
+ }
case TMS_STREAM_DOWNLINK:
+ {
status = TMS_RESULT_ALREADY_EXIST;
if (!iDnlinkInitialized)
{
- iDnlinkInitialized = TRUE;
iDnlinkStreamId = iNextStreamId;
outStrmId = iDnlinkStreamId;
iNextStreamId++;
- iDnlinkInitialized = TRUE;
+ //iDnlinkInitialized = TRUE; //not initialized yet!
status = TMS_RESULT_SUCCESS;
}
break;
+ }
default:
+ {
status = TMS_RESULT_STREAM_TYPE_NOT_SUPPORTED;
break;
+ }
}
TRACE_PRN_FN_EXT;
return status;
@@ -147,8 +171,10 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallCSAdpt::InitStream(TMSCallType /*callType*/, TMSStreamType strmType,
- gint strmId, TMSFormatType /*frmtType*/, const RMessage2& message)
+gint TMSCallCSAdpt::InitStream(const TMSCallType /*callType*/,
+ const TMSStreamType strmType, const gint strmId,
+ const TMSFormatType /*frmtType*/, const gint retrytime,
+ const RMessage2& message)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_SUCCESS);
@@ -157,6 +183,7 @@
{
case TMS_STREAM_UPLINK:
{
+ status = TMS_RESULT_DOES_NOT_EXIST;
if (strmId == iUplinkStreamId)
{
// Open message queue handling client-server communication
@@ -167,30 +194,14 @@
}
if (status == TMS_RESULT_SUCCESS)
{
- TRAP(status, iCSUplink = TMSCSUplink::NewL(*this));
-
- if (status == TMS_RESULT_SUCCESS)
- {
- TRAP(status, iDTMFUplinkPlayer =
- TMSDTMFProvider::NewL());
- iDTMFUplinkPlayer->AddObserver(*this);
- if (!iDTMFNotifier)
- {
- TRAP(status, iDTMFNotifier =
- TMSDtmfNotifier::NewL());
- }
- }
+ status = InitUplink(retrytime);
}
- iStrmtype = TMS_STREAM_UPLINK;
- }
- else
- {
- status = TMS_RESULT_DOES_NOT_EXIST;
}
break;
}
case TMS_STREAM_DOWNLINK:
{
+ status = TMS_RESULT_DOES_NOT_EXIST;
if (strmId == iDnlinkStreamId)
{
// Open message queue handling client-server communication
@@ -201,35 +212,8 @@
}
if (status == TMS_RESULT_SUCCESS)
{
- TRAP(status, iCSDownlink = TMSCSDownlink::NewL(*this));
- if (status == TMS_RESULT_SUCCESS)
- {
- TRAP(status, iRouting =
- CTelephonyAudioRouting::NewL(*this));
- if (status == TMS_RESULT_SUCCESS)
- {
- TRAP(status, iTarSettings = TMSTarSettings::NewL());
- }
- if (status == TMS_RESULT_SUCCESS)
- {
- TRAP(status, iDTMFDnlinkPlayer =
- TMSAudioDtmfTonePlayer::NewL(*this,
- KAudioDTMFString,
- KAudioPriorityDTMFString));
-
- if (!iDTMFNotifier)
- {
- TRAP(status, iDTMFNotifier =
- TMSDtmfNotifier::NewL());
- }
- }
- }
+ status = InitDownlink(retrytime);
}
- iStrmtype = TMS_STREAM_DOWNLINK;
- }
- else
- {
- status = TMS_RESULT_DOES_NOT_EXIST;
}
break;
}
@@ -246,32 +230,98 @@
}
// -----------------------------------------------------------------------------
+// TMSCallCSAdpt::InitUplink
+//
+// -----------------------------------------------------------------------------
+//
+gint TMSCallCSAdpt::InitUplink(const gint retrytime)
+ {
+ gint status(TMS_RESULT_SUCCESS);
+
+ if (!iCSUplink)
+ {
+ TRAP(status, iCSUplink = TMSCSUplink::NewL(*this, retrytime));
+ }
+ if (!iDTMFUplinkPlayer && status == TMS_RESULT_SUCCESS)
+ {
+ TRAP(status, iDTMFUplinkPlayer = TMSDTMFProvider::NewL());
+ iDTMFUplinkPlayer->AddObserver(*this);
+ }
+ if (!iDTMFNotifier && status == TMS_RESULT_SUCCESS)
+ {
+ TRAP(status, iDTMFNotifier = TMSDtmfNotifier::NewL());
+ }
+ return status;
+ }
+
+// -----------------------------------------------------------------------------
+// TMSCallCSAdpt::InitDownlink
+//
+// -----------------------------------------------------------------------------
+//
+gint TMSCallCSAdpt::InitDownlink(const gint retrytime)
+ {
+ gint status(TMS_RESULT_SUCCESS);
+
+ if (!iCSDownlink)
+ {
+ TRAP(status, iCSDownlink = TMSCSDownlink::NewL(*this, retrytime));
+ }
+ if (!iRouting && status == TMS_RESULT_SUCCESS)
+ {
+ TRAP(status, iRouting = CTelephonyAudioRouting::NewL(*this));
+ }
+ if (!iTarSettings && status == TMS_RESULT_SUCCESS)
+ {
+ TRAP(status, iTarSettings = TMSTarSettings::NewL());
+ }
+ if (!iDTMFDnlinkPlayer && status == TMS_RESULT_SUCCESS)
+ {
+ TRAP(status, iDTMFDnlinkPlayer = TMSAudioDtmfTonePlayer::NewL(*this,
+ KAudioDTMFString, KAudioPriorityDTMFString));
+ }
+ if (!iDTMFNotifier && status == TMS_RESULT_SUCCESS)
+ {
+ TRAP(status, iDTMFNotifier = TMSDtmfNotifier::NewL());
+ }
+ return status;
+ }
+
+// -----------------------------------------------------------------------------
// TMSCallCSAdpt::StartStream
//
// -----------------------------------------------------------------------------
//
-gint TMSCallCSAdpt::StartStream(TMSCallType /*callType*/,
- TMSStreamType strmType, gint strmId)
+gint TMSCallCSAdpt::StartStream(const TMSCallType /*callType*/,
+ const TMSStreamType strmType, const gint strmId, const gint retrytime)
{
TRACE_PRN_FN_ENT;
- gint status(TMS_RESULT_SUCCESS);
+ gint status(TMS_RESULT_INVALID_STATE);
switch (strmType)
{
case TMS_STREAM_UPLINK:
+ {
if (iCSUplink && strmId == iUplinkStreamId)
{
- iCSUplink->Activate();
+ iCSUplink->Activate(retrytime);
+ status = TMS_RESULT_SUCCESS;
}
break;
+ }
case TMS_STREAM_DOWNLINK:
+ {
if (iCSDownlink && strmId == iDnlinkStreamId)
{
- iCSDownlink->Activate();
+ iCSDownlink->Activate(retrytime);
+ status = TMS_RESULT_SUCCESS;
}
break;
+ }
default:
+ {
status = TMS_RESULT_STREAM_TYPE_NOT_SUPPORTED;
break;
+ }
}
TRACE_PRN_FN_EXT;
return status;
@@ -282,11 +332,11 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallCSAdpt::PauseStream(TMSCallType /*callType*/,
- TMSStreamType /*strmType*/, gint /*strmId*/)
+gint TMSCallCSAdpt::PauseStream(const TMSCallType /*callType*/,
+ const TMSStreamType /*strmType*/, const gint /*strmId*/)
{
TRACE_PRN_FN_ENT;
- gint status(TMS_RESULT_SUCCESS);
+ gint status(TMS_RESULT_FEATURE_NOT_SUPPORTED);
TRACE_PRN_FN_EXT;
return status;
}
@@ -296,32 +346,39 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallCSAdpt::StopStream(TMSCallType /*callType*/, TMSStreamType strmType,
- gint strmId)
+gint TMSCallCSAdpt::StopStream(const TMSCallType /*callType*/,
+ const TMSStreamType strmType, const gint strmId)
{
TRACE_PRN_FN_ENT;
- gint status(TMS_RESULT_SUCCESS);
+ gint status(TMS_RESULT_INVALID_STATE);
+
switch (strmType)
{
case TMS_STREAM_UPLINK:
+ {
if (iCSUplink && strmId == iUplinkStreamId)
{
iCSUplink->Deactivate();
- NotifyClient(iUplinkStreamId, ECmdUplinkInitComplete,
- status, 0);
+ status = TMS_RESULT_SUCCESS;
+ NotifyClient(iUplinkStreamId, ECmdUplinkInitComplete, status);
}
break;
+ }
case TMS_STREAM_DOWNLINK:
+ {
if (iCSDownlink && strmId == iDnlinkStreamId)
{
iCSDownlink->Deactivate();
- NotifyClient(iDnlinkStreamId, ECmdDownlinkInitComplete,
- status, 0);
+ status = TMS_RESULT_SUCCESS;
+ NotifyClient(iDnlinkStreamId, ECmdDownlinkInitComplete, status);
}
break;
+ }
default:
+ {
status = TMS_RESULT_STREAM_TYPE_NOT_SUPPORTED;
break;
+ }
}
TRACE_PRN_FN_EXT;
return status;
@@ -332,20 +389,22 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallCSAdpt::DeinitStream(TMSCallType /*callType*/,
- TMSStreamType strmType, gint strmId)
+gint TMSCallCSAdpt::DeinitStream(const TMSCallType /*callType*/,
+ const TMSStreamType strmType, const gint strmId)
{
TRACE_PRN_FN_ENT;
- gint status(TMS_RESULT_SUCCESS);
+ gint status(TMS_RESULT_INVALID_STATE);
+
switch (strmType)
{
case TMS_STREAM_UPLINK:
+ {
if (iCSUplink && strmId == iUplinkStreamId)
{
iCSUplink->Deactivate();
iUplinkInitialized = FALSE;
- NotifyClient(iUplinkStreamId, ECmdUplinkDeInitComplete,
- status, 0);
+ status = TMS_RESULT_SUCCESS;
+ NotifyClient(iUplinkStreamId, ECmdUplinkDeInitComplete, status);
}
break;
case TMS_STREAM_DOWNLINK:
@@ -353,13 +412,17 @@
{
iCSDownlink->Deactivate();
iDnlinkInitialized = FALSE;
+ status = TMS_RESULT_SUCCESS;
NotifyClient(iDnlinkStreamId, ECmdDownlinkDeInitComplete,
- status, 0);
+ status);
}
break;
+ }
default:
+ {
status = TMS_RESULT_STREAM_TYPE_NOT_SUPPORTED;
break;
+ }
}
TRACE_PRN_FN_EXT;
return status;
@@ -370,30 +433,36 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallCSAdpt::DeleteStream(TMSCallType /*callType*/,
- TMSStreamType strmType, gint strmId)
+gint TMSCallCSAdpt::DeleteStream(const TMSCallType /*callType*/,
+ const TMSStreamType strmType, const gint strmId)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_SUCCESS);
switch (strmType)
{
case TMS_STREAM_UPLINK:
+ {
if (strmId == iUplinkStreamId)
{
iUplinkStreamId = -1;
iUplinkInitialized = FALSE;
}
break;
+ }
case TMS_STREAM_DOWNLINK:
+ {
if (strmId == iDnlinkStreamId)
{
iDnlinkStreamId = -1;
iDnlinkInitialized = FALSE;
}
break;
+ }
default:
+ {
status = TMS_RESULT_STREAM_TYPE_NOT_SUPPORTED;
break;
+ }
}
TRACE_PRN_FN_EXT;
return status;
@@ -404,8 +473,8 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallCSAdpt::DataXferBufferEmptied(TMSCallType /*callType*/,
- TMSStreamType /*strmType*/, gint /*strmId*/)
+gint TMSCallCSAdpt::DataXferBufferEmptied(const TMSCallType /*callType*/,
+ const TMSStreamType /*strmType*/, const gint /*strmId*/)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_FEATURE_NOT_SUPPORTED);
@@ -418,8 +487,9 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallCSAdpt::DataXferBufferFilled(TMSCallType /*callType*/,
- TMSStreamType /*strmType*/, gint /*strmId*/, guint /*datasize*/)
+gint TMSCallCSAdpt::DataXferBufferFilled(const TMSCallType /*callType*/,
+ const TMSStreamType /*strmType*/, const gint /*strmId*/,
+ const guint /*datasize*/)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_FEATURE_NOT_SUPPORTED);
@@ -450,11 +520,12 @@
gint TMSCallCSAdpt::GetMaxVolume(guint& volume)
{
TRACE_PRN_FN_ENT;
- gint status(TMS_RESULT_ILLEGAL_OPERATION);
+ gint status(TMS_RESULT_INVALID_STATE);
if (iCSDownlink && iDnlinkInitialized)
{
volume = iCSDownlink->MaxVolume();
status = TMS_RESULT_SUCCESS;
+ TRACE_PRN_N1(_L("TMS->TMSCallCSAdpt: GetMaxVolume [%d]"), volume);
}
TRACE_PRN_FN_EXT;
return status;
@@ -468,12 +539,12 @@
gint TMSCallCSAdpt::SetVolume(const guint volume)
{
TRACE_PRN_FN_ENT;
- gint status(TMS_RESULT_ILLEGAL_OPERATION);
+ gint status(TMS_RESULT_INVALID_STATE);
if (iCSDownlink && iDnlinkInitialized)
{
iCSDownlink->SetVolume(volume);
status = TMS_RESULT_SUCCESS;
- NotifyClient(iDnlinkStreamId, ECmdSetVolume, status, 0);
+ NotifyClient(iDnlinkStreamId, ECmdSetVolume, status);
}
TRACE_PRN_FN_EXT;
return status;
@@ -487,13 +558,12 @@
gint TMSCallCSAdpt::GetVolume(guint& volume)
{
TRACE_PRN_FN_ENT;
- gint status(TMS_RESULT_ILLEGAL_OPERATION);
+ gint status(TMS_RESULT_INVALID_STATE);
if (iCSDownlink && iDnlinkInitialized)
{
volume = iCSDownlink->Volume();
status = TMS_RESULT_SUCCESS;
}
-
TRACE_PRN_FN_EXT;
return status;
}
@@ -506,11 +576,12 @@
gint TMSCallCSAdpt::GetMaxGain(guint& gain)
{
TRACE_PRN_FN_ENT;
- gint status(TMS_RESULT_ILLEGAL_OPERATION);
+ gint status(TMS_RESULT_INVALID_STATE);
if (iCSUplink && iUplinkInitialized)
{
gain = iCSUplink->MaxGain();
status = TMS_RESULT_SUCCESS;
+ TRACE_PRN_N1(_L("TMS->TMSCallCSAdpt::GetMaxGain [%d]"), gain);
}
TRACE_PRN_FN_EXT;
return status;
@@ -524,12 +595,12 @@
gint TMSCallCSAdpt::SetGain(const guint gain)
{
TRACE_PRN_FN_ENT;
- gint status(TMS_RESULT_ILLEGAL_OPERATION);
- if (iUplinkInitialized)
+ gint status(TMS_RESULT_INVALID_STATE);
+ if (iCSUplink && iUplinkInitialized)
{
iCSUplink->SetGain(gain);
status = TMS_RESULT_SUCCESS;
- NotifyClient(iUplinkInitialized, ECmdSetGain, status, 0);
+ NotifyClient(iUplinkStreamId, ECmdSetGain, status);
}
TRACE_PRN_FN_EXT;
return status;
@@ -543,7 +614,7 @@
gint TMSCallCSAdpt::GetGain(guint& gain)
{
TRACE_PRN_FN_ENT;
- gint status(TMS_RESULT_ILLEGAL_OPERATION);
+ gint status(TMS_RESULT_INVALID_STATE);
if (iCSUplink && iUplinkInitialized)
{
gain = iCSUplink->Gain();
@@ -561,11 +632,12 @@
gint TMSCallCSAdpt::GetGlobalMaxVolume(guint& volume)
{
TRACE_PRN_FN_ENT;
- gint status(TMS_RESULT_ILLEGAL_OPERATION);
+ gint status(TMS_RESULT_INVALID_STATE);
if (iCSDownlink && iDnlinkInitialized)
{
volume = iCSDownlink->MaxVolume();
status = TMS_RESULT_SUCCESS;
+ TRACE_PRN_N1(_L("TMS->TMSCallCSAdpt::GetGlobalMaxVolume [%d]"), volume);
}
TRACE_PRN_FN_EXT;
return status;
@@ -579,8 +651,7 @@
gint TMSCallCSAdpt::SetGlobalVolume(const guint volume)
{
TRACE_PRN_FN_ENT;
- gint status(TMS_RESULT_SUCCESS);
-
+ gint status(TMS_RESULT_INVALID_STATE);
iGlobalVol = volume;
if (iCSDownlink && iDnlinkInitialized)
{
@@ -599,13 +670,12 @@
gint TMSCallCSAdpt::GetGlobalVolume(guint& volume)
{
TRACE_PRN_FN_ENT;
- gint status(TMS_RESULT_ILLEGAL_OPERATION);
+ gint status(TMS_RESULT_INVALID_STATE);
if (iCSDownlink && iDnlinkInitialized)
{
volume = iCSDownlink->Volume();
status = TMS_RESULT_SUCCESS;
}
-
TRACE_PRN_FN_EXT;
return status;
}
@@ -618,11 +688,12 @@
gint TMSCallCSAdpt::GetGlobalMaxGain(guint& gain)
{
TRACE_PRN_FN_ENT;
- gint status(TMS_RESULT_ILLEGAL_OPERATION);
+ gint status(TMS_RESULT_INVALID_STATE);
if (iCSUplink && iUplinkInitialized)
{
gain = iCSUplink->MaxGain();
status = TMS_RESULT_SUCCESS;
+ TRACE_PRN_N1(_L("TMS->TMSCallCSAdpt::GetGlobalMaxGain [%d]"), gain);
}
TRACE_PRN_FN_EXT;
return status;
@@ -636,8 +707,7 @@
gint TMSCallCSAdpt::SetGlobalGain(const guint gain)
{
TRACE_PRN_FN_ENT;
- gint status(TMS_RESULT_SUCCESS);
-
+ gint status(TMS_RESULT_INVALID_STATE);
iGlobalGain = gain;
if (iCSUplink && iUplinkInitialized)
{
@@ -656,7 +726,7 @@
gint TMSCallCSAdpt::GetGlobalGain(guint& gain)
{
TRACE_PRN_FN_ENT;
- gint status(TMS_RESULT_ILLEGAL_OPERATION);
+ gint status(TMS_RESULT_INVALID_STATE);
if (iCSUplink && iUplinkInitialized)
{
gain = iCSUplink->Gain();
@@ -668,7 +738,7 @@
// -----------------------------------------------------------------------------
// TMSCallCSAdpt::GetCodecMode
-//
+// No codec format in CS call
// -----------------------------------------------------------------------------
//
gint TMSCallCSAdpt::GetCodecMode(const TMSFormatType /*fmttype*/,
@@ -682,7 +752,7 @@
// -----------------------------------------------------------------------------
// TMSCallCSAdpt::SetCodecMode
-//
+// No codec format in CS call
// -----------------------------------------------------------------------------
//
gint TMSCallCSAdpt::SetCodecMode(const TMSFormatType /*fmttype*/,
@@ -696,7 +766,7 @@
// -----------------------------------------------------------------------------
// TMSCallCSAdpt::GetSupportedBitRatesCount
-//
+// No codec format in CS call
// -----------------------------------------------------------------------------
//
gint TMSCallCSAdpt::GetSupportedBitRatesCount(guint& /*count*/)
@@ -712,26 +782,15 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallCSAdpt::GetSupportedBitRates(CBufFlat*& brbuffer)
+gint TMSCallCSAdpt::GetSupportedBitRates(CBufFlat*& /*brbuffer*/)
{
TRACE_PRN_FN_ENT;
- TRAPD(status, GetSupportedBitRatesL(brbuffer));
+ gint status(TMS_RESULT_FEATURE_NOT_SUPPORTED);
TRACE_PRN_FN_EXT;
return status;
}
// -----------------------------------------------------------------------------
-// TMSCallCSAdpt::GetSupportedBitRatesL
-//
-// GetSupportedBitRates implementation which can leave.
-// -----------------------------------------------------------------------------
-//
-void TMSCallCSAdpt::GetSupportedBitRatesL(CBufFlat*& /*brbuffer*/)
- {
- User::Leave(TMS_RESULT_FEATURE_NOT_SUPPORTED);
- }
-
-// -----------------------------------------------------------------------------
// TMSCallCSAdpt::GetBitRate
//
// -----------------------------------------------------------------------------
@@ -775,7 +834,8 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallCSAdpt::SetVAD(const TMSFormatType /*fmttype*/, const gboolean /*vad*/)
+gint TMSCallCSAdpt::SetVAD(const TMSFormatType /*fmttype*/,
+ const gboolean /*vad*/)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_FEATURE_NOT_SUPPORTED);
@@ -842,7 +902,7 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallCSAdpt::SetOutput(TMSAudioOutput output)
+gint TMSCallCSAdpt::SetOutput(const TMSAudioOutput output)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
@@ -913,7 +973,7 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallCSAdpt::GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuffer)
+gint TMSCallCSAdpt::GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuf)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
@@ -922,11 +982,11 @@
if (iRouting)
{
RBufWriteStream stream;
- stream.Open(*outputsbuffer);
+ stream.Open(*outputsbuf);
CleanupClosePushL(stream);
- TArray<CTelephonyAudioRouting::TAudioOutput> availableOutputs =
- iRouting->AvailableOutputs();
+ TArray<CTelephonyAudioRouting::TAudioOutput>
+ availableOutputs = iRouting->AvailableOutputs();
guint numOfItems = availableOutputs.Count();
count = numOfItems;
@@ -949,26 +1009,23 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallCSAdpt::StartDTMF(TMSStreamType strmtype, TDes& dtmfstring)
+gint TMSCallCSAdpt::StartDTMF(const TMSStreamType strmtype, TDes& dtmfstring)
{
TRACE_PRN_FN_ENT;
- gint status(TMS_RESULT_SUCCESS);
-
+ gint status(TMS_RESULT_STREAM_TYPE_NOT_SUPPORTED);
TmsMsgBufPckg dtmfpckg;
+ dtmfpckg().iStatus = status;
+ dtmfpckg().iRequest = ECmdDTMFTonePlayFinished;
if (strmtype == TMS_STREAM_DOWNLINK && iDnlinkInitialized)
{
if (iDTMFDnlinkPlayer)
{
iDTMFDnlinkPlayer->PlayDtmfTone(dtmfstring);
+ status = TMS_RESULT_SUCCESS;
}
-
dtmfpckg().iStatus = TMS_RESULT_SUCCESS;
dtmfpckg().iRequest = ECmdDTMFToneDnlPlayStarted;
- if (iDTMFNotifier)
- {
- iDTMFNotifier->SetDtmf(dtmfpckg, TRUE);
- }
}
else if (strmtype == TMS_STREAM_UPLINK && iUplinkInitialized)
{
@@ -976,17 +1033,18 @@
if (iDTMFUplinkPlayer)
{
status = iDTMFUplinkPlayer->SendDtmfToneString(dtmfstring);
+ status = TMS_RESULT_SUCCESS;
}
-
dtmfpckg().iStatus = TMSUtility::EtelToTMSResult(status);
dtmfpckg().iRequest = ECmdDTMFToneUplPlayStarted;
-
- if (iDTMFNotifier)
- {
- iDTMFNotifier->SetDtmf(dtmfpckg, TRUE);
- }
}
+ if (iDTMFNotifier)
+ {
+ iDTMFNotifier->SetDtmf(dtmfpckg);
+ }
+
+ TRACE_PRN_IF_ERR(status);
TRACE_PRN_FN_EXT;
return status;
}
@@ -996,7 +1054,7 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallCSAdpt::StopDTMF(TMSStreamType streamtype)
+gint TMSCallCSAdpt::StopDTMF(const TMSStreamType streamtype)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_SUCCESS);
@@ -1020,14 +1078,14 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallCSAdpt::ContinueDTMF(gboolean continuesending)
+gint TMSCallCSAdpt::ContinueDTMF(const gboolean sending)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
if (iDTMFUplinkPlayer)
{
- status = iDTMFUplinkPlayer->ContinueDtmfStringSending(continuesending);
+ status = iDTMFUplinkPlayer->ContinueDtmfStringSending(sending);
status = TMSUtility::EtelToTMSResult(status);
}
@@ -1035,13 +1093,13 @@
return status;
}
-//From DTMFTonePlayerObserver
+//From TMSDTMFTonePlayerObserver
// -----------------------------------------------------------------------------
// TMSCallCSAdpt::DTMFInitCompleted
//
// -----------------------------------------------------------------------------
//
-void TMSCallCSAdpt::DTMFInitCompleted(gint /*error*/)
+void TMSCallCSAdpt::DTMFInitCompleted(gint /*status*/)
{
TRACE_PRN_FN_ENT;
// TODO: process error
@@ -1053,23 +1111,23 @@
//
// -----------------------------------------------------------------------------
//
-void TMSCallCSAdpt::DTMFToneFinished(gint error)
+void TMSCallCSAdpt::DTMFToneFinished(gint status)
{
TRACE_PRN_FN_ENT;
+ TRACE_PRN_IF_ERR(status);
TmsMsgBufPckg dtmfpckg;
- if (error == KErrUnderflow || error == KErrInUse)
+ // KErrUnderflow indicates end of DTMF playback.
+ if (status == KErrUnderflow || status == KErrInUse)
{
- error = TMS_RESULT_SUCCESS;
+ status = TMS_RESULT_SUCCESS;
}
-
- dtmfpckg().iStatus = TMSUtility::TMSResult(error);
+ dtmfpckg().iStatus = TMSUtility::TMSResult(status);
dtmfpckg().iRequest = ECmdDTMFTonePlayFinished;
if (iDTMFNotifier)
{
- iDTMFNotifier->SetDtmf(dtmfpckg, TRUE);
+ iDTMFNotifier->SetDtmf(dtmfpckg);
}
-
TRACE_PRN_FN_EXT;
}
@@ -1079,19 +1137,18 @@
// -----------------------------------------------------------------------------
//
void TMSCallCSAdpt::HandleDTMFEvent(
- const TMSDTMFObserver::TCCPDtmfEvent aEvent, const gint aError,
- const TChar /*aTone*/)
+ const TMSDTMFObserver::TCCPDtmfEvent event, const gint status,
+ const TChar /*tone*/)
{
TRACE_PRN_FN_ENT;
TmsMsgBufPckg dtmfpckg;
- TRACE_PRN_N1(_L("**TMS TMSCallCSAdpt::HandleDTMFEvent error:%d"),aError);
-
- dtmfpckg().iStatus = TMSUtility::EtelToTMSResult(aError);
+ TRACE_PRN_N1(_L("**TMS TMSCallCSAdpt::HandleDTMFEvent error:%d"), status);
- switch (aEvent)
+ dtmfpckg().iStatus = TMSUtility::EtelToTMSResult(status);
+
+ switch (event)
{
-
case ECCPDtmfUnknown: //Unknown
break;
case ECCPDtmfManualStart: //DTMF sending started manually
@@ -1117,78 +1174,59 @@
TRACE_PRN_FN_EXT;
}
-// From TMSCSPDevSoundObserver
-
// -----------------------------------------------------------------------------
// TMSCallCSAdpt::DownlinkInitCompleted
-//
+// From TMSCSDevSoundObserver
// -----------------------------------------------------------------------------
//
void TMSCallCSAdpt::DownlinkInitCompleted(gint status)
{
TRACE_PRN_FN_ENT;
- NotifyClient(iDnlinkStreamId, ECmdDownlinkInitComplete, status, 0);
+ if (status == TMS_RESULT_SUCCESS)
+ {
+ iDnlinkInitialized = TRUE;
+ }
+ NotifyClient(iDnlinkStreamId, ECmdDownlinkInitComplete, status);
TRACE_PRN_FN_EXT;
}
// -----------------------------------------------------------------------------
// TMSCallCSAdpt::UplinkInitCompleted
-//
+// From TMSCSDevSoundObserver
// -----------------------------------------------------------------------------
//
void TMSCallCSAdpt::UplinkInitCompleted(gint status)
{
TRACE_PRN_FN_ENT;
- NotifyClient(iUplinkStreamId, ECmdUplinkInitComplete, status, 0);
- TRACE_PRN_FN_EXT;
- }
-
-// -----------------------------------------------------------------------------
-// TMSCallCSAdpt::UplinkActivatedSuccessfully
-//
-// -----------------------------------------------------------------------------
-//
-void TMSCallCSAdpt::UplinkActivatedSuccessfully()
- {
- TRACE_PRN_FN_ENT;
- NotifyClient(iUplinkStreamId, ECmdUplinkStarted, KErrNone, 0);
- TRACE_PRN_FN_EXT;
- }
-
-// -----------------------------------------------------------------------------
-// TMSCallCSAdpt::DownlinkActivatedSuccessfully
-//
-// -----------------------------------------------------------------------------
-//
-void TMSCallCSAdpt::DownlinkActivatedSuccessfully()
- {
- TRACE_PRN_FN_ENT;
- NotifyClient(iDnlinkStreamId, ECmdDownlinkStarted, KErrNone, 0);
+ if (status == TMS_RESULT_SUCCESS)
+ {
+ iUplinkInitialized = TRUE;
+ }
+ NotifyClient(iUplinkStreamId, ECmdUplinkInitComplete, status);
TRACE_PRN_FN_EXT;
}
// -----------------------------------------------------------------------------
// TMSCallCSAdpt::UplinkActivationFailed
-//
+// From TMSCSDevSoundObserver
// -----------------------------------------------------------------------------
//
-void TMSCallCSAdpt::UplinkActivationFailed()
+void TMSCallCSAdpt::UplinkActivationCompleted(gint status)
{
TRACE_PRN_FN_ENT;
- NotifyClient(iUplinkStreamId, ECmdUplinkStarted, TMS_RESULT_FATAL_ERROR, 0);
+ NotifyClient(iUplinkStreamId, ECmdUplinkStarted, status);
TRACE_PRN_FN_EXT;
}
// -----------------------------------------------------------------------------
// TMSCallCSAdpt::DownlinkActivationFailed
-//
+// From TMSCSDevSoundObserver
// -----------------------------------------------------------------------------
//
-void TMSCallCSAdpt::DownlinkActivationFailed()
+void TMSCallCSAdpt::DownlinkActivationCompleted(gint status)
{
TRACE_PRN_FN_ENT;
- NotifyClient(iDnlinkStreamId, ECmdDownlinkStarted,
- TMS_RESULT_FATAL_ERROR, 0);
+ NotifyClient(iDnlinkStreamId, ECmdDownlinkStarted, status);
TRACE_PRN_FN_EXT;
}
@@ -1229,7 +1267,7 @@
// -----------------------------------------------------------------------------
//
void TMSCallCSAdpt::SetOutputComplete(
- CTelephonyAudioRouting& aTelephonyAudioRouting, gint /*aError*/)
+ CTelephonyAudioRouting& aTelephonyAudioRouting, gint /*status*/)
{
TRACE_PRN_FN_ENT;
TRoutingMsgBufPckg pckg;
--- a/mmserv/tms/tmscallserver/src/tmscallipadpt.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/tmscallipadpt.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -19,7 +19,6 @@
#include "tmsutility.h"
#include "tmsclientserver.h"
#include "tmsshared.h"
-#include "tmsipcallstream.h"
#include "tmscallipadpt.h"
using namespace TMS;
@@ -46,8 +45,8 @@
void TMSCallIPAdpt::ConstructL()
{
TRACE_PRN_FN_ENT;
+ iIPDownlink = NULL;
iIPUplink = NULL;
- iIPDownlink = NULL;
iDTMFDnlinkPlayer = NULL;
iDTMFUplinkPlayer = NULL;
iDTMFNotifier = NULL;
@@ -114,8 +113,8 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallIPAdpt::CreateStream(TMSCallType /*callType*/,
- TMSStreamType strmType, gint& outStrmId)
+gint TMSCallIPAdpt::CreateStream(const TMSCallType /*callType*/,
+ const TMSStreamType strmType, gint& outStrmId)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_SUCCESS);
@@ -126,10 +125,10 @@
status = TMS_RESULT_ALREADY_EXIST;
if (!iUplinkInitialized)
{
- iUplinkInitialized = TRUE;
iUplinkStreamId = iNextStreamId;
outStrmId = iUplinkStreamId;
iNextStreamId++;
+ //iUplinkInitialized = TRUE; //not initialized yet!
status = TMS_RESULT_SUCCESS;
}
break;
@@ -139,10 +138,10 @@
status = TMS_RESULT_ALREADY_EXIST;
if (!iDnlinkInitialized)
{
- iDnlinkInitialized = TRUE;
iDnlinkStreamId = iNextStreamId;
outStrmId = iDnlinkStreamId;
iNextStreamId++;
+ //iDnlinkInitialized = TRUE; //not initialized yet!
status = TMS_RESULT_SUCCESS;
}
break;
@@ -162,12 +161,13 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallIPAdpt::InitStream(TMSCallType /*callType*/, TMSStreamType strmType,
- gint strmId, TMSFormatType frmtType, const RMessage2& message)
+gint TMSCallIPAdpt::InitStream(const TMSCallType /*callType*/,
+ const TMSStreamType strmType, const gint strmId,
+ const TMSFormatType frmtType, const gint retrytime,
+ const RMessage2& message)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_SUCCESS);
-
guint32 fourCC = TOFOURCC(frmtType);
if (fourCC == NULL)
{
@@ -182,12 +182,11 @@
if (strmId == iUplinkStreamId)
{
SetFormat(iUplinkStreamId, fourCC);
- status = OpenUplinkL(message);
+ status = OpenUplink(message, retrytime);
if (status == TMS_RESULT_SUCCESS)
{
status = InitDTMF(TMS_STREAM_UPLINK);
}
- NotifyClient(iUplinkStreamId, ECmdUplinkInitComplete, status);
}
break;
}
@@ -197,12 +196,11 @@
if (strmId == iDnlinkStreamId)
{
SetFormat(iDnlinkStreamId, fourCC);
- status = OpenDownlinkL(message);
+ status = OpenDownlink(message, retrytime);
if (status == TMS_RESULT_SUCCESS)
{
status = InitDTMF(TMS_STREAM_DOWNLINK);
}
- NotifyClient(iDnlinkStreamId, ECmdDownlinkInitComplete, status);
}
break;
}
@@ -223,8 +221,8 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallIPAdpt::StartStream(TMSCallType /*callType*/,
- TMSStreamType strmType, gint strmId)
+gint TMSCallIPAdpt::StartStream(const TMSCallType /*callType*/,
+ const TMSStreamType strmType, const gint strmId, const gint retrytime)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_INVALID_STATE);
@@ -232,9 +230,9 @@
{
case TMS_STREAM_UPLINK:
{
- if (strmId == iUplinkStreamId && iIPUplink)
+ if (iIPUplink && strmId == iUplinkStreamId)
{
- iIPUplink->Start();
+ iIPUplink->Start(retrytime);
status = TMS_RESULT_SUCCESS;
NotifyClient(iUplinkStreamId, ECmdUplinkStarted, status);
}
@@ -242,9 +240,9 @@
}
case TMS_STREAM_DOWNLINK:
{
- if (strmId == iDnlinkStreamId && iIPDownlink)
+ if (iIPDownlink && strmId == iDnlinkStreamId)
{
- iIPDownlink->Start();
+ iIPDownlink->Start(retrytime);
status = TMS_RESULT_SUCCESS;
NotifyClient(iDnlinkStreamId, ECmdDownlinkStarted, status);
}
@@ -265,8 +263,8 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallIPAdpt::PauseStream(TMSCallType /*callType*/,
- TMSStreamType strmType, gint strmId)
+gint TMSCallIPAdpt::PauseStream(const TMSCallType /*callType*/,
+ const TMSStreamType strmType, const gint strmId)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_INVALID_STATE);
@@ -307,8 +305,8 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallIPAdpt::StopStream(TMSCallType /*callType*/, TMSStreamType strmType,
- gint strmId)
+gint TMSCallIPAdpt::StopStream(const TMSCallType /*callType*/,
+ const TMSStreamType strmType, const gint strmId)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_INVALID_STATE);
@@ -317,7 +315,7 @@
{
case TMS_STREAM_UPLINK:
{
- if (strmId == iUplinkStreamId && iIPUplink)
+ if (iIPUplink && strmId == iUplinkStreamId)
{
iIPUplink->Stop();
status = TMS_RESULT_SUCCESS;
@@ -327,7 +325,7 @@
}
case TMS_STREAM_DOWNLINK:
{
- if (strmId == iDnlinkStreamId && iIPDownlink)
+ if (iIPDownlink && strmId == iDnlinkStreamId)
{
iIPDownlink->Stop();
status = TMS_RESULT_SUCCESS;
@@ -350,8 +348,8 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallIPAdpt::DeinitStream(TMSCallType /*callType*/,
- TMSStreamType strmType, gint strmId)
+gint TMSCallIPAdpt::DeinitStream(const TMSCallType /*callType*/,
+ const TMSStreamType strmType, const gint strmId)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_INVALID_STATE);
@@ -360,20 +358,19 @@
{
case TMS_STREAM_UPLINK:
{
- if (strmId == iUplinkStreamId && iIPUplink)
+ if (iIPUplink && strmId == iUplinkStreamId)
{
iIPUplink->Stop();
//iUplinkStreamId = -1;
iUplinkInitialized = FALSE;
status = TMS_RESULT_SUCCESS;
- NotifyClient(iUplinkStreamId, ECmdDownlinkDeInitComplete,
- status);
+ NotifyClient(iUplinkStreamId, ECmdUplinkDeInitComplete, status);
}
break;
}
case TMS_STREAM_DOWNLINK:
{
- if (strmId == iDnlinkStreamId && iIPDownlink)
+ if (iIPDownlink && strmId == iDnlinkStreamId)
{
iIPDownlink->Stop();
//iDnlinkStreamId = -1;
@@ -400,8 +397,8 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallIPAdpt::DeleteStream(TMSCallType /*callType*/,
- TMSStreamType strmType, gint strmId)
+gint TMSCallIPAdpt::DeleteStream(const TMSCallType /*callType*/,
+ const TMSStreamType strmType, const gint strmId)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_SUCCESS);
@@ -409,7 +406,6 @@
{
case TMS_STREAM_UPLINK:
{
- // This is additional error checking
if (strmId == iUplinkStreamId)
{
iUplinkStreamId = -1;
@@ -419,7 +415,6 @@
}
case TMS_STREAM_DOWNLINK:
{
- // This is additional error checking
if (strmId == iDnlinkStreamId)
{
iDnlinkStreamId = -1;
@@ -442,8 +437,8 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallIPAdpt::DataXferBufferEmptied(TMSCallType /*callType*/,
- TMSStreamType strmType, gint strmId)
+gint TMSCallIPAdpt::DataXferBufferEmptied(const TMSCallType /*callType*/,
+ const TMSStreamType strmType, const gint strmId)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_SUCCESS);
@@ -473,8 +468,8 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallIPAdpt::DataXferBufferFilled(TMSCallType /*callType*/,
- TMSStreamType strmType, gint strmId, guint datasize)
+gint TMSCallIPAdpt::DataXferBufferFilled(const TMSCallType /*callType*/,
+ const TMSStreamType strmType, const gint strmId, const guint datasize)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_SUCCESS);
@@ -543,14 +538,12 @@
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_INVALID_STATE);
-
if (iDnlinkInitialized && iIPDownlink)
{
status = iIPDownlink->GetMaxVolume(volume);
iMaxVolume = volume;
TRACE_PRN_N1(_L("TMS->TMSCallIPAdpt: GetMaxVolume [%d]"), iMaxVolume);
}
-
TRACE_PRN_FN_EXT;
return status;
}
@@ -657,7 +650,7 @@
{
status = iIPDownlink->GetMaxVolume(volume);
iMaxVolume = volume;
- TRACE_PRN_N1(_L("TMS->TMSCallIPAdpt: GetMaxVolume [%d]"), iMaxVolume);
+ TRACE_PRN_N1(_L("TMS->TMSCallIPAdpt::GetGlobalMaxVolume [%d]"), volume);
}
TRACE_PRN_FN_EXT;
return status;
@@ -672,6 +665,7 @@
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_INVALID_STATE);
+ //iGlobalVol = volume;
if (iDnlinkInitialized && iIPDownlink)
{
status = iIPDownlink->SetVolume(volume);
@@ -710,7 +704,7 @@
{
status = iIPUplink->GetMaxGain(gain);
iMaxGain = gain;
- TRACE_PRN_N1(_L("TMS->TMSCallIPAdpt::GetMaxGain [%d]"), iMaxGain);
+ TRACE_PRN_N1(_L("TMS->TMSCallIPAdpt::GetGlobalMaxGain [%d]"), gain);
}
TRACE_PRN_FN_EXT;
return status;
@@ -725,6 +719,7 @@
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_INVALID_STATE);
+ //iGlobalGain = gain;
if (iUplinkInitialized && iIPUplink)
{
status = iIPUplink->SetGain(gain);
@@ -995,11 +990,11 @@
}
// -----------------------------------------------------------------------------
-// TMSCallIPAdpt::OpenDownlinkL
+// TMSCallIPAdpt::OpenDownlink
// Method for player initialization.
// -----------------------------------------------------------------------------
//
-gint TMSCallIPAdpt::OpenDownlinkL(const RMessage2& message)
+gint TMSCallIPAdpt::OpenDownlink(const RMessage2& message, const gint retrytime)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
@@ -1019,10 +1014,11 @@
if (!iIPDownlink)
{
- iIPDownlink = TMSIPDownlink::NewL(iDnFourCC, iPriority);
+ TRAP(status, iIPDownlink = TMSIPDownlink::NewL(*this, iDnFourCC,
+ iPriority, retrytime));
}
- if (iIPDownlink)
+ if (iIPDownlink && status == TMS_RESULT_SUCCESS)
{
// Open message queue for handling server notifications to the client
if (iMsgQueueDn.Handle() <= 0)
@@ -1043,11 +1039,11 @@
}
// -----------------------------------------------------------------------------
-// TMSCallIPAdpt::OpenUplinkL
+// TMSCallIPAdpt::OpenUplink
// Method for recorder initialization.
// -----------------------------------------------------------------------------
//
-gint TMSCallIPAdpt::OpenUplinkL(const RMessage2& message)
+gint TMSCallIPAdpt::OpenUplink(const RMessage2& message, const gint retrytime)
{
TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
@@ -1065,10 +1061,11 @@
if (!iIPUplink)
{
- iIPUplink = TMSIPUplink::NewL(iUpFourCC, iPriority);
+ TRAP(status, iIPUplink = TMSIPUplink::NewL(*this, iUpFourCC, iPriority,
+ retrytime));
}
- if (iIPUplink)
+ if (iIPUplink && status == TMS_RESULT_SUCCESS)
{
// Open message queue for handling server notifications to the client
if (iMsgQueueUp.Handle() <= 0)
@@ -1360,11 +1357,13 @@
//
gint TMSCallIPAdpt::SetOutput(TMSAudioOutput output)
{
+ TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
if (iDnlinkInitialized && iIPDownlink)
{
TRAP(status, iIPDownlink->SetAudioDeviceL(output));
}
+ TRACE_PRN_FN_EXT;
return status;
}
// -----------------------------------------------------------------------------
@@ -1374,13 +1373,16 @@
//
gint TMSCallIPAdpt::GetOutput(TMSAudioOutput& output)
{
+ TRACE_PRN_FN_ENT;
gint status(TMS_RESULT_UNINITIALIZED_OBJECT);
if (iDnlinkInitialized && iIPDownlink)
{
TRAP(status, iIPDownlink->GetAudioDeviceL(output));
}
+ TRACE_PRN_FN_EXT;
return status;
}
+
// -----------------------------------------------------------------------------
// TMSCallIPAdpt::GetPreviousOutput
//
@@ -1397,7 +1399,7 @@
// -----------------------------------------------------------------------------
//
gint TMSCallIPAdpt::GetAvailableOutputsL(gint& /*count*/,
- CBufFlat*& /*outputsbuffer*/)
+ CBufFlat*& /*outputsbuf*/)
{
return TMS_RESULT_FEATURE_NOT_SUPPORTED;
}
@@ -1416,35 +1418,15 @@
{
delete iDTMFDnlinkPlayer;
iDTMFDnlinkPlayer = NULL;
-
- /* Clarify with adaptation team which prio/pref values should be used.
- * 1) KAudioDTMFString -local play, no mixing
- * KAudioPriorityDTMFString -local play, no mixing
- * 2) KAudioPrefUnknownVoipAudioDownlink -3rd party VoIP?
- * KAudioPriorityUnknownVoipAudioDownlink -3rd party VoIP?
- * 3) KAudioPrefVoipAudioDownlink -NOK native VoIP?
- * KAudioPriorityVoipAudioDownlink -NOK native VoIP?
- */
TRAP(status, iDTMFDnlinkPlayer = TMSAudioDtmfTonePlayer::NewL(*this,
- KAudioPrefVoipAudioDownlink, KAudioPriorityVoipAudioDownlink));
+ KAudioDTMFString, KAudioPriorityDTMFString));
}
else if (strmtype == TMS_STREAM_UPLINK)
{
delete iDTMFUplinkPlayer;
iDTMFUplinkPlayer = NULL;
-
- /* Clarify with adaptation team which prio/pref values should be used.
- * Currently the audio policy blocks DTMF mixing with the UPL stream.
- * 1) KAudioPrefUnknownVoipAudioUplink -3rd party VoIP?
- * KAudioPriorityUnknownVoipAudioUplink -3rd party VoIP?
- * KAudioPriorityUnknownVoipAudioUplinkNonSignal -???
- * 2) KAudioPrefVoipAudioUplink -NOK native VoIP?
- * KAudioPrefUnknownVoipAudioUplinkNonSignal -???
- * KAudioPrefVoipAudioUplinkNonSignal -???
- * KAudioPriorityVoipAudioUplink -NOK native VoIP?
- */
TRAP(status, iDTMFUplinkPlayer = TMSAudioDtmfTonePlayer::NewL(*this,
- KAudioPrefVoipAudioUplink, KAudioPriorityVoipAudioUplink));
+ KAudioDTMFString, KAudioPriorityDTMFString));
}
if (!iDTMFNotifier && status == TMS_RESULT_SUCCESS)
@@ -1510,18 +1492,20 @@
gint TMSCallIPAdpt::StopDTMF(TMSStreamType streamtype)
{
TRACE_PRN_FN_ENT;
+ gint status(TMS_RESULT_SUCCESS);
- if (streamtype == TMS_STREAM_DOWNLINK)
+ if (streamtype == TMS_STREAM_DOWNLINK && iDTMFDnlinkPlayer)
{
iDTMFDnlinkPlayer->Cancel();
}
- else if (streamtype == TMS_STREAM_UPLINK)
+ else if (streamtype == TMS_STREAM_UPLINK && iDTMFUplinkPlayer)
{
+ //status = iDTMFUplinkPlayer->StopDtmfTone();
iDTMFUplinkPlayer->Cancel();
}
TRACE_PRN_FN_EXT;
- return TMS_RESULT_SUCCESS;
+ return status;
}
// -----------------------------------------------------------------------------
@@ -1529,7 +1513,7 @@
//
// -----------------------------------------------------------------------------
//
-gint TMSCallIPAdpt::ContinueDTMF(gboolean /*continuesending*/)
+gint TMSCallIPAdpt::ContinueDTMF(const gboolean /*sending*/)
{
return TMS_RESULT_FEATURE_NOT_SUPPORTED;
}
@@ -1540,10 +1524,10 @@
//
// -----------------------------------------------------------------------------
//
-void TMSCallIPAdpt::DTMFInitCompleted(gint /*error*/)
+void TMSCallIPAdpt::DTMFInitCompleted(gint /*status*/)
{
TRACE_PRN_FN_ENT;
- //TRACE_PRN_IF_ERR(error);
+ // TODO: process error
TRACE_PRN_FN_EXT;
}
@@ -1552,18 +1536,18 @@
//
// -----------------------------------------------------------------------------
//
-void TMSCallIPAdpt::DTMFToneFinished(gint error)
+void TMSCallIPAdpt::DTMFToneFinished(gint status)
{
TRACE_PRN_FN_ENT;
- TRACE_PRN_IF_ERR(error);
+ TRACE_PRN_IF_ERR(status);
TmsMsgBufPckg dtmfpckg;
- // Ignore KErrUnderflow - end of DTMF playback.
- if(error == KErrUnderflow /*|| error == KErrInUse*/)
- {
- error = TMS_RESULT_SUCCESS;
- }
- dtmfpckg().iStatus = error;
+ // KErrUnderflow indicates end of DTMF playback.
+ if (status == KErrUnderflow /*|| status == KErrInUse*/)
+ {
+ status = TMS_RESULT_SUCCESS;
+ }
+ dtmfpckg().iStatus = TMSUtility::TMSResult(status);
dtmfpckg().iRequest = ECmdDTMFTonePlayFinished;
if (iDTMFNotifier)
{
@@ -1573,14 +1557,70 @@
}
// -----------------------------------------------------------------------------
+// TMSCallIPAdpt::DownlinkInitCompleted
+// From TMSIPDevSoundObserver
+// -----------------------------------------------------------------------------
+//
+void TMSCallIPAdpt::DownlinkInitCompleted(gint status)
+ {
+ TRACE_PRN_FN_ENT;
+ if (status == TMS_RESULT_SUCCESS)
+ {
+ iDnlinkInitialized = TRUE;
+ }
+ NotifyClient(iDnlinkStreamId, ECmdDownlinkInitComplete, status);
+ TRACE_PRN_FN_EXT;
+ }
+
+// -----------------------------------------------------------------------------
+// TMSCallIPAdpt::UplinkInitCompleted
+// From TMSIPDevSoundObserver
+// -----------------------------------------------------------------------------
+//
+void TMSCallIPAdpt::UplinkInitCompleted(gint status)
+ {
+ TRACE_PRN_FN_ENT;
+ if (status == TMS_RESULT_SUCCESS)
+ {
+ iUplinkInitialized = TRUE;
+ }
+ NotifyClient(iUplinkStreamId, ECmdUplinkInitComplete, status);
+ TRACE_PRN_FN_EXT;
+ }
+
+// -----------------------------------------------------------------------------
+// TMSCallIPAdpt::UplinkStarted
+// From TMSIPDevSoundObserver
+// -----------------------------------------------------------------------------
+//
+void TMSCallIPAdpt::UplinkStarted(gint status)
+ {
+ TRACE_PRN_FN_ENT;
+ NotifyClient(iUplinkStreamId, ECmdUplinkStarted, status);
+ TRACE_PRN_FN_EXT;
+ }
+
+// -----------------------------------------------------------------------------
+// TMSCallIPAdpt::DownlinkStarted
+// From TMSIPDevSoundObserver
+// -----------------------------------------------------------------------------
+//
+void TMSCallIPAdpt::DownlinkStarted(gint status)
+ {
+ TRACE_PRN_FN_ENT;
+ NotifyClient(iDnlinkStreamId, ECmdDownlinkStarted, status);
+ TRACE_PRN_FN_EXT;
+ }
+
+// -----------------------------------------------------------------------------
// TMSCallIPAdpt::NotifyClient
// -----------------------------------------------------------------------------
//
-void TMSCallIPAdpt::NotifyClient(const gint strmId, const gint aCommand,
- const gint aStatus, const gint64 /*aInt64*/)
+void TMSCallIPAdpt::NotifyClient(const gint strmId, const gint command,
+ const gint status, const gint64 /*int64*/)
{
- iMsgBuffer.iRequest = aCommand;
- iMsgBuffer.iStatus = aStatus;
+ iMsgBuffer.iRequest = command;
+ iMsgBuffer.iStatus = status;
if (strmId == iUplinkStreamId)
{
--- a/mmserv/tms/tmscallserver/src/tmscallsession.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/tmscallsession.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -300,7 +300,7 @@
TMSCliSrvStreamInitDataStructBufPckg pckg;
aMessage.ReadL(0, pckg);
status = iCallAdpt->InitStream(pckg().CallType, pckg().StreamType,
- pckg().StreamId, pckg().FormatType, aMessage);
+ pckg().StreamId, pckg().FormatType, pckg().RetryTime, aMessage);
switch (pckg().StreamType)
{
@@ -336,7 +336,7 @@
TMSCliSrvStreamOpDataStructBufPckg pckg;
aMessage.ReadL(0, pckg);
status = iCallAdpt->StartStream(pckg().CallType, pckg().StreamType,
- pckg().StreamId);
+ pckg().StreamId, pckg().RetryTime);
}
aMessage.Complete(status);
TRACE_PRN_FN_EXT;
--- a/mmserv/tms/tmscallserver/src/tmscsdevsound.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/tmscsdevsound.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -16,46 +16,93 @@
*/
#include <AudioPreference.h>
-#include <glib.h>
+#include <tms.h>
#include <S60FourCC.h>
+#include "tmsutility.h"
#include "tmscsdevsound.h"
#include "tmscsdevsoundobserver.h"
using namespace TMS;
+// CONSTANTS
+const gint KTimeoutInitial = 200000; // 200 ms initial timeout
+const gint KTimeoutMultiplier = 2; // Double the timeout for each retry
+const gint KMicroSecMultiply = 1000000; //1 sec
+
// -----------------------------------------------------------------------------
-// TMSCSPDevSound
+// TMSCSDevSound
// -----------------------------------------------------------------------------
//
-TMSCSPDevSound::TMSCSPDevSound(TMSCSPDevSoundObserver& aObserver) :
- iObserver(aObserver)
+TMSCSDevSound::TMSCSDevSound(TMSCSDevSoundObserver& observer) :
+ iObserver(observer)
{
+ iTimer = NULL;
+ iTimeout = KTimeoutInitial;
+ iInitRetryTime = 0;
+ iStartRetryTime = 0;
}
// -----------------------------------------------------------------------------
// ConstructL
// -----------------------------------------------------------------------------
//
-void TMSCSPDevSound::ConstructL(TMMFState aMode, gint aAudioPreference,
- gint aAudioPriority)
+void TMSCSDevSound::ConstructL(const TMSStreamType strmtype,
+ const gint retrytime)
{
+ TRACE_PRN_FN_ENT;
+ iInitRetryTime = retrytime;
+ iStreamType = strmtype;
+
+ if (strmtype == TMS_STREAM_UPLINK)
+ {
+ iMode = EMMFStateRecording;
+ iPriority = KAudioPriorityCSCallUplink;
+ iPreference = KAudioPrefCSCallUplink;
+ }
+ else if (strmtype == TMS_STREAM_DOWNLINK)
+ {
+ iMode = EMMFStatePlaying;
+ iPriority = KAudioPriorityCSCallDownlink;
+ iPreference = KAudioPrefCSCallDownlink;
+ }
+
+ if (iInitRetryTime != 0)
+ {
+ iTimer = TMSTimer::NewL();
+ }
+
+ InitializeL();
+ TRACE_PRN_FN_EXT;
+ }
+
+// -----------------------------------------------------------------------------
+// InitializeL
+// -----------------------------------------------------------------------------
+//
+void TMSCSDevSound::InitializeL()
+ {
+ TRACE_PRN_FN_ENT;
TMMFPrioritySettings audioPriority;
TFourCC modemFourCC;
modemFourCC.Set(KS60FourCCCodeModem);
+
+ delete iDevSound;
+ iDevSound = NULL;
iDevSound = CMMFDevSound::NewL();
if (iDevSound)
{
#ifndef __WINSCW__
- iDevSound->InitializeL(*this, modemFourCC, aMode);
-#else //For testing TMS in WINSCW
- iDevSound->InitializeL(*this, KMMFFourCCCodePCM16, aMode);
+ iDevSound->InitializeL(*this, modemFourCC, iMode);
+#else
+ //For testing TMS in WINSCW
+ iDevSound->InitializeL(*this, KMMFFourCCCodePCM16, iMode);
#endif
- iStreamType = aAudioPreference;
- audioPriority.iPriority = aAudioPriority;
- audioPriority.iPref = aAudioPreference;
- audioPriority.iState = aMode;
+ audioPriority.iPriority = iPriority;
+ audioPriority.iPref = iPreference;
+ audioPriority.iState = iMode;
iDevSound->SetPrioritySettings(audioPriority);
}
+ TRACE_PRN_FN_EXT;
}
// -----------------------------------------------------------------------------
@@ -63,18 +110,24 @@
// Not implemented
// -----------------------------------------------------------------------------
//
-TMSCSPDevSound::~TMSCSPDevSound()
+TMSCSDevSound::~TMSCSDevSound()
{
+ TRACE_PRN_FN_ENT;
+ CancelTimer();
+ delete iTimer;
delete iDevSound;
+ TRACE_PRN_FN_EXT;
}
// -----------------------------------------------------------------------------
// Tries to activate the audio stream if not active or activating
// -----------------------------------------------------------------------------
//
-void TMSCSPDevSound::Activate()
+void TMSCSDevSound::Activate(const gint retrytime)
{
- if (!IsActive() && !IsActivationOngoing())
+ iStartRetryTime = retrytime;
+
+ if (!iActive && !iActivationOngoing)
{
iActivationOngoing = ETrue;
TRAP_IGNORE(DoActivateL());
@@ -85,122 +138,129 @@
// Deactivates the audio device.
// -----------------------------------------------------------------------------
//
-void TMSCSPDevSound::Deactivate()
+void TMSCSDevSound::Deactivate(gboolean reset)
{
- if (iDevSound && (IsActive() || IsActivationOngoing()))
+ TRACE_PRN_FN_ENT;
+ if (reset)
+ {
+ iTimeout = KTimeoutInitial;
+ }
+ CancelTimer();
+ if (iDevSound && (iActive || iActivationOngoing))
{
iDevSound->Stop();
iActive = EFalse;
iActivationOngoing = EFalse;
}
- }
-
-// -----------------------------------------------------------------------------
-// ActivationOngoing
-// -----------------------------------------------------------------------------
-//
-TBool TMSCSPDevSound::IsActivationOngoing() const
- {
- return iActivationOngoing;
- }
-
-// -----------------------------------------------------------------------------
-// IsActive
-// -----------------------------------------------------------------------------
-//
-TBool TMSCSPDevSound::IsActive() const
- {
- return iActive;
+ TRACE_PRN_FN_EXT;
}
// -----------------------------------------------------------------------------
// DevSound
// -----------------------------------------------------------------------------
//
-CMMFDevSound& TMSCSPDevSound::DevSound()
+CMMFDevSound& TMSCSDevSound::DevSound()
{
return *iDevSound;
}
// -----------------------------------------------------------------------------
// From class MDevSoundObserver
-// Not implemented
// -----------------------------------------------------------------------------
//
-void TMSCSPDevSound::InitializeComplete(TInt aError)
+void TMSCSDevSound::InitializeComplete(TInt aError)
{
- if (iStreamType == KAudioPrefCSCallDownlink)
+ TRACE_PRN_FN_ENT;
+ if (aError != TMS_RESULT_SUCCESS && iInitRetryTime != 0)
{
- iObserver.DownlinkInitCompleted(aError);
+ StartTimer();
}
else
{
- iObserver.UplinkInitCompleted(aError);
+ iTimeout = KTimeoutInitial;
+ CancelTimer();
+ NotifyEvent(aError);
+ }
+ TRACE_PRN_FN_EXT;
+ }
+
+
+// -----------------------------------------------------------------------------
+// TMSCSDevSound::NotifyEvent
+// -----------------------------------------------------------------------------
+//
+void TMSCSDevSound::NotifyEvent(gint error)
+ {
+ if (iStreamType == TMS_STREAM_DOWNLINK)
+ {
+ iObserver.DownlinkInitCompleted(error);
+ }
+ else if (iStreamType == TMS_STREAM_UPLINK)
+ {
+ iObserver.UplinkInitCompleted(error);
}
}
// -----------------------------------------------------------------------------
-// From class MDevSoundObserver
-// Not implemented
+// TMSCSDevSound::CancelTimer
+// Resets timer
// -----------------------------------------------------------------------------
//
-void TMSCSPDevSound::BufferToBeFilled(CMMFBuffer* /*aBuffer*/)
+void TMSCSDevSound::CancelTimer()
{
+ iInitRetryTime = 0;
+ if (iTimer)
+ {
+ if (iTimer->IsRunning())
+ {
+ iTimer->CancelNotify();
+ }
+ }
}
// -----------------------------------------------------------------------------
-// From class MDevSoundObserver
-// Not implemented
+// TMSCSDevSound::StartTimer
+// Activates timer
// -----------------------------------------------------------------------------
//
-void TMSCSPDevSound::PlayError(TInt /*aError*/)
+void TMSCSDevSound::StartTimer()
{
- }
-
-// -----------------------------------------------------------------------------
-// From class MDevSoundObserver
-// Not implemented
-// -----------------------------------------------------------------------------
-//
-void TMSCSPDevSound::ToneFinished(TInt /*aError*/)
- {
+ if (iTimer && (iInitRetryTime != 0 || iStartRetryTime != 0))
+ {
+ iTimer->NotifyAfter(iTimeout, *this);
+ }
}
// -----------------------------------------------------------------------------
-// From class MDevSoundObserver
-// Not implemented
-// -----------------------------------------------------------------------------
-//
-void TMSCSPDevSound::BufferToBeEmptied(CMMFBuffer* /*aBuffer*/)
- {
- }
-
-// -----------------------------------------------------------------------------
-// From class MDevSoundObserver
-// Not implemented
+// From TMSTimerObserver
+// Notification upon TMSTimer timeout.
// -----------------------------------------------------------------------------
//
-void TMSCSPDevSound::RecordError(TInt /*aError*/)
- {
- }
-
-// -----------------------------------------------------------------------------
-// From class MDevSoundObserver
-// Not implemented
-// -----------------------------------------------------------------------------
-//
-void TMSCSPDevSound::ConvertError(TInt /*aError*/)
+void TMSCSDevSound::TimerEvent()
{
- }
+ iTimeout *= KTimeoutMultiplier;
-// -----------------------------------------------------------------------------
-// From class MDevSoundObserver
-// Not implemented
-// -----------------------------------------------------------------------------
-//
-void TMSCSPDevSound::DeviceMessage(TUid /*aMessageType*/,
- const TDesC8& /*aMsg*/)
- {
+ if (!iActivationOngoing) //Initializing
+ {
+ if (iTimeout > (iInitRetryTime * KMicroSecMultiply))
+ {
+ iInitRetryTime = 0;
+ }
+ TRAPD(status, InitializeL());
+ if (status != TMS_RESULT_SUCCESS)
+ {
+ NotifyEvent(status);
+ }
+ }
+ else //Activating
+ {
+ if (iTimeout > (iStartRetryTime * KMicroSecMultiply))
+ {
+ iStartRetryTime = 0;
+ }
+ Deactivate(FALSE);
+ Activate(iStartRetryTime);
+ }
}
// End of File
--- a/mmserv/tms/tmscallserver/src/tmscsdownlink.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/tmscsdownlink.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -16,6 +16,7 @@
*/
#include <AudioPreference.h>
+#include "tmsutility.h"
#include "tmscsdownlink.h"
#include "tmscsdevsoundobserver.h"
@@ -25,20 +26,44 @@
const gint KDefaultMaxVolume = 10;
// -----------------------------------------------------------------------------
+// Constructor
+// -----------------------------------------------------------------------------
+//
+TMSCSDownlink::TMSCSDownlink(TMSCSDevSoundObserver& observer) :
+ TMSCSDevSound(observer)
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// Second phase constructor
+// -----------------------------------------------------------------------------
+//
+void TMSCSDownlink::ConstructL(const gint retrytime)
+ {
+ TMSCSDevSound::ConstructL(TMS_STREAM_DOWNLINK, retrytime);
+
+ if (iDevSound)
+ {
+ iDevSound->SetVolume(KDefaultVolume);
+ }
+ }
+
+// -----------------------------------------------------------------------------
// Static constructor
// -----------------------------------------------------------------------------
//
-TMSCSDownlink* TMSCSDownlink::NewL(TMSCSPDevSoundObserver& aObserver)
+TMSCSDownlink* TMSCSDownlink::NewL(TMSCSDevSoundObserver& observer,
+ const gint retrytime)
{
- TMSCSDownlink* self = new (ELeave) TMSCSDownlink(aObserver);
+ TMSCSDownlink* self = new (ELeave) TMSCSDownlink(observer);
CleanupStack::PushL(self);
- self->ConstructL();
+ self->ConstructL(retrytime);
CleanupStack::Pop(self);
return self;
}
// -----------------------------------------------------------------------------
-// Destructor.
+// Destructor
// -----------------------------------------------------------------------------
//
TMSCSDownlink::~TMSCSDownlink()
@@ -49,19 +74,19 @@
// Sets volume
// -----------------------------------------------------------------------------
//
-void TMSCSDownlink::SetVolume(gint aVolume)
+void TMSCSDownlink::SetVolume(gint volume)
{
if (iDevSound)
{
gint maxVolume(iDevSound->MaxVolume());
maxVolume = (maxVolume > 0) ? maxVolume : KDefaultMaxVolume;
- gint scaledVolume = (aVolume * maxVolume) / KDefaultMaxVolume;
+ gint scaledVolume = (volume * maxVolume) / KDefaultMaxVolume;
iDevSound->SetVolume(scaledVolume);
}
}
// -----------------------------------------------------------------------------
-// Gives volume
+// Returns volume
// -----------------------------------------------------------------------------
//
gint TMSCSDownlink::Volume()
@@ -75,7 +100,7 @@
}
// -----------------------------------------------------------------------------
-// Gives max volume
+// Returns device's max volume
// -----------------------------------------------------------------------------
//
gint TMSCSDownlink::MaxVolume()
@@ -95,13 +120,14 @@
//
void TMSCSDownlink::BufferToBeFilled(CMMFBuffer* /*aBuffer*/)
{
- //CSPLOGSTRING( CSPINT, "TMSCSDownlink:: activated" );
+ TRACE_PRN_N(_L("TMSCSDownlink::BufferToBeFilled"));
+
// We dont react to devsound messages unless we are activating.
- if (IsActivationOngoing())
+ if (iActivationOngoing)
{
iActive = ETrue;
iActivationOngoing = EFalse;
- iObserver.DownlinkActivatedSuccessfully();
+ iObserver.DownlinkActivationCompleted(KErrNone);
}
}
@@ -112,23 +138,27 @@
//
void TMSCSDownlink::PlayError(TInt aError)
{
- //CSPLOGSTRING( CSPINT, "TMSCSDownlink::PlayError" );
+ TRACE_PRN_N1(_L("TMSCSDownlink::PlayError[%d]"), aError);
- // We dont react to devsound messages unless we are activating.
- if (IsActivationOngoing())
+ // We don't react to devsound errors unless we are activating.
+ if (iActivationOngoing && aError == KErrAccessDenied)
{
- //CSPLOGSTRING( CSPINT, "TMSCSDownlink::PlayError activation failed" );
- if (aError == KErrAccessDenied)
+ if (iStartRetryTime != 0)
{
+ StartTimer();
+ }
+ else
+ {
+ CancelTimer();
iActivationOngoing = EFalse;
- iObserver.DownlinkActivationFailed();
+ iObserver.DownlinkActivationCompleted(aError);
}
}
}
// -----------------------------------------------------------------------------
-// From class CSPDevsound
-// Tries to activate Downlink stream.
+// From class TMSCSDevSound
+// Activates Downlink stream.
// -----------------------------------------------------------------------------
//
void TMSCSDownlink::DoActivateL()
@@ -139,28 +169,4 @@
}
}
-// -----------------------------------------------------------------------------
-// Constructor
-// -----------------------------------------------------------------------------
-//
-TMSCSDownlink::TMSCSDownlink(TMSCSPDevSoundObserver& aObserver) :
- TMSCSPDevSound(aObserver)
- {
- }
-
-// -----------------------------------------------------------------------------
-// Second phase constructor
-// -----------------------------------------------------------------------------
-//
-void TMSCSDownlink::ConstructL()
- {
- TMSCSPDevSound::ConstructL(EMMFStatePlaying, KAudioPrefCSCallDownlink,
- KAudioPriorityCSCallDownlink);
-
- if (iDevSound)
- {
- iDevSound->SetVolume(KDefaultVolume);
- }
- }
-
// End of File
--- a/mmserv/tms/tmscallserver/src/tmscsuplink.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/tmscsuplink.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -16,23 +16,40 @@
*/
#include <AudioPreference.h>
+#include "tmsutility.h"
#include "tmscsuplink.h"
#include "tmscsdevsoundobserver.h"
using namespace TMS;
-// Mute value
-const gint KSetMuteToDevSound = 0;
+// -----------------------------------------------------------------------------
+// Constructor
+// -----------------------------------------------------------------------------
+//
+TMSCSUplink::TMSCSUplink(TMSCSDevSoundObserver& observer) :
+ TMSCSDevSound(observer)
+ {
+ }
// -----------------------------------------------------------------------------
-// Static constructor.
+// Second phase constructor
// -----------------------------------------------------------------------------
//
-TMSCSUplink* TMSCSUplink::NewL(TMSCSPDevSoundObserver& aObserver)
+void TMSCSUplink::ConstructL(const gint retrytime)
{
- TMSCSUplink* self = new (ELeave) TMSCSUplink(aObserver);
+ TMSCSDevSound::ConstructL(TMS_STREAM_UPLINK, retrytime);
+ }
+
+// -----------------------------------------------------------------------------
+// Static constructor
+// -----------------------------------------------------------------------------
+//
+TMSCSUplink* TMSCSUplink::NewL(TMSCSDevSoundObserver& observer,
+ const gint retrytime)
+ {
+ TMSCSUplink* self = new (ELeave) TMSCSUplink(observer);
CleanupStack::PushL(self);
- self->ConstructL();
+ self->ConstructL(retrytime);
CleanupStack::Pop(self);
return self;
}
@@ -49,61 +66,31 @@
// Gives mic mute state
// -----------------------------------------------------------------------------
//
-TBool TMSCSUplink::IsMuted()
+gboolean TMSCSUplink::IsMuted()
{
- TBool isMuted = EFalse;
- gint gain = 0;
+ gint gain(0);
+
if (iDevSound)
{
gain = iDevSound->Gain();
}
- if (!gain)
- {
- // Mute is on
- isMuted = ETrue;
- }
- // CSPLOGSTRING( CSPINT, "TMSCSUplink::IsMuted" );
- return isMuted;
+ return ((!gain)? TRUE : FALSE);
}
// -----------------------------------------------------------------------------
-// Set mic muted.
+// Sets mic gain
// -----------------------------------------------------------------------------
//
-void TMSCSUplink::SetMuted()
+void TMSCSUplink::SetGain(gint gain)
{
if (iDevSound)
{
- iDevSound->SetGain(KSetMuteToDevSound);
+ iDevSound->SetGain(gain);
}
}
// -----------------------------------------------------------------------------
-// Set mic unmuted
-// -----------------------------------------------------------------------------
-//
-void TMSCSUplink::SetUnmuted()
- {
- if (iDevSound)
- {
- iDevSound->SetGain(iDevSound->MaxGain());
- }
- }
-
-// -----------------------------------------------------------------------------
-// Sets gain
-// -----------------------------------------------------------------------------
-//
-void TMSCSUplink::SetGain(gint aGain)
- {
- if (iDevSound)
- {
- iDevSound->SetGain(aGain);
- }
- }
-
-// -----------------------------------------------------------------------------
-// Gives volume
+// Returns mic gain
// -----------------------------------------------------------------------------
//
gint TMSCSUplink::Gain()
@@ -117,7 +104,7 @@
}
// -----------------------------------------------------------------------------
-// Gives max gain
+// Returns max mic gain
// -----------------------------------------------------------------------------
//
gint TMSCSUplink::MaxGain()
@@ -132,46 +119,50 @@
// -----------------------------------------------------------------------------
// From class MDevSoundObserver
-// Activation was successfull.
+// Uplink stream has been activated successfully.
// -----------------------------------------------------------------------------
//
void TMSCSUplink::BufferToBeEmptied(CMMFBuffer* /*aBuffer*/)
{
- // CSPLOGSTRING( CSPINT, "TMSCSUplink::BufferToBeEmptied" );
+ TRACE_PRN_N(_L("TMSCSUplink::BufferToBeEmptied"));
// We dont react to devsound messages unless we are activating.
- if (IsActivationOngoing())
+ if (iActivationOngoing)
{
iActive = ETrue;
iActivationOngoing = EFalse;
- iObserver.UplinkActivatedSuccessfully();
+ iObserver.UplinkActivationCompleted(KErrNone);
}
}
// -----------------------------------------------------------------------------
// From class MDevSoundObserver
-// Activation feiled
+// Uplink stream activation failed
// -----------------------------------------------------------------------------
//
void TMSCSUplink::RecordError(TInt aError)
{
- // CSPLOGSTRING( CSPINT, "TMSCSUplink::RecordError" );
+ TRACE_PRN_N1(_L("TMSCSUplink::RecordError[%d]"), aError);
// We dont react to devsound messages unless we are activating.
- if (IsActivationOngoing())
+ if (iActivationOngoing && aError == KErrAccessDenied)
{
- if (aError == KErrAccessDenied)
+ if (iStartRetryTime != 0)
{
+ StartTimer();
+ }
+ else
+ {
+ CancelTimer();
iActivationOngoing = EFalse;
- iObserver.UplinkActivationFailed();
+ iObserver.UplinkActivationCompleted(aError);
}
}
}
// -----------------------------------------------------------------------------
-// From class TMSCSPDevSound
-// Tries to activate mic stream. Stream becomes active when BufferToBeFilled
-// gets called.
+// From class TMSCSDevSound
+// Activates Uplink stream.
// -----------------------------------------------------------------------------
//
void TMSCSUplink::DoActivateL()
@@ -182,23 +173,4 @@
}
}
-// -----------------------------------------------------------------------------
-// Constructor
-// -----------------------------------------------------------------------------
-//
-TMSCSUplink::TMSCSUplink(TMSCSPDevSoundObserver& aObserver) :
- TMSCSPDevSound(aObserver)
- {
- }
-
-// -----------------------------------------------------------------------------
-// Second phase constructor
-// -----------------------------------------------------------------------------
-//
-void TMSCSUplink::ConstructL()
- {
- TMSCSPDevSound::ConstructL(EMMFStateRecording, KAudioPrefCSCallUplink,
- KAudioPriorityCSCallUplink);
- }
-
// End of File
--- a/mmserv/tms/tmscallserver/src/tmsipcalldownlinkds.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/tmsipcalldownlinkds.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -32,7 +32,8 @@
// Standard Constructor
// -----------------------------------------------------------------------------
//
-TMSIPDownlink::TMSIPDownlink()
+TMSIPDownlink::TMSIPDownlink(TMSIPDevSoundObserver& observer) :
+ TMSIPCallStreamBase(observer)
{
}
@@ -61,12 +62,13 @@
// Symbian two-phase constructor
// -----------------------------------------------------------------------------
//
-TMSIPDownlink* TMSIPDownlink::NewL(const guint32 codecID,
- const TMMFPrioritySettings priority)
+TMSIPDownlink* TMSIPDownlink::NewL(TMSIPDevSoundObserver& observer,
+ const guint32 codecID, const TMMFPrioritySettings priority,
+ const gint retrytime)
{
- TMSIPDownlink* self = new (ELeave) TMSIPDownlink();
+ TMSIPDownlink* self = new (ELeave) TMSIPDownlink(observer);
CleanupStack::PushL(self);
- self->ConstructL(codecID, priority);
+ self->ConstructL(codecID, priority, retrytime);
CleanupStack::Pop(self);
return self;
}
@@ -77,17 +79,15 @@
// -----------------------------------------------------------------------------
//
void TMSIPDownlink::ConstructL(const guint32 codecID,
- const TMMFPrioritySettings priority)
+ const TMMFPrioritySettings priority, const gint /*retrytime*/)
{
TRACE_PRN_FN_ENT;
-
iCodecID = codecID;
iPriority = priority;
// Client must set these before querying!
iG711DecodeMode = TMS_G711_CODEC_MODE_ALAW;
iILBCDecodeMode = TMS_ILBC_CODEC_MODE_20MS_FRAME;
-
TRAPD(err, InitDevSoundL(EMMFStatePlaying, priority));
if (err != TMS_RESULT_SUCCESS)
{
@@ -95,7 +95,6 @@
}
iMaxBufLen = ConfigureMedia(iCodecID);
-
TRACE_PRN_FN_EXT;
}
@@ -104,26 +103,21 @@
//
// -----------------------------------------------------------------------------
//
-void TMSIPDownlink::Start()
+void TMSIPDownlink::Start(const gint /*retrytime*/)
{
TRACE_PRN_FN_ENT;
-
gint err = TMS_RESULT_ILLEGAL_OPERATION;
if (iStatus == EReady && iDevSound)
{
TRAP(err, iDevSound->PlayInitL());
TRACE_PRN_IF_ERR(err);
-
-#ifdef _DEBUG
- iSamplesPlayedCount = 0;
-#endif
if (err != TMS_RESULT_SUCCESS)
{
iStatus = EReady;
+ iObserver.DownlinkStarted(err);
}
}
-
TRACE_PRN_FN_EXT;
}
@@ -141,7 +135,6 @@
iDevSound->Stop();
iStatus = EReady;
}
-
TRACE_PRN_FN_EXT;
}
@@ -156,18 +149,19 @@
void TMSIPDownlink::BufferToBeFilled(CMMFBuffer* aBuffer)
{
// Store pointer to the received buffer
- iDevSoundBufPtr = static_cast<CMMFDataBuffer*>(aBuffer);
+ iDevSoundBufPtr = static_cast<CMMFDataBuffer*> (aBuffer);
iBufLen = iDevSoundBufPtr->RequestSize();
TRACE_PRN_N1(_L("TMS->DNL->BTBF: LEN[%d]"), iBufLen);
#ifndef __WINSCW__
- //TODO: revisit this!
+ //TODO: Is this still true?
// The first AMR buffer returns 1 for no data frame.
/*if (iCodecID == KMccFourCCIdAMRNB)
{
iBufLen = iMaxBufLen;
}*/
#endif //__WINSCW__
+
// Create or adjust the chunk
gint err = DoChunk(iBufLen, iMsgBuffer);
@@ -182,6 +176,7 @@
iMsgBuffer.iStatus = err;
iMsgBuffer.iInt = iBufLen;
iStatus = EStreaming;
+
// If chunk is opened, we will expect a call from the client to
// get chunk handle. When we get a call to copy chunk handle,
// check these variables and see if they match. This is not
@@ -195,7 +190,6 @@
iMsgBuffer.iRequest = ECmdFillBuffer;
err = iMsgQueue.Send(iMsgBuffer);
-
TRACE_PRN_IF_ERR(err);
}
@@ -210,7 +204,7 @@
// Copy data over from chunk
TPtr8 dataPtr(iChunk.Base(), buflen, iMaxBufLen);
- // RDebug::RawPrint(dataPtr);
+ //RDebug::RawPrint(dataPtr);
if (iStatus == EStreaming && iDevSound && iDevSoundBufPtr)
{
@@ -362,7 +356,6 @@
status = TMS_RESULT_ILLEGAL_OPERATION;
}
}
-
TRACE_PRN_IF_ERR(status);
return status;
}
@@ -396,7 +389,6 @@
}
}
}
-
TRACE_PRN_IF_ERR(err);
return err;
}
@@ -443,7 +435,6 @@
}
}
}
-
TRACE_PRN_IF_ERR(err);
return err;
}
@@ -478,7 +469,6 @@
TRACE_PRN_N1(_L("TMS->DNL: FrameModeRqrdForEC [%d]"), frmodereq);
}
}
-
TRACE_PRN_IF_ERR(err);
return err;
}
@@ -502,7 +492,6 @@
TRACE_PRN_N1(_L("TMS->DNL: SetFrameMode [%d]"), frmode);
}
}
-
TRACE_PRN_IF_ERR(err);
return err;
}
@@ -523,7 +512,6 @@
TRACE_PRN_N1(_L("TMS->DNL: GetFrameMode [%d]"), frmode);
err = TMS_RESULT_SUCCESS;
}
-
TRACE_PRN_IF_ERR(err);
return err;
}
@@ -542,7 +530,6 @@
err = iErrConcealmentIntfc->ConcealErrorForNextBuffer();
TRACE_PRN_N(_L("TMS->DNL: ConcealErrorForNextBuffer"));
}
-
TRACE_PRN_IF_ERR(err);
return err;
}
@@ -569,7 +556,6 @@
TRACE_PRN_N1(_L("TMS->DNL: SetCng [%d]"), cng);
}
}
-
TRACE_PRN_IF_ERR(err);
return err;
}
@@ -596,7 +582,6 @@
TRACE_PRN_N1(_L("TMS->DNL: GetCng [%d]"), cng);
}
}
-
TRACE_PRN_IF_ERR(err);
return err;
}
@@ -619,7 +604,6 @@
TRACE_PRN_N1(_L("TMS->DNL: SetPlc [%d]"), plc);
}
}
-
TRACE_PRN_IF_ERR(err);
return err;
}
@@ -640,7 +624,6 @@
err = TMS_RESULT_SUCCESS;
TRACE_PRN_N1(_L("TMS->DNL: GetPlc [%d]"), plc);
}
-
TRACE_PRN_IF_ERR(err);
return err;
}
@@ -662,7 +645,6 @@
TRACE_PRN_N(_L("TMS->DNL: BadLsfNextBuffer"));
}
}
-
TRACE_PRN_IF_ERR(err);
return err;
}
@@ -759,37 +741,30 @@
void TMSIPDownlink::InitializeComplete(TInt aError)
{
TRACE_PRN_FN_ENT;
+ gint status = aError;
- gint err = aError;
-
- if (err == TMS_RESULT_SUCCESS && iDevSound)
+ if (status == TMS_RESULT_SUCCESS && iDevSound)
{
TMMFCapabilities conf;
conf = iDevSound->Config();
conf.iRate = EMMFSampleRate8000Hz;
conf.iChannels = EMMFMono;
- TRAP(err, iDevSound->SetConfigL(conf));
- if (err == TMS_RESULT_SUCCESS)
+ TRAP(status, iDevSound->SetConfigL(conf));
+ if (status == TMS_RESULT_SUCCESS)
{
// We are ready to stream even in case of later CI setting failure
iStatus = EReady;
iMaxVolume = iDevSound->MaxVolume();
}
- // Init Custom Interface API to the decoder
- err = SetCodecCi();
- if (err != TMS_RESULT_SUCCESS)
- {
- // DEBUG only
- // Can ignore error - although decoder is not fully configured but
- // it can still run in the default mode.
- TRACE_PRN_IF_ERR(err);
- }
+ // Init Custom Interface API to the Decoder. Any return error can
+ // be ignored as codec can still run in the default mode even if not
+ // fully configured.
+ SetCodecCi();
}
- // TODO: Notify client
-
- TRACE_PRN_IF_ERR(err);
+ iObserver.DownlinkInitCompleted(status);
+ TRACE_PRN_IF_ERR(status);
TRACE_PRN_FN_EXT;
}
@@ -800,16 +775,11 @@
// The state of recorder is rolled back to EReady.
// -----------------------------------------------------------------------------
//
-void TMSIPDownlink::PlayError(TInt /*aError*/)
+void TMSIPDownlink::PlayError(TInt aError)
{
- //TRACE_PRN_IF_ERR(aError);
-
-#ifdef _DEBUG
- iSamplesPlayedCount = 0;
-#endif
iStatus = EReady;
-
- // TODO: Notify client
+ iObserver.DownlinkStarted(aError);
+ TRACE_PRN_IF_ERR(aError);
}
// End of file
--- a/mmserv/tms/tmscallserver/src/tmsipcallstreambase.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/tmsipcallstreambase.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -24,6 +24,16 @@
using namespace TMS;
// -----------------------------------------------------------------------------
+// TMSIPCallStreamBase::TMSIPCallStreamBase
+// Constructor
+// -----------------------------------------------------------------------------
+//
+TMSIPCallStreamBase::TMSIPCallStreamBase(TMSIPDevSoundObserver& observer) :
+ iObserver(observer)
+ {
+ }
+
+// -----------------------------------------------------------------------------
// TMSIPCallStreamBase::~TMSIPCallStreamBase
// Destructor
// -----------------------------------------------------------------------------
--- a/mmserv/tms/tmscallserver/src/tmsipcalluplinkds.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmscallserver/src/tmsipcalluplinkds.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -31,7 +31,8 @@
// Standard Constructor
// -----------------------------------------------------------------------------
//
-TMSIPUplink::TMSIPUplink()
+TMSIPUplink::TMSIPUplink(TMSIPDevSoundObserver& observer) :
+ TMSIPCallStreamBase(observer)
{
}
@@ -59,12 +60,13 @@
// Symbian two-phase constructor
// -----------------------------------------------------------------------------
//
-TMSIPUplink* TMSIPUplink::NewL(const guint32 codecID,
- const TMMFPrioritySettings priority)
+TMSIPUplink* TMSIPUplink::NewL(TMSIPDevSoundObserver& observer,
+ const guint32 codecID, const TMMFPrioritySettings priority,
+ const gint retrytime)
{
- TMSIPUplink* self = new (ELeave) TMSIPUplink();
+ TMSIPUplink* self = new (ELeave) TMSIPUplink(observer);
CleanupStack::PushL(self);
- self->ConstructL(codecID, priority);
+ self->ConstructL(codecID, priority, retrytime);
CleanupStack::Pop(self);
return self;
}
@@ -75,17 +77,15 @@
// -----------------------------------------------------------------------------
//
void TMSIPUplink::ConstructL(const guint32 codecID,
- const TMMFPrioritySettings priority)
+ const TMMFPrioritySettings priority, const gint /*retrytime*/)
{
TRACE_PRN_FN_ENT;
-
iCodecID = codecID;
iPriority = priority;
// Client must set these before querying!
iG711EncodeMode = TMS_G711_CODEC_MODE_ALAW;
iILBCEncodeMode = TMS_ILBC_CODEC_MODE_20MS_FRAME;
-
TRAPD(err, InitDevSoundL(EMMFStateRecording, priority));
if (err != TMS_RESULT_SUCCESS)
{
@@ -93,7 +93,6 @@
}
iMaxBufLen = ConfigureMedia(iCodecID);
-
TRACE_PRN_FN_EXT;
}
@@ -102,7 +101,7 @@
//
// -----------------------------------------------------------------------------
//
-void TMSIPUplink::Start()
+void TMSIPUplink::Start(const gint /*retrytime*/)
{
TRACE_PRN_FN_ENT;
@@ -116,17 +115,10 @@
if (err != TMS_RESULT_SUCCESS)
{
- //TODO: Notify main thread
iStatus = EReady;
+ iObserver.UplinkStarted(err);
}
-#ifdef _DEBUG
- else
- {
- iSamplesRecCount = 0;
- }
-#endif
}
-
TRACE_PRN_FN_EXT;
}
@@ -144,10 +136,6 @@
iDevSound->Stop();
iStatus = EReady;
}
- else
- {
- //TODO: Notify main thread
- }
TRACE_PRN_FN_EXT;
}
@@ -158,9 +146,8 @@
//
void TMSIPUplink::BufferToBeEmptied(CMMFBuffer* aBuffer)
{
- iDevSoundBufPtr = static_cast<CMMFDataBuffer*>(aBuffer);
+ iDevSoundBufPtr = static_cast<CMMFDataBuffer*> (aBuffer);
TDes8& data = iDevSoundBufPtr->Data();
-
iBufLen = iDevSoundBufPtr->BufferSize();
TRACE_PRN_N1(_L("TMS->UPL: BTBE->LEN [%d]"), iBufLen);
@@ -353,7 +340,6 @@
status = TMS_RESULT_ILLEGAL_OPERATION;
}
}
-
return status;
}
@@ -386,7 +372,6 @@
}
}
}
-
TRACE_PRN_IF_ERR(err);
return err;
}
@@ -433,7 +418,6 @@
}
}
}
-
TRACE_PRN_IF_ERR(err);
return err;
}
@@ -465,7 +449,6 @@
{
err = iSpeechEncoderConfig->GetSupportedBitrates(bitrates);
}
-
TRACE_PRN_IF_ERR(err);
return err;
}
@@ -484,7 +467,6 @@
err = iSpeechEncoderConfig->SetBitrate(bitrate);
TRACE_PRN_N1(_L("TMS->UPL: SetBitrate [%d]"), bitrate);
}
-
TRACE_PRN_IF_ERR(err);
return err;
}
@@ -503,7 +485,6 @@
err = iSpeechEncoderConfig->GetBitrate(bitrate);
TRACE_PRN_N1(_L("TMS->UPL: GetBitrate [%d]"), bitrate);
}
-
TRACE_PRN_IF_ERR(err);
return err;
}
@@ -634,36 +615,30 @@
{
TRACE_PRN_FN_ENT;
- gint err = aError;
+ gint status = aError;
- if (err == TMS_RESULT_SUCCESS && iDevSound)
+ if (status == TMS_RESULT_SUCCESS && iDevSound)
{
TMMFCapabilities conf;
conf = iDevSound->Config();
conf.iRate = EMMFSampleRate8000Hz;
conf.iChannels = EMMFMono;
- TRAP(err, iDevSound->SetConfigL(conf));
- if (err == TMS_RESULT_SUCCESS)
+ TRAP(status, iDevSound->SetConfigL(conf));
+ if (status == TMS_RESULT_SUCCESS)
{
// We are ready to stream even in case of CI setting failure
iStatus = EReady;
iMaxGain = iDevSound->MaxGain();
}
- // Init Custom Interface API to the Encoder
- err = SetCodecCi();
- if (err != TMS_RESULT_SUCCESS)
- {
- // DEBUG only
- // Can ignore error - although encoder is not fully configured but
- // it can still run in the default mode.
- TRACE_PRN_IF_ERR(err);
- }
+ // Init Custom Interface API to the Encoder. Any return error can
+ // be ignored as codec can still run in the default mode even if not
+ // fully configured.
+ SetCodecCi();
}
- // TODO: Notify client
-
- TRACE_PRN_IF_ERR(err);
+ iObserver.UplinkInitCompleted(status);
+ TRACE_PRN_IF_ERR(status);
TRACE_PRN_FN_EXT;
}
@@ -674,16 +649,11 @@
// The state of recorder is rolled back to EReady.
// -----------------------------------------------------------------------------
//
-void TMSIPUplink::RecordError(TInt /*aError*/)
+void TMSIPUplink::RecordError(TInt aError)
{
- //TRACE_PRN_IF_ERR(aError);
-
-#ifdef _DEBUG
- iSamplesRecCount = 0;
-#endif
iStatus = EReady;
-
- // TODO: Notify client
+ iObserver.UplinkStarted(aError);
+ TRACE_PRN_IF_ERR(aError);
}
// End of file
--- a/mmserv/tms/tmsimpl/inc/tmsclientsinkbodyimpl.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmsimpl/inc/tmsclientsinkbodyimpl.h Wed Jun 23 18:47:10 2010 +0300
@@ -27,6 +27,7 @@
// FORWARD DECLARATIONS
class TMSClientSinkObserver;
class TMSBuffer;
+class TMSGlobalContext;
class TMSCallProxy;
// TMSClientSinkBodyImpl class
@@ -35,7 +36,6 @@
{
public:
static gint Create(TMSClientSinkBody*& bodyimpl);
- // From TMSClientSinkBody begins
virtual ~TMSClientSinkBodyImpl();
@@ -49,13 +49,10 @@
virtual gint GetType(TMSSinkType& sinktype);
- // From TMSClientSinkBody ends
-
// From MQueueHandlerObserver starts
virtual void QueueEvent(TInt aEventType, TInt aError, void* user_data);
- // From MQueueHandlerObserver ends
- void SetProxy(TMSCallProxy* aProxy, gpointer queuehandler);
+ void SetProxy(TMSGlobalContext* context, gpointer queuehandler);
private:
TMSClientSinkBodyImpl();
@@ -64,6 +61,7 @@
private:
TMSClientSinkObserver* iObserver;
gpointer iUserData;
+ TMSGlobalContext* iContext;
TMSCallProxy* iProxy;
};
--- a/mmserv/tms/tmsimpl/inc/tmsclientsourcebodyimpl.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmsimpl/inc/tmsclientsourcebodyimpl.h Wed Jun 23 18:47:10 2010 +0300
@@ -27,6 +27,7 @@
// FORWARD DECLARATIONS
class TMSClientSourceObserver;
class TMSBuffer;
+class TMSGlobalContext;
class TMSCallProxy;
// TMSClientSourceBodyImpl class
@@ -35,13 +36,11 @@
{
public:
static gint Create(TMSClientSourceBody*& bodyimpl);
- // From TMSClientSourceBody begins
virtual ~TMSClientSourceBodyImpl();
virtual gint AddObserver(TMSClientSourceObserver& obsrvr,
gpointer user_data);
-
virtual gint RemoveObserver(TMSClientSourceObserver& obsrvr);
// In pull mode, client calls this.??? How to identify last buffer.
@@ -60,13 +59,10 @@
virtual gint GetType(TMSSourceType& sourcetype);
- // From TMSClientSourceBody ends
-
- // From MQueueHandlerObserver starts
+ // From MQueueHandlerObserver
virtual void QueueEvent(TInt aEventType, TInt aError, void* user_data);
- // From MQueueHandlerObserver ends
- void SetProxy(TMSCallProxy* aProxy, gint strmid, gpointer queuehandler);
+ void SetProxy(TMSGlobalContext* context, gpointer queuehandler);
private:
TMSClientSourceBodyImpl();
@@ -75,9 +71,9 @@
private:
TMSClientSourceObserver* iObserver;
gpointer iUserData;
+ TMSGlobalContext* iContext;
TMSCallProxy* iProxy;
gboolean iQueueMode;
- gint iStreamId;
};
} //namespace TMS
--- a/mmserv/tms/tmsimpl/inc/tmsstreambodyimpl.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmsimpl/inc/tmsstreambodyimpl.h Wed Jun 23 18:47:10 2010 +0300
@@ -66,9 +66,9 @@
virtual TMSStreamState GetState();
virtual TMSStreamType GetStreamType();
virtual gint GetStreamId();
- virtual gint Init();
+ virtual gint Init(gint retrytime);
virtual gint Pause();
- virtual gint Start();
+ virtual gint Start(gint retrytime);
virtual gint Stop();
virtual void Deinit();
--- a/mmserv/tms/tmsimpl/src/tmsclientsinkbodyimpl.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsclientsinkbodyimpl.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -18,6 +18,7 @@
#include <tms.h>
#include <tmsclientsinkobsrvr.h>
#include "tmscallproxy.h"
+#include "tmsglobalcontext.h"
#include "tmsmembuffer.h"
#include "tmsqueuehandler.h"
#include "tmsclientsinkbodyimpl.h"
@@ -90,14 +91,11 @@
// Push mode
gint TMSClientSinkBodyImpl::BufferProcessed(TMSBuffer* buffer)
{
- // TODO send stream attributes here
gint ret(TMS_RESULT_SUCCESS);
-
if (iProxy)
{
- //TODO: must use strm_id instead of 1
- ret = iProxy->BufferEmptied(TMS_CALL_IP, TMS_STREAM_UPLINK, 1,
- *buffer);
+ ret = iProxy->BufferEmptied(iContext->CallType, iContext->StreamType,
+ iContext->StreamId, *buffer);
}
else
{
@@ -113,13 +111,14 @@
return ret;
}
-void TMSClientSinkBodyImpl::SetProxy(TMSCallProxy* aProxy,
+void TMSClientSinkBodyImpl::SetProxy(TMSGlobalContext* context,
gpointer queuehandler)
{
- iProxy = aProxy;
+ iProxy = context->CallProxy;
+ iContext = context;
if (queuehandler)
{
- static_cast<TMSQueueHandler*>(queuehandler)->AddObserver(*this,
+ static_cast<TMSQueueHandler*> (queuehandler)->AddObserver(*this,
TMS_SINK_CLIENT);
}
}
@@ -132,7 +131,7 @@
switch (aEventType)
{
case TMS_EVENT_SINK_PROCESS_BUFFER:
- iObserver->ProcessBuffer(static_cast<TMSBuffer*>(user_data));
+ iObserver->ProcessBuffer(static_cast<TMSBuffer*> (user_data));
break;
default:
break;
--- a/mmserv/tms/tmsimpl/src/tmsclientsinkimpl.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsclientsinkimpl.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -16,6 +16,7 @@
*/
#include "tmsutility.h"
+#include "tmsglobalcontext.h"
#include "tmsclientsinkimpl.h"
#include "tmsclientsinkbodyimpl.h"
@@ -68,12 +69,13 @@
return ret;
}
-gint TMSClientSinkImpl::SetProxy(TMSCallProxy* aProxy, gpointer queuehandler)
+gint TMSClientSinkImpl::SetProxy(TMSGlobalContext* context,
+ gpointer queuehandler)
{
gint ret = TMS_RESULT_SUCCESS;
if (this->iBody)
{
- static_cast<TMSClientSinkBodyImpl*>(this->iBody)->SetProxy(aProxy,
+ static_cast<TMSClientSinkBodyImpl*>(this->iBody)->SetProxy(context,
queuehandler);
}
else
--- a/mmserv/tms/tmsimpl/src/tmsclientsourcebodyimpl.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsclientsourcebodyimpl.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -18,6 +18,7 @@
#include <tms.h>
#include <tmsclientsourceobsrvr.h>
#include "tmscallproxy.h"
+#include "tmsglobalcontext.h"
#include "tmsmembuffer.h"
#include "tmsqueuehandler.h"
#include "tmsclientsourcebodyimpl.h"
@@ -74,21 +75,6 @@
return ret;
}
-/**
- * Remove a stream observer from this stream.
- *
- * This function can be called at any time. It is recommended to remove
- * observer after calling Deinit() on stream. Else observer may receive
- * a callback that is alread dispatched.
- *
- * @param obsrvr
- * The listener to remove.
- *
- * @return
- * TMS_RESULT_SUCCESS if the obsrvr is removed successfully from list.
- * TMS_RESULT_DOES_NOT_EXIST if obsrvr is not already in the list.
- *
- */
gint TMSClientSourceBodyImpl::RemoveObserver(TMSClientSourceObserver& obsrvr)
{
gint ret(TMS_RESULT_SUCCESS);
@@ -111,8 +97,8 @@
{
// TODO send stream attributes here
gint ret(TMS_RESULT_SUCCESS);
- ret = iProxy->BufferFilled(TMS_CALL_IP, TMS_STREAM_DOWNLINK, iStreamId,
- buffer);
+ ret = iProxy->BufferFilled(iContext->CallType, iContext->StreamType,
+ iContext->StreamId, buffer);
return ret;
}
@@ -154,13 +140,16 @@
return ret;
}
-void TMSClientSourceBodyImpl::SetProxy(TMSCallProxy* aProxy, gint strmid,
+void TMSClientSourceBodyImpl::SetProxy(TMSGlobalContext* context,
gpointer queuehandler)
{
- iProxy = aProxy;
- iStreamId = strmid;
- static_cast<TMSQueueHandler*>(queuehandler)->AddObserver(*this,
- TMS_SOURCE_CLIENT);
+ iProxy = context->CallProxy;
+ iContext = context;
+ if (queuehandler)
+ {
+ static_cast<TMSQueueHandler*>(queuehandler)->AddObserver(*this,
+ TMS_SOURCE_CLIENT);
+ }
}
void TMSClientSourceBodyImpl::QueueEvent(TInt aEventType, TInt aError,
--- a/mmserv/tms/tmsimpl/src/tmsclientsourceimpl.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsclientsourceimpl.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -68,12 +68,12 @@
return ret;
}
-gint TMSClientSourceImpl::SetProxy(TMSCallProxy* aProxy, gint strmid,
+gint TMSClientSourceImpl::SetProxy(TMSGlobalContext* context,
gpointer queuehandler)
{
gint ret = TMS_RESULT_SUCCESS;
- static_cast<TMSClientSourceBodyImpl*>(this->iBody)->SetProxy(aProxy,
- strmid, queuehandler);
+ static_cast<TMSClientSourceBodyImpl*>(this->iBody)->SetProxy(context,
+ queuehandler);
return ret;
}
--- a/mmserv/tms/tmsimpl/src/tmsqueuehandler.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsqueuehandler.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -316,10 +316,8 @@
err = TMS_RESULT_DOES_NOT_EXIST;
}
}
- else
- {
- // TODO handle error here
- }
+
+ // TODO: handle error here
}
// -----------------------------------------------------------------------------
@@ -376,10 +374,8 @@
err = TMS_RESULT_DOES_NOT_EXIST;
}
}
- else
- {
- //iObserver->Event(MVoIPUplinkObserver::KUplinkError, aStatus);
- }
+ //TODO: Handle error here
+ //iObserver->Event(MVoIPUplinkObserver::KUplinkError, aStatus);
}
// -----------------------------------------------------------------------------
--- a/mmserv/tms/tmsimpl/src/tmsstreambodyimpl.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsstreambodyimpl.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -334,7 +334,7 @@
return iContext.StreamId;
}
-gint TMSStreamBodyImpl::Init()
+gint TMSStreamBodyImpl::Init(gint retrytime)
{
gint ret(TMS_RESULT_SUCCESS);
@@ -355,7 +355,8 @@
if (iContext.CallProxy)
{
ret = (iContext.CallProxy)->InitStream(iContext.CallType,
- iContext.StreamType, iContext.StreamId, fmttype, &iMsgQueue);
+ iContext.StreamType, iContext.StreamId, fmttype, &iMsgQueue,
+ retrytime);
}
else
{
@@ -373,7 +374,7 @@
switch (effecttype)
{
case TMS_EFFECT_GAIN:
- static_cast<TMSGainEffectImpl*>(iEffectsList[i])->SetProxy(
+ static_cast<TMSGainEffectImpl*> (iEffectsList[i])->SetProxy(
iContext.CallProxy, iMsgQHandler);
break;
case TMS_EFFECT_VOLUME:
@@ -395,23 +396,23 @@
switch (fmttype)
{
case TMS_FORMAT_PCM:
- static_cast<TMSPCMFormatImpl*>(iFormat)->SetProxy(&iContext,
+ static_cast<TMSPCMFormatImpl*> (iFormat)->SetProxy(&iContext,
iMsgQHandler);
break;
case TMS_FORMAT_AMR:
- static_cast<TMSAMRFormatImpl*>(iFormat)->SetProxy(&iContext,
+ static_cast<TMSAMRFormatImpl*> (iFormat)->SetProxy(&iContext,
iMsgQHandler);
break;
case TMS_FORMAT_G711:
- static_cast<TMSG711FormatImpl*>(iFormat)->SetProxy(&iContext,
+ static_cast<TMSG711FormatImpl*> (iFormat)->SetProxy(&iContext,
iMsgQHandler);
break;
case TMS_FORMAT_G729:
- static_cast<TMSG729FormatImpl*>(iFormat)->SetProxy(&iContext,
+ static_cast<TMSG729FormatImpl*> (iFormat)->SetProxy(&iContext,
iMsgQHandler);
break;
case TMS_FORMAT_ILBC:
- static_cast<TMSILBCFormatImpl*>(iFormat)->SetProxy(&iContext,
+ static_cast<TMSILBCFormatImpl*> (iFormat)->SetProxy(&iContext,
iMsgQHandler);
break;
default:
@@ -429,8 +430,8 @@
switch (sinkType)
{
case TMS_SINK_CLIENT:
- static_cast<TMSClientSinkImpl*>(iSink)->SetProxy(
- iContext.CallProxy, iMsgQHandler);
+ static_cast<TMSClientSinkImpl*> (iSink)->SetProxy(&iContext,
+ iMsgQHandler);
break;
case TMS_SINK_MODEM:
case TMS_SINK_SPEAKER:
@@ -454,9 +455,8 @@
switch (sourceType)
{
case TMS_SOURCE_CLIENT:
- static_cast<TMSClientSourceImpl*>(iSource)->SetProxy(
- iContext.CallProxy, iContext.StreamId,
- iMsgQHandler);
+ static_cast<TMSClientSourceImpl*> (iSource)->SetProxy(
+ &iContext, iMsgQHandler);
break;
case TMS_SOURCE_MODEM:
case TMS_SOURCE_MIC:
@@ -490,13 +490,13 @@
return ret;
}
-gint TMSStreamBodyImpl::Start()
+gint TMSStreamBodyImpl::Start(gint retrytime)
{
gint ret(TMS_RESULT_SUCCESS);
if (iContext.CallProxy)
{
ret = (iContext.CallProxy)->StartStream(iContext.CallType,
- iContext.StreamType, iContext.StreamId);
+ iContext.StreamType, iContext.StreamId, retrytime);
}
else
{
@@ -734,7 +734,14 @@
event.prev_state = iPrevState;
if (iObserver)
{
- event.type = TMS_EVENT_STREAM_STATE_CHANGED;
+ if (aError != TMS_RESULT_SUCCESS)
+ {
+ event.type = TMS_EVENT_STREAM_STATE_CHANGE_ERROR;
+ }
+ else
+ {
+ event.type = TMS_EVENT_STREAM_STATE_CHANGED;
+ }
iObserver->TMSStreamEvent(*iParent, event);
}
break;
--- a/mmserv/tms/tmsserver/group/tmsserver.mmp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmsserver/group/tmsserver.mmp Wed Jun 23 18:47:10 2010 +0300
@@ -44,7 +44,6 @@
SOURCE tmsrtcontainer.cpp
SOURCE tmsrtaudiohdlr.cpp
SOURCE tmsrtplayer.cpp
-SOURCE tmstimer.cpp
SOURCE tmsasyncreqao.cpp
USERINCLUDE ../inc
@@ -67,6 +66,7 @@
LIBRARY libglib.lib
LIBRARY mmfdevsound.lib
LIBRARY tmscallserver.lib
+LIBRARY tmsutility.lib
LIBRARY centralrepository.lib
LIBRARY cenrepnotifhandler.lib
LIBRARY profileengine.lib
--- a/mmserv/tms/tmsserver/inc/tmsrtplayer.h Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmsserver/inc/tmsrtplayer.h Wed Jun 23 18:47:10 2010 +0300
@@ -47,7 +47,7 @@
*/
class TMSRingTonePlayer : public CBase,
public TMSRtAudioHdlrObsrv,
- public TMSTimerObsrv,
+ public TMSTimerObserver,
public TMSAsyncReqObsrv
{
public:
@@ -226,9 +226,9 @@
TInt aPlayer);
/**
- * @see TMSTimerObsrv
+ * From TMSTimerObserver
*/
- virtual void HandleTimeOutL();
+ virtual void TimerEvent();
/**
* Enumerates how many times TTS has played
--- a/mmserv/tms/tmsserver/inc/tmstimer.h Thu May 27 13:20:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:
- * Utility class for CTimer object
- *
- */
-
-#ifndef TMSTIMER_H
-#define TMSTIMER_H
-
-// INCLUDES
-#include <e32base.h>
-
-namespace TMS {
-
-/**
-* Mixin class for phone timer
-*/
-class TMSTimerObsrv
- {
-
- public: // New functions
-
- /**
- * Destructor
- */
- virtual ~TMSTimerObsrv(){};
-
- /**
- * This function is called after on timeout
- */
- virtual void HandleTimeOutL() = 0;
- };
-
-// CLASS DECLARATION
-
-/**
- * Utility class for timer
- */
-class TMSTimer : public CTimer
- {
-public:
- // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- IMPORT_C static TMSTimer* NewL(
- TInt aPriority = CActive::EPriorityStandard);
-
- /**
- * Destructor.
- */
- IMPORT_C virtual ~TMSTimer();
-
-public:
- // New functions
-
- /**
- * The Callback function is called after the interval
- * All former request will be canceled first
- */
- IMPORT_C void After(TTimeIntervalMicroSeconds32 anInterval,
- TCallBack aCallBack);
-
- /**
- * Use the maxin class to notify the timer
- * All former request will be canceled first
- */
- IMPORT_C void After(TTimeIntervalMicroSeconds32 anInterval,
- TMSTimerObsrv* aObserver);
-
- /**
- * Cancel the timer if needed
- */
- IMPORT_C void CancelTimer();
-
-protected:
- // Functions from base classes
-
- /**
- * From CTimer::RunL()
- */
- virtual void RunL();
-
- /**
- * From CTimer::RunL()
- */
- virtual TInt RunError(TInt aError);
-
- /**
- * From CTimer::DoCancel()
- */
- virtual void DoCancel();
-
-private:
-
- /**
- * C++ default constructor.
- */
- TMSTimer(TInt aPriority);
-
- /**
- * By default Symbian OS constructor is private.
- */
- void ConstructL();
-
- // By default, prohibit copy constructor
- TMSTimer(const TMSTimer&);
-
- // Prohibit assigment operator
- TMSTimer& operator = (const TMSTimer&);
-
-private:
- // Data
-
- // Used by After( anInterval, aCallBack )
- TCallBack iCallBack;
-
- // Used by After( anInterval, aObserver )
- TMSTimerObsrv* iTimerObserver;
- };
-
-} // namespace TMS
-
-#endif // TMSTIMER_H
-
-// End of File
--- a/mmserv/tms/tmsserver/src/tmsrtplayer.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmsserver/src/tmsrtplayer.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -594,18 +594,18 @@
if (!iAudioPlayer)
{
CreateAudioPlayerL();
- if (!iTimer->IsActive())
+ if (!iTimer->IsRunning())
{
// If InitComplete event doesn't occur within permittable time,
// this will trigger fallback routine.
- iTimer->After(KTMSMaxRingingWaiting, this);
+ iTimer->NotifyAfter(KTMSMaxRingingWaiting, *this);
}
}
// Start playing.
if (!iAudioPlayer)
{
- iTimer->Cancel();
+ iTimer->CancelNotify();
PlayDefaultToneL();
}
else
@@ -739,9 +739,9 @@
iTtsDelaysCount = KTMSTtsDelaysCount;
// Start TTS timer just before RT
- if (!iTtsDelayTimer->IsActive())
+ if (!iTtsDelayTimer->IsRunning())
{
- iTtsDelayTimer->After(KTMSTtsDelays[iTtsDelayIndex],
+ iTtsDelayTimer->NotifyAfter(KTMSTtsDelays[iTtsDelayIndex],
TCallBack(HandleTtsDelayTimeout, this));
}
iTtsVolume = iRtParam.iVolume;
@@ -771,7 +771,7 @@
iTonePlayingStatus = EBackupTonePlaying;
iTtsToneToBePlayed = EFalse;
iTTsTimeOutCounter = 0;
- iTtsDelayTimer->Cancel();
+ iTtsDelayTimer->CancelNotify();
if (iTtsPlayer)
{
iTtsPlayer->StopPlaying();
@@ -809,11 +809,11 @@
if (!iDefaultPlayer)
{
CreateDefaultRtPlayerL();
- if (!iTimer->IsActive())
+ if (!iTimer->IsRunning())
{
// If InitComplete event doesn't occur within permittable time,
// this will trigger fallback routine.
- iTimer->After(KTMSMaxRingingWaiting, this);
+ iTimer->NotifyAfter(KTMSMaxRingingWaiting, *this);
}
}
@@ -821,7 +821,7 @@
if (!iDefaultPlayer)
{
// Default player not ready, play backup.
- iTimer->Cancel();
+ iTimer->CancelNotify();
PlayBackupToneL();
}
else
@@ -844,14 +844,14 @@
iTtsToneToBePlayed = EFalse;
iTTsTimeOutCounter = 0;
- iTtsDelayTimer->Cancel();
+ iTtsDelayTimer->CancelNotify();
if (iTtsPlayer)
{
iTtsPlayer->StopPlaying();
delete iTtsPlayer;
iTtsPlayer = NULL;
}
- iTimer->Cancel();
+ iTimer->CancelNotify();
switch (iTonePlayingStatus)
{
@@ -1240,7 +1240,7 @@
if (ignore) ;
}
- iTimer->Cancel();
+ iTimer->CancelNotify();
DoHandlePlayerError(!deleteAll, EFalse);
iRtObserver.RtPlayerEvent(aEvent, aError);
}
@@ -1256,7 +1256,7 @@
(iTonePlayingStatus == EDefaultTonePlaying &&
aPlayer == EPlayerDefault))
{
- iTimer->Cancel();
+ iTimer->CancelNotify();
}
else
{
@@ -1302,10 +1302,10 @@
// Need to restart TTS sequence TTS has completed its iterations,
// set index to zero.
iTtsDelayIndex = 0;
- if (!iTtsDelayTimer->IsActive())
+ if (!iTtsDelayTimer->IsRunning())
{
// Restart TTS sequence
- iTtsDelayTimer->After(KTMSTtsDelays[iTtsDelayIndex],
+ iTtsDelayTimer->NotifyAfter(KTMSTtsDelays[iTtsDelayIndex],
TCallBack(HandleTtsDelayTimeout, this));
}
}
@@ -1332,10 +1332,10 @@
// Caller name is said once. Increase tone player volume.
SolveNewVolumeAndRamptime(ESaidOnce);
- if (!iTtsDelayTimer->IsActive())
+ if (!iTtsDelayTimer->IsRunning())
{
// There are more TTS iterations to be played.
- iTtsDelayTimer->After(KTMSTtsDelays[iTtsDelayIndex],
+ iTtsDelayTimer->NotifyAfter(KTMSTtsDelays[iTtsDelayIndex],
TCallBack(HandleTtsDelayTimeout, this));
}
}
@@ -1347,10 +1347,10 @@
}
// -----------------------------------------------------------------------------
-// TMSRingTonePlayer::HandleTimeOutL
+// TMSRingTonePlayer::TimerEvent
// -----------------------------------------------------------------------------
//
-void TMSRingTonePlayer::HandleTimeOutL()
+void TMSRingTonePlayer::TimerEvent()
{
DoHandlePlayerError(ETrue, ETrue);
}
--- a/mmserv/tms/tmsserver/src/tmstimer.cpp Thu May 27 13:20:50 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description:
- *
- */
-
-// INCLUDE FILES
-#include "tmstimer.h"
-
-using namespace TMS;
-
-// ---------------------------------------------------------
-// TMSTimer::TMSTimer
-// ---------------------------------------------------------
-//
-TMSTimer::TMSTimer(TInt aPriority) :
- CTimer(aPriority)
- {
- CActiveScheduler::Add(this);
- }
-
-// ---------------------------------------------------------
-// TMSTimer::ConstructL
-// ---------------------------------------------------------
-//
-void TMSTimer::ConstructL()
- {
- CTimer::ConstructL();
- }
-
-// ---------------------------------------------------------
-// TMSTimer::NewL
-// ---------------------------------------------------------
-//
-EXPORT_C TMSTimer* TMSTimer::NewL(TInt aPriority)
- {
- TMSTimer* self = new (ELeave) TMSTimer(aPriority);
-
- CleanupStack::PushL(self);
- self->ConstructL();
- CleanupStack::Pop(self);
-
- return self;
- }
-
-// ---------------------------------------------------------
-// TMSTimer::~TMSTimer
-// ---------------------------------------------------------
-//
-EXPORT_C TMSTimer::~TMSTimer()
- {
- Cancel();
- }
-
-// ---------------------------------------------------------
-// TMSTimer::RunL()
-// ---------------------------------------------------------
-//
-void TMSTimer::RunL()
- {
- if (iStatus != KErrNone)
- {
- //error code is ignored, as CPeriodic.
- return;
- }
-
- if (!iTimerObserver)
- {
- //"TMSTimer::RunL CallBack" );
- iCallBack.CallBack();
- }
- else
- {
- //"TMSTimer::RunL HandleTimeOutL" );
- iTimerObserver->HandleTimeOutL();
- }
- }
-
-// ---------------------------------------------------------
-// TMSTimer::RunL()
-// ---------------------------------------------------------
-//
-TInt TMSTimer::RunError(TInt aError)
- {
- //TODO: process error if HandleTimeOutL() in RunL leaves
- return aError;
- }
-
-// ---------------------------------------------------------
-// TMSTimer::After()
-// ---------------------------------------------------------
-//
-EXPORT_C void TMSTimer::After(TTimeIntervalMicroSeconds32 anInterval,
- TCallBack aCallBack)
- {
- if (IsActive())
- {
- Cancel();
- }
- iTimerObserver = NULL;
- iCallBack = aCallBack;
- CTimer::After(anInterval);
- }
-
-// ---------------------------------------------------------
-// TMSTimer::After()
-// ---------------------------------------------------------
-//
-
-EXPORT_C void TMSTimer::After(TTimeIntervalMicroSeconds32 anInterval,
- TMSTimerObsrv* aObserver)
- {
- //__ASSERT_DEBUG( aObserver, Panic( EPhoneUtilsParameterNotInitialized ) );
-
- if (IsActive())
- {
- Cancel();
- }
- iTimerObserver = aObserver;
- CTimer::After(anInterval);
- }
-
-// ---------------------------------------------------------
-// TMSTimer::CancelTimer
-// ---------------------------------------------------------
-//
-EXPORT_C void TMSTimer::CancelTimer()
- {
- Cancel();
- }
-
-// ---------------------------------------------------------
-// TMSTimer::DoCancel
-// ---------------------------------------------------------
-//
-void TMSTimer::DoCancel()
- {
- iTimerObserver = NULL;
- CTimer::DoCancel();
- }
-
-// End of File
--- a/mmserv/tms/tmsutility/bwins/tmsutility.def Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmsutility/bwins/tmsutility.def Wed Jun 23 18:47:10 2010 +0300
@@ -1,8 +1,14 @@
EXPORTS
- ?FourCCToTMSFormat@TMSUtility@TMS@@SAHK@Z @ 1 NONAME ; int TMS::TMSUtility::FourCCToTMSFormat(unsigned long)
- ?ToTAROutput@TMSUtility@TMS@@SA?AW4TAudioOutput@CTelephonyAudioRouting@@H@Z @ 2 NONAME ; enum CTelephonyAudioRouting::TAudioOutput TMS::TMSUtility::ToTAROutput(int)
- ?ToFourCC@TMSUtility@TMS@@SAKH@Z @ 3 NONAME ; unsigned long TMS::TMSUtility::ToFourCC(int)
- ?EtelToTMSResult@TMSUtility@TMS@@SAHH@Z @ 4 NONAME ; int TMS::TMSUtility::EtelToTMSResult(int)
- ?ToTMSOutput@TMSUtility@TMS@@SAHW4TAudioOutput@CTelephonyAudioRouting@@@Z @ 5 NONAME ; int TMS::TMSUtility::ToTMSOutput(enum CTelephonyAudioRouting::TAudioOutput)
- ?TMSResult@TMSUtility@TMS@@SAHH@Z @ 6 NONAME ; int TMS::TMSUtility::TMSResult(int)
+ ?NewL@TMSTimer@TMS@@SAPAV12@H@Z @ 1 NONAME ; class TMS::TMSTimer * TMS::TMSTimer::NewL(int)
+ ?EtelToTMSResult@TMSUtility@TMS@@SAHH@Z @ 2 NONAME ; int TMS::TMSUtility::EtelToTMSResult(int)
+ ?ToTMSOutput@TMSUtility@TMS@@SAHW4TAudioOutput@CTelephonyAudioRouting@@@Z @ 3 NONAME ; int TMS::TMSUtility::ToTMSOutput(enum CTelephonyAudioRouting::TAudioOutput)
+ ?IsRunning@TMSTimer@TMS@@QAEHXZ @ 4 NONAME ; int TMS::TMSTimer::IsRunning(void)
+ ?TMSResult@TMSUtility@TMS@@SAHH@Z @ 5 NONAME ; int TMS::TMSUtility::TMSResult(int)
+ ?CancelNotify@TMSTimer@TMS@@QAEXXZ @ 6 NONAME ; void TMS::TMSTimer::CancelNotify(void)
+ ?FourCCToTMSFormat@TMSUtility@TMS@@SAHK@Z @ 7 NONAME ; int TMS::TMSUtility::FourCCToTMSFormat(unsigned long)
+ ?NotifyAfter@TMSTimer@TMS@@QAEXHAAVTMSTimerObserver@2@@Z @ 8 NONAME ; void TMS::TMSTimer::NotifyAfter(int, class TMS::TMSTimerObserver &)
+ ?ToTAROutput@TMSUtility@TMS@@SA?AW4TAudioOutput@CTelephonyAudioRouting@@H@Z @ 9 NONAME ; enum CTelephonyAudioRouting::TAudioOutput TMS::TMSUtility::ToTAROutput(int)
+ ?ToFourCC@TMSUtility@TMS@@SAKH@Z @ 10 NONAME ; unsigned long TMS::TMSUtility::ToFourCC(int)
+ ??1TMSTimer@TMS@@UAE@XZ @ 11 NONAME ; TMS::TMSTimer::~TMSTimer(void)
+ ?NotifyAfter@TMSTimer@TMS@@QAEXHVTCallBack@@@Z @ 12 NONAME ; void TMS::TMSTimer::NotifyAfter(int, class TCallBack)
--- a/mmserv/tms/tmsutility/eabi/tmsutility.def Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmsutility/eabi/tmsutility.def Wed Jun 23 18:47:10 2010 +0300
@@ -5,4 +5,14 @@
_ZN3TMS10TMSUtility17FourCCToTMSFormatEm @ 4 NONAME
_ZN3TMS10TMSUtility8ToFourCCEi @ 5 NONAME
_ZN3TMS10TMSUtility9TMSResultEi @ 6 NONAME
+ _ZN3TMS8TMSTimer11NotifyAfterEi9TCallBack @ 7 NONAME
+ _ZN3TMS8TMSTimer11NotifyAfterEiRNS_16TMSTimerObserverE @ 8 NONAME
+ _ZN3TMS8TMSTimer12CancelNotifyEv @ 9 NONAME
+ _ZN3TMS8TMSTimer4NewLEi @ 10 NONAME
+ _ZN3TMS8TMSTimer9IsRunningEv @ 11 NONAME
+ _ZN3TMS8TMSTimerD0Ev @ 12 NONAME
+ _ZN3TMS8TMSTimerD1Ev @ 13 NONAME
+ _ZN3TMS8TMSTimerD2Ev @ 14 NONAME
+ _ZTIN3TMS8TMSTimerE @ 15 NONAME
+ _ZTVN3TMS8TMSTimerE @ 16 NONAME
--- a/mmserv/tms/tmsutility/group/tmsutility.mmp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/tms/tmsutility/group/tmsutility.mmp Wed Jun 23 18:47:10 2010 +0300
@@ -38,7 +38,9 @@
SOURCEPATH ../src
SOURCE tmsutility.cpp
+SOURCE tmstimer.cpp
+LIBRARY euser.lib
LIBRARY libc.lib
LIBRARY libglib.lib
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/tms/tmsutility/src/tmstimer.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Telephony Multimedia Service
+ *
+ */
+
+// INCLUDE FILES
+#include "tmstimer.h"
+
+using namespace TMS;
+
+// -----------------------------------------------------------------------------
+// Constructor
+// -----------------------------------------------------------------------------
+//
+TMSTimer::TMSTimer(gint aPriority) :
+ CTimer(aPriority)
+ {
+ CActiveScheduler::Add(this);
+ }
+
+// -----------------------------------------------------------------------------
+// TMSTimer::ConstructL
+// -----------------------------------------------------------------------------
+//
+void TMSTimer::ConstructL()
+ {
+ CTimer::ConstructL();
+ }
+
+// -----------------------------------------------------------------------------
+// TMSTimer::NewL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TMSTimer* TMSTimer::NewL(gint aPriority)
+ {
+ TMSTimer* self = new (ELeave) TMSTimer(aPriority);
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ CleanupStack::Pop(self);
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
+// TMSTimer::~TMSTimer
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TMSTimer::~TMSTimer()
+ {
+ Cancel();
+ }
+
+// -----------------------------------------------------------------------------
+// TMSTimer::NotifyAfter
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void TMSTimer::NotifyAfter(gint timeout, TCallBack callback)
+ {
+ if (IsActive())
+ {
+ Cancel();
+ }
+ iObserver = NULL;
+ iCallBack = callback;
+ CTimer::After(TTimeIntervalMicroSeconds32(timeout));
+ }
+
+// -----------------------------------------------------------------------------
+// TMSTimer::NotifyAfter
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void TMSTimer::NotifyAfter(gint timeout, TMSTimerObserver& observer)
+ {
+ if (IsActive())
+ {
+ Cancel();
+ }
+ iObserver = &observer;
+ CTimer::After(TTimeIntervalMicroSeconds32(timeout));
+ }
+
+// -----------------------------------------------------------------------------
+// TMSTimer::CancelNotify
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void TMSTimer::CancelNotify()
+ {
+ Cancel();
+ }
+
+// -----------------------------------------------------------------------------
+// TMSTimer::IsRunning
+// -----------------------------------------------------------------------------
+//
+EXPORT_C gboolean TMSTimer::IsRunning()
+ {
+ return IsActive();
+ }
+
+// -----------------------------------------------------------------------------
+// TMSTimer::RunL()
+// -----------------------------------------------------------------------------
+//
+void TMSTimer::RunL()
+ {
+ // Currently RunL doesn't leave.
+ if (iObserver)
+ {
+ iObserver->TimerEvent();
+ }
+ else
+ {
+ iCallBack.CallBack();
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// TMSTimer::RunError()
+// -----------------------------------------------------------------------------
+//
+TInt TMSTimer::RunError(TInt aError)
+ {
+ return aError;
+ }
+
+// -----------------------------------------------------------------------------
+// TMSTimer::DoCancel
+// -----------------------------------------------------------------------------
+//
+void TMSTimer::DoCancel()
+ {
+ iObserver = NULL;
+ CTimer::DoCancel();
+ }
+
+// End of File
--- a/mmserv/voipaudioservices/VoIPServer/group/VoIPAudioServer.mmp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/voipaudioservices/VoIPServer/group/VoIPAudioServer.mmp Wed Jun 23 18:47:10 2010 +0300
@@ -25,6 +25,7 @@
EPOCHEAPSIZE 0x20000 0x1000000 // Min 128kb, max 16Mb
CAPABILITY MultiMediaDD ReadDeviceData WriteDeviceData UserEnvironment ReadUserData WriteUserData
VENDORID VID_DEFAULT
+EPOCPROCESSPRIORITY high
SOURCEPATH ../src
--- a/mmserv/voipaudioservices/VoIPServer/src/VoIPServerSession.cpp Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/voipaudioservices/VoIPServer/src/VoIPServerSession.cpp Wed Jun 23 18:47:10 2010 +0300
@@ -1907,14 +1907,12 @@
if (aError == KErrNone)
{
TMMFPrioritySettings pSet;
- iShared.iMutex.Wait();
- pSet.iPref = iShared.iPreference;
- pSet.iPriority = iShared.iPriority;
- iShared.iMutex.Signal();
if (iDTMFTonePlayer && iDTMFTonePlayerInitRequest)
{
// initialized DTMF player
+ pSet.iPref = KAudioDTMFString;
+ pSet.iPriority = KAudioPriorityDTMFString;
iDTMFTonePlayer->SetPrioritySettings(pSet);
iDTMFTonePlayer->SetVolume(iMaxVolume);
iToneLenOn = KDTMFToneLengthOn;
@@ -1934,6 +1932,10 @@
else if (iDevSound && iDevSoundInitRequest)
{
// initialized standard player to check G711 frame rate
+ iShared.iMutex.Wait();
+ pSet.iPref = iShared.iPreference;
+ pSet.iPriority = iShared.iPriority;
+ iShared.iMutex.Signal();
iDevSound->SetPrioritySettings(pSet);
iDevSoundInitRequest = EFalse;
--- a/mmserv/voipaudioservices/group/bld.inf Thu May 27 13:20:50 2010 +0300
+++ b/mmserv/voipaudioservices/group/bld.inf Wed Jun 23 18:47:10 2010 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
--- a/tsrc/group/bld.inf Thu May 27 13:20:50 2010 +0300
+++ b/tsrc/group/bld.inf Wed Jun 23 18:47:10 2010 +0300
@@ -34,6 +34,9 @@
#include "../../mmmw_plat/radio_utilities_api/tsrc/Group/bld.inf"
#include "../../mmmw_plat/thumbnail_engine_api/tsrc/group/bld.inf"
#include "../../mmmw_plat/telephony_multimedia_service_api/tsrc/Group/Bld.inf"
+#include "../../mmmw_plat/openmax_al_api/tsrc/openmaxaltestmodule/group/bld.inf"
+#include "../../mmmw_plat/system_tone_service_api/tsrc/group/bld.inf"
+
PRJ_MMPFILES