|
| CCDDARipJob (const std::string &input, const std::string &output, const MUSIC_INFO::CMusicInfoTag &tag, int encoder, bool eject=false, unsigned int rate=44100, unsigned int channels=2, unsigned int bps=16) |
| Construct a ripper job. More...
|
|
const char * | GetType () const override |
| Function that returns the type of job. More...
|
|
bool | operator== (const CJob *job) const override |
|
bool | DoWork () override |
| Main workhorse function of CJob instances. More...
|
|
std::string | GetOutput () const |
|
virtual | ~CJob ()=default |
| Destructor for job objects. More...
|
|
virtual bool | ShouldCancel (unsigned int progress, unsigned int total) const |
| Function for longer jobs to report progress and check whether they have been cancelled. More...
|
|
|
unsigned int | m_rate |
|
unsigned int | m_channels |
|
unsigned int | m_bps |
|
MUSIC_INFO::CMusicInfoTag | m_tag |
|
std::string | m_input |
|
std::string | m_output |
|
bool | m_eject |
|
int | m_encoder |
|
|
enum | PRIORITY {
PRIORITY_LOW_PAUSABLE = 0,
PRIORITY_LOW,
PRIORITY_NORMAL,
PRIORITY_HIGH,
PRIORITY_DEDICATED
} |
| Priority levels for jobs, specified by clients when adding jobs to the CJobManager. More...
|
|
◆ CCDDARipJob()
CCDDARipJob::CCDDARipJob |
( |
const std::string & |
input, |
|
|
const std::string & |
output, |
|
|
const MUSIC_INFO::CMusicInfoTag & |
tag, |
|
|
int |
encoder, |
|
|
bool |
eject = false , |
|
|
unsigned int |
rate = 44100 , |
|
|
unsigned int |
channels = 2 , |
|
|
unsigned int |
bps = 16 |
|
) |
| |
Construct a ripper job.
- Parameters
-
[in] | input | The input file url |
[in] | output | The output file url |
[in] | tag | The music tag to attach to track |
[in] | encoder | The encoder to use. See Encoder.h |
[in] | eject | Should we eject tray on finish? |
[in] | rate | The sample rate of the input |
[in] | channels | Number of audio channels in input |
[in] | bps | The bits per sample for input |
◆ DoWork()
bool CCDDARipJob::DoWork |
( |
| ) |
|
|
overridevirtual |
Main workhorse function of CJob instances.
All CJob subclasses must implement this function, performing all processing. Once this function is complete, the OnJobComplete() callback is called, and the job is then destroyed.
- See also
- CJobManager, IJobCallback::OnJobComplete()
Implements CJob.
◆ GetType()
const char* KODI::CDRIP::CCDDARipJob::GetType |
( |
| ) |
const |
|
inlineoverridevirtual |
Function that returns the type of job.
CJob subclasses may optionally implement this function to specify the type of job. This is useful for the CJobManager::AddLIFOJob() routine, which preempts similar jobs with the new job.
- Returns
- a unique character string describing the job.
- See also
- CJobManager
Reimplemented from CJob.
◆ RipChunk()
int CCDDARipJob::RipChunk |
( |
XFILE::CFile & |
reader, |
|
|
const std::unique_ptr< CEncoder > & |
encoder, |
|
|
int & |
percent |
|
) |
| |
|
protected |
Rip a chunk of audio.
- Parameters
-
[in] | reader | The input reader |
[in] | encoder | The audio encoder |
[out] | percent | The percentage completed on return |
- Returns
- 0 (CDDARIP_OK) if everything went okay, or a positive error code from the reader, or -1 if the encoder failed
- See also
- CCDDARipper::GetData, CEncoder::Encode
The documentation for this class was generated from the following files: