Gstreamer backend on Meego N9 produce extra noise in audio playback

RESOLVED FIXED in mozilla17

Status

()

Core
Audio/Video
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: romaxa, Assigned: romaxa)

Tracking

Trunk
mozilla17
ARM
MeeGo
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
Created attachment 643548 [details] [diff] [review]
Fix gstreamer audio sink for N9 / Meego

I've compiled Mobile FF for N9 with gstreamer backend and found there are weird noise for audio stream.

After some experiments I found that caps= and width= need to be changed in order to make it works on N9 pulseaudio.
Final fix should looks like this:
+#ifdef MOZ_PLATFORM_MAEMO
+        "appsink name=audiosink sync=true caps=audio/x-raw-int,"
+        "channels={1,2},rate=48000,width=16,endianness=1234", TRUE, NULL);
+#else
         "appsink name=audiosink sync=true caps=audio/x-raw-float,"
         "channels={1,2},rate=44100,width=32,endianness=1234", TRUE, NULL);
+#endif

Also I changed rate to 48kHz as rillian suggested, it works just fine
Attachment #643548 - Flags: review?(giles)
Comment on attachment 643548 [details] [diff] [review]
Fix gstreamer audio sink for N9 / Meego

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

r+ with the proper #ifdef check.

Alessandro, any comments?

::: content/media/gstreamer/nsGStreamerReader.cpp
@@ +129,5 @@
>        G_CALLBACK(&nsGStreamerReader::EventProbeCb), this);
>    gst_object_unref(sinkpad);
>  
>    mAudioSink = gst_parse_bin_from_description("capsfilter name=filter ! "
> +#ifdef MOZ_PLATFORM_MAEMO

Please switch the order and use

#ifdef MOZ_SAMPLE_TYPE_FLOAT32

instead. That will be less brittle than depending on the MAEMO build in particular.
Attachment #643548 - Flags: review?(giles)
Attachment #643548 - Flags: review+
Attachment #643548 - Flags: feedback?(alessandro.d)

Comment 2

5 years ago
Comment on attachment 643548 [details] [diff] [review]
Fix gstreamer audio sink for N9 / Meego

Yeah looks good
(Assignee)

Comment 3

5 years ago
Created attachment 643634 [details] [diff] [review]
Fix gstreamer audio sink for N9 / Meego
Assignee: nobody → romaxa
Attachment #643548 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #643548 - Flags: feedback?(alessandro.d)
Attachment #643634 - Flags: review?
(Assignee)

Updated

5 years ago
Attachment #643634 - Flags: review? → review?(giles)
Comment on attachment 643634 [details] [diff] [review]
Fix gstreamer audio sink for N9 / Meego

Looks good, thanks. Have you tested this version on both maemo and desktop builds with --enable-gstreamer?

There's no point pushing this to try; it doesn't affect code we normally build.
Attachment #643634 - Flags: review?(giles) → review+
(Assignee)

Comment 5

5 years ago
I tested on maemo, but not on desktop
(Assignee)

Comment 6

5 years ago
https://hg.mozilla.org/mozilla-central/rev/6865bdd5ca5a
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Updated

5 years ago
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.