public DrawVideoAudioLinkage(IVidkaOpContext context, ImageCacheManager imageMan) : base(context, imageMan) { rect = new Rectangle(); penVideoAudioLinkageGood.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot; penVideoAudioLinkageBad.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot; }
public MouseOpLinkVideoAudio(IVidkaOpContext iEditor, VidkaUiStateObjects uiObjects, ProjectDimensions dimdim, IVideoShitbox editor, IVideoPlayer videoPlayer) : base(iEditor, uiObjects, dimdim, editor, videoPlayer) { }
//current state public PreviewThreadLauncher(IVideoPlayer player, IAudioPlayer playerAudio, IVidkaOpContext editor) { this.player = player; this.playerAudio = playerAudio; this.editor = editor; mutex = new PreviewThreadMutex(); ticker = new Timer(); ticker.Tick += PlaybackTickerFunc; }
public MouseOpSelectOriginalSegment(IVidkaOpContext iEditor, VidkaUiStateObjects uiObjects, ProjectDimensions dimdim, IVideoShitbox editor, IVideoPlayer videoPlayer) : base(iEditor, uiObjects, dimdim, editor, videoPlayer) { keyboardMode = false; isStarted = false; }
public MouseOpVideoEasings(IVidkaOpContext iEditor, VidkaUiStateObjects uiObjects, ProjectDimensions dimdim, IVideoShitbox editor, IVideoPlayer videoPlayer, TrimDirection side) : base(iEditor, uiObjects, dimdim, editor, videoPlayer) { this.side = side; keyboardMode = false; }
public DrawOp(IVidkaOpContext context, ImageCacheManager imageMan) { this.context = context; this.imgCache = imageMan; if (context != null) { dimdim = context.Dimdim; fileMapping = context.FileMapping; uiObjects = context.UiObjects; } }
public MouseOpMoveVideo(IVidkaOpContext iEditor, VidkaUiStateObjects uiObjects, ProjectDimensions dimdim, IVideoShitbox editor, IVideoPlayer videoPlayer, MetaGeneratorInOtherThread metaGenerator) : base(iEditor, uiObjects, dimdim, editor, videoPlayer) { this.metaGenerator = metaGenerator; copyMode = false; keyboardMode = false; }
public MouseOpAbstract( IVidkaOpContext iEditor, VidkaUiStateObjects uiObjects, ProjectDimensions dimdim, IVideoShitbox editor, IVideoPlayer videoPlayer) { this.iEditor = iEditor; this.uiObjects = uiObjects; this.dimdim = dimdim; this.editor = editor; this.videoPlayer = videoPlayer; }
public MouseOpTrimVideo(IVidkaOpContext iEditor, VidkaUiStateObjects uiObjects, ProjectDimensions dimdim, IVideoShitbox editor, IVideoPlayer videoPlayer, TrimDirection side, ProjectDimensionsTimelineType timeline) : base(iEditor, uiObjects, dimdim, editor, videoPlayer) { this.side = side; this.timeline = timeline; keyboardMode = false; }
/// <param name="secStart">needs to be in seconds to figure out which thumb</param> /// <param name="len">needs to be in seconds to figure out which thumb</param> public void DrawClipBitmaps( Graphics g, IVidkaOpContext context, ImageCacheManager imgCache, VidkaClipVideoAbstract vclip, int x1, int y1, int clipw, int clipvh, double secStart, double len) { string thumbsFile = context.FileMapping.AddGetThumbnailFilename(vclip.FileName); //if (!File.Exists(thumbsFile)) // return; //Image origThumb = System.Drawing.Image.FromFile(thumbsFile, true); //var bmpThumb = new Bitmap(origThumb); var heightForThumbs = Math.Max(clipvh - 2 * THUMB_MARGIN_Y, ThumbnailExtraction.ThumbH); var thumbPrefWidth = heightForThumbs * ThumbnailExtraction.ThumbW / ThumbnailExtraction.ThumbH; var howManyThumbs = (clipw - THUMB_MARGIN) / (thumbPrefWidth + THUMB_MARGIN); if (howManyThumbs == 0) { howManyThumbs = 1; } var xCenteringOffset = (clipw - howManyThumbs * (thumbPrefWidth + THUMB_MARGIN)) / 2; var isStill = vclip is VidkaClipImage || vclip is VidkaClipTextSimple; // TODO: I hate this code for (int i = 0; i < howManyThumbs; i++) { //DrawVideoThumbnail( // g: g, // bmpAll: bmpThumb, // timeSec: secStart + (i + 0.5) * len / howManyThumbs, // xCenter: x1 + xCenteringOffset + i * (thumbPrefWidth + THUMB_MARGIN) + (thumbPrefWidth + THUMB_MARGIN) / 2, // yCenter: y1 + clipvh / 2, // preferredWidth: thumbPrefWidth, // maxWidth: clipw); var timeSec = secStart + (i + 0.5) * len / howManyThumbs; var imageIndex = (int)(timeSec / ThumbnailExtraction.ThumbIntervalSec); if (isStill) imageIndex = 0; DrawVideoThumbnail( g: g, imgCache: imgCache, filenameAll: thumbsFile, index: imageIndex, xCenter: x1 + xCenteringOffset + i * (thumbPrefWidth + THUMB_MARGIN) + (thumbPrefWidth + THUMB_MARGIN) / 2, yCenter: y1 + clipvh / 2, preferredWidth: thumbPrefWidth, maxWidth: clipw); } //bmpThumb.Dispose(); //origThumb.Dispose(); }
public ToggleLocked(IVidkaOpContext context) : base(context) { }
public DrawRenderBreakups(IVidkaOpContext context, ImageCacheManager imageMan) : base(context, imageMan) { penRenderBreakupLine.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash; }
public static void iiii(this IVidkaOpContext context, string text) { context.AppendToConsole(VidkaConsoleLogLevel.Info, text); }
public ShowClipUsage(IVidkaOpContext context) : base(context) { }
public Draw0Canvas(IVidkaOpContext context, ImageCacheManager imageMan) : base(context, imageMan) { }
public ToggleMuted(IVidkaOpContext context) : base(context) { }
public SplitCurClipVideo_DeleteLeft(IVidkaOpContext context) : base(context) { }
public DrawDraggySeparately(IVidkaOpContext context, ImageCacheManager imageMan) : base(context, imageMan) { }
public InsertSimpleTextClip(IVidkaOpContext context) : base(context) { }
public DrawAudioClips(IVidkaOpContext context, ImageCacheManager imageMan) : base(context, imageMan) { }
public DrawOriginalAudio(IVidkaOpContext context, ImageCacheManager imageMan) : base(context, imageMan) { }
public SplitCurClipVideo(IVidkaOpContext context) : base(context) { }
public DuplicateCurClip(IVidkaOpContext context) : base(context) { }
public LinearShuffleByFilename(IVidkaOpContext context) : base(context) { }
public PreviewAvsSegmentInMplayer_Mp5s(IVidkaOpContext context) : base(context) { }
public _VidkaOp(IVidkaOpContext context) { this.context = context; }
public static void cxzxc(this IVidkaOpContext context, string text) { context.AppendToConsole(VidkaConsoleLogLevel.Debug, text); }
public DrawVideoAudioAligns(IVidkaOpContext context, ImageCacheManager imageMan) : base(context, imageMan) { penRenderBreakupLine.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot; }
public ExportToAvi_Segment(IVidkaOpContext context) : base(context) { }
public static void eeee(this IVidkaOpContext context, string text) { context.AppendToConsole(VidkaConsoleLogLevel.Error, text); }
public SplitCurClipVideo_FinalizeLeft(IVidkaOpContext context) : base(context) { }
public InsertCurrentFrameStill(IVidkaOpContext context) : base(context) { }
public DrawVideoClips(IVidkaOpContext context, ImageCacheManager imageMan) : base(context, imageMan) { }
public PreviewAvsSegmentInMplayerAbstract(IVidkaOpContext context) : base(context) { }
public DeleteCurSelectedClip(IVidkaOpContext context) : base(context) { }
/// <summary> /// The last parameter, sec2X is used to porperly position the wave within the given x1..x1+clipw space if it is too short /// </summary> public void DrawWaveform( Graphics g, IVidkaOpContext context, ImageCacheManager imgCache, string mediaFilename, double audioLengthSec, double videoLengthSec, double audioOffsetSec, int x1, int y1, int clipw, int cliph, double secStart, double secEnd, bool isMuted, bool hasCustomAudio) { double audioT1 = (audioOffsetSec + secStart) / audioLengthSec; double audioT2 = (audioOffsetSec + secEnd) / audioLengthSec; if (audioT1 > 1) { return; } if (audioT2 < 0) { return; } string waveFile = context.FileMapping.AddGetWaveFilenameJpg(mediaFilename); if (File.Exists(waveFile)) { Bitmap bmpWave = imgCache.getWaveImg(waveFile);//Image ot double audioT1L = 0, audioT2R = 0; if (audioT1 < 0) { audioT1L = -audioT1; audioT1 = 0; } if (audioT2 > 1) { audioT2R = audioT2 - 1; audioT2 = 1; } var totalT = audioT1L + (audioT2 - audioT1) + audioT2R; var xAud1 = audioT1L * clipw / totalT; var xAud2 = (audioT1L + (audioT2 - audioT1)) * clipw / totalT; var xSrc1 = (int)(bmpWave.Width * audioT1); var xSrc2 = (int)(bmpWave.Width * audioT2); srcRect.X = xSrc1; srcRect.Width = xSrc2 - xSrc1; srcRect.Y = 0; srcRect.Height = bmpWave.Height; //TODO: use constant from Ops destRect.X = x1 + (int)xAud1; destRect.Y = y1; destRect.Width = (int)(xAud2 - xAud1); destRect.Height = cliph; g.DrawImage(bmpWave, destRect: destRect, srcRect: srcRect, srcUnit: GraphicsUnit.Pixel); } if (isMuted) { g.FillRectangle(PPP.brushHazyMute, destRect); } if (hasCustomAudio) { g.FillRectangle(PPP.brushHazyCustomAudio, destRect); } }
public ExportToAvi(IVidkaOpContext context) : base(context) { }
public SplitCurClipVideoAbstract(IVidkaOpContext context) : base(context) { }
public RemoveLinkVideoAudio(IVidkaOpContext context) : base(context) { }
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_LeftOfAClip(this IVidkaOpContext iEditor, VidkaClipAudio clip) { iEditor.SetFrameMarker_ShowFrameInPlayer(clip.FrameOffset); }
public DrawVideoHover(IVidkaOpContext context, ImageCacheManager imageMan) : base(context, imageMan) { }
public PreviewAvsSegmentInMplayer_Mp15sfff(IVidkaOpContext context) : base(context) { }
public ExportToAvi(IVidkaOpContext context) : base(context) {}
public ToggleConsoleVisibility(IVidkaOpContext context) : base(context) { }
public TogglePreviewMode(IVidkaOpContext context) : base(context) { }
public RebuildProj(IVidkaOpContext context) : base(context) { }