Closed Bug 1023022 Opened 10 years ago Closed 6 years ago

[Sora][streaming]can clearly hear noise when play audio rtsp and play fitfully

Categories

(Firefox OS Graveyard :: General, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: sync-1, Unassigned)

Details

Attachments

(3 files)

Firefox OS v1.3
  
 Mozilla build ID:20140422024003
 
 DEFECT DESCRIPTION:
 can clearly hear noise when play audio rtsp
 
  REPRODUCING PROCEDURES:
 1.Enable wifi or mobile data;
 2.Open browser and go to test page provided by mozilla:https://rawgithub.com/William-Hsu/TestApp_RTSP/master/index.html;
 3.Open 'Audio test link 1.AMX test link' to play.Play fitfully at the begainning.->KO1
 And can clearly hear the noise.->KO2
 4.Go to our test page:http://imps.tcl-ta.com/stream/stream.html;
 5.Open rtsp audio,just can play amr rtsp audio normally.Can't play aac/aac+/eaac+ rtsp audio normally that play fitfully.->KO3
 
  EXPECTED BEHAVIOUR:
 For KO1,would not play fitfully at the begainning;
 For KO2,would not appear noise during playing rtsp audio;
 For KO3,should can play aac/aac+/eaac+ rtsp audio normally.
Attached file rtsp tracking log
Attached video aac file
I tested aac_16_8_m.3gp in http://imps.tcl-ta.com/stream/3gp_stream/aac/aac.html page. And found that silence was added when playing aac by rtsp protocol.

MediaDecoderStateMachine::AudioLoop() will get the samplerate for audio to play at a correct time. Now it got a wrong value - 44100, but it should be 8000. 

RTSP protocol calls parseAudioSpecificConfig() to get aac samplerate and channel number, but the value is not transferred to omx。

MediaDecoderStateMachine::DecodeMetadata() calls MediaOmxReader::ReadMetadata(),and MediaOmxReader::ReadMetadata() calls OmxDecoder::TryLoad() to get the samplerate and channel number.

In OmxDecoder::TryLoad(), Rtsp and local file will get into different branches. OMXCodec::initOutputFormat() will configure the PCM infomatiion,and now in this step the problem occurs。In this function, an input metadata will be compared with a default metadata. If they are different, the default value will replace the input value. This function was called twice. In the first call, the default value was got, and in the second call, the correct value was got。When in RTSP branch, the default value in first call was assigned to rtsp metada. But the correct value in second call cannot be sent to rtsp metadat no longer.

For more specific information, please see the attached tracking log for this bug.
(In reply to sync-1 from comment #2)
> Created attachment 8437393 [details]
> aac file

Please just ignore this file, it is not the correct file in rtsp server.
I also reported this issue to Qualcomm, and here is their response.
 
 Dear customer,
 1. The change you mentioned in OMXCodec::initOutputFormat() seems OK to me -  however develop team does not think this is the proper way to fix the issue.
 2. From the log we can see OMXCodec could be correctly re-init with 8k sampling rate. However, RtspMediaSource is not re-init when OMXCodec re-init. Since RtspMediaSource is Mozilla code, could you check with Mozilla on how to re-init it when OMXCodec is getting re-inited?
 3. Further more, it is recommended to use ACodec for streaming, other than OMXCodec. Could you check with Mozilla on why they're not using ACodec?
link all Fire C (codename: Sora) bugs to a meta one.
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: