/////////////////////////////////////////////////////////////////////////////// // Construction and Initializing methods // /////////////////////////////////////////////////////////////////////////////// #region CONSTRUCTION /// <summary> /// Initializes a new instance of the ImageFromVectorGraphics class. /// </summary> /// <param name="newVideoProperties">A <see cref="CaptureDeviceProperties"/> with the properties to use for this object.</param> /// <param name="newSectionStartTime">A <see cref="long"/> with the start time of the video section.</param> /// <param name="newSectionEndTime">A <see cref="long"/> with the end time of the video section.</param> /// <param name="newVideoFramePusher">A <see cref="VideoFramePusher"/> that populates the image with a background video frame.</param> /// <param name="newImageRenderer">The <see cref="Ogama.Modules.Replay.ReplayPicture.RenderFrameHandler"/> that is the delegate to get the images from.</param> public ImageFromVectorGraphics( CaptureDeviceProperties newVideoProperties, long newSectionStartTime, long newSectionEndTime, VideoFramePusher newVideoFramePusher, Ogama.Modules.Replay.ReplayPicture.RenderFrameHandler newImageRenderer) { int fps = newVideoProperties.FrameRate; this.framesPerSecond = UNIT / fps; this.frameTimeSpan = (int)(1000f / fps); this.videoSize = newVideoProperties.VideoSize; this.sectionStartTime = newSectionStartTime; this.sectionEndTime = newSectionEndTime; this.videoFramePusher = newVideoFramePusher; this.imageRenderer = newImageRenderer; }
/////////////////////////////////////////////////////////////////////////////// // Inherited methods // /////////////////////////////////////////////////////////////////////////////// #region OVERRIDES /// <summary> /// Initialize custom elements /// </summary> protected override void InitializeCustomElements() { base.InitializeCustomElements(); this.btnHelp.Click += new EventHandler(this.btnHelp_Click); this.pnlCanvas.Resize += new EventHandler(this.pnlCanvas_Resize); this.videoFramePusher = new VideoFramePusher(); this.videoFramePusher.VideoFrameAvailable += new BitmapEventHandler(this.videoFramePusher_VideoFrameAvailable); }