Openmoko Bug #1614: Mediplayer isn't able to play Ogg/Vorbis files

Openmoko Public Trac bugs at docs.openmoko.org
Thu Jul 17 09:10:45 CEST 2008


#1614: Mediplayer isn't able to play Ogg/Vorbis files
----------------------------------+-----------------------------------------
 Reporter:  HdR                   |        Owner:  openmoko-devel
     Type:  defect                |       Status:  new           
 Priority:  high                  |    Milestone:                
Component:  unknown               |      Version:  2007.2        
 Severity:  normal                |   Resolution:                
 Keywords:  openmoko-mediaplayer  |     Blocking:                
Blockedby:                        |  
----------------------------------+-----------------------------------------

Comment(by hedora):

 Two new developments.

 First, there's a LOW_MEMORY branch of tremor that might be a better choice
 for ogg decoding.

 Second, telling gstreamer to playback through ALSA results in good
 performance:

 gst-launch -v filesrc location=/media/card/tst.ogg ! oggdemux ! ivorbisdec
 ! audioconvert ! alsasink

 Also, it doesn't seem to interfere with pulseaudio in any meaningful way
 (the keypad click still works...).

 I think that pulseaudio's resampling is using floating point emulation
 instead of integer aritmetic.  It reports:

 I: resampler.c: Using resampler 'trivial'
 I: resampler.c: Using float32le as working format.

 I tricked it into using integer resampling, but that greatly increased CPU
 load.  To help you reproduce, here is a sample pulseaudio + gst session:
 Terminal 1:

 On the server side, pulseaudio uses floating point to do the resampling.

 # /usr/bin/pulseaudio --no-cpu-limit --resample-method=trivial -v -v -v
 -nF /etc/pulse/session
 I: core-util.c: Successfully gained nice level -11.
 W: main.c: This program is not intended to be run as root (unless --system
 is specified).
 I: main.c: This is PulseAudio 0.9.10
 I: main.c: Page size is 4096 bytes
 I: main.c: Dude, your kernel stinks! The chef's recommendation today is
 Linux with high-resolution timers enabled!
 I: module.c: Loaded "module-esound-protocol-unix" (index: #0; argument:
 "").
 E: socket-server.c: socket(PF_INET6): Address family not supported by
 protocol
 I: module.c: Loaded "module-simple-protocol-tcp" (index: #1; argument:
 "").
 I: protocol-native.c: loading cookie from disk.
 I: module.c: Loaded "module-native-protocol-unix" (index: #2; argument:
 "").
 I: module.c: Loaded "module-cli-protocol-unix" (index: #3; argument: "").
 E: module.c: Failed to open module "module-x11-bell": module-x11-bell.so:
 cannot open shared object file: No such file or directory
 D: sound-file.c: POSIX_FADV_SEQUENTIAL succeeded.
 D: memblock.c: Memory block too large for pool: 1099804 > 16376
 D: core-scache.c: Created sample "startup" (#1), 1099804 bytes with sample
 spec s16le 2ch 44100Hz
 D: sound-file.c: POSIX_FADV_SEQUENTIAL succeeded.
 D: core-scache.c: Created sample "touchscreen" (#2), 1624 bytes with
 sample spec s16le 2ch 44100Hz
 D: sound-file.c: POSIX_FADV_SEQUENTIAL succeeded.
 D: memblock.c: Memory block too large for pool: 850968 > 16376
 D: core-scache.c: Created sample "ringtone" (#3), 850968 bytes with sample
 spec s16le 2ch 44100Hz
 E: main.c: Module load failed.
 I: module-alsa-sink.c: Successfully opened device default.
 I: module-alsa-sink.c: Successfully enabled mmap() mode.
 I: alsa-util.c: Successfully attached to mixer 'default'
 I: alsa-util.c: Cannot find mixer control "Master".
 I: alsa-util.c: Using mixer control "PCM".
 I: sink.c: Created sink 0 "output" with sample spec "s16le 2ch 48000Hz"
 I: source.c: Created source 0 "output.monitor" with sample spec "s16le 2ch
 48000Hz"
 I: module-alsa-sink.c: Using 5 fragments of size 4096 bytes.
 I: alsa-util.c: All 2 channels can be mapped to mixer channels. Using
 hardware volume control.
 D: module-alsa-sink.c: Thread starting up
 D: rtpoll.c: Acquired POSIX realtime signal SIGRTMIN+29
 I: module-alsa-sink.c: Starting playback.
 I: module.c: Loaded "module-alsa-sink" (index: #4; argument:
 "sink_name=output").
 I: main.c: Daemon startup complete.
 I: client.c: Created 0 "Native client (UNIX socket client)"
 I: protocol-native.c: Got credentials: uid=0 gid=0 success=1
 I: protocol-native.c: Enabled SHM for new connection
 I: client.c: Client 0 changed name from "Native client (UNIX socket
 client)" to "gst-launch-0.10"
 I: resampler.c: Using resampler 'trivial'
 I: resampler.c: Using float32le as working format.
 I: sink-input.c: Created input 0 "Playback Stream" on output with sample
 spec float32le 2ch 44100Hz and channel map front-left,front-right
 D: memblock.c: Memory block too large for pool: 17640 > 16376
 D: memblockq.c: memblockq requested: maxlength=141120, tlength=70560,
 base=8, prebuf=67032, minreq=3528
 D: memblockq.c: memblockq sanitized: maxlength=141120, tlength=70560,
 base=8, prebuf=67032, minreq=3528

 Terminal 2:

 With pulseaudio, gst converts to floats:

 #  gst-launch -v filesrc location=/media/card/tst.ogg ! oggdemux !
 ivorbisdec !audioconvert ! pulsesink
 Setting pipeline to PAUSED ...
 Pipeline is PREROLLING ...
 /pipeline0/ivorbisdec0.sink: caps = audio/x-vorbis
 /pipeline0/ivorbisdec0.src: caps = audio/x-raw-int, rate=(int)44100,
 channels=(int)2, endianness=(int)1234, width=(int)32, depth=(int)16,
 signed=(boolean)true
 /pipeline0/audioconvert0.src: caps = audio/x-raw-float,
 endianness=(int)1234, width=(int)32, rate=(int)44100, channels=(int)2
 /pipeline0/audioconvert0.sink: caps = audio/x-raw-int, rate=(int)44100,
 channels=(int)2, endianness=(int)1234, width=(int)32, depth=(int)16,
 signed=(boolean)true
 /pipeline0/pulsesink0.sink: caps = audio/x-raw-float,
 endianness=(int)1234, width=(int)32, rate=(int)44100, channels=(int)2

-- 
Ticket URL: <https://docs.openmoko.org/trac/ticket/1614#comment:3>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac


More information about the buglog mailing list