33 #ifndef FLACPP__METADATA_H
34 #define FLACPP__METADATA_H
116 Prototype(const ::FLAC__StreamMetadata &);
117 Prototype(const ::FLAC__StreamMetadata *);
135 Prototype &operator=(const ::FLAC__StreamMetadata &);
136 Prototype &operator=(const ::FLAC__StreamMetadata *);
146 virtual void clear();
157 inline bool operator==(
const Prototype &)
const;
158 inline bool operator==(const ::FLAC__StreamMetadata &)
const;
159 inline bool operator==(const ::FLAC__StreamMetadata *)
const;
164 inline bool operator!=(
const Prototype &)
const;
165 inline bool operator!=(const ::FLAC__StreamMetadata &)
const;
166 inline bool operator!=(const ::FLAC__StreamMetadata *)
const;
176 inline bool is_valid()
const;
184 bool get_is_last()
const;
202 unsigned get_length()
const;
210 void set_is_last(
bool);
219 inline operator const ::FLAC__StreamMetadata *()
const;
226 inline void set_reference(
bool x) { is_reference_ = x; }
231 #pragma warning ( disable : 4800 )
244 #pragma warning ( default : 4800 )
257 {
return 0 != object_; }
259 inline Prototype::operator const ::FLAC__StreamMetadata *()
const
318 unsigned get_min_blocksize()
const;
319 unsigned get_max_blocksize()
const;
320 unsigned get_min_framesize()
const;
321 unsigned get_max_framesize()
const;
322 unsigned get_sample_rate()
const;
323 unsigned get_channels()
const;
324 unsigned get_bits_per_sample()
const;
325 FLAC__uint64 get_total_samples()
const;
326 const FLAC__byte *get_md5sum()
const;
328 void set_min_blocksize(
unsigned value);
329 void set_max_blocksize(
unsigned value);
330 void set_min_framesize(
unsigned value);
331 void set_max_framesize(
unsigned value);
332 void set_sample_rate(
unsigned value);
333 void set_channels(
unsigned value);
334 void set_bits_per_sample(
unsigned value);
335 void set_total_samples(FLAC__uint64 value);
336 void set_md5sum(
const FLAC__byte value[16]);
396 void set_length(
unsigned length);
449 const FLAC__byte *get_id()
const;
450 const FLAC__byte *get_data()
const;
452 void set_id(
const FLAC__byte value[4]);
454 bool set_data(
const FLAC__byte *data,
unsigned length);
455 bool set_data(FLAC__byte *data,
unsigned length,
bool copy);
508 unsigned get_num_points()
const;
512 bool resize_points(
unsigned new_num_points);
515 void set_point(
unsigned index, const ::FLAC__StreamMetadata_SeekPoint &point);
518 bool insert_point(
unsigned index, const ::FLAC__StreamMetadata_SeekPoint &point);
521 bool delete_point(
unsigned index);
524 bool is_legal()
const;
527 bool template_append_placeholders(
unsigned num);
530 bool template_append_point(FLAC__uint64 sample_number);
533 bool template_append_points(FLAC__uint64 sample_numbers[],
unsigned num);
536 bool template_append_spaced_points(
unsigned num, FLAC__uint64 total_samples);
539 bool template_append_spaced_points_by_samples(
unsigned samples, FLAC__uint64 total_samples);
542 bool template_sort(
bool compact);
584 Entry(
const char *field,
unsigned field_length);
585 Entry(
const char *field);
587 Entry(
const char *field_name,
const char *field_value,
unsigned field_value_length);
588 Entry(
const char *field_name,
const char *field_value);
596 virtual bool is_valid()
const;
598 unsigned get_field_length()
const;
599 unsigned get_field_name_length()
const;
600 unsigned get_field_value_length()
const;
603 const char *get_field()
const;
604 const char *get_field_name()
const;
605 const char *get_field_value()
const;
607 bool set_field(
const char *field,
unsigned field_length);
608 bool set_field(
const char *field);
609 bool set_field_name(
const char *field_name);
610 bool set_field_value(
const char *field_value,
unsigned field_value_length);
611 bool set_field_value(
const char *field_value);
616 unsigned field_name_length_;
618 unsigned field_value_length_;
623 void clear_field_name();
624 void clear_field_value();
625 void construct(
const char *field,
unsigned field_length);
626 void construct(
const char *field);
627 void construct(
const char *field_name,
const char *field_value,
unsigned field_value_length);
628 void construct(
const char *field_name,
const char *field_value);
629 void compose_field();
677 unsigned get_num_comments()
const;
678 const FLAC__byte *get_vendor_string()
const;
679 Entry get_comment(
unsigned index)
const;
682 bool set_vendor_string(
const FLAC__byte *
string);
685 bool resize_comments(
unsigned new_num_comments);
688 bool set_comment(
unsigned index,
const Entry &entry);
691 bool insert_comment(
unsigned index,
const Entry &entry);
694 bool append_comment(
const Entry &entry);
697 bool replace_comment(
const Entry &entry,
bool all);
700 bool delete_comment(
unsigned index);
703 int find_entry_from(
unsigned offset,
const char *field_name);
706 int remove_entry_matching(
const char *field_name);
709 int remove_entries_matching(
const char *field_name);
729 Track(const ::FLAC__StreamMetadata_CueSheet_Track *track);
735 virtual bool is_valid()
const;
738 inline FLAC__uint64 get_offset()
const {
return object_->
offset; }
739 inline FLAC__byte get_number()
const {
return object_->
number; }
740 inline const char *get_isrc()
const {
return object_->
isrc; }
741 inline unsigned get_type()
const {
return object_->
type; }
742 inline bool get_pre_emphasis()
const {
return object_->
pre_emphasis; }
744 inline FLAC__byte get_num_indices()
const {
return object_->
num_indices; }
747 inline const ::FLAC__StreamMetadata_CueSheet_Track *get_track()
const {
return object_; }
749 inline void set_offset(FLAC__uint64 value) { object_->
offset = value; }
750 inline void set_number(FLAC__byte value) { object_->
number = value; }
751 void set_isrc(
const char value[12]);
752 void set_type(
unsigned value);
753 inline void set_pre_emphasis(
bool value) { object_->
pre_emphasis = value? 1 : 0; }
755 void set_index(
unsigned i, const ::FLAC__StreamMetadata_CueSheet_Index &index);
804 const char *get_media_catalog_number()
const;
805 FLAC__uint64 get_lead_in()
const;
806 bool get_is_cd()
const;
808 unsigned get_num_tracks()
const;
809 Track get_track(
unsigned i)
const;
811 void set_media_catalog_number(
const char value[128]);
812 void set_lead_in(FLAC__uint64 value);
813 void set_is_cd(
bool value);
815 void set_index(
unsigned track_num,
unsigned index_num, const ::FLAC__StreamMetadata_CueSheet_Index &index);
818 bool resize_indices(
unsigned track_num,
unsigned new_num_indices);
821 bool insert_index(
unsigned track_num,
unsigned index_num, const ::FLAC__StreamMetadata_CueSheet_Index &index);
824 bool insert_blank_index(
unsigned track_num,
unsigned index_num);
827 bool delete_index(
unsigned track_num,
unsigned index_num);
830 bool resize_tracks(
unsigned new_num_tracks);
833 bool set_track(
unsigned i,
const Track &track);
836 bool insert_track(
unsigned i,
const Track &track);
839 bool insert_blank_track(
unsigned i);
842 bool delete_track(
unsigned i);
845 bool is_legal(
bool check_cd_da_subset =
false,
const char **violation = 0)
const;
848 FLAC__uint32 calculate_cddb_id()
const;
902 const char *get_mime_type()
const;
903 const FLAC__byte *get_description()
const;
904 FLAC__uint32 get_width()
const;
905 FLAC__uint32 get_height()
const;
906 FLAC__uint32 get_depth()
const;
907 FLAC__uint32 get_colors()
const;
908 FLAC__uint32 get_data_length()
const;
909 const FLAC__byte *get_data()
const;
914 bool set_mime_type(
const char *
string);
917 bool set_description(
const FLAC__byte *
string);
919 void set_width(FLAC__uint32 value)
const;
920 void set_height(FLAC__uint32 value)
const;
921 void set_depth(FLAC__uint32 value)
const;
922 void set_colors(FLAC__uint32 value)
const;
925 bool set_data(
const FLAC__byte *data, FLAC__uint32 data_length);
928 bool is_legal(
const char **violation);
983 const FLAC__byte *get_data()
const;
986 bool set_data(
const FLAC__byte *data,
unsigned length);
987 bool set_data(FLAC__byte *data,
unsigned length,
bool copy);
1005 FLACPP_API
bool get_streaminfo(
const char *filename, StreamInfo &streaminfo);
1007 FLACPP_API
bool get_tags(
const char *filename, VorbisComment *&tags);
1008 FLACPP_API
bool get_tags(
const char *filename, VorbisComment &tags);
1010 FLACPP_API
bool get_cuesheet(
const char *filename, CueSheet *&cuesheet);
1011 FLACPP_API
bool get_cuesheet(
const char *filename, CueSheet &cuesheet);
1013 FLACPP_API
bool get_picture(
const char *filename, Picture *&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);
1014 FLACPP_API
bool get_picture(
const char *filename, Picture &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);
1069 bool is_valid()
const;
1071 bool init(
const char *filename,
bool read_only,
bool preserve_file_stats);
1074 bool is_writable()
const;
1078 bool is_last()
const;
1080 off_t get_block_offset()
const;
1082 unsigned get_block_length()
const;
1083 bool get_application_id(FLAC__byte *
id);
1085 bool set_block(
Prototype *block,
bool use_padding =
true);
1086 bool insert_block_after(
Prototype *block,
bool use_padding =
true);
1087 bool delete_block(
bool use_padding =
true);
1161 bool is_valid()
const;
1165 bool read(
const char *filename,
bool is_ogg =
false);
1168 bool check_if_tempfile_needed(
bool use_padding);
1170 bool write(
bool use_padding =
true,
bool preserve_file_stats =
false);
1174 void merge_padding();
1175 void sort_padding();
1179 virtual void clear();
1196 bool is_valid()
const;
1199 void init(
Chain &chain);
1207 bool delete_block(
bool replace_with_padding);
1208 bool insert_block_before(
Prototype *block);
1209 bool insert_block_after(
Prototype *block);
1213 virtual void clear();
Definition: callback.h:170
This module contains #defines and symbols for exporting function calls, and providing version informa...
void * FLAC__IOHandle
Definition: callback.h:89