Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
Rip an entire CD or a single track. More...
#include <CDDARipper.h>
Public Member Functions | |
bool | RipTrack (CFileItem *pItem) |
Rip a single track. | |
bool | RipCD () |
Rip an entire CD. | |
void | OnJobComplete (unsigned int jobID, bool success, CJob *job) override |
The callback used when a job completes. | |
Public Member Functions inherited from CJobQueue | |
CJobQueue (bool lifo=false, unsigned int jobsAtOnce=1, CJob::PRIORITY priority=CJob::PRIORITY_LOW) | |
CJobQueue constructor. | |
~CJobQueue () override | |
CJobQueue destructor Cancels any in-process jobs, and destroys the job queue. | |
bool | AddJob (CJob *job) |
Add a job to the queue On completion of the job, destruction of the job queue or in case the job could not be added successfully, the CJob object will be destroyed. | |
template<typename F > | |
void | Submit (F &&f) |
Add a function f to this job queue. | |
void | CancelJob (const CJob *job) |
Cancel a job in the queue Cancels a job in the queue. Any job currently being processed may complete after this call has completed, but OnJobComplete will not be performed. If the job is only queued then it will be removed from the queue and deleted. | |
void | CancelJobs () |
Cancel all jobs in the queue Removes all jobs from the queue. Any job currently being processed may complete after this call has completed, but OnJobComplete will not be performed. | |
bool | IsProcessing () const |
Check whether the queue is processing a job. | |
void | OnJobComplete (unsigned int jobID, bool success, CJob *job) override |
The callback used when a job completes. | |
void | OnJobAbort (unsigned int jobID, CJob *job) override |
The callback used when a job will be aborted. | |
Public Member Functions inherited from IJobCallback | |
virtual | ~IJobCallback ()=default |
Destructor for job call back objects. | |
virtual void | OnJobProgress (unsigned int jobID, unsigned int progress, unsigned int total, const CJob *job) |
An optional callback function that a job may call while processing. | |
Static Public Member Functions | |
static CCDDARipper & | GetInstance () |
The only way through which the global instance of the CDDARipper should be accessed. | |
Additional Inherited Members | |
Protected Member Functions inherited from CJobQueue | |
bool | QueueEmpty () const |
Returns if we still have jobs waiting to be processed NOTE: This function does not take into account the jobs that are currently processing. | |
Rip an entire CD or a single track.
The CCDDARipper class is used to rip an entire CD or just a single track. Tracks are stored in a folder constructed from two user settings: audiocds.recordingpath and audiocds.trackpathformat. The former is the absolute file system path for the root folder where ripped music is stored, and the latter specifies the format for the album subfolder and for the track file name. Format used to encode ripped tracks is defined by the audiocds.encoder user setting, and there are several choices: wav, ogg vorbis and mp3.
|
static |
The only way through which the global instance of the CDDARipper should be accessed.
The callback used when a job completes.
OnJobComplete is called at the completion of the job's DoWork() function, and is used to return information to the caller on the result of the job. On returning form this function the CJobManager will destroy this job.
jobID | the unique id of the job (as retrieved from CJobManager::AddJob) |
success | the result from the DoWork call |
job | the job that has been processed. The job will be destroyed after this function returns |
Implements IJobCallback.
bool CCDDARipper::RipCD | ( | ) |
Rip an entire CD.
Rip a single track.
[in] | pItem | CFileItem representing a track to rip |