using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NewTek;

namespace VIZ.Framework.Common
{
    /// <summary>
    /// NDI流 静态部分
    /// </summary>
    public partial class NDIStream
    {
        /// <summary>
        /// 是否完成了初始化
        /// </summary>
        public static bool IsInited { get; private set; }

        /// <summary>
        /// 初始化
        /// </summary>
        /// <returns>是否初始化成功</returns>
        public static bool Init()
        {
            if (!NDIlib.initialize())
                return false;

            IsInited = true;

            return true;
        }

        public static void Destroy()
        {
            if (!IsInited)
                return;

            NDIlib.destroy();
        }
    }
}
