コード例 #1
0
ファイル: VlcContext.cs プロジェクト: PlumpMath/RVS3
        /// <summary>
        /// Initialize library
        /// </summary>
        public static void Initialize()
        {
            InteropManager = new LibVlcInteropsManager(LibVlcDllsPath);
            if (IsInitialized)
            {
                throw new ApplicationException("Cannot initialize libvlc more than one time.");
            }
            var argsStringfCollection = GetBaseVlcInstanceArguments();
            var args = new string[argsStringfCollection.Count];

            argsStringfCollection.CopyTo(args, 0);
            HandleManager.LibVlcHandle = InteropManager.NewInstance.Invoke(args.Length, args);
            if (HandleManager.LibVlcHandle != IntPtr.Zero)
            {
                IsInitialized = true;
                ErrorHandling = new VlcErrorHandling();
                EventsHelper.CanRaiseEvent = true;
            }
        }
コード例 #2
0
ファイル: VlcContext.cs プロジェクト: hjlfmy/Rubezh
 /// <summary>
 /// Initialize library
 /// </summary>
 public static IntPtr Initialize()
 {
     InteropManager = new LibVlcInteropsManager(LibVlcDllsPath);
     if (IsInitialized)
         throw new ApplicationException("Cannot initialize libvlc more than one time.");
     var argsStringfCollection = GetBaseVlcInstanceArguments();
     var args = new string[argsStringfCollection.Count];
     argsStringfCollection.CopyTo(args, 0);
     HandleManager.LibVlcHandle = InteropManager.NewInstance.Invoke(args.Length, args);
     if (HandleManager.LibVlcHandle != IntPtr.Zero)
     {
         IsInitialized = true;
         ErrorHandling = new VlcErrorHandling();
         EventsHelper.CanRaiseEvent = true;
     }
     return HandleManager.LibVlcHandle;
 }