Closed Bug 783101 Opened 12 years ago Closed 12 years ago

Record mediaconduit test data in WAV instead of raw pcm

Categories

(Core :: WebRTC: Audio/Video, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: rillian, Assigned: rillian)

Details

(Whiteboard: [qa-])

Attachments

(1 file, 1 obsolete file)

Write a quick-and-dirty wav header on our recorded data so it's easier to verify.

I just spent several minutes trying to remember how to play raw pcm files with sox, and then guessing at the correct parameters, so I could verify recorded.pcm from mediaconduit_unittests. That's ridiculous when WAV is a straightforward format to write.

Fortunately, VoEFile handles WAV just fine, so no modification of webrtc_standalone_test is necessary beyond the filename change.

WAVE header code is from Robert O'Callahan's patch in bug 727697.
Attached patch proposed fix for recorded.wav (obsolete) — Splinter Review
Assignee: nobody → giles
Attachment #652242 - Flags: review?(snandaku)
Comment on attachment 652242 [details] [diff] [review]
proposed fix for recorded.wav

Review of attachment 652242 [details] [diff] [review]:
-----------------------------------------------------------------

We can get rid of errno for now and commit the code. feedback+ from my side.

::: media/webrtc/signaling/test/mediaconduit_unittests.cpp
@@ +195,5 @@
> +  // Update the header
> +  unsigned char size[4];
> +  int err = fseek(outFile, 40, SEEK_SET);
> +  if (err < 0) {
> +    cerr << "Couldn't seek to WAV header: " << strerror(errno) << endl;

We should be good without the errno.

@@ +208,5 @@
> +
> +  // Return to the end
> +  err = fseek(outFile, 0, SEEK_END);
> +  if (err < 0) {
> +    cerr << "Couldn't seek to WAV file end: " << strerror(errno) << endl;

We should be good without the errno .
Attachment #652242 - Flags: feedback+
Attachment #652242 - Attachment is obsolete: true
Attachment #652242 - Flags: review?(snandaku)
Attachment #652557 - Flags: review?(snandaku)
Comment on attachment 652557 [details] [diff] [review]
fix for recorded.wav

Carrying forward earlier positive review. Suhas, you can just change the ? to + if you approve of a patch.
Attachment #652557 - Flags: review?(snandaku) → review+
Attachment #652557 - Attachment is patch: true
http://hg.mozilla.org/projects/alder/rev/644903e22112
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Attachment #652557 - Flags: feedback+
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: