Exemplo n.º 1
0
        /// <summary>
        /// Updates the runtime context <see cref="ScriptVideoContextBase.FrameNumber"/> and <see cref="ScriptVideoContextBase.VideoPosition"/> property values
        /// and raises the <see cref="FrameChanged"/> and <see cref="SurfaceRendered"/> events.
        /// </summary>
        /// <param name="frameNumber">The current zero-based frame number of the video.</param>
        protected void OnFrameChanged(int frameNumber)
        {
            var internalContext     = InternalContext;
            int previousFrameNumber = internalContext.FrameNumber;

            internalContext.SetFrameNumberInternal(frameNumber);
            internalContext.RefreshVideoPositionInternal();

            FrameChanged?.Invoke(this, new FrameChangedEventArgs(previousFrameNumber, frameNumber));
            SurfaceRendered?.Invoke(this, new SurfaceRenderedEventArgs(SurfaceRenderPipeline.Both));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Raises the <see cref="SurfaceRendered"/> event with arguments specifying which Direct3D surface was rendered.
 /// </summary>
 /// <param name="surfaceRenderPipeline">A <see cref="SurfaceRenderPipeline"/> enum value specifying which Direct3D surface was rendered.</param>
 protected void OnSurfaceRendered(SurfaceRenderPipeline surfaceRenderPipeline)
 {
     SurfaceRendered?.Invoke(this, new SurfaceRenderedEventArgs(surfaceRenderPipeline));
 }