New demuxer/decoder for SBC encoded stream, sound is breadking

View: New views
4 Messages — Rating Filter:   Alert me  

New demuxer/decoder for SBC encoded stream, sound is breadking

by Hossain Reja :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm developing a demumxer/decoder in xine framework for SBC encoded audio stream. To make it simple for now, in the demuxer reading the data from input plugin I'm developing a demuxer/decoder in xine ramework for SBC encoded audio stream. To make it simple for now, in the demuxer reading the data from input plugin (fifo in this case) and sending it to decoder as 8K chunks. The decoder decode the data and send it to audio in audio buffer 8K at a time. It palys the audio, but I hear there is gap between audio frames.
I did the following experiments:
1. I captured the decoded data at decoder after decoding and stored it in a file with WAVE header, and played that with aplay. It plays perfect, meaning the decoding was right. I did the same this before it is sent to audio_ouput and it plays perfect.
2. I measured the time interval at which demuxer (send_chunk)is being called and I observed that it's being called at around 400ms-500ms (while sending 8K chunks).Observe the same amount of time interval for decoder (decode_data function).

I'm new to xine and any help will be highly appreciated.
Please let me know if any other information is required.


Re: New demuxer/decoder for SBC encoded stream, sound is breadking

by James Courtier-Dutton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hossain Reja wrote:

> I'm developing a demumxer/decoder in xine framework for SBC encoded audio
> stream. To make it simple for now, in the demuxer reading the data from
> input plugin I'm developing a demuxer/decoder in xine ramework for SBC
> encoded audio stream. To make it simple for now, in the demuxer reading the
> data from input plugin (fifo in this case) and sending it to decoder as 8K
> chunks. The decoder decode the data and send it to audio in audio buffer 8K
> at a time. It palys the audio, but I hear there is gap between audio frames.
> I did the following experiments:
> 1. I captured the decoded data at decoder after decoding and stored it in a
> file with WAVE header, and played that with aplay. It plays perfect, meaning
> the decoding was right. I did the same this before it is sent to audio_ouput
> and it plays perfect.
> 2. I measured the time interval at which demuxer (send_chunk)is being called
> and I observed that it's being called at around 400ms-500ms (while sending
> 8K chunks).Observe the same amount of time interval for decoder (decode_data
> function).
>
> I'm new to xine and any help will be highly appreciated.
> Please let me know if any other information is required.
>  
Please post a patch so we can see what is going wrong.
My guess is that if you instead send 2k at a time from the demuxer and
then 2k from the decoder, it might work better.
I.e. Use smaller chunks.

Kind Regards

James



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
xine-devel mailing list
xine-devel@...
https://lists.sourceforge.net/lists/listinfo/xine-devel

Re: New demuxer/decoder for SBC encoded stream, sound is breadking

by Hossain Reja :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


James Courtier-Dutton wrote:
Hossain Reja wrote:
> I'm developing a demumxer/decoder in xine framework for SBC encoded audio
> stream. To make it simple for now, in the demuxer reading the data from
> input plugin I'm developing a demuxer/decoder in xine ramework for SBC
> encoded audio stream. To make it simple for now, in the demuxer reading the
> data from input plugin (fifo in this case) and sending it to decoder as 8K
> chunks. The decoder decode the data and send it to audio in audio buffer 8K
> at a time. It palys the audio, but I hear there is gap between audio frames.
> I did the following experiments:
> 1. I captured the decoded data at decoder after decoding and stored it in a
> file with WAVE header, and played that with aplay. It plays perfect, meaning
> the decoding was right. I did the same this before it is sent to audio_ouput
> and it plays perfect.
> 2. I measured the time interval at which demuxer (send_chunk)is being called
> and I observed that it's being called at around 400ms-500ms (while sending
> 8K chunks).Observe the same amount of time interval for decoder (decode_data
> function).
>
> I'm new to xine and any help will be highly appreciated.
> Please let me know if any other information is required.
>  
Please post a patch so we can see what is going wrong.
My guess is that if you instead send 2k at a time from the demuxer and
then 2k from the decoder, it might work better.
I.e. Use smaller chunks.

Kind Regards

James

14.Nov.2009
==========

Hello James,
Thanks for your response.
I tried with small chunk sizes (<=2K), but I hear that sound is breaking in shorter interval than that of 8K chunk size.

I collected data at following conditions and observed that there is a delay in calling execution time in processing of data: Please note the following:

1) demux_xxx_send_chunk just reads the data from input of size 8K plug-in (fifo) in local buffer, does not send it to decoder. Time measured to execute demux_xxx_send_chunk is just 40-50us (micro seconds). I tried lower chunks too and time is around same.
2) demux_xxx_send_chunk reads the data from input of size 8K plug-in (fifo) in local buffer, sends it to decoder; decoder does not decode it and does not send to ao_loop for processing. Time measured to execute demux_xxx_send_chunk is just 40-50us. I tried lower chunks too and time is around same.
3) demux_xxx_send_chunk reads the data from input of size 8K plug-in (fifo) in local buffer, sends it to decoder; decoder decodes it but does not send to ao_loop for processing. Time measured to execute demux_xxx_send_chunk is just 3000us. I tried lower chunks too and time is around same.
4) Now when decoder sends the decoded PCM data to ao_loop, the time measured to execute demux_xxx_send_chunk is whopping 420000us. For smaller size lets say 1K it is around 200000us.

Please also note that the vpts at decoder is set to 0 before sending it to ao_loop. I tried other calculations, but the effect is same as of vpts=0;

Unfortunately, I cannot upload the patch.

Let me know if you need any other info.

Thanks in advance for your comments.

Best Regards,
Hossain



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
xine-devel mailing list
xine-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-devel

Re: New demuxer/decoder for SBC encoded stream, sound is breadking

by James Courtier-Dutton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hossain Reja wrote:

>
> James Courtier-Dutton wrote:
>  
>> Hossain Reja wrote:
>>    
>>> I'm developing a demumxer/decoder in xine framework for SBC encoded audio
>>> stream. To make it simple for now, in the demuxer reading the data from
>>> input plugin I'm developing a demuxer/decoder in xine ramework for SBC
>>> encoded audio stream. To make it simple for now, in the demuxer reading
>>> the
>>> data from input plugin (fifo in this case) and sending it to decoder as
>>> 8K
>>> chunks. The decoder decode the data and send it to audio in audio buffer
>>> 8K
>>> at a time. It palys the audio, but I hear there is gap between audio
>>> frames.
>>> I did the following experiments:
>>> 1. I captured the decoded data at decoder after decoding and stored it in
>>> a
>>> file with WAVE header, and played that with aplay. It plays perfect,
>>> meaning
>>> the decoding was right. I did the same this before it is sent to
>>> audio_ouput
>>> and it plays perfect.
>>> 2. I measured the time interval at which demuxer (send_chunk)is being
>>> called
>>> and I observed that it's being called at around 400ms-500ms (while
>>> sending
>>> 8K chunks).Observe the same amount of time interval for decoder
>>> (decode_data
>>> function).
>>>
>>> I'm new to xine and any help will be highly appreciated.
>>> Please let me know if any other information is required.
>>>  
>>>      
>> Please post a patch so we can see what is going wrong.
>> My guess is that if you instead send 2k at a time from the demuxer and
>> then 2k from the decoder, it might work better.
>> I.e. Use smaller chunks.
>>
>> Kind Regards
>>
>> James
>>
>> 14.Nov.2009
>> ==========
>>
>> Hello James,
>> Thanks for your response.
>> I tried with small chunk sizes (<=2K), but I hear that sound is breaking
>> in shorter interval than that of 8K chunk size.
>>
>> I collected data at following conditions and observed that there is a
>> delay in calling execution time in processing of data: Please note the
>> following:
>>
>> 1) demux_xxx_send_chunk just reads the data from input of size 8K plug-in
>> (fifo) in local buffer, does not send it to decoder. Time measured to
>> execute demux_xxx_send_chunk is just 40-50us (micro seconds). I tried
>> lower chunks too and time is around same.
>> 2) demux_xxx_send_chunk reads the data from input of size 8K plug-in
>> (fifo) in local buffer, sends it to decoder; decoder does not decode it
>> and does not send to ao_loop for processing. Time measured to execute
>> demux_xxx_send_chunk is just 40-50us. I tried lower chunks too and time is
>> around same.
>> 3) demux_xxx_send_chunk reads the data from input of size 8K plug-in
>> (fifo) in local buffer, sends it to decoder; decoder decodes it but does
>> not send to ao_loop for processing. Time measured to execute
>> demux_xxx_send_chunk is just 3000us. I tried lower chunks too and time is
>> around same.
>> 4) Now when decoder sends the decoded PCM data to ao_loop, the time
>> measured to execute demux_xxx_send_chunk is whopping 420000us. For smaller
>> size lets say 1K it is around 200000us.
>>
>> Please also note that the vpts at decoder is set to 0 before sending it to
>> ao_loop. I tried other calculations, but the effect is same as of vpts=0;
>>
>> Unfortunately, I cannot upload the patch.
>>
>> Let me know if you need any other info.
>>
>> Thanks in advance for your comments.
>>
>> Best Regards,
>> Hossain
>>
>>    
Unfortunately, without a patch to look at, I cannot help you further.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
xine-devel mailing list
xine-devel@...
https://lists.sourceforge.net/lists/listinfo/xine-devel