Audacity
3.0.3
|
A class representing a modular task to be used with the On-Demand structures. More...
#include <ODDecodeFlacTask.h>
Public Member Functions | |
ODDecodeFlacTask () | |
Constructs an ODTask. More... | |
virtual | ~ODDecodeFlacTask () |
std::unique_ptr< ODTask > | Clone () const override |
ODFileDecoder * | CreateFileDecoder (const wxString &fileName) override |
Creates an ODFileDecoder that decodes a file of filetype the subclass handles. More... | |
unsigned int | GetODType () override |
Public Member Functions inherited from ODDecodeTask | |
ODDecodeTask () | |
Creates a NEW task that decodes files. More... | |
virtual | ~ODDecodeTask () |
virtual bool | SeekingAllowed () |
void | DemandTrackUpdate (WaveTrack *track, double seconds) override |
const char * | GetTaskName () override |
Return the task name. More... | |
TranslatableString | GetTip () override |
unsigned int | GetODType () override |
Subclasses should override to return respective type. More... | |
virtual ODFileDecoder * | GetOrCreateMatchingFileDecoder (ODDecodeBlockFile *blockFile) |
virtual int | GetNumFileDecoders () |
Public Member Functions inherited from ODTask | |
ODTask () | |
Constructs an ODTask. More... | |
virtual | ~ODTask () |
void | DoSome (float amountWork=0.0) |
void | DoAll () |
Call DoSome until PercentComplete >= 1.0. More... | |
virtual float | PercentComplete () |
return the amount of the task that has been completed. 0.0 to 1.0 More... | |
virtual bool | UsesCustomWorkUntilPercentage () |
virtual float | ComputeNextWorkUntilPercentageComplete () |
virtual bool | CanMergeWith (ODTask *otherTask) |
virtual void | StopUsingWaveTrack (WaveTrack *track) |
virtual void | ReplaceWaveTrack (Track *oldTrack, const std::shared_ptr< Track > &newTrack) |
Replaces all instances to a wavetrack with a NEW one, effectively transferring the task. More... | |
void | AddWaveTrack (const std::shared_ptr< WaveTrack > &track) |
Adds a WaveTrack to do the task for. More... | |
virtual int | GetNumWaveTracks () |
virtual std::shared_ptr< WaveTrack > | GetWaveTrack (int i) |
bool | IsComplete () |
return More... | |
void | TerminateAndBlock () |
virtual void | Terminate () |
releases memory that the ODTask owns. Subclasses should override. More... | |
virtual sampleCount | GetDemandSample () const |
virtual void | SetDemandSample (sampleCount sample) |
virtual void | RecalculatePercentComplete () |
does an od update and then recalculates the data. More... | |
int | GetTaskNumber () |
returns the number of tasks created before this instance. More... | |
void | SetNeedsODUpdate () |
bool | GetNeedsODUpdate () |
void | ResetNeedsODUpdate () |
virtual bool | IsTaskAssociatedWithProject (AudacityProject *proj) |
returns true if the task is associated with the project. More... | |
bool | IsRunning () |
Additional Inherited Members | |
Public Types inherited from ODTask | |
enum | { eODNone = 0x00000000, eODFLAC = 0x00000001, eODMP3 = 0x00000002, eODFFMPEG = 0x00000004, eODPCMSummary = 0x00001000, eODOTHER = 0x10000000 } |
Public Attributes inherited from ODTask | |
enum ODTask:: { ... } | ODTypeEnum |
Protected Member Functions inherited from ODDecodeTask | |
void | CalculatePercentComplete () override |
recalculates the percentage complete. More... | |
void | DoSomeInternal () override |
Computes and writes the data for one BlockFile if it still has a refcount. More... | |
void | Update () override |
by default creates the order of the wavetrack to load. More... | |
void | OrderBlockFiles (std::vector< std::weak_ptr< ODDecodeBlockFile > > &unorderedBlocks) |
Orders the input as either On-Demand or default layered order. More... | |
Protected Member Functions inherited from ODTask | |
virtual void | ODUpdate () |
void | SetIsRunning (bool value) |
Protected Attributes inherited from ODDecodeTask | |
std::vector< std::weak_ptr< ODDecodeBlockFile > > | mBlockFiles |
std::vector< std::unique_ptr< ODFileDecoder > > | mDecoders |
int | mMaxBlockFiles |
Protected Attributes inherited from ODTask | |
int | mTaskNumber |
volatile float | mPercentComplete |
ODLock | mPercentCompleteMutex |
volatile bool | mDoingTask |
volatile bool | mTaskStarted |
volatile bool | mTerminate |
ODLock | mTerminateMutex |
ODLock | mBlockUntilTerminateMutex |
std::vector< std::weak_ptr< WaveTrack > > | mWaveTracks |
ODLock | mWaveTrackMutex |
sampleCount | mDemandSample |
ODLock | mDemandSampleMutex |
volatile bool | mIsRunning |
ODLock | mIsRunningMutex |
A class representing a modular task to be used with the On-Demand structures.
Decodes a flac file into a oddecodeBlockFile, but not immediately.
This is an abstract class that subclasses will have to derive the types from. For any type there should only be one ODDecodeTask associated with a given track. There could be the ODDecodeBlockFiles of several FLACs in one track (after copy and pasting), so things aren't as simple as they seem - the implementation needs to be robust enough to allow all the user changes such as copy/paste, DELETE, and so on.
Definition at line 46 of file ODDecodeFlacTask.h.
|
inline |
|
virtual |
Definition at line 30 of file ODDecodeFlacTask.cpp.
|
overridevirtual |
Implements ODTask.
Definition at line 35 of file ODDecodeFlacTask.cpp.
References ODTask::GetDemandSample().
|
overridevirtual |
Creates an ODFileDecoder that decodes a file of filetype the subclass handles.
Implements ODDecodeTask.
Definition at line 278 of file ODDecodeFlacTask.cpp.
References ODDecodeTask::mDecoders.
|
inlineoverridevirtual |
Lets other classes know that this class handles flac Subclasses should override to return respective type.
Reimplemented from ODTask.
Definition at line 61 of file ODDecodeFlacTask.h.
References ODTask::eODFLAC.