foobar2000 SDK
2015-08-03
|
#include <file_info_impl.h>
Public Member Functions | |
file_info_impl (const file_info_impl &p_source) | |
file_info_impl (const file_info &p_source) | |
file_info_impl () | |
~file_info_impl () | |
void | copy_info (const file_info &p_source) |
void | copy_meta (const file_info &p_source) |
double | get_length () const |
replaygain_info | get_replaygain () const |
const char * | info_enum_name (t_size p_index) const |
const char * | info_enum_value (t_size p_index) const |
t_size | info_get_count () const |
void | info_remove_mask (const bit_array &p_mask) |
t_size | info_set_ex (const char *p_name, t_size p_name_length, const char *p_value, t_size p_value_length) |
const char * | meta_enum_name (t_size p_index) const |
const char * | meta_enum_value (t_size p_index, t_size p_value_number) const |
t_size | meta_enum_value_count (t_size p_index) const |
t_size | meta_get_count () const |
void | meta_insert_value_ex (t_size p_index, t_size p_value_index, const char *p_value, t_size p_value_length) |
void | meta_modify_value_ex (t_size p_index, t_size p_value_index, const char *p_value, t_size p_value_length) |
void | meta_remove_mask (const bit_array &p_mask) |
void | meta_remove_values (t_size p_index, const bit_array &p_mask) |
void | meta_reorder (const t_size *p_order) |
t_size | meta_set_ex (const char *p_name, t_size p_name_length, const char *p_value, t_size p_value_length) |
const file_info_impl & | operator= (const file_info_impl &p_source) |
void | set_length (double p_length) |
void | set_replaygain (const replaygain_info &p_info) |
Public Member Functions inherited from file_info | |
t_size | __info_add_unsafe (const char *p_name, const char *p_value) |
t_size | __info_add_unsafe_ex (const char *p_name, t_size p_name_length, const char *p_value, t_size p_value_length) |
t_size | __meta_add_unsafe (const char *p_name, const char *p_value) |
t_size | __meta_add_unsafe_ex (const char *p_name, t_size p_name_length, const char *p_value, t_size p_value_length) |
void | _add_tag (const file_info &otherTag) |
void | _copy_meta_single_nocheck (const file_info &p_source, t_size p_index) |
void | _set_tag (const file_info &tag) |
bool | are_meta_fields_identical (t_size p_index1, t_size p_index2) const |
audio_chunk::spec_t | audio_chunk_spec () const |
virtual void | copy (const file_info &p_source) |
void | copy_info_single (const file_info &p_source, t_size p_index) |
void | copy_info_single_by_name (const file_info &p_source, const char *p_name) |
void | copy_info_single_by_name_ex (const file_info &p_source, const char *p_name, t_size p_name_length) |
void | copy_meta_single (const file_info &p_source, t_size p_index) |
void | copy_meta_single_by_name (const file_info &p_source, const char *p_name) |
void | copy_meta_single_by_name_ex (const file_info &p_source, const char *p_name, t_size p_name_length) |
void | copy_meta_single_rename (const file_info &p_source, t_size p_index, const char *p_new_name) |
void | copy_meta_single_rename_ex (const file_info &p_source, t_size p_index, const char *p_new_name, t_size p_new_name_length) |
void | from_mem (const void *memPtr, size_t memSize) |
void | from_stream (stream_reader *stream, abort_callback &abort) |
void | info_calculate_bitrate (t_filesize p_filesize, double p_length) |
bool | info_exists (const char *p_name) const |
bool | info_exists_ex (const char *p_name, t_size p_name_length) const |
t_size | info_find (const char *p_name) const |
virtual t_size | info_find_ex (const char *p_name, t_size p_name_length) const |
const char * | info_get (const char *p_name) const |
t_int64 | info_get_bitrate () const |
t_int64 | info_get_bitrate_vbr () const |
unsigned | info_get_decoded_bps () const |
const char * | info_get_ex (const char *p_name, t_size p_name_length) const |
double | info_get_float (const char *name) const |
t_int64 | info_get_int (const char *name) const |
t_int64 | info_get_length_samples () const |
uint32_t | info_get_wfx_chanMask () const |
bool | info_remove (const char *p_name) |
void | info_remove_all () |
bool | info_remove_ex (const char *p_name, t_size p_name_length) |
void | info_remove_index (t_size p_index) |
t_size | info_set (const char *p_name, const char *p_value) |
void | info_set_bitrate (t_int64 val) |
void | info_set_bitrate_vbr (t_int64 val) |
void | info_set_float (const char *name, double value, unsigned precision, bool force_sign=false, const char *unit=0) |
void | info_set_int (const char *name, t_int64 value) |
bool | info_set_replaygain (const char *p_name, const char *p_value) |
void | info_set_replaygain_album_gain (float value) |
void | info_set_replaygain_album_peak (float value) |
void | info_set_replaygain_auto (const char *p_name, const char *p_value) |
void | info_set_replaygain_auto_ex (const char *p_name, t_size p_name_len, const char *p_value, t_size p_value_len) |
bool | info_set_replaygain_ex (const char *p_name, t_size p_name_len, const char *p_value, t_size p_value_len) |
void | info_set_replaygain_track_gain (float value) |
void | info_set_replaygain_track_peak (float value) |
void | info_set_wfx_chanMask (uint32_t val) |
bool | is_encoding_lossy () const |
void | merge_fallback (const file_info &fallback) |
t_size | meta_add (const char *p_name, const char *p_value) |
t_size | meta_add_ex (const char *p_name, t_size p_name_length, const char *p_value, t_size p_value_length) |
void | meta_add_value (t_size p_index, const char *p_value) |
void | meta_add_value_ex (t_size p_index, const char *p_value, t_size p_value_length) |
t_size | meta_calc_total_value_count () const |
bool | meta_exists (const char *p_name) const |
bool | meta_exists_ex (const char *p_name, t_size p_name_length) const |
t_size | meta_find (const char *p_name) const |
virtual t_size | meta_find_ex (const char *p_name, t_size p_name_length) const |
bool | meta_format (const char *p_name, pfc::string_base &p_out, const char *separator=", ") const |
void | meta_format_entry (t_size index, pfc::string_base &p_out, const char *separator=", ") const |
const char * | meta_get (const char *p_name, t_size p_index) const |
t_size | meta_get_count_by_name (const char *p_name) const |
t_size | meta_get_count_by_name_ex (const char *p_name, t_size p_name_length) const |
const char * | meta_get_ex (const char *p_name, t_size p_name_length, t_size p_index) const |
void | meta_insert_value (t_size p_index, t_size p_value_index, const char *p_value) |
void | meta_modify_value (t_size p_index, t_size p_value_index, const char *p_value) |
void | meta_remove_all () |
void | meta_remove_field (const char *p_name) |
void | meta_remove_field_ex (const char *p_name, t_size p_name_length) |
void | meta_remove_index (t_size p_index) |
void | meta_remove_value (t_size p_index, t_size p_value) |
t_size | meta_set (const char *p_name, const char *p_value) |
const file_info & | operator= (const file_info &p_source) |
void | overwrite_info (const file_info &p_source) |
void | overwrite_meta (const file_info &p_source) |
void | reset () |
void | reset_replaygain () |
void | to_console () const |
void | to_formatter (pfc::string_formatter &) const |
void | to_stream (stream_writer *stream, abort_callback &abort) const |
Protected Member Functions | |
t_size | info_set_nocheck_ex (const char *p_name, t_size p_name_length, const char *p_value, t_size p_value_length) |
t_size | meta_set_nocheck_ex (const char *p_name, t_size p_name_length, const char *p_value, t_size p_value_length) |
Protected Member Functions inherited from file_info | |
file_info () | |
~file_info () | |
void | copy_info_single_by_name_nocheck (const file_info &p_source, const char *p_name) |
void | copy_info_single_by_name_nocheck_ex (const file_info &p_source, const char *p_name, t_size p_name_length) |
void | copy_info_single_nocheck (const file_info &p_source, t_size p_index) |
void | copy_meta_single_by_name_nocheck (const file_info &p_source, const char *p_name) |
void | copy_meta_single_by_name_nocheck_ex (const file_info &p_source, const char *p_name, t_size p_name_length) |
void | copy_meta_single_nocheck (const file_info &p_source, t_size p_index) |
t_size | info_set_nocheck (const char *p_name, const char *p_value) |
t_size | meta_set_nocheck (const char *p_name, const char *p_value) |
Private Attributes | |
file_info_impl_utils::info_storage | m_info |
double | m_length |
file_info_impl_utils::meta_storage | m_meta |
replaygain_info | m_replaygain |
Additional Inherited Members | |
Public Types inherited from file_info | |
typedef pfc::string::comparatorCaseInsensitiveASCII | field_name_comparator |
Static Public Member Functions inherited from file_info | |
static bool | field_is_person (const char *fieldName) |
static bool | field_is_title (const char *fieldName) |
static bool | field_name_equals (const char *n1, const char *n2) |
static bool | g_is_info_equal (const file_info &p_item1, const file_info &p_item2) |
static bool | g_is_meta_equal (const file_info &p_item1, const file_info &p_item2) |
static bool | g_is_meta_equal_debug (const file_info &p_item1, const file_info &p_item2) |
static bool | g_is_valid_field_name (const char *p_name, t_size p_length=pfc_infinite) |
Implements file_info.
Definition at line 93 of file file_info_impl.h.
file_info_impl::file_info_impl | ( | const file_info_impl & | p_source | ) |
Definition at line 94 of file file_info_impl.cpp.
file_info_impl::file_info_impl | ( | const file_info & | p_source | ) |
Definition at line 89 of file file_info_impl.cpp.
file_info_impl::file_info_impl | ( | ) |
Definition at line 105 of file file_info_impl.cpp.
file_info_impl::~file_info_impl | ( | ) |
Definition at line 138 of file file_info_impl.cpp.
|
virtual |
Copies technical info from specified file_info object.
Reimplemented from file_info.
Definition at line 217 of file file_info_impl.cpp.
|
virtual |
Copies metadata from specified file_info object.
Reimplemented from file_info.
Definition at line 212 of file file_info_impl.cpp.
|
virtual |
Retrieves audio duration, in seconds.
Note that the reported duration should not be assumed to be the exact length of the track -
with many popular audio formats, exact duration is impossible to determine without performing a full decode pass;
with other formats, the decoded data may be shorter than reported due to truncation other damage.
Implements file_info.
Definition at line 110 of file file_info_impl.cpp.
|
virtual |
Retrieves ReplayGain information.
Implements file_info.
Definition at line 125 of file file_info_impl.cpp.
|
virtual |
Retrieves the name of specified technical info entry. Return value is a null-terminated UTF-8 encoded string.
Implements file_info.
Definition at line 62 of file file_info_impl.cpp.
|
virtual |
Retrieves the value of specified technical info entry. Return value is a null-terminated UTF-8 encoded string.
Implements file_info.
Definition at line 67 of file file_info_impl.cpp.
|
virtual |
Retrieves number of technical info entries.
Implements file_info.
Definition at line 57 of file file_info_impl.cpp.
|
virtual |
Removes technical info entries indicated by specified bit mask.
Implements file_info.
Definition at line 83 of file file_info_impl.cpp.
|
virtual |
Creates a new technical info entry with specified name and specified value. If an entry of the same name already exists, it is erased. Return value is the index of newly created entry.
Implements file_info.
Definition at line 72 of file file_info_impl.cpp.
|
protectedvirtual |
Implements file_info.
Definition at line 78 of file file_info_impl.cpp.
|
virtual |
Retrieves the name of metadata entry of specified index. Return value is a null-terminated UTF-8 encoded string.
Implements file_info.
Definition at line 9 of file file_info_impl.cpp.
|
virtual |
Retrieves specified value from specified metadata entry. Return value is a null-terminated UTF-8 encoded string.
Implements file_info.
Definition at line 19 of file file_info_impl.cpp.
Retrieves count of values in metadata entry of specified index. The value is always equal to or greater than 1.
Implements file_info.
Definition at line 14 of file file_info_impl.cpp.
|
virtual |
Retrieves count of metadata entries.
Implements file_info.
Definition at line 4 of file file_info_impl.cpp.
|
virtual |
Inserts a new value into specified metadata entry.
Implements file_info.
Definition at line 35 of file file_info_impl.cpp.
|
virtual |
Alters specified value in specified metadata entry.
Implements file_info.
Definition at line 120 of file file_info_impl.cpp.
|
virtual |
Removes metadata entries according to specified bit mask.
Implements file_info.
Definition at line 40 of file file_info_impl.cpp.
Removes values according to specified bit mask from specified metadata entry. If all values are removed, entire metadata entry is removed as well.
Implements file_info.
Definition at line 50 of file file_info_impl.cpp.
|
virtual |
Reorders metadata entries according to specified permutation.
Implements file_info.
Definition at line 45 of file file_info_impl.cpp.
|
virtual |
Creates a new metadata entry of specified name with specified value. If an entry of same name already exists, it is erased. Return value is the index of newly created metadata entry.
Implements file_info.
Definition at line 24 of file file_info_impl.cpp.
|
protectedvirtual |
Implements file_info.
Definition at line 30 of file file_info_impl.cpp.
const file_info_impl & file_info_impl::operator= | ( | const file_info_impl & | p_source | ) |
Definition at line 99 of file file_info_impl.cpp.
|
virtual |
Sets audio duration, in seconds.
Note that the reported duration should not be assumed to be the exact length of the track -
with many popular audio formats, exact duration is impossible to determine without performing a full decode pass;
with other formats, the decoded data may be shorter than reported due to truncation other damage.
Implements file_info.
Definition at line 115 of file file_info_impl.cpp.
|
virtual |
Sets ReplayGain information.
Implements file_info.
Definition at line 130 of file file_info_impl.cpp.
|
private |
Definition at line 136 of file file_info_impl.h.
|
private |
Definition at line 139 of file file_info_impl.h.
|
private |
Definition at line 135 of file file_info_impl.h.
|
private |
Definition at line 141 of file file_info_impl.h.