add new Skip event to SessionEvents

This commit is contained in:
Paul Davis 2014-09-17 10:31:33 -04:00
parent dfec51964d
commit ebd7bc7447
4 changed files with 11 additions and 2 deletions

View file

@ -59,6 +59,7 @@ public:
AdjustPlaybackBuffering,
AdjustCaptureBuffering,
SetTimecodeTransmission,
Skip,
/* only one of each of these events can be queued at any one time */

View file

@ -372,6 +372,7 @@ setup_enum_writer ()
REGISTER_CLASS_ENUM (SessionEvent, CancelPlayAudioRange);
REGISTER_CLASS_ENUM (SessionEvent, StopOnce);
REGISTER_CLASS_ENUM (SessionEvent, AutoLoop);
REGISTER_CLASS_ENUM (SessionEvent, Skip);
REGISTER (_SessionEvent_Type);
REGISTER_CLASS_ENUM (Session, Stopped);

View file

@ -1349,14 +1349,14 @@ Session::sync_locations_to_skips (Locations::LocationList& locations)
Locations::LocationList::iterator i;
Location* location;
clear_events (SessionEvent::LocateRoll);
clear_events (SessionEvent::Skip);
for (i = locations.begin(); i != locations.end(); ++i) {
location = *i;
if (location->is_skip()) {
SessionEvent* ev = new SessionEvent (SessionEvent::LocateRoll, SessionEvent::Add, location->start(), location->end(), 1.0);
SessionEvent* ev = new SessionEvent (SessionEvent::Skip, SessionEvent::Add, location->start(), location->end(), 1.0);
queue_event (ev);
}
}

View file

@ -1061,6 +1061,13 @@ Session::process_event (SessionEvent* ev)
_send_timecode_update = true;
break;
case SessionEvent::Skip:
start_locate (ev->target_frame, true, true, false);
remove = false;
del = false;
_send_timecode_update = true;
break;
case SessionEvent::LocateRollLocate:
// locate is handled by ::request_roll_at_and_return()
_requested_return_frame = ev->target_frame;