Ejemplo n.º 1
0
 internal void InitDraggyFromDragAndDropMan(
     DragAndDropManager dragAndDropMan,
     int framesSampleQuarterScreen,
     int mouseX)
 {
     // TODO: copied from EditorLogic.... implement please...
     // When u drag and drop a file, how big is it
     SetDraggyCoordinates(
         mode: EditorDraggyMode.VideoTimeline,
         mouseX: mouseX,
         mouseXOffset: framesSampleQuarterScreen / 2,
         text: "Analyzing...",
         frameLength: framesSampleQuarterScreen);
 }
Ejemplo n.º 2
0
        public EditorLogic(IVideoEditor editor, IVideoPlayer videoPlayer)
        {
            this.editor = editor;
            this.videoPlayer = videoPlayer;
            Proj = new VidkaProj();
            Dimdim = new ProjectDimensions(Proj);
            UiObjects = new VidkaUiStateObjects();
            previewLauncher = new PreviewThreadLauncher(videoPlayer, this);
            ioOps = new VidkaIO();
            Proj_forOriginalPlayback = new VidkaProj();
            IsFileChanged = false;

            EditOpsAll = new EditOperationAbstract[] {
                new EditOperationTrimVideo(this, UiObjects, Dimdim, editor, videoPlayer, TrimDirection.Left, ProjectDimensionsTimelineType.Main),
                new EditOperationTrimVideo(this, UiObjects, Dimdim, editor, videoPlayer, TrimDirection.Right, ProjectDimensionsTimelineType.Main),
                new EditOperationTrimVideo(this, UiObjects, Dimdim, editor, videoPlayer, TrimDirection.Left, ProjectDimensionsTimelineType.Original),
                new EditOperationTrimVideo(this, UiObjects, Dimdim, editor, videoPlayer, TrimDirection.Right, ProjectDimensionsTimelineType.Original),
                new EditOperationMoveVideo(this, UiObjects, Dimdim, editor, videoPlayer),
                new EditOperationSelectOriginalSegment(this, UiObjects, Dimdim, editor, videoPlayer),
            };
            setProjToAllEditOps(Proj);

            FileMapping = Settings.Default.DataNearProject
                ? (VidkaFileMapping)new VidkaFileMapping_proj()
                : (VidkaFileMapping)new VidkaFileMapping_resource();
            dragAndDropMan = new DragAndDropManager(editor, Proj, FileMapping);
            dragAndDropMan.MetaReadyForDraggy += dragAndDropMan_MetaReadyForDraggy;
            dragAndDropMan.MetaReadyForOutstandingVideo += dragAndDropMan_MetaReadyForOutstandingVideo;
            dragAndDropMan.MetaReadyForOutstandingAudio += dragAndDropMan_MetaReadyForOutstandingAudio;
            dragAndDropMan.ThumbOrWaveReady += dragAndDropMan_ThumbOrWaveReady;
        }
Ejemplo n.º 3
0
        public EditorLogic(IVideoShitbox editor, IVideoPlayer videoPlayer, IAudioPlayer playerAudio)
        {
            this.shitbox = editor;
            this.videoPlayer = videoPlayer;
            Proj = new VidkaProj();
            Dimdim = new ProjectDimensions(Proj);
            UiObjects = new VidkaUiStateObjects();
            previewLauncher = new PreviewThreadLauncher(videoPlayer, playerAudio, this);
            ioOps = new VidkaIO();
            Proj_forOriginalPlayback = new VidkaProj();
            IsFileChanged = false;

            FileMapping = Settings.Default.DataNearProject
                ? (VidkaFileMapping)new VidkaFileMapping_proj()
                : (VidkaFileMapping)new VidkaFileMapping_resource();
            dragAndDropMan = new DragAndDropManager(editor, Proj, FileMapping);
            dragAndDropMan.MetaReadyForDraggy += dragAndDropMan_MetaReadyForDraggy;
            dragAndDropMan.MetaReadyForOutstandingVideo += dragAndDropMan_MetaReadyForOutstandingVideo;
            dragAndDropMan.MetaReadyForOutstandingAudio += dragAndDropMan_MetaReadyForOutstandingAudio;
            dragAndDropMan.ThumbOrWaveReady += dragAndDropMan_ThumbOrWaveReady;
            dragAndDropMan.PleaseUnlockThisFile += dragAndDropMan_PleaseUnlockThisFile;

            EditOpsAll = new MouseOpAbstract[] {
                new MouseOpTrimVideo(this, UiObjects, Dimdim, editor, videoPlayer, TrimDirection.Left, ProjectDimensionsTimelineType.Main),
                new MouseOpTrimVideo(this, UiObjects, Dimdim, editor, videoPlayer, TrimDirection.Right, ProjectDimensionsTimelineType.Main),
                new MouseOpTrimVideo(this, UiObjects, Dimdim, editor, videoPlayer, TrimDirection.Left, ProjectDimensionsTimelineType.Original),
                new MouseOpTrimVideo(this, UiObjects, Dimdim, editor, videoPlayer, TrimDirection.Right, ProjectDimensionsTimelineType.Original),
                new MouseOpTrimAudio(this, UiObjects, Dimdim, editor, videoPlayer, TrimDirection.Left, ProjectDimensionsTimelineType.Audios),
                new MouseOpTrimAudio(this, UiObjects, Dimdim, editor, videoPlayer, TrimDirection.Right, ProjectDimensionsTimelineType.Audios),
                new MouseOpTrimAudio(this, UiObjects, Dimdim, editor, videoPlayer, TrimDirection.Left, ProjectDimensionsTimelineType.Original),
                new MouseOpTrimAudio(this, UiObjects, Dimdim, editor, videoPlayer, TrimDirection.Right, ProjectDimensionsTimelineType.Original),
                new MouseOpMoveVideo(this, UiObjects, Dimdim, editor, videoPlayer, MetaGenerator),
                new MouseOpMoveAudio(this, UiObjects, Dimdim, editor, videoPlayer, MetaGenerator),
                new MouseOpSelectOriginalSegment(this, UiObjects, Dimdim, editor, videoPlayer),
                new MouseOpVideoEasings(this, UiObjects, Dimdim, editor, videoPlayer, TrimDirection.Left),
                new MouseOpVideoEasings(this, UiObjects, Dimdim, editor, videoPlayer, TrimDirection.Right),
                new MouseOpLinkVideoAudio(this, UiObjects, Dimdim, editor, videoPlayer),
            };

            Ops = new _VidkaOp[]
            {
                new ExportToAvi(this),
                exportToSegment = new ExportToAvi_Segment(this),
                new PreviewAvsSegmentInMplayer_Mp5s(this),
                new PreviewAvsSegmentInMplayer_Mp5sfff(this),
                new PreviewAvsSegmentInMplayer_Mp15s(this),
                new PreviewAvsSegmentInMplayer_Mp15sfff(this),
                new PreviewAvsSegmentInMplayer_Vd15s(this),
                new RebuildProj(this),
                new SplitCurClipVideo(this),
                new SplitCurClipVideo_DeleteLeft(this),
                new SplitCurClipVideo_DeleteRight(this),
                new SplitCurClipVideo_FinalizeLeft(this),
                new ToggleMuted(this),
                new ToggleLocked(this),
                new ToggleRenderSplitPoint(this),
                new TogglePreviewMode(this),
                new ToggleConsoleVisibility(this),
                new ShowClipUsage(this),
                new DuplicateCurClip(this),
                new DeleteCurSelectedClip(this),
                new InsertSimpleTextClip(this),
                new InsertCurrentFrameStill(this),
                new LinearShuffleByFilename(this),
            };
            setProjToAllEditOps(Proj);
        }