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 )
258 {
return 0 != object_; }
260 inline Prototype::operator const ::FLAC__StreamMetadata *()
const
319 unsigned get_min_blocksize()
const;
320 unsigned get_max_blocksize()
const;
321 unsigned get_min_framesize()
const;
322 unsigned get_max_framesize()
const;
323 unsigned get_sample_rate()
const;
324 unsigned get_channels()
const;
325 unsigned get_bits_per_sample()
const;
326 FLAC__uint64 get_total_samples()
const;
327 const FLAC__byte *get_md5sum()
const;
329 void set_min_blocksize(
unsigned value);
330 void set_max_blocksize(
unsigned value);
331 void set_min_framesize(
unsigned value);
332 void set_max_framesize(
unsigned value);
333 void set_sample_rate(
unsigned value);
334 void set_channels(
unsigned value);
335 void set_bits_per_sample(
unsigned value);
336 void set_total_samples(FLAC__uint64 value);
337 void set_md5sum(
const FLAC__byte value[16]);
397 void set_length(
unsigned length);
450 const FLAC__byte *get_id()
const;
451 const FLAC__byte *get_data()
const;
453 void set_id(
const FLAC__byte value[4]);
455 bool set_data(
const FLAC__byte *data,
unsigned length);
456 bool set_data(FLAC__byte *data,
unsigned length,
bool copy);
509 unsigned get_num_points()
const;
513 bool resize_points(
unsigned new_num_points);
516 void set_point(
unsigned index, const ::FLAC__StreamMetadata_SeekPoint &point);
519 bool insert_point(
unsigned index, const ::FLAC__StreamMetadata_SeekPoint &point);
522 bool delete_point(
unsigned index);
525 bool is_legal()
const;
528 bool template_append_placeholders(
unsigned num);
531 bool template_append_point(FLAC__uint64 sample_number);
534 bool template_append_points(FLAC__uint64 sample_numbers[],
unsigned num);
537 bool template_append_spaced_points(
unsigned num, FLAC__uint64 total_samples);
540 bool template_append_spaced_points_by_samples(
unsigned samples, FLAC__uint64 total_samples);
543 bool template_sort(
bool compact);
585 Entry(
const char *field,
unsigned field_length);
586 Entry(
const char *field);
588 Entry(
const char *field_name,
const char *field_value,
unsigned field_value_length);
589 Entry(
const char *field_name,
const char *field_value);
597 virtual bool is_valid()
const;
599 unsigned get_field_length()
const;
600 unsigned get_field_name_length()
const;
601 unsigned get_field_value_length()
const;
604 const char *get_field()
const;
605 const char *get_field_name()
const;
606 const char *get_field_value()
const;
608 bool set_field(
const char *field,
unsigned field_length);
609 bool set_field(
const char *field);
610 bool set_field_name(
const char *field_name);
611 bool set_field_value(
const char *field_value,
unsigned field_value_length);
612 bool set_field_value(
const char *field_value);
617 unsigned field_name_length_;
619 unsigned field_value_length_;
624 void clear_field_name();
625 void clear_field_value();
626 void construct(
const char *field,
unsigned field_length);
627 void construct(
const char *field);
628 void construct(
const char *field_name,
const char *field_value,
unsigned field_value_length);
629 void construct(
const char *field_name,
const char *field_value);
630 void compose_field();
678 unsigned get_num_comments()
const;
679 const FLAC__byte *get_vendor_string()
const;
680 Entry get_comment(
unsigned index)
const;
683 bool set_vendor_string(
const FLAC__byte *
string);
686 bool resize_comments(
unsigned new_num_comments);
689 bool set_comment(
unsigned index,
const Entry &entry);
692 bool insert_comment(
unsigned index,
const Entry &entry);
695 bool append_comment(
const Entry &entry);
698 bool replace_comment(
const Entry &entry,
bool all);
701 bool delete_comment(
unsigned index);
704 int find_entry_from(
unsigned offset,
const char *field_name);
707 int remove_entry_matching(
const char *field_name);
710 int remove_entries_matching(
const char *field_name);
730 Track(const ::FLAC__StreamMetadata_CueSheet_Track *track);
736 virtual bool is_valid()
const;
739 inline FLAC__uint64 get_offset()
const {
return object_->
offset; }
740 inline FLAC__byte get_number()
const {
return object_->
number; }
741 inline const char *get_isrc()
const {
return object_->
isrc; }
742 inline unsigned get_type()
const {
return object_->
type; }
743 inline bool get_pre_emphasis()
const {
return object_->
pre_emphasis; }
745 inline FLAC__byte get_num_indices()
const {
return object_->
num_indices; }
748 inline const ::FLAC__StreamMetadata_CueSheet_Track *get_track()
const {
return object_; }
750 inline void set_offset(FLAC__uint64 value) { object_->
offset = value; }
751 inline void set_number(FLAC__byte value) { object_->
number = value; }
752 void set_isrc(
const char value[12]);
753 void set_type(
unsigned value);
754 inline void set_pre_emphasis(
bool value) { object_->
pre_emphasis = value? 1 : 0; }
756 void set_index(
unsigned i, const ::FLAC__StreamMetadata_CueSheet_Index &index);
805 const char *get_media_catalog_number()
const;
806 FLAC__uint64 get_lead_in()
const;
807 bool get_is_cd()
const;
809 unsigned get_num_tracks()
const;
810 Track get_track(
unsigned i)
const;
812 void set_media_catalog_number(
const char value[128]);
813 void set_lead_in(FLAC__uint64 value);
814 void set_is_cd(
bool value);
816 void set_index(
unsigned track_num,
unsigned index_num, const ::FLAC__StreamMetadata_CueSheet_Index &index);
819 bool resize_indices(
unsigned track_num,
unsigned new_num_indices);
822 bool insert_index(
unsigned track_num,
unsigned index_num, const ::FLAC__StreamMetadata_CueSheet_Index &index);
825 bool insert_blank_index(
unsigned track_num,
unsigned index_num);
828 bool delete_index(
unsigned track_num,
unsigned index_num);
831 bool resize_tracks(
unsigned new_num_tracks);
834 bool set_track(
unsigned i,
const Track &track);
837 bool insert_track(
unsigned i,
const Track &track);
840 bool insert_blank_track(
unsigned i);
843 bool delete_track(
unsigned i);
846 bool is_legal(
bool check_cd_da_subset =
false,
const char **violation = 0)
const;
849 FLAC__uint32 calculate_cddb_id()
const;
903 const char *get_mime_type()
const;
904 const FLAC__byte *get_description()
const;
905 FLAC__uint32 get_width()
const;
906 FLAC__uint32 get_height()
const;
907 FLAC__uint32 get_depth()
const;
908 FLAC__uint32 get_colors()
const;
909 FLAC__uint32 get_data_length()
const;
910 const FLAC__byte *get_data()
const;
915 bool set_mime_type(
const char *
string);
918 bool set_description(
const FLAC__byte *
string);
920 void set_width(FLAC__uint32 value)
const;
921 void set_height(FLAC__uint32 value)
const;
922 void set_depth(FLAC__uint32 value)
const;
923 void set_colors(FLAC__uint32 value)
const;
926 bool set_data(
const FLAC__byte *data, FLAC__uint32 data_length);
929 bool is_legal(
const char **violation);
984 const FLAC__byte *get_data()
const;
987 bool set_data(
const FLAC__byte *data,
unsigned length);
988 bool set_data(FLAC__byte *data,
unsigned length,
bool copy);
1006 FLACPP_API
bool get_streaminfo(
const char *filename, StreamInfo &streaminfo);
1008 FLACPP_API
bool get_tags(
const char *filename, VorbisComment *&tags);
1009 FLACPP_API
bool get_tags(
const char *filename, VorbisComment &tags);
1011 FLACPP_API
bool get_cuesheet(
const char *filename, CueSheet *&cuesheet);
1012 FLACPP_API
bool get_cuesheet(
const char *filename, CueSheet &cuesheet);
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);
1015 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);
1070 bool is_valid()
const;
1072 bool init(
const char *filename,
bool read_only,
bool preserve_file_stats);
1075 bool is_writable()
const;
1079 bool is_last()
const;
1081 off_t get_block_offset()
const;
1083 unsigned get_block_length()
const;
1084 bool get_application_id(FLAC__byte *
id);
1086 bool set_block(
Prototype *block,
bool use_padding =
true);
1087 bool insert_block_after(
Prototype *block,
bool use_padding =
true);
1088 bool delete_block(
bool use_padding =
true);
1158 bool is_valid()
const;
1162 bool read(
const char *filename,
bool is_ogg =
false);
1165 bool check_if_tempfile_needed(
bool use_padding);
1167 bool write(
bool use_padding =
true,
bool preserve_file_stats =
false);
1171 void merge_padding();
1172 void sort_padding();
1176 virtual void clear();
1189 bool is_valid()
const;
1192 void init(
Chain &chain);
1200 bool delete_block(
bool replace_with_padding);
1201 bool insert_block_before(
Prototype *block);
1202 bool insert_block_after(
Prototype *block);
1206 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