Displaying 20 results from an estimated 24 matches for "stream_info".
2004 Sep 10
2
xmms plugin, fileinfo
...ame, flac_file_info_struct *tmp_file_info)
-{
- FLAC__StreamMetadata streaminfo;
-
- if(0 == filename)
- filename = "";
+#include <gtk/gtk.h>
- if(!FLAC__metadata_get_streaminfo(filename, &streaminfo)) {
- return FALSE;
- }
-
- tmp_file_info->sample_rate = streaminfo.data.stream_info.sample_rate;
- tmp_file_info->channels = streaminfo.data.stream_info.channels;
- tmp_file_info->bits_per_sample = streaminfo.data.stream_info.bits_per_sample;
- tmp_file_info->total_samples = streaminfo.data.stream_info.total_samples;
-
- tmp_file_info->length_in_msec = streaminfo.data....
2006 Nov 07
0
better seeking
...CS file: /cvsroot/flac/flac/src/libFLAC/stream_decoder.c,v
retrieving revision 1.119
diff -u -r1.119 stream_decoder.c
--- stream_decoder.c 6 Nov 2006 16:48:33 -0000 1.119
+++ stream_decoder.c 7 Nov 2006 09:13:30 -0000
@@ -2935,10 +2935,16 @@
const unsigned max_framesize = decoder->private_->stream_info.data.stream_info.max_framesize;
const unsigned min_framesize = decoder->private_->stream_info.data.stream_info.min_framesize;
/* take these from the current frame in case they've changed mid-stream */
- const unsigned channels = FLAC__stream_decoder_get_channels(decoder);
- const unsi...
2006 Oct 28
3
better seeking
...ame_sample = FLAC__U64L(0xffffffffffffffff);
+ FLAC__uint64 last_frame_sample = FLAC__U64L(0xffffffffffffffff), this_frame_sample;
FLAC__bool needs_seek;
const FLAC__uint64 total_samples = FLAC__stream_decoder_get_total_samples(decoder);
const unsigned min_blocksize = decoder->private_->stream_info.data.stream_info.min_blocksize;
const unsigned max_blocksize = decoder->private_->stream_info.data.stream_info.max_blocksize;
const unsigned max_framesize = decoder->private_->stream_info.data.stream_info.max_framesize;
- const unsigned channels = FLAC__stream_decoder_get_channels(d...
2006 Nov 06
2
better seeking
ok, tried it out... passes test/test_seeking.sh and my
"xmms twitch" test, checked in to CVS. thanks!
Josh
--- Miroslav Lichvar <lichvarm@phoenix.inf.upol.cz> wrote:
> On Fri, Nov 03, 2006 at 10:01:42AM +0100, Miroslav Lichvar wrote:
> > Thanks. Sending latest version of the patch. Now it can seek in
> files
> > that have large id3 tag (or any random data) at
2004 Sep 10
2
better seeking
...mple;
+ FLAC__int64 pos, last_pos = -1;
+ int i;
unsigned approx_bytes_per_frame;
- FLAC__uint64 last_frame_sample = 0xffffffffffffffff;
+ FLAC__uint64 last_frame_sample = 0xffffffffffffffff, this_frame_sample;
FLAC__bool needs_seek;
const FLAC__uint64 total_samples = decoder->private_->stream_info.total_samples;
const unsigned min_blocksize = decoder->private_->stream_info.min_blocksize;
@@ -862,12 +862,14 @@
* the first and last frames.
*/
lower_bound = first_frame_offset;
+ lower_bound_sample = 0;
/* calc the upper_bound, beyond which we never want to seek */
if(max_f...
2006 Nov 03
2
better seeking
...s_per_frame;
- FLAC__uint64 last_frame_sample = FLAC__U64L(0xffffffffffffffff);
- FLAC__bool needs_seek;
+ FLAC__bool needs_seek = true, first_seek = true;
const FLAC__uint64 total_samples = FLAC__stream_decoder_get_total_samples(decoder);
const unsigned min_blocksize = decoder->private_->stream_info.data.stream_info.min_blocksize;
const unsigned max_blocksize = decoder->private_->stream_info.data.stream_info.max_blocksize;
const unsigned max_framesize = decoder->private_->stream_info.data.stream_info.max_framesize;
- const unsigned channels = FLAC__stream_decoder_get_channels(d...
2004 Sep 10
0
better seeking
...-
Miroslav Lichvar
-------------- next part --------------
--- src/libFLAC/seekable_stream_decoder.c.orig1 2003-07-09 23:49:35.000000000 +0200
+++ src/libFLAC/seekable_stream_decoder.c 2003-07-10 14:52:05.000000000 +0200
@@ -826,8 +826,8 @@
const unsigned min_blocksize = decoder->private_->stream_info.min_blocksize;
const unsigned max_blocksize = decoder->private_->stream_info.max_blocksize;
const unsigned max_framesize = decoder->private_->stream_info.max_framesize;
- const unsigned channels = FLAC__seekable_stream_decoder_get_channels(decoder);
- const unsigned bps = FLAC__seek...
2012 Apr 05
2
[PATCH 2/2] V2: Use a single definition of MIN and MAX in sources
...ample_number; i <= blocksize && j < samples; i++, j++) {
@@ -2411,8 +2402,8 @@ FLAC__bool write_bitbuffer_(FLAC__StreamEncoder *encoder, unsigned samples, FLAC
FLAC__bitwriter_clear(encoder->private_->frame);
if(samples > 0) {
- encoder->private_->streaminfo.data.stream_info.min_framesize = min(bytes, encoder->private_->streaminfo.data.stream_info.min_framesize);
- encoder->private_->streaminfo.data.stream_info.max_framesize = max(bytes, encoder->private_->streaminfo.data.stream_info.max_framesize);
+ encoder->private_->streaminfo.data.stream_...
2004 Sep 10
5
[st.n@gmx.net: Bug#200435: xmms-flac: doesn't properly support long files]
severity 200435 normal
thanks
I received this bug report from a Debian user. I can't think of any reason
offhand why the command line tool would work while the xmms plugin would
fail.
----- Forwarded message from Stephan Niemz <st.n@gmx.net> -----
Date: Tue, 8 Jul 2003 10:24:57 +0200
From: Stephan Niemz <st.n@gmx.net>
Resent-From: Stephan Niemz <st.n@gmx.net>
To: Debian
2006 Apr 01
1
debugging the bits_per_sample and channels metadata in FLAC
...ing me nuts.
I compile the FLAC libraries in debug mode on ARMV4 (ported) and it
works fine
I compile the FLAC libraries in release mode on ARMV4 (ported) and no
FLAC files play
>From what I can see, in metadata_callback, I get different values for
channel and bitsperssample
metadata->data.stream_info.bits_per_sample is 16 in debug mode, 1072 in
release mode
metadata->data.stream_info.channels is 2 in debug mode, 34 in release
mode
I'm using FLAC CVS, but reproduced this in FLAC 1.1 and FLAC 1.2
I also tried several different .flac files
For the port, I don't really touch much of th...
2005 Oct 03
3
Flac and OggFlac
...decoder_get_decode_position
Why is that?
2) I have registered a metadata callback function with
OggFLAC__seekable_stream_decoder_set_metadata_callback and
I'm looking at the metadata struct being passed back. When
using regular FLAC the field:
metadata->data.stream_info.total_samples
is set correctly, but with OggFLAC it seems to always be
zero. Why?
Can anyone shed any light?
Cheers,
Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo
+-----------------------------------------------------------+
" Baldie...
2004 Sep 10
3
[st.n@gmx.net: Bug#200435: xmms-flac: doesn't properly support long files]
...s plugin would
> > fail.
> ...
>
> It's an overflow, this patch will fix it.
>
> --- plugin.c.orig 2003-05-20 21:57:04.000000000 +0200
> +++ plugin.c 2003-07-08 22:03:37.000000000 +0200
> @@ -537,7 +537,7 @@
> file_info->bits_per_sample = metadata->data.stream_info.bits_per_sample;
> file_info->channels = metadata->data.stream_info.channels;
> file_info->sample_rate = metadata->data.stream_info.sample_rate;
> - file_info->length_in_msec = file_info->total_samples * 10 / (file_info->sample_rate / 100);
> + file_info->...
2012 May 05
5
[PATCH] Optionally, allow distros to use openssl for MD5 verification
...o_md5) {
+ EVP_MD_CTX_cleanup(&encoder->private_->md5context);
+ }
+#endif
free(encoder->private_);
free(encoder->protected_);
free(encoder);
@@ -1035,8 +1042,15 @@ static FLAC__StreamEncoderInitStatus init_stream_internal_(
encoder->private_->streaminfo.data.stream_info.bits_per_sample = encoder->protected_->bits_per_sample;
encoder->private_->streaminfo.data.stream_info.total_samples = encoder->protected_->total_samples_estimate; /* we will replace this later with the real total */
memset(encoder->private_->streaminfo.data.stream_info....
2006 Oct 27
1
PATCH for seek bug (#1154585)
...FLAC__uint32 x;
FLAC__bool first = true;
+#if 0
/* If we know the total number of samples in the stream, stop
if we've read that many. */
/* This will stop us, for example, from wasting time trying to
sync on an ID3V1 tag. */
if(decoder->private_->has_stream_info &&
decoder->private_->stream_info.data.stream_info.total_samples) {
@@ -1335,6 +1336,7 @@
return true;
}
}
+#endif
/* make sure we're byte aligned */
if(!FLAC__bitbuffer_is_consumed_byte_aligned(decoder->private_-...
2010 May 28
1
Updating metadata while encoding
...orks fine, but if my application is killed during encoding, the metadata is
not being updated since the file isn't closed properly by calling
FLAC__stream_encoder_finish().
Thus when opening the file afterwards for playback, it is possible to decode
audio data but the FLAC__StreamMetadata.data.stream_info.total_samples field is
equals to zero.
This is a true problem because it looks like data loss to the user, especially
if he/she's been recording for hours...
So I'm looking for a way to update the metadata periodically during encoding,
before calling FLAC__stream_encoder_finish().
Is thi...
2004 Sep 10
3
slow FLAC__file_decoder_seek_absolute()...
Hi,
I checked the archives, but I didn't find anything regarding this
problem. FLAC__file_decoder_seek_absolute takes an incredibly long time
to seek. What can I do about this? How do I fix it?
Here's how I'm calling the function:
if (argc > 2) {
secs = atoi(argv[2]);
seek_point = (FLAC__uint64) secs * sample_rate;
printf("seeking to %d:%02d\n", secs/60,
2005 Jan 25
0
bitbuffer optimizations
...last_pos = -1;
+ int i;
unsigned approx_bytes_per_frame;
- FLAC__uint64 last_frame_sample = FLAC__U64L(0xffffffffffffffff);
+ FLAC__uint64 last_frame_sample = FLAC__U64L(0xffffffffffffffff), this_frame_sample;
FLAC__bool needs_seek;
const FLAC__uint64 total_samples = decoder->private_->stream_info.total_samples;
const unsigned min_blocksize = decoder->private_->stream_info.min_blocksize;
@@ -903,12 +903,14 @@
* the first and last frames.
*/
lower_bound = first_frame_offset;
+ lower_bound_sample = 0;
/* calc the upper_bound, beyond which we never want to seek */
if(max_f...
2004 Sep 10
2
slow FLAC__file_decoder_seek_absolute()...
...and wide bitrate swings.
Josh
P.S. be sure to keep us posted about PhatBox!
--- Brendan Dowling <crypt@phatnoise.com> wrote:
> I think I figured out where the problem is. In my metadata_callback,
>
> I added a thing to print out the max_framesize and max_framesize from
> the stream_info block. Those are both zero. The ..._seek_absolute()
>
> function of the SeekableStreamDecoder uses the max_framesize to guess
> at where to seek. It doesn't seem to handle the case when
> max_frame_size is zero very well. I'm looking at
> seekable_stream_decoder.c, by...
2004 Sep 10
0
slow FLAC__file_decoder_seek_absolute()...
I think I figured out where the problem is. In my metadata_callback,
I added a thing to print out the max_framesize and max_framesize from
the stream_info block. Those are both zero. The ..._seek_absolute()
function of the SeekableStreamDecoder uses the max_framesize to guess
at where to seek. It doesn't seem to handle the case when
max_frame_size is zero very well. I'm looking at
seekable_stream_decoder.c, by the way.
The files I...
2005 Oct 04
0
Flac and OggFlac
.../ogg_mapping.html)
> 2) I have registered a metadata callback function with
> OggFLAC__seekable_stream_decoder_set_metadata_callback and
> I'm looking at the metadata struct being passed back. When
> using regular FLAC the field:
>
> metadata->data.stream_info.total_samples
>
> is set correctly, but with OggFLAC it seems to always be
> zero. Why?
>
> Can anyone shed any light?
normally the flac encoder goes back to fill in missing STREAMINFO
fields after encoding is finished. the encoder may not know
total_samples when encoding...