- We don't pass that information from the parser node to the decoder node. The main reason being that we don't trust that information. - There isn't and shouldn't be any information about the bitstream that the decoder cannot decipher. - Once again, why do you have a decoder for a WAV content? Are you adding support for formats other than PCM, ulaw, and alaw?
-Ravi On Jul 13, 1:28 am, sesha giri <[email protected]> wrote: > Hi Ravi, > > I had seen this case in pvmf_omx_audiodec_node.cpp > > This is what the case(The code is from the cupcake version of Android): > case OMX_EventPortSettingsChanged: > { > LOGD("EventHandlerProcessing::OMX_EventPortSettingsChanged"); > PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, > PVLOGMSG_STACK_TRACE, > (0, "PVMFOMXAudioDecNode::EventHandlerProcessing: > OMX_EventPortSettingsChanged returned from OMX component")); > > // first check if dynamic reconfiguration is already in progress, > // if so, wait until this is completed, and then initiate the 2nd > reconfiguration > if (iDynamicReconfigInProgress) > { > > LOGD("EventHandlerProcessing::OMX_EventPortSettingsChanged::iDynamicReconfigInProgress"); > PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, > PVLOGMSG_STACK_TRACE, > (0, > "PVMFOMXAudioDecNode::EventHandlerProcessing: OMX_EventPortSettingsChanged > returned for port %d, dynamic reconfig already in progress", aData1)); > > iSecondPortToReconfig = aData1; > iSecondPortReportedChange = true; > > // check the audio sampling rate and fs right away in case of > output port > // is this output port? > if (iSecondPortToReconfig == iOutputPortIndex) > { > > OMX_ERRORTYPE Err; > // GET the output buffer params and sizes > OMX_AUDIO_PARAM_PCMMODETYPE Audio_Pcm_Param; > Audio_Pcm_Param.nPortIndex = iOutputPortIndex; // we're > looking for output port params > Audio_Pcm_Param.nSize = > sizeof(OMX_AUDIO_PARAM_PCMMODETYPE); > Audio_Pcm_Param.nVersion.s.nVersionMajor = > SPECVERSIONMAJOR; > Audio_Pcm_Param.nVersion.s.nVersionMinor = > SPECVERSIONMINOR; > Audio_Pcm_Param.nVersion.s.nRevision = SPECREVISION; > Audio_Pcm_Param.nVersion.s.nStep = SPECSTEP; > > Err = OMX_GetParameter(iOMXAudioDecoder, > OMX_IndexParamAudioPcm, &Audio_Pcm_Param); > if (Err != OMX_ErrorNone) > { > PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, > PVLOGMSG_ERR, > (0, > "PVMFOMXAudioDecNode::EventHandlerProcessing() PortSettingsChanged -> Cannot > get component output parameters")); > > SetState(EPVMFNodeError); > ReportErrorEvent(PVMFErrResource); > } > > iPCMSamplingRate = Audio_Pcm_Param.nSamplingRate; // can > be set to 0 (if unknown) > > if (iPCMSamplingRate == 0) // use default sampling rate > (i.e. 48000) > iPCMSamplingRate = PVOMXAUDIODEC_DEFAULT_SAMPLINGRATE; > > iNumberOfAudioChannels = Audio_Pcm_Param.nChannels; > // should be 1 or 2 > if (iNumberOfAudioChannels != 1 && iNumberOfAudioChannels > != 2) > { > PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, > PVLOGMSG_ERR, > (0, > "PVMFOMXAudioDecNode::EventHandlerProcessing() PortSettingsChanged -> Output > parameters num channels = %d", iNumberOfAudioChannels)); > > SetState(EPVMFNodeError); > ReportErrorEvent(PVMFErrResource); > } > } > } > else > { > PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, > PVLOGMSG_STACK_TRACE, > (0, > "PVMFOMXAudioDecNode::EventHandlerProcessing: OMX_EventPortSettingsChanged > returned for port %d", aData1)); > > iProcessingState = > EPVMFOMXAudioDecNodeProcessingState_PortReconfig; > iPortIndexForDynamicReconfig = aData1; > // start "discarding" data right away, don't wait > // check the audio sampling rate and fs right away in case of > output port > // is this output port? > if (iPortIndexForDynamicReconfig == iOutputPortIndex) > { > > OMX_ERRORTYPE Err; > // GET the output buffer params and sizes > OMX_AUDIO_PARAM_PCMMODETYPE Audio_Pcm_Param; > Audio_Pcm_Param.nPortIndex = iOutputPortIndex; // we're > looking for output port params > Audio_Pcm_Param.nSize = > sizeof(OMX_AUDIO_PARAM_PCMMODETYPE); > Audio_Pcm_Param.nVersion.s.nVersionMajor = > SPECVERSIONMAJOR; > Audio_Pcm_Param.nVersion.s.nVersionMinor = > SPECVERSIONMINOR; > Audio_Pcm_Param.nVersion.s.nRevision = SPECREVISION; > Audio_Pcm_Param.nVersion.s.nStep = SPECSTEP; > > Err = OMX_GetParameter(iOMXAudioDecoder, > OMX_IndexParamAudioPcm, &Audio_Pcm_Param); > if (Err != OMX_ErrorNone) > { > PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, > PVLOGMSG_ERR, > (0, > "PVMFOMXAudioDecNode::EventHandlerProcessing() PortSettingsChanged -> Cannot > get component output parameters")); > > SetState(EPVMFNodeError); > ReportErrorEvent(PVMFErrResource); > > } > > iPCMSamplingRate = Audio_Pcm_Param.nSamplingRate; // can > be set to 0 (if unknown) > > if (iPCMSamplingRate == 0) // use default sampling rate > (i.e. 48000) > iPCMSamplingRate = PVOMXAUDIODEC_DEFAULT_SAMPLINGRATE; > > iNumberOfAudioChannels = Audio_Pcm_Param.nChannels; > // should be 1 or 2 > if (iNumberOfAudioChannels != 1 && iNumberOfAudioChannels > != 2) > { > PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, > PVLOGMSG_ERR, > (0, > "PVMFOMXAudioDecNode::EventHandlerProcessing() PortSettingsChanged -> Output > parameters num channels = %d", iNumberOfAudioChannels)); > > SetState(EPVMFNodeError); > ReportErrorEvent(PVMFErrResource); > > } > > } > iDynamicReconfigInProgress = true; > } > > RunIfNotReady(); > break; > }//end of case OMX_PortSettingsChanged > > Here if you see it gets the parameter from audio decode node which in turn > calls the decoder component layer > After geting the values it sets its own value. > > But what I need is that I want to get the values from WAV Parser and set the > same to decoder component layer > Because In my case the WAV Parser is the one which has the proper info which > I want to Pass it on to decoder layer. > > How can I do that. > > --Giri > > ________________________________ > From: RaviY <[email protected]> > To: android-framework <[email protected]> > Sent: Saturday, 11 July, 2009 7:39:29 PM > Subject: Re: how does omx component comes to know about the number of > channels and sampling rate of the audio clip > > Search for OMX_EventPortSettingsChanged. > > On Jul 11, 1:12 am, sesha giri <[email protected]> wrote: > > > > > Hi > > > I was asking how does that port reconfiguration happens. > > I didnt find that any where > > Even it happens it does not configure the sampling rate and number of > > chanels. > > > Regarding the WAV component I am writing my own WAV component for G711. > > > -Giri > > > ________________________________ > > From: RaviY <[email protected]> > > To: android-framework <[email protected]> > > Sent: Saturday, 11 July, 2009 9:03:06 AM > > Subject: Re: how does omx component comes to know about the number of > > channels and sampling rate of the audio clip > > > I am not sure I understand the problem correctly. The parameters > > initialized in the OMX components are just for "initialization". IF, > > by change, the parameters match the actual clip, then the advantage > > would be that there will not be any port reconfiguration for the OMX > > components. That's about it. > > > Also, you are talking about WAV clips, for which, there is no OMX > > component. > > > -Ravi > > > On Jul 10, 1:40 pm, sesha giri <[email protected]> wrote: > > > > Hi > > > > In the omx_component file for the specific decoder there are few > > > initializations > > > In those sampling rate and number of channels are also initialized. > > > > But I can see these are hard coded. > > > Which is not correct. > > > I am trying to play different ulaw files with different sampling rates. > > > But I have to all the time change the values manualy and give the build. > > > > But this should not be the case. > > > I can see the WAV parser reads these info. > > > But I am not getting how to give the same info to decoder component. > > > > Please help me in this regard. > > > > Giri > > > > Looking for local information? Find it on Yahoo! > > > Localhttp://in.local.yahoo.com/ > > > See the Web's breaking stories, chosen by people like you. Check out > > Yahoo! Buzz.http://in.buzz.yahoo.com/ > > Love Cricket? Check out live scores, photos, video highlights and more. > Click herehttp://cricket.yahoo.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-framework?hl=en -~----------~----~----~----~------~----~------~--~---
