foobar2000 SDK  2015-08-03
Data Structures | Public Types | Public Member Functions | Private Member Functions | Private Attributes
file_info_const_impl

#include <file_info_const_impl.h>

+ Inheritance diagram for file_info_const_impl:

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_imploperator= (const file_info &p_source)
 
const file_info_const_imploperator= (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_infooperator= (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_indexm_hintmap
 
const info_entrym_info
 
t_index m_info_count
 
double m_length
 
const meta_entrym_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)
 

Detailed Description

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.


Data Structure Documentation

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

Member Typedef Documentation

Definition at line 61 of file file_info_const_impl.h.

Member Enumeration Documentation

anonymous enum
Enumerator
hintmap_cutoff 

Definition at line 62 of file file_info_const_impl.h.

Constructor & Destructor Documentation

file_info_const_impl::file_info_const_impl ( const file_info p_source)
inline

Definition at line 7 of file file_info_const_impl.h.

7 {copy(p_source);}
void copy(const file_info &p_source)
Copies entire file_info contents from specified file_info object.
file_info_const_impl::file_info_const_impl ( const file_info_const_impl p_source)
inline

Definition at line 8 of file file_info_const_impl.h.

8 {copy(p_source);}
void copy(const file_info &p_source)
Copies entire file_info contents from specified file_info object.
file_info_const_impl::file_info_const_impl ( )
inline

Member Function Documentation

void file_info_const_impl::copy ( const file_info p_source)
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.

99 {
100 // profiler(file_info_const_impl__copy);
101  t_size meta_size = 0;
102  t_size info_size = 0;
103  t_size valuemap_size = 0;
104  t_size stringbuffer_size = 0;
105 #ifdef __file_info_const_impl_have_hintmap__
106  t_size hintmap_size = 0;
107 #endif
108 
109  const char * optbuf[64];
110  size_t optwalk = 0;
111 
112  {
113 // profiler(file_info_const_impl__copy__pass1);
114  t_size index;
115  m_meta_count = pfc::downcast_guarded<t_index>(p_source.meta_get_count());
116  meta_size = m_meta_count * sizeof(meta_entry);
117 #ifdef __file_info_const_impl_have_hintmap__
118  hintmap_size = (m_meta_count > hintmap_cutoff) ? m_meta_count * sizeof(t_index) : 0;
119 #endif//__file_info_const_impl_have_hintmap__
120  for(index = 0; index < m_meta_count; index++ )
121  {
122  {
123  const char * name = p_source.meta_enum_name(index);
124  const char * opt = optimize_fieldname(name);
125  if (optwalk < _countof(optbuf)) optbuf[optwalk++] = opt;
126  if (opt == NULL) stringbuffer_size += strlen(name) + 1;
127  }
128 
129  t_size val; const t_size val_max = p_source.meta_enum_value_count(index);
130 
131  if (val_max == 1)
132  {
133  stringbuffer_size += strlen(p_source.meta_enum_value(index,0)) + 1;
134  }
135  else
136  {
137  valuemap_size += val_max * sizeof(char*);
138 
139  for(val = 0; val < val_max; val++ )
140  {
141  stringbuffer_size += strlen(p_source.meta_enum_value(index,val)) + 1;
142  }
143  }
144  }
145 
146  m_info_count = pfc::downcast_guarded<t_index>(p_source.info_get_count());
147  info_size = m_info_count * sizeof(info_entry);
148  for(index = 0; index < m_info_count; index++ )
149  {
150  const char * name = p_source.info_enum_name(index);
151  const char * opt = optimize_infoname(name);
152  if (optwalk < _countof(optbuf)) optbuf[optwalk++] = opt;
153  if (opt == NULL) stringbuffer_size += strlen(name) + 1;
154  stringbuffer_size += strlen(p_source.info_enum_value(index)) + 1;
155  }
156  }
157 
158 
159  {
160 // profiler(file_info_const_impl__copy__alloc);
162 #ifdef __file_info_const_impl_have_hintmap__
163  hintmap_size +
164 #endif
165  meta_size + info_size + valuemap_size + stringbuffer_size);
166  }
167 
168  char * walk = m_buffer.get_ptr();
169 
170 #ifdef __file_info_const_impl_have_hintmap__
171  t_index* hintmap = (hintmap_size > 0) ? (t_index*) walk : NULL;
172  walk += hintmap_size;
173 #endif
174  meta_entry * meta = (meta_entry*) walk;
175  walk += meta_size;
176  char ** valuemap = (char**) walk;
177  walk += valuemap_size;
178  info_entry * info = (info_entry*) walk;
179  walk += info_size;
180  char * stringbuffer = walk;
181 
182  m_meta = meta;
183  m_info = info;
184 #ifdef __file_info_const_impl_have_hintmap__
185  m_hintmap = hintmap;
186 #endif
187 
188  optwalk = 0;
189  {
190 // profiler(file_info_const_impl__copy__pass2);
191  t_size index;
192  for( index = 0; index < m_meta_count; index ++ )
193  {
194  t_size val; const t_size val_max = p_source.meta_enum_value_count(index);
195 
196  {
197  const char * name = p_source.meta_enum_name(index);
198  const char * name_opt;
199 
200  if (optwalk < _countof(optbuf)) name_opt = optbuf[optwalk++];
201  else name_opt = optimize_fieldname(name);
202 
203  if (name_opt == NULL)
204  meta[index].m_name = stringbuffer_append(stringbuffer, name );
205  else
206  meta[index].m_name = name_opt;
207  }
208 
209  meta[index].m_valuecount = val_max;
210 
211  if (val_max == 1)
212  {
213  meta[index].m_valuemap = reinterpret_cast<const char * const *>(stringbuffer_append(stringbuffer, p_source.meta_enum_value(index,0) ));
214  }
215  else
216  {
217  meta[index].m_valuemap = valuemap;
218  for( val = 0; val < val_max ; val ++ )
219  *(valuemap ++ ) = stringbuffer_append(stringbuffer, p_source.meta_enum_value(index,val) );
220  }
221  }
222 
223  for( index = 0; index < m_info_count; index ++ )
224  {
225  const char * name = p_source.info_enum_name(index);
226  const char * name_opt;
227 
228  if (optwalk < _countof(optbuf)) name_opt = optbuf[optwalk++];
229  else name_opt = optimize_infoname(name);
230 
231  if (name_opt == NULL)
232  info[index].m_name = stringbuffer_append(stringbuffer, name );
233  else
234  info[index].m_name = name_opt;
235  info[index].m_value = stringbuffer_append(stringbuffer, p_source.info_enum_value(index) );
236  }
237  }
238 
239  m_length = p_source.get_length();
240  m_replaygain = p_source.get_replaygain();
241 #ifdef __file_info_const_impl_have_hintmap__
242  if (hintmap != NULL) {
243 // profiler(file_info_const_impl__copy__hintmap);
244  for(t_size n=0;n<m_meta_count;n++) hintmap[n]=n;
245  pfc::sort(sort_callback_hintmap_impl(meta,hintmap),m_meta_count);
246  }
247 #endif//__file_info_const_impl_have_hintmap__
248 }
void sort(pfc::sort_callback &p_callback, t_size p_num)
Definition: sort.cpp:225
virtual double get_length() const =0
Retrieves audio duration, in seconds. Note that the reported duration should not be assumed to be th...
const t_item * get_ptr() const
Definition: array.h:213
const info_entry * m_info
void info(const char *p_message)
Definition: console.cpp:4
virtual t_size meta_enum_value_count(t_size p_index) const =0
Retrieves count of values in metadata entry of specified index. The value is always equal to or great...
virtual const char * info_enum_value(t_size p_index) const =0
Retrieves the value of specified technical info entry. Return value is a null-terminated UTF-8 encode...
virtual const char * meta_enum_value(t_size p_index, t_size p_value_number) const =0
Retrieves specified value from specified metadata entry. Return value is a null-terminated UTF-8 enco...
pfc::array_t< char > m_buffer
const meta_entry * m_meta
replaygain_info m_replaygain
size_t t_size
Definition: int_types.h:48
void set_size(t_size p_size)
Definition: array.h:104
static char * stringbuffer_append(char *&buffer, const char *value)
static const char * optimize_infoname(const char *p_string)
virtual t_size meta_get_count() const =0
Retrieves count of metadata entries.
static const char * optimize_fieldname(const char *p_string)
virtual replaygain_info get_replaygain() const =0
Retrieves ReplayGain information.
virtual const char * info_enum_name(t_size p_index) const =0
Retrieves the name of specified technical info entry. Return value is a null-terminated UTF-8 encoded...
virtual t_size info_get_count() const =0
Retrieves number of technical info entries.
virtual const char * meta_enum_name(t_size p_index) const =0
Retrieves the name of metadata entry of specified index. Return value is a null-terminated UTF-8 enco...
double file_info_const_impl::get_length ( ) const
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.

11 {return m_length;}
replaygain_info file_info_const_impl::get_replaygain ( ) const
inlinevirtual

Retrieves ReplayGain information.

Implements file_info.

Definition at line 29 of file file_info_const_impl.h.

29 {return m_replaygain;}
replaygain_info m_replaygain
const char* file_info_const_impl::info_enum_name ( t_size  p_index) const
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.

20 {return m_info[p_index].m_name;}
const info_entry * m_info
const char* file_info_const_impl::info_enum_value ( t_size  p_index) const
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.

21 {return m_info[p_index].m_value;}
const info_entry * m_info
t_size file_info_const_impl::info_get_count ( ) const
inlinevirtual

Retrieves number of technical info entries.

Implements file_info.

Definition at line 19 of file file_info_const_impl.h.

19 {return m_info_count;}
void file_info_const_impl::info_remove_mask ( const bit_array p_mask)
inlineprivatevirtual

Removes technical info entries indicated by specified bit mask.

Implements file_info.

Definition at line 42 of file file_info_const_impl.h.

42 {uBugCheck();}
PFC_NORETURN void SHARED_EXPORT uBugCheck()
t_size file_info_const_impl::info_set_ex ( const char *  p_name,
t_size  p_name_length,
const char *  p_value,
t_size  p_value_length 
)
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.

41 {uBugCheck();}
PFC_NORETURN void SHARED_EXPORT uBugCheck()
t_size file_info_const_impl::info_set_nocheck_ex ( const char *  p_name,
t_size  p_name_length,
const char *  p_value,
t_size  p_value_length 
)
inlineprivatevirtual

Implements file_info.

Definition at line 47 of file file_info_const_impl.h.

47 {uBugCheck();}
PFC_NORETURN void SHARED_EXPORT uBugCheck()
const char* file_info_const_impl::meta_enum_name ( t_size  p_index) const
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.

14 {return m_meta[p_index].m_name;}
const meta_entry * m_meta
const char * file_info_const_impl::meta_enum_value ( t_size  p_index,
t_size  p_value_number 
) const
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.

278 {
279  const meta_entry & entry = m_meta[p_index];
280  if (entry.m_valuecount == 1)
281  return reinterpret_cast<const char*>(entry.m_valuemap);
282  else
283  return entry.m_valuemap[p_value_number];
284 }
const meta_entry * m_meta
t_size file_info_const_impl::meta_enum_value_count ( t_size  p_index) const
virtual

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.

273 {
274  return m_meta[p_index].m_valuecount;
275 }
const meta_entry * m_meta
t_size file_info_const_impl::meta_find_ex ( const char *  p_name,
t_size  p_name_length 
) const
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.

257 {
258 #ifdef __file_info_const_impl_have_hintmap__
259  if (m_hintmap != NULL) {
260  t_size result = ~0;
261  if (!pfc::bsearch_inline_t(m_meta_count,bsearch_callback_hintmap_impl(m_meta,m_hintmap,p_name,p_name_length),result)) return ~0;
262  else return m_hintmap[result];
263  } else {
264  return file_info::meta_find_ex(p_name,p_name_length);
265  }
266 #else
267  return file_info::meta_find_ex(p_name,p_name_length);
268 #endif
269 }
const meta_entry * m_meta
bool bsearch_inline_t(t_size p_count, const t_callback &p_callback, t_size &p_result)
Definition: bsearch_inline.h:6
size_t t_size
Definition: int_types.h:48
virtual t_size meta_find_ex(const char *p_name, t_size p_name_length) const
Finds index of metadata entry of specified name. Returns infinite when not found. ...
Definition: file_info.cpp:8
t_size file_info_const_impl::meta_get_count ( ) const
inlinevirtual

Retrieves count of metadata entries.

Implements file_info.

Definition at line 13 of file file_info_const_impl.h.

13 {return m_meta_count;}
void file_info_const_impl::meta_insert_value_ex ( t_size  p_index,
t_size  p_value_index,
const char *  p_value,
t_size  p_value_length 
)
inlineprivatevirtual

Inserts a new value into specified metadata entry.

Implements file_info.

Definition at line 35 of file file_info_const_impl.h.

35 {uBugCheck();}
PFC_NORETURN void SHARED_EXPORT uBugCheck()
void file_info_const_impl::meta_modify_value_ex ( t_size  p_index,
t_size  p_value_index,
const char *  p_value,
t_size  p_value_length 
)
inlineprivatevirtual

Alters specified value in specified metadata entry.

Implements file_info.

Definition at line 39 of file file_info_const_impl.h.

39 {uBugCheck();}
PFC_NORETURN void SHARED_EXPORT uBugCheck()
void file_info_const_impl::meta_remove_mask ( const bit_array p_mask)
inlineprivatevirtual

Removes metadata entries according to specified bit mask.

Implements file_info.

Definition at line 36 of file file_info_const_impl.h.

36 {uBugCheck();}
PFC_NORETURN void SHARED_EXPORT uBugCheck()
void file_info_const_impl::meta_remove_values ( t_size  p_index,
const bit_array p_mask 
)
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.

38 {uBugCheck();}
PFC_NORETURN void SHARED_EXPORT uBugCheck()
void file_info_const_impl::meta_reorder ( const t_size p_order)
inlineprivatevirtual

Reorders metadata entries according to specified permutation.

Implements file_info.

Definition at line 37 of file file_info_const_impl.h.

37 {uBugCheck();}
PFC_NORETURN void SHARED_EXPORT uBugCheck()
t_size file_info_const_impl::meta_set_ex ( const char *  p_name,
t_size  p_name_length,
const char *  p_value,
t_size  p_value_length 
)
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.

34 {uBugCheck();}
PFC_NORETURN void SHARED_EXPORT uBugCheck()
t_size file_info_const_impl::meta_set_nocheck_ex ( const char *  p_name,
t_size  p_name_length,
const char *  p_value,
t_size  p_value_length 
)
inlineprivatevirtual

Implements file_info.

Definition at line 46 of file file_info_const_impl.h.

46 {uBugCheck();}
PFC_NORETURN void SHARED_EXPORT uBugCheck()
const file_info_const_impl& file_info_const_impl::operator= ( const file_info p_source)
inline

Definition at line 24 of file file_info_const_impl.h.

24 {copy(p_source); return *this;}
void copy(const file_info &p_source)
Copies entire file_info contents from specified file_info object.
const file_info_const_impl& file_info_const_impl::operator= ( const file_info_const_impl p_source)
inline

Definition at line 25 of file file_info_const_impl.h.

25 {copy(p_source); return *this;}
void copy(const file_info &p_source)
Copies entire file_info contents from specified file_info object.
void file_info_const_impl::reset ( )
void file_info_const_impl::set_length ( double  p_length)
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.

32 {uBugCheck();}
PFC_NORETURN void SHARED_EXPORT uBugCheck()
void file_info_const_impl::set_replaygain ( const replaygain_info p_info)
inlineprivatevirtual

Sets ReplayGain information.

Implements file_info.

Definition at line 44 of file file_info_const_impl.h.

44 {uBugCheck();}
PFC_NORETURN void SHARED_EXPORT uBugCheck()

Field Documentation

pfc::array_t<char> file_info_const_impl::m_buffer
private

Definition at line 65 of file file_info_const_impl.h.

const t_index* file_info_const_impl::m_hintmap
private

Definition at line 73 of file file_info_const_impl.h.

const info_entry* file_info_const_impl::m_info
private

Definition at line 70 of file file_info_const_impl.h.

t_index file_info_const_impl::m_info_count
private

Definition at line 67 of file file_info_const_impl.h.

double file_info_const_impl::m_length
private

Definition at line 76 of file file_info_const_impl.h.

const meta_entry* file_info_const_impl::m_meta
private

Definition at line 69 of file file_info_const_impl.h.

t_index file_info_const_impl::m_meta_count
private

Definition at line 66 of file file_info_const_impl.h.

replaygain_info file_info_const_impl::m_replaygain
private

Definition at line 77 of file file_info_const_impl.h.


The documentation for this class was generated from the following files: