Hi Ravi/Nick,

Thanks for your reply.

After removing the part of the code what I had put for dumping the
decoded output data into a file, I am getting a better sound quality.
Probably that was the reason for that. And regarding the difference in
decoded output with my test application I was getting as I was doing
some silly mistake in debugging..:)Now that is solved.Test_ADTS.aac
file is playing fine now.

But I am getting some more issues here when I play a m4a file.
The issues I am facing are -
 -1) It's getting reset automatically (coming to the beginning) after
playing for some 30-40 seconds.
 -2) Some data part are skipped in the input as well as in the decoded
output.

>From the logs below is my understanding -

- PV is getting 4 fragments through getNumFragments() ,filling the
input buffer with these 4 fragments and sending the buffer to the
component.


- My doubt is -

 1) Is fragment is nothing but a frame?
 2)The no. of samples given to the decoder frame by frame OR is it the
buffer containing multi frames ?
 3) If the decoder decodes some part of the data in the input buffer
and some bytes are left undecoded and I set the nOffset value
accordingly,  does PV take care of this while sending the buffer next
time to the component?
4)  I don't see the use of updated nOffset in the
pvmf_omx_basedec_node.cpp file apart from FillBufferDoneProcessing()
function. Is it required to set the nOffset value for input and output
buffer before EmptyBufferDone() and FillBufferDone() calls in the
component?

Please help me to get this clear.

Thanks & Regards,
Anupama

On Mar 11, 12:05 am, Nick <[email protected]> wrote:
>  I am trying to reproduce the issue you are getting.
> Usually the decoder output should be bit exact.
> There is something fishy there.
> Please let me know if you are  using any hardware accleration.( I am
> asking this because you have mentioned a pipe most probably this would
> be softwrae pipe)
> Also the platform and any tweaks that you have put in.
>  I had previously tried working with Audio on Android and it works
> pretty fine for me.
>
> Nick
>
> If you can post some steps to land into this problem that would help a
> mile.
>
> On Mar 10, 7:01 am, RaviY <[email protected]> wrote:
>
>
>
> > You are saying that you pass the buffer as a paramter instead of
> > copying the contents, is it possible that you are overwriting the
> > input buffer that you presented to the decoder?
>
> > -Ravi
>
> > On Mar 9, 9:55 pm, anupama <[email protected]> wrote:
>
> > > Hi Ravi,
>
> > > I am working on aac codec integration to Android Platform.It is
> > > integrated and I am able to play a test_adts.aac file also, But the
> > > sound quality is not as expected.
>
> > > Component works as follows -
> > > ==============================
>
> > > - In ComponentInit() the component thread is created and structure for
> > > private data of the component is input to the thread.
> > >   (The private data of the componenet includes input and output port
> > > related information, buffer   related information,  specifications for
> > > audio decoder..etc).
>
> > > - When EmptyThisBuffer() gets called in the main thread, I m setting
> > > one flag and writting that to the pipe which is accessed in the
> > > component thread.I am not writing the buffer contents to the pipe.It
> > > is passed to the component thread as parameter.
>
> > > - The component thread keeps on checking for the flag which gets set
> > > in the EmptyThisBuffer.If it finds the flag as set and the state is
> > > OMX_StateExecuting, the decoding process starts.
>
> > > - As PV sends raw data (with stripped header) to the component, my
> > > codec-component is implemented in the way that it can handle raw data.
>
> > > - But the issue is when I am testing my decoder separately it works
> > > fine.
> > >   When I integrate this with the PV framework and play an audio file
> > > (ADTS file), I am getting the sound, but the sound quality is not at
> > > all  good.
>
> > > - And also I have crosschecked the decoded o/p of my test application
> > > when I am testing my component separately and the one when I play in
> > > PV  framework , it mismatches.
>
> > > I posted this query earlier also ,but now I don't see it in the group,
> > > so posting it once again.
>
> > > Yes Ravi,  I have crosschecked input stream to my "test application"
> > > with the input to the component in PV, there is no difference in that.
> > > But I really don't understand why the output mismatches.
>
> > > I am severely stuck here.Please help where I am going wrong.
>
> > > Regards,
> > > Anupama- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to