17 template<
typename t_value>
void operator() (
const char * p_name,
const t_value & p_value) {
19 for(
typename t_value::const_iterator iter = p_value.first(); iter.is_valid(); ++iter) {
48 for(
t_size infowalk = 0, infocount = p_info.
info_get_count(); infowalk < infocount; ++infowalk) {
53 for(
t_size metawalk = 0, metacount = p_info.
meta_get_count(); metawalk < metacount; ++metawalk) {
58 for(
t_size valuewalk = 0; valuewalk < valuecount; ++valuewalk) {
69 template<
typename t_source>
73 template<
typename t_source>
91 for(
t_size walk = 0; walk < count; ++walk) {
97 void meta_set(
const char * p_name,
const char * p_value) {
160 void parse(
const char *p_cuesheet,t_cue_entry_list & p_out);
195 template<
typename t_base>
202 m_impl.open( p_filehint, p_path, p_reason, p_abort );
204 m_impl.get_info(info,p_abort);
217 if (p_subsong == 0) {
227 if (p_subsong == 0) {
228 m_impl.decode_initialize(p_flags, p_abort);
231 double start, length;
233 unsigned flags2 = p_flags;
234 if (start > 0) flags2 &= ~input_flag_no_seeking;
235 m_impl.decode_initialize(flags2, p_abort);
236 m_impl.decode_seek(start, p_abort);
242 return _run(p_chunk, NULL, p_abort);
254 return _run(p_chunk, &p_raw, p_abort);
261 return m_impl.decode_get_dynamic_info(p_out, p_timestamp_delta);
265 return m_impl.decode_get_dynamic_info_track(p_out, p_timestamp_delta);
269 m_impl.decode_on_idle(p_abort);
273 if (p_subsong == 0) {
283 m_impl.retag(pfc::implicit_cast<const file_info&>(info), p_abort);
285 m_impl.get_info(info, p_abort);
289 inline static bool g_is_our_content_type(
const char * p_content_type) {
return t_base::g_is_our_content_type(p_content_type);}
290 inline static bool g_is_our_path(
const char * p_path,
const char * p_extension) {
return t_base::g_is_our_path(p_path,p_extension);}
296 if (!
m_impl.decode_run(chunk, aborter))
return false;
298 if (!
m_impl.decode_run_raw(chunk, *raw, aborter))
return false;
304 if (remaining < samplesGot) {
306 if (remaining == 0) {
313 PFC_ASSERT( rawSize % samplesGot == 0 );
353 double offset_acc = pregap;
358 entry->m_infos = p_list.
get_info(n);
359 entry->m_file =
"CDImage.wav";
360 entry->m_track_number = (unsigned)(n+1);
361 entry->m_index_list.from_infos(entry->m_infos,offset_acc);
362 if (n == 0) entry->m_index_list.m_positions[0] = 0;
363 offset_acc += entry->m_infos.get_length();
387 for(
t_uint32 walk = 0; walk < total; ++walk) {
404 template<
typename t_input_impl,
unsigned t_flags = 0>
virtual void set_size(t_size p_size)=0
replaygain_info get_replaygain() const
__file_info_record__info__enumerator(file_info &p_out)
virtual double get_length() const =0
Retrieves audio duration, in seconds. Note that the reported duration should not be assumed to be th...
void operator()(const char *p_name, const char *p_value)
pfc::chain_list_v2_t< cue_entry > t_cue_entry_list
void add_item(const t_source &p_source)
void meta_set(const char *p_name, const char *p_value)
void set_single(const t_source &p_item)
Interface for object storing list of chapters.
void enumerate(t_callback &p_callback) const
t_cuesheet_index_list m_index_list
void merge_overwrite(const file_info &p_info)
void from_info(const file_info &p_info)
service_factory_single_t< cue_parser::chapterizer_impl_t< t_input_impl > > m_chapterizer_factory
void set_replaygain(const replaygain_info &p_replaygain)
void set_chapters(const char *p_path, chapter_list const &p_list, abort_callback &p_abort)
Writes new chapter list to specified file.
void info(const char *p_message)
This service implements chapter list editing operations for various file formats, e...
bool is_our_path(const char *p_path)
Tests whether specified path is supported by this implementation.
unsigned get_sample_rate() const
Helper, same as get_srate().
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...
double get_length() const
virtual const file_info & get_info(t_size p_chapter) const =0
Queries description of specified chapter.
virtual void set_info(t_size p_chapter, const file_info &p_info)=0
Modifies description of specified chapter.
Differences between chain_list_v2_t<> and old chain_list_t<>: Iterators pointing to removed items as...
Interface to container of a chunk of audio data. See audio_chunk_impl for an implementation.
pfc::map_t< pfc::string8, t_meta_value, file_info::field_name_comparator > t_meta_map
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...
file_info_record_helper::file_info_record m_info
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...
static const replaygain_info replaygain_info_invalid
const t_meta_value * meta_query_ptr(const char *p_name) const
void meta_add_value(t_size p_index, const char *p_value)
Structure containing ReplayGain scan results from some playable object, also providing various helper...
void transfer_meta_entry(const char *p_name, const file_info &p_info, t_size p_index)
void overwrite_meta(const t_source &p_meta)
t_size __meta_add_unsafe(const char *p_name, const char *p_value)
Unsafe - does not check whether the field already exists and will result in duplicates if it does - c...
void enumerate_meta(t_callback &p_callback)
t_storage_value & find_or_add(_t_key const &p_key)
Main interface class for information about some playable object.
t_cuesheet_index_list m_indexes
void get_chapters(const char *p_path, chapter_list &p_list, abort_callback &p_abort)
Retrieves chapter list from specified file.
const t_storage_value * query_ptr(const _t_key &p_key) const
void overwrite_info(const t_source &p_info)
string8_fastalloc string_formatter
virtual void set_chapter_count(t_size p_count)=0
Sets number of chapters.
virtual t_size meta_get_count() const =0
Retrieves count of metadata entries.
bool remove(const _t_key &p_key)
void parse(const char *p_cuesheet, t_cue_entry_list &p_out)
Throws exception_bad_cuesheet on failure.
t_size __info_add_unsafe(const char *p_name, const char *p_value)
Unsafe - does not check whether the field already exists and will result in duplicates if it does - c...
replaygain_info m_replaygain
void enumerate_meta(t_callback &p_callback) const
virtual t_size get_chapter_count() const =0
Returns number of chapters.
virtual double get_pregap() const =0
virtual void set_replaygain(const replaygain_info &p_info)=0
Sets ReplayGain information.
PFC_DECLARE_EXCEPTION(exception_bad_cuesheet, exception_io_data,"Invalid cuesheet")
void set_length(double p_length)
input_factory_ex_t< cue_parser::input_wrapper_cue_t< t_input_impl >, t_flags, input_decoder_v2 > m_input_factory
void from_info_overwrite_info(const file_info &p_info)
void create(pfc::string_formatter &p_out, const t_entry_list &p_data)
pfc::chain_list_v2_t< pfc::string8 > t_meta_value
void set(const _t_key &p_key, const _t_value &p_value)
static replaygain_info g_merge(replaygain_info r1, replaygain_info r2)
pfc::map_t< unsigned, track_record > track_record_list
void overwrite(const t_source &p_source)
pfc::map_t< pfc::string8, pfc::string8, file_info::field_name_comparator > t_info_map
void from_info_overwrite_meta(const file_info &p_info)
void from_info_overwrite_rg(const file_info &p_info)
void parse_full(const char *p_cuesheet, cue_creator::t_entry_list &p_out)
Throws exception_bad_cuesheet on failure.
void from_info_set_meta(const file_info &p_info)
t_size meta_set(const char *p_name, const char *p_value)
void parse_info(const char *p_cuesheet, file_info &p_info, unsigned p_index)
Throws exception_bad_cuesheet on failure.
Generic interface for a memory block; used by various other interfaces to return memory blocks while ...
virtual replaygain_info get_replaygain() const =0
Retrieves ReplayGain information.
double get_duration() const
Retrieves duration of contained audio data, in seconds.
t_uint64 time_to_samples(double p_time, t_uint32 p_sample_rate)
virtual t_size get_sample_count() const =0
Retrieves number of valid samples in the buffer. Note that a "sample" means a unit of interleaved PC...
virtual void set_sample_count(t_size val)=0
Sets number of valid samples in the buffer. WARNING: sample count * channel count should never be abo...
virtual t_size get_size() const =0
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 void set_length(double p_length)=0
Sets audio duration, in seconds. Note that the reported duration should not be assumed to be the exa...
virtual t_size info_get_count() const =0
Retrieves number of technical info entries.
void to_info(file_info &p_info) const
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...