Last Comment Bug 775257 - Gstreamer backend on Meego N9 produce extra noise in audio playback
: Gstreamer backend on Meego N9 produce extra noise in audio playback
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Audio/Video (show other bugs)
: Trunk
: ARM MeeGo
: -- normal (vote)
: mozilla17
Assigned To: Oleg Romashin (:romaxa)
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-18 13:17 PDT by Oleg Romashin (:romaxa)
Modified: 2012-10-20 19:59 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Fix gstreamer audio sink for N9 / Meego (1.04 KB, patch)
2012-07-18 13:17 PDT, Oleg Romashin (:romaxa)
giles: review+
Details | Diff | Splinter Review
Fix gstreamer audio sink for N9 / Meego (1.54 KB, patch)
2012-07-18 15:31 PDT, Oleg Romashin (:romaxa)
giles: review+
Details | Diff | Splinter Review

Description Oleg Romashin (:romaxa) 2012-07-18 13:17:47 PDT
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
Comment 1 Ralph Giles (:rillian) needinfo me 2012-07-18 13:36:12 PDT
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.
Comment 2 Alessandro Decina 2012-07-18 14:27:15 PDT
Comment on attachment 643548 [details] [diff] [review]
Fix gstreamer audio sink for N9 / Meego

Yeah looks good
Comment 3 Oleg Romashin (:romaxa) 2012-07-18 15:31:36 PDT
Created attachment 643634 [details] [diff] [review]
Fix gstreamer audio sink for N9 / Meego
Comment 4 Ralph Giles (:rillian) needinfo me 2012-07-18 22:18:00 PDT
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.
Comment 5 Oleg Romashin (:romaxa) 2012-07-18 22:21:06 PDT
I tested on maemo, but not on desktop
Comment 6 Oleg Romashin (:romaxa) 2012-07-18 22:52:17 PDT
https://hg.mozilla.org/mozilla-central/rev/6865bdd5ca5a

Note You need to log in before you can comment on or make changes to this bug.