示例#1
0
        internal VlcMediaInstance(VlcManager manager, IntPtr pointer)
            : base(pointer)
        {
            myManager = manager;

            try
            {
                Monitor.TryEnter(_lock, 5000);
                {
                    if (pointer != IntPtr.Zero)
                    {
                        // keep a reference count for the media instance
                        if (!sInstanceCount.ContainsKey(pointer))
                            sInstanceCount[pointer] = 1;
                        else
                            sInstanceCount[pointer] = sInstanceCount[pointer] + 1;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                Monitor.Exit(_lock);
            }
        }
示例#2
0
 public static VlcManager GetInstance(DirectoryInfo dynamicLinkLibrariesPath)
 {
     if (!myAllInstance.ContainsKey(dynamicLinkLibrariesPath))
     {
         myAllInstance[dynamicLinkLibrariesPath] = new VlcManager(dynamicLinkLibrariesPath);
     }
     return(myAllInstance[dynamicLinkLibrariesPath]);
 }
示例#3
0
 public static VlcMediaInstance New(VlcManager manager, IntPtr pointer)
 {
     var instance = allInstances.Find(delegate(VlcMediaInstance i)
     {
         return i == pointer;
     });
     if (null == instance)
     {
         instance = new VlcMediaInstance(manager, pointer);
         allInstances.Add(instance);
     }
     return instance;
 }
 internal VlcMediaInstance(VlcManager manager, IntPtr pointer)
     : base(pointer)
 {
     myManager = manager;
     if (pointer != IntPtr.Zero)
     {
         // keep a reference count for the media instance
         if (!sInstanceCount.ContainsKey(pointer))
             sInstanceCount[pointer] = 1;
         else
             sInstanceCount[pointer] = sInstanceCount[pointer] + 1;
     }
 }
示例#5
0
        public static VlcMediaInstance New(VlcManager manager, IntPtr pointer)
        {
            var instance = allInstances.Find(delegate(VlcMediaInstance i)
            {
                return(i == pointer);
            });

            if (null == instance)
            {
                instance = new VlcMediaInstance(manager, pointer);
                allInstances.Add(instance);
            }
            return(instance);
        }
示例#6
0
        public static VlcMediaInstance New(VlcManager manager, IntPtr pointer)
        {
            lock (AllInstances)
            {
                AllInstances.TryGetValue(pointer, out var instance);

                if (null == instance)
                {
                    instance = new VlcMediaInstance(manager, pointer);
                    AllInstances.Add(pointer, instance);
                }

                return(instance);
            }
        }
示例#7
0
        public static VlcManager GetInstance(DirectoryInfo dynamicLinkLibrariesPath)
        {
            VlcManager manager = null;
            try
            {
                Monitor.TryEnter(_lock, 5000);
                {
                    if (!myAllInstance.ContainsKey(dynamicLinkLibrariesPath))
                        myAllInstance[dynamicLinkLibrariesPath] = new VlcManager(dynamicLinkLibrariesPath);

                    manager = myAllInstance[dynamicLinkLibrariesPath];
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                Monitor.Exit(_lock);
            }

            return manager;
        }
示例#8
0
 internal VlcMediaInstance(VlcManager manager, IntPtr pointer) : base(pointer)
 {
     myManager = manager;
 }
示例#9
0
 private VlcMediaInstance(VlcManager manager, IntPtr pointer) : base(pointer)
 {
     myManager = manager;
 }
示例#10
0
 internal VlcMediaEventManagerInstance(VlcManager manager, IntPtr pointer)
     : base(manager, pointer)
 {
 }
 internal VlcMediaPlayerInstance(VlcManager manager, IntPtr pointer) : base(pointer)
 {
     _manager = manager;
 }
        public static VlcMediaInstance AddOptionToMedia(this VlcMediaInstance mediaInstance, VlcManager manager, string[] option)
#endif
        {
            manager.AddOptionToMedia(mediaInstance, option);
            return mediaInstance;
        }
 internal VlcEventManagerInstance(VlcManager manager, IntPtr pointer) : base(pointer)
 {
     myManager = manager;
 }
 public static VlcMediaInstance AddOptionToMedia(this VlcMediaInstance mediaInstance, VlcManager manager, string option)
 {
     manager.AddOptionToMedia(mediaInstance, option);
     return(mediaInstance);
 }
 public static VlcMediaInstance AddOptionToMedia(VlcMediaInstance mediaInstance, VlcManager manager, string option)
 internal VlcMediaPlayerInstance(VlcManager manager, IntPtr pointer) : base(pointer)
 {
     myManager = manager;
 }
 public static VlcManager GetInstance(DirectoryInfo dynamicLinkLibrariesPath)
 {
     if (!myAllInstance.ContainsKey(dynamicLinkLibrariesPath))
         myAllInstance[dynamicLinkLibrariesPath] = new VlcManager(dynamicLinkLibrariesPath);
     return myAllInstance[dynamicLinkLibrariesPath];
 }
 internal VlcEventManagerInstance(VlcManager manager, IntPtr pointer) : base(pointer)
 {
     myManager = manager;
 }
 internal VlcMediaEventManagerInstance(VlcManager manager, IntPtr pointer)
     : base(manager, pointer)
 {
 }
 public static VlcMediaInstance AddOptionToMedia(VlcMediaInstance mediaInstance, VlcManager manager, string option)