foobar2000 SDK
2015-08-03
|
#include <file_info_const_impl.h>
Data Structures | |
struct | info_entry |
struct | meta_entry |
Public Types | |
enum | { hintmap_cutoff = 20 } |
typedef t_uint32 | t_index |
Public Types inherited from file_info | |
typedef pfc::string::comparatorCaseInsensitiveASCII | field_name_comparator |
Public Member Functions | |
file_info_const_impl (const file_info &p_source) | |
file_info_const_impl (const file_info_const_impl &p_source) | |
file_info_const_impl () | |
void | copy (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 |
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_find_ex (const char *p_name, t_size p_name_length) const |
t_size | meta_get_count () const |
const file_info_const_impl & | operator= (const file_info &p_source) |
const file_info_const_impl & | operator= (const file_info_const_impl &p_source) |
void | reset () |
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_info (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) |
virtual void | copy_meta (const file_info &p_source) |
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 |
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 |
Private Member Functions | |
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) |
t_size | info_set_nocheck_ex (const char *p_name, t_size p_name_length, const char *p_value, t_size p_value_length) |
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) |
t_size | meta_set_nocheck_ex (const char *p_name, t_size p_name_length, const char *p_value, t_size p_value_length) |
void | set_length (double p_length) |
void | set_replaygain (const replaygain_info &p_info) |
Private Attributes | |
pfc::array_t< char > | m_buffer |
const t_index * | m_hintmap |
const info_entry * | m_info |
t_index | m_info_count |
double | m_length |
const meta_entry * | m_meta |
t_index | m_meta_count |
replaygain_info | m_replaygain |
Additional Inherited Members | |
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) |
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) |
Special implementation of file_info that implements only const and copy methods. The difference between this and regular file_info_impl is amount of resources used and speed of the copy operation.
Definition at line 4 of file file_info_const_impl.h.
struct file_info_const_impl::info_entry |
Definition at line 55 of file file_info_const_impl.h.
Data Fields | ||
---|---|---|
const char * | m_name | |
const char * | m_value |
struct file_info_const_impl::meta_entry |
Definition at line 49 of file file_info_const_impl.h.
Data Fields | ||
---|---|---|
const char * | m_name | |
t_size | m_valuecount | |
const char *const * | m_valuemap |
Definition at line 61 of file file_info_const_impl.h.
anonymous enum |
|
inline |
Definition at line 7 of file file_info_const_impl.h.
|
inline |
Definition at line 8 of file file_info_const_impl.h.
|
inline |
Definition at line 9 of file file_info_const_impl.h.
|
virtual |
Copies entire file_info contents from specified file_info object.
Reimplemented from file_info.
Definition at line 98 of file file_info_const_impl.cpp.
|
inlinevirtual |
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 11 of file file_info_const_impl.h.
|
inlinevirtual |
Retrieves ReplayGain information.
Implements file_info.
Definition at line 29 of file file_info_const_impl.h.
|
inlinevirtual |
Retrieves the name of specified technical info entry. Return value is a null-terminated UTF-8 encoded string.
Implements file_info.
Definition at line 20 of file file_info_const_impl.h.
|
inlinevirtual |
Retrieves the value of specified technical info entry. Return value is a null-terminated UTF-8 encoded string.
Implements file_info.
Definition at line 21 of file file_info_const_impl.h.
|
inlinevirtual |
Retrieves number of technical info entries.
Implements file_info.
Definition at line 19 of file file_info_const_impl.h.
|
inlineprivatevirtual |
Removes technical info entries indicated by specified bit mask.
Implements file_info.
Definition at line 42 of file file_info_const_impl.h.
|
inlineprivatevirtual |
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 41 of file file_info_const_impl.h.
|
inlineprivatevirtual |
Implements file_info.
Definition at line 47 of file file_info_const_impl.h.
|
inlinevirtual |
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 14 of file file_info_const_impl.h.
|
virtual |
Retrieves specified value from specified metadata entry. Return value is a null-terminated UTF-8 encoded string.
Implements file_info.
Definition at line 277 of file file_info_const_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 272 of file file_info_const_impl.cpp.
|
virtual |
Finds index of metadata entry of specified name. Returns infinite when not found.
Reimplemented from file_info.
Definition at line 256 of file file_info_const_impl.cpp.
|
inlinevirtual |
Retrieves count of metadata entries.
Implements file_info.
Definition at line 13 of file file_info_const_impl.h.
|
inlineprivatevirtual |
Inserts a new value into specified metadata entry.
Implements file_info.
Definition at line 35 of file file_info_const_impl.h.
|
inlineprivatevirtual |
Alters specified value in specified metadata entry.
Implements file_info.
Definition at line 39 of file file_info_const_impl.h.
|
inlineprivatevirtual |
Removes metadata entries according to specified bit mask.
Implements file_info.
Definition at line 36 of file file_info_const_impl.h.
|
inlineprivatevirtual |
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 38 of file file_info_const_impl.h.
|
inlineprivatevirtual |
Reorders metadata entries according to specified permutation.
Implements file_info.
Definition at line 37 of file file_info_const_impl.h.
|
inlineprivatevirtual |
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 34 of file file_info_const_impl.h.
|
inlineprivatevirtual |
Implements file_info.
Definition at line 46 of file file_info_const_impl.h.
|
inline |
Definition at line 24 of file file_info_const_impl.h.
|
inline |
Definition at line 25 of file file_info_const_impl.h.
void file_info_const_impl::reset | ( | ) |
Definition at line 251 of file file_info_const_impl.cpp.
|
inlineprivatevirtual |
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 32 of file file_info_const_impl.h.
|
inlineprivatevirtual |
Sets ReplayGain information.
Implements file_info.
Definition at line 44 of file file_info_const_impl.h.
|
private |
Definition at line 65 of file file_info_const_impl.h.
|
private |
Definition at line 73 of file file_info_const_impl.h.
|
private |
Definition at line 70 of file file_info_const_impl.h.
|
private |
Definition at line 67 of file file_info_const_impl.h.
|
private |
Definition at line 76 of file file_info_const_impl.h.
|
private |
Definition at line 69 of file file_info_const_impl.h.
|
private |
Definition at line 66 of file file_info_const_impl.h.
|
private |
Definition at line 77 of file file_info_const_impl.h.