public static void SetFrameMarker_RightOfAClipJustBefore(this IVidkaOpContext iEditor, VidkaClipAudio clip, VidkaProj proj) { long frameMarker = clip.FrameOffset; // start var rightThreshFrames = proj.SecToFrame(Settings.Default.RightTrimMarkerOffsetSeconds); // if clip is longer than RightTrimMarkerOffsetSeconds, we can skip to end-RightTrimMarkerOffsetSeconds if (clip.LengthFrameCalc > rightThreshFrames) frameMarker += clip.LengthFrameCalc - rightThreshFrames; iEditor.SetFrameMarker_ShowFrameInPlayer(frameMarker); }
public void SetParticulars( VidkaClipVideoAbstract vclip, VidkaFileMapping fileMapping) { this.imageMan = new ImageCacheManager(); this.fileMapping = fileMapping; this.vclip = vclip; // set up the vclip that we will draw vclipFullToDraw = vclip.MakeCopy_VideoClip(); vclipFullToDraw.FrameStart = 0; vclipFullToDraw.FrameEnd = vclipFullToDraw.LengthFrameCalc; // set up the audio clip that we will draw aclipToDraw = new VidkaClipAudio() { FileName = vclip.CustomAudioFilename, FileLengthSec = vclip.CustomAudioLengthSec, FileLengthFrames = dimdim.SecToFrame(vclip.CustomAudioLengthSec ?? 0), FrameStart = 0, FrameEnd = dimdim.SecToFrame(vclip.CustomAudioLengthSec ?? 0), }; imageMan.ImagesReady += imageMan_ImagesReady; }
public void SetParticulars(VidkaClipAudio clip) { VClip = clip; // set all the UI txtPostOp.Text = VClip.PostOp; }
private void dragAndDropMan_MetaReadyForOutstandingAudio(VidkaClipAudio aclip, VideoMetadataUseful meta) { editor.PleaseRepaint(); }
public static void SetFrameMarker_LeftOfAClip(this IVidkaOpContext iEditor, VidkaClipAudio clip) { iEditor.SetFrameMarker_ShowFrameInPlayer(clip.FrameOffset); }
/// <summary> /// There can only be one hover b/w video and audio line, so video will be set to null /// </summary> public void SetHoverAudio(VidkaClipAudio hover) { if (CurrentAudioClipHover != hover || CurrentVideoClipHover != null) stateChanged = true; CurrentAudioClipHover = hover; CurrentVideoClipHover = null; }
public void SetDraggyAudio(VidkaClipAudio clip) { if (Draggy.AudioClip != clip) stateChanged = true; Draggy.AudioClip = clip; }
/// <summary> /// There can only be one selected (active) b/w video and audio line, so video will be set to null /// </summary> public void SetActiveAudio(VidkaClipAudio active) { if (CurrentAudioClip != active || CurrentVideoClip != null) { stateChanged = true; originalTimelineSelectionChanged = true; SetOriginalTimelinePlaybackMode(false); } CurrentAudioClip = ArrayOfOne_ClipsAudio[0] = active; CurrentVideoClip = null; resetCurrentClipUsages(); if (active != null) CurClipAllUsagesAudio = ArrayOfOne_ClipsAudio; UpdateCurrentClipFrameAbsPos(null); }
private void AddUndoableAction_insertAudioClipAtMarkerPosition(VidkaClipAudio newClip) { newClip.FrameOffset = UiObjects.CurrentMarkerFrame; AddUndableAction_andFireRedo(new UndoableAction { Redo = () => { Proj.ClipsAudio.Add(newClip); UiObjects.SetActiveAudio(newClip); }, Undo = () => { Proj.ClipsAudio.Remove(newClip); }, }); }