Closed Bug 817488 Opened 13 years ago Closed 13 years ago

Verify Audio Transmit and Receive - PC Unit Tests

Categories

(Core :: WebRTC: Signaling, defect, P2)

x86
All
defect

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: snandaku, Assigned: snandaku)

Details

(Whiteboard: [WebRTC] [blocking-webrtc-] [qa-])

Attachments

(1 file, 7 obsolete files)

No description provided.
Assignee: nobody → snandaku
Priority: -- → P2
Whiteboard: [WebRTC] [blocking-webrtc-]
Attachment #688681 - Attachment is obsolete: true
Attachment #688691 - Attachment is obsolete: true
Attachment #688696 - Flags: review?(ekr)
Attachment #688696 - Attachment is obsolete: true
Attachment #688696 - Flags: review?(ekr)
Attachment #688708 - Flags: review?(ekr)
Comment on attachment 688708 [details] [diff] [review] Audio Send and Recv support for PC tests Review of attachment 688708 [details] [diff] [review]: ----------------------------------------------------------------- These look good to me with the following comments. ::: media/webrtc/signaling/test/FakeMediaStreams.h @@ +125,5 @@ > + numReadSamples++; > + if(!memcmp(buf,zeroBuffer,chunk.mDuration)) { > + //sample received was filled with zeroes. > + numZeroSamples++; > + } OK, now that I have seen this code, I gave you terrible advice here about the memcmp. Let's just iterate over the buffer to see if the values are nonzero.But don't bother rescaling. @@ +129,5 @@ > + } > + //process next chunk > + iter.Next(); > + } > + if(numZeroSamples != numReadSamples) { Wouldn't this code be easier if you just did bool nonzero=false; at the beginning and then set it to true if you ever saw a nonzero sample? Isn't that the same logic? ::: media/webrtc/signaling/test/FakeMediaStreamsImpl.h @@ +43,5 @@ > > void Fake_SourceMediaStream::Periodic() { > + //Pull more audio-samples iff pulling is enabled > + // and we are not asked by the signaling agent to stop > + //pulling data. space after // @@ +74,5 @@ > // Fake_AudioStreamSource > void Fake_AudioStreamSource::Periodic() { > + //Are we asked to stop pumping audio samples ? > + if(mStop) { > + std::cerr <<"AudioStream Stopped !!!" << std::endl; Don't think we need this. @@ +80,5 @@ > + } > + > + //Generate Signed 16 Bit Audio samples > + nsRefPtr<mozilla::SharedBuffer> samples = > + mozilla::SharedBuffer::Create(1600 * 2 * sizeof(int16_t)); Can we break these integers out into constants.
Attachment #688708 - Flags: review?(ekr) → review+
Attachment #688708 - Attachment is obsolete: true
Attachment #688937 - Attachment is obsolete: true
Attachment #688938 - Flags: checkin?(ethanhugg)
Attachment #688938 - Attachment is obsolete: true
Attachment #688938 - Flags: checkin?(ethanhugg)
Attachment #688940 - Attachment is obsolete: true
Attachment #688943 - Flags: checkin?(ethanhugg)
Attachment #688943 - Flags: checkin?(ethanhugg) → checkin+
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Whiteboard: [WebRTC] [blocking-webrtc-] → [WebRTC] [blocking-webrtc-] [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: