18 instance->set_size(p_bytes);
19 memcpy(instance->
get_ptr(),p_buffer,p_bytes);
25 instance->from_stream(p_stream,p_bytes,p_abort);
41 if (!
m_content.query(p_what,temp))
throw exception_album_art_not_found();
45 bool remove(
const GUID & p_what) {
60 bool is_our_path(
const char * p_path,
const char * p_extension) {
61 return m_extensions.have_item(p_extension);
67 if (l_file.is_empty()) filesystem::g_open_read(l_file, p_path, p_abort);
82 bool is_our_path(
const char * p_path,
const char * p_extension) {
83 return m_extensions.have_item(p_extension);
89 if (l_file.is_empty()) filesystem::g_open(l_file, p_path, filesystem::open_mode_write_existing, p_abort);
103 const t_fileref ref = {p_offset, p_size};
104 m_data.set(p_what, ref);
105 m_cache.remove(p_what);
109 return m_data.have_item(p_what);
114 if (m_cache.query(p_what,item))
return item;
116 if (!m_data.query(p_what, ref))
throw exception_album_art_not_found();
117 m_file->seek(ref.
m_offset, p_abort);
119 m_cache.set(p_what, item);
122 bool is_empty()
const {
return m_data.get_count() == 0;}
void list_to_array(t_array &p_array, const t_list &p_list)
service_ptr_t< file > file_ptr
static album_art_data_ptr g_create(stream_reader *p_stream, t_size p_bytes, abort_callback &p_abort)
Creates an album_art_data object from picture data contained in a stream.
t_size get_size() const
Retrieves size of the memory block containing the picture.
const t_item * get_ptr() const
Template implementing reference-counting features of service_base. Intended for dynamic instantiation...
album_art_path_list implementation helper
static album_art_data_ptr g_create(const void *p_buffer, t_size p_bytes)
Creates an album_art_data object from picture data contained in a memory buffer.
Common class for handling picture data. Type of contained picture data is unknown and to be determin...
const char * get_path(t_size index) const
const char * get_path(t_size index) const
Entrypoint class for accessing album art editing functionality. Register your own implementation to a...
void set_size(t_size p_size)
Album art path list - see album_art_extractor_instance_v2.
void set_size(t_size p_size)
Implements album_art_data.
pfc::array_t< pfc::string8 > m_data
t_uint64 t_filesize
Type used for file size related variables.
void from_stream(stream_reader *p_stream, t_size p_bytes, abort_callback &p_abort)
Reads picture data from the specified stream object.
Autopointer class to be used with all services. Manages reference counter calls behind-the-scenes.
void splitStringSimple_toList(t_list &p_output, t_split p_split, const char *p_string, t_size p_stringLen=~0)
const void * get_ptr() const
Retrieves a pointer to a memory block containing the picture.
Helper template used to easily access core services. Usage: static_api_ptr_t<myclass> api; api->doso...
album_art_path_list implementation helper
PFC_NORETURN void SHARED_EXPORT uBugCheck()
album_art_path_list_impl(const t_in &in)
pfc::array_t< t_uint8 > m_content