/// <summary>
        /// Finishes rendering to the target (closes the video file).
        /// Video rendering can not be started again from this point on.
        /// </summary>
        protected override void FinishRenderingInternal()
        {
            m_sinkWriter.NotifyEndOfSegment(m_streamIndex);
            m_sinkWriter.Finalize();

            GraphicsHelper.SafeDispose(ref m_sinkWriter);
            GraphicsHelper.SafeDispose(ref m_outStream);
            GraphicsHelper.SafeDispose(ref m_outStreamNet);
        }
Esempio n. 2
0
        private bool disposedValue = false; // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    sinkWriter.NotifyEndOfSegment(streamIndex);
                    if (frameIndex > 0)
                    {
                        sinkWriter.Finalize();
                    }

                    sinkWriter.Dispose();
                    sinkWriter = null;
                }

                disposedValue = true;
            }
        }