search for: set_metadata

Displaying 15 results from an estimated 15 matches for "set_metadata".

2006 Dec 23
1
Bug in FLAC++ Stream::set_metadata()
I've found what looks like a bug in FLAC++ inside the Stream::set_metadata() method. It appears that the contained calls to FLAC__stream_encoder_set_metadata() are being passed arguments that point to local stack data (specifically the 'm' parameter which is a table that points to metadata objects). The code inside FLAC__stream_encoder_set_metadata() does nothi...
2009 Jan 28
1
Missing dereference in Stream::set_metadata()?
Hello, I seem to have hit a bug with adding meta data to a stream via the C++ interface. I am using FLAC 1.2.1. I've had a look through the email list archive and can't spot anything similar. The Stream::set_metadata(Prototype) function takes a double pointer which implies that it is expecting an array of pointers to Prototype objects. For example: FLAC::Metadata::Prototype *table[2]; FLAC::Metadata::VorbisComment comment; FLAC::Metadata::SeekTable seek; table[0] = &seek; t...
2006 May 11
2
C++ Set_Metadata Problem
I refer to a problem that appeared on the flac list last August that was either solved off-list or abandoned. (http://lists.xiph.org/pipermail/flac/2005-August/000468.html) The problem is with using the C++ encoder classes, particularly the FLAC::Encoder::File:set_metadata function. JC said that the developers version of how to add a simple metadata block looked right, but it did not work for him. I have tried the same and also can not get it to work, but with a different error. To recap... (I've left out is-valid checks in the listing for brevity) //////////...
2004 Sep 10
2
usage of C++ StreamMetadata interface
Josh Coalson wrote: > [...] > why do you need one? all the fields are available though method > calls. just an example: I created an object of the type "FLAC::Metadata::VorbisComment". How will this find it's way to "FLAC::Stream::Encoder.set_metadata()" ??? Thomas
2006 Aug 21
1
[PATCH] Memory issue and cast causing failures when adding metadata
...le cast is hiding a bad conversion from the pointer to a C++ object to the C API's struct for metadata and secondly, the method uses an array internal to the method to set the metadata using the C API. I have attached some test code which causes the problem. The underlying problem is that the set_metadata calls don't keep a copy of the metadata information, even though it is not read (and written to the stream) until the init call. However the objects inside the array must also remain valid (this is the library user's responsibility) so I also added a note in the header documentation. I hav...
2005 Aug 01
1
Application Metadata
...ke: FLAC::Metadata::Application header_flac; FLAC__byte header_flac_id[4] = { 1, 2, 3, 4 }; header_flac.set_id(header_flac_id); header_flac.set_data((FLAC__byte*)(header_str.begin()),header_str.size()); // set the metadata FLAC::Metadata::Prototype *metadata_sequence[] = { &header_flac }; enc.set_metadata(metadata_sequence,sizeof(metadata_sequence)/sizeof(metadata_sequence[0])); // and now i continue to init(), process_interleaved() and finish() But that kept giving me segmentation faults. So I tried the following, and it still gave me segmentation faults. FLAC__byte header_flac_id[4] = { 1...
2004 Sep 10
2
usage of C++ StreamMetadata interface
Hi, I would like to use the nice C++ wrapper classes for FLAC metadata in a FLAC::Stream::Encoder, but I cannot find an interface to get a "FLAC__StreamMetadata *" from one of those objects. So, as the FLAC::Stream::Encoder.set_metadata() function takes a "FLAC__StreamMetadata **" - so how can I use this, how is this intended to work??? For me all those Metadata classes look nice but useless!? Why is there no conversion, or why does the C++ function need to use a structure directly from the C layer? regards, Thoma...
2011 Mar 11
2
int to string TypeError annoyance
Hi All, In Perl, $db->set_metadata( "foo", 10 ); Results in, TypeError in method 'WritableDatabase_set_metadata', argument 3 of type 'std::string const &' It looks like this is thrown by the SWIG std::string typemap. Does someone with better SWIG skills than me know how to fix SWIG such that it co...
2018 Apr 06
1
sorting large msets
...s. With a few million documents, that ENQ_ASCENDING sounds promising :) So, it looks like if I had ideal ordering, I could do something along the lines of: my $doc_id = $db->get_metadata('last_doc_id') || 0xffffffff; $db->replace_document($doc_id--, $_) foreach (@doc); $db->set_metadata('last_doc_id', $doc_id); And get killer performance. Olly Betts <olly at survex.com> wrote: > On Sat, Mar 31, 2018 at 12:58:19AM +0000, Eric Wong wrote: > > Would it be possible to teach Xapian to optimize its storage for > > certain queries so it can stop once it'...
2012 Apr 24
1
Writing seektable using libFLAC++
...e libFLAC C API like this: FLAC__StreamMetadata *md[1]; md[0] = FLAC__metadata_object_new(FLAC__METADATA_TYPE_SEEKTABLE); // THIS LEAKS FLAC__metadata_object_seektable_template_append_spaced_points(md[0], 13, d_bytestotal / 4); FLAC__metadata_object_seektable_template_sort(md[0], true); set_metadata(md, 1); Now, I have several questions: 1. Most importantly: How can I get this to work with the libFLAC++ API? Do I not _need_ the template-methods, and are they not missing from the C++ API? I've also tried getting just half the metadata code from the C++ API and using the C API for the temp...
2006 Sep 06
2
Getting subframe type=verbatim on 16 bit files
...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 verbatim? int i; i = flacCompressor.get_channels (); i = flacCompressor.get_bits_per_sample (); i = flacCompressor.ge...
2006 Sep 06
0
Getting subframe type=verbatim on 16 bit files
...etadata *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 > verbatim? > int i; > i = flacCompressor.get_channels (); > i = flacCompressor.get_...
2018 Mar 31
2
sorting large msets
Olly Betts <olly at survex.com> wrote: > On Fri, Mar 30, 2018 at 05:21:43PM +0000, Eric Wong wrote: > > Hello, is there a way to optimize sorting by certain values > > for queries which return a huge amount of results? > [...] > > $enquire->set_sort_by_value_then_relevance(0, 1); > > If you're just wanting the 200 newest, it'll be faster not to
2014 Jul 18
2
python-shout 0.2.1 with icecast 2.4.0 segfaults
...shout.Shout() print "Using libshout version %s" % shout.version() s.host = 'localhost' s.password = 'passwood' s.mount = "/jukebox.ogg" s.open() total = 0 st = time.time() for fa in sys.argv[1:]: print "opening file %s" % fa f = open(fa) s.set_metadata({'song': fa}) nbuf = f.read(4096) while 1: buf = nbuf nbuf = f.read(4096) total = total + len(buf) if len(buf) == 0: break s.send(buf) s.sync() f.close() et = time.time() br = total*0.008/(et-st) print &qu...
2006 Sep 07
2
Getting subframe type=verbatim on 16 bit files
...[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 >> verbatim? >> int i; >> i = flacCompressor.get_channels ();...