#include <CDDARipJob.h>
|
| 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...
|
|
| ~CCDDARipJob () override |
|
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 |
|
| CJob () |
|
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...
|
|
◆ 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
-
input | The input file url |
output | The output file url |
tag | The music tag to attach to track |
encoder | The encoder to use. See Encoder.h |
eject | Should we eject tray on finish? |
rate | The sample rate of the input |
channels | Number of audio channels in input |
bps | The bits per sample for input |
◆ ~CCDDARipJob()
CCDDARipJob::~CCDDARipJob |
( |
| ) |
|
|
overridedefault |
◆ 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.
◆ GetOutput()
std::string CCDDARipJob::GetOutput |
( |
| ) |
const |
|
inline |
◆ GetType()
const char * 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.
◆ operator==()
bool CCDDARipJob::operator== |
( |
const CJob * |
job | ) |
const |
|
overridevirtual |
◆ RipChunk()
Rip a chunk of audio.
- Parameters
-
reader | The input reader |
encoder | The audio encoder |
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
◆ SetupEncoder()
◆ SetupTempFile()
std::string CCDDARipJob::SetupTempFile |
( |
| ) |
|
|
protected |
Helper used if output is a remote url.
◆ m_bps
unsigned int CCDDARipJob::m_bps |
|
protected |
◆ m_channels
unsigned int CCDDARipJob::m_channels |
|
protected |
◆ m_eject
bool CCDDARipJob::m_eject |
|
protected |
◆ m_encoder
int CCDDARipJob::m_encoder |
|
protected |
◆ m_input
std::string CCDDARipJob::m_input |
|
protected |
◆ m_output
std::string CCDDARipJob::m_output |
|
protected |
◆ m_rate
unsigned int CCDDARipJob::m_rate |
|
protected |
◆ m_tag
The documentation for this class was generated from the following files: