search for: is_last

Displaying 18 results from an estimated 18 matches for "is_last".

2004 Sep 28
2
Finding start of audio data using metadata level 2 interface.
* Josh Coalson <xflac@yahoo.com> shaped the electrons to say... >yep, that will work too. but just writing skipping code is >pretty simple: > >is_last=0 >read 'fLaC' string >while (!is_last) { > read 1 byte metadata block type > read 3 byte metadata block length > is_last = type & 0x80 > fseek(file,length,SEEK_CUR) >} >last_offset=ftell(file) > >see also: > http://flac.sourceforge.net/format.h...
2004 Sep 26
2
Finding start of audio data using metadata level 2 interface.
* Josh Coalson <xflac@yahoo.com> shaped the electrons to say... >not exactly. the metadata interface won't tell you, but you >can create a decoder (say file decoder), set it up, then call > > FLAC__file_decoder_process_until_end_of_metadata(...) > FLAC__file_decoder_get_decode_position(...) > >and that will tell you. the decode position is relative to >the
2004 Jan 13
3
Progress reporting: N more to check
...3 Jan 2004 05:00:29 -0000 @@ -21,6 +21,7 @@ #include "rsync.h" +extern struct stats stats; extern int am_server; static OFF_T last_ofs; @@ -45,6 +46,7 @@ static unsigned long msdiff(struct timev static void rprint_progress(OFF_T ofs, OFF_T size, struct timeval *now, int is_last) { + char eol[256]; int pct = (ofs == size) ? 100 : (int)((100.0*ofs)/size); unsigned long diff = msdiff(&start_time, now); double rate = diff ? (double) (ofs-start_ofs) * 1000.0 / diff / 1024.0 : 0; @@ -72,10 +74,16 @@ static void rprint_progress(OFF_T ofs, O remain_m = (int) (remain...
2011 May 19
3
SEEK_DATA/HOLE on ocfs2 - v2
Two patches follow this message. One fixes the default implementation of SEEK_HOLE/DATA. This patch applies atop Josef's last posted patch. The second patch implements the same on ocfs2. The test tool for the same is available here. http://oss.oracle.com/~smushran/seek_data/seek_test.c It is improved since the last post. It runs cleanly on zfs, ocfs2 and ext3 (default behavior). Users
2011 May 19
3
SEEK_DATA/HOLE on ocfs2 - v2
Two patches follow this message. One fixes the default implementation of SEEK_HOLE/DATA. This patch applies atop Josef's last posted patch. The second patch implements the same on ocfs2. The test tool for the same is available here. http://oss.oracle.com/~smushran/seek_data/seek_test.c It is improved since the last post. It runs cleanly on zfs, ocfs2 and ext3 (default behavior). Users
2004 Sep 27
0
Finding start of audio data using metadata level 2 interface.
...> a decoder in this piece as well. > > It looks like FLAC__Metadata_Chain has a last_offset - but it's not > exposed. > That should theoretically give me the position after the last > metadata block? yep, that will work too. but just writing skipping code is pretty simple: is_last=0 read 'fLaC' string while (!is_last) { read 1 byte metadata block type read 3 byte metadata block length is_last = type & 0x80 fseek(file,length,SEEK_CUR) } last_offset=ftell(file) see also: http://flac.sourceforge.net/format.html#metadata_block_header 'length' i...
2006 May 11
2
C++ Set_Metadata Problem
...R) seekable stream encoder state = 1 (FLAC__SEEKABLE_STREAM_ENCODER_STREAM_ENCODER_ERROR) stream encoder state = 16 (FLAC__STREAM_ENCODER_INVALID_METADATA) I have invalid metadata! I have tried the same with VorbisComment and Padding objects, with similar results. Do I need to set the is_last flag for the last block in my array or does the decoder object do that? Any ideas about what is wrong? Thanks Paddy
2004 Feb 27
2
patch: better progress meter
Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part Url : http://lists.samba.org/archive/rsync/attachments/20040227/923b87ee/PGP.bin
2013 Aug 07
1
FIEMAP problem
Hi, We are trying to use OCFS2 as VM storage. After running into problems with qemu's disk_mirror feature we now think there could be a problem with the FIEMAP ioctl in OCFS2. As far as I understand the situation looks like this: Qemu inquiries the FS if the given section of the image is already allocated via the FIEMAP ioctl [1] It especially checks if fm_mapped_extents is greater 0.
2014 Sep 25
2
Patch to improve malformed vorbiscomment handling
...a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -87,7 +87,7 @@ static FLAC__bool find_metadata_(FLAC__StreamDecoder *decoder); static FLAC__bool read_metadata_(FLAC__StreamDecoder *decoder); static FLAC__bool read_metadata_streaminfo_(FLAC__StreamDecoder *decoder, FLAC__bool is_last, unsigned length); static FLAC__bool read_metadata_seektable_(FLAC__StreamDecoder *decoder, FLAC__bool is_last, unsigned length); -static FLAC__bool read_metadata_vorbiscomment_(FLAC__StreamDecoder *decoder, FLAC__StreamMetadata_VorbisComment *obj); +static FLAC__bool read_metadata_vorbiscomment_(...
2006 Sep 06
2
Getting subframe type=verbatim on 16 bit files
...(true); } if (!flacCompressor.SetupInboundBuffer(pcmData)) return false; FLAC__StreamMetadata padding; FLAC__StreamMetadata *metadata [1]; // stuff some pading for metadata padding.type = FLAC__METADATA_TYPE_PADDING; padding.is_last = 0; padding.length = 40; metadata[0] = &padding; setValue = flacCompressor.set_metadata(metadata, 1); FlacEncoder::Stream::State flacState = flacCompressor.init(); /* // verify that the values are correct...they are fine, why still ver...
2014 Sep 26
0
Patch to improve malformed vorbiscomment handling
...a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -87,7 +87,7 @@ static FLAC__bool find_metadata_(FLAC__StreamDecoder *decoder); static FLAC__bool read_metadata_(FLAC__StreamDecoder *decoder); static FLAC__bool read_metadata_streaminfo_(FLAC__StreamDecoder *decoder, FLAC__bool is_last, unsigned length); static FLAC__bool read_metadata_seektable_(FLAC__StreamDecoder *decoder, FLAC__bool is_last, unsigned length); -static FLAC__bool read_metadata_vorbiscomment_(FLAC__StreamDecoder *decoder, FLAC__StreamMetadata_VorbisComment *obj); +static FLAC__bool read_metadata_vorbiscomment_(...
2006 Sep 06
0
Getting subframe type=verbatim on 16 bit files
...ressor.SetupInboundBuffer(pcmData)) return false; > > > FLAC__StreamMetadata padding; > FLAC__StreamMetadata *metadata [1]; > > // stuff some pading for metadata > padding.type = FLAC__METADATA_TYPE_PADDING; > padding.is_last = 0; > padding.length = 40; > metadata[0] = &padding; > setValue = flacCompressor.set_metadata(metadata, 1); > > FlacEncoder::Stream::State flacState = flacCompressor.init(); > > /* > // verify that the values ar...
2008 Oct 22
1
[PATCH] Make progress output show "done" instead of "to-chk".
...ss opinions on it. Matt progress.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/progress.c b/progress.c index 25be374..7309a5d 100644 --- a/progress.c +++ b/progress.c @@ -72,9 +72,9 @@ static void rprint_progress(OFF_T ofs, OFF_T size, struct timeval *now, if (is_last) { int len = snprintf(eol, sizeof eol, - " (xfr#%d, to-chk=%d/%d)\n", + " (xfr#%d, done=%d/%d)\n", stats.xferred_files, - stats.num_files - current_file_index - 1, + current_file_index, stats.num_files); if (INFO_GTE(PROGRESS, 2)) { static int last_len...
2005 Mar 04
1
wierd duration shown in progress with 0 byte files
...ty files and doing a new run, they all show the same large value, which will be different from the previous run. This is my little improvement (I hope) on progress.c: --- progress.c.orig 2005-03-04 22:58:39.000000000 +0100 +++ progress.c 2005-03-04 23:07:13.000000000 +0100 @@ -68,9 +68,8 @@ if (is_last) { /* Compute stats based on the starting info. */ diff = msdiff(&ph_start.time, now); - if (!diff) - diff = 1; - rate = (double) (ofs - ph_start.ofs) * 1000.0 / diff / 1024.0; + rate = diff ? (double) (ofs - ph_start.ofs) * 1000.0 + / diff / 1024.0 : 0; /* Switch to total ti...
2013 Apr 23
2
Metaflac UTF-8 fixes
...PR; printf("METADATA block #%u\n", block_number); PPR; printf(" type: %u (%s)\n", (unsigned)block->type, block->type < FLAC__METADATA_TYPE_UNDEFINED? FLAC__MetadataTypeString[block->type] : "UNKNOWN"); PPR; printf(" is last: %s\n", block->is_last? "true":"false"); diff --git a/src/metaflac/operations_shorthand_vorbiscomment.c b/src/metaflac/operations_shorthand_vorbiscomment.c index 3d381a5..19f9602 100644 --- a/src/metaflac/operations_shorthand_vorbiscomment.c +++ b/src/metaflac/operations_shorthand_vorbiscomment.c @@ -...
2002 Mar 14
2
PATCH: better progress reporting
...000 @@ -866,7 +866,9 @@ unsigned long diff = msdiff(&start_time, now); double rate = diff ? (double) (ofs-start_ofs) * 1000.0 / diff / 1024.0 : 0; const char *units; - double remain = rate ? (double) (size-ofs) / rate / 1000.0: 0.0; + double remain = is_last + ? (double) diff / 1000.0 + : rate ? (double) (size-ofs) / rate / 1000.0 : 0.0; int remain_h, remain_m, remain_s; if (rate > 1024*1024) {
2006 Sep 07
2
Getting subframe type=verbatim on 16 bit files
...a)) return false; >> >> >> FLAC__StreamMetadata padding; >> FLAC__StreamMetadata *metadata [1]; >> >> // stuff some pading for metadata >> padding.type = FLAC__METADATA_TYPE_PADDING; >> padding.is_last = 0; >> padding.length = 40; >> metadata[0] = &padding; >> setValue = flacCompressor.set_metadata(metadata, 1); >> >> FlacEncoder::Stream::State flacState = flacCompressor.init(); >> >> /* >>...