# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1283450281 -10800 # Node ID c2e43643db4c3a513385a130154ea8afbc7714bd # Parent 1fa3fb47b1e3b9067cfcd620252f898ac956be68 Revision: 201033 Kit: 201035 diff -r 1fa3fb47b1e3 -r c2e43643db4c khronosfws/openmax_al/group/openmaxal.mmp --- a/khronosfws/openmax_al/group/openmaxal.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/khronosfws/openmax_al/group/openmaxal.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -148,7 +148,7 @@ LIBRARY ws32.lib LIBRARY inetprotutil.lib LIBRARY mediaclientaudio.lib -LIBRARY MMFControllerFramework.lib +LIBRARY mmfcontrollerframework.lib LIBRARY mediaclientvideo.lib LIBRARY AudioInputRouting.lib LIBRARY Radio_Utility.lib diff -r 1fa3fb47b1e3 -r c2e43643db4c khronosfws/openmax_al/src/common/xanokialinearvolumeitf.c --- a/khronosfws/openmax_al/src/common/xanokialinearvolumeitf.c Wed Aug 18 10:17:22 2010 +0300 +++ b/khronosfws/openmax_al/src/common/xanokialinearvolumeitf.c Thu Sep 02 20:58:01 2010 +0300 @@ -294,15 +294,13 @@ DEBUG_API("->XANokiaLinearVolumeItfimpl_AdaptCb"); - if (!impl && !event) + 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) @@ -312,9 +310,5 @@ XA_NOKIALINEARVOLUME_EVENT_VOLUME_CHANGED, eventBoolean); } } - else - { - /* do nothing */ - } DEBUG_API("<-XANokiaLinearVolumeItfimpl_AdaptCb"); } diff -r 1fa3fb47b1e3 -r c2e43643db4c khronosfws/openmax_al/src/common/xastreaminformationitf.c --- a/khronosfws/openmax_al/src/common/xastreaminformationitf.c Wed Aug 18 10:17:22 2010 +0300 +++ b/khronosfws/openmax_al/src/common/xastreaminformationitf.c Thu Sep 02 20:58:01 2010 +0300 @@ -316,9 +316,9 @@ void XAStreamInformationItfImpl_Free(XAStreamInformationItfImpl* self) { DEBUG_API("->XAStreamInformationItfImpl_Free"); - assert(self==self->self); if(self) { + assert(self==self->self); free(self); } DEBUG_API("<-XAStreamInformationItfImpl_Free"); diff -r 1fa3fb47b1e3 -r c2e43643db4c khronosfws/openmax_al/src/engine/xaengineitf.c --- a/khronosfws/openmax_al/src/engine/xaengineitf.c Wed Aug 18 10:17:22 2010 +0300 +++ b/khronosfws/openmax_al/src/engine/xaengineitf.c Thu Sep 02 20:58:01 2010 +0300 @@ -47,8 +47,8 @@ const XAInterfaceID *pInterfaceIds, const XAboolean *pInterfaceRequired) { +#ifdef OMAX_CAMERABIN XAEngineItfImpl* impl = GetImpl(self); -#ifdef OMAX_CAMERABIN return XACameraDeviceImpl_CreateCameraDevice( impl->mapper,impl->capabilities, pDevice, deviceID,numInterfaces, pInterfaceIds, pInterfaceRequired ); @@ -423,9 +423,9 @@ void XAEngineItfImpl_Free(XAEngineItfImpl* self) { DEBUG_API("->XAEngineItfImpl_Free"); - assert(self==self->self); if(self) { + assert(self==self->self); free(self); } DEBUG_API("<-XAEngineItfImpl_Free"); diff -r 1fa3fb47b1e3 -r c2e43643db4c khronosfws/openmax_al/src/engine/xathreadsyncitf.c --- a/khronosfws/openmax_al/src/engine/xathreadsyncitf.c Wed Aug 18 10:17:22 2010 +0300 +++ b/khronosfws/openmax_al/src/engine/xathreadsyncitf.c Thu Sep 02 20:58:01 2010 +0300 @@ -128,9 +128,9 @@ void XAThreadSyncItfImpl_Free(XAThreadSyncItfImpl* self) { DEBUG_API("->XAThreadSyncItfImpl_Free"); - assert(self==self->self); if(self) { + assert(self==self->self); XAImpl_DeleteMutex(self->engCriticalSection); free(self); } diff -r 1fa3fb47b1e3 -r c2e43643db4c khronosfws/openmax_al/src/gst_adaptation/xamediarecorderadaptctx.c --- a/khronosfws/openmax_al/src/gst_adaptation/xamediarecorderadaptctx.c Wed Aug 18 10:17:22 2010 +0300 +++ b/khronosfws/openmax_al/src/gst_adaptation/xamediarecorderadaptctx.c Thu Sep 02 20:58:01 2010 +0300 @@ -39,11 +39,11 @@ */ gboolean XAMediaRecorderAdapt_GstBusCb(GstBus *bus, GstMessage *message, gpointer data) - { +{ XAAdaptationGstCtx* bCtx = (XAAdaptationGstCtx*) data; /* only listen to pipeline messages */ if (GST_MESSAGE_SRC(message)==GST_OBJECT(bCtx->bin)) - { + { XAMediaRecorderAdaptationCtx* mCtx = NULL; DEBUG_API_A2("->XAMediaRecorderAdapt_GstBusCb:\"%s\" from object \"%s\"", GST_MESSAGE_TYPE_NAME(message), GST_OBJECT_NAME(GST_MESSAGE_SRC(message))); @@ -57,7 +57,7 @@ if(mCtx->runpositiontimer > 0) { g_source_remove(mCtx->runpositiontimer); - mCtx->runpositiontimer=0; + mCtx->runpositiontimer = 0; } /* complete any ongoing client async operations */ @@ -158,24 +158,24 @@ */ XAAdaptationBaseCtx* XAMediaRecorderAdapt_Create(XADataSource* pAudioSrc, XADataSource* pImageVideoSrc, XADataSink* pDataSnk, XAuint8 recModes) - { +{ XAMediaRecorderAdaptationCtx *pSelf = NULL; DEBUG_API("->XAMediaRecorderAdapt_Create"); pSelf = (XAMediaRecorderAdaptationCtx*)calloc(1, sizeof(XAMediaRecorderAdaptationCtx)); if (pSelf) - { + { if (XAAdaptationGst_Init(&(pSelf->baseObj), XAMediaRecorderAdaptation) != XA_RESULT_SUCCESS) - { + { DEBUG_ERR("Failed to init base context!!!"); free(pSelf); pSelf = NULL; DEBUG_API("<-XAMediaRecorderAdapt_Create"); return NULL; - } + } else - { + { pSelf->baseObj.baseObj.fwtype = FWMgrFWGST; pSelf->xaAudioSource = pAudioSrc; pSelf->xaVideoSource = pImageVideoSrc; @@ -211,12 +211,12 @@ pSelf->audioEncSettings.streamFormat = 0; pSelf->audioEncSettings.encodeOptions = 0; pSelf->audioEncSettings.blockAlignment = 0; - } } + } DEBUG_API("<-XAMediaRecorderAdapt_Create"); return (XAAdaptationBaseCtx*) &pSelf->baseObj; - } +} /* * XAresult XAMediaRecorderAdapt_PostInit() @@ -225,26 +225,26 @@ * @return XAresult - Success value */ XAresult XAMediaRecorderAdapt_PostInit(XAAdaptationGstCtx* bCtx) - { +{ GstStateChangeReturn gret; XAresult ret = XA_RESULT_SUCCESS; XAMediaRecorderAdaptationCtx* ctx = NULL; DEBUG_API("->XAMediaRecorderAdapt_PostInit"); if (bCtx == NULL || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation) - { + { DEBUG_ERR("Invalid parameter!!"); DEBUG_API("<-XAMediaRecorderAdapt_PostInit"); return XA_RESULT_PARAMETER_INVALID; - } + } ctx = (XAMediaRecorderAdaptationCtx*) bCtx; ret = XAAdaptationGst_PostInit(bCtx); if (ret != XA_RESULT_SUCCESS) - { + { DEBUG_ERR("Gst context postinit failed!!"); return ret; - } + } /* top level bin for media recorder */ bCtx->bin = gst_pipeline_new("media_recorder"); @@ -252,13 +252,13 @@ /* Create Gst bus listener. */ ret = XAAdaptationGst_InitGstListener(bCtx); if (ret != XA_RESULT_SUCCESS) - { + { DEBUG_ERR("Bus listener creation failed!!"); return ret; - } + } /* Add Media Recorder specific handler */ if (bCtx->bus) - { + { bCtx->busCb = XAMediaRecorderAdapt_GstBusCb; gst_bus_add_signal_watch(bCtx->bus); g_signal_connect(bCtx->bus, "message::eos", G_CALLBACK(bCtx->busCb), ctx ); @@ -267,22 +267,22 @@ g_signal_connect(bCtx->bus, "message::state-changed", G_CALLBACK(bCtx->busCb), ctx ); g_signal_connect(bCtx->bus, "message::segment-done", G_CALLBACK(bCtx->busCb), ctx ); g_signal_connect(bCtx->bus, "message::async-done", G_CALLBACK(bCtx->busCb), ctx ); - } + } else - { + { DEBUG_ERR("Failed to create message bus"); return XA_RESULT_INTERNAL_ERROR; - } + } XAMetadataAdapt_PreInit(bCtx); /* create pipeline */ ret = XAMediaRecorderAdapt_CreatePipeline(ctx); if (ret != XA_RESULT_SUCCESS) - { + { DEBUG_ERR("Failed to create recorder pipeline"); return XA_RESULT_INTERNAL_ERROR; - } + } #ifdef XA_IMPL_MEASURE_GST_DELAY bCtx->startTime = clock(); @@ -292,15 +292,15 @@ XAAdaptationGst_PrepareAsyncWait(bCtx); gret = gst_element_set_state(GST_ELEMENT(bCtx->bin), bCtx->binWantedState); if (gret == GST_STATE_CHANGE_ASYNC) - { + { DEBUG_INFO("Wait for preroll"); XAAdaptationGst_StartAsyncWait(bCtx);DEBUG_INFO("Preroll ready"); - } + } else if (gret == GST_STATE_CHANGE_FAILURE) - { + { DEBUG_ERR("Preroll FAILED"); /*ret = XA_RESULT_INTERNAL_ERROR;*/ - } + } #ifdef XA_IMPL_MEASURE_GST_DELAY bCtx->endTime = clock(); double diff = bCtx->endTime - bCtx->startTime; @@ -313,7 +313,7 @@ DEBUG_API("<-XAMediaRecorderAdapt_PostInit"); return ret; - } +} /* * void XAMediaRecorderAdapt_Destroy( XAAdaptationGstCtx* bCtx ) @@ -321,160 +321,153 @@ * @param ctx - Media Recorder Adaptation context to be destroyed */ void XAMediaRecorderAdapt_Destroy(XAAdaptationGstCtx* bCtx) - { +{ XAMediaRecorderAdaptationCtx* ctx = NULL; char* fname = NULL; DEBUG_API("->XAMediaRecorderAdapt_Destroy"); if (bCtx == NULL || bCtx->baseObj.ctxId != XAMediaRecorderAdaptation) - { + { DEBUG_ERR("Invalid parameter!!"); DEBUG_API("<-XAMediaRecorderAdapt_Destroy"); return; - } + } ctx = (XAMediaRecorderAdaptationCtx*) bCtx; if (ctx->isRecord == XA_BOOLEAN_FALSE) - { + { DEBUG_INFO("Removing unnecessary file."); - - if (ctx->xaSink && *((XAuint32*) (ctx->xaSink->pLocator)) - == XA_DATALOCATOR_URI) + if (ctx->xaSink && *((XAuint32*) (ctx->xaSink->pLocator)) == XA_DATALOCATOR_URI) + { + if (strncmp( (char *)((XADataLocator_URI*)(ctx->xaSink->pLocator))->URI, "file:///", 8) == 0) { - if (strncmp( - (char *) ((XADataLocator_URI*) (ctx->xaSink->pLocator))->URI, - "file:///", 8) == 0) - { - fname - = (char *) &(((XADataLocator_URI*) (ctx->xaSink->pLocator))->URI[8]); - } + fname = (char *) &(((XADataLocator_URI*) (ctx->xaSink->pLocator))->URI[8]); + } else - { - fname - = (char *) ((XADataLocator_URI*) (ctx->xaSink->pLocator))->URI; - } - + { + fname = (char *) ((XADataLocator_URI*) (ctx->xaSink->pLocator))->URI; + } if (remove(fname) != 0) - { + { DEBUG_ERR_A1("Cannot remove file %s", fname); - } } } + } if (ctx->isobjvsrc && ctx->videosource) - { /* external source, unlink now */ + { /* external source, unlink now */ gst_element_unlink(ctx->videosource, ctx->codecbin); GST_OBJECT_FLAG_SET(GST_OBJECT(ctx->videosource),GST_OBJECT_FLOATING); - } + } if (bCtx->bus) - { + { gst_bus_remove_signal_watch(bCtx->bus); - } + } XAAdaptationGst_CancelAsyncWait(bCtx); if (ctx->runpositiontimer) - { + { g_source_remove(ctx->runpositiontimer); - } - + } + XAAdaptationGst_Free(bCtx); free(ctx); ctx = NULL; DEBUG_API("<-XAMediaRecorderAdapt_Destroy"); - } +} /***************** INTERNAL FUNCTIONS *******************************/ - /* - * void XAMediaRecorderAdapt_CreatePipeline( XAMediaRecorderAdaptationCtx* ctx ); - */ +/* + * void XAMediaRecorderAdapt_CreatePipeline( XAMediaRecorderAdaptationCtx* ctx ); + */ XAresult XAMediaRecorderAdapt_CreatePipeline( XAMediaRecorderAdaptationCtx* ctx) - { +{ XAresult ret = XA_RESULT_SUCCESS; DEBUG_API("->XAMediaRecorderAdapt_CreatePipeline"); /* Create the audio src */ if ( ctx->xaAudioSource ) - { + { /* create audio pipe source */ ctx->audiosource = XAAdaptationGst_CreateGstSource( ctx->xaAudioSource, "audiosource", &(ctx->isobjasrc), NULL, NULL ); - + if( ctx->audiosource ) - { + { if (gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->audiosource)) - { + { DEBUG_API("Added audiosource to bin"); - } + } else - { + { DEBUG_API("Could not add audiosource to bin"); return XA_RESULT_INTERNAL_ERROR; - } } + } else - { + { DEBUG_ERR("Could not create audio source!!!!"); return XA_RESULT_INTERNAL_ERROR; - } } + } /* create and add video pipeline */ ctx->codecbin = XAMediaRecorderAdapt_CreateEncodeBin(ctx); if (ctx->codecbin) - { + { if (gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->codecbin)) - { + { DEBUG_API("->XAMediaRecorderAdapt_CreatePipeline: gst_bin_add success"); - } + } else - { + { DEBUG_ERR("Could not add codec bin"); return XA_RESULT_INTERNAL_ERROR; - } } + } else - { + { DEBUG_ERR("Could not create encoding bin!!!"); return XA_RESULT_INTERNAL_ERROR; - } + } /* create and add video pipeline if video source available and codec supports video */ if (ctx->xaVideoSource && gst_element_get_pad(ctx->codecbin, "v_sink")) - { + { /* create video pipe source */ ctx->videosource = XAAdaptationGst_CreateGstSource( ctx->xaVideoSource, "videosource", &(ctx->isobjvsrc), NULL, NULL ); if (!ctx->videosource) - { + { DEBUG_ERR("Could not create video source!!!!"); return XA_RESULT_INTERNAL_ERROR; - } + } if (!ctx->isobjvsrc) - { /* Add other than camera sources to media recorder bin */ + { /* Add other than camera sources to media recorder bin */ gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->videosource); - } + } else - { /* Don't add camera source to media recorder bin */ + { /* Don't add camera source to media recorder bin */ GstCaps * encSrcCaps; - encSrcCaps = gst_caps_new_simple( "video/x-raw-yuv", + encSrcCaps = gst_caps_new_simple( "video/x-raw-yuv", "format", GST_TYPE_FOURCC,GST_MAKE_FOURCC('I','4','2','0'), "framerate", GST_TYPE_FRACTION, ctx->videoEncSettings.frameRate, 1, NULL); DEBUG_INFO_A1("new camera encoding filter: %s",gst_caps_to_string(encSrcCaps)); g_object_set( G_OBJECT(ctx->videosource), "filter-caps",encSrcCaps,NULL); gst_caps_unref(encSrcCaps); - } + } /* create video filter for video encoder settings */ ctx->videofilter = gst_element_factory_make("capsfilter", "videofilter"); if( ctx->videofilter ) - { + { GstCaps* encSrcCaps; gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->videofilter); encSrcCaps = gst_caps_new_simple("video/x-raw-yuv", @@ -486,15 +479,15 @@ g_object_set( G_OBJECT(ctx->videofilter), "caps",encSrcCaps,NULL); gst_caps_unref(encSrcCaps); if ( ! ctx->isobjvsrc ) - { + { if(!gst_element_link(ctx->videosource, ctx->videofilter)) - { + { DEBUG_ERR("Could not link videopp to videofilter!!"); return XA_RESULT_INTERNAL_ERROR; - } } + } else - { /* For camera source used ghost-pads for linking, because elements are in different bins */ + { /* For camera source used ghost-pads for linking, because elements are in different bins */ GstStateChangeReturn gret; GstElement *camTee=NULL; GstPad *cameraBinGhostPad=NULL; @@ -504,21 +497,21 @@ DEBUG_INFO("Set ext-source PAUSED for pipeline manipulation"); gret = gst_element_set_state( GST_ELEMENT(ctx->videosource), GST_STATE_READY); if(gret == GST_STATE_CHANGE_SUCCESS) - { + { gret = gst_element_get_state( GST_ELEMENT(ctx->videosource), NULL,NULL,XA_ADAPT_ASYNC_TIMEOUT_SHORT_NSEC); - } + } /* Add new ghost-pad to external camera source */ camTee = gst_bin_get_by_name( GST_BIN(ctx->videosource), "CamTee"); if ( !camTee ) - { + { DEBUG_ERR("Could not get tee-element from camera"); - } + } cameraBinGhostPad = gst_element_get_request_pad( camTee, "src%d" ); if ( !cameraBinGhostPad ) - { + { DEBUG_ERR("Could not get new src-pad from CamTee element"); - } + } gst_element_add_pad(ctx->videosource, gst_ghost_pad_new("MRObjSrc",cameraBinGhostPad)); ghost = gst_element_get_static_pad( GST_ELEMENT(ctx->videosource), "MRObjSrc" ); DEBUG_INFO_A2("Setting element:%s pad:%s to blocking.", @@ -531,29 +524,29 @@ gst_element_add_pad(ctx->baseObj.bin, gst_ghost_pad_new("MRObjSink",mrGhostSink)); if ( !gst_element_link_pads( GST_ELEMENT(ctx->videosource), "MRObjSrc", GST_ELEMENT(ctx->baseObj.bin), "MRObjSink") ) - { + { DEBUG_ERR("Could not link camera:MRObjSrc to videofilter:MRObjSink"); return XA_RESULT_INTERNAL_ERROR; - } + } if ( cameraBinGhostPad ) - { + { gst_object_unref( cameraBinGhostPad ); - } + } if ( ghost ) - { + { gst_object_unref( ghost ); - } + } if ( mrGhostSink ) - { + { gst_object_unref( mrGhostSink ); - } + } if ( camTee ) - { + { gst_object_unref( camTee ); - } } } + } /* create video processing pipeline */ #ifdef XA_IMPL_FIXED_VIDEO_SIZE ctx->videoppbin = XAAdaptationGst_CreateFixedSizeVideoPP( ); @@ -561,97 +554,95 @@ ctx->videoppbin = XAAdaptationGst_CreateVideoPP( ); #endif if( ctx->videoppbin ) - { + { gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->videoppbin); if(!gst_element_link(ctx->videofilter, ctx->videoppbin)) - { + { DEBUG_ERR("Could not link videofilter to videopp!!"); return XA_RESULT_INTERNAL_ERROR; - } } + } else - { + { DEBUG_ERR("Could not create video pp bin!!!!"); return XA_RESULT_INTERNAL_ERROR; - } + } /* create identity to extract buffers from */ ctx->videoextract = gst_element_factory_make("identity", "videoextract"); if( ctx->videoextract ) - { + { gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->videoextract); if(!gst_element_link(ctx->videoppbin, ctx->videoextract)) - { + { DEBUG_ERR("Could not link videopp to videoextract!!"); return XA_RESULT_INTERNAL_ERROR; - } } + } else - { + { DEBUG_ERR("Could not create videoextract!!!!"); return XA_RESULT_INTERNAL_ERROR; - } + } if( ctx->videoextract ) - { + { if( !gst_element_link_pads(ctx->videoextract, "src", ctx->codecbin, "v_sink") ) - { + { DEBUG_INFO("Warning: could not link videoextract to codec!!"); - } } } + } else - { + { DEBUG_INFO("No video input"); - } + } /* create and add audio pipeline */ if ( ctx->audiosource ) - { + { #ifdef USE_AUDIO_PP /* create audio processing pipeline */ ctx->audioppbin = XAAdaptationGst_CreateAudioPP( ); if( ctx->audioppbin ) - { + { if (gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->audioppbin)) - { + { DEBUG_INFO("Added audioppbin to bin"); - } + } else - { + { DEBUG_ERR("Could not add audioppbin to bin"); return XA_RESULT_INTERNAL_ERROR; - } + } if(!gst_element_link(ctx->audiosource, ctx->audioppbin)) - { + { DEBUG_ERR("Could not link audiofilter to audiopp!!"); return XA_RESULT_INTERNAL_ERROR; - } - - } + } else - { + { DEBUG_ERR("Could not create audio pp bin!!!!"); return XA_RESULT_INTERNAL_ERROR; - } + } #endif //USE_AUDIO_PP - + /* create audio filter for audio encoder settings */ - + // ret = XAMediaRecorderAdapt_CreateCapsFilter(ctx); -// +// // if ( XA_RESULT_SUCCESS != ret ) // { // DEBUG_ERR("cannot create caps filter"); // return ret; // } -// +// // /*LINK : audiosource -> audiofilter */ // if(!gst_element_link(ctx->audiosource, ctx->audiofilter)) -// { +// { // DEBUG_ERR("Could not link audiosource to audiofilter!!"); // return XA_RESULT_INTERNAL_ERROR; -// } - +// } + /* if( !gst_element_link_pads_filtered(ctx->audiofilter, "src", ctx->codecbin, "sink", encSrcCaps) ) { DEBUG_INFO("Warning: could not link audiopp to codec!!"); @@ -660,167 +651,169 @@ */ #ifdef USE_AUDIO_PP if (!gst_element_link_filtered( ctx->audiofilter , ctx->audioppbin ,encSrcCaps)) - { + { DEBUG_INFO("Warning: could not link audiosource to audiopp!!"); return XA_RESULT_INTERNAL_ERROR; - } + } if(!gst_element_link(ctx->audioppbin, ctx->codecbin)) - { + { DEBUG_INFO("Warning: could not link audioppbin to codecbin!!"); return XA_RESULT_INTERNAL_ERROR; - } + } #else //if(!gst_element_link(ctx->audiofilter, ctx->codecbin )) if(!gst_element_link(ctx->audiosource, ctx->codecbin )) - { + { DEBUG_ERR("Could not link audiosource to codecbin!!"); return XA_RESULT_INTERNAL_ERROR; - } + } else - { + { DEBUG_INFO("Warning: link audiosource to codecbin is successfull with muxcaps!!"); - } + } #endif // USE_AUDIO_PP - } + } else - { + { DEBUG_INFO("No audio input"); - } + } /* create and add data sink */ ctx->datasink = XAAdaptationGst_CreateGstSink( ctx->xaSink, "datasink", &(ctx->isobjsink) ); if( ctx->datasink ) - { + { if ( GST_IS_APP_SINK(ctx->datasink) ) - { + { gst_app_sink_set_emit_signals( GST_APP_SINK(ctx->datasink), TRUE ); - } + } if (gst_bin_add(GST_BIN(ctx->baseObj.bin), ctx->datasink)) - { + { DEBUG_INFO("Added datasink to bin"); - } + } else - { + { DEBUG_ERR("Could not add datasink to bin"); return XA_RESULT_INTERNAL_ERROR; - } + } if(!gst_element_link(ctx->codecbin, ctx->datasink)) - { + { DEBUG_ERR("Could not link codec to sink!!"); return XA_RESULT_INTERNAL_ERROR; - } + } /* NOTE: no actual object sinks applicable, variable used to imply appsrc (recording to memory)*/ if(ctx->isobjsink) - { + { g_signal_connect(ctx->datasink, "new-buffer", G_CALLBACK (XAMediaRecorderAdapt_BufferAvailable),ctx); ret = XAImpl_CreateSemaphore( &(ctx->recThrCtx.bufInsufficientSem)); if ( ret != XA_RESULT_SUCCESS ) - { + { DEBUG_ERR("WARN: Could not create semaphore for recorder event handler!"); - } + } XAImpl_CreateThreadHandle( &(ctx->recordingEventThr) ); - } } + } else - { + { DEBUG_ERR("Could not create data sink!!!"); return XA_RESULT_INTERNAL_ERROR; - } + } DEBUG_API("<-XAMediaRecorderAdapt_CreatePipeline"); return ret; - } +} - /* - * XAresult XAMediaRecorderAdapt_CheckCodec( XAMediaRecorderAdaptationCtx_* mCtx ); - * Check codec compatibility and support with initiated datasink content - */ - XAresult XAMediaRecorderAdapt_CheckCodec( XAMediaRecorderAdaptationCtx_* mCtx, XACapsType encType, XAuint32 encoderId ) +/* + * XAresult XAMediaRecorderAdapt_CheckCodec( XAMediaRecorderAdaptationCtx_* mCtx ); + * Check codec compatibility and support with initiated datasink content + */ +XAresult XAMediaRecorderAdapt_CheckCodec( XAMediaRecorderAdaptationCtx_* mCtx, XACapsType encType, XAuint32 encoderId ) + { + XAresult ret = XA_RESULT_SUCCESS; + XAuint32 format; + XACapabilities temp; + + DEBUG_API("->XAMediaRecorderAdapt_CheckCodec"); + + /*first, check if codec supported at all*/ + ret = XACapabilitiesMgr_GetCapsById(mCtx->baseObj.baseObj.capslist,(XACapsType)(XACAP_ENCODER|encType), encoderId, &temp); + + if( ret==XA_RESULT_SUCCESS ) + { + if(encType & (XACAP_VIDEO|XACAP_AUDIO)) { - XAresult ret = XA_RESULT_SUCCESS; - XAuint32 format; - XACapabilities temp; - - DEBUG_API("->XAMediaRecorderAdapt_CheckCodec"); - - /*first, check if codec supported at all*/ - ret = XACapabilitiesMgr_GetCapsById(mCtx->baseObj.baseObj.capslist,(XACapsType)(XACAP_ENCODER|encType), encoderId, &temp); - - if( ret==XA_RESULT_SUCCESS ) + if(mCtx->xaSink && mCtx->xaSink->pFormat) { - if(encType & (XACAP_VIDEO|XACAP_AUDIO)) - { - if(mCtx->xaSink && mCtx->xaSink->pFormat) - { - format = *(XAuint32*)(mCtx->xaSink->pFormat); - } - else - { - ret=XA_RESULT_FEATURE_UNSUPPORTED; - } - } + format = *(XAuint32*)(mCtx->xaSink->pFormat); + } else - { - if(mCtx->snapshotVars.xaSink && mCtx->snapshotVars.xaSink->pFormat) - { - format = *(XAuint32*)(mCtx->snapshotVars.xaSink->pFormat); - } - else - { - ret=XA_RESULT_FEATURE_UNSUPPORTED; - } - } - if(ret==XA_RESULT_SUCCESS) switch ( format ) - { + { + ret=XA_RESULT_FEATURE_UNSUPPORTED; + } + } + else + { + if(mCtx->snapshotVars.xaSink && mCtx->snapshotVars.xaSink->pFormat) + { + format = *(XAuint32*)(mCtx->snapshotVars.xaSink->pFormat); + } + else + { + ret=XA_RESULT_FEATURE_UNSUPPORTED; + } + } + if(ret==XA_RESULT_SUCCESS) + { + switch ( format ) + { case XA_DATAFORMAT_PCM: if ( (encType == XACAP_AUDIO) && (encoderId == XA_AUDIOCODEC_PCM) ) - { + { ret=XA_RESULT_SUCCESS; - } + } else - { + { ret=XA_RESULT_FEATURE_UNSUPPORTED; - } + } break; - + case XA_DATAFORMAT_RAWIMAGE: if ( (encType == XACAP_IMAGE) && (encoderId == XA_IMAGECODEC_RAW) ) - { + { ret=XA_RESULT_SUCCESS; - } + } else - { + { ret=XA_RESULT_FEATURE_UNSUPPORTED; - } + } break; - + case XA_DATAFORMAT_MIME: DEBUG_INFO("XA_DATAFORMAT_MIME "); - { + { XADataFormat_MIME* mime = ((XADataFormat_MIME*)mCtx->xaSink->pFormat); DEBUG_INFO_A1("mime->containerType:%u",(int)mime->containerType); DEBUG_INFO_A1("mime->mimeType:%s",mime->mimeType); switch ( mime->containerType ) - { + { case XA_CONTAINERTYPE_RAW: if( ((encType == XACAP_AUDIO) && (encoderId == XA_AUDIOCODEC_PCM)) || ((encType == XACAP_VIDEO) && (encoderId == XA_ADAPTID_RAWVIDEO)) || ((encType == XACAP_IMAGE) && (encoderId == XA_IMAGECODEC_RAW)) ) - { + { ret=XA_RESULT_SUCCESS; - } + } else - { + { ret=XA_RESULT_FEATURE_UNSUPPORTED; - } + } break; - + case XA_CONTAINERTYPE_AVI: if(encType == XACAP_VIDEO) - { + { switch(encoderId) - { + { case XA_ADAPTID_MOTIONJPEG: case XA_ADAPTID_RAWVIDEO: ret=XA_RESULT_SUCCESS; @@ -828,173 +821,175 @@ default: ret=XA_RESULT_FEATURE_UNSUPPORTED; break; - } } + } else if(encType == XACAP_AUDIO) - { + { switch(encoderId) - { + { case XA_AUDIOCODEC_PCM: ret=XA_RESULT_SUCCESS; break; default: ret=XA_RESULT_FEATURE_UNSUPPORTED; break; - } } + } else - { + { ret=XA_RESULT_FEATURE_UNSUPPORTED; - } + } break; - + case XA_CONTAINERTYPE_WAV: if(encType == XACAP_AUDIO) - { + { switch(encoderId) - { + { case XA_AUDIOCODEC_PCM: ret=XA_RESULT_SUCCESS; break; default: ret=XA_RESULT_FEATURE_UNSUPPORTED; break; - } } + } else - { + { ret=XA_RESULT_FEATURE_UNSUPPORTED; - } + } break; - + case XA_CONTAINERTYPE_JPG: if(encType == XACAP_VIDEO) - { + { switch(encoderId) - { + { case XA_ADAPTID_MOTIONJPEG: ret=XA_RESULT_SUCCESS; break; default: ret=XA_RESULT_FEATURE_UNSUPPORTED; break; - } } + } else if(encType == XACAP_IMAGE) - { + { switch(encoderId) - { + { case XA_IMAGECODEC_JPEG: ret=XA_RESULT_SUCCESS; break; default: ret=XA_RESULT_FEATURE_UNSUPPORTED; break; - } } + } else - { + { ret=XA_RESULT_FEATURE_UNSUPPORTED; - } + } break; - + case XA_CONTAINERTYPE_UNSPECIFIED: if(strstr( (char *) mime->mimeType, "/ogg") != 0) + { + if(encType == XACAP_VIDEO) { - if(encType == XACAP_VIDEO) + switch(encoderId) { - switch(encoderId) - { case XA_ADAPTID_THEORA: ret=XA_RESULT_SUCCESS; break; default: ret=XA_RESULT_FEATURE_UNSUPPORTED; break; - } } + } else if(encType == XACAP_AUDIO) - { + { switch(encoderId) - { + { case XA_ADAPTID_VORBIS: ret=XA_RESULT_SUCCESS; break; default: ret=XA_RESULT_FEATURE_UNSUPPORTED; break; - } - } - else - { - ret=XA_RESULT_FEATURE_UNSUPPORTED; } } - else + else { + ret=XA_RESULT_FEATURE_UNSUPPORTED; + } + } + else + { ret=XA_RESULT_FEATURE_UNSUPPORTED; - } + } break; case XA_CONTAINERTYPE_AMR: if(encType == XACAP_AUDIO) - { + { switch(encoderId) - { + { case XA_AUDIOCODEC_AMR: ret=XA_RESULT_SUCCESS; break; default: ret=XA_RESULT_FEATURE_UNSUPPORTED; break; - } } + } else - { + { ret=XA_RESULT_FEATURE_UNSUPPORTED; - } + } break; case XA_CONTAINERTYPE_MP4: if(encType == XACAP_AUDIO ) - { + { switch(encoderId) - { + { case XA_AUDIOCODEC_AAC: ret=XA_RESULT_SUCCESS; break; default: ret=XA_RESULT_FEATURE_UNSUPPORTED; break; - } } + } else - { + { ret=XA_RESULT_FEATURE_UNSUPPORTED; - } + } break; default: /*switch (containertype)*/ ret = XA_RESULT_FEATURE_UNSUPPORTED; break; - } + } break; - } + } default: /*switch (format)*/ ret = XA_RESULT_CONTENT_UNSUPPORTED; break; - } } - if( ret!=XA_RESULT_SUCCESS ) - { - DEBUG_ERR("cannot accommodate given codec & datasink pair!!!"); - } - DEBUG_API("<-XAMediaRecorderAdapt_CheckCodec"); - return ret; } + } + if( ret!=XA_RESULT_SUCCESS ) + { + DEBUG_ERR("cannot accommodate given codec & datasink pair!!!"); + } + DEBUG_API("<-XAMediaRecorderAdapt_CheckCodec"); + return ret; +} + /* * XAresult XAMediaRecorderAdapt_ChangeEncoders( XAMediaRecorderAdaptationCtx* mCtx ); * re-create encodebin based on new encoder settings */ XAresult XAMediaRecorderAdapt_ChangeEncoders( XAMediaRecorderAdaptationCtx* mCtx ) - { +{ XAresult ret = XA_RESULT_SUCCESS; GstElement *encoderelement = NULL; XAAdaptationGstCtx* bCtx = &(mCtx->baseObj); @@ -1002,10 +997,10 @@ DEBUG_API("->XAMediaRecorderAdapt_ChangeEncoders"); /* check state */ if(GST_STATE(mCtx->baseObj.bin)videofilter ) - { + { encSrcCaps = gst_caps_new_simple("video/x-raw-yuv", "format", GST_TYPE_FOURCC,GST_MAKE_FOURCC('I','4','2','0'), "width", G_TYPE_INT, mCtx->videoEncSettings.width, @@ -1032,57 +1027,55 @@ DEBUG_INFO_A1("new video encoder config from settings: %s",gst_caps_to_string(encSrcCaps)); g_object_set( G_OBJECT(mCtx->videofilter), "caps",encSrcCaps,NULL); gst_caps_unref(encSrcCaps); + } + if(!mCtx ->audiofilter) + { + //creating caps filter + mCtx->audiofilter = gst_element_factory_make("capsfilter", "audiofilter"); + if ( mCtx->audiofilter ) + { + gst_bin_add(GST_BIN(bCtx->bin), mCtx->audiofilter); + encSrcCaps = gst_caps_new_full( + gst_structure_new("audio/x-raw-int", + "channels", G_TYPE_INT, mCtx->audioEncSettings.channelsOut, + "rate", G_TYPE_INT, (mCtx->audioEncSettings.sampleRate / 1000), + "depth", G_TYPE_INT, mCtx->audioEncSettings.bitsPerSample, + "signed",G_TYPE_BOOLEAN, TRUE, + "endianness",G_TYPE_INT, mCtx->audioEncSettings.blockAlignment, + NULL), + gst_structure_new("audio/amr", + "signed",G_TYPE_BOOLEAN, TRUE, + "endianness",G_TYPE_INT, mCtx->audioEncSettings.blockAlignment, + "depth", G_TYPE_INT, mCtx->audioEncSettings.bitsPerSample, + "rate", G_TYPE_INT, (mCtx->audioEncSettings.sampleRate / 1000), + "channels", G_TYPE_INT, mCtx->audioEncSettings.channelsOut, + NULL), + gst_structure_new("audio/x-raw-float", + "channels", G_TYPE_INT, mCtx->audioEncSettings.channelsOut, + "width", G_TYPE_INT, mCtx->audioEncSettings.bitsPerSample, + "rate", G_TYPE_INT , mCtx->audioEncSettings.sampleRate / 1000, + NULL), + NULL); + DEBUG_INFO_A1("new audio encoder config from settings: %s",gst_caps_to_string(encSrcCaps)); + g_object_set( G_OBJECT(mCtx->audiofilter), "caps",encSrcCaps,NULL); + + gst_caps_unref(encSrcCaps); } - if(!mCtx ->audiofilter) + else { - //creating caps filter - mCtx->audiofilter = gst_element_factory_make("capsfilter", "audiofilter"); - if ( mCtx->audiofilter ) - { - gst_bin_add(GST_BIN(bCtx->bin), mCtx->audiofilter); - encSrcCaps = gst_caps_new_full( - gst_structure_new("audio/x-raw-int", - "channels", G_TYPE_INT, mCtx->audioEncSettings.channelsOut, - "rate", G_TYPE_INT, (mCtx->audioEncSettings.sampleRate / 1000), - "depth", G_TYPE_INT, mCtx->audioEncSettings.bitsPerSample, - "signed",G_TYPE_BOOLEAN, TRUE, - "endianness",G_TYPE_INT, mCtx->audioEncSettings.blockAlignment, - NULL), - gst_structure_new("audio/amr", - "signed",G_TYPE_BOOLEAN, TRUE, - "endianness",G_TYPE_INT, mCtx->audioEncSettings.blockAlignment, - "depth", G_TYPE_INT, mCtx->audioEncSettings.bitsPerSample, - "rate", G_TYPE_INT, (mCtx->audioEncSettings.sampleRate / 1000), - "channels", G_TYPE_INT, mCtx->audioEncSettings.channelsOut, - NULL), - gst_structure_new("audio/x-raw-float", - "channels", G_TYPE_INT, mCtx->audioEncSettings.channelsOut, - "width", G_TYPE_INT, mCtx->audioEncSettings.bitsPerSample, - "rate", G_TYPE_INT , mCtx->audioEncSettings.sampleRate / 1000, - NULL), - NULL); - DEBUG_INFO_A1("new audio encoder config from settings: %s",gst_caps_to_string(encSrcCaps)); - g_object_set( G_OBJECT(mCtx->audiofilter), "caps",encSrcCaps,NULL); - - gst_caps_unref(encSrcCaps); - - }else - { - DEBUG_ERR("cannot create caps filter"); - return XA_RESULT_INTERNAL_ERROR; - } - + DEBUG_ERR("cannot create caps filter"); + return XA_RESULT_INTERNAL_ERROR; } + } if(mCtx->isobjvsrc) - { + { moSrc = gst_element_get_static_pad(mCtx->videosource,"MRObjSrc"); moSink = gst_pad_get_peer(moSrc); if(moSink) - { + { gst_pad_unlink(moSrc,moSink); - } - moSrc = gst_element_get_static_pad(mCtx->videosource,"mediaobjectsrc"); + } encSrcCaps = gst_caps_new_simple("video/x-raw-yuv", "format", GST_TYPE_FOURCC,GST_MAKE_FOURCC('I','4','2','0'), "framerate", GST_TYPE_FRACTION, mCtx->videoEncSettings.frameRate, 1, @@ -1090,36 +1083,36 @@ DEBUG_INFO_A1("new camera encoding filter: %s",gst_caps_to_string(encSrcCaps)); g_object_set( G_OBJECT(mCtx->videosource), "filter-caps",encSrcCaps,NULL); gst_caps_unref(encSrcCaps); - } + } DEBUG_INFO("Unlink and remove old encodebin"); asink = gst_element_get_static_pad(mCtx->codecbin,"sink"); if(asink) - { + { linkedasrc = gst_pad_get_peer(asink); if(linkedasrc) - { + { gst_pad_unlink(linkedasrc,asink); - } } + } vsink = gst_element_get_static_pad(mCtx->codecbin,"v_sink"); if(vsink) - { + { linkedvsrc = gst_pad_get_peer(vsink); if(linkedvsrc) - { + { gst_pad_unlink(linkedvsrc,vsink); - } } + } src = gst_element_get_static_pad(mCtx->codecbin,"src"); if(src) - { + { linkedsink = gst_pad_get_peer(src); if(linkedsink) - { + { gst_pad_unlink(src,linkedsink); - } } + } gst_element_set_state( GST_ELEMENT(mCtx->codecbin), GST_STATE_NULL ); gst_element_get_state( GST_ELEMENT(mCtx->codecbin),NULL,NULL,1000 ); @@ -1136,107 +1129,111 @@ afiltsink = gst_element_get_static_pad(mCtx->audiofilter,"sink"); afiltsrc = gst_element_get_static_pad(mCtx->audiofilter,"src"); if(linkedasrc && afiltsink) + { + if(gst_pad_link(linkedasrc , afiltsink ) != GST_PAD_LINK_OK) { - if(gst_pad_link(linkedasrc , afiltsink ) != GST_PAD_LINK_OK) - { - DEBUG_ERR("Could not link audiosource to audiofilter!!"); - return XA_RESULT_INTERNAL_ERROR; - } + DEBUG_ERR("Could not link audiosource to audiofilter!!"); + return XA_RESULT_INTERNAL_ERROR; } + } if(asink && afiltsrc) + { + if(gst_pad_link(afiltsrc , asink) != GST_PAD_LINK_OK) { - if(gst_pad_link(afiltsrc , asink) != GST_PAD_LINK_OK) - { - DEBUG_ERR("Could not link audiosource to audiofilter!!"); - return XA_RESULT_INTERNAL_ERROR; - } + DEBUG_ERR("Could not link audiosource to audiofilter!!"); + return XA_RESULT_INTERNAL_ERROR; } + } vsink = gst_element_get_static_pad(mCtx->codecbin,"v_sink"); if(vsink && linkedvsrc) - { - if(gst_pad_link(linkedvsrc,vsink) != GST_PAD_LINK_OK) - { - DEBUG_ERR("Could not link linkedvsrc to vsink!!"); - return XA_RESULT_INTERNAL_ERROR; - } - } + { + if(gst_pad_link(linkedvsrc,vsink) != GST_PAD_LINK_OK) + { + DEBUG_ERR("Could not link linkedvsrc to vsink!!"); + return XA_RESULT_INTERNAL_ERROR; + } + } src = gst_element_get_static_pad(mCtx->codecbin,"src"); if(src && linkedsink) + { + if(gst_pad_link(src,linkedsink) != GST_PAD_LINK_OK) { - if(gst_pad_link(src,linkedsink) != GST_PAD_LINK_OK) - { - DEBUG_ERR("Could not link codecbin src pad to linkedsink!!"); - return XA_RESULT_INTERNAL_ERROR; - } + DEBUG_ERR("Could not link codecbin src pad to linkedsink!!"); + return XA_RESULT_INTERNAL_ERROR; } + } if(mCtx->isobjvsrc) - { + { moSrc = gst_element_get_static_pad(mCtx->videosource,"MRObjSrc"); if(moSink&&moSrc) + { + if(gst_pad_link(moSrc,moSink) != GST_PAD_LINK_OK) { - if(gst_pad_link(moSrc,moSink) != GST_PAD_LINK_OK) - { - DEBUG_ERR("Could not link codecbin src pad to linkedsink!!"); - return XA_RESULT_INTERNAL_ERROR; - } + DEBUG_ERR("Could not link codecbin src pad to linkedsink!!"); + return XA_RESULT_INTERNAL_ERROR; } } + } - + //setting the Bitrate and other properties for elements - if(mCtx->audioEncSettings.encoderId == XA_AUDIOCODEC_AAC) - { - encoderelement = gst_bin_get_by_name((GstBin*)mCtx->codecbin, "audioenc") ; - if(encoderelement){ - g_object_set(G_OBJECT(encoderelement),"bitrate" , mCtx->audioEncSettings.bitRate , NULL ); - g_object_set(G_OBJECT(encoderelement),"profile", mCtx->audioEncSettings.levelSetting , NULL ); - g_object_set(G_OBJECT(encoderelement),"output-format", mCtx->audioEncSettings.streamFormat , NULL ); - gst_object_unref (encoderelement); - }else - DEBUG_ERR("Encoder Element not found for AAC"); - } - else if(mCtx->audioEncSettings.encoderId == XA_AUDIOCODEC_AMR) - { - g_object_set(G_OBJECT(mCtx->audiosource),"speechbitrate", mCtx->audioEncSettings.bitRate , NULL ); - } - else - { - DEBUG_INFO("No properties for PCM or Wav") - } - + if(mCtx->audioEncSettings.encoderId == XA_AUDIOCODEC_AAC) + { + encoderelement = gst_bin_get_by_name((GstBin*)mCtx->codecbin, "audioenc") ; + if(encoderelement) + { + g_object_set(G_OBJECT(encoderelement),"bitrate" , mCtx->audioEncSettings.bitRate , NULL ); + g_object_set(G_OBJECT(encoderelement),"profile", mCtx->audioEncSettings.levelSetting , NULL ); + g_object_set(G_OBJECT(encoderelement),"output-format", mCtx->audioEncSettings.streamFormat , NULL ); + gst_object_unref (encoderelement); + } + else + { + DEBUG_ERR("Encoder Element not found for AAC"); + } + } + else if(mCtx->audioEncSettings.encoderId == XA_AUDIOCODEC_AMR) + { + g_object_set(G_OBJECT(mCtx->audiosource),"speechbitrate", mCtx->audioEncSettings.bitRate , NULL ); + } + else + { + DEBUG_INFO("No properties for PCM or Wav") + } + /*re-roll*/ DEBUG_INFO("Reroll pipeline"); bCtx->binWantedState = GST_STATE_PAUSED; gret = gst_element_set_state( GST_ELEMENT(bCtx->bin), bCtx->binWantedState); if( gret == GST_STATE_CHANGE_ASYNC ) - { + { DEBUG_INFO("Wait for reroll"); XAAdaptationGst_StartAsyncWait(bCtx); - } + } else if( gret == GST_STATE_CHANGE_FAILURE ) - { + { DEBUG_ERR("reroll FAILED"); ret = XA_RESULT_INTERNAL_ERROR; - } + } bCtx->waitingasyncop = XA_BOOLEAN_FALSE; DEBUG_INFO_A1("Pipeline in state %s",gst_element_state_get_name(GST_STATE(bCtx->bin))); - } + } else - { + { /* could not support wanted encoders */ DEBUG_ERR("Failed to create encodebin with new settings, using old one!"); ret = XA_RESULT_FEATURE_UNSUPPORTED; - } } + } else - { /* n/a while playing */ + { /* n/a while playing */ DEBUG_ERR("Cannot change encoder when recording ongoing!"); ret = XA_RESULT_PRECONDITIONS_VIOLATED; - } + } DEBUG_API("<-XAMediaRecorderAdapt_ChangeEncoders"); return ret; - } +} /** * GstElement* XAMediaRecorderAdapt_CreateEncodeBin( XAMediaRecorderAdaptationCtx* ctx ) @@ -1244,7 +1241,7 @@ * Decription: Create encoder/muxer element based on given format and encoder settings */ GstElement* XAMediaRecorderAdapt_CreateEncodeBin( XAMediaRecorderAdaptationCtx* ctx ) - { +{ XAresult ret = XA_RESULT_SUCCESS; GstElement *audioenc = NULL, *videoenc=NULL, *mux=NULL; GstElement *codecbin = gst_bin_new( "mrcodecbin" ); @@ -1254,21 +1251,21 @@ DEBUG_API("->XAMediaRecorderAdapt_CreateEncodeBin"); if(ctx->recModes & XA_RECMODE_STREAM) - { + { if(ctx->xaSink && ctx->xaSink->pFormat) - { + { format = *(XAuint32*)(ctx->xaSink->pFormat); switch ( format ) - { + { case XA_DATAFORMAT_PCM: DEBUG_INFO("XA_DATAFORMAT_PCM"); - { + { XADataFormat_PCM* pcm = ((XADataFormat_PCM*)ctx->xaSink->pFormat); if(!ctx->xaAudioSource) - { + { DEBUG_ERR("Unsupported dataformat for given data sources"); return NULL; - } + } /* no need for codec, just pass data on */ mux = gst_element_factory_make("identity", "mux"); gst_bin_add(GST_BIN(codecbin), mux); @@ -1278,18 +1275,18 @@ ctx->audioEncSettings.encoderId = XA_AUDIOCODEC_PCM; ctx->audioEncSettings.channelsOut = pcm->numChannels; ctx->audioEncSettings.bitsPerSample = pcm->bitsPerSample; - } + } break; case XA_DATAFORMAT_RAWIMAGE: DEBUG_INFO("XA_DATAFORMAT_RAWIMAGE"); - { + { XADataFormat_RawImage* img = ((XADataFormat_RawImage*)ctx->xaSink->pFormat); if(!ctx->xaVideoSource) - { + { DEBUG_ERR("Unsupported dataformat for given data sources"); return NULL; - } + } /* no need for codec, just pass data on */ mux = gst_element_factory_make("identity", "mux"); gst_bin_add(GST_BIN(codecbin), mux); @@ -1300,118 +1297,118 @@ ctx->imageEncSettings.width = img->width; ctx->imageEncSettings.height = img->height; ctx->imageEncSettings.colorFormat = img->colorFormat; - } + } break; case XA_DATAFORMAT_MIME: DEBUG_INFO("XA_DATAFORMAT_MIME "); - { + { XADataFormat_MIME* mime = ((XADataFormat_MIME*)ctx->xaSink->pFormat); DEBUG_INFO_A1("mime->containerType:%u",(int)mime->containerType); DEBUG_INFO_A1("mime->mimeType:%s",mime->mimeType); switch ( mime->containerType ) - { + { case XA_CONTAINERTYPE_AVI: DEBUG_INFO("XA_CONTAINERTYPE_AVI"); mux = gst_element_factory_make("avimux", "mux"); if(mux) - { + { if (gst_bin_add(GST_BIN(codecbin), mux)) - { + { DEBUG_INFO("Added mux to codecbin"); - } + } else - { + { DEBUG_ERR("Could not add mux to codecbin"); return NULL; - } + } /*use this as linkpoint*/ ghostsrc = gst_element_get_static_pad(mux,"src"); - } + } /* Add and link audio/video codecs */ /*set video defaults*/ if(ctx->videoEncSettings.encoderId == XA_ADAPTID_UNINITED) ctx->videoEncSettings.encoderId = XA_ADAPTID_MOTIONJPEG; if(ctx->xaVideoSource) - { + { if(XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_ENCODER|XACAP_VIDEO), ctx->videoEncSettings.encoderId, &temp) == XA_RESULT_SUCCESS) - { + { if(temp.adaptId) - { + { videoenc = gst_element_factory_make((char*)temp.adaptId, "videoenc"); - } } + } if(videoenc) - { + { gst_bin_add(GST_BIN(codecbin), videoenc); if(!gst_element_link(videoenc, mux)) - { + { DEBUG_ERR("Could not link videoenc to mux!!"); DEBUG_API("<-XAMediaRecorderAdapt_CreateEncodeBin"); return NULL; - } + } ghostvideosink = gst_element_get_static_pad(videoenc,"sink"); - } + } else - { + { /*no video codec but video source = raw video case, request video pad directly from mux*/ ghostvideosink = gst_element_get_request_pad(mux,"video_%d"); - } } + } /*set audio defaults*/ if(ctx->audioEncSettings.encoderId == XA_ADAPTID_UNINITED) ctx->audioEncSettings.encoderId = XA_AUDIOCODEC_PCM; if(ctx->xaAudioSource) - { + { if(XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_ENCODER|XACAP_AUDIO), ctx->audioEncSettings.encoderId, &temp) == XA_RESULT_SUCCESS) - { + { if(temp.adaptId) - { + { audioenc = gst_element_factory_make((char*)temp.adaptId, "audioenc"); - } } + } if(audioenc) - { + { gst_bin_add(GST_BIN(codecbin), audioenc); if(!gst_element_link(audioenc, mux)) - { + { DEBUG_ERR("Could not link audioenc to mux!!"); DEBUG_API("<-XAMediaRecorderAdapt_CreateEncodeBin"); return NULL; - } + } ghostaudiosink = gst_element_get_static_pad(audioenc,"sink"); - } + } else - { + { /*no audio codec but audio source = PCM case, explicity request audio pad*/ ghostaudiosink = gst_element_get_request_pad(mux,"audio_%d"); - } } + } break; case XA_CONTAINERTYPE_WAV: DEBUG_INFO("XA_CONTAINERTYPE_WAV"); audioenc = gst_element_factory_make("wavenc", "audioenc"); if(audioenc) - { + { if (gst_bin_add(GST_BIN(codecbin), audioenc)) - { + { DEBUG_INFO("added audioenc to codecbin"); - } + } else - { + { DEBUG_ERR("Could not add audioenc to codecbin"); return NULL; - } + } /*use this as linkpoint*/ ghostsrc = gst_element_get_static_pad(audioenc,"src"); ghostaudiosink = gst_element_get_static_pad(audioenc,"sink"); if ( ghostsrc == NULL || ghostaudiosink == NULL) - { + { DEBUG_ERR("Could not get src or sink ghoset element(s)"); return NULL; - } } + } /* no other codecs needed */ break; case XA_CONTAINERTYPE_JPG: @@ -1421,167 +1418,167 @@ if(ctx->videoEncSettings.encoderId == XA_ADAPTID_UNINITED) ctx->videoEncSettings.encoderId = XA_ADAPTID_MOTIONJPEG; if(XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_ENCODER|XACAP_VIDEO), ctx->videoEncSettings.encoderId, &temp) == XA_RESULT_SUCCESS) - { + { videoenc = gst_element_factory_make((char*)temp.adaptId, "videoenc"); - } + } if(videoenc) - { + { gst_bin_add(GST_BIN(codecbin), videoenc); /*use this as linkpoint*/ ghostsrc = gst_element_get_static_pad(videoenc,"src"); ghostvideosink = gst_element_get_static_pad(videoenc,"sink"); - } + } /* no other codecs needed */ break; case XA_CONTAINERTYPE_RAW: DEBUG_INFO("XA_CONTAINERTYPE_RAW"); /* no need for codec, just pass data on */ if(strncmp((char *)mime->mimeType, "video", 5) == 0 && ctx->xaVideoSource) - { + { mux = gst_element_factory_make("identity", "mux"); gst_bin_add(GST_BIN(codecbin), mux); ghostvideosink = gst_element_get_static_pad(mux,"sink"); - } + } else if (strncmp((char *)mime->mimeType, "audio", 5) == 0 && ctx->xaAudioSource) - { + { mux = gst_element_factory_make("identity", "mux"); gst_bin_add(GST_BIN(codecbin), mux); ghostaudiosink = gst_element_get_static_pad(mux,"sink"); - } + } else - { + { ret = XA_RESULT_CONTENT_UNSUPPORTED; DEBUG_ERR("Content mismatch with given sources!!!") - } + } ghostsrc = gst_element_get_static_pad(mux,"src"); break; case XA_CONTAINERTYPE_UNSPECIFIED: DEBUG_INFO("No support for requested encoder...try to select encoder from mime string"); if(strstr( (char *) mime->mimeType, "/ogg") != 0) - { + { DEBUG_INFO("XA_CONTAINERTYPE_UNSPECIFIED - mimetype ogg detected"); mux = gst_element_factory_make("oggmux", "mux"); if(mux) - { + { gst_bin_add(GST_BIN(codecbin), mux); /*use this as linkpoint*/ ghostsrc = gst_element_get_static_pad(mux,"src"); /*set defaults*/ if(ctx->audioEncSettings.encoderId == XA_ADAPTID_UNINITED) - { + { ctx->audioEncSettings.encoderId = XA_ADAPTID_VORBIS; ctx->audioEncSettings.bitsPerSample=32; - } + } if(ctx->videoEncSettings.encoderId == XA_ADAPTID_UNINITED) - { + { ctx->videoEncSettings.encoderId = XA_ADAPTID_THEORA; - } + } if(ctx->xaAudioSource) + { + if(XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_ENCODER|XACAP_AUDIO), ctx->audioEncSettings.encoderId, &temp) == XA_RESULT_SUCCESS) { - if(XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_ENCODER|XACAP_AUDIO), ctx->audioEncSettings.encoderId, &temp) == XA_RESULT_SUCCESS) - { audioenc = gst_element_factory_make((char*)temp.adaptId, "audioenc"); - } + } if(audioenc) - { + { gst_bin_add(GST_BIN(codecbin), audioenc); if(!gst_element_link(audioenc, mux)) - { + { DEBUG_ERR("Could not link audioenc to mux!!"); DEBUG_API("<-XAMediaRecorderAdapt_CreateEncodeBin"); return NULL; - } + } ghostaudiosink = gst_element_get_static_pad(audioenc,"sink"); - } } + } if(strncmp((char *)mime->mimeType, "video", 5) == 0 && ctx->xaVideoSource) + { + if(XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_ENCODER|XACAP_VIDEO), ctx->videoEncSettings.encoderId, &temp) == XA_RESULT_SUCCESS) { - if(XACapabilitiesMgr_GetCapsById(NULL, (XACapsType)(XACAP_ENCODER|XACAP_VIDEO), ctx->videoEncSettings.encoderId, &temp) == XA_RESULT_SUCCESS) - { videoenc = gst_element_factory_make((char*)temp.adaptId, "videoenc"); - } + } if(videoenc) - { + { gst_bin_add(GST_BIN(codecbin), videoenc); if(!gst_element_link(videoenc, mux)) - { + { DEBUG_ERR("Could not link videoenc to mux!!"); DEBUG_API("<-XAMediaRecorderAdapt_CreateEncodeBin"); return NULL; - } + } ghostvideosink = gst_element_get_static_pad(videoenc,"sink"); - } } } } + } else - { + { DEBUG_INFO("No support for requested mime/container type."); ret = XA_RESULT_CONTENT_UNSUPPORTED; - } + } break; case XA_CONTAINERTYPE_MOBILE_DLS: case XA_CONTAINERTYPE_MP4: DEBUG_INFO("XA_CONTAINERTYPE_MP4"); mux = gst_element_factory_make("mp4mux", "mp4mux"); if(mux) - { + { if (gst_bin_add(GST_BIN(codecbin), mux)) - { + { DEBUG_INFO("Added mux to codecbin"); - } + } else - { + { DEBUG_ERR("Could not add mux to codecbin"); return NULL; - } + } /*use this as linkpoint*/ ghostsrc = gst_element_get_static_pad(mux,"src"); - } + } /* Add and link audio/video codecs */ /*set video defaults*/ if(ctx->videoEncSettings.encoderId == XA_ADAPTID_UNINITED) ctx->videoEncSettings.encoderId = XA_ADAPTID_MOTIONJPEG; if(ctx->xaVideoSource) - { + { if(XACapabilitiesMgr_GetCapsById(ctx->baseObj.baseObj.capslist, (XACapsType)(XACAP_ENCODER|XACAP_VIDEO), ctx->videoEncSettings.encoderId, &temp) == XA_RESULT_SUCCESS) - { + { if(temp.adaptId) - { + { videoenc = gst_element_factory_make((char*)temp.adaptId, "videoenc"); - } } + } if(videoenc) - { + { gst_bin_add(GST_BIN(codecbin), videoenc); if(!gst_element_link(videoenc, mux)) - { + { DEBUG_ERR("Could not link videoenc to mux!!"); DEBUG_API("<-XAMediaRecorderAdapt_CreateEncodeBin"); return NULL; - } + } ghostvideosink = gst_element_get_static_pad(videoenc,"sink"); - } + } else - { + { /*no video codec but video source = raw video case, request video pad directly from mux*/ ghostvideosink = gst_element_get_request_pad(mux,"video_%d"); - } } + } /*set audio defaults*/ if(ctx->audioEncSettings.encoderId == XA_ADAPTID_UNINITED) ctx->audioEncSettings.encoderId = XA_AUDIOCODEC_AAC; if(ctx->xaAudioSource) - { + { if(XACapabilitiesMgr_GetCapsById(ctx->baseObj.baseObj.capslist, (XACapsType)(XACAP_ENCODER|XACAP_AUDIO), ctx->audioEncSettings.encoderId, &temp) == XA_RESULT_SUCCESS) - { + { if(temp.adaptId) - { + { audioenc = gst_element_factory_make((char*)temp.adaptId, "audioenc"); - } } + } if(audioenc) - { + { // GstCaps* caps = gst_caps_new_simple((const char*)mime->mimeType, // "mpegversion", G_TYPE_INT, 4, // "channels", G_TYPE_INT, 1, @@ -1590,51 +1587,51 @@ gst_bin_add(GST_BIN(codecbin), audioenc); //if(!gst_element_link_filtered(audioenc, mux,caps)) if(!gst_element_link(audioenc, mux)) - { + { DEBUG_ERR("Could not link audioenc to mux!!"); DEBUG_API("<-XAMediaRecorderAdapt_CreateEncodeBin"); return NULL; - } + } ghostaudiosink = gst_element_get_static_pad(audioenc,"sink"); - } + } else - { + { /*no audio codec but audio source = PCM case, explicity request audio pad*/ ghostaudiosink = gst_element_get_request_pad(mux,"audio_%d"); - } } - break; + } + break; case XA_CONTAINERTYPE_AMR: DEBUG_INFO("XA_CONTAINERTYPE_AMR"); if(ctx->audioEncSettings.encoderId == XA_ADAPTID_UNINITED) ctx->audioEncSettings.encoderId = XA_AUDIOCODEC_AMR; mux = gst_element_factory_make("amrmux", "mux"); if(mux) - { + { if (gst_bin_add(GST_BIN(codecbin), mux)) - { + { DEBUG_INFO("Added mux to codecbin"); - /*Setting the buffer size on src since amr generates + /*Setting the buffer size on src since amr generates * small amounts of data */ g_object_set (G_OBJECT (ctx->audiosource), "blocksize", 1280, - NULL); - } + NULL); + } else - { + { DEBUG_ERR("Could not add mux to codecbin"); return NULL; - } + } /*use this as linkpoint*/ ghostsrc = gst_element_get_static_pad(mux,"src"); - } + } /*set audio defaults*/ if(ctx->xaAudioSource) - { + { /*no audio codec but audio source = PCM case, explicity request audio pad*/ ghostaudiosink = gst_element_get_static_pad(mux,"sink"); - } - break; + } + break; case XA_CONTAINERTYPE_3GPP: case XA_CONTAINERTYPE_BMP: case XA_CONTAINERTYPE_ASF: @@ -1658,28 +1655,28 @@ DEBUG_INFO("No support for requested container type."); ret = XA_RESULT_CONTENT_UNSUPPORTED; break; - } + } break; - } + } default: DEBUG_ERR("Incorrect data format type."); ret = XA_RESULT_PARAMETER_INVALID; break; - } } + } else - { + { DEBUG_ERR("Invalid data sink for stream recording!!"); ret = XA_RESULT_PARAMETER_INVALID; - } } + } else - {/* stream recording not requested, datasink ignored, use uncoded recordstream*/ + {/* stream recording not requested, datasink ignored, use uncoded recordstream*/ mux = gst_element_factory_make("identity", "mux"); gst_bin_add(GST_BIN(codecbin), mux); ghostsrc = gst_element_get_static_pad(mux,"src"); ghostvideosink = gst_element_get_static_pad(mux,"sink"); - } + } /*set default codecs for unrecognized*/ if(ctx->audioEncSettings.encoderId == XA_ADAPTID_UNINITED) @@ -1690,73 +1687,73 @@ ctx->videoEncSettings.encoderId = XA_ADAPTID_RAWVIDEO; if ( ret != XA_RESULT_SUCCESS ) - { + { gst_object_unref(codecbin); codecbin=NULL; - } + } else - { + { /*add ghost pad(s) to link to*/ if(ghostsrc) - { + { gst_element_add_pad(codecbin, gst_ghost_pad_new("src",ghostsrc)); gst_object_unref(GST_OBJECT(ghostsrc)); - } + } if(ghostaudiosink) - { + { gst_element_add_pad(codecbin, gst_ghost_pad_new("sink",ghostaudiosink)); gst_object_unref(GST_OBJECT(ghostaudiosink)); - } + } if(ghostvideosink) - { + { gst_element_add_pad(codecbin, gst_ghost_pad_new("v_sink",ghostvideosink)); gst_object_unref(GST_OBJECT(ghostvideosink)); - } + } DEBUG_INFO_A1("Created encoder bin at %x", (int)codecbin); - } + } DEBUG_API("<-XAMediaRecorderAdapt_CreateEncodeBin"); return codecbin; - } +} /* * void XAMediaRecorderAdapt_BufferAvailable(GstElement* sink, gpointer user_data) * called when new buffer is available at appsink */ void XAMediaRecorderAdapt_BufferAvailable(GstElement* sink, gpointer user_data) - { +{ GstBuffer *buffer=NULL; XAMediaRecorderAdaptationCtx* mCtx = (XAMediaRecorderAdaptationCtx*)user_data; DEBUG_API("->XAMediaRecorderAdapt_BufferAvailable"); if(!mCtx || !mCtx->xaSink) - { + { DEBUG_ERR("Invalid context") return; - } + } /* get the buffer */ buffer = gst_app_sink_pull_buffer(GST_APP_SINK(sink)); if(buffer) - { + { guint size; XADataLocator_Address* address; size = GST_BUFFER_SIZE(buffer); DEBUG_INFO_A1("Pulled new buffer of size %d", size); address = (XADataLocator_Address*)(mCtx->xaSink->pLocator); if( !address || *(XAuint32*)address != XA_DATALOCATOR_ADDRESS ) - { + { DEBUG_ERR("Invalid address datalocator") return; - } + } if(mCtx->writepos + size < address->length ) - { /*enough room in buffer*/ + { /*enough room in buffer*/ memcpy(((char*)(address->pAddress) + mCtx->writepos), GST_BUFFER_DATA (buffer), size); mCtx->writepos+=size; - } + } else - { /*not enough room in buffer*/ + { /*not enough room in buffer*/ XAAdaptEvent event = {XA_RECORDITFEVENTS, XA_RECORDEVENT_BUFFER_FULL, 0, NULL}; @@ -1770,24 +1767,24 @@ mCtx->writepos=0; mCtx->recThrCtx.buffer_insufficient = XA_BOOLEAN_TRUE; if ( XAImpl_PostSemaphore( mCtx->recThrCtx.bufInsufficientSem ) != XA_RESULT_SUCCESS) - { + { DEBUG_ERR("Posting buffer-insufficien semaphore FAILED!"); - } } - gst_buffer_unref (buffer); } + gst_buffer_unref (buffer); + } else - { + { DEBUG_ERR("Could not pull buffer from appsink!"); - } + } DEBUG_API("<-XAMediaRecorderAdapt_BufferAvailable"); - } +} /* * void* XAMediaRecorderAdapt_RecordEventThr( void* ctx ) */ void* XAMediaRecorderAdapt_RecordEventThr( void* ctx ) - { +{ XAMediaRecorderAdaptationCtx* mrCtx = (XAMediaRecorderAdaptationCtx*)ctx; GstStateChangeReturn gret; XAresult ret; @@ -1796,43 +1793,43 @@ /* Wait semaphore here */ ret = XAImpl_WaitSemaphore( mrCtx->recThrCtx.bufInsufficientSem ); if ( ret != XA_RESULT_SUCCESS) - { + { DEBUG_ERR("Could not start semaphore"); - } + } if(mrCtx->recThrCtx.buffer_insufficient) - { + { mrCtx->baseObj.binWantedState = GST_STATE_PAUSED; XAAdaptationGst_PrepareAsyncWait(&(mrCtx->baseObj)); gret = gst_element_set_state( GST_ELEMENT(mrCtx->baseObj.bin), mrCtx->baseObj.binWantedState); if( gret == GST_STATE_CHANGE_ASYNC ) - { + { DEBUG_INFO("Start to wait recoder state change."); XAAdaptationGst_StartAsyncWait(&(mrCtx->baseObj)); DEBUG_INFO("Recorder state change async. SUCCESFULL."); - } + } else if( gret == GST_STATE_CHANGE_FAILURE ) - { + { DEBUG_INFO("Recorder state change FAILED"); /*ret = XA_RESULT_INTERNAL_ERROR;*/ - } + } else - { + { DEBUG_INFO("Recorder state change SUCCESFULL") - } + } mrCtx->baseObj.waitingasyncop= XA_BOOLEAN_FALSE; - } + } DEBUG_API("<-XAMediaRecorderAdapt_RecordEventThr"); return NULL; - } +} /*XAresult XAMediaRecorderAdapt_CreateCapsFilter( XAMediaRecorderAdaptationCtx* ctx ) { GstCaps* encSrcCaps = NULL; XADataFormat_MIME *pMime = 0; - + if (!ctx ) return XA_RESULT_PARAMETER_INVALID; @@ -1852,10 +1849,10 @@ DEBUG_ERR("Could not add audio filter to bin"); return XA_RESULT_INTERNAL_ERROR; } - + pMime = (XADataFormat_MIME*) ctx->xaSink->pFormat; if(!strcmp((const char*)pMime->mimeType, "audio/amr")) - { + { encSrcCaps = gst_caps_new_simple ("audio/amr", "width", G_TYPE_INT, ctx->audioEncSettings.bitsPerSample, "depth", G_TYPE_INT, ctx->audioEncSettings.bitsPerSample, @@ -1863,14 +1860,14 @@ "endianness",G_TYPE_INT, G_BYTE_ORDER, "rate", G_TYPE_INT, ctx->audioEncSettings.sampleRate, "channels", G_TYPE_INT, ctx->audioEncSettings.channelsOut, NULL); - } + } else - { + { encSrcCaps = gst_caps_new_full( gst_structure_new("audio/x-raw-int", "channels", G_TYPE_INT, ctx->audioEncSettings.channelsOut, - "width", G_TYPE_INT, ctx->audioEncSettings.bitsPerSample, - "width", G_TYPE_INT, ctx->audioEncSettings.bitsPerSample, + "width", G_TYPE_INT, ctx->audioEncSettings.bitsPerSample, + "width", G_TYPE_INT, ctx->audioEncSettings.bitsPerSample, "rate", G_TYPE_INT, ctx->audioEncSettings.sampleRate, "bitrate", G_TYPE_INT, ctx->audioEncSettings.bitRate, "signed",G_TYPE_BOOLEAN, TRUE, @@ -1886,7 +1883,7 @@ NULL), NULL); - } + } DEBUG_INFO_A1("audio encoder config from settings: %s",gst_caps_to_string(encSrcCaps)); diff -r 1fa3fb47b1e3 -r c2e43643db4c khronosfws/openmax_al/src/gst_adaptation/xametadataadaptation.c --- a/khronosfws/openmax_al/src/gst_adaptation/xametadataadaptation.c Wed Aug 18 10:17:22 2010 +0300 +++ b/khronosfws/openmax_al/src/gst_adaptation/xametadataadaptation.c Thu Sep 02 20:58:01 2010 +0300 @@ -11,7 +11,7 @@ * * Contributors: * -* Description: +* Description: * */ @@ -110,7 +110,7 @@ XAresult ret = XA_RESULT_SUCCESS; XAMetadataAdaptVars* mdv; DEBUG_API("->XAMetadataAdapt_PreInit"); - + if ( bCtx->baseObj.ctxId == XAMediaRecorderAdaptation ) { mdv = (XAMetadataAdaptVars*) calloc(1, sizeof(XAMetadataAdaptVars)); @@ -522,7 +522,7 @@ DEBUG_ERR("Nodetype not supported!"); ret = XA_RESULT_CONTENT_UNSUPPORTED; DEBUG_API_A1("<-XAMetadataInsertionItfAdapt_CreateChildNode (%d)", (int)ret); - return ret; + return ret; } mdv = mCtx->metadatavars; @@ -530,7 +530,9 @@ { DEBUG_ERR("Metadata variables not initialized!"); ret = XA_RESULT_PRECONDITIONS_VIOLATED; + return ret; } + switch(type) { case XA_NODETYPE_IMAGE: @@ -858,7 +860,7 @@ */ XAMetadataAdaptVars* XAMetadataAdapt_GetMetadataVars(XAAdaptationGstCtx *bCtx) { - + if( bCtx->baseObj.ctxId == XAMediaRecorderAdaptation ) { return ((XAMediaRecorderAdaptationCtx*)bCtx)->metadatavars; @@ -985,7 +987,7 @@ GST_MESSAGE_TYPE_NAME(message), GST_OBJECT_NAME(GST_MESSAGE_SRC(message))); gst_message_parse_tag (message, &new_tags); /* NOTE: only general tags received this way (not child nodes)*/ - + if( bCtx->baseObj.ctxId == XAMediaRecorderAdaptation ) { old_tags = &((XAMediaRecorderAdaptationCtx*)bCtx)->metadatavars->generaltags; diff -r 1fa3fb47b1e3 -r c2e43643db4c khronosfws/openmax_al/src/mediaplayer/xaseekitf.c --- a/khronosfws/openmax_al/src/mediaplayer/xaseekitf.c Wed Aug 18 10:17:22 2010 +0300 +++ b/khronosfws/openmax_al/src/mediaplayer/xaseekitf.c Thu Sep 02 20:58:01 2010 +0300 @@ -242,9 +242,9 @@ void XASeekItfImpl_Free(XASeekItfImpl* self) { DEBUG_API("->XASeekItfImpl_Free"); - assert(self==self->self); if(self) { + assert(self==self->self); free(self); } DEBUG_API("<-XASeekItfImpl_Free"); diff -r 1fa3fb47b1e3 -r c2e43643db4c khronosfws/openmax_al/src/mediarecorder/xaaudioencoderitf.c --- a/khronosfws/openmax_al/src/mediarecorder/xaaudioencoderitf.c Wed Aug 18 10:17:22 2010 +0300 +++ b/khronosfws/openmax_al/src/mediarecorder/xaaudioencoderitf.c Thu Sep 02 20:58:01 2010 +0300 @@ -304,9 +304,9 @@ void XAAudioEncoderItfImpl_Free(XAAudioEncoderItfImpl* self) { DEBUG_API("->XAAudioEncoderItfImpl_Free"); - assert( self==self->self ); if(self) { + assert( self==self->self ); free(self); } DEBUG_API("<-XAAudioEncoderItfImpl_Free"); diff -r 1fa3fb47b1e3 -r c2e43643db4c khronosfws/openmax_al/src/mediarecorder/xamediarecorder.c --- a/khronosfws/openmax_al/src/mediarecorder/xamediarecorder.c Wed Aug 18 10:17:22 2010 +0300 +++ b/khronosfws/openmax_al/src/mediarecorder/xamediarecorder.c Thu Sep 02 20:58:01 2010 +0300 @@ -208,7 +208,7 @@ /* Determine framework type that can handle recording */ fwType = (FWMgrFwType) FWMgrMOUnknown; /**/ - if (pDataSnk->pLocator) + if (pDataSnk && pDataSnk->pLocator) { XADataLocator_URI* dataLoc = (XADataLocator_URI*) pDataSnk->pLocator; if (dataLoc->locatorType == XA_DATALOCATOR_URI) diff -r 1fa3fb47b1e3 -r c2e43643db4c khronosfws/openmax_al/src/mmf_adaptation/cmmfbackendengine.cpp --- a/khronosfws/openmax_al/src/mmf_adaptation/cmmfbackendengine.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/khronosfws/openmax_al/src/mmf_adaptation/cmmfbackendengine.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -413,12 +413,12 @@ { //RDebug::Print(_L("CMMFBackendEngine::MvpuoEvent: Audio Device taken")); PausePlayback(); - XAAdaptEvent event = + XAAdaptEvent alEvent = { XA_PLAYITFEVENTS, XA_OBJECT_EVENT_RESOURCES_LOST, 0, NULL }; XAAdaptationBase_SendAdaptEvents( - (XAAdaptationBaseCtx*) iAdaptContext, &event); + (XAAdaptationBaseCtx*) iAdaptContext, &alEvent); } else if (event.iEventType == KMMFRefreshMetaData) { diff -r 1fa3fb47b1e3 -r c2e43643db4c khronosfws/openmax_al/src/mmf_adaptation/cmmfbackendengine.h --- a/khronosfws/openmax_al/src/mmf_adaptation/cmmfbackendengine.h Wed Aug 18 10:17:22 2010 +0300 +++ b/khronosfws/openmax_al/src/mmf_adaptation/cmmfbackendengine.h Thu Sep 02 20:58:01 2010 +0300 @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #ifdef ENABLE_GRAPHICS_SURFACE_INTEGRATION diff -r 1fa3fb47b1e3 -r c2e43643db4c khronosfws/openmax_al/src/mmf_adaptation/cmmfradiobackendengine.cpp --- a/khronosfws/openmax_al/src/mmf_adaptation/cmmfradiobackendengine.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/khronosfws/openmax_al/src/mmf_adaptation/cmmfradiobackendengine.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -28,358 +28,358 @@ CMMFRadioBackendEngine* CMMFRadioBackendEngine::Instance() { - if (!s_instance) - { - s_instance = new CMMFRadioBackendEngine(); - if (s_instance) - { - s_instance->ConstructL(); - } - } - return s_instance; + if (!s_instance) + { + s_instance = new CMMFRadioBackendEngine(); + if (s_instance) + { + s_instance->ConstructL(); + } + } + return s_instance; } void CMMFRadioBackendEngine::DeleteInstance() { - if (iFmTunerUtility) + if (iFmTunerUtility) { - iFmTunerUtility->Close(); - iFmTunerUtility = NULL; - } + iFmTunerUtility->Close(); + iFmTunerUtility = NULL; + } if (iRadioPlayerUtility) { - iRadioPlayerUtility->Close(); - iRadioPlayerUtility = NULL; + iRadioPlayerUtility->Close(); + iRadioPlayerUtility = NULL; } - + if (iRadioUtility) { - delete iRadioUtility; - iRadioUtility = NULL; - } - + delete iRadioUtility; + iRadioUtility = NULL; + } + } CMMFRadioBackendEngine::~CMMFRadioBackendEngine() { } - + CMMFRadioBackendEngine::CMMFRadioBackendEngine() { - + } void CMMFRadioBackendEngine::ConstructL() -{ - iRadioUtility = CRadioUtility::NewL( ETrue ); - if (iRadioUtility) - { - iFmTunerUtility = &iRadioUtility->RadioFmTunerUtilityL( *this ); - } - if (iFmTunerUtility) - { - iFmTunerUtility->EnableTunerInOfflineMode( ETrue ); - iFmTunerUtility->RequestTunerControl(); - } +{ + iRadioUtility = CRadioUtility::NewL( ETrue ); + if (iRadioUtility) + { + iFmTunerUtility = &iRadioUtility->RadioFmTunerUtilityL( *this ); + } + if (iFmTunerUtility) + { + iFmTunerUtility->EnableTunerInOfflineMode( ETrue ); + iFmTunerUtility->RequestTunerControl(); + } if (iRadioUtility) - { - iRadioPlayerUtility = &iRadioUtility->RadioPlayerUtilityL( *this ); - } - - SetForceMonoFlag(); - iDefaultFrequency = RADIO_DEFAULT_FREQ; - iDefaultFreqRange = (TFmRadioFrequencyRange)RADIO_DEFAULT_FREQ_RANGE; - iDefaultMinFreq = RADIO_DEFAULT_MIN_FREQ; - iDefaultMaxFreq = RADIO_DEFAULT_MAX_FREQ; - + { + iRadioPlayerUtility = &iRadioUtility->RadioPlayerUtilityL( *this ); + } + + SetForceMonoFlag(); + iDefaultFrequency = RADIO_DEFAULT_FREQ; + iDefaultFreqRange = (TFmRadioFrequencyRange)RADIO_DEFAULT_FREQ_RANGE; + iDefaultMinFreq = RADIO_DEFAULT_MIN_FREQ; + iDefaultMaxFreq = RADIO_DEFAULT_MAX_FREQ; + } void CMMFRadioBackendEngine::StationSeek(XAboolean aUpwards) { - if (iFmTunerUtility) - { - iFmTunerUtility->StationSeek(aUpwards); - } + if (iFmTunerUtility) + { + iFmTunerUtility->StationSeek(aUpwards); + } } void CMMFRadioBackendEngine::SetFrequency(TInt aFreq) { - DEBUG_API_A1("CMMFRadioBackendEngine::SetFrequency: %d", aFreq); - - if (iFmTunerUtility) - { - iFmTunerUtility->SetFrequency(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); - if (ret != KErrNone) - { - aFreq = iDefaultFrequency; - ret = KErrNone; - } - } - DEBUG_API_A1("CMMFRadioBackendEngine::GetFrequency RET: %d", ret); -// RDebug::Print(_L("CMMFRadioBackendEngine::GetFrequency RET: %d"), ret); - return ret; + DEBUG_API("CMMFRadioBackendEngine::GetFrequency"); + TInt ret = KErrNotFound; + if (iFmTunerUtility) + { + ret = iFmTunerUtility->GetFrequency(aFreq); + if (ret != KErrNone) + { + aFreq = iDefaultFrequency; + ret = KErrNone; + } + } + 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; + 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(); - } + if (iFmTunerUtility) + { + iFmTunerUtility->CancelSetFrequency(); + } } void CMMFRadioBackendEngine::CancelStationSeek() { - if (iFmTunerUtility) - { - iFmTunerUtility->CancelStationSeek(); - } + if (iFmTunerUtility) + { + iFmTunerUtility->CancelStationSeek(); + } } void CMMFRadioBackendEngine::SetFreqRange(TFmRadioFrequencyRange aRange) { - if (iFmTunerUtility) - { - iFmTunerUtility->SetFrequencyRange(aRange); - } + if (iFmTunerUtility) + { + iFmTunerUtility->SetFrequencyRange(aRange); + } } TInt CMMFRadioBackendEngine::GetFreqRange(TFmRadioFrequencyRange& aRange) { - TInt ret = KErrNotFound; - TInt minFreq; - TInt maxFreq; - - if (iFmTunerUtility) - { - ret = iFmTunerUtility->GetFrequencyRange((TFmRadioFrequencyRange&)aRange, (TInt&)minFreq, (TInt&)maxFreq); - if (ret != KErrNone) - { - minFreq = iDefaultMinFreq; - maxFreq = iDefaultMaxFreq; - aRange = iDefaultFreqRange; - ret = KErrNone; - } - } - DEBUG_API_A1("CMMFRadioBackendEngine::GetFreqRange RET: %d", ret); -// RDebug::Print(_L("CMMFRadioBackendEngine::GetFreqRange RET: %d"), ret); + TInt ret = KErrNotFound; + TInt minFreq; + TInt maxFreq; + + if (iFmTunerUtility) + { + ret = iFmTunerUtility->GetFrequencyRange((TFmRadioFrequencyRange&)aRange, (TInt&)minFreq, (TInt&)maxFreq); + if (ret != KErrNone) + { + minFreq = iDefaultMinFreq; + maxFreq = iDefaultMaxFreq; + aRange = iDefaultFreqRange; + ret = KErrNone; + } + } + 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); - if (ret != KErrNone) - { - aRange = iDefaultFreqRange; - aMinFreq = iDefaultMinFreq; - aMaxFreq = iDefaultMaxFreq; - ret = KErrNone; - } - } - DEBUG_API_A1("CMMFRadioBackendEngine::GetFreqRangeProperties RET: %d", ret); -// RDebug::Print(_L("CMMFRadioBackendEngine::GetFreqRangeProperties RET: %d"), ret); + TInt ret = KErrNotFound; + + if (iFmTunerUtility) + { + ret = iFmTunerUtility->GetFrequencyRange((TFmRadioFrequencyRange&)aRange, (TInt&)aMinFreq, (TInt&)aMaxFreq); + if (ret != KErrNone) + { + aRange = iDefaultFreqRange; + aMinFreq = iDefaultMinFreq; + aMaxFreq = iDefaultMaxFreq; + ret = KErrNone; + } + } + 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; + TInt ret = KErrNotFound; - if (iRadioPlayerUtility) - { - ret = iRadioPlayerUtility->GetMaxVolume(aMaxVol); - } + if (iRadioPlayerUtility) + { + ret = iRadioPlayerUtility->GetMaxVolume(aMaxVol); + } return ret; } TInt CMMFRadioBackendEngine::SetVolume(TInt aVol) { - TInt ret = KErrNotFound; + TInt ret = KErrNotFound; - if (iRadioPlayerUtility) - { - ret = iRadioPlayerUtility->SetVolume(aVol); - } + if (iRadioPlayerUtility) + { + ret = iRadioPlayerUtility->SetVolume(aVol); + } return ret; } TInt CMMFRadioBackendEngine::SetMute(XAboolean aMute) { - TInt ret = KErrNotFound; + TInt ret = KErrNotFound; - if (iRadioPlayerUtility) - { - ret = iRadioPlayerUtility->Mute(aMute); - } + if (iRadioPlayerUtility) + { + ret = iRadioPlayerUtility->Mute(aMute); + } return ret; } TInt CMMFRadioBackendEngine::GetVolume(TInt& aVol) { - TInt ret = KErrNotFound; + TInt ret = KErrNotFound; - if (iRadioPlayerUtility) - { - ret = iRadioPlayerUtility->GetVolume(aVol); - } + if (iRadioPlayerUtility) + { + ret = iRadioPlayerUtility->GetVolume(aVol); + } return ret; } -TInt CMMFRadioBackendEngine::GetForcedMonoReception(XAuint32& aForcedMono) +TInt CMMFRadioBackendEngine::GetForcedMonoReception(XAuint32& aForcedMono) { - TInt ret = KErrNotFound; - TBool forceMono; + TInt ret = KErrNotFound; + TBool forceMono(EFalse); - if (iFmTunerUtility) - { - ret = iFmTunerUtility->GetForcedMonoReception(forceMono); - if (ret == KErrNotReady) - { - aForcedMono = XA_STEREOMODE_AUTO; // Radio Utility Default value - return KErrNone; - } - } - - - if (forceMono) - { - aForcedMono = XA_STEREOMODE_MONO; - } - else - { - if (iForceStereo) - aForcedMono = XA_STEREOMODE_STEREO; - else - aForcedMono = XA_STEREOMODE_AUTO; - } + if (iFmTunerUtility) + { + ret = iFmTunerUtility->GetForcedMonoReception(forceMono); + if (ret == KErrNotReady) + { + aForcedMono = XA_STEREOMODE_AUTO; // Radio Utility Default value + return KErrNone; + } + } + + + if (forceMono) + { + aForcedMono = XA_STEREOMODE_MONO; + } + else + { + if (iForceStereo) + aForcedMono = XA_STEREOMODE_STEREO; + else + aForcedMono = XA_STEREOMODE_AUTO; + } return ret; } void CMMFRadioBackendEngine::PlayRadio() { - if (iRadioPlayerUtility) - { - iRadioPlayerUtility->Play(); - } + if (iRadioPlayerUtility) + { + iRadioPlayerUtility->Play(); + } } void CMMFRadioBackendEngine::StopRadio() { - if (iRadioPlayerUtility) - { - iRadioPlayerUtility->Stop(); - } + if (iRadioPlayerUtility) + { + iRadioPlayerUtility->Stop(); + } } TInt CMMFRadioBackendEngine::ForceMonoReception(XAuint32 aForcedMono) { - TInt ret = KErrNotFound; - XAuint32 currentMode; - - ret = GetForcedMonoReception(currentMode); - if (ret != XA_RESULT_SUCCESS) - return ret; - - if (iFmTunerUtility) - { - if (aForcedMono == XA_STEREOMODE_MONO) - { - iForceStereo = EFalse; - ret = iFmTunerUtility->ForceMonoReception(ETrue); - } - else if (aForcedMono == XA_STEREOMODE_STEREO) - { - iForceStereo = ETrue; - if (currentMode == XA_STEREOMODE_AUTO) // Transition from Auto to Stereo doesn't require Utility call: - { - MrftoForcedMonoChange(ETrue); - } - else - { - ret = iFmTunerUtility->ForceMonoReception(EFalse); - } - } - else // (aForcedMono == XA_STEREOMODE_AUTO) - { - iForceStereo = EFalse; - if (currentMode == XA_STEREOMODE_STEREO) // Transition from Stereo to Auto doesn't require Utility call: - { - MrftoForcedMonoChange(EFalse); - } - else - { - ret = iFmTunerUtility->ForceMonoReception(EFalse); - } - } - } - DEBUG_API_A1("CMMFRadioBackendEngine::ForceMonoReception RET: %d", ret); - // RDebug::Print(_L("CMMFRadioBackendEngine::ForceMonoReception RET: %d"), ret); + TInt ret = KErrNotFound; + XAuint32 currentMode; + + ret = GetForcedMonoReception(currentMode); + if (ret != XA_RESULT_SUCCESS) + return ret; + + if (iFmTunerUtility) + { + if (aForcedMono == XA_STEREOMODE_MONO) + { + iForceStereo = EFalse; + ret = iFmTunerUtility->ForceMonoReception(ETrue); + } + else if (aForcedMono == XA_STEREOMODE_STEREO) + { + iForceStereo = ETrue; + if (currentMode == XA_STEREOMODE_AUTO) // Transition from Auto to Stereo doesn't require Utility call: + { + MrftoForcedMonoChange(ETrue); + } + else + { + ret = iFmTunerUtility->ForceMonoReception(EFalse); + } + } + else // (aForcedMono == XA_STEREOMODE_AUTO) + { + iForceStereo = EFalse; + if (currentMode == XA_STEREOMODE_STEREO) // Transition from Stereo to Auto doesn't require Utility call: + { + MrftoForcedMonoChange(EFalse); + } + else + { + ret = iFmTunerUtility->ForceMonoReception(EFalse); + } + } + } + DEBUG_API_A1("CMMFRadioBackendEngine::ForceMonoReception RET: %d", ret); + // RDebug::Print(_L("CMMFRadioBackendEngine::ForceMonoReception RET: %d"), ret); return ret; } -XAresult CMMFRadioBackendEngine::SetForceMonoFlag() +XAresult CMMFRadioBackendEngine::SetForceMonoFlag() { - TInt ret = KErrNotFound; - TBool forceMono; + TInt ret = KErrNotFound; + TBool forceMono(EFalse); - if (iFmTunerUtility) - { - ret = iFmTunerUtility->GetForcedMonoReception(forceMono); - if (ret == KErrNotReady) - { - // For Radio Utility Default value = XA_STEREOMODE_STEREO - iForceStereo = ETrue; - return KErrNone; - } - - } - - if (forceMono == XA_STEREOMODE_MONO) - { - iForceStereo = EFalse; - } - else - { - iForceStereo = ETrue; - } + if (iFmTunerUtility) + { + ret = iFmTunerUtility->GetForcedMonoReception(forceMono); + if (ret == KErrNotReady) + { + // For Radio Utility Default value = XA_STEREOMODE_STEREO + iForceStereo = ETrue; + return KErrNone; + } + + } + + if (forceMono == XA_STEREOMODE_MONO) + { + iForceStereo = EFalse; + } + else + { + iForceStereo = ETrue; + } return ret; } XAresult CMMFRadioBackendEngine::SetRadioAdaptContext(void * adaptcontext) { - iRadioAdaptContext = adaptcontext; - return XA_RESULT_SUCCESS; -} + iRadioAdaptContext = adaptcontext; + return XA_RESULT_SUCCESS; +} XAresult CMMFRadioBackendEngine::SetPlayerAdaptContext(void * adaptcontext) { - iPlayerAdaptContext = adaptcontext; - return XA_RESULT_SUCCESS; -} + iPlayerAdaptContext = adaptcontext; + return XA_RESULT_SUCCESS; +} XAresult TranslateError(TInt error) { @@ -390,9 +390,9 @@ status = XA_RESULT_SUCCESS; break; // to do: investigate and add other possible errors: - + /* case XA_RESULT_PRECONDITIONS_VIOLATED: - + break; case XA_RESULT_PARAMETER_INVALID: @@ -404,7 +404,7 @@ break; case XA_RESULT_RESOURCE_LOST: - + break; case XA_RESULT_IO_ERROR: @@ -416,7 +416,7 @@ break; case XA_RESULT_CONTENT_UNSUPPORTED: - + break; case XA_RESULT_CONTENT_NOT_FOUND: @@ -441,7 +441,7 @@ break; */ default: - break; + break; } // end switch return status; } @@ -464,8 +464,8 @@ void CMMFRadioBackendEngine::MrftoSquelchChange( TBool /*aSquelch*/ ) { - -} + +} // ---------------------------------------------------- // CMMFRadioBackendEngine::MrftoForcedMonoChanged @@ -475,11 +475,11 @@ 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); -} - + 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 @@ -488,11 +488,11 @@ 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); -} - + DEBUG_API_A1("CMMFRadioBackendEngine::MrftoFrequencyChange: aNewFrequency = %d", aNewFrequency); + // RDebug::Print(_L("CMMFRadioBackendEngine::MrftoFrequencyChange aNewFrequency = %d"), aNewFrequency); + XARadioItfAdapt_FrequencyChange((XAAdaptationBaseCtx*)iRadioAdaptContext, aNewFrequency); +} + // ---------------------------------------------------- // CMMFRadioBackendEngine::MrftoFrequencyRangeChange // @@ -501,11 +501,11 @@ 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); -} - + 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 @@ -514,9 +514,9 @@ void CMMFRadioBackendEngine::MrftoOfflineModeStatusChange( TBool /*aOfflineMode*/ ) { - -} - + +} + // ---------------------------------------------------- // CMMFRadioBackendEngine::MrftoAntennaStatusChange // Called when antenna status changes. @@ -536,9 +536,9 @@ void CMMFRadioBackendEngine::MrftoFmTransmitterStatusChange( TBool /*aActive*/ ) { - + } - + // ---------------------------------------------------- // CMMFRadioBackendEngine::MrftoStationSeekComplete // @@ -548,9 +548,9 @@ TInt aError, TInt aFrequency ) { - XARadioItfAdapt_SeekComplete((XAAdaptationBaseCtx*)iRadioAdaptContext, aError, aFrequency); -} - + XARadioItfAdapt_SeekComplete((XAAdaptationBaseCtx*)iRadioAdaptContext, aError, aFrequency); +} + // ---------------------------------------------------- // CMMFRadioBackendEngine::MrftoSetFrequencyComplete // ---------------------------------------------------- @@ -558,18 +558,18 @@ 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); -} - + 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 // @@ -578,9 +578,9 @@ 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); + DEBUG_API_A1("CMMFRadioBackendEngine::MrftoSetFrequencyRangeComplete: aError = %d", aError); +// RDebug::Print(_L("CMMFRadioBackendEngine::MrftoSetFrequencyRangeComplete: aError = %d"), aError); + XARadioItfAdapt_SetFrequencyRangeComplete((XAAdaptationBaseCtx*)iRadioAdaptContext, aError); } // ---------------------------------------------------- @@ -590,9 +590,9 @@ void CMMFRadioBackendEngine::MrftoRequestTunerControlComplete( TInt aError) { -// RDebug::Print(_L("CMMFRadioBackendEngine::MrftoRequestTunerControlComplete: aError = %d"), aError); -} - +// RDebug::Print(_L("CMMFRadioBackendEngine::MrftoRequestTunerControlComplete: aError = %d"), aError); +} + // ---------------------------------------------------- // CMMFRadioBackendEngine::MrpoBalanceChange // @@ -602,9 +602,9 @@ TInt /*aLeftPercentage*/, TInt /*aRightPercentage*/ ) { - -} - + +} + // ---------------------------------------------------- // CMMFRadioBackendEngine::MrpoMuteChange // @@ -613,9 +613,9 @@ void CMMFRadioBackendEngine::MrpoMuteChange( TBool aMute ) { - XANokiaVolumeExtItfAdapt_MuteChange((XAAdaptationBaseCtx*)iPlayerAdaptContext, aMute); -} - + XANokiaVolumeExtItfAdapt_MuteChange((XAAdaptationBaseCtx*)iPlayerAdaptContext, aMute); +} + // ---------------------------------------------------- // CMMFRadioBackendEngine::MrpoVolumeChange // @@ -624,9 +624,9 @@ void CMMFRadioBackendEngine::MrpoVolumeChange( TInt aVolume ) { - XANokiaLinearVolumeItfAdapt_VolumeChange((XAAdaptationBaseCtx*)iPlayerAdaptContext, aVolume); -} - + XANokiaLinearVolumeItfAdapt_VolumeChange((XAAdaptationBaseCtx*)iPlayerAdaptContext, aVolume); +} + // ---------------------------------------------------- // CMMFRadioBackendEngine::MrpoStateChange This is Tuner State // Called when the state of the tuner changes @@ -635,130 +635,130 @@ 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); - } +{ + 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); - 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); - } -} - + 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 aRange, XAuint32* aMinFreq, XAuint32* aMaxFreq) - { - return ((CMMFRadioBackendEngine*)(context))->GetFreqRangeProperties((TFmRadioFrequencyRange&) aRange, (TInt&) *aMinFreq, (TInt&) *aMaxFreq); - } - - XAresult get_max_volume(void* context, XAmillibel* maxVol) - { - return ((CMMFRadioBackendEngine*)(context))->GetMaxVolume((TInt&)*maxVol); - } + 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 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); - } + XAresult get_freq_range_properties(void* context, XAuint8 aRange, XAuint32* aMinFreq, XAuint32* aMaxFreq) + { + return ((CMMFRadioBackendEngine*)(context))->GetFreqRangeProperties((TFmRadioFrequencyRange&) aRange, (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); + } } diff -r 1fa3fb47b1e3 -r c2e43643db4c khronosfws/openmax_al/src/mmf_adaptation/xametadataadaptctxmmf.c --- a/khronosfws/openmax_al/src/mmf_adaptation/xametadataadaptctxmmf.c Wed Aug 18 10:17:22 2010 +0300 +++ b/khronosfws/openmax_al/src/mmf_adaptation/xametadataadaptctxmmf.c Thu Sep 02 20:58:01 2010 +0300 @@ -28,43 +28,39 @@ DEBUG_API("->XAMetadataAdaptCtxMMF_Create"); pSelf = calloc(1, sizeof(XAMetadataAdaptationMMFCtx)); - if (pSelf) + 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; - } + /* memory allocation failed */ + DEBUG_ERR("Failed to allocate memory"); + DEBUG_API("<-XAMetadataAdaptCtxMMF_Create"); + return NULL; + } - if (pDataSrc) - { - 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 + if (XAAdaptationBaseMMF_Init(&(pSelf->baseObj), XAMDAdaptation) + != XA_RESULT_SUCCESS) { - DEBUG_ERR("Failed to create XAMetadataAdaptationMMFCtx !!!"); + free(pSelf); + DEBUG_ERR("Failed to init base context!!!"); + DEBUG_API("<-XAMetadataAdaptCtxMMF_Create"); return NULL; } - + + 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) + { + free(pSelf); + DEBUG_ERR("Failed to init mmf context!!!"); + DEBUG_API("<-XAMetadataAdaptCtxMMF_Create"); + return NULL; + } + } DEBUG_API("<- XAMetadataAdaptCtxMMF_Create"); return (XAAdaptationBaseCtx*) (&pSelf->baseObj.baseObj); diff -r 1fa3fb47b1e3 -r c2e43643db4c khronosfws/openmax_al/src/mmf_adaptation/xastreaminformationitfadaptationmmf.c --- a/khronosfws/openmax_al/src/mmf_adaptation/xastreaminformationitfadaptationmmf.c Wed Aug 18 10:17:22 2010 +0300 +++ b/khronosfws/openmax_al/src/mmf_adaptation/xastreaminformationitfadaptationmmf.c Thu Sep 02 20:58:01 2010 +0300 @@ -39,7 +39,7 @@ if (!adaptCtx || (adaptCtx->ctxId != XAMediaPlayerAdaptation)) { DEBUG_ERR("XA_RESULT_PARAMETER_INVALID"); - DEBUG_API("-mmfContext, numStreams); - DEBUG_API("- numStreams) { DEBUG_ERR("XA_RESULT_PARAMETER_INVALID"); - DEBUG_API("-codecId = codecId; + streamInfo->channels = channels; + streamInfo->sampleRate = sampleRate; + streamInfo->bitRate = bitRate; + streamInfo->langCountry[0] = '\0'; + streamInfo->duration = duration; + } + break; +/* + case XA_DOMAINTYPE_MIDI: { - case XA_DOMAINTYPE_AUDIO: - { - XAAudioStreamInformation* streamInfo = - (XAAudioStreamInformation*) info; - DEBUG_INFO("Assigning values for XAAudioStreamInformation"); - streamInfo->codecId = codecId; - streamInfo->channels = channels; - streamInfo->sampleRate = sampleRate; - streamInfo->bitRate = bitRate; - streamInfo->langCountry[0] = '\0'; - streamInfo->duration = duration; - } - break; - case XA_DOMAINTYPE_MIDI: - { - 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; - streamInfo->tracks = XA_MIDI_UNKNOWN; - streamInfo->bankType = XA_MIDIBANK_DEVICE; - /*streamInfo->bitRate = 0;*/ - streamInfo->langCountry[0] = '\0'; - streamInfo->duration = duration; - } - break; - case XA_DOMAINTYPE_VIDEO: - { - XAVideoStreamInformation* streamInfo = - (XAVideoStreamInformation*) info; - DEBUG_INFO("Assigning values for XAVideoStreamInformation"); - streamInfo->codecId = codecId; - streamInfo->width = width; - streamInfo->height = height; - streamInfo->bitRate = bitRate; - streamInfo->duration = duration; - streamInfo->frameRate = frameRate; - } - break; - case XA_DOMAINTYPE_IMAGE: - { - 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)*/ - - DEBUG_API("-channels = XA_MIDI_UNKNOWN; + streamInfo->tracks = XA_MIDI_UNKNOWN; + streamInfo->bankType = XA_MIDIBANK_DEVICE;*/ + /*streamInfo->bitRate = 0;*/ +/* streamInfo->langCountry[0] = '\0'; + streamInfo->duration = duration; + } + break; +*/ + case XA_DOMAINTYPE_VIDEO: + { + XAVideoStreamInformation* streamInfo = + (XAVideoStreamInformation*) info; + DEBUG_INFO("Assigning values for XAVideoStreamInformation"); + streamInfo->codecId = codecId; + streamInfo->width = width; + streamInfo->height = height; + streamInfo->bitRate = bitRate; + streamInfo->duration = duration; + streamInfo->frameRate = frameRate; + } + break; +/* + case XA_DOMAINTYPE_IMAGE: + { + 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; +*/ + }; + DEBUG_API("<-XAStreamInformationItfAdaptMMF_QueryStreamInformation"); return ret; } @@ -295,7 +304,7 @@ != XAMediaPlayerAdaptation)) { DEBUG_ERR("XA_RESULT_PARAMETER_INVALID"); - DEBUG_API("- numStreams) { DEBUG_ERR("XA_RESULT_PARAMETER_INVALID"); - DEBUG_API("-ctxId == XAMDAdaptation) { DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED"); - DEBUG_API("-ctxId != XAMediaPlayerAdaptation)) { DEBUG_ERR("XA_RESULT_PARAMETER_INVALID"); - DEBUG_API("-ctxId == XAMDAdaptation) { DEBUG_ERR("XA_RESULT_PRECONDITIONS_VIOLATED"); - DEBUG_API("- numStreams) { DEBUG_ERR("XA_RESULT_PARAMETER_INVALID"); - DEBUG_API("-XAStreamInformationItfAdaptMMF_SetActiveStream"); return ret; } - diff -r 1fa3fb47b1e3 -r c2e43643db4c khronosfws/openmax_al/src/radio/xaradioitf.c --- a/khronosfws/openmax_al/src/radio/xaradioitf.c Wed Aug 18 10:17:22 2010 +0300 +++ b/khronosfws/openmax_al/src/radio/xaradioitf.c Thu Sep 02 20:58:01 2010 +0300 @@ -11,7 +11,7 @@ * * Contributors: * -* Description: +* Description: * */ @@ -159,11 +159,8 @@ XAuint32 * pFreqInterval) { XAresult ret = XA_RESULT_SUCCESS; - XAboolean isSupported = XA_BOOLEAN_FALSE; XARadioItfImpl* impl = GetImpl(self); - *pFreqInterval = FREQINTERVAL; - DEBUG_API("->XARadioItfImpl_GetFreqRangeProperties"); if(!impl || !pMinFreq || !pMaxFreq || !pFreqInterval) @@ -173,9 +170,13 @@ DEBUG_API("<-XARadioItfImpl_GetFreqRangeProperties"); return XA_RESULT_PARAMETER_INVALID; } - + ret = XARadioItfAdapt_GetFreqRangeProperties( (XAAdaptationMMFCtx*)impl->adapCtx, range, pMinFreq, pMaxFreq ); + if (ret == XA_RESULT_SUCCESS) + { + *pFreqInterval = FREQINTERVAL; + } DEBUG_API("<-XARadioItfImpl_GetFreqRangeProperties"); return ret; @@ -196,7 +197,7 @@ XAuint32 minFreq; XAuint32 maxFreq; XAuint32 freqInterval; - + XARadioItfImpl* impl = GetImpl(self); DEBUG_API("->XARadioItfImpl_SetFrequency"); XA_IMPL_THREAD_SAFETY_ENTRY(XATSRadio); @@ -208,23 +209,23 @@ DEBUG_API("<-XARadioItfImpl_SetFrequency"); return XA_RESULT_PARAMETER_INVALID; } - - // Check for valid entries: - ret = XARadioItfImpl_GetFreqRangeProperties(self, range, &minFreq, &maxFreq, &freqInterval); + + // Check for valid entries: + ret = XARadioItfImpl_GetFreqRangeProperties(self, range, &minFreq, &maxFreq, &freqInterval); if (ret != XA_RESULT_SUCCESS) { XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio); - DEBUG_API("<-XARadioItfImpl_SetFrequency"); + DEBUG_API("<-XARadioItfImpl_SetFrequency"); return ret; - } - + } + if ( (freq < minFreq) || (freq > maxFreq) ) { XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio); - DEBUG_API("<-XARadioItfImpl_SetFrequency"); + DEBUG_API("<-XARadioItfImpl_SetFrequency"); return XA_RESULT_PARAMETER_INVALID; - } - + } + ret = XARadioItfAdapt_SetFrequency( (XAAdaptationMMFCtx*)impl->adapCtx, freq ); XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio); @@ -372,7 +373,7 @@ { impl->stereoMode = mode; } - } + } XA_IMPL_THREAD_SAFETY_EXIT(XATSRadio); DEBUG_API("<-XARadioItfImpl_SetStereoMode"); return ret; @@ -541,7 +542,7 @@ XAchar * pName, XAuint16 * pNameLength) { - + XAresult ret = XA_RESULT_FEATURE_UNSUPPORTED; DEBUG_API("<-XARadioItfImpl_GetPreset"); @@ -657,7 +658,7 @@ XARadioItfImpl* impl =(XARadioItfImpl*)pHandlerCtx; XAuint32 eventData = 0; XAboolean eventBoolean = XA_BOOLEAN_FALSE; - + DEBUG_API("->XARadioItfimpl_AdaptCb"); if(!impl) @@ -670,37 +671,37 @@ if( event->eventid == XA_ADAPT_RADIO_FREQUENCY_CHANGED && impl->callback ) { - DEBUG_API("Frequency changed in adaptation"); + 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, eventData, eventBoolean ); } - + else if( event->eventid == XA_ADAPT_RADIO_SEEK_COMPLETE && impl->callback ) { DEBUG_API("Seek complete in adaptation"); - eventBoolean = *(XAboolean*)event->data; - impl->callback( impl->cbPtrToSelf, impl->context, XA_RADIO_EVENT_SEEK_COMPLETED, eventData, eventBoolean ); + 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; + 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 */ diff -r 1fa3fb47b1e3 -r c2e43643db4c layers.sysdef.xml --- a/layers.sysdef.xml Wed Aug 18 10:17:22 2010 +0300 +++ b/layers.sysdef.xml Thu Sep 02 20:58:01 2010 +0300 @@ -3,16 +3,13 @@ ]> - + - - - @@ -43,9 +40,6 @@ - - - diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/3gpDataSourceAdapter/Group/3gpDataSourceAdapter.mmp --- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/3gpDataSourceAdapter/Group/3gpDataSourceAdapter.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/3gpDataSourceAdapter/Group/3gpDataSourceAdapter.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -49,7 +49,7 @@ LIBRARY ecom.lib -LIBRARY 3GPMP4Lib.lib +LIBRARY 3gpmp4lib.lib LIBRARY efsrv.lib // File server session LIBRARY bafl.lib // Resource file LIBRARY caf.lib diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/3gpaudioplaycontroller/Group/3GPAudioPlayControllerPlugin.mmp --- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/3gpaudioplaycontroller/Group/3GPAudioPlayControllerPlugin.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/3gpaudioplaycontroller/Group/3GPAudioPlayControllerPlugin.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -134,15 +134,21 @@ LIBRARY AdvancedAudioController.lib LIBRARY DevSoundAudioOutput.lib LIBRARY FileAudioOutput.lib -LIBRARY 3GPMP4Lib.lib +LIBRARY 3gpmp4lib.lib LIBRARY efsrv.lib // File server session LIBRARY bafl.lib // Resource file -LIBRARY MMFDevSound.lib +LIBRARY mmfdevsound.lib LIBRARY caf.lib LIBRARY cafutils.lib LIBRARY 3gpDataSourceAdapter.lib -LIBRARY FrameTable.lib // for CFrameTable -LIBRARY EAacPlusAudioControllerUtility.lib + +#ifndef WINSCW //to support build on Linux +LIBRARY FrameTable.lib // for CFrameTable +#else +LIBRARY frametable.lib +#endif + +LIBRARY EAACPlusAudioControllerUtility.lib LIBRARY AMRAudioControllerUtility.lib LIBRARY AWBAudioControllerUtility.lib @@ -152,15 +158,27 @@ #ifndef __AAC_PLUS_DECODER_PLUGIN LIBRARY AacDecoderConfig.lib #else + #ifndef WINSCW //to support build on Linux LIBRARY EAacPlusUtil.lib // MMF eAAC+ Utility + #else + LIBRARY eaacplusutil.lib + #endif LIBRARY EAacPlusDecoderIntfc.lib #endif #else - LIBRARY EAacPlusUtil.lib // MMF eAAC+ Utility + #ifndef WINSCW //to support build on Linux + LIBRARY EAacPlusUtil.lib // MMF eAAC+ Utility + #else + LIBRARY eaacplusutil.lib + #endif LIBRARY AacDecoderConfig.lib #endif #else - LIBRARY EAacPlusUtil.lib // MMF eAAC+ Utility + #ifndef WINSCW //to support build on Linux + LIBRARY EAacPlusUtil.lib // MMF eAAC+ Utility + #else + LIBRARY eaacplusutil.lib + #endif LIBRARY AacDecoderConfig.lib #endif diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/3gpaudioplaycontroller/Group/3GPAudioPlayControllerRecognizer.mmp --- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/3gpaudioplaycontroller/Group/3GPAudioPlayControllerRecognizer.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/3gpaudioplaycontroller/Group/3GPAudioPlayControllerRecognizer.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -47,5 +47,5 @@ LIBRARY euser.lib LIBRARY apmime.lib LIBRARY efsrv.lib -LIBRARY 3GPMP4Lib.lib +LIBRARY 3gpmp4lib.lib diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/3gpaudiorecordcontroller/Group/3GPAudioRecordControllerPlugin.mmp --- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/3gpaudiorecordcontroller/Group/3GPAudioRecordControllerPlugin.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/3gpaudiorecordcontroller/Group/3GPAudioRecordControllerPlugin.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -76,10 +76,10 @@ LIBRARY mmfserverbaseclasses.lib LIBRARY AdvancedAudioController.lib LIBRARY DevSoundAudioInput.lib -LIBRARY 3GPMP4Lib.lib +LIBRARY 3gpmp4lib.lib LIBRARY efsrv.lib // File server session LIBRARY bafl.lib // Resource file -LIBRARY MMFDevSound.lib +LIBRARY mmfdevsound.lib // for MP4MetaDataWrite LIBRARY MetaDataWrite.lib // for MMetaDataWriteCustomCommandImplementor diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/AdvancedAudioController/Group/AdvancedAudioController.mmp --- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/AdvancedAudioController/Group/AdvancedAudioController.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/AdvancedAudioController/Group/AdvancedAudioController.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -61,11 +61,17 @@ LIBRARY sysutil.lib LIBRARY mmfdevsound.lib LIBRARY mmfstandardcustomcommands.lib -LIBRARY custominterfacebuilder.lib -LIBRARY MetaDataUtility.lib +LIBRARY CustomInterfaceBuilder.lib +LIBRARY metadatautility.lib LIBRARY AudioOutputRouting.lib LIBRARY DrmDcf.lib -LIBRARY FrameTable.lib // for CFrameTable + +#ifndef WINSCW //to support build on Linux +LIBRARY FrameTable.lib // for CFrameTable +#else +LIBRARY frametable.lib +#endif + LIBRARY MMDataSourceFactory.lib // for MMultimediaDataSourceObserver LIBRARY StreamControlCustomCommands.lib // for MStreamControlCustomCommandImplementor LIBRARY DataSourceAdapter.lib diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/AdvancedAudioControllerUtility/Group/EAACPlusAudioControllerUtility.mmp --- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/AdvancedAudioControllerUtility/Group/EAACPlusAudioControllerUtility.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/AdvancedAudioControllerUtility/Group/EAACPlusAudioControllerUtility.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -42,9 +42,14 @@ LIBRARY euser.lib LIBRARY AdvancedAudioController.lib -LIBRARY EAacPlusUtil.lib // MMF eAAC+ Utility - Kirit +#ifndef WINSCW //to support build on Linux +LIBRARY EAacPlusUtil.lib // MMF eAAC+ Utility - Kirit +#else +LIBRARY eaacplusutil.lib +#endif + LIBRARY mmfserverbaseclasses.lib #ifdef EABI -LIBRARY ECOM.LIB +LIBRARY ecom.lib #endif diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/DevSoundAudioInput/Group/DevSoundAudioInput.mmp --- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/DevSoundAudioInput/Group/DevSoundAudioInput.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/DevSoundAudioInput/Group/DevSoundAudioInput.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -46,5 +46,5 @@ LIBRARY mmfdevsound.lib #ifdef EABI // modified by BuildTeam -LIBRARY ECOM.LIB +LIBRARY ecom.lib #endif diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/DevSoundAudioOutput/Group/DevSoundAudioOutput.mmp --- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/DevSoundAudioOutput/Group/DevSoundAudioOutput.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/DevSoundAudioOutput/Group/DevSoundAudioOutput.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -49,5 +49,5 @@ LIBRARY DataSourceAdapter.lib #ifdef EABI // modified by BuildTeam -LIBRARY ECOM.LIB +LIBRARY ecom.lib #endif diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/FileAudioOutput/Group/FileAudioOutput.mmp --- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/FileAudioOutput/Group/FileAudioOutput.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/FileAudioOutput/Group/FileAudioOutput.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -44,5 +44,5 @@ LIBRARY mmfcontrollerframework.lib LIBRARY mmfserverbaseclasses.lib #ifdef EABI -LIBRARY ECOM.LIB +LIBRARY ecom.lib #endif diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/MetaDataWrite/Group/MetaDataWrite.mmp --- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/MetaDataWrite/Group/MetaDataWrite.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/MetaDataWrite/Group/MetaDataWrite.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -39,4 +39,4 @@ LIBRARY euser.lib LIBRARY mediaclientaudio.lib -LIBRARY MMFControllerFramework.lib +LIBRARY mmfcontrollerframework.lib diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/PlaylistRecognizer/group/playlistrecognizer.mmp --- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/PlaylistRecognizer/group/playlistrecognizer.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/PlaylistRecognizer/group/playlistrecognizer.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -15,7 +15,7 @@ * */ -// Version : %version: bh1mmcf#4 % +// Version : %version: 5 % @@ -42,7 +42,7 @@ LIBRARY euser.lib LIBRARY apmime.lib -LIBRARY EFSRV.LIB +LIBRARY efsrv.lib LIBRARY playbackhelper.lib #ifdef __WINDOWS_MEDIA diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/aacaudioplaycontroller/Group/AACAudioPlayControllerPlugin.mmp --- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/aacaudioplaycontroller/Group/AACAudioPlayControllerPlugin.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/aacaudioplaycontroller/Group/AACAudioPlayControllerPlugin.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -85,29 +85,38 @@ LIBRARY DevSoundAudioOutput.lib LIBRARY FileAudioOutput.lib LIBRARY bafl.lib // Resource file -LIBRARY MMFDevSound.lib +LIBRARY mmfdevsound.lib LIBRARY efsrv.lib -LIBRARY FrameTable.lib // for CFrameTable + +#ifndef WINSCW //to support build on Linux +LIBRARY FrameTable.lib // for CFrameTable +#else +LIBRARY frametable.lib +#endif #ifndef __USE_AAC_CMMFCODEC #ifndef __USE_EAACPLUS_CMMFCODEC #ifndef __AAC_PLUS_DECODER_PLUGIN // only EAACPlusAudioControllerUtility support AAC optimization // LIBRARY AACAudioControllerUtility.lib - LIBRARY EAacPlusAudioControllerUtility.lib + LIBRARY EAACPlusAudioControllerUtility.lib LIBRARY AacDecoderConfig.lib #else - LIBRARY EAacPlusAudioControllerUtility.lib + LIBRARY EAACPlusAudioControllerUtility.lib LIBRARY EAacPlusDecoderIntfc.lib // LIBRARY EAacPlusFrameParser.lib - LIBRARY EAacPlusUtil.lib + #ifndef WINSCW //to support build on Linux + LIBRARY EAacPlusUtil.lib // MMF eAAC+ Utility + #else + LIBRARY eaacplusutil.lib + #endif #endif #else - LIBRARY EAacPlusAudioControllerUtility.lib + LIBRARY EAACPlusAudioControllerUtility.lib LIBRARY AacDecoderConfig.lib #endif #else - LIBRARY EAacPlusAudioControllerUtility.lib + LIBRARY EAACPlusAudioControllerUtility.lib LIBRARY AacDecoderConfig.lib #endif diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/aacaudioplaycontroller/Src/AACAudioPlayControllerHwDecoder.cpp --- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/aacaudioplaycontroller/Src/AACAudioPlayControllerHwDecoder.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/aacaudioplaycontroller/Src/AACAudioPlayControllerHwDecoder.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -21,7 +21,7 @@ // INCLUDE FILES #include "AACAudioPlayControllerDecoder.h" #include "DebugMacros.h" -#include +#include #include diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/amraudioplaycontroller/Data/AMRAudioPlayControllerResource.rss --- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/amraudioplaycontroller/Data/AMRAudioPlayControllerResource.rss Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/amraudioplaycontroller/Data/AMRAudioPlayControllerResource.rss Thu Sep 02 20:58:01 2010 +0300 @@ -30,9 +30,9 @@ // RESOURCE ADVANCED_AUDIO_CONTROLLER_RESOURCE amrDecoder { - shared_buffer_max_num = 1; - shared_buffer_max_size = 524288; // multiple of 1024 - shared_buffer_max_size_non_seekable_source = 8192; + shared_buffer_max_num = 2; + shared_buffer_max_size = 8192; + sampling_rate = EAapSampleRate8000Hz; stereo_support = 0; metadata_support = EAapMetadataSupportFalse; diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/amraudioplaycontroller/Group/AMRAudioPlayControllerPlugin.mmp --- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/amraudioplaycontroller/Group/AMRAudioPlayControllerPlugin.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/amraudioplaycontroller/Group/AMRAudioPlayControllerPlugin.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -87,7 +87,12 @@ LIBRARY FileAudioOutput.lib LIBRARY bafl.lib // Resource file LIBRARY efsrv.lib + +#ifndef WINSCW //to support build on Linux LIBRARY FrameTable.lib +#else +LIBRARY frametable.lib +#endif #ifdef EABI LIBRARY ecom.lib diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/amraudioplaycontroller/Src/AMRAudioPlayControllerPlugin.cpp --- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/amraudioplaycontroller/Src/AMRAudioPlayControllerPlugin.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/amraudioplaycontroller/Src/AMRAudioPlayControllerPlugin.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -51,14 +51,13 @@ { CAdvancedAudioPlayController::ConstructL(); - iAudioResource = CAMRAudioPlayControllerResource::NewL(); + iAudioResource = CAMRAudioPlayControllerResource::NewL(); TAapProperties aapProperties = iAudioResource->PropertiesL(); iSharedBufferMaxNum = aapProperties.iSharedBufferMaxNum; iSharedBufferMaxSize = aapProperties.iSharedBufferMaxSize; iMetaDataSupport = aapProperties.iMetaDataSupport; - iSharedBufferMaxSizeForNonSeekableSrc = aapProperties.iSharedBufferMaxSizeForNonSeekableSrc; - iAudioUtility = CAMRAudioControllerUtility::NewL(); - iDecoderBuilder = CAMRAudioPlayControllerDecoderBuilder::NewL(); + iAudioUtility = CAMRAudioControllerUtility::NewL(); + iDecoderBuilder = CAMRAudioPlayControllerDecoderBuilder::NewL(); } // ----------------------------------------------------------------------------- @@ -104,18 +103,6 @@ void CAMRAudioPlayControllerPlugin::DoAddDataSourceL() { DP0(_L("CAMRAudioPlayControllerPlugin::DoAddDataSourceL")); - // ou1cimx1#205863 - if (iSourceType != KUidMmfFileSource) - { - DP0(_L("CAMRAudioPlayControllerPlugin::DoAddDataSourceL not file source")); - if (iSharedBufferMaxNum <= 2) - { - iSharedBufferMaxNum = 3; - } - iSharedBufferMaxSize = iSharedBufferMaxSizeForNonSeekableSrc; - DP2(_L("CAMRAudioPlayControllerPlugin::DoAddDataSourceL new iSharedBufferMaxNum[%d] iSharedBufferMaxSize[%d]"), iSharedBufferMaxNum, iSharedBufferMaxSize); - } - } // ----------------------------------------------------------------------------- diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/awbaudioplaycontroller/Group/AWBAudioPlayControllerPlugin.mmp --- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/awbaudioplaycontroller/Group/AWBAudioPlayControllerPlugin.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/awbaudioplaycontroller/Group/AWBAudioPlayControllerPlugin.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -85,7 +85,12 @@ LIBRARY FileAudioOutput.lib LIBRARY bafl.lib // Resource file LIBRARY efsrv.lib -LIBRARY FrameTable.lib + +#ifndef WINSCW //to support build on Linux +LIBRARY FrameTable.lib // for CFrameTable +#else +LIBRARY frametable.lib +#endif #ifdef EABI LIBRARY ecom.lib diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/mp3audioplaycontroller/Group/MP3AudioPlayControllerPlugin.mmp --- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/mp3audioplaycontroller/Group/MP3AudioPlayControllerPlugin.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/mp3audioplaycontroller/Group/MP3AudioPlayControllerPlugin.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -85,7 +85,12 @@ LIBRARY bafl.lib // Resource file LIBRARY efsrv.lib LIBRARY charconv.lib + +#ifndef WINSCW //to support build on Linux LIBRARY FrameTable.lib +#else +LIBRARY frametable.lib +#endif #ifdef EABI LIBRARY ecom.lib diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/mp3audioplaycontroller/Src/MP3AudioPlayControllerHwDecoder.cpp --- a/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/mp3audioplaycontroller/Src/MP3AudioPlayControllerHwDecoder.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/audiocontrollerpluginsvariant/mp3audioplaycontroller/Src/MP3AudioPlayControllerHwDecoder.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -22,7 +22,7 @@ #include "MP3AudioPlayControllerDecoder.h" #include "DebugMacros.h" #include -#include +#include const TUint KRawMp3MaxFrameSize = 1441; const TUint KSizeOfInBuffer = 2*KRawMp3MaxFrameSize; diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/audiotonecontrollerplugin/ringtonerecognizer/group/recrt.mmp --- a/mmfenh/advancedaudiocontroller/audiotonecontrollerplugin/ringtonerecognizer/group/recrt.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/audiotonecontrollerplugin/ringtonerecognizer/group/recrt.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -36,7 +36,7 @@ SOURCE recrt.cpp -LIBRARY EUSER.LIB -LIBRARY APMIME.LIB +LIBRARY euser.lib +LIBRARY apmime.lib // End of File diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioPlaybackTestModule/group/AudioPlaybackTestModule.mmp --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioPlaybackTestModule/group/AudioPlaybackTestModule.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioPlaybackTestModule/group/AudioPlaybackTestModule.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -65,8 +65,8 @@ //LIBRARY parser.lib //LIBRARY logger.lib LIBRARY efsrv.lib -LIBRARY MediaClientAudio.lib -LIBRARY MMFControllerFramework.lib +LIBRARY mediaclientaudio.lib +LIBRARY mmfcontrollerframework.lib LIBRARY ecom.lib LIBRARY mmcommon.lib //LIBRARY estor.lib diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/conf/AudioRecorderTestModule.cfg --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/conf/AudioRecorderTestModule.cfg Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/conf/AudioRecorderTestModule.cfg Thu Sep 02 20:58:01 2010 +0300 @@ -15,7 +15,7 @@ Id 205 Title AudioRecord.2 - RecordClip - amr ErrorRange 5 000 000 -File e:\testing\data\record\RecAMRTest.AMR +File c:\data\RecAMRTest.AMR RecTime 15 000 000 [End_TestCase] @@ -23,7 +23,7 @@ #[TestCase] #Id 206 #Title AudioRecord.3 - SetMaxWriteLength - amr -#File e:\testing\data\record\SizeTest.amr +#File c:\data\SizeTest.amr #MaxLength 5000 #ErrorRange 2000 #[End_TestCase] @@ -43,7 +43,7 @@ [TestCase] Id 209 Title AudioRecord.5 - SetGain - amr -File e:\testing\data\record\GainTest.amr +File c:\data\GainTest.amr RecTime 15 0 0 RelativeGain 50 [End_TestCase] @@ -51,7 +51,7 @@ [TestCase] Id 209 Title AudioRecord.6 - SetGain - amr -File e:\testing\data\record\GainTest.amr +File c:\data\GainTest.amr RecTime 15 0 0 RelativeGain 12 [End_TestCase] @@ -59,7 +59,7 @@ [TestCase] Id 212 Title AudioRecord.7 - RecordBalance - amr -File e:\testing\data\record\BalanceTest.amr +File c:\data\BalanceTest.amr RecTime 7 0 0 Balance 0 [End_TestCase] @@ -127,7 +127,7 @@ [TestCase] Id 221 Title AudioRecord.15 - BitRate 4750 - amr -File e:\testing\data\record\TestBitRate.amr +File c:\data\TestBitRate.amr RecTime 15 0 0 BitRate 4750 [End_TestCase] @@ -135,7 +135,7 @@ [TestCase] Id 221 Title AudioRecord.16 - BitRate 5150 - amr -File e:\testing\data\record\TestBitRate.amr +File c:\data\TestBitRate.amr RecTime 15 0 0 BitRate 5150 [End_TestCase] @@ -143,7 +143,7 @@ [TestCase] Id 221 Title AudioRecord.17 - BitRate 5900 - amr -File e:\testing\data\record\TestBitRate.amr +File c:\data\TestBitRate.amr RecTime 15 0 0 BitRate 5900 [End_TestCase] @@ -151,7 +151,7 @@ [TestCase] Id 221 Title AudioRecord.18 - BitRate 6700 - amr -File e:\testing\data\record\TestBitRate.amr +File c:\data\TestBitRate.amr RecTime 15 0 0 BitRate 6700 [End_TestCase] @@ -159,7 +159,7 @@ [TestCase] Id 221 Title AudioRecord.19 - BitRate 7400 - amr -File e:\testing\data\record\TestBitRate.amr +File c:\data\TestBitRate.amr RecTime 15 0 0 BitRate 7400 [End_TestCase] @@ -167,7 +167,7 @@ [TestCase] Id 221 Title AudioRecord.20 - BitRate 7950 - amr -File e:\testing\data\record\TestBitRate.amr +File c:\data\TestBitRate.amr RecTime 15 0 0 BitRate 7950 [End_TestCase] @@ -175,7 +175,7 @@ [TestCase] Id 221 Title AudioRecord.21 - BitRate 10200 - amr -File e:\testing\data\record\TestBitRate.amr +File c:\data\TestBitRate.amr RecTime 15 0 0 BitRate 10200 [End_TestCase] @@ -183,7 +183,7 @@ [TestCase] Id 221 Title AudioRecord.22 - BitRate 12200 - amr -File e:\testing\data\record\TestBitRate.amr +File c:\data\TestBitRate.amr RecTime 15 0 0 BitRate 12200 [End_TestCase] @@ -191,15 +191,15 @@ #[TestCase] #Id 223 #Title AudioRecord.23 - DataType amr - amr -#File e:\testing\data\record\testDataType.amr +#File c:\data\testDataType.amr #[End_TestCase] [TestCase] Id 211 Title AudioRecord.24 - SetPriority - amr -File e:\testing\data\record\PriorityTest1-.amr 5 0 6 0 0 -File e:\testing\data\record\PriorityTest2-.amr 3 1 2 0 0 -File e:\testing\data\record\PriorityTest3-.amr 8 0 11 0 0 +File c:\data\PriorityTest1-.amr 5 0 6 0 0 +File c:\data\PriorityTest2-.amr 3 1 2 0 0 +File c:\data\PriorityTest3-.amr 8 0 11 0 0 RecTime 3 0 0 [End_TestCase] @@ -220,7 +220,7 @@ Id 205 Title AudioRecord.26 - RecordClip - wav ErrorRange 5 000 000 -File e:\testing\data\record\RecWAVTest.wav +File c:\data\RecWAVTest.wav RecTime 15 000 000 [End_TestCase] @@ -228,7 +228,7 @@ [TestCase] Id 206 Title AudioRecord.27 - SetMaxWriteLength - WAV -File e:\testing\data\record\SizeTest.wav +File c:\data\SizeTest.wav MaxLength 5000 ErrorRange 2000 [End_TestCase] @@ -248,7 +248,7 @@ [TestCase] Id 209 Title AudioRecord.29 - SetGain - WAV -File e:\testing\data\record\GainTest.wav +File c:\data\GainTest.wav RecTime 15 0 0 RelativeGain 50 [End_TestCase] @@ -256,7 +256,7 @@ [TestCase] Id 209 Title AudioRecord.30 - SetGain - WAV -File e:\testing\data\record\GainTest.wav +File c:\data\GainTest.wav RecTime 15 0 0 RelativeGain 12 [End_TestCase] @@ -265,7 +265,7 @@ [TestCase] Id 209 Title AudioRecord.31 - SetGain beyond max Gain - wav -File e:\testing\data\record\GainTest.wav +File c:\data\GainTest.wav RecTime 15 0 0 RelativeGain 110 [End_TestCase] @@ -273,7 +273,7 @@ [TestCase] Id 211 Title AudioRecord.32 - PriorityRecordClip1 - WAV -File e:\testing\data\record\PriorityTest1-.wav 5 0 5 0 0 +File c:\data\PriorityTest1-.wav 5 0 5 0 0 RecTime 3 0 0 [End_TestCase] @@ -281,7 +281,7 @@ [TestCase] Id 211 Title AudioRecord.33 - PriorityRecordClip2 - WAV -File e:\testing\data\record\PriorityTest2-.wav 3 1 3 0 0 +File c:\data\PriorityTest2-.wav 3 1 3 0 0 RecTime 3 0 0 [End_TestCase] @@ -289,14 +289,14 @@ [TestCase] Id 211 Title AudioRecord.34 - PriorityRecordClip3 - WAV -File e:\testing\data\record\PriorityTest3-.wav 8 0 10 0 0 +File c:\data\PriorityTest3-.wav 8 0 10 0 0 RecTime 3 0 0 [End_TestCase] [TestCase] Id 212 Title AudioRecord.35 - RecordBalance center- WAV -File e:\testing\data\record\BalanceTest.wav +File c:\data\BalanceTest.wav RecTime 7 0 0 Balance 0 [End_TestCase] @@ -304,7 +304,7 @@ [TestCase] Id 212 Title AudioRecord.36 - RecordBalance max right- WAV -File e:\testing\data\record\BalanceTest.wav +File c:\data\BalanceTest.wav RecTime 7 0 0 Balance 100 [End_TestCase] @@ -312,7 +312,7 @@ [TestCase] Id 212 Title AudioRecord.37 - RecordBalance max left - WAV -File e:\testing\data\record\BalanceTest.wav +File c:\data\BalanceTest.wav RecTime 7 0 0 Balance -100 [End_TestCase] @@ -320,7 +320,7 @@ [TestCase] Id 212 Title AudioRecord.38 - RecordBalance right - WAV -File e:\testing\data\record\BalanceTest.wav +File c:\data\BalanceTest.wav RecTime 7 0 0 Balance 77 [End_TestCase] @@ -391,7 +391,7 @@ [TestCase] Id 222 Title AudioRecord.46 - 8000hz SampleRate wav -File e:\testing\data\record\testSR.wav +File c:\data\testSR.wav RecTime 15 0 0 SampleRate 8000 [End_TestCase] @@ -399,7 +399,7 @@ [TestCase] Id 222 Title AudioRecord.47 - 16000hz SampleRate wav -File e:\testing\data\record\testSR.wav +File c:\data\testSR.wav RecTime 15 0 0 SampleRate 16000 [End_TestCase] @@ -408,7 +408,7 @@ [TestCase] Id 222 Title AudioRecord.48 - 32000hz SampleRate wav -File e:\testing\data\record\testSR.wav +File c:\data\testSR.wav RecTime 15 0 0 SampleRate 32000 [End_TestCase] @@ -417,7 +417,7 @@ #[TestCase] #Id 223 #Title AudioRecord.49 - DataType wav -#File e:\testing\data\record\testDataType.wav +#File c:\data\testDataType.wav #[End_TestCase] @@ -426,7 +426,7 @@ Id 224 Title AudioRecord.50 - DataFormat WAV ErrorRange 0 0 0 -File e:\testing\data\record\testDataFormat.wav +File c:\data\testDataFormat.wav DataFormat wav [End_TestCase] @@ -434,7 +434,7 @@ [TestCase] Id 225 Title AudioRecord.51 - test steror Channel for wav -File e:\testing\data\record\testChannel.wav +File c:\data\testChannel.wav RecTime 15 0 0 Channels 2 [End_TestCase] @@ -442,7 +442,7 @@ [TestCase] Id 225 Title AudioRecord.52 - test mono Channel for wav -File e:\testing\data\record\testChannel.wav +File c:\data\testChannel.wav RecTime 15 0 0 Channels 1 [End_TestCase] @@ -465,7 +465,7 @@ Id 205 Title AudioRecord.54 - RecordClip - MP4 ErrorRange 5 000 000 -File e:\testing\data\record\RecMP4Test.MP4 +File c:\data\RecMP4Test.MP4 RecTime 15 000 000 BitRate 32000 Channels 1 @@ -487,7 +487,7 @@ [TestCase] Id 209 Title AudioRecord.56 - SetGain - Mp4 -File e:\testing\data\record\GainTest.mp4 +File c:\data\GainTest.mp4 RecTime 15 0 0 RelativeGain 50 BitRate 32000 @@ -499,7 +499,7 @@ [TestCase] Id 209 Title AudioRecord.57 - SetGain - Mp4 -File e:\testing\data\record\GainTest.mp4 +File c:\data\GainTest.mp4 RecTime 15 0 0 RelativeGain 12 BitRate 32000 @@ -512,7 +512,7 @@ [TestCase] Id 209 Title AudioRecord.58 - SetGain beyond max Gain - Mp4 -File e:\testing\data\record\GainTest.mp4 +File c:\data\GainTest.mp4 RecTime 15 0 0 RelativeGain 110 BitRate 32000 @@ -526,7 +526,7 @@ [TestCase] Id 212 Title AudioRecord.59 - RecordBalance center- Mp4 -File e:\testing\data\record\BalanceTest.mp4 +File c:\data\BalanceTest.mp4 RecTime 7 0 0 Balance 0 BitRate 32000 @@ -590,7 +590,7 @@ [TestCase] Id 221 Title AudioRecord.66 - BitRate - Mp4 -File e:\testing\data\record\TestBitRate.mp4 +File c:\data\TestBitRate.mp4 RecTime 15 0 0 DataFormat mp4 [End_TestCase] @@ -598,7 +598,7 @@ [TestCase] Id 222 Title AudioRecord.67 - 8000hz SampleRate Mp4 -File e:\testing\data\record\testSR.mp4 +File c:\data\testSR.mp4 RecTime 15 0 0 SampleRate 8000 [End_TestCase] @@ -606,7 +606,7 @@ [TestCase] Id 222 Title AudioRecord.68 - 16000hz SampleRate Mp4 -File e:\testing\data\record\testSR.mp4 +File c:\data\testSR.mp4 RecTime 15 0 0 SampleRate 16000 [End_TestCase] @@ -615,7 +615,7 @@ [TestCase] Id 222 Title AudioRecord.69 - 32000hz SampleRate Mp4 -File e:\testing\data\record\testSR.mp4 +File c:\data\testSR.mp4 RecTime 15 0 0 SampleRate 32000 [End_TestCase] @@ -624,14 +624,14 @@ #[TestCase] #Id 223 #Title AudioRecord.70 - DataType mp4 -#File e:\testing\data\record\testDataType.mp4 +#File c:\data\testDataType.mp4 #[End_TestCase] [TestCase] Id 225 Title AudioRecord.71 - test steror Channel for mp4 -File e:\testing\data\record\testChannel.mp4 +File c:\data\testChannel.mp4 RecTime 15 0 0 Channels 2 [End_TestCase] @@ -639,7 +639,7 @@ [TestCase] Id 225 Title AudioRecord.72 - test mono Channel for mp4 -File e:\testing\data\record\testChannel.mp4 +File c:\data\testChannel.mp4 RecTime 15 0 0 Channels 1 [End_TestCase] @@ -648,7 +648,7 @@ [TestCase] Id 211 Title AudioRecord.73 - PriorityRecordClip1 - Mp4 -File e:\testing\data\record\PriorityTest1-.mp4 5 0 5 0 0 +File c:\data\PriorityTest1-.mp4 5 0 5 0 0 RecTime 3 0 0 BitRate 32000 Channels 2 @@ -659,7 +659,7 @@ [TestCase] Id 211 Title AudioRecord.74 - PriorityRecordClip2 - Mp4 -File e:\testing\data\record\PriorityTest2-.mp4 3 1 3 0 0 +File c:\data\PriorityTest2-.mp4 3 1 3 0 0 RecTime 3 0 0 BitRate 32000 Channels 2 @@ -671,7 +671,7 @@ [TestCase] Id 211 Title AudioRecord.75 - PriorityRecordClip3 - Mp4 -File e:\testing\data\record\PriorityTest3-.mp4 8 0 10 0 0 +File c:\data\PriorityTest3-.mp4 8 0 10 0 0 RecTime 3 0 0 BitRate 32000 Channels 2 @@ -727,7 +727,7 @@ Id 219 Title Plugin.REC.28 - CropL from middle ErrorRange 2 0 0 -File e:\testing\data\record\CropTest.amr +File c:\data\CropTest.amr RecTime 10 0 0 RelativePos 50 [End_TestCase] @@ -736,7 +736,7 @@ Id 219 Title Plugin.REC.36 - CropFromBeginningL from middle ErrorRange 2 0 0 -File e:\testing\data\record\CropTest.wav +File c:\data\CropTest.wav RecTime 10 0 0 FromBegining 0 RelativePos 50 @@ -846,7 +846,7 @@ [End_TestCase] -//not working??? +//Fails on Udeb logs enabled image, .Need to test on clean fix image [TestCase] Id 201 Title AudioRecord.87 - RecordFormats right - amr diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/group/AudioRecorderTestModule.mmp --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/group/AudioRecorderTestModule.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/group/AudioRecorderTestModule.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -87,9 +87,9 @@ LIBRARY euser.lib LIBRARY ecom.lib LIBRARY stiftestinterface.lib -LIBRARY MediaClientAudio.lib +LIBRARY mediaclientaudio.lib LIBRARY efsrv.lib -LIBRARY MMFControllerFramework.lib +LIBRARY mmfcontrollerframework.lib LIBRARY mmcommon.lib LIBRARY ecom.lib diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/inc/AudioResourceNotification.h --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/inc/AudioResourceNotification.h Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/inc/AudioResourceNotification.h Thu Sep 02 20:58:01 2010 +0300 @@ -54,6 +54,7 @@ CMdaAudioRecorderUtility* recorder; void ConstructL(TFileName* fileName); + TInt iCallBackErr; }; diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/inc/CustomCommand.h --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/inc/CustomCommand.h Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/inc/CustomCommand.h Thu Sep 02 20:58:01 2010 +0300 @@ -54,6 +54,7 @@ CMdaAudioRecorderUtility* recorder; void ConstructL(TFileName* fileName); + TInt iCallBackErr; }; diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/inc/CustomCommandAsync.h --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/inc/CustomCommandAsync.h Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/inc/CustomCommandAsync.h Thu Sep 02 20:58:01 2010 +0300 @@ -54,6 +54,7 @@ CMdaAudioRecorderUtility* recorder; void ConstructL(TFileName* fileName); + TInt iCallBackErr; }; diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/inc/RecordFormats.h --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/inc/RecordFormats.h Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/inc/RecordFormats.h Thu Sep 02 20:58:01 2010 +0300 @@ -46,6 +46,7 @@ private: void ConstructL(TFileName* fileName); + TInt iCallBackErr; }; #endif // !defined(AFX_RECORDFORMATS_H__3EDE1ACC_939F_49BE_B0B1_55C01807632D__INCLUDED_) diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/inc/ThreadPriority.h --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/inc/ThreadPriority.h Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/inc/ThreadPriority.h Thu Sep 02 20:58:01 2010 +0300 @@ -46,6 +46,8 @@ CMdaAudioRecorderUtility* recorder; void ConstructL(TFileName* fileName); + + TInt iCallbackErr; }; diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/AudioLoadingProgress.cpp --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/AudioLoadingProgress.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/AudioLoadingProgress.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -142,9 +142,15 @@ #ifdef _DEBUG RDebug::Print (_L ("CAudioLoadingProgress::MoscoStateChangeEvent")); #endif - TInt err = KErrNone; - callbackErr = KErrNone; + + callbackErr = aErrorCode; + if (aErrorCode != KErrNone) + { + + CActiveScheduler::Stop(); + + } logger->Log(_L("MoscoStateChangeEvent called, error: %d prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState); TInt aState = recorder->State(); diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/AudioResourceNotification.cpp --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/AudioResourceNotification.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/AudioResourceNotification.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -28,6 +28,7 @@ { console = aConsole; logger = aLogger; + iCallBackErr = KErrNone; } @@ -107,7 +108,10 @@ CleanupStack::PushL(selfObj); CActiveScheduler::Start(); - + if(selfObj->iCallBackErr != KErrNone) + { + error = selfObj->iCallBackErr; + } CleanupStack::PopAndDestroy(2); // schedule, selfObj @@ -141,7 +145,7 @@ logger->Log(_L("MoscoStateChangeEvent called, error: %d prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState); - + iCallBackErr = aErrorCode; if (recorder && aErrorCode == KErrNone && aCurrentState == CMdaAudioClipUtility::EOpen && aPreviousState == 0) { @@ -205,9 +209,15 @@ recorder->WillResumePlay(); CActiveScheduler::Stop(); + return; } - - return; + if (aErrorCode != KErrNone) + { + + CActiveScheduler::Stop(); + return; + } + } @@ -222,7 +232,7 @@ } -void CAudioResourceNotification::MarncResourceAvailable(TUid aNotificationEventId, const TDesC8 &aNotificationData) +void CAudioResourceNotification::MarncResourceAvailable(TUid /*aNotificationEventId*/, const TDesC8 &/*aNotificationData*/) { logger->Log(_L("MarncResourceAvailable ")); } diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/CropFromBeginning.cpp --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/CropFromBeginning.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/CropFromBeginning.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -107,7 +107,7 @@ CActiveScheduler::Start(); - if (error == KErrNone) + if (selfObj->callbackErr != KErrNone) { error = selfObj->callbackErr; } @@ -140,8 +140,8 @@ #ifdef _DEBUG RDebug::Print (_L ("CCropFromBeginning::MoscoStateChangeEvent")); #endif - TInt err = KErrNone; -// callbackErr = KErrNone; + + callbackErr = aErrorCode; logger->Log(_L("MoscoStateChangeEvent called, error: %d prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState); @@ -185,6 +185,12 @@ CActiveScheduler::Stop(); } + if (aErrorCode != KErrNone) + { + + CActiveScheduler::Stop(); + + } return; diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/CustomCommand.cpp --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/CustomCommand.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/CustomCommand.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -28,7 +28,7 @@ { console = aConsole; logger = aLogger; - + iCallBackErr = KErrNone; } CCustomCommand::~CCustomCommand() @@ -107,8 +107,12 @@ CleanupStack::PushL(selfObj); CActiveScheduler::Start(); - - + + if(selfObj->iCallBackErr != KErrNone) + { + error = selfObj->iCallBackErr; + } + CleanupStack::PopAndDestroy(2); // schedule, selfObj return error; @@ -137,13 +141,16 @@ #ifdef _DEBUG RDebug::Print (_L ("CCustomCommand::MoscoStateChangeEvent")); #endif - TInt err = KErrNone; + logger->Log(_L("MoscoStateChangeEvent called, error: %d prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState); - + + iCallBackErr = aErrorCode; + TUint bitRate = recorder->SourceBitRateL(); logger->Log(_L("SourceBitRateL %d "),bitRate); - + + if (recorder && aErrorCode == KErrNone && aCurrentState == CMdaAudioClipUtility::EOpen && aPreviousState == 0) { @@ -237,6 +244,12 @@ recorder->WillResumePlay(); CActiveScheduler::Stop(); } + if(aErrorCode != KErrNone) + { + + CActiveScheduler::Stop(); + + } return; diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/CustomCommandAsync.cpp --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/CustomCommandAsync.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/CustomCommandAsync.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -28,6 +28,7 @@ { console = aConsole; logger = aLogger; + iCallBackErr = KErrNone; } @@ -108,7 +109,10 @@ CActiveScheduler::Start(); - + if(selfObj->iCallBackErr != KErrNone) + { + error = selfObj->iCallBackErr; + } CleanupStack::PopAndDestroy(2); // schedule, selfObj return error; @@ -137,12 +141,11 @@ #ifdef _DEBUG RDebug::Print (_L ("CCustomCommandAsync::MoscoStateChangeEvent")); #endif - TInt err = KErrNone; + logger->Log(_L("MoscoStateChangeEvent called, error: %d prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState); - - + iCallBackErr = aErrorCode; if (recorder && aErrorCode == KErrNone && aCurrentState == CMdaAudioClipUtility::EOpen && aPreviousState == 0) { TBuf8<25> dataFrom; @@ -204,6 +207,12 @@ CActiveScheduler::Stop(); } + if (aErrorCode != KErrNone) + { + + CActiveScheduler::Stop(); + + } return; } diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/MetaDataEntry.cpp --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/MetaDataEntry.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/MetaDataEntry.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -109,7 +109,7 @@ CActiveScheduler::Start(); - if (error == KErrNone) + if (selfObj->callbackErr != KErrNone) { error = selfObj->callbackErr; } @@ -143,13 +143,12 @@ RDebug::Print (_L ("CMetaDataEntry::MoscoStateChangeEvent")); #endif TInt err = KErrNone; -// callbackErr = KErrNone; + callbackErr = aErrorCode; RArray dataTypes; logger->Log(_L("MoscoStateChangeEvent called, error: %d prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState); - - + if (recorder && aErrorCode == KErrNone && aCurrentState == CMdaAudioClipUtility::EOpen && aPreviousState == 0) { // Initialize @@ -269,6 +268,13 @@ logger->Log(_L("before stop....-")); CActiveScheduler::Stop(); } + if (aErrorCode != KErrNone) + { + + CActiveScheduler::Stop(); + + } + return; diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/PlayBalance.cpp --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/PlayBalance.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/PlayBalance.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -225,6 +225,11 @@ CActiveScheduler::Stop(); } + if (aErrorCode != KErrNone) + { + expectedBalance = 0; + CActiveScheduler::Stop(); + } return; diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/PlayRamp.cpp --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/PlayRamp.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/PlayRamp.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -201,6 +201,13 @@ logger->Log(_L("MoscoStateChangeEvent GetVolume after play: %d "),expectedVol); CActiveScheduler::Stop(); } + + if (aErrorCode != KErrNone) + { + expectedVol = 0; + CActiveScheduler::Stop(); + + } return; } diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/PlayVolume.cpp --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/PlayVolume.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/PlayVolume.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -115,8 +115,14 @@ this->volume = volume; logger->Log(_L("MoscoStateChangeEvent getVolume: %d "),volume); CActiveScheduler::Stop(); + return; } - return; + if (aErrorCode != KErrNone) + { + CActiveScheduler::Stop(); + return; + } + } diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/PlayWindow.cpp --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/PlayWindow.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/PlayWindow.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -227,6 +227,10 @@ CActiveScheduler::Stop(); } + if (aErrorCode != KErrNone) + { + CActiveScheduler::Stop(); + } return; } diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/RecordDataFormat.cpp --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/RecordDataFormat.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/RecordDataFormat.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -122,7 +122,7 @@ CActiveScheduler::Start(); - if (error == KErrNone) + if (selfObj->callbackErr != KErrNone) { error = selfObj->callbackErr; } @@ -160,7 +160,6 @@ if (recorder && aErrorCode == KErrNone && aCurrentState == CMdaAudioClipUtility::EOpen && aPreviousState == 0) { - if (dataFormat == KFormatWav) { logger->Log(_L("SetDestinationFormatL(KMmfUidFormatWAVWrite)")); @@ -174,13 +173,11 @@ CActiveScheduler::Stop(); return; } - if (recorder->DestinationFormatL() != id) { logger->Log(_L("Retrieved format is not same as set format") ); callbackErr = KErrOutOfRange; } - } else { @@ -209,6 +206,10 @@ }*/ } } + if (aErrorCode != KErrNone) + { + callbackErr = aErrorCode; + } CActiveScheduler::Stop(); return; diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/RecordDataType.cpp --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/RecordDataType.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/RecordDataType.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -107,7 +107,11 @@ CleanupStack::PushL(selfObj); CActiveScheduler::Start(); - + + if(selfObj->callbackErr != KErrNone) + { + error = selfObj->callbackErr; + } CleanupStack::PopAndDestroy(2); // schedule, selfObj @@ -137,8 +141,8 @@ #ifdef _DEBUG RDebug::Print (_L ("CRecordDataType::MoscoStateChangeEvent")); #endif - TInt err = KErrNone; - callbackErr = KErrNone; + + callbackErr = aErrorCode; RArray dataTypes; logger->Log(_L("MoscoStateChangeEvent called, error: %d prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState); @@ -207,7 +211,11 @@ CActiveScheduler::Stop(); } - + if (aErrorCode != KErrNone) + { + CActiveScheduler::Stop(); + + } return; diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/RecordFormats.cpp --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/RecordFormats.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/RecordFormats.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -29,6 +29,7 @@ { console = aConsole; logger = aLogger; + iCallBackErr = KErrNone; } CRecordFormats::~CRecordFormats() @@ -81,7 +82,8 @@ #endif logger->Log(_L("MoscoStateChangeEvent called, error: %d prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState); - + iCallBackErr = aErrorCode; + if (recorder && aErrorCode == KErrNone && aCurrentState == CMdaAudioClipUtility::EOpen) { TRAPD(err3, recorder->AudioRecorderControllerImplementationInformationL()); @@ -106,6 +108,7 @@ TInt CRecordFormats::RunTestL(CTestModuleIf* aConsole, CStifLogger *aLogger, CStifSectionParser* aParser, TInt* /*clipCounter*/) { + TInt error = KErrNone; aLogger->Log(_L("Creating scheduler")); CActiveScheduler* scheduler = new (ELeave) CActiveScheduler; @@ -136,8 +139,11 @@ CActiveScheduler::Start(); CleanupStack::PopAndDestroy(2); - - return KErrNone; + + if(selfObj->iCallBackErr != KErrNone) + error = selfObj->iCallBackErr; + + return error; } diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/RecordOpen.cpp --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/RecordOpen.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/RecordOpen.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -259,7 +259,7 @@ //File with controller if (type == KOpenFile2) { - TInt aUid = 1; + //TInt aUid = 1; //TUid aRecordControllerUid = TUid::Uid(aUid); TUid aRecordControllerUid = KNullUid;//KUidInterfaceMMFController;//TUid::Uid(KMmfUidPluginInterfaceFormatDecode);//KMmfUidPluginInterfaceController;//{0x10203827}; //const TUid KUidBassBoostEffect = {0x10203827}; diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/RecordingBase.cpp --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/RecordingBase.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/RecordingBase.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -142,7 +142,8 @@ RDebug::Print (_L ("CRecordingBase::MoscoStateChangeEvent")); #endif - if (aErrorCode != KErrNone) + + logger->Log(_L("MoscoStateChangeEvent called, error: %d prev: %d curr : %d"), aErrorCode,aPreviousState,aCurrentState); /* diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/ThreadPriority.cpp --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/ThreadPriority.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/ThreadPriority.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -106,8 +106,10 @@ CleanupStack::PushL(selfObj); CActiveScheduler::Start(); - - + + if(selfObj->iCallbackErr != KErrNone) + error = selfObj->iCallbackErr; + CleanupStack::PopAndDestroy(2); // schedule, selfObj return error; @@ -136,10 +138,12 @@ #ifdef _DEBUG RDebug::Print (_L ("CThreadPriority::MoscoStateChangeEvent")); #endif - TInt err = KErrNone; + logger->Log(_L("MoscoStateChangeEvent called, error: %d prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState); logger->Log(_L("Before Checking Duaration.")); +iCallbackErr = aErrorCode; + TTimeIntervalMicroSeconds aDuration, aRecordTime; TMMFDurationInfo clipDuration = recorder->Duration(aDuration); logger->Log(_L("Duaration is %d"), aDuration.Int64()); @@ -191,10 +195,17 @@ CActiveScheduler::Stop(); + return; } + if (aErrorCode != KErrNone) + { + + CActiveScheduler::Stop(); + return ; + } - return; + } diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioStreamTestModule/group/AudioStreamTestModule.mmp --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioStreamTestModule/group/AudioStreamTestModule.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioStreamTestModule/group/AudioStreamTestModule.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -54,8 +54,8 @@ LIBRARY ecom.lib LIBRARY stiftestinterface.lib LIBRARY efsrv.lib -LIBRARY MediaClientAudioStream.lib -LIBRARY MediaClientAudioInputStream.lib +LIBRARY mediaclientaudiostream.lib +LIBRARY mediaclientaudioinputstream.lib LANG SC diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/EmulatorRecordTestModule/AudioRecorderBAT.cfg --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/EmulatorRecordTestModule/AudioRecorderBAT.cfg Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/EmulatorRecordTestModule/AudioRecorderBAT.cfg Thu Sep 02 20:58:01 2010 +0300 @@ -251,12 +251,13 @@ Title AudioRecord.85-1 - Open File/RFile/SFile/Desc with controller - amr ErrorRange 1 0 0 1 Desc2 c:\testing\data\amr\10s_AMR_NB_mode_0.amr 2 0 0 -[End_TestCase +[End_TestCase] +// This test case is not used temporarily because the value used is the local variable for testing //Open SourceFile/Desc -[TestCase] -Id 234 -Title AudioRecord.88 - Open Desc - amr -ErrorRange 1 0 0 -1 Desc c:\testing\data\amr\10s_AMR_NB_mode_0.amr 2 0 0 -[End_TestCase] \ No newline at end of file +//[TestCase] +//Id 234 +//Title AudioRecord.88 - Open Desc - amr +//ErrorRange 1 0 0 +//1 Desc c:\testing\data\amr\10s_AMR_NB_mode_0.amr 2 0 0 +//[End_TestCase] \ No newline at end of file diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/advancedaudiocontroller/wavplaycontrollerplugin/group/MmfAudioController.mmp --- a/mmfenh/advancedaudiocontroller/wavplaycontrollerplugin/group/MmfAudioController.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/advancedaudiocontroller/wavplaycontrollerplugin/group/MmfAudioController.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -49,7 +49,7 @@ LIBRARY mmfdevsound.lib LIBRARY mmfcontrollerframework.lib LIBRARY mmfstandardcustomcommands.lib -LIBRARY custominterfacebuilder.lib +LIBRARY CustomInterfaceBuilder.lib LIBRARY AudioOutputRouting.lib LIBRARY DrmDcf.lib LIBRARY ConfigurationComponentsFactory.lib diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/audiooutputcontrolutility/AudioOutputControlUtilityProxy/Group/AudioOutputControlUtilityProxy.mmp --- a/mmfenh/audiooutputcontrolutility/AudioOutputControlUtilityProxy/Group/AudioOutputControlUtilityProxy.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/audiooutputcontrolutility/AudioOutputControlUtilityProxy/Group/AudioOutputControlUtilityProxy.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -37,7 +37,7 @@ SYSTEMINCLUDE /epoc32/include/mmf/common SYSTEMINCLUDE /epoc32/include/mmf/server -LIBRARY Euser.lib +LIBRARY euser.lib LIBRARY AudioOutputControlUtility.lib LIBRARY ConfigurationComponentsFactory.lib LIBRARY RestrictedAudioOutput.lib diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/enhancedaudioplayerutility/AudioPlayer/group/S60AudioPlayer.mmp --- a/mmfenh/enhancedaudioplayerutility/AudioPlayer/group/S60AudioPlayer.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/enhancedaudioplayerutility/AudioPlayer/group/S60AudioPlayer.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -52,7 +52,7 @@ LIBRARY mmfcontrollerframework.lib LIBRARY mmfstandardcustomcommands.lib LIBRARY caf.lib -LIBRARY ECom.lib +LIBRARY ecom.lib LIBRARY S60AudioSource.lib LIBRARY S60AudioClientStreamSource.lib LIBRARY S60AudioUtility.lib diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/enhancedaudioplayerutility/AudioStreaming/AudioClientStreamSource/group/S60AudioClientStreamSource.mmp --- a/mmfenh/enhancedaudioplayerutility/AudioStreaming/AudioClientStreamSource/group/S60AudioClientStreamSource.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/enhancedaudioplayerutility/AudioStreaming/AudioClientStreamSource/group/S60AudioClientStreamSource.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -50,5 +50,5 @@ LIBRARY efsrv.lib LIBRARY mmfcontrollerframework.lib LIBRARY mmfstandardcustomcommands.lib -LIBRARY ECom.lib +LIBRARY ecom.lib LIBRARY S60AudioSource.lib diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/enhancedaudioplayerutility/S60AudioUtility/group/S60AudioUtility.mmp --- a/mmfenh/enhancedaudioplayerutility/S60AudioUtility/group/S60AudioUtility.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/enhancedaudioplayerutility/S60AudioUtility/group/S60AudioUtility.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -45,7 +45,7 @@ library euser.lib library efsrv.lib -library MmfControllerFramework.lib +library mmfcontrollerframework.lib library caf.lib library cafutils.lib library ecom.lib diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/profilesettingsmonitor/group/ProfileSettingsMonitor.mmp --- a/mmfenh/profilesettingsmonitor/group/ProfileSettingsMonitor.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/profilesettingsmonitor/group/ProfileSettingsMonitor.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -41,6 +41,7 @@ LIBRARY ProfileEngine.lib LIBRARY centralrepository.lib LIBRARY euser.lib +LIBRARY ProfileEng.lib epocprocesspriority background diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/profilesettingsmonitor/inc/ProfileSettingsMonitorServerImpl.h --- a/mmfenh/profilesettingsmonitor/inc/ProfileSettingsMonitorServerImpl.h Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/profilesettingsmonitor/inc/ProfileSettingsMonitorServerImpl.h Thu Sep 02 20:58:01 2010 +0300 @@ -38,6 +38,7 @@ #include #include #include +#include class CProfileSettingsMonitorServerImpl : public CBase, public MProEngProfileActivationObserver, @@ -70,6 +71,7 @@ private: MProEngEngine* iEngine; MProEngNotifyHandler* iNotifyHandler; + MProfileEngineExtended2* iProfileEngineExtended; TInt iActiveProfileId; TBool iWarningTones; TBool iMessagingTones; @@ -85,6 +87,7 @@ CGlobalAudioSettings::TGASRingingType iGASRingingType; CGlobalAudioSettings::TGASKeypadVolume iGASKeypadVolume; + TBool iSilenceMode; RProperty iWarningTonesProperty; RProperty iMessagingTonesProperty; RProperty iSilentProfileProperty; @@ -97,6 +100,7 @@ RProperty iRingingTone1NameProperty; RProperty iRingingTone2NameProperty; RProperty iKeypadVolumeProperty; + RProperty iSilenceModeProperty; }; #endif diff -r 1fa3fb47b1e3 -r c2e43643db4c mmfenh/profilesettingsmonitor/src/ProfileSettingsMonitorServerImpl.cpp --- a/mmfenh/profilesettingsmonitor/src/ProfileSettingsMonitorServerImpl.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmfenh/profilesettingsmonitor/src/ProfileSettingsMonitorServerImpl.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -21,6 +21,7 @@ #include #include #include +#include #ifdef _DEBUG #define DEB_TRACE0(str) RDebug::Print(str) @@ -99,6 +100,11 @@ delete iRingingTone2Name; iRingingTone2Name=NULL; } + if(iProfileEngineExtended) + { + iProfileEngineExtended->Release(); + } + //delete iProfileEngineExtended; // Release profile engine resources if ( iEngine ) { @@ -158,6 +164,10 @@ CMapGASKeypadVolume(settings.KeypadVolume()); + iProfileEngineExtended =::CreateProfileEngineExtended2L(); + + iSilenceMode = iProfileEngineExtended->SilenceModeL(); + RDebug::Printf("value of silence mode %d",iSilenceMode); // Get PublicSilence from CenRep TInt featureBitmask( 0 ); CRepository* profileCenRep = CRepository::NewL( KCRUidProfilesLV ); @@ -343,6 +353,20 @@ KGASPSUidGlobalAudioSettings, KGASKeypadToneVolume, iGASKeypadVolume)); + + User::LeaveIfError(RProperty::Define( + KGASPSUidGlobalAudioSettings, + KGASSilenceMode, + RProperty::EInt, + read, + write)); + User::LeaveIfError(iSilenceModeProperty.Attach( + KGASPSUidGlobalAudioSettings, + KGASSilenceMode)); + User::LeaveIfError(iSilenceModeProperty.Set( + KGASPSUidGlobalAudioSettings, + KGASSilenceMode, + iSilenceMode)); //Stream Gain Control TInt status = RProperty::Define( @@ -550,6 +574,16 @@ } + if(iSilenceMode != iProfileEngineExtended->SilenceModeL()) + { + RDebug::Printf("silence mode changed"); + iSilenceMode = iProfileEngineExtended->SilenceModeL(); + User::LeaveIfError(iSilenceModeProperty.Set( + KGASPSUidGlobalAudioSettings, + KGASSilenceMode, + iSilenceMode)); + } + CleanupStack::PopAndDestroy(currentProfile); } #ifdef _DEBUG @@ -671,6 +705,15 @@ } + if(iSilenceMode != iProfileEngineExtended ->SilenceModeL()) + { + RDebug::Printf("silence mode changed"); + iSilenceMode = iProfileEngineExtended ->SilenceModeL(); + User::LeaveIfError(iSilenceModeProperty.Set(KGASPSUidGlobalAudioSettings, + KGASSilenceMode, + iSilenceMode)); + } + CleanupStack::PopAndDestroy(currentProfile); } diff -r 1fa3fb47b1e3 -r c2e43643db4c mmmw_plat/audio_metadata_reader_api/inc/MetaDataField.hrh --- a/mmmw_plat/audio_metadata_reader_api/inc/MetaDataField.hrh Wed Aug 18 10:17:22 2010 +0300 +++ b/mmmw_plat/audio_metadata_reader_api/inc/MetaDataField.hrh Thu Sep 02 20:58:01 2010 +0300 @@ -26,7 +26,7 @@ EUnknownMetaDataField = 0, EMetaDataSongTitle = 1, - EMetaDataArtist, + EMetaDataArtist, // the artist of the song EMetaDataAlbum, EMetaDataYear, EMetaDataComment, @@ -46,7 +46,8 @@ EMetaDataUnsyncLyrics, EMetaDataProtected, // get the Protected info, "0"=non protected, "1"=protected EMetaDataSampleRate, // Hz - EMetaDataBitRate // Bps + EMetaDataBitRate, // Bps + EMetaDataAlbumArtist // the artist of the album // More later... }; diff -r 1fa3fb47b1e3 -r c2e43643db4c mmmw_plat/audio_metadata_reader_api/tsrc/MetaDataDisplay/group/MetaDataDisplay.pkg --- a/mmmw_plat/audio_metadata_reader_api/tsrc/MetaDataDisplay/group/MetaDataDisplay.pkg Wed Aug 18 10:17:22 2010 +0300 +++ b/mmmw_plat/audio_metadata_reader_api/tsrc/MetaDataDisplay/group/MetaDataDisplay.pkg Thu Sep 02 20:58:01 2010 +0300 @@ -44,15 +44,15 @@ ; None ; Install files -"..\..\data\mmc\DownUnder_remix.aac" - "e:\testing\data\DownUnder_remix.aac" -"..\..\data\mmc\DRM_NRTmeta.dcf" - "e:\testing\data\DRM_NRTmeta.dcf" -"..\..\data\mmc\JapJap.mp3" - "e:\testing\data\JapJap.mp3" -"..\..\data\mmc\JepJep.mp3" - "e:\testing\data\JepJep.mp3" -"..\..\data\mmc\JipJip.mp3" - "e:\testing\data\JipJip.mp3" -"..\..\data\mmc\MP3_MD.mp3" - "e:\testing\data\MP3_MD.mp3" -"..\..\data\mmc\test3gp.3gp" - "e:\testing\data\test3gp.3gp" -"..\..\data\mmc\testm4a.m4a" - "e:\testing\data\testm4a.m4a" -"..\..\data\mmc\testmp4.mp4" - "e:\testing\data\testmp4.mp4" +; "..\..\data\mmc\DownUnder_remix.aac" - "e:\testing\data\DownUnder_remix.aac" +; "..\..\data\mmc\DRM_NRTmeta.dcf" - "e:\testing\data\DRM_NRTmeta.dcf" +; "..\..\data\mmc\JapJap.mp3" - "e:\testing\data\JapJap.mp3" +; "..\..\data\mmc\JepJep.mp3" - "e:\testing\data\JepJep.mp3" +; "..\..\data\mmc\JipJip.mp3" - "e:\testing\data\JipJip.mp3" +; "..\..\data\mmc\MP3_MD.mp3" - "e:\testing\data\MP3_MD.mp3" +; "..\..\data\mmc\test3gp.3gp" - "e:\testing\data\test3gp.3gp" +; "..\..\data\mmc\testm4a.m4a" - "e:\testing\data\testm4a.m4a" +; "..\..\data\mmc\testmp4.mp4" - "e:\testing\data\testmp4.mp4" "..\..\init\TestFramework.ini" - "c:\TestFramework\TestFramework.ini" "..\..\conf\MetaDataDisplay.cfg" - "c:\TestFramework\MetaDataDisplay.cfg" "\epoc32\release\armv5\urel\MetaDataDisplay.dll" - "!:\Sys\Bin\MetaDataDisplay.dll" diff -r 1fa3fb47b1e3 -r c2e43643db4c mmmw_plat/audio_metadata_reader_api/tsrc/MetaDataDisplay/src/MetaDataDisplayBlocks.cpp --- a/mmmw_plat/audio_metadata_reader_api/tsrc/MetaDataDisplay/src/MetaDataDisplayBlocks.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmmw_plat/audio_metadata_reader_api/tsrc/MetaDataDisplay/src/MetaDataDisplayBlocks.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -1872,7 +1872,8 @@ } else { - iLog->Log( _L("The content of meta data field [%d] is [%S]."),field.Alloc() ); + //iLog->Log( _L("The content of meta data field [%d] is [%S]."),field.Alloc() ); + iLog->Log( _L("Unknown meta data field")); } break; } diff -r 1fa3fb47b1e3 -r c2e43643db4c mmmw_plat/system_tone_service_api/inc/systemtoneservice.h --- a/mmmw_plat/system_tone_service_api/inc/systemtoneservice.h Wed Aug 18 10:17:22 2010 +0300 +++ b/mmmw_plat/system_tone_service_api/inc/systemtoneservice.h Thu Sep 02 20:58:01 2010 +0300 @@ -15,13 +15,10 @@ * This file defines the API for System Tone Service which is * implemented in the systemtoneservice.dll. */ - #ifndef SYSTEMTONESERVICE_H_ #define SYSTEMTONESERVICE_H_ - // System includes #include - // Forward declarations NONSHARABLE_CLASS( CStsImplementation); @@ -202,7 +199,7 @@ * when an alarm playback completes if it is not manually stopped by the client. * * @param[in] aAlarm The system alarm type to play. - * @param[out] aAlarmContext A guaranteed globablly unique context representing this + * @param[out] aAlarmContext A guaranteed globally unique context representing this * specific alarm playback that can be used for stopping the * alarm or used to indicate to the observer which alarm playback * has completed. @@ -214,7 +211,29 @@ * all alarms the observer is associated with are either completed * or stopped. */ - IMPORT_C void PlayAlarm(TAlarmType aAlarm, unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver); + IMPORT_C void PlayAlarm(TAlarmType aAlarm, unsigned int& aAlarmContext, + MStsPlayAlarmObserver& aObserver); + + /** + * Plays the specified system tone as an alarm. If the tone type is not recognized, a default + * default tone will be played. Using this method allows the clients to stop the tone or get + * a callback when the tone playback completes. + * + * @param[in] aTone The system tone type to play. + * @param[out] aAlarmContext A guaranteed globally unique context representing this + * specific tone playback that can be used for stopping the + * tone or used to indicate to the observer which playback + * has completed. + * @param[in] aObserver A reference to the observer that is to be notified if this alarm + * playback completes before StopAlarm is called. The same observer + * can be used for multiple PlayAlarms, even for ones playing at the + * same time. It is the responsibility of the client to manage the + * life cycle of the observer. However the observer must exist until + * all alarms the observer is associated with are either completed + * or stopped. + */ + IMPORT_C void PlayAlarm(TToneType aTone, unsigned int& aAlarmContext, + MStsPlayAlarmObserver& aObserver); /** * Stops the specified system alarm playback. If the playback has already completed or the @@ -223,8 +242,6 @@ * @param[in] aAlarmContext The context to the specific alarm that is to be stopped. */ IMPORT_C void StopAlarm(unsigned int aAlarmContext); - - IMPORT_C void PlayAlarm(TToneType aTone, unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver); protected: // Protected constructors and destructors diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/callaudiocontrol/group/CallAudioControl.mmp --- a/mmserv/callaudiocontrol/group/CallAudioControl.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/callaudiocontrol/group/CallAudioControl.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -46,7 +46,7 @@ //SYSTEMINCLUDE /epoc32/include/CallAudioControl LIBRARY euser.lib -LIBRARY telephonyaudiorouting.lib +LIBRARY TelephonyAudioRouting.lib LIBRARY centralrepository.lib #ifdef __SERIES60_31__ diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/3GPExtParserLib/armv5/LIB/3GPExtParser.dso Binary file mmserv/metadatautility/3GPExtParserLib/armv5/LIB/3GPExtParser.dso has changed diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/3GPExtParserLib/armv5/LIB/3GPExtParser.lib Binary file mmserv/metadatautility/3GPExtParserLib/armv5/LIB/3GPExtParser.lib has changed diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/3GPExtParserLib/armv5/LIB/3GPExtParser{000a0000}.dso Binary file mmserv/metadatautility/3GPExtParserLib/armv5/LIB/3GPExtParser{000a0000}.dso has changed diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/3GPExtParserLib/armv5/LIB/3GPExtParser{000a0000}.lib Binary file mmserv/metadatautility/3GPExtParserLib/armv5/LIB/3GPExtParser{000a0000}.lib has changed diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/3GPExtParserLib/armv5/udeb/3GPExtParser.dll Binary file mmserv/metadatautility/3GPExtParserLib/armv5/udeb/3GPExtParser.dll has changed diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/3GPExtParserLib/armv5/urel/3GPExtParser.dll Binary file mmserv/metadatautility/3GPExtParserLib/armv5/urel/3GPExtParser.dll has changed diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/3GPExtParserLib/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmserv/metadatautility/3GPExtParserLib/group/bld.inf Thu Sep 02 20:58:01 2010 +0300 @@ -0,0 +1,43 @@ +/* +* 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: Project build file for 3GPExtParser lib +* +*/ + +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS + +#ifdef __3GP_EXTENTION + +// Exporting 3GPExtParser Binaries +../armv5/LIB/3GPExtParser.lib /epoc32/release/armv5/LIB/3GPExtParser.lib +../armv5/LIB/3GPExtParser.dso /epoc32/release/armv5/LIB/3GPExtParser.dso +../armv5/LIB/3GPExtParser{000a0000}.lib /epoc32/release/armv5/LIB/3GPExtParser{000a0000}.lib +../armv5/LIB/3GPExtParser{000a0000}.dso /epoc32/release/armv5/LIB/3GPExtParser{000a0000}.dso + +../armv5/udeb/3GPExtParser.dll /epoc32/release/armv5/udeb/3GPExtParser.dll +../armv5/urel/3GPExtParser.dll /epoc32/release/armv5/urel/3GPExtParser.dll + +../winscw/udeb/3GPExtParser.lib /epoc32/release/winscw/udeb/3GPExtParser.lib +../winscw/udeb/3GPExtParser.dll /epoc32/release/winscw/udeb/3GPExtParser.dll +../winscw/urel/3GPExtParser.dll /epoc32/release/winscw/urel/3GPExtParser.dll + +#endif + +PRJ_MMPFILES + + +// End of File diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/3GPExtParserLib/winscw/udeb/3GPExtParser.dll Binary file mmserv/metadatautility/3GPExtParserLib/winscw/udeb/3GPExtParser.dll has changed diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/3GPExtParserLib/winscw/udeb/3GPExtParser.lib Binary file mmserv/metadatautility/3GPExtParserLib/winscw/udeb/3GPExtParser.lib has changed diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/3GPExtParserLib/winscw/urel/3GPExtParser.dll Binary file mmserv/metadatautility/3GPExtParserLib/winscw/urel/3GPExtParser.dll has changed diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/3GPExtParserLib_stub/BWINS/3GPExtParserU.DEF --- a/mmserv/metadatautility/3GPExtParserLib_stub/BWINS/3GPExtParserU.DEF Wed Aug 18 10:17:22 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -EXPORTS - ??1C3GPExtParser@@UAE@XZ @ 1 NONAME ; C3GPExtParser::~C3GPExtParser(void) - ?GetilstBoxesL@C3GPExtParser@@QAEXABVTDesC8@@W4TMetaDataFieldId@@PAPAVHBufC16@@@Z @ 2 NONAME ; void C3GPExtParser::GetilstBoxesL(class TDesC8 const &, enum TMetaDataFieldId, class HBufC16 * *) - ?Is3GPExtMetadataL@C3GPExtParser@@QAEHXZ @ 3 NONAME ; int C3GPExtParser::Is3GPExtMetadataL(void) - ?NewL@C3GPExtParser@@SAPAV1@AAPAJ@Z @ 4 NONAME ; class C3GPExtParser * C3GPExtParser::NewL(long * &) - ?GetilstBoxesL@C3GPExtParser@@QAEXABVTDesC8@@W4TMetaDataFieldId@@PAPAVHBufC8@@@Z @ 5 NONAME ; void C3GPExtParser::GetilstBoxesL(class TDesC8 const &, enum TMetaDataFieldId, class HBufC8 * *) - diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/3GPExtParserLib_stub/EABI/3GPExtParserU.DEF --- a/mmserv/metadatautility/3GPExtParserLib_stub/EABI/3GPExtParserU.DEF Wed Aug 18 10:17:22 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -EXPORTS - _ZN13C3GPExtParser13GetilstBoxesLERK6TDesC816TMetaDataFieldIdPP7HBufC16 @ 1 NONAME - _ZN13C3GPExtParser17Is3GPExtMetadataLEv @ 2 NONAME - _ZN13C3GPExtParser4NewLERPl @ 3 NONAME - _ZTI13C3GPExtParser @ 4 NONAME ; ## - _ZTV13C3GPExtParser @ 5 NONAME ; ## - _ZN13C3GPExtParser13GetilstBoxesLERK6TDesC816TMetaDataFieldIdPP6HBufC8 @ 6 NONAME - diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/3GPExtParserLib_stub/group/3GPExtParserLib_stub.mmp --- a/mmserv/metadatautility/3GPExtParserLib_stub/group/3GPExtParserLib_stub.mmp Wed Aug 18 10:17:22 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/* -* Copyright (c) 2004 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: Project file for 3GPExtParser -* -*/ - - -#include - - -TARGET 3GPExtParser.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207B25 -VENDORID VID_DEFAULT - -#if (defined EKA2) -CAPABILITY ALL -Tcb -#endif - -VERSION 10.0 - -SOURCEPATH ../Src -SOURCE 3GPExtParserLib_stub.cpp - -//Need to add a path to "3GPExtParser.h" -USERINCLUDE ../../Src - -MW_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/libc - -LIBRARY euser.lib - -SMPSAFE - -// End of file diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/3GPExtParserLib_stub/group/bld.inf --- a/mmserv/metadatautility/3GPExtParserLib_stub/group/bld.inf Wed Aug 18 10:17:22 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -/* -* Copyright (c) 2004 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: Project build file for 3GPExtParser -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_MMPFILES -3GPExtParserLib_stub.mmp - -// End of File diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/3GPExtParserLib_stub/src/3GPExtParserLib_stub.cpp --- a/mmserv/metadatautility/3GPExtParserLib_stub/src/3GPExtParserLib_stub.cpp Wed Aug 18 10:17:22 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,115 +0,0 @@ -/* -* Copyright (c) 2004 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 class implements an 3GPExt metadata parser -* -*/ - -// INCLUDE FILES -#include "3GPExtParser.h" - - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// C3GPExtParser::C3GPExtParser -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -C3GPExtParser::C3GPExtParser(MP4Handle& aMP4Handle): iMP4Handle(aMP4Handle), ilst(NULL, 0) - { - } - -// ----------------------------------------------------------------------------- -// C3GPExtParser::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void C3GPExtParser::ConstructL() - { - } - -// ----------------------------------------------------------------------------- -// C3GPExtParser::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C C3GPExtParser* C3GPExtParser::NewL(MP4Handle& aMP4Handle) - { - C3GPExtParser* self = new( ELeave ) C3GPExtParser (aMP4Handle); - return self; - } - -// Destructor -C3GPExtParser::~C3GPExtParser() - { - } - -// ----------------------------------------------------------------------------- -// 3GPExtParser::GetilstBoxesL -// ----------------------------------------------------------------------------- -// -EXPORT_C void C3GPExtParser::GetilstBoxesL(const TDesC8 &/*aBox*/, TMetaDataFieldId /*aFieldId*/, HBufC** /*aBuf*/) -{ - User::Leave(KErrNotSupported); -} -// ----------------------------------------------------------------------------- -// 3GPExtParser::GetilstBoxesL for 8-bit descriptor fields -// ----------------------------------------------------------------------------- -// -EXPORT_C void C3GPExtParser::GetilstBoxesL(const TDesC8 &/*aBox*/, TMetaDataFieldId /*aFieldId*/, HBufC8** /*aBuf*/) -{ - User::Leave(KErrNotSupported); -} - -// ----------------------------------------------------------------------------- -// C3GPExtParser::Is3GPExtMetadataL -// ----------------------------------------------------------------------------- -// -EXPORT_C TBool C3GPExtParser::Is3GPExtMetadataL() -{ - User::Leave(KErrNotSupported); - return EFalse; -} - -// ----------------------------------------------------------------------------- -// 3GPExtParser::MapID3v1GenreToString() -// ----------------------------------------------------------------------------- -// -void C3GPExtParser::ParseIlstBoxesL() -{ -} - -// ----------------------------------------------------------------------------- -// 3GPExtParser::MapID3v1GenreToString() -// ----------------------------------------------------------------------------- -// -void C3GPExtParser::MapID3GenreToString(TInt /*aNum*/, TDes& /*aGenrePtr*/) -{ -} - - -// ----------------------------------------------------------------------------- -// 3GPExtParser::TranslateMP4Err -// ----------------------------------------------------------------------------- -// -TInt C3GPExtParser::TranslateMP4Err(MP4Err /*aError*/) -{ - return KErrNotSupported; -} - - - -// End of File diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/Group/MetaDataUtility.mmp --- a/mmserv/metadatautility/Group/MetaDataUtility.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/metadatautility/Group/MetaDataUtility.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -85,12 +85,12 @@ LIBRARY euser.lib LIBRARY efsrv.lib // File handling LIBRARY charconv.lib -LIBRARY 3GPMP4Lib.lib +LIBRARY 3gpmp4lib.lib LIBRARY caf.lib LIBRARY estlib.lib LIBRARY centralrepository.lib LIBRARY bafl.lib -LIBRARY SysLangUtil.lib +LIBRARY syslangutil.lib LIBRARY DrmRightsInfo.lib LIBRARY 3GPExtParser.lib diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/Group/bld.inf --- a/mmserv/metadatautility/Group/bld.inf Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/metadatautility/Group/bld.inf Thu Sep 02 20:58:01 2010 +0300 @@ -37,8 +37,8 @@ PRJ_MMPFILES -#ifndef __3GP_EXTENTION -#include "../3GPExtParserLib_stub/group/bld.inf" +#ifdef __3GP_EXTENTION +#include "../3GPExtParserLib/group/bld.inf" #endif MetaDataUtility.mmp diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/Src/3GPExtParser.h --- a/mmserv/metadatautility/Src/3GPExtParser.h Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/metadatautility/Src/3GPExtParser.h Thu Sep 02 20:58:01 2010 +0300 @@ -158,7 +158,9 @@ TUint32 iTrackNumberSize; TUint32 iCoverOffset; TUint32 iCoverSize; - + TUint32 iAlbumArtistOffset; + TUint32 iAlbumArtistSize; + public: // constants TBuf8<4> K3GPExtMetaTitle; diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/Src/MetaDataParser3GPExt.cpp --- a/mmserv/metadatautility/Src/MetaDataParser3GPExt.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/metadatautility/Src/MetaDataParser3GPExt.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -167,6 +167,12 @@ TRAP(err, GetDurationL(EMetaDataDuration)); + TRAP(err, i3GPExtParser->GetilstBoxesL(K3GPExtMetaArtistFormat, EMetaDataAlbumArtist, &buf8)); + if (KErrNone == err) + { + ConvertAndAppendL(&buf8, EMetaDataAlbumArtist); + } + TRAP(err, i3GPExtParser->GetilstBoxesL(K3GPExtMetaJpeg, EMetaDataJpeg, &buf8)); if (KErrNone == err) { @@ -258,6 +264,14 @@ } break; + case EMetaDataAlbumArtist: + TRAP(err, i3GPExtParser->GetilstBoxesL(K3GPExtMetaArtistFormat, EMetaDataAlbumArtist, &buf8)); + if (KErrNone == err) + { + ConvertAndAppendL(&buf8, EMetaDataAlbumArtist); + } + break; + case EMetaDataJpeg: TRAP(err, i3GPExtParser->GetilstBoxesL(K3GPExtMetaJpeg, EMetaDataJpeg, &buf8)); if (KErrNone == err) diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/Src/MetaDataParserID3v2.cpp --- a/mmserv/metadatautility/Src/MetaDataParserID3v2.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/metadatautility/Src/MetaDataParserID3v2.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -232,6 +232,7 @@ case EMetaDataComposer: case EMetaDataCopyright: case EMetaDataOriginalArtist: + case EMetaDataAlbumArtist: TRAP(err, GetTextInfoL( fieldId, frameSize )); break; @@ -339,6 +340,7 @@ case EMetaDataComposer: case EMetaDataCopyright: case EMetaDataOriginalArtist: + case EMetaDataAlbumArtist: TRAP(err, GetTextInfoL( fieldId, frameSize )); break; diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/Src/MetaDataParserID3v22.cpp --- a/mmserv/metadatautility/Src/MetaDataParserID3v22.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/metadatautility/Src/MetaDataParserID3v22.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -47,6 +47,7 @@ _LIT8( KID3v2FrameIdDuration, "TLE" ); _LIT8( KID3v2FrameIdDate, "TDA" ); _LIT8( KID3v2FrameIdRating, "POP" ); +_LIT8( KID3v2FrameIdAlbumArtist, "TP2" ); _LIT8( KID3v2ImageFormatPng, "PNG" ); _LIT8( KID3v2ImageFormatJpeg, "JPG" ); @@ -253,6 +254,10 @@ { aFieldId = EMetaDataRating; } + else if ( frameId.Compare( KID3v2FrameIdAlbumArtist ) == 0 ) + { + aFieldId = EMetaDataAlbumArtist; + } else { aFieldId = EUnknownMetaDataField; diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/Src/MetaDataParserID3v23.cpp --- a/mmserv/metadatautility/Src/MetaDataParserID3v23.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/metadatautility/Src/MetaDataParserID3v23.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -46,6 +46,7 @@ _LIT8( KID3v2FrameIdDuration, "TLEN" ); _LIT8( KID3v2FrameIdDate, "TDAT" ); _LIT8( KID3v2FrameIdRating, "POPM" ); +_LIT8( KID3v2FrameIdAlbumArtist, "TPE2" ); _LIT8( KID3v2ImageFormatPngMime, "image/png" ); _LIT8( KID3v2ImageFormatPng, "png" ); @@ -281,6 +282,10 @@ { aFieldId = EMetaDataRating; } + else if ( frameId.Compare( KID3v2FrameIdAlbumArtist ) == 0 ) + { + aFieldId = EMetaDataAlbumArtist; + } else { aFieldId = EUnknownMetaDataField; diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/Src/MetaDataParserID3v24.cpp --- a/mmserv/metadatautility/Src/MetaDataParserID3v24.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/metadatautility/Src/MetaDataParserID3v24.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -47,6 +47,7 @@ _LIT8( KID3v2FrameIdDuration, "TLEN" ); _LIT8( KID3v2FrameIdDate, "TDRC" ); // same as year _LIT8( KID3v2FrameIdRating, "POPM" ); +_LIT8( KID3v2FrameIdAlbumArtist, "TPE2" ); _LIT8( KID3v2ImageFormatPngMime, "image/png" ); _LIT8( KID3v2ImageFormatPng, "png" ); @@ -285,6 +286,10 @@ { aFieldId = EMetaDataRating; } + else if ( frameId.Compare( KID3v2FrameIdAlbumArtist ) == 0 ) + { + aFieldId = EMetaDataAlbumArtist; + } else { aFieldId = EUnknownMetaDataField; diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/Src/MetaDataParserMP4.cpp --- a/mmserv/metadatautility/Src/MetaDataParserMP4.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/metadatautility/Src/MetaDataParserMP4.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -64,8 +64,8 @@ RDebug::Print(_L("CMetaDataParserMP4::InitializeFileL - MP4ParseOpen err = %d"), err); #endif User::LeaveIfError(TranslateMP4Err(err)); - MP4SetCustomFileBufferSizes( iMP4Handle, 0, 0, KCustomFileBufferSize); - if ( ValidateL() ) + MP4Err mp4Err = MP4SetCustomFileBufferSizes( iMP4Handle, 0, 0, KCustomFileBufferSize); + if ( (mp4Err == MP4_OK) && ValidateL() ) { User::LeaveIfError(iFs.Connect()); // Get list of charconv supported character sets diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/Src/MetaDataParserWMA.cpp --- a/mmserv/metadatautility/Src/MetaDataParserWMA.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/metadatautility/Src/MetaDataParserWMA.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -69,6 +69,8 @@ _LIT(KWMAudioFileURL, "WM/AudioFileURL\0"); _LIT(KWMSharedUserRating, "WM/SharedUserRating\0"); _LIT(KWMDate, "WM/OriginalReleaseTime\0"); +_LIT(KWMAlbumArtist, "WM/AlbumArtist\0"); + #ifdef __WINDOWS_MEDIA _LIT(KWMProvider, "WM/Provider\0"); #endif @@ -181,6 +183,7 @@ TRAP(err, GetExtContDesEntryL(EMetaDataAlbumTrack, iTrackNumberOffset)); TRAP(err, GetExtContDesEntryL(EMetaDataUniqueFileIdentifier, iUniqueFileIdentifierOffset)); TRAP(err, GetExtContDesEntryL(EMetaDataUrl, iAudioFileURLOffset)); + TRAP(err, GetExtContDesEntryL(EMetaDataAlbumArtist, iAlbumArtistOffset)); TRAP(err, GetDurationL()); TRAP(err, GetExtContDesEntryL(EMetaDataDate, iDateOffset)); #ifdef __WINDOWS_MEDIA @@ -245,6 +248,9 @@ case EMetaDataDate: TRAP(err, GetExtContDesEntryL(EMetaDataDate, iDateOffset)); break; + case EMetaDataAlbumArtist: + TRAP(err, GetExtContDesEntryL(EMetaDataAlbumArtist, iAlbumArtistOffset)); + break; #ifdef __WINDOWS_MEDIA case EMetaDataVendor: TRAP(err, GetExtContDesEntryL(EMetaDataVendor, iProviderOffset)); @@ -886,6 +892,10 @@ { iDateOffset = offset; } + else if(!name16.Compare(KWMAlbumArtist)) + { + iAlbumArtistOffset = offset; + } #ifdef __WINDOWS_MEDIA else if(!name16.Compare(KWMProvider)) { diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/metadatautility/Src/MetaDataParserWMA.h --- a/mmserv/metadatautility/Src/MetaDataParserWMA.h Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/metadatautility/Src/MetaDataParserWMA.h Thu Sep 02 20:58:01 2010 +0300 @@ -236,6 +236,7 @@ TInt iSharedUserRatingOffset; TInt iDateOffset; TInt iLyricsOffset; + TInt iAlbumArtistOffset; #ifdef __WINDOWS_MEDIA TInt iProviderOffset; #endif diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/radioutility/radio_utility/stub/src/StubRadioFmTunerUtilityBody.cpp --- a/mmserv/radioutility/radio_utility/stub/src/StubRadioFmTunerUtilityBody.cpp Wed Aug 18 10:17:22 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,327 +0,0 @@ -/* -* Copyright (c) 2007 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: Radio FM Tuner Utility implementation body's stub. -* -*/ - - -#include "RadioFmTunerUtilityBody.h" -#include "RadioUtilityBody.h" -#include "RadioStubManager.h" - - -#define STUB CRadioStubManager::GetRadioStubManager()->iTuner - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::CBody::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CRadioFmTunerUtility::CBody* CRadioFmTunerUtility::CBody::NewL( - RRadioSession& aRadioSession, - MRadioFmTunerObserver& aObserver ) - { - if ( STUB.iLeaveNewL.iError ) - { - User::Leave( STUB.iLeaveNewL.iError ); - } - CRadioFmTunerUtility::CBody* s = new(ELeave) CRadioFmTunerUtility::CBody( aRadioSession, aObserver ); - CleanupStack::PushL(s); - s->ConstructL(); - CleanupStack::Pop(); - return s; - } - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::ConstructL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -void CRadioFmTunerUtility::CBody::ConstructL() - { - if ( STUB.iLeaveErrorForConstructL.iError ) - { - User::Leave( STUB.iLeaveErrorForConstructL.iError ); - } - STUB.iRadioFmTunerUtilityClient = &iRadioFmTunerUtilityClient; - } - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::CBody::CBody -// ----------------------------------------------------------------------------- -// -CRadioFmTunerUtility::CBody::CBody( - RRadioSession& aRadioSession, - MRadioFmTunerObserver& aObserver ) - :iRadioSession( aRadioSession ), - iRadioFmTunerUtilityClient( aObserver ) - - { - } - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::CBody::~CBody -// ----------------------------------------------------------------------------- -// -CRadioFmTunerUtility::CBody::~CBody() - { - } - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::CBody::RequestTunerControl -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioFmTunerUtility::CBody::RequestTunerControl() - { - } - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::CBody::Close -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioFmTunerUtility::CBody::Close() - { - // Consider releasing tuner control here. - } - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::CBody::GetCapabilities -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioFmTunerUtility::CBody::GetCapabilities( - TFmTunerCapabilities& aCaps ) const - { - aCaps.iTunerBands = STUB.iCaps.iTunerBands; - aCaps.iTunerFunctions = STUB.iCaps.iTunerFunctions; - aCaps.iAdditionalFunctions1 = STUB.iCaps.iAdditionalFunctions1; - aCaps.iAdditionalFunctions2 = STUB.iCaps.iAdditionalFunctions2; - return STUB.iGetCapabilitiesError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::CBody::EnableTunerInOfflineMode -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioFmTunerUtility::CBody::EnableTunerInOfflineMode( - TBool aEnable ) - { - STUB.iTunerInOfflineMode = aEnable; - return STUB.iEnableTunerInOfflineModeError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::CBody::GetFrequencyRange -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioFmTunerUtility::CBody::GetFrequencyRange( - TFmRadioFrequencyRange& aRange, - TInt& aMinFreq, - TInt& aMaxFreq ) const - { - - aRange = STUB.iRange; - aMinFreq = STUB.iMinFreq; - aMaxFreq = STUB.iMaxFreq; -#ifdef _DEBUG - RDebug::Print(_L("CRadioFmTunerUtility::CBody::GetFrequencyRange, aRange = %d, aMinFreq = %d, aMaxFreq = %d"), - aRange, aMinFreq, aMaxFreq); -#endif - return STUB.iGetFrequencyRangeError.Error(); - } - - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::CBody::SetFrequencyRange -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioFmTunerUtility::CBody::SetFrequencyRange( - TFmRadioFrequencyRange aRange ) - { -#ifdef _DEBUG - RDebug::Print(_L("CRadioFmTunerUtility::CBody::SetFrequencyRange, aRange = %d"), aRange); -#endif - STUB.iPreviousRange = STUB.iRange; - STUB.iRange = aRange; - } - - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::CBody::CancelSetFrequencyRange -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioFmTunerUtility::CBody::CancelSetFrequencyRange() - { - STUB.iRange = STUB.iPreviousRange; - } - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::CBody::SetFrequency -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioFmTunerUtility::CBody::SetFrequency( - TInt aFrequency ) - { -#ifdef _DEBUG - RDebug::Print(_L("CRadioFmTunerUtility::CBody::SetFrequency, aFrequency = %d"), aFrequency); -#endif - STUB.iPreviousFrequency = STUB.iFrequency; - STUB.iFrequency = aFrequency; - } - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::CBody::CancelSetFrequencyRange -// Body of CancelSetFrequencyRange -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioFmTunerUtility::CBody::CancelSetFrequency() - { - STUB.iFrequency = STUB.iPreviousFrequency; - STUB.iPreviousFrequency = 0; - } - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::CBody::GetFrequency -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioFmTunerUtility::CBody::GetFrequency( - TInt& aFrequency ) const - { - aFrequency = STUB.iFrequency; - return STUB.iGetFrequencyError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::CBody::StationSeek -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioFmTunerUtility::CBody::StationSeek( - TBool aUpwards ) - { -#ifdef _DEBUG - RDebug::Print(_L("CRadioFmTunerUtility::CBody::StationSeek, aUpwards = %d"), aUpwards); -#endif - STUB.iStationSeekUpwards = aUpwards; - } - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::CBody::CancelStationSeek -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioFmTunerUtility::CBody::CancelStationSeek() - { - STUB.iStationSeekUpwards = EFalse; - } - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::CBody::GetSignalStrength -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioFmTunerUtility::CBody::GetSignalStrength( - TInt& aSignalStrength ) const - { - aSignalStrength = STUB.iSignalStrength; - return STUB.iGetSignalStrengthError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::GetMaxSignalStrength -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioFmTunerUtility::CBody::GetMaxSignalStrength( - TInt& aMaxSignalStrength ) const - { - aMaxSignalStrength = STUB.iMaxSignalStrength; - return STUB.iGetMaxSignalStrengthError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::CBody::GetStereoMode -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioFmTunerUtility::CBody::GetStereoMode( - TBool& aStereo ) const - { - aStereo = STUB.iStereoMode; - return STUB.iGetStereoModeError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::CBody::ForceMonoReception -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioFmTunerUtility::CBody::ForceMonoReception( - TBool aForcedMono) - { - STUB.iForcedMono = aForcedMono; - return STUB.iForcedMonoReceptionError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::CBody::GetForcedMonoReception -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioFmTunerUtility::CBody::GetForcedMonoReception( - TBool& aForcedMono ) const - { - aForcedMono = STUB.iForcedMono; - return STUB.iGetForcedMonoReceptionError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::CBody::SetSquelch -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioFmTunerUtility::CBody::SetSquelch( - TBool aSquelch ) - { - STUB.iSquelch = aSquelch; - return STUB.iSetSquelchError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioFmTunerUtility::CBody::GetSquelch -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioFmTunerUtility::CBody::GetSquelch( - TBool& aSquelch ) const - { - aSquelch = STUB.iSquelch; - return STUB.iGetSquelchError.Error(); - } - -// End of File - - - - - diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/radioutility/radio_utility/stub/src/StubRadioPlayerUtilityBody.cpp --- a/mmserv/radioutility/radio_utility/stub/src/StubRadioPlayerUtilityBody.cpp Wed Aug 18 10:17:22 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,268 +0,0 @@ -/* -* Copyright (c) 2007 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: Radio Player Utility body's stub implementation -* -*/ - - -#include -#include "RadioServerData.h" -#include "RadioPlayerUtilityBody.h" -#include "RadioSession.h" -#include "RadioStubManager.h" - -#define STUB CRadioStubManager::GetRadioStubManager()->iPlayer - -// ======== MEMBER FUNCTIONS ======== - -// ----------------------------------------------------------------------------- -// CRadioPlayerUtility::CBody::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// - -CRadioPlayerUtility::CBody* CRadioPlayerUtility::CBody::NewL( - RRadioSession& aRadioSession, - MRadioPlayerObserver& aObserver ) - { - if ( STUB.iLeaveNewL.iError ) - { - User::Leave( STUB.iLeaveNewL.iError ); - } - CRadioPlayerUtility::CBody* s = new(ELeave) CRadioPlayerUtility::CBody( aRadioSession, aObserver); - CleanupStack::PushL(s); - s->ConstructL(); - CleanupStack::Pop(); - return s; - } - -// ----------------------------------------------------------------------------- -// CRadioPlayerUtility::ConstructL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -void CRadioPlayerUtility::CBody::ConstructL() - { - if ( STUB.iLeaveErrorForConstructL.iError ) - { - User::Leave( STUB.iLeaveErrorForConstructL.iError ); - } - STUB.iRadioPlayerUtilityClient = &iRadioPlayerUtilityClient; - } - -// ----------------------------------------------------------------------------- -// CRadioPlayerUtility::CBody::CBody -// ----------------------------------------------------------------------------- -// -CRadioPlayerUtility::CBody::CBody( - RRadioSession& aRadioSession, - MRadioPlayerObserver& aObserver ) - :iRadioSession( aRadioSession ), - iRadioPlayerUtilityClient( aObserver ) - { - } - -// ----------------------------------------------------------------------------- -// Destructor. -// ----------------------------------------------------------------------------- -// -CRadioPlayerUtility::CBody::~CBody() - { - } - -// ----------------------------------------------------------------------------- -// CRadioPlayerUtility::CBody::PlayerState -// Get the player's state. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -// -void CRadioPlayerUtility::CBody::PlayerState( - TPlayerState& aPlayerState ) const - { - aPlayerState = STUB.iPlayerState; - } - -// ----------------------------------------------------------------------------- -// CRadioPlayerUtility::CBody::Close -// Stops radio playback only if no other primary clients are connected to the -// radio server. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioPlayerUtility::CBody::Close() - { - } - -// ----------------------------------------------------------------------------- -// CRadioPlayerUtility::CBody::Play -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioPlayerUtility::CBody::Play() - { - STUB.iPlayerState = ERadioPlayerPlaying; - } - -// ----------------------------------------------------------------------------- -// CRadioPlayerUtility::CBody::Stop -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioPlayerUtility::CBody::Stop() - { - STUB.iPlayerState = ERadioPlayerIdle; - } - -// ----------------------------------------------------------------------------- -// CRadioPlayerUtility::CBody::Mute -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioPlayerUtility::CBody::Mute( - TBool aMute ) - { - STUB.iMuteStatus = aMute; - return STUB.iMuteError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioPlayerUtility::CBody::IsMute -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TBool CRadioPlayerUtility::CBody::IsMute() - { - return STUB.iMuteStatus; - } - -// ----------------------------------------------------------------------------- -// CRadioPlayerUtility::CBody::SetVolume -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioPlayerUtility::CBody::SetVolume( - TInt aVolume ) - { - STUB.iVolume = aVolume; - return STUB.iSetVolumeError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioPlayerUtility::CBody::GetVolume -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioPlayerUtility::CBody::GetVolume( - TInt& aVolume ) const - { - aVolume = STUB.iVolume; - return STUB.iGetVolumeError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioPlayerUtility::CBody::SetVolumeRamp -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioPlayerUtility::CBody::SetVolumeRamp( - const TTimeIntervalMicroSeconds& aRampInterval ) - { -#ifdef _DEBUG - RDebug::Print(_L("CRadioPlayerUtility::CBody::SetVolumeRamp")); -#endif - STUB.iRampInterval = aRampInterval; - return STUB.iSetVolumeRampError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioPlayerUtility::CBody::GetMaxVolume -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioPlayerUtility::CBody::GetMaxVolume( - TInt& aMaxVolume ) const - { - aMaxVolume = STUB.iMaxVolume; - return STUB.iGetMaxVolumeError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioPlayerUtility::CBody::SetBalance -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioPlayerUtility::CBody::SetBalance( - TInt aLeftPercentage, - TInt aRightPercentage ) - { -#ifdef _DEBUG - RDebug::Print(_L("CRadioPlayerUtility::CBody::SetBalance, aLeftPercentage = %d, aRightPercentage = %d"), - aLeftPercentage, aRightPercentage); -#endif - STUB.iLeftPercentage = aLeftPercentage; - STUB.iRightPercentage = aRightPercentage; - return STUB.iSetBalanceError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioPlayerUtility::CBody::GetBalance -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioPlayerUtility::CBody::GetBalance( - TInt& aLeftPercentage, - TInt& aRightPercentage ) const - { - aLeftPercentage = STUB.iLeftPercentage; - aRightPercentage = STUB.iRightPercentage; - return STUB.iGetBalanceError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioPlayerUtility::CBody::CustomInterface -// Get a custom interface for the specified interface Id. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TAny* CRadioPlayerUtility::CBody::CustomInterface( - TUid aInterfaceId ) - { -// TAny* ci = NULL; -// return ci; -#ifdef _DEBUG - RDebug::Print(_L("CRadioPlayerUtility::CBody::CustomInterface, aInterfaceId = %d"), aInterfaceId); -#endif - TAny* ci = NULL; - CCustomInterfaceUtility* customInterfaceUtil = NULL; - - TRAPD( error, customInterfaceUtil = CCustomInterfaceUtility::NewL( iRadioSession ) ); - - if ( !error ) - { - ci = customInterfaceUtil->CustomInterface( aInterfaceId ); - if ( !ci ) - { - // The custom interface utility is owned by the custom interface, implicitly. - // The custom interface utility instance is destroyed when the - // custom interface is finally destroyed! - // But if there's no valid ci, we need to take care of deleting the - // custom interface utility instance. - delete customInterfaceUtil; - } - } - return ci; - } - -//End of File diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/radioutility/radio_utility/stub/src/StubRadioRdsUtilityBody.cpp --- a/mmserv/radioutility/radio_utility/stub/src/StubRadioRdsUtilityBody.cpp Wed Aug 18 10:17:22 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,433 +0,0 @@ -/* -* Copyright (c) 2007 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: Radio RDS Utility body's stub implementation -* -*/ - - -#include "RadioRdsUtilityBody.h" -#include "RadioServerData.h" -#include "RadioSession.h" -#include "RadioStubManager.h" - -#define STUB CRadioStubManager::GetRadioStubManager()->iRds - -// ======== MEMBER FUNCTIONS ======== - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CRadioRdsUtility::CBody* CRadioRdsUtility::CBody::NewL( - RRadioSession& aRadioSession, - MRadioRdsObserver& aObserver ) - { - if ( STUB.iLeaveNewL.iError ) - { - User::Leave( STUB.iLeaveNewL.iError ); - } - CRadioRdsUtility::CBody* s = new(ELeave) CRadioRdsUtility::CBody( aRadioSession, aObserver ); - CleanupStack::PushL(s); - s->ConstructL(); - CleanupStack::Pop(); - return s; - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::ConstructL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -void CRadioRdsUtility::CBody::ConstructL() - { - if ( STUB.iLeaveErrorForConstructL.iError ) - { - User::Leave( STUB.iLeaveErrorForConstructL.iError ); - } - STUB.iRadioRdsUtilityClient = &iRadioRdsUtilityClient; - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::CBody -// ----------------------------------------------------------------------------- -// -CRadioRdsUtility::CBody::CBody( - RRadioSession& aRadioSession, - MRadioRdsObserver& aObserver ) - : iRadioSession(aRadioSession), - iRadioRdsUtilityClient(aObserver) - { - } - -// ----------------------------------------------------------------------------- -// Destructor. -// ----------------------------------------------------------------------------- -// -CRadioRdsUtility::CBody::~CBody() - { - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::Close -// Cancel all requested RDS notifications if any were requested. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioRdsUtility::CBody::Close() - { - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::GetCapabilities -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioRdsUtility::CBody::GetCapabilities( - TRdsCapabilities& aCaps ) const - { - if ( !STUB.iGetCapabilitiesError.Error() ) - { - aCaps.iRdsFunctions = STUB.iCaps.iRdsFunctions; - aCaps.iAdditionalFunctions1 = STUB.iCaps.iAdditionalFunctions1; - aCaps.iAdditionalFunctions2 = STUB.iCaps.iAdditionalFunctions2; - } - return STUB.iGetCapabilitiesError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::GetRdsSignalStatus -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioRdsUtility::CBody::GetRdsSignalStatus( - TBool& aRdsSignal ) const - { - aRdsSignal = STUB.iRdsSignal; - return STUB.iGetRdsSignalStatusError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::NotifyRdsDataChange -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioRdsUtility::CBody::NotifyRdsDataChange( - TRdsData aRdsData ) - { - iRdsDataReq.iRdsFunctions = aRdsData.iRdsFunctions; - iRdsDataReq.iAdditionalFunctions1 = aRdsData.iAdditionalFunctions1; - iRdsDataReq.iAdditionalFunctions2 = aRdsData.iAdditionalFunctions2; - return STUB.iNotifyRdsDataChangeError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::CancelNotifyRdsDataChange -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioRdsUtility::CBody::CancelNotifyRdsDataChange() - { - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::SetAutomaticSwitching -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioRdsUtility::CBody::SetAutomaticSwitching( - TBool aAuto ) - { - STUB.iAutomaticSwitching = aAuto; - return STUB.iSetAutomaticSwitchingError.Error(); - - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::GetAutomaticSwitching -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioRdsUtility::CBody::GetAutomaticSwitching( - TBool& aAuto ) - { - aAuto = STUB.iAutomaticSwitching; - return STUB.iGetAutomaticSwitchingError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::CancelAFSearch -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioRdsUtility::CBody::CancelAFSearch() - { - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::SetAutomaticTrafficAnnouncement -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioRdsUtility::CBody::SetAutomaticTrafficAnnouncement( - TBool aAuto ) - { - STUB.iTaStatus = aAuto; - return STUB.iSetAutomaticTrafficAnnouncementError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::GetAutomaticTrafficAnnouncement -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioRdsUtility::CBody::GetAutomaticTrafficAnnouncement( - TBool& aAuto ) - { - aAuto = STUB.iTaStatus; - return STUB.iGetAutomaticTrafficAnnouncementError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::StationSeekByPTY -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioRdsUtility::CBody::StationSeekByPTY( - TRdsProgrammeType /*aPty*/, - TBool /*aUpwards*/ ) - { - iRadioRdsUtilityClient.MrroStationSeekByPTYComplete( - STUB.iStationSeekByPTYError.Error(), STUB.iFrequency ); - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::StationSeekByTA -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioRdsUtility::CBody::StationSeekByTA( - TBool /*aSeekUp*/ ) - { - iRadioRdsUtilityClient.MrroStationSeekByTAComplete( STUB.iStationSeekByTAError.Error(), STUB.iFrequency ); - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::StationSeekByTP -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioRdsUtility::CBody::StationSeekByTP( - TBool /*aSeekUp*/ ) - { - iRadioRdsUtilityClient.MrroStationSeekByTPComplete( STUB.iStationSeekByTPError.Error(), STUB.iFrequency ); - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::CancelRdsStationSeek -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioRdsUtility::CBody::CancelRdsStationSeek() - { - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::GetFreqByPTY -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioRdsUtility::CBody::GetFreqByPTY( - TRdsProgrammeType /*aPty*/ ) - { - iRadioRdsUtilityClient.MrroGetFreqByPTYComplete( STUB.iGetFreqByPTYError.Error(), STUB.iFreqList ); - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::CancelGetFreqByPTY -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioRdsUtility::CBody::CancelGetFreqByPTY() - { - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::GetFreqByTA -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioRdsUtility::CBody::GetFreqByTA() - { - iRadioRdsUtilityClient.MrroGetFreqByTAComplete( STUB.iGetFreqByTAError.Error(), STUB.iFreqList ); - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::CancelGetFreqByTA -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioRdsUtility::CBody::CancelGetFreqByTA() - { - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::GetPSByPTY -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioRdsUtility::CBody::GetPSByPTY( - TRdsProgrammeType /*aPty*/ ) - { - iRadioRdsUtilityClient.MrroGetPSByPTYComplete( STUB.iGetPSByPTYError.Error(), STUB.iPsList ); - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::CancelGetPSByPTY -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioRdsUtility::CBody::CancelGetPSByPTY() - { - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::GetPSByTA -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioRdsUtility::CBody::GetPSByTA() - { - iRadioRdsUtilityClient.MrroGetPSByPTYComplete( STUB.iGetPSByTAError.Error(), STUB.iPsList ); - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::CancelGetPSByTA -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CRadioRdsUtility::CBody::CancelGetPSByTA() - { - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::GetProgrammeIdentification -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioRdsUtility::CBody::GetProgrammeIdentification( - TInt& /*aPi*/ ) - { - return STUB.iGetProgrammeIdentificationError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::GetProgrammeType -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioRdsUtility::CBody::GetProgrammeType( - TRdsProgrammeType& /*aPty*/ ) - { - return STUB.iGetProgrammeTypeError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::GetProgrammeService -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioRdsUtility::CBody::GetProgrammeService( - TRdsPSName& aPs ) - { - if ( STUB.iPs.Length() ) - { - aPs.Copy( STUB.iPs ); - } - - return STUB.iGetProgrammeServiceError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::GetRadioText -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioRdsUtility::CBody::GetRadioText( - TRdsRadioText& aRt ) - { - if ( STUB.iRtPlusData.Length() ) - { - aRt.Copy( STUB.iRtPlusData ); - } - - return STUB.iGetRadioTextError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::GetRadioTextPlus -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioRdsUtility::CBody::GetRadioTextPlus( - TRdsRTplusClass /*aRtPlusClass*/, - TRdsRadioText& aRtPlusData ) - { - - if ( STUB.iRtPlusData.Length() ) - { - aRtPlusData.Copy( STUB.iRtPlusData ); - } - - return STUB.iGetRadioTextPlusError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::GetClockTime -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioRdsUtility::CBody::GetClockTime( - TDateTime& aCt ) - { - aCt = STUB.iCt; - return STUB.iGetClockTimeError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::GetTrafficAnnouncementStatus -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioRdsUtility::CBody::GetTrafficAnnouncementStatus( - TBool& aTaStatus ) - { - STUB.iTaStatus = aTaStatus; - return STUB.iGetTrafficAnnouncementStatusError.Error(); - } - -// ----------------------------------------------------------------------------- -// CRadioRdsUtility::CBody::GetTrafficProgrammeStatus -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CRadioRdsUtility::CBody::GetTrafficProgrammeStatus( - TBool& aTpStatus ) - { - aTpStatus = STUB.iTpStatus; - return STUB.iGetTrafficProgrammeStatusError.Error(); - } - - -//End of File diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/radioutility/radioserver/Server/Src/RadioServer.cpp --- a/mmserv/radioutility/radioserver/Server/Src/RadioServer.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/radioutility/radioserver/Server/Src/RadioServer.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -2099,7 +2099,8 @@ } } } - + process.Close(); + client.Close(); #endif // RD_TSP_CLIENT_MAPPER if ( --iSessionCountPrimary == 0 ) @@ -3348,6 +3349,8 @@ { iProcessId = process.Id(); } + process.Close(); + client.Close(); #endif // RD_TSP_CLIENT_MAPPER } // End of File diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/radioutility/radioserver/Session/stub/src/RadioStubManager.h --- a/mmserv/radioutility/radioserver/Session/stub/src/RadioStubManager.h Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/radioutility/radioserver/Session/stub/src/RadioStubManager.h Thu Sep 02 20:58:01 2010 +0300 @@ -28,7 +28,6 @@ #include "RadioServerData.h" #include "mradioheadseteventobserver.h" -#include "RadioStubManager.h" _LIT(KRadioStubManagerLocalChunkName, "RadioStubManagerLocalChunkName"); @@ -258,6 +257,6 @@ const TUid KStub_KPSUidVoiceUiAccMonitor = {SRadioStubManager::EStub_KPSUidVoiceUiAccMonitor}; const TUid KStub_KPSUidMMFAudioServer = {SRadioStubManager::EStub_KPSUidMMFAudioServer}; const TUid KStub_KRadioPSUid = {SRadioStubManager::EStub_KRadioPSUid}; -const TUid KStub_KRadioCRUid = {0x101FF976}; // tried with this {SRadioStubManager::EStub_KRadioPSUid} but failed +const TUid KStub_KRadioCRUid = {0x2002FF52}; #endif /* RADIOSTUBMANAGER_H_ */ diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/src/systemtoneservice.cpp --- a/mmserv/sts/src/systemtoneservice.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/sts/src/systemtoneservice.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -64,14 +64,13 @@ iImplementation.PlayAlarm(aAlarm, aAlarmContext, aObserver); } +EXPORT_C void CSystemToneService::PlayAlarm(TToneType aTone, + unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver) + { + iImplementation.PlayAlarm(aTone, aAlarmContext, aObserver); + } + EXPORT_C void CSystemToneService::StopAlarm(unsigned int aAlarmContext) { iImplementation.StopAlarm(aAlarmContext); } - -EXPORT_C void CSystemToneService::PlayAlarm(TToneType aTone, - unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver) - { - iImplementation.PlayAlarm(aTone, aAlarmContext, aObserver); - } - diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/sts/group/sts.mmp --- a/mmserv/sts/sts/group/sts.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/sts/sts/group/sts.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -26,9 +26,12 @@ OS_LAYER_LIBC_SYSTEMINCLUDE OS_LAYER_STDCPP_SYSTEMINCLUDE +USERINCLUDE ../src USERINCLUDE ../inc SOURCEPATH ../src SOURCE sts.cpp SOURCE stsplayer.cpp +SOURCE stsplayersettings.cpp +SOURCE stssettingsmanager.cpp diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/sts/inc/sts.h --- a/mmserv/sts/sts/inc/sts.h Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/sts/sts/inc/sts.h Thu Sep 02 20:58:01 2010 +0300 @@ -18,20 +18,14 @@ * server. This class manages all of the active players, and guarantees * that the context values are unique. */ - #ifndef STS_H_ #define STS_H_ - #include #include #include "stsplayer.h" -class MProEngEngine; -class MProEngProfile; - - class CSts : private MStsPlayerObserver { public: @@ -40,16 +34,14 @@ void PlayTone(CSystemToneService::TToneType aTone); void PlayAlarm(CSystemToneService::TAlarmType aAlarm, unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver); + void PlayAlarm(CSystemToneService::TToneType aTone, + unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver); void StopAlarm(unsigned int aAlarmContext); - void PlayToneStop(CSystemToneService::TToneType aTone, - unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver); protected: CSts(); virtual ~CSts(); bool Init(); - void LoadActiveProfileSettingsL(); - private: void CleanUpPlayers(); @@ -59,19 +51,10 @@ private: unsigned int iNextContext; + CStsSettingsManager* iSettingsManager; class CPlayerNode; typedef std::map TPlayerMap; TPlayerMap iPlayerMap; - - TPtrC iFileName; - MProEngEngine* iEngine; - MProEngProfile* iProfile; - - TInt iVolume; - TBool iWarningToneEnabled; - TUint iAudioPreference; - TUint iAudioPriority; - }; #endif //STS_H diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/sts/inc/stsplayer.h --- a/mmserv/sts/sts/inc/stsplayer.h Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/sts/sts/inc/stsplayer.h Thu Sep 02 20:58:01 2010 +0300 @@ -18,10 +18,9 @@ #ifndef STSPLAYER_H_ #define STSPLAYER_H_ - #include #include - +#include "stssettingsmanager.h" class MStsPlayerObserver { @@ -32,43 +31,35 @@ class CStsPlayer : private MMdaAudioPlayerCallback { public: - - static CStsPlayer* CreateTonePlayer(MStsPlayerObserver& aObserver, - CSystemToneService::TToneType aTone, unsigned int aContext, - const TDesC& aFileName, TInt aVolume, - TUint aAudioPreference, TUint aAudioPriority); - static CStsPlayer* CreateAlarmPlayer(MStsPlayerObserver& aObserver, - CSystemToneService::TAlarmType aAlarm, unsigned int aContext, - const TDesC& aFileName, TInt aVolume, - TUint aAudioPreference, TUint aAudioPriority); + static CStsPlayer* Create(MStsPlayerObserver& aObserver, + CStsSettingsManager& aSettingsManager, unsigned int aContext, + CSystemToneService::TAlarmType aAlarm); + static CStsPlayer* Create(MStsPlayerObserver& aObserver, + CStsSettingsManager& aSettingsManager, unsigned int aContext, + CSystemToneService::TToneType aTone); virtual ~CStsPlayer(); void Play(); void Stop(); - - + protected: - - CStsPlayer(MStsPlayerObserver& aObserver, const TDesC& aFileName, - int aRepeatNumberOfTimes, unsigned int aContext, - TInt aVolume, TUint aAudioPreference, TUint aAudioPriority); + CStsPlayer(MStsPlayerObserver& aObserver, + CStsSettingsManager::MPlayerSettings& aPlayerSettings, + unsigned int aContext, TUint aAudioPreference, + TUint aAudioPriority); bool Init(); private: void MapcInitComplete(TInt aError, - const TTimeIntervalMicroSeconds& aDuration); + const TTimeIntervalMicroSeconds& aDuration); void MapcPlayComplete(TInt aError); MStsPlayerObserver& iObserver; - CMdaAudioPlayerUtility* iPlayer; - TPtrC iFileName; - int iRepeatNumberOfTimes; + CStsSettingsManager::MPlayerSettings& iPlayerSettings; unsigned int iContext; - - TInt iVolume; - TBool iWarningToneEnabled; TUint iAudioPreference; TUint iAudioPriority; - + TInt iVolume; + CMdaAudioPlayerUtility* iPlayer; }; #endif // STSPLAYER_H_ diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/sts/inc/stssettingsmanager.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmserv/sts/sts/inc/stssettingsmanager.h Thu Sep 02 20:58:01 2010 +0300 @@ -0,0 +1,73 @@ +/* + * 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: + * This file defines the interface for creating, playing, + * stopping, and deleting an MMF player for a tone type. + */ +#ifndef STSSETTINGSMANAGER_H_ +#define STSSETTINGSMANAGER_H_ + +#include +#include +#include +#include + +class CStsPlayerSettings; +class MProEngEngine; +class MProEngNotifyHandler; + +class CStsSettingsManager : private MProEngActiveProfileObserver, + MProEngProfileActivationObserver + { +public: + static CStsSettingsManager* Create(); + static void Delete(CStsSettingsManager* aStsSettingsManager); + +public: + // Data types + class MPlayerSettings + { + public: + virtual TPtrC GetFileName() = 0; + virtual int GetNumberOfRepeats() = 0; + virtual TTimeIntervalMicroSeconds& GetRepeatDelay() = 0; + virtual int GetVolumePercentage() = 0; + virtual TTimeIntervalMicroSeconds& GetVolumeRamp() = 0; + }; + + MPlayerSettings& GetPlayerSettings(CSystemToneService::TAlarmType aAlarm); + MPlayerSettings& GetPlayerSettings(CSystemToneService::TToneType aTone); + void GetAudioPriorityPref(CSystemToneService::TAlarmType aAlarm, + TUint& aPriority, TUint& aPreference); + void GetAudioPriorityPref(CSystemToneService::TToneType aTone, + TUint& aPriority, TUint& aPreference); + +protected: + CStsSettingsManager(); + virtual ~CStsSettingsManager(); + bool Init(); + +private: + bool LoadActiveProfileSettings(); + // inherited from MProEngActiveProfileObserver + virtual void HandleActiveProfileModifiedL(); + //inherited from MProEngProfileActivationObserver + virtual void HandleProfileActivatedL(TInt aProfileId); + + MProEngEngine* iEngine; + MProEngNotifyHandler* iNotifyHandler; + CStsPlayerSettings* iPlayerSettings; + }; + +#endif //STSSETTINGSMANAGER_H_ diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/sts/src/sts.cpp --- a/mmserv/sts/sts/src/sts.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/sts/sts/src/sts.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -15,17 +15,9 @@ * This file provides the implementation of System Tone Service used * by the STS Server. */ - +// Include Files #include "sts.h" -#include -#include -#include -#include -#include -#include - -_LIT(KDefaultFile,"z:\\data\\sounds\\digital\\clock.aac"); - +#include "stssettingsmanager.h" class CSts::CPlayerNode { @@ -75,21 +67,17 @@ /*static*/CSts* CSts::Create() { CSts* self = new CSts(); - + if (self != 0) { bool successful = self->Init(); - - if(successful) - { - TRAPD( err ,self->LoadActiveProfileSettingsL()); - if( (err != KErrNone ) && (!successful)) - { + + if (!successful) + { delete self; self = 0; - } + } } - } return self; } @@ -99,118 +87,31 @@ } CSts::CSts() : - iNextContext(1) + iNextContext(1), iSettingsManager(0) { } bool CSts::Init() { - iEngine = ProEngFactory::NewEngineL(); - return true; + bool successful = false; + iSettingsManager = CStsSettingsManager::Create(); + if (iSettingsManager != 0) + { + successful = true; + } + return successful; } CSts::~CSts() { CleanUpPlayers(); - if (iProfile) - { - iProfile->Release(); - } - if (iEngine) - { - iEngine->Release(); - } - + CStsSettingsManager::Delete(iSettingsManager); } - -void CSts::LoadActiveProfileSettingsL() - { - if(!iEngine) - { - iEngine = ProEngFactory::NewEngineL(); - } - - if (iEngine) - iProfile = iEngine->ActiveProfileL(); - - if (iProfile) - { - MProEngToneSettings& settings = iProfile->ToneSettings(); - iWarningToneEnabled = settings.WarningAndGameTones(); - } - - } - void CSts::PlayTone(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: - { - iFileName.Set(KDefaultFile); - iAudioPreference = KAudioPrefDefaultTone; - iAudioPriority = KAudioPriorityWarningTone ; - break; - } - } - } - - else - { - iFileName.Set(KDefaultFile); - iAudioPreference = KAudioPrefDefaultTone; - iAudioPriority = KAudioPriorityWarningTone ; - } - - - CStsPlayer* player = CStsPlayer::CreateTonePlayer(*this, aTone, - iNextContext, iFileName, iVolume, - iAudioPreference, iAudioPriority); + CStsPlayer* player = CStsPlayer::Create(*this, *iSettingsManager, + iNextContext, aTone); if (player != 0) { iPlayerMap[iNextContext] = new CPlayerNode(player); @@ -228,55 +129,29 @@ void CSts::PlayAlarm(CSystemToneService::TAlarmType aAlarm, unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver) { - - 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: - { - iFileName.Set(KDefaultFile); - iAudioPreference = KAudioPrefAlarmClock ; - iAudioPriority = KAudioPriorityAlarm; - break; - } - } - } - else - { - iFileName.Set(KDefaultFile); - iAudioPreference = KAudioPrefDefaultTone; - iAudioPriority = KAudioPriorityWarningTone ; - - } - - CStsPlayer* player = CStsPlayer::CreateAlarmPlayer(*this, aAlarm, - iNextContext, iFileName, iVolume, - iAudioPreference, iAudioPriority); + CStsPlayer* player = CStsPlayer::Create(*this, *iSettingsManager, + iNextContext, aAlarm); + if (player != 0) + { + iPlayerMap[iNextContext] = new CPlayerNode(player, aObserver); + aAlarmContext = iNextContext; + iNextContext++; + if (iNextContext == 0) + iNextContext++; + player->Play(); + } + else + { + //TODO: Add trace here + aAlarmContext = 0; + } + } + +void CSts::PlayAlarm(CSystemToneService::TToneType aTone, + unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver) + { + CStsPlayer* player = CStsPlayer::Create(*this, *iSettingsManager, + iNextContext, aTone); if (player != 0) { iPlayerMap[iNextContext] = new CPlayerNode(player, aObserver); @@ -308,104 +183,15 @@ } } - -void CSts::PlayToneStop(CSystemToneService::TToneType aTone, - unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver) - { - - if(iProfile) - +void CSts::CleanUpPlayers() { - 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: - { - iFileName.Set(KDefaultFile); - iAudioPreference = KAudioPrefDefaultTone; - iAudioPriority = KAudioPriorityWarningTone ; - break; - } - } - } - - else - { - iFileName.Set(KDefaultFile); - iAudioPreference = KAudioPrefDefaultTone; - iAudioPriority = KAudioPriorityWarningTone ; - } - - CStsPlayer* player = CStsPlayer::CreateTonePlayer(*this, aTone, - iNextContext, iFileName, iVolume, - iAudioPreference, iAudioPriority); - if (player != 0) - { - iPlayerMap[iNextContext] = new CPlayerNode(player, aObserver); - aAlarmContext = iNextContext; - iNextContext++; - if (iNextContext == 0) - iNextContext++; - player->Play(); - } - else + while (!iPlayerMap.empty()) { //TODO: Add trace here - aAlarmContext = 0; + StopAlarm(iPlayerMap.begin()->first); } } - - -void CSts::CleanUpPlayers() - { - while (!iPlayerMap.empty()) - { - //TODO: Add trace here - StopAlarm(iPlayerMap.begin()->first); - } - } - void CSts::PlayComplete(unsigned int aContext) { CPlayerNode* node = iPlayerMap[aContext]; diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/sts/src/stsplayer.cpp --- a/mmserv/sts/sts/src/stsplayer.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/sts/sts/src/stsplayer.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -15,94 +15,88 @@ * This file provides the implementation for creating and deleting a * an MMF based player for playing and stopping a tone playback. */ + +// Include Files #include "stsplayer.h" #include #include - - +#include "stsplayersettings.h" +#include "stssettingsmanager.h" -/*static*/CStsPlayer* CStsPlayer::CreateTonePlayer( - MStsPlayerObserver& aObserver,CSystemToneService::TToneType aTone, - unsigned int aContext, const TDesC& aFileName, TInt aVolume, - TUint aAudioPreference, TUint aAudioPriority) +/*static*/CStsPlayer* CStsPlayer::Create(MStsPlayerObserver& aObserver, + CStsSettingsManager& aSettingsManager, unsigned int aContext, + CSystemToneService::TAlarmType aAlarm) { CStsPlayer* self = 0; - - self = new CStsPlayer(aObserver, aFileName, 0, aContext, aVolume, aAudioPreference, aAudioPriority); - - - if (self != 0) - { - bool successful = self->Init(); - if (!successful) + CStsSettingsManager::MPlayerSettings& playerSettings = + aSettingsManager.GetPlayerSettings(aAlarm); + TUint audioPreference; + TUint audioPriority; + aSettingsManager.GetAudioPriorityPref(aAlarm, audioPriority, + audioPreference); + self = new CStsPlayer(aObserver, playerSettings, aContext, + audioPreference, audioPriority); + if (self != 0) + { + bool successful = self->Init(); + if (!successful) { - delete self; - self = 0; + delete self; + self = 0; } - } - + } return self; } -/*static*/CStsPlayer* CStsPlayer::CreateAlarmPlayer( - MStsPlayerObserver& aObserver, CSystemToneService::TAlarmType aAlarm, - unsigned int aContext, const TDesC& aFileName, TInt aVolume, - TUint aAudioPreference, TUint aAudioPriority) +/*static*/CStsPlayer* CStsPlayer::Create(MStsPlayerObserver& aObserver, + CStsSettingsManager& aSettingsManager, unsigned int aContext, + CSystemToneService::TToneType aTone) { CStsPlayer* self = 0; - - - self = new CStsPlayer(aObserver, aFileName, 10, aContext, aVolume, aAudioPreference, aAudioPriority); - - - if (self != 0) - { - bool successful = self->Init(); - if (!successful) + CStsSettingsManager::MPlayerSettings& playerSettings = + aSettingsManager.GetPlayerSettings(aTone); + TUint audioPreference; + TUint audioPriority; + aSettingsManager.GetAudioPriorityPref(aTone, audioPriority, + audioPreference); + self = new CStsPlayer(aObserver, playerSettings, aContext, + audioPreference, audioPriority); + if (self != 0) + { + bool successful = self->Init(); + if (!successful) { - delete self; - self = 0; - } - } - + delete self; + self = 0; + } + } return self; } - - - - -CStsPlayer::CStsPlayer(MStsPlayerObserver& aObserver, const TDesC& aFileName, - int aRepeatNumberOfTimes, unsigned int aContext, TInt aVolume, TUint aAudioPreference, TUint aAudioPriority ) : - iObserver(aObserver), iPlayer(0), iFileName(aFileName), - iRepeatNumberOfTimes(aRepeatNumberOfTimes), iContext(aContext), iVolume(aVolume), - iAudioPreference(aAudioPreference), iAudioPriority(aAudioPriority) +CStsPlayer::CStsPlayer(MStsPlayerObserver& aObserver, + CStsSettingsManager::MPlayerSettings& aPlayerSettings, + unsigned int aContext, TUint aAudioPreference, TUint aAudioPriority) : + iObserver(aObserver), iPlayerSettings(aPlayerSettings), + iContext(aContext), iAudioPreference(aAudioPreference), + iAudioPriority(aAudioPriority), iPlayer(0) { - } 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; - + delete iPlayer; } void CStsPlayer::Play() { // Play the tone - TRAPD(err, iPlayer->OpenFileL(iFileName)); - + TRAPD( err, iPlayer->OpenFileL(iPlayerSettings.GetFileName()) ); // If there is an error, indicate that the playback is complete. if (err) { @@ -121,10 +115,15 @@ { if (aError == KErrNone) { - TTimeIntervalMicroSeconds delay = 0; + TInt64 volumex100 = iPlayer->MaxVolume() + * iPlayerSettings.GetVolumePercentage(); + TInt volume = volumex100 / 100; // Set PriorityPref - iPlayer->SetPriority(iAudioPriority,iAudioPreference); - iPlayer->SetRepeats(iRepeatNumberOfTimes, delay); + iPlayer->SetPriority(iAudioPriority, iAudioPreference); + iPlayer->SetRepeats(iPlayerSettings.GetNumberOfRepeats(), + iPlayerSettings.GetRepeatDelay()); + iPlayer->SetVolume(volume); + iPlayer->SetVolumeRamp(iPlayerSettings.GetVolumeRamp()); iPlayer->Play(); } else diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/sts/src/stsplayersettings.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmserv/sts/sts/src/stsplayersettings.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -0,0 +1,86 @@ +/* + * 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: + * This file provides the implementation for creating and deleting a + * an MMF based player for playing and stopping a tone playback. + */ + +// Include Files +#include "stsplayersettings.h" +_LIT(KDefaultFile,"z:\\data\\sounds\\digital\\clock.aac"); + +CStsPlayerSettings::CStsPlayerSettings() : + iFileName(0), iNumberOfRepeats(0), iRepeatDelay(0), + iVolumePercentage(50), iVolumeRamp(0) + { + TBufC<40> defaultFile(KDefaultFile); + iFileName = defaultFile.AllocL(); + } + +CStsPlayerSettings::~CStsPlayerSettings() + { + delete iFileName; + } + +TPtrC CStsPlayerSettings::GetFileName() + { + return iFileName->Des(); + } + +int CStsPlayerSettings::GetNumberOfRepeats() + { + return iNumberOfRepeats; + } + +TTimeIntervalMicroSeconds& CStsPlayerSettings::GetRepeatDelay() + { + return iRepeatDelay; + } + +int CStsPlayerSettings::GetVolumePercentage() + { + return iVolumePercentage; + } + +TTimeIntervalMicroSeconds& CStsPlayerSettings::GetVolumeRamp() + { + return iVolumeRamp; + } + +void CStsPlayerSettings::SetFileName(const TDesC& aFileName) + { + delete iFileName; + iFileName = aFileName.AllocL(); + } + +void CStsPlayerSettings::SetNumberOfRepeats(int aNumberOfRepeats) + { + iNumberOfRepeats = aNumberOfRepeats; + } + +void CStsPlayerSettings::SetRepeatDelay( + TTimeIntervalMicroSeconds aRepeatDelay) + { + iRepeatDelay = aRepeatDelay; + } + +void CStsPlayerSettings::SetVolumePercentage(int aVolumePercentage) + { + iVolumePercentage = aVolumePercentage; + } + +void CStsPlayerSettings::SetVolumeRamp(TTimeIntervalMicroSeconds aVolumeRamp) + { + iVolumeRamp = aVolumeRamp; + } diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/sts/src/stsplayersettings.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmserv/sts/sts/src/stsplayersettings.h Thu Sep 02 20:58:01 2010 +0300 @@ -0,0 +1,51 @@ +/* + * 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: + * This file defines the interface for creating, playing, + * stopping, and deleting an MMF player for a tone type. + */ +#ifndef STSPLAYERSETTINGS_H_ +#define STSPLAYERSETTINGS_H_ + +#include +#include "stssettingsmanager.h" + +class CStsPlayerSettings : public CStsSettingsManager::MPlayerSettings + { +public: + CStsPlayerSettings(); + virtual ~CStsPlayerSettings(); + + void SetFileName(const TDesC& aFileName); + void SetNumberOfRepeats(int aNumberOfRepeats); + void SetRepeatDelay(TTimeIntervalMicroSeconds aRepeatDelay); + void SetVolumePercentage(int aVolumePercentage); + void SetVolumeRamp(TTimeIntervalMicroSeconds aVolumeRamp); + + // inherited from CStsSettingsManager::MPlayerSettings + virtual TPtrC GetFileName(); + virtual int GetNumberOfRepeats(); + virtual TTimeIntervalMicroSeconds& GetRepeatDelay(); + virtual int GetVolumePercentage(); + virtual TTimeIntervalMicroSeconds& GetVolumeRamp(); + +private: + HBufC* iFileName; + int iNumberOfRepeats; + TTimeIntervalMicroSeconds iRepeatDelay; + int iVolumePercentage; + TTimeIntervalMicroSeconds iVolumeRamp; + }; + +#endif //STSPLAYERSETTINGS_H_ diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/sts/src/stssettingsmanager.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmserv/sts/sts/src/stssettingsmanager.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -0,0 +1,323 @@ +/* + * 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: + * This file provides the implementation of System Tone Service used + * by the STS Server. + */ +// Include Files +#include "stssettingsmanager.h" +#include +#include +#include +#include +#include +#include +#include +#include "stsplayersettings.h" +_LIT(KDefaultFile,"z:\\data\\sounds\\digital\\clock.aac"); + +// Data types +/** The type of system tones that are supported by this API. */ +enum TSettingsType + { + EDefaultAlarm = 0, + EDefaultAlert, + EEmailAlert, + EIncomingCall, + EIncomingCall2, + EIncomingDataCall, + EMessageAlert, + EWarningBeep, + EENDMARKER + }; + +/*static*/CStsSettingsManager* CStsSettingsManager::Create() + { + CStsSettingsManager* self = new CStsSettingsManager(); + + if (self != 0) + { + bool successful = self->Init(); + + if (!successful) + { + delete self; + self = 0; + } + } + return self; + } + +/*static*/void CStsSettingsManager::Delete( + CStsSettingsManager* aStsSettingsManager) + { + delete aStsSettingsManager; + } + +CStsSettingsManager::CStsSettingsManager() : + iEngine(0), iNotifyHandler(0), iPlayerSettings(0) + { + } + +bool CStsSettingsManager::Init() + { + bool successful = false; + TRAPD( err, iEngine = ProEngFactory::NewEngineL() ); + if (err == KErrNone) + { + TRAP( err, iNotifyHandler = ProEngFactory::NewNotifyHandlerL() ); + } + if (err == KErrNone) + { + TRAP( err, iNotifyHandler->RequestProfileActivationNotificationsL(*this) ); + } + if (err == KErrNone) + { + TRAP( err, iNotifyHandler->RequestActiveProfileNotificationsL(*this) ); + } + if (err == KErrNone) + { + iPlayerSettings = new CStsPlayerSettings[EENDMARKER]; + if (iPlayerSettings != 0) + { + successful = LoadActiveProfileSettings(); + } + } + return successful; + } + +CStsSettingsManager::~CStsSettingsManager() + { + if (iEngine != 0) + { + iEngine->Release(); + } + if (iNotifyHandler != 0) + { + iNotifyHandler->CancelAll(); + delete iNotifyHandler; + } + delete[] iPlayerSettings; + } + +CStsSettingsManager::MPlayerSettings& CStsSettingsManager::GetPlayerSettings( + CSystemToneService::TAlarmType aAlarm) + { + MPlayerSettings* result; + switch (aAlarm) + { + case CSystemToneService::EIncomingCall: + { + result = &iPlayerSettings[EIncomingCall]; + break; + } + case CSystemToneService::EIncomingCallLine2: + { + result = &iPlayerSettings[EIncomingCall2]; + break; + } + case CSystemToneService::EIncomingDataCall: + { + result = &iPlayerSettings[EIncomingDataCall]; + break; + } + default: + { + result = &iPlayerSettings[EDefaultAlarm]; + break; + } + } + return *result; + } + +CStsSettingsManager::MPlayerSettings& CStsSettingsManager::GetPlayerSettings( + CSystemToneService::TToneType aTone) + { + MPlayerSettings* result; + switch (aTone) + { + case CSystemToneService::EEmailAlert: + { + result = &iPlayerSettings[EEmailAlert]; + break; + } + case CSystemToneService::ESmsAlert: + case CSystemToneService::EMmsAlert: + case CSystemToneService::EChatAlert: + { + result = &iPlayerSettings[EMessageAlert]; + break; + } + case CSystemToneService::EWarningBeep: + { + result = &iPlayerSettings[EWarningBeep]; + break; + } + default: + { + result = &iPlayerSettings[EDefaultAlert]; + break; + } + } + return *result; + } + +void CStsSettingsManager::GetAudioPriorityPref( + CSystemToneService::TAlarmType aAlarm, TUint& aPriority, + TUint& aPreference) + { + switch (aAlarm) + { + case CSystemToneService::EIncomingCall: + case CSystemToneService::EIncomingCallLine2: + { + aPriority = KAudioPriorityRingingTone; + aPreference = KAudioPrefIncomingCall; + break; + } + case CSystemToneService::EIncomingDataCall: + { + aPriority = KAudioPriorityRealOnePlayer; + aPreference = KAudioPrefIncomingDataCall; + break; + } + default: + { + aPriority = KAudioPriorityAlarm; + aPreference = KAudioPrefAlarmClock; + break; + } + } + } + +void CStsSettingsManager::GetAudioPriorityPref( + CSystemToneService::TToneType aTone, TUint& aPriority, + TUint& aPreference) + { + switch (aTone) + { + case CSystemToneService::EEmailAlert: + case CSystemToneService::ESmsAlert: + case CSystemToneService::EMmsAlert: + case CSystemToneService::EChatAlert: + { + aPriority = KAudioPriorityRecvMsg; + aPreference = KAudioPrefNewSMS; + break; + } + case CSystemToneService::EWarningBeep: + { + aPriority = KAudioPriorityWarningTone; + aPreference = KAudioPrefWarning; + break; + } + default: + { + aPriority = KAudioPriorityWarningTone; + aPreference = KAudioPrefDefaultTone; + break; + } + } + } + +bool CStsSettingsManager::LoadActiveProfileSettings() + { + bool successful = false; + MProEngProfile* profile = 0; + TRAPD( err, profile = iEngine->ActiveProfileL() ); + + if (err == KErrNone) + { + MProEngTones& tones = profile->ProfileTones(); + MProEngToneSettings& settings = profile->ToneSettings(); + int volume = 50; + if (profile->IsSilent()) + { + volume = 0; + } + int warningVolume = 0; + if (settings.WarningAndGameTones()) + { + warningVolume = 50; + } + + iPlayerSettings[EDefaultAlarm].SetFileName(KDefaultFile); + iPlayerSettings[EDefaultAlert].SetFileName(KDefaultFile); + iPlayerSettings[EEmailAlert].SetFileName(tones.EmailAlertTone()); + iPlayerSettings[EIncomingCall].SetFileName(tones.RingingTone1()); + iPlayerSettings[EIncomingCall2].SetFileName(tones.RingingTone2()); + iPlayerSettings[EIncomingDataCall].SetFileName( + tones.VideoCallRingingTone()); + iPlayerSettings[EMessageAlert].SetFileName(tones.MessageAlertTone()); + iPlayerSettings[EWarningBeep].SetFileName(KDefaultFile); + + iPlayerSettings[EDefaultAlarm].SetNumberOfRepeats(5); + iPlayerSettings[EDefaultAlert].SetNumberOfRepeats(0); + iPlayerSettings[EEmailAlert].SetNumberOfRepeats(0); + iPlayerSettings[EIncomingCall].SetNumberOfRepeats(100); + iPlayerSettings[EIncomingCall2].SetNumberOfRepeats(100); + iPlayerSettings[EIncomingDataCall].SetNumberOfRepeats(100); + iPlayerSettings[EMessageAlert].SetNumberOfRepeats(0); + iPlayerSettings[EWarningBeep].SetNumberOfRepeats(0); + + iPlayerSettings[EDefaultAlarm].SetRepeatDelay(1000); + iPlayerSettings[EDefaultAlert].SetRepeatDelay(0); + iPlayerSettings[EEmailAlert].SetRepeatDelay(0); + iPlayerSettings[EIncomingCall].SetRepeatDelay(1000); + iPlayerSettings[EIncomingCall2].SetRepeatDelay(1000); + iPlayerSettings[EIncomingDataCall].SetRepeatDelay(1000); + iPlayerSettings[EMessageAlert].SetRepeatDelay(0); + iPlayerSettings[EWarningBeep].SetRepeatDelay(0); + + iPlayerSettings[EDefaultAlarm].SetVolumePercentage(volume); + iPlayerSettings[EDefaultAlert].SetVolumePercentage(volume); + iPlayerSettings[EEmailAlert].SetVolumePercentage(volume); + iPlayerSettings[EIncomingCall].SetVolumePercentage(volume); + iPlayerSettings[EIncomingCall2].SetVolumePercentage(volume); + iPlayerSettings[EIncomingDataCall].SetVolumePercentage(volume); + iPlayerSettings[EMessageAlert].SetVolumePercentage(volume); + iPlayerSettings[EWarningBeep].SetVolumePercentage(warningVolume); + + iPlayerSettings[EDefaultAlarm].SetVolumeRamp(1000000); + iPlayerSettings[EDefaultAlert].SetVolumeRamp(1000); + iPlayerSettings[EEmailAlert].SetVolumeRamp(1000); + iPlayerSettings[EIncomingCall].SetVolumeRamp(1000000); + iPlayerSettings[EIncomingCall2].SetVolumeRamp(1000000); + iPlayerSettings[EIncomingDataCall].SetVolumeRamp(1000000); + iPlayerSettings[EMessageAlert].SetVolumeRamp(1000); + iPlayerSettings[EWarningBeep].SetVolumeRamp(1000); + + profile->Release(); + successful = true; + } + return successful; + } + +void CStsSettingsManager::HandleActiveProfileModifiedL() + { + bool successful = LoadActiveProfileSettings(); + if (!successful) + { + //TODO: Log error + } + } + +void CStsSettingsManager::HandleProfileActivatedL(TInt /*aProfileId*/) + { + bool successful = LoadActiveProfileSettings(); + if (!successful) + { + //TODO: Log error + } + } diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/stsproxy/group/stsproxy.mmp --- a/mmserv/sts/stsproxy/group/stsproxy.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/sts/stsproxy/group/stsproxy.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -30,4 +30,5 @@ SOURCEPATH ../src -SOURCE stsimplementation.cpp rstssession.cpp +SOURCE rstssession.cpp +SOURCE stsimplementation.cpp diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/stsproxy/inc/stsimplementation.h --- a/mmserv/sts/stsproxy/inc/stsimplementation.h Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/sts/stsproxy/inc/stsimplementation.h Thu Sep 02 20:58:01 2010 +0300 @@ -15,7 +15,6 @@ * This file defines the interface to the class that provides the * implementation logic of the STS API. */ - #ifndef STSIMPLEMENTATION_H_ #define STSIMPLEMENTATION_H_ @@ -30,13 +29,11 @@ virtual ~CStsImplementation(); public: void PlayTone(CSystemToneService::TToneType aTone); - void - PlayAlarm(CSystemToneService::TAlarmType aAlarm, + void PlayAlarm(CSystemToneService::TAlarmType aAlarm, + unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver); + void PlayAlarm(CSystemToneService::TToneType aTone, unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver); void StopAlarm(unsigned int aAlarmContext); - void - PlayAlarm(CSystemToneService::TToneType aTone, - unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver); private: CStsImplementation(); bool Init(); diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/stsproxy/src/rstssession.cpp --- a/mmserv/sts/stsproxy/src/rstssession.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/sts/stsproxy/src/rstssession.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -16,6 +16,7 @@ * to the STS Server. */ +// Include Files #include "rstssession.h" #include "stsclientservercommon.h" @@ -96,6 +97,7 @@ void RStsSession::HandleMessage(TStsCallBack& aMessage) { + bool signalObserver = false; TStsCallBackType type = aMessage.callBackType; if (type == EStsPlayAlarmComplete) { @@ -104,7 +106,7 @@ iObserverMutex.Wait(); if (observer == iObserverMap[context]) { - observer->PlayAlarmComplete(aMessage.alarmContext); + signalObserver = true; } else { @@ -112,6 +114,10 @@ } iObserverMap.erase(context); iObserverMutex.Signal(); + if (signalObserver) + { + observer->PlayAlarmComplete(aMessage.alarmContext); + } } else if (type == EStsShutdown) { @@ -165,7 +171,6 @@ { TInt result = iThread.Create(KNullDesC, RStsSession::CallBackThreadMain, KDefaultStackSize, &User::Heap(), (TAny*) this); - if (result == KErrNone) { TRequestStatus rendezvousStatus = KRequestPending; @@ -186,7 +191,6 @@ iThread.Kill(result); } } - return result; } @@ -208,14 +212,12 @@ KStsServerBuild), KNumSlots, EIpcSession_Sharable); } } - if (result == KErrNone) { TPckg idPckg(iServerThreadId); result = SendReceive(StsMsg_RegisterMsgQueue, TIpcArgs(iMsgQueue, &idPckg)); } - return result; } @@ -239,7 +241,6 @@ } } } - return result; } @@ -267,19 +268,56 @@ void RStsSession::SendPlayAlarm(CSystemToneService::TAlarmType aAlarm, unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver) { + bool signalObserver = false; TPckg alarmContextPckg(aAlarmContext); + // Need to do the SendReceive and adding the observer to the + // observer map in a critical section in case the playback + // completes before this method has a chance to update the + // observer list. + iObserverMutex.Wait(); TInt err = SendReceive(StsMsg_PlayAlarm, TIpcArgs(aAlarm, &alarmContextPckg, &aObserver)); if (err != KErrNone) { //TODO: Log a message - aObserver.PlayAlarmComplete(aAlarmContext); + signalObserver = true; } else { - iObserverMutex.Wait(); iObserverMap[aAlarmContext] = &aObserver; - iObserverMutex.Signal(); + } + iObserverMutex.Signal(); + if (signalObserver) + { + aObserver.PlayAlarmComplete(aAlarmContext); + } + } + +void RStsSession::SendPlayToneAlarm(CSystemToneService::TToneType aTone, + unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver) + { + bool signalObserver = false; + TPckg alarmContextPckg(aAlarmContext); + // Need to do the SendReceive and adding the observer to the + // observer map in a critical section in case the playback + // completes before this method has a chance to update the + // observer list. + iObserverMutex.Wait(); + TInt err = SendReceive(StsMsg_PlayToneAlarm, TIpcArgs(aTone, + &alarmContextPckg, &aObserver)); + if (err != KErrNone) + { + //TODO: Log a message + signalObserver = true; + } + else + { + iObserverMap[aAlarmContext] = &aObserver; + } + iObserverMutex.Signal(); + if (signalObserver) + { + aObserver.PlayAlarmComplete(aAlarmContext); } } @@ -295,26 +333,6 @@ } } -void RStsSession::SendPlayToneForStop(CSystemToneService::TToneType aTone, - unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver) - { - TPckg alarmContextPckg(aAlarmContext); - TInt err = SendReceive(StsMsg_PlayTone, TIpcArgs(aTone, - &alarmContextPckg, &aObserver)); - if (err != KErrNone) - { - //TODO: Log a message - aObserver.PlayAlarmComplete(aAlarmContext); - } - else - { - iObserverMutex.Wait(); - iObserverMap[aAlarmContext] = &aObserver; - iObserverMutex.Signal(); - } - } - - void RStsSession::CleanUpObservers() { iObserverMutex.Wait(); diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/stsproxy/src/rstssession.h --- a/mmserv/sts/stsproxy/src/rstssession.h Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/sts/stsproxy/src/rstssession.h Thu Sep 02 20:58:01 2010 +0300 @@ -15,7 +15,6 @@ * This file defines the interface to the client side session of the * STS Server. */ - #ifndef RSTSSESSION_H_ #define RSTSSESSION_H_ @@ -38,10 +37,10 @@ void SendPlayAlarm(CSystemToneService::TAlarmType aAlarm, unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver); + void SendPlayToneAlarm(CSystemToneService::TToneType aTone, + unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver); + void SendStopAlarm(unsigned int aAlarmContext); - - void SendPlayToneForStop(CSystemToneService::TToneType aTone, - unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver); private: diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/stsproxy/src/stsimplementation.cpp --- a/mmserv/sts/stsproxy/src/stsimplementation.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/sts/stsproxy/src/stsimplementation.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -73,14 +73,14 @@ iSession->SendPlayAlarm(aAlarm, aAlarmContext, aObserver); } +void CStsImplementation::PlayAlarm(CSystemToneService::TToneType aTone, + unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver) + { + iSession->SendPlayToneAlarm(aTone, aAlarmContext, aObserver); + } + void CStsImplementation::StopAlarm(unsigned int aAlarmContext) { //TODO: Add logging and error checking iSession->SendStopAlarm(aAlarmContext); } - -void CStsImplementation::PlayAlarm(CSystemToneService::TToneType aTone, - unsigned int& aAlarmContext, MStsPlayAlarmObserver& aObserver) - { - iSession->SendPlayToneForStop(aTone, aAlarmContext, aObserver); - } diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/stsserver/inc/stsclientservercommon.h --- a/mmserv/sts/stsserver/inc/stsclientservercommon.h Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/sts/stsserver/inc/stsclientservercommon.h Thu Sep 02 20:58:01 2010 +0300 @@ -15,7 +15,6 @@ * This file defines common types and constants used by the STS server * and sessions. */ - #ifndef STSCLIENTSERVERCOMMON_H_ #define STSCLIENTSERVERCOMMON_H_ @@ -38,7 +37,7 @@ StsMsg_StopAlarm, StsMsg_PlayTone, StsMsg_PlayAlarm, - StsMsg_PlayToneStop, + StsMsg_PlayToneAlarm, StsMsg_ENDMARKER }; @@ -47,8 +46,7 @@ enum TStsCallBackType { - EStsShutdown, - EStsPlayAlarmComplete + EStsShutdown, EStsPlayAlarmComplete }; struct TStsCallBack diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/stsserver/src/stsserver.cpp --- a/mmserv/sts/stsserver/src/stsserver.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/sts/stsserver/src/stsserver.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -18,6 +18,7 @@ * functionality is handled in the STS class. */ +// Include Files #include "stsserver.h" #include "stsserversession.h" #include "sts.h" @@ -89,6 +90,7 @@ switch (aMsg.Function()) { case StsMsg_PlayTone: + case StsMsg_PlayToneAlarm: { CSystemToneService::TToneType tone = (CSystemToneService::TToneType) aMsg.Int0(); @@ -114,7 +116,7 @@ TSecurityInfo& /*aMissing*/) { CPolicyServer::TCustomResult result; - switch(aAlarm) + switch (aAlarm) { default: result = CPolicyServer::EPass; @@ -127,7 +129,7 @@ TSecurityInfo& /*aMissing*/) { CPolicyServer::TCustomResult result; - switch(aTone) + switch (aTone) { default: result = CPolicyServer::EPass; diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/stsserver/src/stsserver.h --- a/mmserv/sts/stsserver/src/stsserver.h Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/sts/stsserver/src/stsserver.h Thu Sep 02 20:58:01 2010 +0300 @@ -14,7 +14,6 @@ * Description: * This file defines the interface into the STS server. */ - #ifndef STSSERVER_H_ #define STSSERVER_H_ diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/stsserver/src/stsserverexe.cpp --- a/mmserv/sts/stsserver/src/stsserverexe.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/sts/stsserver/src/stsserverexe.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -15,6 +15,7 @@ * The file containt the main method of the STS Server. */ +// Include Files #include #include "stsserver.h" @@ -26,7 +27,7 @@ RThread myThread; myThread.SetPriority(EPriorityAbsoluteRealTime1); myThread.Close(); - + CTrapCleanup* cleanup = CTrapCleanup::New(); if (cleanup) diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/stsserver/src/stsserversession.cpp --- a/mmserv/sts/stsserver/src/stsserversession.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/sts/stsserver/src/stsserversession.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -17,6 +17,7 @@ * in the STS class. */ +// Include Files #include "stsserversession.h" #include "stsserver.h" #include "sts.h" @@ -55,6 +56,9 @@ case StsMsg_PlayAlarm: DoPlayAlarmL(aMessage); break; + case StsMsg_PlayToneAlarm: + DoPlayToneAlarmL(aMessage); + break; case StsMsg_StopAlarm: DoStopAlarmL(aMessage); break; @@ -106,22 +110,12 @@ } } -void CStsServerSession::DoStopAlarmL(const RMessage2& aMessage) - { - unsigned int context = aMessage.Int0(); - aMessage.Complete(KErrNone); - iObserverMap.erase(context); - iSts.StopAlarm(context); - } - -void CStsServerSession::DoPlayToneStopL(const RMessage2& aMessage) +void CStsServerSession::DoPlayToneAlarmL(const RMessage2& aMessage) { CSystemToneService::TToneType tone = (CSystemToneService::TToneType) aMessage.Int0(); unsigned int context = 0; - //SR - //iSts.PlayTone(tone, context, *this); - iSts.PlayToneStop(tone, context, *this); + iSts.PlayAlarm(tone, context, *this); iObserverMap[context] = (MStsPlayAlarmObserver*) aMessage.Ptr2(); TPckg contextPckg(context); TRAPD(err,aMessage.WriteL(1,contextPckg)); @@ -134,6 +128,13 @@ } } +void CStsServerSession::DoStopAlarmL(const RMessage2& aMessage) + { + unsigned int context = aMessage.Int0(); + aMessage.Complete(KErrNone); + iObserverMap.erase(context); + iSts.StopAlarm(context); + } void CStsServerSession::CleanUpObservers() { diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/stsserver/src/stsserversession.h --- a/mmserv/sts/stsserver/src/stsserversession.h Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/sts/stsserver/src/stsserversession.h Thu Sep 02 20:58:01 2010 +0300 @@ -14,7 +14,6 @@ * Description: * This file defines the interface for the STS server side session. */ - #ifndef STSSERVERSESSION_H_ #define STSSERVERSESSION_H_ @@ -46,11 +45,11 @@ void DoRegisterMsgQueueL(const RMessage2& aMessage); void DoPlayToneL(const RMessage2& aMessage); void DoPlayAlarmL(const RMessage2& aMessage); + void DoPlayToneAlarmL(const RMessage2& aMessage); void DoStopAlarmL(const RMessage2& aMessage); - void DoPlayToneStopL(const RMessage2& aMessage); void CleanUpObservers(); - + // inherited from MPlayAlarmObserver virtual void PlayAlarmComplete(unsigned int aAlarmContext); diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/tsrc/ststester/src/ststester.cpp --- a/mmserv/sts/tsrc/ststester/src/ststester.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/sts/tsrc/ststester/src/ststester.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -49,25 +49,28 @@ }, // 0 - 9 { + STR("Stop Current Alarm"), + EOperation_StopCurrentAlarm + }, + { STR("Play Default Beep"), EOperation_PlayDefaultBeep }, { - STR("Play Clock Alarm"), - EOperation_PlayClockAlarm - }, - { - STR("Stop Clock Alarm"), - EOperation_StopClockAlarm + STR("Play Default Alarm"), + EOperation_PlayDefaultAlarm }, { - STR(""), KOperation_None + STR("Play Default Beep as Alarm"), + EOperation_PlayDefaultasAlarm }, { - STR(""), KOperation_None + STR("Play Incoming Call Alarm"), + EOperation_PlayIncomingCallAlarm }, { - STR(""), KOperation_None + STR("Play Warning Beep"), + EOperation_PlayWarningBeep }, { STR(""), KOperation_None @@ -117,9 +120,12 @@ void CStsTester::MainL() { + _LIT(KStopCurrentAlarm, "Stop Current Alarm"); _LIT(KPlayDefault, "Play Default Beep"); - _LIT(KPlayClockAlarm, "Play Clock Alarm"); - _LIT(KStopClockAlarm, "Stop Clock Alarm"); + _LIT(KPlayDefaultAlarm, "Play Default Alarm"); + _LIT(KPlayDefaultAsAlarm, "Play Default Beep as Alarm"); + _LIT(KPlayIncomingCallAlarm, "Play Incoming Call Alarm"); + _LIT(KPlayWarningBeep, "Play Warning Beep"); _LIT(KExit, "Exit"); bool done = false; @@ -127,9 +133,12 @@ while (!done) { RPointerArray operations; + operations.Append(&KStopCurrentAlarm); operations.Append(&KPlayDefault); - operations.Append(&KPlayClockAlarm); - operations.Append(&KStopClockAlarm); + operations.Append(&KPlayDefaultAlarm); + operations.Append(&KPlayDefaultAsAlarm); + operations.Append(&KPlayIncomingCallAlarm); + operations.Append(&KPlayWarningBeep); operations.Append(&KExit); TInt index = SelectFromListL(TPoint(0, 0), iDisplaySize, _L( @@ -145,15 +154,24 @@ done = true; break; case 0: - ExecuteOperation(EOperation_PlayDefaultBeep, operationName); + ExecuteOperation(EOperation_StopCurrentAlarm, operationName); break; case 1: - ExecuteOperation(EOperation_PlayClockAlarm, operationName); + ExecuteOperation(EOperation_PlayDefaultBeep, operationName); break; case 2: - ExecuteOperation(EOperation_StopClockAlarm, operationName); + ExecuteOperation(EOperation_PlayDefaultAlarm, operationName); break; case 3: + ExecuteOperation(EOperation_PlayDefaultasAlarm, operationName); + break; + case 4: + ExecuteOperation(EOperation_PlayIncomingCallAlarm, operationName); + break; + case 5: + ExecuteOperation(EOperation_PlayWarningBeep, operationName); + break; + case 6: done = true; break; } @@ -164,6 +182,15 @@ { switch (aOperation) { + case EOperation_StopCurrentAlarm: + { + TAG_TIME_PROFILING_BEGIN; + iSts->StopAlarm(iCurrentContext); + TAG_TIME_PROFILING_END; + PRINT_TO_CONSOLE_TIME_DIFF; + iPlayState = EStopped; + break; + } case EOperation_PlayDefaultBeep: { TAG_TIME_PROFILING_BEGIN; @@ -172,7 +199,7 @@ PRINT_TO_CONSOLE_TIME_DIFF; break; } - case EOperation_PlayClockAlarm: + case EOperation_PlayDefaultAlarm: { // Only play if not already playing if (iPlayState != EPlaying) @@ -186,13 +213,41 @@ } break; } - case EOperation_StopClockAlarm: + case EOperation_PlayDefaultasAlarm: + { + // Only play if not already playing + if (iPlayState != EPlaying) + { + iPlayState = EPlaying; + TAG_TIME_PROFILING_BEGIN; + iSts->PlayAlarm(CSystemToneService::EDefaultBeep, + iCurrentContext, *this); + TAG_TIME_PROFILING_END; + PRINT_TO_CONSOLE_TIME_DIFF; + } + break; + } + case EOperation_PlayIncomingCallAlarm: { - TAG_TIME_PROFILING_BEGIN; - iSts->StopAlarm(iCurrentContext); - TAG_TIME_PROFILING_END; - PRINT_TO_CONSOLE_TIME_DIFF; - iPlayState = EStopped; + // Only play if not already playing + if (iPlayState != EPlaying) + { + iPlayState = EPlaying; + TAG_TIME_PROFILING_BEGIN; + iSts->PlayAlarm(CSystemToneService::EIncomingCall, + iCurrentContext, *this); + TAG_TIME_PROFILING_END; + PRINT_TO_CONSOLE_TIME_DIFF; + } + break; + } + case EOperation_PlayWarningBeep: + { + // Only play if not already playing + TAG_TIME_PROFILING_BEGIN; + iSts->PlayTone(CSystemToneService::EWarningBeep); + TAG_TIME_PROFILING_END; + PRINT_TO_CONSOLE_TIME_DIFF; break; } default: diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/sts/tsrc/ststester/src/ststester.h --- a/mmserv/sts/tsrc/ststester/src/ststester.h Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/sts/tsrc/ststester/src/ststester.h Thu Sep 02 20:58:01 2010 +0300 @@ -23,9 +23,13 @@ enum TOperations { - EOperation_PlayDefaultBeep = KOperation_FirstCustomIndex, - EOperation_PlayClockAlarm, - EOperation_StopClockAlarm + EOperation_StopCurrentAlarm = KOperation_FirstCustomIndex, + EOperation_PlayDefaultBeep, + EOperation_PlayDefaultAlarm, + EOperation_StopClockAlarm, + EOperation_PlayDefaultasAlarm, + EOperation_PlayIncomingCallAlarm, + EOperation_PlayWarningBeep }; class CStsTester : public CTestAppBase, MStsPlayAlarmObserver diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/thumbnailengine/Group/HXTNEEngine.mmp --- a/mmserv/thumbnailengine/Group/HXTNEEngine.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/thumbnailengine/Group/HXTNEEngine.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -70,7 +70,7 @@ LIBRARY euser.lib efsrv.lib LIBRARY fbscli.lib LIBRARY gdi.lib -LIBRARY 3GPMP4Lib.lib +LIBRARY 3gpmp4lib.lib LIBRARY ecom.lib LIBRARY devvideo.lib LIBRARY flogger.lib diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/thumbnailengine/Group/TNEEngine.mmp --- a/mmserv/thumbnailengine/Group/TNEEngine.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/thumbnailengine/Group/TNEEngine.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -67,7 +67,7 @@ LIBRARY euser.lib efsrv.lib LIBRARY fbscli.lib LIBRARY gdi.lib -LIBRARY 3GPMP4Lib.lib +LIBRARY 3gpmp4lib.lib LIBRARY ecom.lib LIBRARY devvideo.lib diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/thumbnailengine/TneAPISrc/HXTNEVideoClipInfoImp.cpp --- a/mmserv/thumbnailengine/TneAPISrc/HXTNEVideoClipInfoImp.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/thumbnailengine/TneAPISrc/HXTNEVideoClipInfoImp.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -421,6 +421,14 @@ if ( !iRgbBuf ) { + //we only support even frame width & height. Ignore and return error + if ( (iMetaData.iWidth & 0x01) || (iMetaData.iHeight & 0x01) ) + { + FLOG(_L("CHXTNEVideoClipInfoImp::GenerateThumbNail non-even frame size returning error iMetaData.iWidth=%d iMetaData.iHeight=%d "),iMetaData.iWidth,iMetaData.iHeight); + HandleThumbnailError(KErrNotSupported); + return; + } + TSize inputFrameResolution(iMetaData.iWidth,iMetaData.iHeight); // rgb specs diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/tms/tmscallserver/group/tmscallserver.mmp --- a/mmserv/tms/tmscallserver/group/tmscallserver.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/tms/tmscallserver/group/tmscallserver.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -74,15 +74,15 @@ LIBRARY libgstapp.lib LIBRARY libgstdevsoundext.lib #else //__USE_GSTREAMER__ -LIBRARY errorconcealmentintfc.lib -LIBRARY g711decoderintfc.lib -LIBRARY g711encoderintfc.lib -LIBRARY g729decoderintfc.lib -LIBRARY g729encoderintfc.lib -LIBRARY ilbcdecoderintfc.lib -LIBRARY ilbcencoderintfc.lib -LIBRARY speechencoderconfig.lib -LIBRARY audiooutputrouting.lib +LIBRARY ErrorConcealmentIntfc.lib +LIBRARY G711DecoderIntfc.lib +LIBRARY G711EncoderIntfc.lib +LIBRARY G729DecoderIntfc.lib +LIBRARY G729EncoderIntfc.lib +LIBRARY IlbcDecoderIntfc.lib +LIBRARY IlbcEncoderIntfc.lib +LIBRARY SpeechEncoderConfig.lib +LIBRARY AudioOutputRouting.lib #endif //__USE_GSTREAMER__ LIBRARY euser.lib LIBRARY estor.lib @@ -92,8 +92,8 @@ LIBRARY mmfdevsound.lib LIBRARY mmfserverbaseclasses.lib LIBRARY mediaclientaudio.lib -LIBRARY profileengine.lib -LIBRARY telephonyaudiorouting.lib +LIBRARY ProfileEngine.lib +LIBRARY TelephonyAudioRouting.lib LIBRARY tmsutility.lib DEFFILE tmscallserver.def diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/tms/tmsserver/src/tmsserver.cpp --- a/mmserv/tms/tmsserver/src/tmsserver.cpp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/tms/tmsserver/src/tmsserver.cpp Thu Sep 02 20:58:01 2010 +0300 @@ -801,20 +801,27 @@ TRACE_PRN_FN_ENT; TInt vol; - iCurrentRouting = routingpckg().iOutput; - if (iCurrentRouting == TMS_AUDIO_OUTPUT_PUBLIC || - iCurrentRouting == TMS_AUDIO_OUTPUT_LOUDSPEAKER) + TInt status(TMS_RESULT_SUCCESS); + FindActiveCallType(); + + if (iActiveCallType == TMS_CALL_CS) { - iEffectSettings->GetLoudSpkrVolume(vol); - TRACE_PRN_N1(_L("TMSServer::NotifyTarClients loudspkr vol %d"),vol); + + iCurrentRouting = routingpckg().iOutput; + if (iCurrentRouting == TMS_AUDIO_OUTPUT_PUBLIC || + iCurrentRouting == TMS_AUDIO_OUTPUT_LOUDSPEAKER) + { + iEffectSettings->GetLoudSpkrVolume(vol); + TRACE_PRN_N1(_L("TMSServer::NotifyTarClients loudspkr vol %d"),vol); + } + else + { + iEffectSettings->GetEarPieceVolume(vol); + TRACE_PRN_N1(_L("TMSServer::NotifyTarClients ear vol %d"),vol); + } + + status = SendMessageToCallServ(TMS_EFFECT_GLOBAL_VOL_SET, vol); } - else - { - iEffectSettings->GetEarPieceVolume(vol); - TRACE_PRN_N1(_L("TMSServer::NotifyTarClients ear vol %d"),vol); - } - - TInt status = SendMessageToCallServ(TMS_EFFECT_GLOBAL_VOL_SET, vol); iSessionIter.SetToFirst(); TMSServerSession* ss = static_cast (iSessionIter++); @@ -825,8 +832,11 @@ { ss->HandleRoutingChange(routingpckg); } - ss->HandleGlobalEffectChange(TMS_EVENT_EFFECT_VOL_CHANGED, vol, ETrue, - iCurrentRouting); + if (iActiveCallType == TMS_CALL_CS) + { + ss->HandleGlobalEffectChange(TMS_EVENT_EFFECT_VOL_CHANGED, vol, + ETrue, iCurrentRouting); + } ss = static_cast (iSessionIter++); } diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/voipaudioservices/VoIPIntfc/group/VoIPAudioIntfc.mmp --- a/mmserv/voipaudioservices/VoIPIntfc/group/VoIPAudioIntfc.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/voipaudioservices/VoIPIntfc/group/VoIPAudioIntfc.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -73,15 +73,15 @@ LIBRARY euser.lib LIBRARY mediaclientaudioinputstream.lib LIBRARY mediaclientaudiostream.lib -LIBRARY audiooutputrouting.lib +LIBRARY AudioOutputRouting.lib LIBRARY mediaclientaudio.lib -LIBRARY errorconcealmentintfc.lib -LIBRARY g711decoderintfc.lib -LIBRARY g711encoderintfc.lib -LIBRARY g729decoderintfc.lib -LIBRARY g729encoderintfc.lib -LIBRARY ilbcdecoderintfc.lib -LIBRARY ilbcencoderintfc.lib +LIBRARY ErrorConcealmentIntfc.lib +LIBRARY G711DecoderIntfc.lib +LIBRARY G711EncoderIntfc.lib +LIBRARY G729DecoderIntfc.lib +LIBRARY G729EncoderIntfc.lib +LIBRARY IlbcDecoderIntfc.lib +LIBRARY IlbcEncoderIntfc.lib SMPSAFE diff -r 1fa3fb47b1e3 -r c2e43643db4c mmserv/voipaudioservices/VoIPServer/group/VoIPAudioServer.mmp --- a/mmserv/voipaudioservices/VoIPServer/group/VoIPAudioServer.mmp Wed Aug 18 10:17:22 2010 +0300 +++ b/mmserv/voipaudioservices/VoIPServer/group/VoIPAudioServer.mmp Thu Sep 02 20:58:01 2010 +0300 @@ -54,16 +54,16 @@ LIBRARY estor.lib LIBRARY mediaclientaudio.lib LIBRARY mmfdevsound.lib -LIBRARY errorconcealmentintfc.lib -LIBRARY g711decoderintfc.lib -LIBRARY g711encoderintfc.lib -LIBRARY g729decoderintfc.lib -LIBRARY g729encoderintfc.lib -LIBRARY ilbcdecoderintfc.lib -LIBRARY ilbcencoderintfc.lib -LIBRARY speechencoderconfig.lib -LIBRARY audiooutputrouting.lib -LIBRARY profileengine.lib +LIBRARY ErrorConcealmentIntfc.lib +LIBRARY G711DecoderIntfc.lib +LIBRARY G711EncoderIntfc.lib +LIBRARY G729DecoderIntfc.lib +LIBRARY G729EncoderIntfc.lib +LIBRARY IlbcDecoderIntfc.lib +LIBRARY IlbcEncoderIntfc.lib +LIBRARY SpeechEncoderConfig.lib +LIBRARY AudioOutputRouting.lib +LIBRARY ProfileEngine.lib LIBRARY voipjitterbuffer.lib LIBRARY mmfserverbaseclasses.lib diff -r 1fa3fb47b1e3 -r c2e43643db4c package_definition.xml --- a/package_definition.xml Wed Aug 18 10:17:22 2010 +0300 +++ b/package_definition.xml Thu Sep 02 20:58:01 2010 +0300 @@ -166,7 +166,7 @@ - +