[MPlayer-dev-eng] Re: removing internal tremor

Diego Biurrun diego at biurrun.de
Tue Aug 8 19:21:32 CEST 2006


On Tue, Aug 08, 2006 at 05:02:16PM +0200, Reimar Döffinger wrote:
> On Tue, Aug 08, 2006 at 05:00:17PM +0300, Uoti Urpala wrote:
> > On Tue, 2006-08-08 at 13:57 +0200, Reimar Döffinger wrote:
> > > Very simple, demux_ogg used half of the ogg functions from libogg and
> > > the other half from the tremor lib.
> > > Fixed in SVN, but I guess this shows the full uglyness of this stuff.
> > 
> > Did you test whether it actually works? There seemed to be some API
> > changes in new tremor, though I didn't look closely.
> 
> Yes, but I had to add two hacks:
> in ad_libvorbis:
> #define vorbis_synthesis(b, p) vorbis_synthesis(b, p, 1)
> in demux_mov.c
> -#include <tremor/ogg.h>
> +#include <ogg/ogg.h>
> 
> Both are of course not acceptable for inclusion in SVN...

What exactly did you change?  There should be a way to make the changes
acceptable...

I now get the following and no sound:

[Ogg] stream 0: audio (Vorbis), -aid 0
Ogg stream length (granulepos): 26812800
Ogg demuxer : found 1 audio stream, 0 video stream and 0 text stream
fixup_vorbis_wf: i=0, size=30
DEMUX_OGG: header n. 0 broken! len=30, code: -132
fixup_vorbis_wf: i=1, size=45
DEMUX_OGG: header n. 1 broken! len=45, code: -132
fixup_vorbis_wf: i=2, size=3683
DEMUX_OGG: header n. 2 broken! len=3683, code: -132
demux_ogg, offset after 1st len = 2
demux_ogg, offset after 2nd len = 3
demux_ogg, i=0, bytes: 30, offset: 3
demux_ogg, i=1, bytes: 45, offset: 33
demux_ogg, i=2, bytes: 3683, offset: 78
demux_ogg, extradata size: 3761
demux_ogg, vorbis stream features are: channels: 2, srate: 44100, bitrate: 536870911, max: 4294967295, nominal: 192000, min: 4294967295
Ogg file format detected.
==========================================================================
Forced audio codec: vorbis
Opening audio decoder: [libvorbis] Ogg/Vorbis audio decoder
dec_audio: Allocating 4096 + 65536 = 69632 bytes for output buffer.
ad_vorbis, extradata seems is 3761 bytes long
ad_vorbis, offset: 2, length: 30
ad_vorbis, offset: 3, length: 45
ad_vorbis, header sizes: 30 45 3683
OggVorbis: header n. 0 broken! len=30
ADecoder init failed :(

> > > I'm fine with removing tremor, but IMHO we should then either
> > > 1) include libogg
> > > 2) make demux_ogg independant of it in some other way
> > > 3) remove/disable by default demux_ogg and go for libavformat.
> > 
> > The libavformat demuxer cannot currently be used for ogm files with
> > subtitles.
> 
> I pretty much excluded 3) for other reasons, too.

Well, maybe there is a way to improve the libavformat demuxer to the
point that it can fuly replace the native one.  What are the problems we
need to address?  Off the top of my head I remember:

- Theora videos in Ogg show artifacts after seeking, libtheora/libogg
  don't.  Probably related to proper keyframe detection.
- OGM files with subtitles are not supported as mentioned above.

Anything else?

Diego



More information about the MPlayer-dev-eng mailing list