/// <summary> /// proj parameter is only needed for video clip, to find its abs position /// </summary> public void UpdateCurrentClipFrameAbsPos(VidkaProj proj) { CurrentClipFrameAbsPos = null; if (CurrentVideoClip != null && proj != null) { CurrentClipFrameAbsPos = (long?)proj.GetVideoClipAbsFramePositionLeft(CurrentVideoClip); } else if (CurrentAudioClip != null) { CurrentClipFrameAbsPos = (long?)CurrentAudioClip.FrameOffset; } }
public static void SetFrameMarker_RightOfVClipJustBefore(this IVidkaOpContext iEditor, VidkaClipVideoAbstract vclip, VidkaProj proj) { long frameMarker = proj.GetVideoClipAbsFramePositionLeft(vclip); var rightThreshFrames = proj.SecToFrame(Settings.Default.RightTrimMarkerOffsetSeconds); // if clip is longer than RightTrimMarkerOffsetSeconds, we can skip to end-RightTrimMarkerOffsetSeconds if (vclip.LengthFrameCalc > rightThreshFrames) { frameMarker += vclip.LengthFrameCalc - rightThreshFrames; } iEditor.SetFrameMarker_ShowFrameInPlayer(frameMarker); }
/// <summary> /// There can only be one selected (active) b/w video and audio line, so audio will be set to null /// Needs proj to find absolute frame position (CurrentClipFrameAbsPos) /// </summary> public void SetActiveVideo(VidkaClipVideo active, VidkaProj proj) { if (CurrentVideoClip != active || CurrentAudioClip != null) { stateChanged = true; originalTimelineSelectionChanged = true; SetOriginalTimelinePlaybackMode(false); } CurrentVideoClip = active; CurrentAudioClip = null; CurrentClipFrameAbsPos = (active != null) ? (long?)proj.GetVideoClipAbsFramePositionLeft(active) : null; }
public static void SetFrameMarker_LeftOfVClip(this IVidkaOpContext iEditor, VidkaClipVideoAbstract vclip, VidkaProj proj) { long frameMarker = proj.GetVideoClipAbsFramePositionLeft(vclip); iEditor.SetFrameMarker_ShowFrameInPlayer(frameMarker); }
public static void SetFrameMarker_LeftOfVClip(this ISomeCommonEditorOperations iEditor, VidkaClipVideo vclip, VidkaProj proj) { long frameMarker = proj.GetVideoClipAbsFramePositionLeft(vclip); iEditor.SetFrameMarker_ShowFrameInPlayer(frameMarker); }