[Flac-dev] getting framesize in client

Josh Coalson xflac at yahoo.com
Fri Nov 8 19:13:03 PST 2002


--- Miroslav Lichvar <lichvarm at phoenix.inf.upol.cz> wrote:
> On Fri, Nov 08, 2002 at 12:39:52PM -0800, Josh Coalson wrote:
> > --- Miroslav Lichvar <lichvarm at phoenix.inf.upol.cz> wrote:
> > > I have few notes:
> > > 
> > > It seems there is changed API in CVS again. So, what about adding
> > > function like
> > > 	unsigned FLAC__format_frame_size(const FLAC__Frame *frame)
> > > which returns size of the frame in bytes. This can be useful, for
> > > example, in xmms plugin to display current bitrate like vorbis
> plugin
> > > does.
> > 
> > What changed?  I don't remember changing anything like that,
> > maybe I checked something in by accident...
> 
> I think these FLAC__stream_encoder_get_resolved_state_string
> functions.

OK.  Since 1.0.4 I have only added functions; the existing
interface hasn't changed other than those.

> > Unfortunately according to the format the frame size is not
> > stored anywhere so the decoder would have to track it.  I am
> > running into a similar problem: I am adding an option to
> > metaflac to add seekpoints and it has to know the same thing,
> > so I will be adding a function in libFLAC that makes it possible
> > for the client to keep track of this also.
> 
> Yes, i know, but it should not be very expensive to compute it.

Yeah, it's useful, so now there is a
FLAC__seekable_stream_decoder_get_decode_position() and
FLAC__file_decoder_get_decode_position().  I haven't documented
them yet but you can see an example in
src/metaflac/operations_shorthand_seektable.c where I use it
during seektable creation.

> > > In some libFLAC files isn't including of config.h.
> > Which ones?
> 
> I hope, i see right,
> 
> bitbuffer.c
> bitmath.c
> cpu.c
> crc.c
> file_decoder.c
> file_encoder.c
> fixed.c
> format.c
> lpc.c
> memory.c
> metadata_iterators.c
> metadata_object.c
> seekable_stream_decoder.c
> seekable_stream_encoder.c
> stream_decoder.c
> stream_encoder.c
> stream_encoder_framing.c

I don't think they are required in all those; I will make a pass
over the source soon to check that it is included where it needs
to be.

Josh


__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2




More information about the Flac-dev mailing list