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 (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) |
void | decode_seek (double p_seconds, abort_callback &p_abort) |
t_filestats | get_file_stats (abort_callback &p_abort) |
void | get_info (file_info &p_info, abort_callback &p_abort) |
void | open (service_ptr_t< file > p_filehint, const char *p_path, t_input_open_reason p_reason, abort_callback &p_abort) |
void | retag (const file_info &p_info, abort_callback &p_abort) |
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_singletrack_impl () | |
~input_singletrack_impl () | |
This is a class that just declares prototypes of functions that each non-multitrack-enabled 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_singletrack_impl as virtual functions are not used on implementation class level. Use input_singletrack_factory_t template to register input class based on input_singletrack_impl.
Definition at line 76 of file input_impl.h.
|
inlineprotected |
Definition at line 121 of file input_impl.h.
|
inlineprotected |
Definition at line 122 of file input_impl.h.
bool input_singletrack_impl::decode_can_seek | ( | ) |
See: input_decoder::can_seek(). Valid after decode_initialize().
bool input_singletrack_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_singletrack_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_singletrack_impl::decode_initialize | ( | unsigned | p_flags, |
abort_callback & | p_abort | ||
) |
See: input_decoder::initialize(). Valid after open() with input_open_decode reason.
void input_singletrack_impl::decode_on_idle | ( | abort_callback & | p_abort | ) |
See: input_decoder::on_idle(). Valid after decode_initialize().
bool input_singletrack_impl::decode_run | ( | audio_chunk & | p_chunk, |
abort_callback & | p_abort | ||
) |
See: input_decoder::run(). Valid after decode_initialize().
void input_singletrack_impl::decode_seek | ( | double | p_seconds, |
abort_callback & | p_abort | ||
) |
See: input_decoder::seek(). Valid after decode_initialize().
|
static |
|
static |
t_filestats input_singletrack_impl::get_file_stats | ( | abort_callback & | p_abort | ) |
See: input_info_reader::get_file_stats(). Valid after open() with any reason.
Implementation warning: this is typically also called immediately after tag update and should return new values then.
void input_singletrack_impl::get_info | ( | file_info & | p_info, |
abort_callback & | p_abort | ||
) |
See: input_info_reader::get_info(). Valid after open() with any reason.
Implementation warning: this is typically also called immediately after tag update and should return newly written content then.
void input_singletrack_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_singletrack_impl::retag | ( | const file_info & | p_info, |
abort_callback & | p_abort | ||
) |
See: input_info_writer::set_info(). Note that input_info_writer::commit() call isn't forwarded because it's useless in case of non-multitrack-enabled inputs. Valid after open() with input_open_info_write reason.