-TransportQue::TransportQue()
-{
- input_lock = new Condition(1, "TransportQue::input_lock");
- output_lock = new Condition(0, "TransportQue::output_lock", 1);
-}
-
-TransportQue::~TransportQue()
-{
- delete input_lock;
- delete output_lock;
-}
-
-int TransportQue::send_command(int command, int change_type,
- EDL *new_edl, int realtime, int resume, int use_inout,
- int toggle_audio, int loop_play, int use_displacement)
-{
- input_lock->lock("TransportQue::send_command 1");
- this->command.command = command;
-// Mutually exclusive operation
- this->command.change_type |= change_type;
- this->command.realtime = realtime;
- this->command.resume = resume;
-
- if(new_edl)
- {
-// Just change the EDL if the change requires it because renderengine
-// structures won't point to the new EDL otherwise and because copying the
-// EDL for every cursor movement is slow.
- if(change_type == CHANGE_EDL ||
- (uint32_t)change_type == CHANGE_ALL)
- {
-// Copy EDL
- this->command.get_edl()->copy_all(new_edl);
- }
- else
- if(change_type == CHANGE_PARAMS)
- {
- this->command.get_edl()->synchronize_params(new_edl);
- }
-
-// Set playback range
- this->command.set_playback_range(new_edl, use_inout,
- toggle_audio, loop_play, use_displacement);
- }
-
- input_lock->unlock();
-
- output_lock->unlock();
- return 0;
-}
-
-void TransportQue::update_change_type(int change_type)
-{
- input_lock->lock("TransportQue::update_change_type");
- this->command.change_type |= change_type;
- input_lock->unlock();
-}