#include "FLAC/seekable_stream_encoder.h"
#include "FLAC/stream_encoder.h"
#include "decoder.h"
+#include "metadata.h"
/** \file include/FLAC++/encoder.h
bool set_rice_parameter_search_dist(unsigned value);
bool set_total_samples_estimate(FLAC__uint64 value);
bool set_metadata(::FLAC__StreamMetadata **metadata, unsigned num_blocks);
+ bool set_metadata(FLAC::Metadata::Prototype **metadata, unsigned num_blocks);
State get_state() const;
Decoder::Stream::State get_verify_decoder_state() const;
bool set_rice_parameter_search_dist(unsigned value);
bool set_total_samples_estimate(FLAC__uint64 value);
bool set_metadata(::FLAC__StreamMetadata **metadata, unsigned num_blocks);
+ bool set_metadata(FLAC::Metadata::Prototype **metadata, unsigned num_blocks);
State get_state() const;
Stream::State get_stream_encoder_state() const;
bool set_rice_parameter_search_dist(unsigned value);
bool set_total_samples_estimate(FLAC__uint64 value);
bool set_metadata(::FLAC__StreamMetadata **metadata, unsigned num_blocks);
+ bool set_metadata(FLAC::Metadata::Prototype **metadata, unsigned num_blocks);
bool set_filename(const char *value);
State get_state() const;
return (bool)::FLAC__file_encoder_set_metadata(encoder_, metadata, num_blocks);
}
+ bool File::set_metadata(FLAC::Metadata::Prototype **metadata, unsigned num_blocks)
+ {
+ FLAC__ASSERT(is_valid());
+ ::FLAC__StreamMetadata *m[num_blocks];
+ for(unsigned i = 0; i < num_blocks; i++) {
+ // we can get away with this since we know the encoder will only correct the is_last flags
+ m[i] = const_cast< ::FLAC__StreamMetadata*>((::FLAC__StreamMetadata*)metadata[i]);
+ }
+ return (bool)::FLAC__file_encoder_set_metadata(encoder_, m, num_blocks);
+ }
+
bool File::set_filename(const char *value)
{
FLAC__ASSERT(is_valid());
return (bool)::FLAC__seekable_stream_encoder_set_metadata(encoder_, metadata, num_blocks);
}
+ bool SeekableStream::set_metadata(FLAC::Metadata::Prototype **metadata, unsigned num_blocks)
+ {
+ FLAC__ASSERT(is_valid());
+ ::FLAC__StreamMetadata *m[num_blocks];
+ for(unsigned i = 0; i < num_blocks; i++) {
+ // we can get away with this since we know the encoder will only correct the is_last flags
+ m[i] = const_cast< ::FLAC__StreamMetadata*>((::FLAC__StreamMetadata*)metadata[i]);
+ }
+ return (bool)::FLAC__seekable_stream_encoder_set_metadata(encoder_, m, num_blocks);
+ }
+
SeekableStream::State SeekableStream::get_state() const
{
FLAC__ASSERT(is_valid());
*/
#include "FLAC++/encoder.h"
+#include "FLAC++/metadata.h"
#include "FLAC/assert.h"
#ifdef _MSC_VER
return (bool)::FLAC__stream_encoder_set_metadata(encoder_, metadata, num_blocks);
}
+ bool Stream::set_metadata(FLAC::Metadata::Prototype **metadata, unsigned num_blocks)
+ {
+ FLAC__ASSERT(is_valid());
+ ::FLAC__StreamMetadata *m[num_blocks];
+ for(unsigned i = 0; i < num_blocks; i++) {
+ // we can get away with this since we know the encoder will only correct the is_last flags
+ m[i] = const_cast< ::FLAC__StreamMetadata*>((::FLAC__StreamMetadata*)metadata[i]);
+ }
+ return (bool)::FLAC__stream_encoder_set_metadata(encoder_, m, num_blocks);
+ }
+
Stream::State Stream::get_state() const
{
FLAC__ASSERT(is_valid());