Ejemplo n.º 1
0
        public bool IsFileReady()
        {
            bool result = true;

            if (_handle >= 0)
            {
                result = NativePlugin.IsFileWritingComplete(_handle);
                if (result)
                {
                    if (_videoEncodingHints != null)
                    {
                        result = StartPostProcess();
                        _videoEncodingHints = null;
                    }
                    if (_postProcessEvent != null)
                    {
                        result = _postProcessEvent.WaitOne(1);
                    }
                    if (result)
                    {
                        Dispose();
                    }
                }
            }
            return(result);
        }
Ejemplo n.º 2
0
        public void Dispose()
        {
            if (_handle >= 0)
            {
                NativePlugin.FreeRecorder(_handle);
                _handle = -1;

                // Issue the free resources plugin event
                NativePlugin.RenderThreadEvent(NativePlugin.PluginEvent.FreeResources, -1);
            }

            _videoEncodingHints = null;
            _postProcessEvent   = null;
        }
Ejemplo n.º 3
0
 internal void AddPostOperation(VideoEncoderHints videoEncodingHints)
 {
     _videoEncodingHints = videoEncodingHints;
 }
Ejemplo n.º 4
0
 public static extern int CreateRecorderVideo([MarshalAs(UnmanagedType.LPWStr)] string filename, uint width, uint height, float frameRate, int format,
                                              [MarshalAs(UnmanagedType.U1)] bool isRealTime, [MarshalAs(UnmanagedType.U1)] bool isTopDown, int videoCodecIndex,
                                              AudioCaptureSource audioSource, int audioSampleRate, int audioChannelCount, int audioInputDeviceIndex, int audioCodecIndex,
                                              [MarshalAs(UnmanagedType.U1)] bool forceGpuFlush, VideoEncoderHints hints);