Displaying 20 results from an estimated 40 matches for "flac__streammetadata".
2009 Jan 28
1
Missing dereference in Stream::set_metadata()?
...mment comment;
FLAC::Metadata::SeekTable seek;
table[0] = &seek;
table[1] = &comment;
bool bSuccess = encoder->set_metadata( table, 2 );
The assumption from the (very brief) API doxygen is that it will internally convert from FLAC::Metadata::Prototype pointers to FLAC__StreamMetadata pointers. Looking at the code, it does do the conversion but as a straight cast which is therefore nothing more than an assignment. As the two objects are not equivalent, this is a broken conversion. It results in an array of FLAC_SM pointers that return gibberish when used and produces seg faults,...
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...
2007 Sep 12
0
Changes to include/FLAC/metadata.h
Josh,
I noticed that the prototypes of two functions in the above header
file recently changed from:
FLAC_API FLAC__bool
FLAC__metadata_object_picture_set_mime_type (FLAC__StreamMetadata *object,
const char *mime_type, FLAC__bool copy);
FLAC_API FLAC__bool
FLAC__metadata_object_picture_set_description(FLAC__StreamMetadata *object,
const FLAC__byte *description, FLAC__bool copy);
to:
FLAC_API FLAC__bool
FLAC__metadata_object_picture_set_mime_type...
2006 Sep 06
2
Getting subframe type=verbatim on 16 bit files
...r.set_do_escape_coding(false);
if (numChannels > 1)
{
setValue = flacCompressor.set_do_mid_side_stereo(true);
setValue = flacCompressor.set_loose_mid_side_stereo(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 = flacCompress...
2008 May 09
1
FLAC__metadata_get_picture()
...nside ( FLAC__METADATA_TYPE_PICTURE )
How to get _all_ images with bool FLAC::Metadata::get_picture() func?
This function is wrapper FLAC__bool FLAC__metadata_get_picture().
flac-1.2.1/src/libFLAC/metadata_iterators.c:
...
285 FLAC_API FLAC__bool FLAC__metadata_get_picture(const char *filename,
FLAC__StreamMetadata **picture, FLAC__StreamMetadata_Picture_Type type,
const char *mime_type, const FLAC__byte *description, unsigned
max_width, unsigned max_height, unsigned max_depth, unsigned max_colors)
286 {
287 FLAC__Metadata_SimpleIterator *it;
288 FLAC__uint64 max_area_seen = 0;
289 FLAC_...
2007 Jul 14
2
PATCH : Fix missing protoypes
...+++ src/metaflac/operations_shorthand_cuesheet.c 2007-07-15 01:13:41 +0000
@@ -27,6 +27,7 @@
#include "utils.h"
#include "FLAC/assert.h"
#include "share/grabbag.h"
+#include "operations_shorthand.h"
static FLAC__bool import_cs_from(const char *filename, FLAC__StreamMetadata **cuesheet, const char *cs_filename, FLAC__bool *needs_write, FLAC__uint64 lead_out_offset, FLAC__bool is_cdda, Argument_AddSeekpoint *add_seekpoint_link);
static FLAC__bool export_cs_to(const char *filename, const FLAC__StreamMetadata *cuesheet, const char *cs_filename);
--- src/metaflac/operati...
2013 Apr 23
2
Metaflac UTF-8 fixes
...i.fi/~cse/temp/flac-1.3pre3-mod.zip
-------------- next part --------------
diff --git a/src/metaflac/operations.c b/src/metaflac/operations.c
index e01fa5c..529b0e5 100644
--- a/src/metaflac/operations.c
+++ b/src/metaflac/operations.c
@@ -551,7 +551,7 @@ void write_metadata(const char *filename, FLAC__StreamMetadata *block, unsigned
unsigned i, j;
/*@@@ yuck, should do this with a varargs function or something: */
-#define PPR if(filename)flac_printf("%s:",filename);
+#define PPR if(filename) if(raw) printf("%s:",filename); else flac_printf("%s:",filename);
PPR; printf(&quo...
2004 Sep 10
0
Re: FLAC 1.0.3 is out
...ects
|
| testing class FLAC::Metadata::StreamInfo
| testing StreamInfo::StreamInfo()... OK
| testing StreamInfo::StreamInfo(const StreamInfo &)... +
| StreamInfo::operator!=(const StreamInfo &)... OK
| testing StreamInfo::~StreamInfo()... OK
| testing StreamInfo::StreamInfo(const ::FLAC__StreamMetadata &)... +
| StreamInfo::operator!=(const ::FLAC__StreamMetadata &)... FAILED, !block.is_valid()
| ERROR during test_libFLAC++
| FAIL: ./test_libFLAC++.sh
| Generating stream...
|
| flac 1.0.3, Copyright (C) 2000,2001,2002 Josh Coalson
| flac comes with ABSOLUTELY NO WARRANTY. This i...
2006 Sep 06
0
Getting subframe type=verbatim on 16 bit files
...if (numChannels > 1)
> {
> setValue = flacCompressor.set_do_mid_side_stereo(true);
> setValue = flacCompressor.set_loose_mid_side_stereo(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] = &p...
2010 May 28
1
Updating metadata while encoding
...m encoder interface.
It works 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_...
2004 Sep 10
3
FLAC 1.0.3 is out
Yes, it's finally here. See the homepage for details, but here's
a summary:
- 10-15% decoder speedup
- 24-bit input support restored
- more robust plugins
- new metadata block for Vorbis-style tags
- vastly improved metadata editor
- fixed bug with pipes and Windows
- new libFLAC++, a C++ object wrapper around libFLAC
- new metadata editing interface in libFLAC and libFLAC++
- and
2011 Jun 10
2
Memory leak using libflac++
...he MusicBrainz servers.
I've recently run it through valgrind, and I'm seeing memory leaks like the
following:
12 bytes in 1 blocks are definitely lost in loss record 1 of 5
at 0x402377E: operator new(unsigned) (vg_replace_malloc.c:224)
by 0x41448A8: FLAC::Metadata::local::construct_block(FLAC__StreamMetadata*)
(in /usr/lib/libFLAC++.so.6.2.0) by 0x41455D7:
FLAC::Metadata::Iterator::get_block() (in /usr/lib/libFLAC++.so.6.2.0)
by 0x8072CB5: CFlacInfo::Read() (FlacInfo.cc:154)
by 0x8054BF4: CFlacTag::LoadData() (flactag.cc:543)
by 0x8058D45: CFlacTag::CFlacTag(CCommandLine const&) (flactag.cc:134)...
2012 Apr 24
1
Writing seektable using libFLAC++
...e program works beautifully, and I'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 question...
2004 Sep 10
2
Storing FLAC in Matroska
...(int channel = 0; channel < frame->header.channels; channel++)
{
fwrite((void *)&buffer[channel][current_sample], 1, 1,
ourData->outputFile);
}
}
return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
};
void flac_DecoderMetaDataCallback(const FLAC__StreamDecoder *decoder, const
FLAC__StreamMetadata *metadata, void *client_data)
{
flacData *ourData = (flacData *)client_data;
};
void flac_DecoderErrorCallback(const FLAC__StreamDecoder *decoder,
FLAC__StreamDecoderErrorStatus status, void *client_data)
{
flacData *ourData = (flacData *)client_data;
};
int main(int argc, char* argv[])
{
//...
2006 Aug 21
1
[PATCH] Memory issue and cast causing failures when adding metadata
Hi,
We are using the libFLAC++ library to encode FLAC files with Vorbis
comments in them and have had the FLAC 1.1.2 version fail consistently
(access violation or segmentation fault) on both Windows and Linux. We
tracked this down to the metadata code in the C++ API.
The problem is in src/libFLAC++/file_encoder.cpp.
There are two problems - firstly, a C-style cast is hiding a bad
conversion
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
2011 Jun 11
0
Flac-dev Digest, Vol 79, Issue 3
...I've recently run it through valgrind, and I'm seeing memory leaks like the
> following:
>
> 12 bytes in 1 blocks are definitely lost in loss record 1 of 5
> at 0x402377E: operator new(unsigned) (vg_replace_malloc.c:224)
> by 0x41448A8: FLAC::Metadata::local::construct_block(FLAC__StreamMetadata*)
> (in /usr/lib/libFLAC++.so.6.2.0) by 0x41455D7:
> FLAC::Metadata::Iterator::get_block() (in /usr/lib/libFLAC++.so.6.2.0)
> by 0x8072CB5: CFlacInfo::Read() (FlacInfo.cc:154)
> by 0x8054BF4: CFlacTag::LoadData() (flactag.cc:543)
> by 0x8058D45: CFlacTag::CFlacTag(CCommandLine cons...
2004 Sep 10
3
reading vorbis comments with FLAC++?
...ad the vorbis comments ARTIST 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::Entr...
2006 Sep 07
2
Getting subframe type=verbatim on 16 bit files
...{
>> setValue = flacCompressor.set_do_mid_side_stereo(true);
>> setValue = flacCompressor.set_loose_mid_side_stereo(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;
>> met...
2004 Sep 10
2
Developing SoundFont FLAC compressor using libFLAC
...ouple functions, something like
these:
/*
* Saves a metadata header to a buffer which is suitable for
* writing to a FLAC stream.
*
* Returns: A buffer with the encoded metadata header or NULL on error,
* Buffer should be freed when finished with.
*/
FLAC__byte *FLAC__metadata_to_stream (FLAC__StreamMetaData *metadata);
/*
* Parses a metadata header byte stream and populates the passed
* 'metadata' structure. If 'header_size' is not NULL then the size of
* the parsed header is stored there.
*
* Returns: TRUE on success, FALSE if metadata_stream does not contain a
* valid metada...