Audacity
3.0.3
|
A class representing a modular task to be used with the On-Demand structures. More...
#include <ODWaveTrackTaskQueue.h>
Public Member Functions | |
ODWaveTrackTaskQueue () | |
Constructs an ODWaveTrackTaskQueue. More... | |
virtual | ~ODWaveTrackTaskQueue () |
void | AddWaveTrack (const std::shared_ptr< WaveTrack > &track) |
Adds a track to the associated list. More... | |
void | DemandTrackUpdate (WaveTrack *track, double seconds) |
changes the tasks associated with this Waveform to process the task from a different point in the track More... | |
void | ReplaceWaveTrack (Track *oldTrack, const std::shared_ptr< Track > &newTrack) |
replaces all instances of a WaveTrack within this task with another. More... | |
void | MakeWaveTrackIndependent (const std::shared_ptr< WaveTrack > &track) |
bool | CanMergeWith (ODWaveTrackTaskQueue *otherQueue) |
returns whether or not this queue's task list and another's can merge together, as when we make two mono tracks stereo. More... | |
void | MergeWaveTrack (const std::shared_ptr< WaveTrack > &track) |
bool | ContainsWaveTrack (const WaveTrack *track) |
returns true if the argument is in the WaveTrack list. More... | |
int | GetNumWaveTracks () |
returns the number of wavetracks in this queue. More... | |
void | AddTask (std::unique_ptr< ODTask > &&mtask) |
Add a task to the queue. More... | |
bool | IsEmpty () |
bool | IsFrontTaskComplete () |
void | RemoveFrontTask () |
Removes and deletes the front task from the list. More... | |
ODTask * | GetFrontTask () |
Schedules the front task for immediate execution. More... | |
int | GetNumTasks () |
returns the number of ODTasks in this queue More... | |
ODTask * | GetTask (size_t x) |
returns a ODTask at position x More... | |
void | FillTipForWaveTrack (const WaveTrack *t, TranslatableString &tip) |
fills in the status bar message for a given track More... | |
Protected Member Functions | |
void | Compress () |
Protected Attributes | |
TranslatableString | mTipMsg |
std::vector< std::weak_ptr< WaveTrack > > | mTracks |
the list of tracks associated with this queue. More... | |
ODLock | mTracksMutex |
std::vector< std::unique_ptr< ODTask > > | mTasks |
the list of tasks associated with the tracks. This class owns these tasks. More... | |
ODLock | mTasksMutex |
A class representing a modular task to be used with the On-Demand structures.
watches over all to be done (not yet started and started but not finished) tasks associated with a WaveTrack.
Definition at line 32 of file ODWaveTrackTaskQueue.h.
ODWaveTrackTaskQueue::ODWaveTrackTaskQueue | ( | ) |
Constructs an ODWaveTrackTaskQueue.
Definition at line 26 of file ODWaveTrackTaskQueue.cpp.
|
virtual |
Definition at line 30 of file ODWaveTrackTaskQueue.cpp.
References ODManager::Instance, mTasks, and ODManager::RemoveTaskIfInQueue().
void ODWaveTrackTaskQueue::AddTask | ( | std::unique_ptr< ODTask > && | mtask | ) |
Add a task to the queue.
Definition at line 108 of file ODWaveTrackTaskQueue.cpp.
References ODTask::GetNumWaveTracks(), ODTask::GetWaveTrack(), mTasks, mTasksMutex, mTracks, and mTracksMutex.
Referenced by ODManager::AddNewTask().
void ODWaveTrackTaskQueue::AddWaveTrack | ( | const std::shared_ptr< WaveTrack > & | track | ) |
Adds a track to the associated list.
Definition at line 97 of file ODWaveTrackTaskQueue.cpp.
References mTracks, and mTracksMutex.
Referenced by MergeWaveTrack().
bool ODWaveTrackTaskQueue::CanMergeWith | ( | ODWaveTrackTaskQueue * | otherQueue | ) |
returns whether or not this queue's task list and another's can merge together, as when we make two mono tracks stereo.
Definition at line 44 of file ODWaveTrackTaskQueue.cpp.
References GetNumTasks(), GetTask(), mTasks, and mTasksMutex.
Referenced by ODManager::MakeWaveTrackDependent().
|
protected |
Definition at line 327 of file ODWaveTrackTaskQueue.cpp.
References mTracks, and mTracksMutex.
Referenced by GetNumWaveTracks(), IsEmpty(), and MakeWaveTrackIndependent().
bool ODWaveTrackTaskQueue::ContainsWaveTrack | ( | const WaveTrack * | track | ) |
returns true if the argument is in the WaveTrack list.
Definition at line 82 of file ODWaveTrackTaskQueue.cpp.
References mTracks, and mTracksMutex.
Referenced by FillTipForWaveTrack().
void ODWaveTrackTaskQueue::DemandTrackUpdate | ( | WaveTrack * | track, |
double | seconds | ||
) |
changes the tasks associated with this Waveform to process the task from a different point in the track
changes the tasks associated with this Waveform to process the task from a different point in the track
track | the track to update |
seconds | the point in the track from which the tasks associated with track should begin processing from. |
Definition at line 176 of file ODWaveTrackTaskQueue.cpp.
References mTasks, and mTracksMutex.
void ODWaveTrackTaskQueue::FillTipForWaveTrack | ( | const WaveTrack * | t, |
TranslatableString & | tip | ||
) |
fills in the status bar message for a given track
Definition at line 307 of file ODWaveTrackTaskQueue.cpp.
References ContainsWaveTrack(), GetFrontTask(), GetNumTasks(), mTipMsg, and XO.
ODTask * ODWaveTrackTaskQueue::GetFrontTask | ( | ) |
Schedules the front task for immediate execution.
gets the front task for immediate execution
Definition at line 294 of file ODWaveTrackTaskQueue.cpp.
References mTasks, and mTasksMutex.
Referenced by FillTipForWaveTrack(), and ODManager::UpdateQueues().
int ODWaveTrackTaskQueue::GetNumTasks | ( | ) |
returns the number of ODTasks in this queue
Definition at line 223 of file ODWaveTrackTaskQueue.cpp.
References mTasks, and mTasksMutex.
Referenced by CanMergeWith(), and FillTipForWaveTrack().
int ODWaveTrackTaskQueue::GetNumWaveTracks | ( | ) |
returns the number of wavetracks in this queue.
Definition at line 211 of file ODWaveTrackTaskQueue.cpp.
References Compress(), mTracks, and mTracksMutex.
ODTask * ODWaveTrackTaskQueue::GetTask | ( | size_t | x | ) |
returns a ODTask at position x
Definition at line 233 of file ODWaveTrackTaskQueue.cpp.
References mTasks, and mTasksMutex.
Referenced by CanMergeWith().
bool ODWaveTrackTaskQueue::IsEmpty | ( | ) |
Definition at line 246 of file ODWaveTrackTaskQueue.cpp.
References Compress(), mTasks, mTasksMutex, mTracks, and mTracksMutex.
bool ODWaveTrackTaskQueue::IsFrontTaskComplete | ( | ) |
Definition at line 263 of file ODWaveTrackTaskQueue.cpp.
References mTasks, and mTasksMutex.
void ODWaveTrackTaskQueue::MakeWaveTrackIndependent | ( | const std::shared_ptr< WaveTrack > & | track | ) |
Definition at line 131 of file ODWaveTrackTaskQueue.cpp.
References ODManager::AddNewTask(), Compress(), ODManager::Instance, mTasks, mTasksMutex, mTracks, and mTracksMutex.
Referenced by ODManager::MakeWaveTrackIndependent().
void ODWaveTrackTaskQueue::MergeWaveTrack | ( | const std::shared_ptr< WaveTrack > & | track | ) |
add track to the masterTrack's queue - this will allow future ODScheduling to affect them together. sets the NeedODUpdateFlag since we don't want the head task to finish without haven't dealt with the dependent
track | the track to bring into the tasks AND tracklist for this queue |
Definition at line 67 of file ODWaveTrackTaskQueue.cpp.
References AddWaveTrack(), mTasks, and mTasksMutex.
Referenced by ODManager::MakeWaveTrackDependent().
void ODWaveTrackTaskQueue::RemoveFrontTask | ( | ) |
Removes and deletes the front task from the list.
Definition at line 282 of file ODWaveTrackTaskQueue.cpp.
References mTasks, and mTasksMutex.
void ODWaveTrackTaskQueue::ReplaceWaveTrack | ( | Track * | oldTrack, |
const std::shared_ptr< Track > & | newTrack | ||
) |
replaces all instances of a WaveTrack within this task with another.
Definition at line 192 of file ODWaveTrackTaskQueue.cpp.
References mTasks, mTasksMutex, mTracks, and mTracksMutex.
|
protected |
the list of tasks associated with the tracks. This class owns these tasks.
Definition at line 107 of file ODWaveTrackTaskQueue.h.
Referenced by AddTask(), CanMergeWith(), DemandTrackUpdate(), GetFrontTask(), GetNumTasks(), GetTask(), IsEmpty(), IsFrontTaskComplete(), MakeWaveTrackIndependent(), MergeWaveTrack(), RemoveFrontTask(), ReplaceWaveTrack(), and ~ODWaveTrackTaskQueue().
|
protected |
Definition at line 108 of file ODWaveTrackTaskQueue.h.
Referenced by AddTask(), CanMergeWith(), GetFrontTask(), GetNumTasks(), GetTask(), IsEmpty(), IsFrontTaskComplete(), MakeWaveTrackIndependent(), MergeWaveTrack(), RemoveFrontTask(), and ReplaceWaveTrack().
|
protected |
Definition at line 99 of file ODWaveTrackTaskQueue.h.
Referenced by FillTipForWaveTrack().
|
protected |
the list of tracks associated with this queue.
Definition at line 103 of file ODWaveTrackTaskQueue.h.
Referenced by AddTask(), AddWaveTrack(), Compress(), ContainsWaveTrack(), GetNumWaveTracks(), IsEmpty(), MakeWaveTrackIndependent(), and ReplaceWaveTrack().
|
protected |
Definition at line 104 of file ODWaveTrackTaskQueue.h.
Referenced by AddTask(), AddWaveTrack(), Compress(), ContainsWaveTrack(), DemandTrackUpdate(), GetNumWaveTracks(), IsEmpty(), MakeWaveTrackIndependent(), and ReplaceWaveTrack().