foobar2000 SDK  2015-01-14
Public Member Functions | Static Public Member Functions | Protected Member Functions
input_singletrack_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 (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 ()
 

Detailed Description

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.

Constructor & Destructor Documentation

input_singletrack_impl::input_singletrack_impl ( )
inlineprotected

Definition at line 121 of file input_impl.h.

121 {}
input_singletrack_impl::~input_singletrack_impl ( )
inlineprotected

Definition at line 122 of file input_impl.h.

122 {}

Member Function Documentation

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

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_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.


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