Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
KODI::CDRIP::CCDDARipper Class Reference

Rip an entire CD or a single track. More...

#include <CDDARipper.h>

Inheritance diagram for KODI::CDRIP::CCDDARipper:
CJobQueue IJobCallback

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 CCDDARipperGetInstance ()
 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.
 

Detailed Description

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.

Member Function Documentation

◆ GetInstance()

CCDDARipper & CCDDARipper::GetInstance ( )
static

The only way through which the global instance of the CDDARipper should be accessed.

Returns
the global instance.

◆ OnJobComplete()

void CCDDARipper::OnJobComplete ( unsigned int jobID,
bool success,
CJob * job )
overridevirtual

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.

Parameters
jobIDthe unique id of the job (as retrieved from CJobManager::AddJob)
successthe result from the DoWork call
jobthe job that has been processed. The job will be destroyed after this function returns
See also
CJobManager and CJob

Implements IJobCallback.

◆ RipCD()

bool CCDDARipper::RipCD ( )

Rip an entire CD.

Returns
true if success, false if failure

◆ RipTrack()

bool CCDDARipper::RipTrack ( CFileItem * pItem)

Rip a single track.

Parameters
[in]pItemCFileItem representing a track to rip
Returns
true if success, false if failure

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