foobar2000 SDK
2015-08-03
|
#include <input_impl.h>
Public Member Functions | |
bool | decode_can_seek () |
bool | decode_get_dynamic_info (file_info &p_out, double &p_timestamp_delta) |
bool | decode_get_dynamic_info_track (file_info &p_out, double &p_timestamp_delta) |
void | decode_initialize (t_uint32 p_subsong, unsigned p_flags, abort_callback &p_abort) |
void | decode_on_idle (abort_callback &p_abort) |
bool | decode_run (audio_chunk &p_chunk, abort_callback &p_abort) |
bool | decode_run_raw (audio_chunk &p_chunk, mem_block_container &p_raw, abort_callback &p_abort) |
void | decode_seek (double p_seconds, abort_callback &p_abort) |
t_filestats | get_file_stats (abort_callback &p_abort) |
void | get_info (t_uint32 p_subsong, file_info &p_info, abort_callback &p_abort) |
t_uint32 | get_subsong (unsigned p_index) |
unsigned | get_subsong_count () |
void | open (service_ptr_t< file > p_filehint, const char *p_path, t_input_open_reason p_reason, abort_callback &p_abort) |
void | retag_commit (abort_callback &p_abort) |
void | retag_set_info (t_uint32 p_subsong, const file_info &p_info, abort_callback &p_abort) |
void | set_logger (event_logger::ptr ptr) |
Static Public Member Functions | |
static bool | g_is_our_content_type (const char *p_content_type) |
static bool | g_is_our_path (const char *p_path, const char *p_extension) |
Protected Member Functions | |
input_impl () | |
~input_impl () | |
This is a class that just declares prototypes of functions that each input needs to implement. See input_decoder / input_info_reader / input_info_writer interfaces for full descriptions of member functions. Since input implementation class is instantiated using a template, you don't need to derive from input_impl as virtual functions are not used on implementation class level. Use input_factory_t template to register input class based on input_impl.
Definition at line 16 of file input_impl.h.
|
inlineprotected |
Definition at line 71 of file input_impl.h.
|
inlineprotected |
Definition at line 72 of file input_impl.h.
bool input_impl::decode_can_seek | ( | ) |
See: input_decoder::can_seek(). Valid after decode_initialize().
bool input_impl::decode_get_dynamic_info | ( | file_info & | p_out, |
double & | p_timestamp_delta | ||
) |
See: input_decoder::get_dynamic_info(). Valid after decode_initialize().
bool input_impl::decode_get_dynamic_info_track | ( | file_info & | p_out, |
double & | p_timestamp_delta | ||
) |
See: input_decoder::get_dynamic_info_track(). Valid after decode_initialize().
void input_impl::decode_initialize | ( | t_uint32 | p_subsong, |
unsigned | p_flags, | ||
abort_callback & | p_abort | ||
) |
See: input_decoder::initialize(). Valid after open() with input_open_decode reason.
void input_impl::decode_on_idle | ( | abort_callback & | p_abort | ) |
See: input_decoder::on_idle(). Valid after decode_initialize().
bool input_impl::decode_run | ( | audio_chunk & | p_chunk, |
abort_callback & | p_abort | ||
) |
See: input_decoder::run(). Valid after decode_initialize().
bool input_impl::decode_run_raw | ( | audio_chunk & | p_chunk, |
mem_block_container & | p_raw, | ||
abort_callback & | p_abort | ||
) |
See: input_decoder_v2::run_raw(). Relevant only when implementing input_decoder_v2. Valid after decode_initialize().
void input_impl::decode_seek | ( | double | p_seconds, |
abort_callback & | p_abort | ||
) |
See: input_decoder::seek(). Valid after decode_initialize().
|
static |
|
static |
t_filestats input_impl::get_file_stats | ( | abort_callback & | p_abort | ) |
See: input_info_reader::get_file_stats(). Valid after open() with any reason.
void input_impl::get_info | ( | t_uint32 | p_subsong, |
file_info & | p_info, | ||
abort_callback & | p_abort | ||
) |
See: input_info_reader::get_info(). Valid after open() with any reason.
t_uint32 input_impl::get_subsong | ( | unsigned | p_index | ) |
See: input_info_reader::get_subsong(). Valid after open() with any reason.
unsigned input_impl::get_subsong_count | ( | ) |
See: input_info_reader::get_subsong_count(). Valid after open() with any reason.
void input_impl::open | ( | service_ptr_t< file > | p_filehint, |
const char * | p_path, | ||
t_input_open_reason | p_reason, | ||
abort_callback & | p_abort | ||
) |
Opens specified file for info read / decoding / info write. This is called only once, immediately after object creation, before any other methods, and no other methods are called if open() fails.
p_filehint | Optional; passes file object to use for the operation; if set to null, the implementation should handle opening file by itself. Note that not all inputs operate on physical files that can be reached through filesystem API, some of them require this parameter to be set to null (tone and silence generators for an example). Typically, an input implementation that requires file access calls input_open_file_helper() function to ensure that file is open with relevant access mode (read or read/write). |
p_path | URL of resource being opened. |
p_reason | Type of operation requested. Possible values are:
|
p_abort | abort_callback object signaling user aborting the operation. |
void input_impl::retag_commit | ( | abort_callback & | p_abort | ) |
See: input_info_writer::commit(). Valid after open() with input_open_info_write reason.
void input_impl::retag_set_info | ( | t_uint32 | p_subsong, |
const file_info & | p_info, | ||
abort_callback & | p_abort | ||
) |
See: input_info_writer::set_info(). Valid after open() with input_open_info_write reason.
void input_impl::set_logger | ( | event_logger::ptr | ptr | ) |
See: input_decoder::set_logger(). Relevant only when implementing input_decoder_v2. Valid after any open().