foobar2000 SDK  2015-08-03
Public Member Functions | Static Public Member Functions | Protected Member Functions
input_impl

#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 ()
 

Detailed Description

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.

Constructor & Destructor Documentation

input_impl::input_impl ( )
inlineprotected

Definition at line 71 of file input_impl.h.

71 {}
input_impl::~input_impl ( )
inlineprotected

Definition at line 72 of file input_impl.h.

72 {}

Member Function Documentation

bool input_impl::decode_can_seek ( )
bool input_impl::decode_get_dynamic_info ( file_info p_out,
double &  p_timestamp_delta 
)
bool input_impl::decode_get_dynamic_info_track ( file_info p_out,
double &  p_timestamp_delta 
)
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)
bool input_impl::decode_run ( audio_chunk p_chunk,
abort_callback p_abort 
)
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 
)
static bool input_impl::g_is_our_content_type ( const char *  p_content_type)
static
static bool input_impl::g_is_our_path ( const char *  p_path,
const char *  p_extension 
)
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.

Parameters
p_filehintOptional; 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_pathURL of resource being opened.
p_reasonType of operation requested. Possible values are:
  • input_open_info_read - info retrieval methods are valid;
  • input_open_decode - info retrieval and decoding methods are valid;
  • input_open_info_write - info retrieval and retagging methods are valid;
    Note that info retrieval methods are valid in all cases, and they may be called at any point of decoding/retagging process. Results of info retrieval methods (other than get_subsong_count() / get_subsong()) between retag_set_info() and retag_commit() are undefined however; those should not be called during that period.
p_abortabort_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().


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