search for: flac__metadata_object_new

Displaying 16 results from an estimated 16 matches for "flac__metadata_object_new".

2004 Sep 10
1
metaflac bug
.../main.c 2002-10-06 23:36:26.000000000 +0200 @@ -1754,20 +1754,24 @@ found_vc_block = true; } while(!found_vc_block && FLAC__metadata_iterator_next(iterator)); - /* create a new block if necessary */ - if(!found_vc_block && operation->type == OP__SET_VC_FIELD) { - block = FLAC__metadata_object_new(FLAC__METADATA_TYPE_VORBIS_COMMENT); - if(0 == block) - die("out of memory allocating VORBIS_COMMENT block"); - while(FLAC__metadata_iterator_next(iterator)) - ; - if(!FLAC__metadata_iterator_insert_block_after(iterator, block)) { - fprintf(stderr, "%s: ERROR: adding new VOR...
2012 Apr 24
1
Writing seektable using libFLAC++
...ve now decided to try and add some metadata to the encoded flacs. Eventually, there will be vorbis comments, but right now I'm just trying to add a seektable. From some code examples I've managed to get it working using the 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...
2010 Apr 21
1
How do you set the Application ID value in an an Application Metadata Block?
...cation ID value in my metadata object. I am currently working around the issue by setting the value manually, but that hurts my good coding sense. (Note: I have already registered my ID.) Is there an API call to set the application metadata ID? Here's what I'm doing: myFlacMetadata = FLAC__metadata_object_new (FLAC__METADATA_TYPE_APPLICATION); FLAC__metadata_object_application_set_data (uitsFlacMetadata, myMetadata, myMetadataSize, FALSE); /* this is a BIG FAT NO NO, but I cannot for the life of me find any way in the FLAC API to set */ /* the Application block application ID, therefore I a...
2024 Oct 13
2
C API: How to get a seektable for very long files?
...is 64 bit, which is more than enough. But how does the decoder handle the seektable when the total number of samples is unknown? Or does the seektable override the info from METADATA_BLOCK_STREAMINFO? I used this functions now to add seekpoints, but all remain placeholders according to metaflac: FLAC__metadata_object_new FLAC__metadata_object_seektable_template_append_placeholders FLAC__stream_encoder_set_metadata (encoder init & loop) FLAC__metadata_object_seektable_template_sort Best regards Stefan Am 13.10.24 um 22:33 schrieb Stefan Oltmanns: > Hi Martijn, > > Am 13.10.24 um 21:00 schrieb Martijn...
2006 Dec 19
2
Compiler warnings using gcc-4.1
...y.c:52: warning: cast to pointer from integer of different size metadata_iterators.c: In function 'read_metadata_block_data_picture_cb_': metadata_iterators.c:2370: warning: dereferencing type-punned pointer will break strict-aliasing rules metadata_object.c: In function 'FLAC__metadata_object_new': metadata_object.c:504: warning: dereferencing type-punned pointer will break strict-aliasing rules metadata_object.c: In function 'FLAC__metadata_object_clone': metadata_object.c:548: warning: dereferencing type-punned pointer will break strict-aliasing rules metad...
2004 Sep 10
3
reading vorbis comments with FLAC++?
...ST and TITLE from the file. A while back, I was popen()ing to metaflac, because I didn't want to mess with libFLAC. But now, it's the weekend, so I can mess around with this. Here's the code in question: bool getflac (struct Song* flac, const char* path) { FLAC__StreamMetadata *md = FLAC__metadata_object_new (FLAC__METADATA_TYPE_STREAMINFO); if (FLAC__metadata_get_streaminfo(path, md)) { unsigned nc = 0, i; FLAC::Metadata::VorbisComment vc (md); nc = vc.get_num_comments(); for (i = 0; i <= nc; i++) { FLAC::Metadata::VorbisComment::Entry e; e = vc.get_comment(i)...
2008 May 19
1
Memory leaks due to Metadata object vorbis comment API ???
...annels); > ok &= FLAC__stream_encoder_set_bits_per_sample(encoder, bps); > ok &= FLAC__stream_encoder_set_sample_rate(encoder, sample_rate); > ok &= FLAC__stream_encoder_set_total_samples_estimate(encoder, > total_samples); > > if( (metadata[0] = > FLAC__metadata_object_new(FLAC__METADATA_TYPE_PADDING)) == NULL || > (metadata[1] = > FLAC__metadata_object_new(FLAC__METADATA_TYPE_VORBIS_COMMENT)) == NULL) > ok = false; > > metadata[0]->length = 512; /* set the padding length */ > #if BUGGY > ok &= > FLAC__metadata_...
2018 Feb 04
1
libFLAC optimizations request
...asn’t suggesting that you run metaflac, but that you examine its source to see how it creates new FLAC files without the Vorbis comment. As far as I know, metaflac uses the standard libFLAC and creates files without the Vorbis overhead. My quick review of the source seemed to indicate that calling FLAC__metadata_object_new(FLAC__METADATA_TYPE_VORBIS_COMMENT) will create the comment, but I assumed that you could pass in NULL. I mistakenly thought that was FLAC__stream_encoder_new(). There is a comment saying that the Ogg FLAC mapping requires a VORBIS_COMMENT, but that doesn’t necessarily mean that standard FLAC also...
2024 Oct 14
1
C API: How to get a seektable for very long files?
...is unknown? Or does the seektable override the info from > METADATA_BLOCK_STREAMINFO? When a suitable seektable is found, it overrides the information from streaminfo, yes. > > I used this functions now to add seekpoints, but all remain placeholders > according to metaflac: > > FLAC__metadata_object_new > FLAC__metadata_object_seektable_template_append_placeholders > FLAC__stream_encoder_set_metadata > (encoder init & loop) > FLAC__metadata_object_seektable_template_sort > Yes, that is correct, because you asked for placeholder points. You should ask for spaced points. I just t...
2007 Jan 02
0
Compiler warnings using gcc-4.1
...of different > size > > metadata_iterators.c: In function > 'read_metadata_block_data_picture_cb_': > metadata_iterators.c:2370: warning: dereferencing type-punned > pointer will > break strict-aliasing rules > > metadata_object.c: In function 'FLAC__metadata_object_new': > metadata_object.c:504: warning: dereferencing type-punned pointer > will break > strict-aliasing rules > metadata_object.c: In function 'FLAC__metadata_object_clone': > metadata_object.c:548: warning: dereferencing type-punned pointer > will break &gt...
2010 Mar 08
0
Difficulties in add cover art to FLAC file
Hi all, recently I tried to add cover art to flac files and have dfficulties in doing so. FLAC__Metadata_Chain *chain = FLAC__metadata_chain_new(); if(0 == chain) return; if(!FLAC__metadata_chain_read(chain, filename)) return; FLAC__StreamMetadata *picture = FLAC__metadata_object_new(FLAC__METADATA_TYPE_PICTURE); FLAC__Metadata_Iterator *iterator = FLAC__metadata_iterator_new(); if(0 == iterator) return; FLAC__metadata_iterator_init(iterator, chain); while(FLAC__metadata_iterator_next(iterator)) ; const char *violation; if( !FLAC__metadata_object_picture_is_legal(pictu...
2016 Nov 24
0
Creating a SEEKTABLE block during encoding
...ile seem OK. In order to eliminate anything in our system I modified the encoder sample code from the website and it behaves the same which make me think I'm missing something. I changed the section where the meta data is added to the encoder to add a seek table block. (metadata[2] = FLAC__metadata_object_new(FLAC__METADATA_TYPE_SEEKTABLE)) == NULL || !FLAC__metadata_object_seektable_template_append_placeholders(metadata[2],16) || ... ok = FLAC__stream_encoder_set_metadata(encoder, metadata, 3); I don't really understand the details of the seek table but my thinking here is that I am g...
2009 Aug 05
1
FLAC 1.2.1 on OS X 10.4.11
yes that is what i did. got the "requires version 7.0.0 or later, but libiconv.2.dylib provides version XYZ" (forgot which version i had before). removed libiconv, downloaded compiled and installed the new one (libiconv-1.13.1), then i just get $ flac Bus error i reinstalled flac 1.1.4, still runs fine (but doesn't support multichannel). cheers, -sciss- Am 05.08.2009 um
2024 Oct 13
1
C API: How to get a seektable for very long files?
Hi Martijn, Am 13.10.24 um 21:00 schrieb Martijn van Beurden: > > There's actually quite a lot of documentation for this. > > Please review https://xiph.org/flac/api/group__flac__stream__encoder.html#ga80d57f9069e354cbf1a15a3e3ad9ca78 > > I quote: >> SEEKTABLE blocks are handled specially. Since you will not know the >> values for the seek point stream offsets,
2024 Oct 14
1
C API: How to get a seektable for very long files?
...the seek table is correct, having sample_numer values a lot higher than total samples. The players display the wrong length. Seems to be a bug in flac. > >> >> I used this functions now to add seekpoints, but all remain placeholders >> according to metaflac: >> >> FLAC__metadata_object_new >> FLAC__metadata_object_seektable_template_append_placeholders >> FLAC__stream_encoder_set_metadata >> (encoder init & loop) >> FLAC__metadata_object_seektable_template_sort >> > > Yes, that is correct, because you asked for placeholder points. You > shou...
2018 Feb 04
2
libFLAC optimizations request
Correction, the flac command-line does create a 40-byte Vorbis comment by default. I just never noticed it before. I’ve been using —no-padding all these years for minimal file sizes without realizing that I could save another 40 bytes. Anyway, since metaflac can remove the Vorbis comment using the standard library, then you should be able to create a solution without modifying libFLAC. Brian