コード例 #1
0
        public void Release()
        {
            //lock (this)
            //{
            _isReleased = true;
            try
            {
                var avmode = new AVModel()
                {
                    context = FunctionEx.IntPtrToStruct <AVModel>(pAVObj).context,
                };

                lock (this)
                    ffimp_free_avobj(FunctionEx.StructToIntPtr(avmode));

                avmode = new AVModel()
                {
                    codec = FunctionEx.IntPtrToStruct <AVModel>(pAVObj).codec,
                };

                lock (this)
                    ffimp_free_avobj(FunctionEx.StructToIntPtr(avmode));
                //ffimp_free_avobj(pAVObj);
                if (_ffscale != null)
                {
                    _ffscale.Release();
                }
                Marshal.FreeHGlobal(pOutBuf);
            }
            catch (Exception e)
            {
                Console.WriteLine("ffimp error:{0}", e);
            }
            //}
        }
コード例 #2
0
 public void Release()
 {
     Stop();
     if (_scale != null)
     {
         _scale.Release();
     }
 }
コード例 #3
0
 public void Dispose()
 {
     try
     {
         if (_isworking)
         {
             Stop();
         }
         _capturer.Dispose();
         _ffscale.Release();
         _x264.Release();
         _draw.Release();
     }
     catch (Exception e)
     {
         throw;
     }
 }