コード例 #1
0
 internal LibVlcMedia(IntPtr libVlcDllHandle, Version vlcVersion)
 {
     NewInstanceFromLocation = new LibVlcFunction<Signatures.LibVlc.Media.NewFromLocation>(libVlcDllHandle, vlcVersion);
     NewInstanceFromPath = new LibVlcFunction<Signatures.LibVlc.Media.NewFromPath>(libVlcDllHandle, vlcVersion);
     NewInstanceFromFileDescriptor = new LibVlcFunction<Signatures.LibVlc.Media.NewFromFileDescriptor>(libVlcDllHandle, vlcVersion);
     NewInstanceEmpty = new LibVlcFunction<Signatures.LibVlc.Media.NewEmpty>(libVlcDllHandle, vlcVersion);
     AddOption = new LibVlcFunction<Signatures.LibVlc.Media.AddOption>(libVlcDllHandle, vlcVersion);
     AddOptionFlag = new LibVlcFunction<Signatures.LibVlc.Media.AddOptionFlag>(libVlcDllHandle, vlcVersion);
     RetainInstance = new LibVlcFunction<Signatures.LibVlc.Media.RetainInstance>(libVlcDllHandle, vlcVersion);
     ReleaseInstance = new LibVlcFunction<Signatures.LibVlc.Media.ReleaseInstance>(libVlcDllHandle, vlcVersion);
     GetMrl = new LibVlcFunction<Signatures.LibVlc.Media.GetMrl>(libVlcDllHandle, vlcVersion);
     Duplicate = new LibVlcFunction<Signatures.LibVlc.Media.Duplicate>(libVlcDllHandle, vlcVersion);
     GetMetadata = new LibVlcFunction<Signatures.LibVlc.Media.GetMetadata>(libVlcDllHandle, vlcVersion);
     SetMetadata = new LibVlcFunction<Signatures.LibVlc.Media.SetMetadata>(libVlcDllHandle, vlcVersion);
     SaveMetadatas = new LibVlcFunction<Signatures.LibVlc.Media.SaveMetadatas>(libVlcDllHandle, vlcVersion);
     GetState = new LibVlcFunction<Signatures.LibVlc.Media.GetState>(libVlcDllHandle, vlcVersion);
     GetStats = new LibVlcFunction<Signatures.LibVlc.Media.GetStats>(libVlcDllHandle, vlcVersion);
     GetSubItems = new LibVlcFunction<Signatures.LibVlc.Media.GetSubItems>(libVlcDllHandle, vlcVersion);
     EventManager = new LibVlcFunction<Signatures.LibVlc.Media.EventManager>(libVlcDllHandle, vlcVersion);
     GetDuration = new LibVlcFunction<Signatures.LibVlc.Media.GetDuration>(libVlcDllHandle, vlcVersion);
     Parse = new LibVlcFunction<Signatures.LibVlc.Media.Parse>(libVlcDllHandle, vlcVersion);
     ParseAsync = new LibVlcFunction<Signatures.LibVlc.Media.ParseAsync>(libVlcDllHandle, vlcVersion);
     IsParsed = new LibVlcFunction<Signatures.LibVlc.Media.IsParsed>(libVlcDllHandle, vlcVersion);
     SetUserData = new LibVlcFunction<Signatures.LibVlc.Media.SetUserData>(libVlcDllHandle, vlcVersion);
     GetUserData = new LibVlcFunction<Signatures.LibVlc.Media.GetUserData>(libVlcDllHandle, vlcVersion);
     GetTrackInfo = new LibVlcFunction<Signatures.LibVlc.Media.GetTrackInfo>(libVlcDllHandle, vlcVersion);
 }
コード例 #2
0
ファイル: VlcMedia.cs プロジェクト: kgloveyou/xZune.Vlc
 /// <summary>
 /// 载入 LibVlc 的 Media 模块,该方法会在 <see cref="Vlc.LoadLibVlc()"/> 中自动被调用
 /// </summary>
 /// <param name="libHandle"></param>
 /// <param name="libVersion"></param>
 /// <param name="devString"></param>
 public static void LoadLibVlc(IntPtr libHandle, Version libVersion, String devString)
 {
     if (!IsLibLoaded)
     {
         _addOptionFunction           = new LibVlcFunction <MediaAddOption>(libHandle, libVersion, devString);
         _addOptionFlagFunction       = new LibVlcFunction <MediaAddOptionFlag>(libHandle, libVersion, devString);
         _duplicateFunction           = new LibVlcFunction <MediaDuplicate>(libHandle, libVersion, devString);
         _getEventManagerFunction     = new LibVlcFunction <GetEventManager>(libHandle, libVersion, devString);
         _getCodecDescriptionFunction = new LibVlcFunction <GetCodecDescription>(libHandle, libVersion, devString);
         _getDurationFunction         = new LibVlcFunction <GetDuration>(libHandle, libVersion, devString);
         _getMetaFunction             = new LibVlcFunction <GetMeta>(libHandle, libVersion, devString);
         _getMrlFunction                        = new LibVlcFunction <GetMrl>(libHandle, libVersion, devString);
         _getStateFunction                      = new LibVlcFunction <GetState>(libHandle, libVersion, devString);
         _getStatsFunction                      = new LibVlcFunction <GetStats>(libHandle, libVersion, devString);
         _getTracksInfoFunction                 = new LibVlcFunction <GetTracksInfo>(libHandle, libVersion, devString);
         _getUserDataFunction                   = new LibVlcFunction <GetUserData>(libHandle, libVersion, devString);
         _isParsedFunction                      = new LibVlcFunction <IsParsed>(libHandle, libVersion, devString);
         _createMediaAsNewNodeFunction          = new LibVlcFunction <CreateMediaAsNewNode>(libHandle, libVersion, devString);
         _createMediaFormFileDescriptorFunction = new LibVlcFunction <CreateMediaFormFileDescriptor>(libHandle, libVersion, devString);
         _createMediaFormLocationFunction       = new LibVlcFunction <CreateMediaFormLocation>(libHandle, libVersion, devString);
         _createMediaFormPathFunction           = new LibVlcFunction <CreateMediaFormPath>(libHandle, libVersion, devString);
         _parseMediaFunction                    = new LibVlcFunction <ParseMedia>(libHandle, libVersion, devString);
         _parseMediaAsyncFunction               = new LibVlcFunction <ParseMediaAsync>(libHandle, libVersion, devString);
         _parseMediaWithOptionAsyncFunction     = new LibVlcFunction <ParseMediaWithOptionAsync>(libHandle, libVersion, devString);
         _releaseMediaFunction                  = new LibVlcFunction <ReleaseMedia>(libHandle, libVersion, devString);
         _retainMediaFunction                   = new LibVlcFunction <RetainMedia>(libHandle, libVersion, devString);
         _saveMetaFunction                      = new LibVlcFunction <SaveMeta>(libHandle, libVersion, devString);
         _setMetaFunction                       = new LibVlcFunction <SetMeta>(libHandle, libVersion, devString);
         _setUserDataFunction                   = new LibVlcFunction <SetUserData>(libHandle, libVersion, devString);
         _getSubitemsFunction                   = new LibVlcFunction <GetSubitems>(libHandle, libVersion, devString);
         _getTracksFunction                     = new LibVlcFunction <GetTracks>(libHandle, libVersion, devString);
         _releaseTracksFunction                 = new LibVlcFunction <ReleaseTracks>(libHandle, libVersion, devString);
         IsLibLoaded = true;
     }
 }
コード例 #3
0
        /// <summary>
        ///     Load LibVlc of Media Module,
        ///     This method will be called automatically in <see cref="Vlc.LoadLibVlc()" />
        /// </summary>
        /// <param name="libHandle"></param>
        /// <param name="libVersion"></param>
        /// <param name="devString"></param>
        internal static void LoadLibVlc()
        {
            if (!IsLibLoaded)
            {
                _addOptionFunction           = new LibVlcFunction <MediaAddOption>();
                _addOptionFlagFunction       = new LibVlcFunction <MediaAddOptionFlag>();
                _duplicateFunction           = new LibVlcFunction <MediaDuplicate>();
                _getEventManagerFunction     = new LibVlcFunction <GetEventManager>();
                _getCodecDescriptionFunction = new LibVlcFunction <GetCodecDescription>();
                _getDurationFunction         = new LibVlcFunction <GetDuration>();
                _getMetaFunction             = new LibVlcFunction <GetMeta>();
                _getMrlFunction                        = new LibVlcFunction <GetMrl>();
                _getStateFunction                      = new LibVlcFunction <GetState>();
                _getStatsFunction                      = new LibVlcFunction <GetStats>();
                _getTracksInfoFunction                 = new LibVlcFunction <GetTracksInfo>();
                _getUserDataFunction                   = new LibVlcFunction <GetUserData>();
                _isParsedFunction                      = new LibVlcFunction <IsParsed>();
                _createMediaAsNewNodeFunction          = new LibVlcFunction <CreateMediaAsNewNode>();
                _createMediaFromFileDescriptorFunction = new LibVlcFunction <CreateMediaFromFileDescriptor>();
                _createMediaFromLocationFunction       = new LibVlcFunction <CreateMediaFromLocation>();
                _createMediaFromPathFunction           = new LibVlcFunction <CreateMediaFromPath>();

                _parseMediaFunction                = new LibVlcFunction <ParseMedia>();
                _parseMediaAsyncFunction           = new LibVlcFunction <ParseMediaAsync>();
                _parseMediaWithOptionAsyncFunction = new LibVlcFunction <ParseMediaWithOptionAsync>();
                _releaseMediaFunction              = new LibVlcFunction <ReleaseMedia>();
                _retainMediaFunction               = new LibVlcFunction <RetainMedia>();
                _saveMetaFunction    = new LibVlcFunction <SaveMeta>();
                _setMetaFunction     = new LibVlcFunction <SetMeta>();
                _setUserDataFunction = new LibVlcFunction <SetUserData>();
                _getSubitemsFunction = new LibVlcFunction <GetSubitems>();
                _getTracksFunction   = new LibVlcFunction <GetTracks>();
                IsLibLoaded          = true;
            }
        }
コード例 #4
0
ファイル: VlcError.cs プロジェクト: s-arash/xZune.Vlc
 internal static void LoadLibVlc()
 {
     if (!IsLibLoaded)
     {
         _errorMessageFunction = new LibVlcFunction <ErrorMessage>();
         _cleanErrorFunction   = new LibVlcFunction <CleanError>();
         IsLibLoaded           = true;
     }
 }
コード例 #5
0
ファイル: VlcError.cs プロジェクト: TheThing/FiloStreamer
 /// <summary>
 /// 载入 LibVlc 的 Error 模块,该方法会在 <see cref="Vlc.LoadLibVlc"/> 中自动被调用
 /// </summary>
 /// <param name="libHandle"></param>
 /// <param name="libVersion"></param>
 public static void LoadLibVlc(IntPtr libHandle, Version libVersion, String devString)
 {
     if (!IsLibLoaded)
     {
         ErrorMessageFunction = new LibVlcFunction<ErrorMessage>(libHandle, libVersion, devString);
         CleanErrorFunction = new LibVlcFunction<CleanError>(libHandle, libVersion, devString);
         IsLibLoaded = true;
     }
 }
コード例 #6
0
 /// <summary>
 /// 载入 LibVlc 的 Error 模块,该方法会在 <see cref="Vlc.LoadLibVlc"/> 中自动被调用
 /// </summary>
 /// <param name="libHandle"></param>
 /// <param name="libVersion"></param>
 public static void LoadLibVlc(IntPtr libHandle, Version libVersion, String devString)
 {
     if (!IsLibLoaded)
     {
         ErrorMessageFunction = new LibVlcFunction <ErrorMessage>(libHandle, libVersion, devString);
         CleanErrorFunction   = new LibVlcFunction <CleanError>(libHandle, libVersion, devString);
         IsLibLoaded          = true;
     }
 }
コード例 #7
0
ファイル: VlcError.cs プロジェクト: birbilis/Meta.Vlc
 internal static void LoadLibVlc()
 {
     if (!IsLibLoaded)
     {
         _errorMessageFunction = new LibVlcFunction<ErrorMessage>();
         _cleanErrorFunction = new LibVlcFunction<CleanError>();
         IsLibLoaded = true;
     }
 }
コード例 #8
0
ファイル: VlcEventManager.cs プロジェクト: birbilis/Meta.Vlc
 internal static void LoadLibVlc()
 {
     if (!IsLibLoaded)
     {
         _eventAttachFunction = new LibVlcFunction<EventAttach>();
         _eventDetachFunction = new LibVlcFunction<EventDetach>();
         _getTypeNameFunction = new LibVlcFunction<GetTypeName>();
         IsLibLoaded = true;
     }
 }
コード例 #9
0
 /// <summary>
 /// 载入 LibVlc 的 Event 模块,该方法会在 <see cref="Vlc.LoadLibVlc"/> 中自动被调用
 /// </summary>
 /// <param name="libHandle"></param>
 /// <param name="libVersion"></param>
 public static void LoadLibVlc(IntPtr libHandle, Version libVersion, String devString)
 {
     if (!IsLibLoaded)
     {
         EventAttachFunction = new LibVlcFunction <EventAttach>(libHandle, libVersion, devString);
         EventDetachFunction = new LibVlcFunction <EventDetach>(libHandle, libVersion, devString);
         GetTypeNameFunction = new LibVlcFunction <GetTypeName>(libHandle, libVersion, devString);
         IsLibLoaded         = true;
     }
 }
コード例 #10
0
ファイル: VlcEventManager.cs プロジェクト: galenus/xZune.Vlc
 /// <summary>
 /// 载入 LibVlc 的 Event 模块,该方法会在 <see cref="Vlc.LoadLibVlc()"/> 中自动被调用
 /// </summary>
 /// <param name="libHandle"></param>
 /// <param name="libVersion"></param>
 /// <param name="devString"></param>
 public static void LoadLibVlc(IntPtr libHandle, Version libVersion, String devString)
 {
     if (!IsLibLoaded)
     {
         _eventAttachFunction = new LibVlcFunction<EventAttach>(libHandle, libVersion, devString);
         _eventDetachFunction = new LibVlcFunction<EventDetach>(libHandle, libVersion, devString);
         _getTypeNameFunction = new LibVlcFunction<GetTypeName>(libHandle, libVersion, devString);
         IsLibLoaded = true;
     }
 }
コード例 #11
0
 internal static void LoadLibVlc()
 {
     if (!IsLibLoaded)
     {
         _eventAttachFunction = new LibVlcFunction <EventAttach>();
         _eventDetachFunction = new LibVlcFunction <EventDetach>();
         _getTypeNameFunction = new LibVlcFunction <GetTypeName>();
         IsLibLoaded          = true;
     }
 }
コード例 #12
0
ファイル: LibVlcLogging.cs プロジェクト: hjlfmy/Rubezh
 public void Dispose()
 {
     GetVerbosity = null;
     SetVerbosity = null;
     Open = null;
     Count = null;
     Close = null;
     Clear = null;
     GetIterator = null;
     HasNext = null;
     FreeInstance = null;
     Next = null;
 }
コード例 #13
0
ファイル: LibVlcLogging.cs プロジェクト: hjlfmy/Rubezh
 internal LibVlcLogging(IntPtr myLibVlcDllHandle, Version vlcVersion)
 {
     GetVerbosity = new LibVlcFunction<Signatures.LibVlc.Logging.GetVerbosity>(myLibVlcDllHandle, vlcVersion);
     SetVerbosity = new LibVlcFunction<Signatures.LibVlc.Logging.SetVerbosity>(myLibVlcDllHandle, vlcVersion);
     Open = new LibVlcFunction<Signatures.LibVlc.Logging.Open>(myLibVlcDllHandle, vlcVersion);
     Close = new LibVlcFunction<Signatures.LibVlc.Logging.Close>(myLibVlcDllHandle, vlcVersion);
     Count = new LibVlcFunction<Signatures.LibVlc.Logging.Count>(myLibVlcDllHandle, vlcVersion);
     Clear = new LibVlcFunction<Signatures.LibVlc.Logging.Clear>(myLibVlcDllHandle, vlcVersion);
     GetIterator = new LibVlcFunction<Signatures.LibVlc.Logging.GetIterator>(myLibVlcDllHandle, vlcVersion);
     HasNext = new LibVlcFunction<Signatures.LibVlc.Logging.HasNext>(myLibVlcDllHandle, vlcVersion);
     FreeInstance = new LibVlcFunction<Signatures.LibVlc.Logging.FreeInstance>(myLibVlcDllHandle, vlcVersion);
     Next = new LibVlcFunction<Signatures.LibVlc.Logging.Next>(myLibVlcDllHandle, vlcVersion);
 }
コード例 #14
0
ファイル: LibVlcMediaPlayer.cs プロジェクト: hjlfmy/Rubezh
        internal LibVlcMediaPlayer(IntPtr libVlcDllHandle, Version vlcVersion)
        {
            NewInstance = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.NewInstance>(libVlcDllHandle, vlcVersion);
            NewInstanceFromMedia = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.NewInstanceFromMedia>(libVlcDllHandle, vlcVersion);
            ReleaseInstance = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.ReleaseInstance>(libVlcDllHandle, vlcVersion);
            RetainInstance = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.RetainInstance>(libVlcDllHandle, vlcVersion);
            SetMedia = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.SetMedia>(libVlcDllHandle, vlcVersion);
            GetMedia = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.GetMedia>(libVlcDllHandle, vlcVersion);
            EventManagerNewIntance = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.EventManager>(libVlcDllHandle, vlcVersion);
            IsPlaying = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.IsPlaying>(libVlcDllHandle, vlcVersion);
            Play = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Play>(libVlcDllHandle, vlcVersion);
            SetPause = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.SetPause>(libVlcDllHandle, vlcVersion);
            Pause = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Pause>(libVlcDllHandle, vlcVersion);
            Stop = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Stop>(libVlcDllHandle, vlcVersion);
            SetHwnd = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.SetHwnd>(libVlcDllHandle, vlcVersion);
            GetHwnd = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.GetHwnd>(libVlcDllHandle, vlcVersion);
            GetLength = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.GetLength>(libVlcDllHandle, vlcVersion);
            GetTime = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.GetTime>(libVlcDllHandle, vlcVersion);
            SetTime = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.SetTime>(libVlcDllHandle, vlcVersion);
            GetPosition = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.GetPosition>(libVlcDllHandle, vlcVersion);
            SetPosition = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.SetPosition>(libVlcDllHandle, vlcVersion);
            SetChapter = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.SetChapter>(libVlcDllHandle, vlcVersion);
            GetChapter = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.GetChapter>(libVlcDllHandle, vlcVersion);
            GetChapterCount = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.GetChapterCount>(libVlcDllHandle, vlcVersion);
            WillPlay = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.WillPlay>(libVlcDllHandle, vlcVersion);
            GetChapterCountForTitle = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.GetChapterCountForTitle>(libVlcDllHandle, vlcVersion);
            SetTitle = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.SetTitle>(libVlcDllHandle, vlcVersion);
            GetTitle = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.GetTitle>(libVlcDllHandle, vlcVersion);
            GetTitleCount = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.GetTitleCount>(libVlcDllHandle, vlcVersion);
            SetPreviousChapter = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.SetPreviousChapter>(libVlcDllHandle, vlcVersion);
            SetNextChapter = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.SetNextChapter>(libVlcDllHandle, vlcVersion);
            GetRate = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.GetRate>(libVlcDllHandle, vlcVersion);
            SetRate = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.SetRate>(libVlcDllHandle, vlcVersion);
            GetState = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.GetState>(libVlcDllHandle, vlcVersion);
            GetFPS = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.GetFPS>(libVlcDllHandle, vlcVersion);
            HasVideoOut = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.HasVideoOut>(libVlcDllHandle, vlcVersion);
            IsSeekable = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.IsSeekable>(libVlcDllHandle, vlcVersion);
            IsPausable = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.IsPausable>(libVlcDllHandle, vlcVersion);
            NextFrame = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.NextFrame>(libVlcDllHandle, vlcVersion);
            Navigate = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Navigate>(libVlcDllHandle, vlcVersion);
            ReleaseTrackDescriptionList = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.ReleaseTrackDescriptionList>(libVlcDllHandle, vlcVersion);

            VideoInterops = new LibVlcMediaPlayerVideo(libVlcDllHandle, vlcVersion);
            AudioInterops = new LibVlcMediaPlayerAudio(libVlcDllHandle, vlcVersion);
        }
コード例 #15
0
ファイル: Vlc.cs プロジェクト: Greaky/xZune.Vlc
        /// <summary>
        /// 使用已经设定好的路径,载入 LibVlc
        /// </summary>
        public static void LoadLibVlc()
        {
            if (!IsLibLoaded)
            {
                try
                {
                    FileInfo libcore = new FileInfo(Path.Combine(LibDirectory, @"libvlccore.dll"));
                    FileInfo libvlc = new FileInfo(Path.Combine(LibDirectory, @"libvlc.dll"));
                    LibCoreHandle = Win32Api.LoadLibrary(libcore.FullName);
                    LibHandle = Win32Api.LoadLibrary(libvlc.FullName);
                }
                catch (Win32Exception e)
                {
                    throw new Exception("无法载入 LibVlc 库", e);
                }

                _getVersionFunction = new LibVlcFunction<GetVersion>(LibHandle);
                var versionString = InteropHelper.PtrToString(_getVersionFunction.Delegate());
                var match = Regex.Match(versionString, "^[0-9.]*");
                if (match.Success)
                {
                    LibVersion = new Version(match.Groups[0].Value);
                }
                var devString = LibDev = versionString.Split(' ', '-')[1];
                _newInstanceFunction = new LibVlcFunction<NewInstance>(LibHandle, LibVersion, devString);
                _releaseInstanceFunction = new LibVlcFunction<ReleaseInstance>(LibHandle, LibVersion, devString);
                _retainInstanceFunction = new LibVlcFunction<RetainInstance>(LibHandle, LibVersion, devString);
                _addInterfaceFunction = new LibVlcFunction<AddInterface>(LibHandle, LibVersion, devString);
                _setExitHandlerFunction = new LibVlcFunction<SetExitHandler>(LibHandle, LibVersion, devString);
                _waitFunction = new LibVlcFunction<Wait>(LibHandle, LibVersion, devString);
                _setUserAgentFunction = new LibVlcFunction<SetUserAgent>(LibHandle, LibVersion, devString);
                _setAppIdFunction = new LibVlcFunction<SetAppId>(LibHandle, LibVersion, devString);
                _getCompilerFunction = new LibVlcFunction<GetCompiler>(LibHandle, LibVersion, devString);
                _getChangesetFunction = new LibVlcFunction<GetChangeset>(LibHandle, LibVersion, devString);
                _freeFunction = new LibVlcFunction<Free>(LibHandle, LibVersion, devString);
                _releaseLibVlcModuleDescriptionFunction = new LibVlcFunction<ReleaseLibVlcModuleDescription>(LibHandle, LibVersion, devString);
                _getAudioFilterListFunction = new LibVlcFunction<GetAudioFilterList>(LibHandle, LibVersion, devString);
                _getVideoFilterListFunction = new LibVlcFunction<GetVideoFilterList>(LibHandle, LibVersion, devString);
                VlcError.LoadLibVlc(LibHandle, LibVersion, devString);
                VlcEventManager.LoadLibVlc(LibHandle, LibVersion, devString);
                VlcMedia.LoadLibVlc(LibHandle, LibVersion, devString);
                VlcMediaPlayer.LoadLibVlc(LibHandle, LibVersion, devString);
                IsLibLoaded = true;
            }
        }
コード例 #16
0
ファイル: Vlc.cs プロジェクト: kgloveyou/xZune.Vlc
        /// <summary>
        /// 使用已经设定好的路径,载入 LibVlc
        /// </summary>
        public static void LoadLibVlc()
        {
            if (!IsLibLoaded)
            {
                try
                {
                    FileInfo libcore = new FileInfo(Path.Combine(LibDirectory, @"libvlccore.dll"));
                    FileInfo libvlc  = new FileInfo(Path.Combine(LibDirectory, @"libvlc.dll"));
                    LibCoreHandle = Win32Api.LoadLibrary(libcore.FullName);
                    LibHandle     = Win32Api.LoadLibrary(libvlc.FullName);
                }
                catch (Win32Exception e)
                {
                    throw new Exception("无法载入 LibVlc 库", e);
                }

                _getVersionFunction = new LibVlcFunction <GetVersion>(LibHandle);
                var versionString = InteropHelper.PtrToString(_getVersionFunction.Delegate());
                var match         = Regex.Match(versionString, "^[0-9.]*");
                if (match.Success)
                {
                    LibVersion = new Version(match.Groups[0].Value);
                }
                var devString = LibDev = versionString.Split(' ', '-')[1];
                _newInstanceFunction     = new LibVlcFunction <NewInstance>(LibHandle, LibVersion, devString);
                _releaseInstanceFunction = new LibVlcFunction <ReleaseInstance>(LibHandle, LibVersion, devString);
                _retainInstanceFunction  = new LibVlcFunction <RetainInstance>(LibHandle, LibVersion, devString);
                _addInterfaceFunction    = new LibVlcFunction <AddInterface>(LibHandle, LibVersion, devString);
                _setExitHandlerFunction  = new LibVlcFunction <SetExitHandler>(LibHandle, LibVersion, devString);
                _waitFunction            = new LibVlcFunction <Wait>(LibHandle, LibVersion, devString);
                _setUserAgentFunction    = new LibVlcFunction <SetUserAgent>(LibHandle, LibVersion, devString);
                _setAppIdFunction        = new LibVlcFunction <SetAppId>(LibHandle, LibVersion, devString);
                _getCompilerFunction     = new LibVlcFunction <GetCompiler>(LibHandle, LibVersion, devString);
                _getChangesetFunction    = new LibVlcFunction <GetChangeset>(LibHandle, LibVersion, devString);
                _freeFunction            = new LibVlcFunction <Free>(LibHandle, LibVersion, devString);
                _releaseLibVlcModuleDescriptionFunction = new LibVlcFunction <ReleaseLibVlcModuleDescription>(LibHandle, LibVersion, devString);
                _getAudioFilterListFunction             = new LibVlcFunction <GetAudioFilterList>(LibHandle, LibVersion, devString);
                _getVideoFilterListFunction             = new LibVlcFunction <GetVideoFilterList>(LibHandle, LibVersion, devString);
                VlcError.LoadLibVlc(LibHandle, LibVersion, devString);
                VlcEventManager.LoadLibVlc(LibHandle, LibVersion, devString);
                VlcMedia.LoadLibVlc(LibHandle, LibVersion, devString);
                VlcMediaPlayer.LoadLibVlc(LibHandle, LibVersion, devString);
                IsLibLoaded = true;
            }
        }
コード例 #17
0
 internal LibVlcMediaList(IntPtr libVlcDllHandle, Version vlcVersion)
 {
     NewInstance = new LibVlcFunction<Signatures.LibVlc.MediaList.NewInstance>(libVlcDllHandle, vlcVersion);
     ReleaseInstance = new LibVlcFunction<Signatures.LibVlc.MediaList.ReleaseInstance>(libVlcDllHandle, vlcVersion);
     RetainInstance = new LibVlcFunction<Signatures.LibVlc.MediaList.RetainInstance>(libVlcDllHandle, vlcVersion);
     SetMedia = new LibVlcFunction<Signatures.LibVlc.MediaList.SetMedia>(libVlcDllHandle, vlcVersion);
     GetMedia = new LibVlcFunction<Signatures.LibVlc.MediaList.GetMedia>(libVlcDllHandle, vlcVersion);
     AddMedia = new LibVlcFunction<Signatures.LibVlc.MediaList.AddMedia>(libVlcDllHandle, vlcVersion);
     InsertMedia = new LibVlcFunction<Signatures.LibVlc.MediaList.InsertMedia>(libVlcDllHandle, vlcVersion);
     RemoveAt = new LibVlcFunction<Signatures.LibVlc.MediaList.RemoveAt>(libVlcDllHandle, vlcVersion);
     Count = new LibVlcFunction<Signatures.LibVlc.MediaList.Count>(libVlcDllHandle, vlcVersion);
     GetItemAt = new LibVlcFunction<Signatures.LibVlc.MediaList.GetItemAt>(libVlcDllHandle, vlcVersion);
     IndexOf = new LibVlcFunction<Signatures.LibVlc.MediaList.IndexOf>(libVlcDllHandle, vlcVersion);
     IsReadOnly = new LibVlcFunction<Signatures.LibVlc.MediaList.IsReadOnly>(libVlcDllHandle, vlcVersion);
     Lock = new LibVlcFunction<Signatures.LibVlc.MediaList.Lock>(libVlcDllHandle, vlcVersion);
     Unlock = new LibVlcFunction<Signatures.LibVlc.MediaList.Unlock>(libVlcDllHandle, vlcVersion);
     EventManager = new LibVlcFunction<Signatures.LibVlc.MediaList.EventManager>(libVlcDllHandle, vlcVersion);
 }
コード例 #18
0
 public void Dispose()
 {
     NewInstance = null;
     ReleaseInstance = null;
     RetainInstance = null;
     SetMedia = null;
     GetMedia = null;
     AddMedia = null;
     InsertMedia = null;
     RemoveAt = null;
     Count = null;
     GetItemAt = null;
     IndexOf = null;
     IsReadOnly = null;
     Lock = null;
     Unlock = null;
     EventManager = null;
 }
コード例 #19
0
        /// <summary>
        ///     Load LibVlc dlls, and mapping all function.
        /// </summary>
        /// <param name="libVlcDirectory">directory of LibVlc</param>
        /// <exception cref="LibVlcLoadLibraryException">
        ///     Can't load LibVlc dlls, check the platform and LibVlc target platform
        ///     (should be same, x86 or x64).
        /// </exception>
        /// <exception cref="TypeLoadException">A custom attribute type cannot be loaded. </exception>
        /// <exception cref="NoLibVlcFunctionAttributeException">
        ///     For LibVlcFunction, need LibVlcFunctionAttribute to get Infomation
        ///     of function.
        /// </exception>
        /// <exception cref="FunctionNotFoundException">Can't find function in dll.</exception>
        /// <exception cref="VersionStringParseException">Can't parse libvlc version string, it must like "2.2.0-Meta Weatherwax".</exception>
        /// <exception cref="OverflowException">
        ///     At least one component of version represents a number greater than
        ///     <see cref="F:System.Int32.MaxValue" />.
        /// </exception>
        public static void LoadLibVlc(string libVlcDirectory = null)
        {
            if (IsLibLoaded)
            {
                return;
            }

            LibVlcDirectory = libVlcDirectory == null ? "" : libVlcDirectory;

            try
            {
                var libcore = new FileInfo(Path.Combine(LibVlcDirectory, "libvlccore.dll"));
                var libvlc  = new FileInfo(Path.Combine(LibVlcDirectory, "libvlc.dll"));
                LibVlcVCoreHandle = Win32Api.LoadLibrary(libcore.FullName);
                LibVlcHandle      = Win32Api.LoadLibrary(libvlc.FullName);
            }
            catch (Win32Exception e)
            {
                throw new LibVlcLoadLibraryException(e);
            }

            _getVersionFunction   = new LibVlcFunction <libvlc_get_version>(LibVlcHandle, null);
            _getCompilerFunction  = new LibVlcFunction <libvlc_get_compiler>(LibVlcHandle, null);
            _getChangeSetFunction = new LibVlcFunction <libvlc_get_changeset>(LibVlcHandle, null);
            _freeFunction         = new LibVlcFunction <libvlc_free>(LibVlcHandle, null);


            LibVlcVersion = new LibVlcVersion(GetVersion());
            var functionArgs = new object[] { LibVlcHandle, LibVlcVersion };

            foreach (var type in Assembly.GetExecutingAssembly().GetTypes())
            {
                var attrs = type.GetCustomAttributes(typeof(LibVlcFunctionAttribute), false);
                if (attrs.Length == 0)
                {
                    continue;
                }

                var functionType = typeof(LibVlcFunction <>).MakeGenericType(type);
                var function     = Activator.CreateInstance(functionType, functionArgs);
                _cache.Add(type, function);
            }
        }
コード例 #20
0
 internal LibVlcMediaListPlayer(IntPtr libVlcDllHandle, Version vlcVersion)
 {
     NewInstance = new LibVlcFunction<NewInstance>(libVlcDllHandle, vlcVersion);
     ReleaseInstance = new LibVlcFunction<ReleaseInstance>(libVlcDllHandle, vlcVersion);
     RetainInstance = new LibVlcFunction<RetainInstance>(libVlcDllHandle, vlcVersion);
     EventManager = new LibVlcFunction<EventManager>(libVlcDllHandle, vlcVersion);
     SetMediaPlayer = new LibVlcFunction<SetMediaPlayer>(libVlcDllHandle, vlcVersion);
     SetMediaList = new LibVlcFunction<SetMediaList>(libVlcDllHandle, vlcVersion);
     Play = new LibVlcFunction<Play>(libVlcDllHandle, vlcVersion);
     Pause = new LibVlcFunction<Pause>(libVlcDllHandle, vlcVersion);
     IsPlaying = new LibVlcFunction<IsPlaying>(libVlcDllHandle, vlcVersion);
     GetState = new LibVlcFunction<GetState>(libVlcDllHandle, vlcVersion);
     PlayItemAtIndex = new LibVlcFunction<PlayItemAtIndex>(libVlcDllHandle, vlcVersion);
     PlayItem = new LibVlcFunction<PlayItem>(libVlcDllHandle, vlcVersion);
     Stop = new LibVlcFunction<Stop>(libVlcDllHandle, vlcVersion);
     Next = new LibVlcFunction<Next>(libVlcDllHandle, vlcVersion);
     Previous = new LibVlcFunction<Previous>(libVlcDllHandle, vlcVersion);
     SetPlaybackMode = new LibVlcFunction<SetPlaybackMode>(libVlcDllHandle, vlcVersion);
 }
コード例 #21
0
 public void Dispose()
 {
     NewInstance = null;
     ReleaseInstance = null;
     RetainInstance = null;
     EventManager = null;
     SetMediaPlayer = null;
     SetMediaList = null;
     Play = null;
     Pause = null;
     IsPlaying = null;
     GetState = null;
     PlayItemAtIndex = null;
     PlayItem = null;
     Stop = null;
     Next = null;
     Previous = null;
     SetPlaybackMode = null;
 }
コード例 #22
0
        internal LibVlcMediaPlayerVideo(IntPtr libVlcDllHandle, Version vlcVersion)
        {
            SetCallbacks = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.SetCallbacks>(libVlcDllHandle, vlcVersion);
            SetFormatCallbacks = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.SetFormatCallbacks>(libVlcDllHandle, vlcVersion);
            SetFormat = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.SetFormat>(libVlcDllHandle, vlcVersion);

            ToggleFullscreen = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.ToggleFullscreen>(libVlcDllHandle, vlcVersion);
            SetFullscreen = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.SetFullscreen>(libVlcDllHandle, vlcVersion);
            GetFullscreen = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.GetFullscreen>(libVlcDllHandle, vlcVersion);
            SetKeyInput = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.SetKeyInput>(libVlcDllHandle, vlcVersion);
            GetSize = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.GetSize>(libVlcDllHandle, vlcVersion);
            GetCursor = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.GetCursor>(libVlcDllHandle, vlcVersion);
            GetScale = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.GetScale>(libVlcDllHandle, vlcVersion);
            SetScale = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.SetScale>(libVlcDllHandle, vlcVersion);
            GetAspectRatio = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.GetAspectRatio>(libVlcDllHandle, vlcVersion);
            SetAspectRatio = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.SetAspectRatio>(libVlcDllHandle, vlcVersion);
            GetSpu = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.GetSpu>(libVlcDllHandle, vlcVersion);
            GetSpuCount = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.GetSpuCount>(libVlcDllHandle, vlcVersion);
            GetSpuDescription = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.GetSpuDescription>(libVlcDllHandle, vlcVersion);
            SetSpu = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.SetSpu>(libVlcDllHandle, vlcVersion);
            SetSubtitleFile = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.SetSubtitleFile>(libVlcDllHandle, vlcVersion);
            GetTeletext = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.GetTeletext>(libVlcDllHandle, vlcVersion);
            SetTeletext = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.SetTeletext>(libVlcDllHandle, vlcVersion);
            ToggleTeletext = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.ToggleTeletext>(libVlcDllHandle, vlcVersion);
            GetTrackCount = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.GetTrackCount>(libVlcDllHandle, vlcVersion);
            GetTrack = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.GetTrack>(libVlcDllHandle, vlcVersion);
            SetTrack = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.SetTrack>(libVlcDllHandle, vlcVersion);
            TakeSnapshot = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.TakeSnapshot>(libVlcDllHandle, vlcVersion);
            SetDeinterlace = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.SetDeinterlace>(libVlcDllHandle, vlcVersion);
            GetIntegerMarquee = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.GetIntegerMarquee>(libVlcDllHandle, vlcVersion);
            GetStringMarquee = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.GetStringMarquee>(libVlcDllHandle, vlcVersion);
            SetIntegerMarquee = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.SetIntegerMarquee>(libVlcDllHandle, vlcVersion);
            SetStringMarquee = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.SetStringMarquee>(libVlcDllHandle, vlcVersion);
            GetIntegerLogoOption = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.GetIntegerLogoOption>(libVlcDllHandle, vlcVersion);
            SetIntegerLogoOption = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.SetIntegerLogoOption>(libVlcDllHandle, vlcVersion);
            SetStringLogoOption = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.SetStringLogoOption>(libVlcDllHandle, vlcVersion);
            GetIntegerAdjust = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.GetIntegerAdjust>(libVlcDllHandle, vlcVersion);
            SetIntegerAdjust = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.SetIntegerAdjust>(libVlcDllHandle, vlcVersion);
            GetFloatAdjust = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.GetFloatAdjust>(libVlcDllHandle, vlcVersion);
            SetFloatAdjust = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Video.SetFloatAdjust>(libVlcDllHandle, vlcVersion);
        }
コード例 #23
0
ファイル: AudioEqualizer.cs プロジェクト: forplus/Popcorn
        internal static void LoadLibVlc()
        {
            if (IsLibLoaded)
            {
                return;
            }

            _createEqualizerFunction           = new LibVlcFunction <CreateEqualizer>();
            _createEqualizerFromPresetFunction = new LibVlcFunction <CreateEqualizerFromPreset>();
            _releaseEqualizerFunction          = new LibVlcFunction <ReleaseEqualizer>();
            _getEqualizerPresetCountFunction   = new LibVlcFunction <GetEqualizerPresetCount>();
            _getEqualizerPresetNameFunction    = new LibVlcFunction <GetEqualizerPresetName>();
            _getEqualizerBandCountFunction     = new LibVlcFunction <GetEqualizerBandCount>();
            _getEqualizerBandFrequencyFunction = new LibVlcFunction <GetEqualizerBandFrequency>();
            _setEqualizerPreampFunction        = new LibVlcFunction <SetEqualizerPreamp>();
            _getEqualizerPreampFunction        = new LibVlcFunction <GetEqualizerPreamp>();
            _setEqualizerAmplificationFunction = new LibVlcFunction <SetEqualizerAmplification>();
            _getEqualizerAmplificationFunction = new LibVlcFunction <GetEqualizerAmplification>();

            IsLibLoaded = true;
        }
コード例 #24
0
ファイル: Vlc.cs プロジェクト: forplus/Popcorn
        /// <exception cref="TypeLoadException">A custom attribute type cannot be loaded. </exception>
        /// <exception cref="NoLibVlcFunctionAttributeException">
        ///     For LibVlcFunction, need LibVlcFunctionAttribute to get Infomation
        ///     of function.
        /// </exception>
        /// <exception cref="FunctionNotFoundException">Can't find function in dll.</exception>
        internal static void LoadLibVlc()
        {
            if (IsLibLoaded)
            {
                return;
            }

            _newInstanceFunction          = new LibVlcFunction <NewInstance>();
            _releaseInstanceFunction      = new LibVlcFunction <ReleaseInstance>();
            _retainInstanceFunction       = new LibVlcFunction <RetainInstance>();
            _addInterfaceFunction         = new LibVlcFunction <AddInterface>();
            _setExitHandlerFunction       = new LibVlcFunction <SetExitHandler>();
            _waitFunction                 = new LibVlcFunction <Wait>();
            _setUserAgentFunction         = new LibVlcFunction <SetUserAgent>();
            _setAppIdFunction             = new LibVlcFunction <SetAppId>();
            _getAudioFilterListFunction   = new LibVlcFunction <GetAudioFilterList>();
            _getVideoFilterListFunction   = new LibVlcFunction <GetVideoFilterList>();
            _releaseVlmInstanceFunction   = new LibVlcFunction <ReleaseVlmInstance>();
            _newBroadCastInputFunction    = new LibVlcFunction <NewBroadCastInput>();
            _newVodInputFunction          = new LibVlcFunction <NewVodInput>();
            _delBoroadcastOrOvdFunction   = new LibVlcFunction <DelBoroadcastOrOvd>();
            _mediaSwitchFunction          = new LibVlcFunction <MediaSwitch>();
            _setMediaOutputFunction       = new LibVlcFunction <SetMediaOutput>();
            _setMediaInputFunction        = new LibVlcFunction <SetMediaInput>();
            _addMediaInputFunction        = new LibVlcFunction <AddMediaInput>();
            _setMediaLoopFunction         = new LibVlcFunction <SetMediaLoop>();
            _setVodMuxerFunction          = new LibVlcFunction <SetVodMuxer>();
            _editMediaParasFunction       = new LibVlcFunction <EditMediaParas>();
            _playNamedBroadcastFunction   = new LibVlcFunction <PlayNamedBroadcast>();
            _stopNamedBroadcastFunction   = new LibVlcFunction <StopNamedBroadcast>();
            _pauseNamedBroadcastFunction  = new LibVlcFunction <PauseNamedBroadcast>();
            _seekInNamedBroadcastFunction = new LibVlcFunction <SeekInNamedBroadcast>();
            _returnJsonMessageFunction    = new LibVlcFunction <ReturnJsonMessage>();
            _getMediaPositionFunction     = new LibVlcFunction <GetMediaPosition>();
            _getMediaTimeFunction         = new LibVlcFunction <GetMediaTime>();
            _getMediaLengthFunction       = new LibVlcFunction <GetMediaLength>();
            _getMediaBackRateFunction     = new LibVlcFunction <GetMediaBackRate>();
            _getMediaEventManagerFunction = new LibVlcFunction <GetMediaEventManager>();
            IsLibLoaded = true;
        }
コード例 #25
0
ファイル: LibVlcManager.cs プロジェクト: s-arash/xZune.Vlc
        /// <summary>
        ///     Load LibVlc dlls, and mapping all function.
        /// </summary>
        /// <param name="libVlcDirectory">directory of LibVlc</param>
        /// <exception cref="LibVlcLoadLibraryException">
        ///     Can't load LibVlc dlls, check the platform and LibVlc target platform
        ///     (should be same, x86 or x64).
        /// </exception>
        /// <exception cref="TypeLoadException">A custom attribute type cannot be loaded. </exception>
        /// <exception cref="NoLibVlcFunctionAttributeException">
        ///     For LibVlcFunction, need LibVlcFunctionAttribute to get Infomation
        ///     of function.
        /// </exception>
        /// <exception cref="FunctionNotFoundException">Can't find function in dll.</exception>
        /// <exception cref="VersionStringParseException">Can't parse libvlc version string, it must like "2.2.0-xZune Weatherwax".</exception>
        /// <exception cref="OverflowException">
        ///     At least one component of version represents a number greater than
        ///     <see cref="F:System.Int32.MaxValue" />.
        /// </exception>
        public static void LoadLibVlc(String libVlcDirectory = null)
        {
            LibVlcDirectory = libVlcDirectory == null ? "" : libVlcDirectory;

            if (IsLibLoaded)
            {
                return;
            }

            try
            {
                FileInfo libcore = new FileInfo(Path.Combine(LibVlcDirectory, "libvlccore.dll"));
                FileInfo libvlc  = new FileInfo(Path.Combine(LibVlcDirectory, "libvlc.dll"));
                LibVlcVCoreHandle = Win32Api.LoadLibrary(libcore.FullName);
                LibVlcHandle      = Win32Api.LoadLibrary(libvlc.FullName);
            }
            catch (Win32Exception e)
            {
                throw new LibVlcLoadLibraryException(e);
            }

            _getVersionFunction = new LibVlcFunction <GetVersion>();
            LibVlcVersion       = new LibVlcVersion(GetVersion());

            _getCompilerFunction  = new LibVlcFunction <GetCompiler>();
            _getChangesetFunction = new LibVlcFunction <GetChangeset>();
            _freeFunction         = new LibVlcFunction <Free>();
            _releaseLibVlcModuleDescriptionFunction = new LibVlcFunction <ReleaseLibVlcModuleDescription>();
            _releaseAudioOutputListFunction         = new LibVlcFunction <ReleaseAudioOutputList>();
            _releaseAudioDeviceListFunction         = new LibVlcFunction <ReleaseAudioDeviceList>();
            _releaseTrackDescriptionFunction        = new LibVlcFunction <ReleaseTrackDescription>();
            _releaseTracksFunction = new LibVlcFunction <ReleaseTracks>();

            Vlc.LoadLibVlc();
            VlcError.LoadLibVlc();
            VlcEventManager.LoadLibVlc();
            VlcMedia.LoadLibVlc();
            VlcMediaPlayer.LoadLibVlc();
            AudioEqualizer.LoadLibVlc();
        }
コード例 #26
0
 internal LibVlcMediaPlayerAudio(IntPtr libVlcDllHandle, Version vlcVersion)
 {
     NewOutputListInstance = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Audio.NewOutputListInstance>(libVlcDllHandle, vlcVersion);
     ReleaseOutputList = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Audio.ReleaseOutputList>(libVlcDllHandle, vlcVersion);
     OutputDeviceCount = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Audio.OutputDeviceCount>(libVlcDllHandle, vlcVersion);
     GetOutputDeviceLongName = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Audio.GetOutputDeviceLongName>(libVlcDllHandle, vlcVersion);
     GetOutputDeviceIdName = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Audio.GetOutputDeviceIdName>(libVlcDllHandle, vlcVersion);
     SetOutputDevice = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Audio.SetOutputDevice>(libVlcDllHandle, vlcVersion);
     GetOutputDeviceType = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Audio.GetOutputDeviceType>(libVlcDllHandle, vlcVersion);
     SetOutputDeviceType = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Audio.SetOutputDeviceType>(libVlcDllHandle, vlcVersion);
     ToggleMute = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Audio.ToggleMute>(libVlcDllHandle, vlcVersion);
     GetMute = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Audio.GetMute>(libVlcDllHandle, vlcVersion);
     SetMute = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Audio.SetMute>(libVlcDllHandle, vlcVersion);
     GetVolume = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Audio.GetVolume>(libVlcDllHandle, vlcVersion);
     SetVolume = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Audio.SetVolume>(libVlcDllHandle, vlcVersion);
     GetTrackCount = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Audio.GetTrackCount>(libVlcDllHandle, vlcVersion);
     GetTrack = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Audio.GetTrack>(libVlcDllHandle, vlcVersion);
     SetTrack = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Audio.SetTrack>(libVlcDllHandle, vlcVersion);
     GetChannel = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Audio.GetChannel>(libVlcDllHandle, vlcVersion);
     SetChannel = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Audio.SetChannel>(libVlcDllHandle, vlcVersion);
     GetDelay = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Audio.GetDelay>(libVlcDllHandle, vlcVersion);
     SetDelay = new LibVlcFunction<Signatures.LibVlc.MediaPlayer.Audio.SetDelay>(libVlcDllHandle, vlcVersion);
 }
コード例 #27
0
 public void Dispose()
 {
     NewOutputListInstance = null;
     ReleaseOutputList = null;
     OutputDeviceCount = null;
     GetOutputDeviceLongName = null;
     GetOutputDeviceIdName = null;
     SetOutputDevice = null;
     GetOutputDeviceType = null;
     SetOutputDeviceType = null;
     ToggleMute = null;
     GetMute = null;
     SetMute = null;
     GetVolume = null;
     SetVolume = null;
     GetTrackCount = null;
     GetTrack = null;
     SetTrack = null;
     GetChannel = null;
     SetChannel = null;
     GetDelay = null;
     SetDelay = null;
 }
コード例 #28
0
ファイル: LibVlcMediaPlayer.cs プロジェクト: hjlfmy/Rubezh
        public void Dispose()
        {
            NewInstance = null;
            NewInstanceFromMedia = null;
            ReleaseInstance = null;
            RetainInstance = null;
            SetMedia = null;
            GetMedia = null;
            EventManagerNewIntance = null;
            IsPlaying = null;
            Play = null;
            SetPause = null;
            Pause = null;
            Stop = null;
            SetHwnd = null;
            GetHwnd = null;
            GetLength = null;
            GetTime = null;
            SetTime = null;
            GetPosition = null;
            SetPosition = null;
            SetChapter = null;
            GetChapter = null;
            GetChapterCount = null;
            WillPlay = null;
            GetChapterCountForTitle = null;
            SetTitle = null;
            GetTitle = null;
            GetTitleCount = null;
            SetPreviousChapter = null;
            SetNextChapter = null;
            GetRate = null;
            SetRate = null;
            GetState = null;
            GetFPS = null;
            HasVideoOut = null;
            IsSeekable = null;
            IsPausable = null;
            NextFrame = null;
            Navigate = null;
            ReleaseTrackDescriptionList = null;

            if (VideoInterops != null)
                VideoInterops.Dispose();
            VideoInterops = null;
            if (AudioInterops != null)
                AudioInterops.Dispose();
            AudioInterops = null;
        }
コード例 #29
0
 public void Dispose()
 {
     NewInstanceFromLocation = null;
     NewInstanceFromPath = null;
     NewInstanceFromFileDescriptor = null;
     NewInstanceEmpty = null;
     AddOption = null;
     AddOptionFlag = null;
     RetainInstance = null;
     ReleaseInstance = null;
     GetMrl = null;
     Duplicate = null;
     GetMetadata = null;
     SetMetadata = null;
     SaveMetadatas = null;
     GetState = null;
     GetStats = null;
     GetSubItems = null;
     EventManager = null;
     GetDuration = null;
     Parse = null;
     ParseAsync = null;
     IsParsed = null;
     SetUserData = null;
     GetUserData = null;
     GetTrackInfo = null;
 }
コード例 #30
0
ファイル: LibVlcManager.cs プロジェクト: birbilis/Meta.Vlc
        /// <summary>
        ///     Load LibVlc dlls, and mapping all function.
        /// </summary>
        /// <param name="libVlcDirectory">directory of LibVlc</param>
        /// <exception cref="LibVlcLoadLibraryException">
        ///     Can't load LibVlc dlls, check the platform and LibVlc target platform
        ///     (should be same, x86 or x64).
        /// </exception>
        /// <exception cref="TypeLoadException">A custom attribute type cannot be loaded. </exception>
        /// <exception cref="NoLibVlcFunctionAttributeException">
        ///     For LibVlcFunction, need LibVlcFunctionAttribute to get Infomation
        ///     of function.
        /// </exception>
        /// <exception cref="FunctionNotFoundException">Can't find function in dll.</exception>
        /// <exception cref="VersionStringParseException">Can't parse libvlc version string, it must like "2.2.0-Meta Weatherwax".</exception>
        /// <exception cref="OverflowException">
        ///     At least one component of version represents a number greater than
        ///     <see cref="F:System.Int32.MaxValue" />.
        /// </exception>
        public static void LoadLibVlc(String libVlcDirectory = null)
        {
            LibVlcDirectory = libVlcDirectory == null ? "" : libVlcDirectory;

            if (IsLibLoaded) return;

            try
            {
                FileInfo libcore = new FileInfo(Path.Combine(LibVlcDirectory, "libvlccore.dll"));
                FileInfo libvlc = new FileInfo(Path.Combine(LibVlcDirectory, "libvlc.dll"));
                LibVlcVCoreHandle = Win32Api.LoadLibrary(libcore.FullName);
                LibVlcHandle = Win32Api.LoadLibrary(libvlc.FullName);
            }
            catch (Win32Exception e)
            {
                throw new LibVlcLoadLibraryException(e);
            }

            _getVersionFunction = new LibVlcFunction<GetVersion>();
            LibVlcVersion = new LibVlcVersion(GetVersion());

            _getCompilerFunction = new LibVlcFunction<GetCompiler>();
            _getChangesetFunction = new LibVlcFunction<GetChangeset>();
            _freeFunction = new LibVlcFunction<Free>();
            _releaseLibVlcModuleDescriptionFunction = new LibVlcFunction<ReleaseLibVlcModuleDescription>();
            _releaseAudioOutputListFunction = new LibVlcFunction<ReleaseAudioOutputList>();
            _releaseAudioDeviceListFunction = new LibVlcFunction<ReleaseAudioDeviceList>();
            _releaseTrackDescriptionFunction = new LibVlcFunction<ReleaseTrackDescription>();
            _releaseTracksFunction = new LibVlcFunction<ReleaseTracks>();

            Vlc.LoadLibVlc();
            VlcError.LoadLibVlc();
            VlcEventManager.LoadLibVlc();
            VlcMedia.LoadLibVlc();
            VlcMediaPlayer.LoadLibVlc();
            AudioEqualizer.LoadLibVlc();
        }
コード例 #31
0
ファイル: VlcMedia.cs プロジェクト: TheThing/FiloStreamer
 /// <summary>
 /// 载入 LibVlc 的 Media 模块,该方法会在 <see cref="Vlc.LoadLibVlc"/> 中自动被调用
 /// </summary>
 /// <param name="libHandle"></param>
 /// <param name="libVersion"></param>
 public static void LoadLibVlc(IntPtr libHandle,Version libVersion, String devString)
 {
     if(!IsLibLoaded)
     {
         AddOptionFunction = new LibVlcFunction<MediaAddOption>(libHandle, libVersion, devString);
         AddOptionFlagFunction = new LibVlcFunction<MediaAddOptionFlag>(libHandle, libVersion, devString);
         DuplicateFunction = new LibVlcFunction<MediaDuplicate>(libHandle, libVersion, devString);
         GetEventManagerFunction = new LibVlcFunction<GetEventManager>(libHandle, libVersion, devString);
         GetCodecDescriptionFunction = new LibVlcFunction<GetCodecDescription>(libHandle, libVersion, devString);
         GetDurationFunction = new LibVlcFunction<GetDuration>(libHandle, libVersion, devString);
         GetMetaFunction = new LibVlcFunction<GetMeta>(libHandle, libVersion, devString);
         GetMrlFunction = new LibVlcFunction<GetMrl>(libHandle, libVersion, devString);
         GetStateFunction = new LibVlcFunction<GetState>(libHandle, libVersion, devString);
         GetStatsFunction = new LibVlcFunction<GetStats>(libHandle, libVersion, devString);
         GetTracksInfoFunction = new LibVlcFunction<GetTracksInfo>(libHandle, libVersion, devString);
         GetUserDataFunction = new LibVlcFunction<GetUserData>(libHandle, libVersion, devString);
         IsParsedFunction = new LibVlcFunction<IsParsed>(libHandle, libVersion, devString);
         CreateMediaAsNewNodeFunction = new LibVlcFunction<CreateMediaAsNewNode>(libHandle, libVersion, devString);
         CreateMediaFormFileDescriptorFunction = new LibVlcFunction<CreateMediaFormFileDescriptor>(libHandle, libVersion, devString);
         CreateMediaFormLocationFunction = new LibVlcFunction<CreateMediaFormLocation>(libHandle, libVersion, devString);
         CreateMediaFormPathFunction = new LibVlcFunction<CreateMediaFormPath>(libHandle, libVersion, devString);
         ParseMediaFunction = new LibVlcFunction<ParseMedia>(libHandle, libVersion, devString);
         ParseMediaAsyncFunction = new LibVlcFunction<ParseMediaAsync>(libHandle, libVersion, devString);
         ParseMediaWithOptionAsyncFunction = new LibVlcFunction<ParseMediaWithOptionAsync>(libHandle, libVersion, devString);
         ReleaseMediaFunction = new LibVlcFunction<ReleaseMedia>(libHandle, libVersion, devString);
         RetainMediaFunction = new LibVlcFunction<RetainMedia>(libHandle, libVersion, devString);
         SaveMetaFunction = new LibVlcFunction<SaveMeta>(libHandle, libVersion, devString);
         SetMetaFunction = new LibVlcFunction<SetMeta>(libHandle, libVersion, devString);
         SetUserDataFunction = new LibVlcFunction<SetUserData>(libHandle, libVersion, devString);
         GetSubitemsFunction = new LibVlcFunction<GetSubitems>(libHandle, libVersion, devString);
         GetTracksFunction = new LibVlcFunction<GetTracks>(libHandle, libVersion, devString);
         ReleaseTracksFunction = new LibVlcFunction<ReleaseTracks>(libHandle, libVersion, devString);
         IsLibLoaded = true;
     }
 }
コード例 #32
0
 public void Dispose()
 {
     Attach = null;
     Detach = null;
     GetTypeName = null;
 }
コード例 #33
0
 internal LibVlcAsynchronousEvents(IntPtr libVlcDllHandle, Version vlcVersion)
 {
     Attach = new LibVlcFunction<Attach>(libVlcDllHandle, vlcVersion);
     Detach = new LibVlcFunction<Detach>(libVlcDllHandle, vlcVersion);
     GetTypeName = new LibVlcFunction<GetTypeName>(libVlcDllHandle, vlcVersion);
 }
コード例 #34
0
        private void InitVlcLib(string libVlcDllsDirectory)
        {
            if (!Directory.Exists(libVlcDllsDirectory))
                throw new DirectoryNotFoundException(string.Format("The directory : {0} not found.", libVlcDllsDirectory));

            string libVlcFilePath = Path.Combine(libVlcDllsDirectory, "libvlc.dll");
            if (!File.Exists(libVlcFilePath))
                throw new FileNotFoundException("Libvlc library not found in directory.");
            string libVlcCoreFilePath = Path.Combine(libVlcDllsDirectory, "libvlccore.dll");
            if (!File.Exists(libVlcCoreFilePath))
                throw new FileNotFoundException("Libvlccore library not found in directory.");

            myLibVlcCoreDllHandle = Win32Interop.LoadLibrary(libVlcCoreFilePath);
            if (myLibVlcCoreDllHandle == IntPtr.Zero)
                throw new Win32Exception(Marshal.GetLastWin32Error());
            myLibVlcDllHandle = Win32Interop.LoadLibrary(libVlcFilePath);
            if (myLibVlcDllHandle == IntPtr.Zero)
                throw new Win32Exception(Marshal.GetLastWin32Error());

            GetVersion = new LibVlcFunction<GetVersion>(myLibVlcDllHandle);

            var reg = new Regex("^[0-9.]*");
            var match = reg.Match(IntPtrExtensions.ToStringAnsi(GetVersion.Invoke()));
            VlcVersion = new Version(match.Groups[0].Value);

            NewInstance = new LibVlcFunction<NewInstance>(myLibVlcDllHandle, VlcVersion);
            ReleaseInstance = new LibVlcFunction<ReleaseInstance>(myLibVlcDllHandle, VlcVersion);
            RetainInstance = new LibVlcFunction<RetainInstance>(myLibVlcDllHandle, VlcVersion);
            AddInterface = new LibVlcFunction<AddInterface>(myLibVlcDllHandle, VlcVersion);
            SetExitCallback = new LibVlcFunction<SetExitCallback>(myLibVlcDllHandle, VlcVersion);
            Wait = new LibVlcFunction<Wait>(myLibVlcDllHandle, VlcVersion);
            SetUserAgent = new LibVlcFunction<SetUserAgent>(myLibVlcDllHandle, VlcVersion);
            GetCompiler = new LibVlcFunction<GetCompiler>(myLibVlcDllHandle, VlcVersion);
            GetChangeSet = new LibVlcFunction<GetChangeSet>(myLibVlcDllHandle, VlcVersion);
            FreeMemory = new LibVlcFunction<FreeMemory>(myLibVlcDllHandle, VlcVersion);
            //GetModuleDescriptionList = new LibVlcFunction<GetModuleDescriptionList>(myLibVlcDllHandle, VlcVersion);
            //ReleaseModule = new LibVlcFunction<ReleaseModuleDescription>(myLibVlcDllHandle, VlcVersion);

            EventInterops = new LibVlcAsynchronousEvents(myLibVlcDllHandle, VlcVersion);
            MediaPlayerInterops = new LibVlcMediaPlayer(myLibVlcDllHandle, VlcVersion);
            MediaInterops = new LibVlcMedia(myLibVlcDllHandle, VlcVersion);
            MediaListInterops = new LibVlcMediaList(myLibVlcDllHandle, VlcVersion);
            AudioInterops = new LibVlcAudio(myLibVlcDllHandle, VlcVersion);
            VideoInterops = new LibVlcVideo(myLibVlcDllHandle, VlcVersion);
            LoggingInterops = new LibVlcLogging(myLibVlcDllHandle, VlcVersion);
            ErrorHandlingInterops = new LibVlcErrorHandling(myLibVlcDllHandle, VlcVersion);
            MediaListPlayerInterops = new LibVlcMediaListPlayer(myLibVlcDllHandle, VlcVersion);
        }
コード例 #35
0
ファイル: VlcMediaPlayer.cs プロジェクト: birbilis/Meta.Vlc
        /// <summary>
        ///     载入 LibVlc 的 MediaPlayer 模块,该方法会在 <see cref="Vlc.LoadLibVlc()" /> 中自动被调用
        /// </summary>
        /// <param name="libHandle"></param>
        /// <param name="libVersion"></param>
        /// <param name="devString"></param>
        internal static void LoadLibVlc()
        {
            if (!IsLibLoaded)
            {
                _createMediaPlayerFunction = new LibVlcFunction<CreateMediaPlayer>();
                _createMediaPlayerFromMediaFunction = new LibVlcFunction<CreateMediaPlayerFromMedia>();
                _releaseMediaPlayerFunction = new LibVlcFunction<ReleaseMediaPlayer>();
                _retainMediaPlayerFunction = new LibVlcFunction<RetainMediaPlayer>();
                _setMediaFunction = new LibVlcFunction<SetMedia>();
                _getMediaFunction = new LibVlcFunction<GetMedia>();
                _getEventManagerFunction = new LibVlcFunction<GetEventManager>();
                _isPlayingFunction = new LibVlcFunction<IsPlaying>();
                _playFunction = new LibVlcFunction<Play>();
                _setPauseFunction = new LibVlcFunction<SetPause>();
                _setPositionFunction = new LibVlcFunction<SetPosition>();
                _stopFunction = new LibVlcFunction<Stop>();
                _setVideoCallbackFunction = new LibVlcFunction<SetVideoCallback>();
                _setVideoFormatFunction = new LibVlcFunction<SetVideoFormat>();
                _setVideoFormatCallbackFunction = new LibVlcFunction<SetVideoFormatCallback>();
                _setHwndFunction = new LibVlcFunction<SetHwnd>();
                _getHwndFunction = new LibVlcFunction<GetHwnd>();
                _setAudioCallbackFunction = new LibVlcFunction<SetAudioCallback>();
                _setAudioFormatFunction = new LibVlcFunction<SetAudioFormat>();
                _setAudioFormatCallbackFunction = new LibVlcFunction<SetAudioFormatCallback>();
                _setAudioVolumeCallbackFunction = new LibVlcFunction<SetAudioVolumeCallback>();
                _getLengthFunction = new LibVlcFunction<GetLength>();
                _getTimeFunction = new LibVlcFunction<GetTime>();
                _setTimeFunction = new LibVlcFunction<SetTime>();
                _getPositionFunction = new LibVlcFunction<GetPosition>();
                _setChapterFunction = new LibVlcFunction<SetChapter>();
                _getChapterFunction = new LibVlcFunction<GetChapter>();
                _getChapterCountFunction = new LibVlcFunction<GetChapterCount>();
                _canPlayFunction = new LibVlcFunction<CanPlay>();
                _getTitleChapterCountFunction = new LibVlcFunction<GetTitleChapterCount>();
                _setTitleFunction = new LibVlcFunction<SetTitle>();
                _getTitleFunction = new LibVlcFunction<GetTitle>();
                _getTitleCountFunction = new LibVlcFunction<GetTitleCount>();
                _previousChapterFunction = new LibVlcFunction<PreviousChapter>();
                _nextChapterFunction = new LibVlcFunction<NextChapter>();
                _getRateFunction = new LibVlcFunction<GetRate>();
                _setRateFunction = new LibVlcFunction<SetRate>();
                _getStateFunction = new LibVlcFunction<GetState>();
                _getFpsFunction = new LibVlcFunction<GetFps>();
                _hasVoutFunction = new LibVlcFunction<HasVout>();
                _isSeekableFunction = new LibVlcFunction<IsSeekable>();
                _canPauseFunction = new LibVlcFunction<CanPause>();
                _nextFrameFunction = new LibVlcFunction<NextFrame>();
                _navigateFunction = new LibVlcFunction<Navigate>();
                _setVideoTitleDisplayFunction = new LibVlcFunction<SetVideoTitleDisplay>();
                _toggleMuteFunction = new LibVlcFunction<ToggleMute>();
                _getMuteFunction = new LibVlcFunction<GetMute>();
                _setMuteFunction = new LibVlcFunction<SetMute>();
                _getVolumeFunction = new LibVlcFunction<GetVolume>();
                _setVolumeFunction = new LibVlcFunction<SetVolume>();
                _getCursorFunction = new LibVlcFunction<GetCursor>();
                _setCursorFunction = new LibVlcFunction<SetCursor>();
                _setMouseDownFunction = new LibVlcFunction<SetMouseDown>();
                _setMouseUpFunction = new LibVlcFunction<SetMouseUp>();
                _getOutputChannelFunction = new LibVlcFunction<GetOutputChannel>();
                _setOutputChannelFunction = new LibVlcFunction<SetOutputChannel>();
                _getAudioTrackFunction = new LibVlcFunction<GetAudioTrack>();
                _setAudioTrackFunction = new LibVlcFunction<SetAudioTrack>();
                _getAudioTrackCountFunction = new LibVlcFunction<GetAudioTrackCount>();
                _getAudioTrackDescriptionFunction = new LibVlcFunction<GetAudioTrackDescription>();
                _getSizeFunction = new LibVlcFunction<GetSize>();
                _setScaleFunction = new LibVlcFunction<SetScale>();
                _getScaleFunction = new LibVlcFunction<GetScale>();
                _setAspectRatioFunction = new LibVlcFunction<SetAspectRatio>();
                _getAspectRatioFunction = new LibVlcFunction<GetAspectRatio>();
                //_getVideoWidthFunction = new LibVlcFunction<GetVideoWidth>();
                //_getVideoHeightFunction = new LibVlcFunction<GetVideoHeight>();
                _getVideoTrackFunction = new LibVlcFunction<GetVideoTrack>();
                _setVideoTrackFunction = new LibVlcFunction<SetVideoTrack>();
                _getVideoTrackCountFunction = new LibVlcFunction<GetVideoTrackCount>();
                _getVideoTrackDescriptionFunction = new LibVlcFunction<GetVideoTrackDescription>();
                _setEqualizerFunction = new LibVlcFunction<SetEqualizer>();
                _enumAudioDeviceListFunction = new LibVlcFunction<EnumAudioDeviceList>();
                _getAudioDeviceListFunction = new LibVlcFunction<GetAudioDeviceList>();
                _getAudioOutputListFunction = new LibVlcFunction<GetAudioOutputList>();
                _setAudioOutputFunction = new LibVlcFunction<SetAudioOutput>();
                _setAudioDeviceFunction = new LibVlcFunction<SetAudioDevice>();
                _getAudioDeviceFunction = new LibVlcFunction<GetAudioDevice>();
                _getSubtitleFunction = new LibVlcFunction<GetSubtitle>();
                _getSubtitleCountFunction = new LibVlcFunction<GetSubtitleCount>();
                _getSubtitleDescriptionFunction = new LibVlcFunction<GetSubtitleDescription>();
                _setSubtitleFunction = new LibVlcFunction<SetSubtitle>();
                _setSubtitleFileFunction = new LibVlcFunction<SetSubtitleFile>();
                _getSubtitleDelayFunction = new LibVlcFunction<GetSubtitleDelay>();
                _setSubtitleDelayFunction = new LibVlcFunction<SetSubtitleDelay>();
                _getVideoAdjustIntFunction = new LibVlcFunction<GetVideoAdjustInt>();
                _setVideoAdjustIntFunction = new LibVlcFunction<SetVideoAdjustInt>();
                _getVideoAdjustFloatFunction = new LibVlcFunction<GetVideoAdjustFloat>();
                _setVideoAdjustFloatFunction = new LibVlcFunction<SetVideoAdjustFloat>();

                IsLibLoaded = true;
            }
        }
コード例 #36
0
ファイル: LibVlcErrorHandling.cs プロジェクト: hjlfmy/Rubezh
 public LibVlcErrorHandling(IntPtr libVlcDllHandle, Version vlcVersion)
 {
     GetErrorMessage = new LibVlcFunction<GetErrorMessage>(libVlcDllHandle, vlcVersion);
     ClearError = new LibVlcFunction<ClearError>(libVlcDllHandle, vlcVersion);
 }
コード例 #37
0
        public void Dispose()
        {
            if (myLibVlcDllHandle != IntPtr.Zero)
            {
                Win32Interop.FreeLibrary(myLibVlcDllHandle);
                myLibVlcDllHandle = IntPtr.Zero;
            }
            if (myLibVlcCoreDllHandle != IntPtr.Zero)
            {
                Win32Interop.FreeLibrary(myLibVlcCoreDllHandle);
                myLibVlcCoreDllHandle = IntPtr.Zero;
            }
            NewInstance = null;
            ReleaseInstance = null;
            RetainInstance = null;
            AddInterface = null;
            SetExitCallback = null;
            Wait = null;
            SetUserAgent = null;
            GetVersion = null;
            GetCompiler = null;
            GetChangeSet = null;
            FreeMemory = null;
            //GetModuleDescriptionList = null;
            //ReleaseModule = null;

            if (EventInterops != null)
                EventInterops.Dispose();
            EventInterops = null;
            if (MediaPlayerInterops != null)
                MediaPlayerInterops.Dispose();
            MediaPlayerInterops = null;
            if (MediaInterops != null)
                MediaInterops.Dispose();
            MediaInterops = null;
            if (MediaListInterops != null)
                MediaListInterops.Dispose();
            MediaListInterops = null;
            if (AudioInterops != null)
                AudioInterops.Dispose();
            AudioInterops = null;
            if (VideoInterops != null)
                VideoInterops.Dispose();
            VideoInterops = null;
            if (LoggingInterops != null)
                LoggingInterops.Dispose();
            LoggingInterops = null;
            if (MediaListPlayerInterops != null)
                MediaListPlayerInterops.Dispose();
            MediaListPlayerInterops = null;
        }
コード例 #38
0
ファイル: LibVlcErrorHandling.cs プロジェクト: hjlfmy/Rubezh
 public void Dispose()
 {
     GetErrorMessage = null;
     ClearError = null;
 }
コード例 #39
0
 /// <summary>
 /// 载入 LibVlc 的 MediaPlayer 模块,该方法会在 <see cref="Vlc.LoadLibVlc"/> 中自动被调用
 /// </summary>
 /// <param name="libHandle"></param>
 /// <param name="libVersion"></param>
 public static void LoadLibVlc(IntPtr libHandle, Version libVersion, String devString)
 {
     if (!IsLibLoaded)
     {
         CreateMediaPlayerFunction          = new LibVlcFunction <CreateMediaPlayer>(libHandle, libVersion, devString);
         CreateMediaPlayerFromMediaFunction = new LibVlcFunction <CreateMediaPlayerFromMedia>(libHandle, libVersion, devString);
         ReleaseMediaPlayerFunction         = new LibVlcFunction <ReleaseMediaPlayer>(libHandle, libVersion, devString);
         RetainMediaPlayerFunction          = new LibVlcFunction <RetainMediaPlayer>(libHandle, libVersion, devString);
         SetMediaFunction                 = new LibVlcFunction <SetMedia>(libHandle, libVersion, devString);
         GetMediaFunction                 = new LibVlcFunction <GetMedia>(libHandle, libVersion, devString);
         GetEventManagerFunction          = new LibVlcFunction <GetEventManager>(libHandle, libVersion, devString);
         IsPlayingFunction                = new LibVlcFunction <IsPlaying>(libHandle, libVersion, devString);
         PlayFunction                     = new LibVlcFunction <Play>(libHandle, libVersion, devString);
         SetPauseFunction                 = new LibVlcFunction <SetPause>(libHandle, libVersion, devString);
         SetPositionFunction              = new LibVlcFunction <SetPosition>(libHandle, libVersion, devString);
         StopFunction                     = new LibVlcFunction <Stop>(libHandle, libVersion, devString);
         SetVideoCallbackFunction         = new LibVlcFunction <SetVideoCallback>(libHandle, libVersion, devString);
         SetVideoFormatFunction           = new LibVlcFunction <SetVideoFormat>(libHandle, libVersion, devString);
         SetVideoFormatCallbackFunction   = new LibVlcFunction <SetVideoFormatCallback>(libHandle, libVersion, devString);
         SetHwndFunction                  = new LibVlcFunction <SetHwnd>(libHandle, libVersion, devString);
         GetHwndFunction                  = new LibVlcFunction <GetHwnd>(libHandle, libVersion, devString);
         SetAudioCallbackFunction         = new LibVlcFunction <SetAudioCallback>(libHandle, libVersion, devString);
         SetAudioFormatFunction           = new LibVlcFunction <SetAudioFormat>(libHandle, libVersion, devString);
         SetAudioFormatCallbackFunction   = new LibVlcFunction <SetAudioFormatCallback>(libHandle, libVersion, devString);
         SetAudioVolumeCallbackFunction   = new LibVlcFunction <SetAudioVolumeCallback>(libHandle, libVersion, devString);
         GetLengthFunction                = new LibVlcFunction <GetLength>(libHandle, libVersion, devString);
         GetTimeFunction                  = new LibVlcFunction <GetTime>(libHandle, libVersion, devString);
         SetTimeFunction                  = new LibVlcFunction <SetTime>(libHandle, libVersion, devString);
         GetPositionFunction              = new LibVlcFunction <GetPosition>(libHandle, libVersion, devString);
         SetChapterFunction               = new LibVlcFunction <SetChapter>(libHandle, libVersion, devString);
         GetChapterFunction               = new LibVlcFunction <GetChapter>(libHandle, libVersion, devString);
         GetChapterCountFunction          = new LibVlcFunction <GetChapterCount>(libHandle, libVersion, devString);
         CanPlayFunction                  = new LibVlcFunction <CanPlay>(libHandle, libVersion, devString);
         GetTitleChapterCountFunction     = new LibVlcFunction <GetTitleChapterCount>(libHandle, libVersion, devString);
         SetTitleFunction                 = new LibVlcFunction <SetTitle>(libHandle, libVersion, devString);
         GetTitleFunction                 = new LibVlcFunction <GetTitle>(libHandle, libVersion, devString);
         GetTitleCountFunction            = new LibVlcFunction <GetTitleCount>(libHandle, libVersion, devString);
         PreviousChapterFunction          = new LibVlcFunction <PreviousChapter>(libHandle, libVersion, devString);
         NextChapterFunction              = new LibVlcFunction <NextChapter>(libHandle, libVersion, devString);
         GetRateFunction                  = new LibVlcFunction <GetRate>(libHandle, libVersion, devString);
         SetRateFunction                  = new LibVlcFunction <SetRate>(libHandle, libVersion, devString);
         GetStateFunction                 = new LibVlcFunction <GetState>(libHandle, libVersion, devString);
         GetFPSFunction                   = new LibVlcFunction <GetFPS>(libHandle, libVersion, devString);
         HasVoutFunction                  = new LibVlcFunction <HasVout>(libHandle, libVersion, devString);
         IsSeekableFunction               = new LibVlcFunction <IsSeekable>(libHandle, libVersion, devString);
         CanPauseFunction                 = new LibVlcFunction <CanPause>(libHandle, libVersion, devString);
         NextFrameFunction                = new LibVlcFunction <NextFrame>(libHandle, libVersion, devString);
         NavigateFunction                 = new LibVlcFunction <Navigate>(libHandle, libVersion, devString);
         SetVideoTitleDisplayFunction     = new LibVlcFunction <SetVideoTitleDisplay>(libHandle, libVersion, devString);
         ReleaseTrackDescriptionFunction  = new LibVlcFunction <ReleaseTrackDescription>(libHandle, libVersion, devString);
         ToggleMuteFunction               = new LibVlcFunction <ToggleMute>(libHandle, libVersion, devString);
         GetMuteFunction                  = new LibVlcFunction <GetMute>(libHandle, libVersion, devString);
         SetMuteFunction                  = new LibVlcFunction <SetMute>(libHandle, libVersion, devString);
         GetVolumeFunction                = new LibVlcFunction <GetVolume>(libHandle, libVersion, devString);
         SetVolumeFunction                = new LibVlcFunction <SetVolume>(libHandle, libVersion, devString);
         GetCursorFunction                = new LibVlcFunction <GetCursor>(libHandle, libVersion, devString);
         SetCursorFunction                = new LibVlcFunction <SetCursor>(libHandle, libVersion, devString);
         SetMouseDownFunction             = new LibVlcFunction <SetMouseDown>(libHandle, libVersion, devString);
         SetMouseUpFunction               = new LibVlcFunction <SetMouseUp>(libHandle, libVersion, devString);
         GetOutputChannelFunction         = new LibVlcFunction <GetOutputChannel>(libHandle, libVersion, devString);
         SetOutputChannelFunction         = new LibVlcFunction <SetOutputChannel>(libHandle, libVersion, devString);
         GetAudioTrackFunction            = new LibVlcFunction <GetAudioTrack>(libHandle, libVersion, devString);
         SetAudioTrackFunction            = new LibVlcFunction <SetAudioTrack>(libHandle, libVersion, devString);
         GetAudioTrackCountFunction       = new LibVlcFunction <GetAudioTrackCount>(libHandle, libVersion, devString);
         GetAudioTrackDescriptionFunction = new LibVlcFunction <GetAudioTrackDescription>(libHandle, libVersion, devString);
         IsLibLoaded = true;
     }
 }
コード例 #40
0
ファイル: VlcMediaPlayer.cs プロジェクト: 19871010/xZune.Vlc
 /// <summary>
 /// 载入 LibVlc 的 MediaPlayer 模块,该方法会在 <see cref="Vlc.LoadLibVlc()"/> 中自动被调用
 /// </summary>
 /// <param name="libHandle"></param>
 /// <param name="libVersion"></param>
 /// <param name="devString"></param>
 public static void LoadLibVlc(IntPtr libHandle, Version libVersion, String devString)
 {
     if (!IsLibLoaded)
     {
         _createMediaPlayerFunction = new LibVlcFunction<CreateMediaPlayer>(libHandle, libVersion, devString);
         _createMediaPlayerFromMediaFunction = new LibVlcFunction<CreateMediaPlayerFromMedia>(libHandle, libVersion, devString);
         _releaseMediaPlayerFunction = new LibVlcFunction<ReleaseMediaPlayer>(libHandle, libVersion, devString);
         _retainMediaPlayerFunction = new LibVlcFunction<RetainMediaPlayer>(libHandle, libVersion, devString);
         _setMediaFunction = new LibVlcFunction<SetMedia>(libHandle, libVersion, devString);
         _getMediaFunction = new LibVlcFunction<GetMedia>(libHandle, libVersion, devString);
         _getEventManagerFunction = new LibVlcFunction<GetEventManager>(libHandle, libVersion, devString);
         _isPlayingFunction = new LibVlcFunction<IsPlaying>(libHandle, libVersion, devString);
         _playFunction = new LibVlcFunction<Play>(libHandle, libVersion, devString);
         _setPauseFunction = new LibVlcFunction<SetPause>(libHandle, libVersion, devString);
         _setPositionFunction = new LibVlcFunction<SetPosition>(libHandle, libVersion, devString);
         _stopFunction = new LibVlcFunction<Stop>(libHandle, libVersion, devString);
         _setVideoCallbackFunction = new LibVlcFunction<SetVideoCallback>(libHandle, libVersion, devString);
         _setVideoFormatFunction = new LibVlcFunction<SetVideoFormat>(libHandle, libVersion, devString);
         _setVideoFormatCallbackFunction = new LibVlcFunction<SetVideoFormatCallback>(libHandle, libVersion, devString);
         _setHwndFunction = new LibVlcFunction<SetHwnd>(libHandle, libVersion, devString);
         _getHwndFunction = new LibVlcFunction<GetHwnd>(libHandle, libVersion, devString);
         _setAudioCallbackFunction = new LibVlcFunction<SetAudioCallback>(libHandle, libVersion, devString);
         _setAudioFormatFunction = new LibVlcFunction<SetAudioFormat>(libHandle, libVersion, devString);
         _setAudioFormatCallbackFunction = new LibVlcFunction<SetAudioFormatCallback>(libHandle, libVersion, devString);
         _setAudioVolumeCallbackFunction = new LibVlcFunction<SetAudioVolumeCallback>(libHandle, libVersion, devString);
         _getLengthFunction = new LibVlcFunction<GetLength>(libHandle, libVersion, devString);
         _getTimeFunction = new LibVlcFunction<GetTime>(libHandle, libVersion, devString);
         _setTimeFunction = new LibVlcFunction<SetTime>(libHandle, libVersion, devString);
         _getPositionFunction = new LibVlcFunction<GetPosition>(libHandle, libVersion, devString);
         _setChapterFunction = new LibVlcFunction<SetChapter>(libHandle, libVersion, devString);
         _getChapterFunction = new LibVlcFunction<GetChapter>(libHandle, libVersion, devString);
         _getChapterCountFunction = new LibVlcFunction<GetChapterCount>(libHandle, libVersion, devString);
         _canPlayFunction = new LibVlcFunction<CanPlay>(libHandle, libVersion, devString);
         _getTitleChapterCountFunction = new LibVlcFunction<GetTitleChapterCount>(libHandle, libVersion, devString);
         _setTitleFunction = new LibVlcFunction<SetTitle>(libHandle, libVersion, devString);
         _getTitleFunction = new LibVlcFunction<GetTitle>(libHandle, libVersion, devString);
         _getTitleCountFunction = new LibVlcFunction<GetTitleCount>(libHandle, libVersion, devString);
         _previousChapterFunction = new LibVlcFunction<PreviousChapter>(libHandle, libVersion, devString);
         _nextChapterFunction = new LibVlcFunction<NextChapter>(libHandle, libVersion, devString);
         _getRateFunction = new LibVlcFunction<GetRate>(libHandle, libVersion, devString);
         _setRateFunction = new LibVlcFunction<SetRate>(libHandle, libVersion, devString);
         _getStateFunction = new LibVlcFunction<GetState>(libHandle, libVersion, devString);
         _getFpsFunction = new LibVlcFunction<GetFps>(libHandle, libVersion, devString);
         _hasVoutFunction = new LibVlcFunction<HasVout>(libHandle, libVersion, devString);
         _isSeekableFunction = new LibVlcFunction<IsSeekable>(libHandle, libVersion, devString);
         _canPauseFunction = new LibVlcFunction<CanPause>(libHandle, libVersion, devString);
         _nextFrameFunction = new LibVlcFunction<NextFrame>(libHandle, libVersion, devString);
         _navigateFunction = new LibVlcFunction<Navigate>(libHandle, libVersion, devString);
         _setVideoTitleDisplayFunction = new LibVlcFunction<SetVideoTitleDisplay>(libHandle, libVersion, devString);
         _releaseTrackDescriptionFunction = new LibVlcFunction<ReleaseTrackDescription>(libHandle, libVersion, devString);
         _toggleMuteFunction = new LibVlcFunction<ToggleMute>(libHandle, libVersion, devString);
         _getMuteFunction = new LibVlcFunction<GetMute>(libHandle, libVersion, devString);
         _setMuteFunction = new LibVlcFunction<SetMute>(libHandle, libVersion, devString);
         _getVolumeFunction = new LibVlcFunction<GetVolume>(libHandle, libVersion, devString);
         _setVolumeFunction = new LibVlcFunction<SetVolume>(libHandle, libVersion, devString);
         _getCursorFunction = new LibVlcFunction<GetCursor>(libHandle, libVersion, devString);
         _setCursorFunction = new LibVlcFunction<SetCursor>(libHandle, libVersion, devString);
         _setMouseDownFunction = new LibVlcFunction<SetMouseDown>(libHandle, libVersion, devString);
         _setMouseUpFunction = new LibVlcFunction<SetMouseUp>(libHandle, libVersion, devString);
         _getOutputChannelFunction = new LibVlcFunction<GetOutputChannel>(libHandle, libVersion, devString);
         _setOutputChannelFunction = new LibVlcFunction<SetOutputChannel>(libHandle, libVersion, devString);
         _getAudioTrackFunction = new LibVlcFunction<GetAudioTrack>(libHandle, libVersion, devString);
         _setAudioTrackFunction = new LibVlcFunction<SetAudioTrack>(libHandle, libVersion, devString);
         _getAudioTrackCountFunction = new LibVlcFunction<GetAudioTrackCount>(libHandle, libVersion, devString);
         _getAudioTrackDescriptionFunction = new LibVlcFunction<GetAudioTrackDescription>(libHandle, libVersion, devString);
         _getSizeFunction = new LibVlcFunction<GetSize>(libHandle, libVersion, devString);
         _setScaleFunction = new LibVlcFunction<SetScale>(libHandle, libVersion, devString);
         _getScaleFunction = new LibVlcFunction<GetScale>(libHandle, libVersion, devString);
         _setAspectRatioFunction = new LibVlcFunction<SetAspectRatio>(libHandle, libVersion, devString);
         _getAspectRatioFunction = new LibVlcFunction<GetAspectRatio>(libHandle, libVersion, devString);
         _getVideoWidthFunction = new LibVlcFunction<GetVideoWidth>(libHandle, libVersion, devString);
         _getVideoTrackFunction = new LibVlcFunction<GetVideoTrack>(libHandle, libVersion, devString);
         _setVideoTrackFunction = new LibVlcFunction<SetVideoTrack>(libHandle, libVersion, devString);
         _getVideoTrackCountFunction = new LibVlcFunction<GetVideoTrackCount>(libHandle, libVersion, devString);
         _getVideoTrackDescriptionFunction = new LibVlcFunction<GetVideoTrackDescription>(libHandle, libVersion, devString);
         IsLibLoaded = true;
     }
 }
コード例 #41
0
ファイル: Vlc.cs プロジェクト: birbilis/Meta.Vlc
        /// <exception cref="TypeLoadException">A custom attribute type cannot be loaded. </exception>
        /// <exception cref="NoLibVlcFunctionAttributeException">
        ///     For LibVlcFunction, need LibVlcFunctionAttribute to get Infomation
        ///     of function.
        /// </exception>
        /// <exception cref="FunctionNotFoundException">Can't find function in dll.</exception>
        internal static void LoadLibVlc()
        {
            if (IsLibLoaded) return;

            _newInstanceFunction = new LibVlcFunction<NewInstance>();
            _releaseInstanceFunction = new LibVlcFunction<ReleaseInstance>();
            _retainInstanceFunction = new LibVlcFunction<RetainInstance>();
            _addInterfaceFunction = new LibVlcFunction<AddInterface>();
            _setExitHandlerFunction = new LibVlcFunction<SetExitHandler>();
            _waitFunction = new LibVlcFunction<Wait>();
            _setUserAgentFunction = new LibVlcFunction<SetUserAgent>();
            _setAppIdFunction = new LibVlcFunction<SetAppId>();
            _getAudioFilterListFunction = new LibVlcFunction<GetAudioFilterList>();
            _getVideoFilterListFunction = new LibVlcFunction<GetVideoFilterList>();
            _releaseVlmInstanceFunction = new LibVlcFunction<ReleaseVlmInstance>();
            _newBroadCastInputFunction = new LibVlcFunction<NewBroadCastInput>();
            _newVodInputFunction = new LibVlcFunction<NewVodInput>();
            _delBoroadcastOrOvdFunction = new LibVlcFunction<DelBoroadcastOrOvd>();
            _mediaSwitchFunction = new LibVlcFunction<MediaSwitch>();
            _setMediaOutputFunction = new LibVlcFunction<SetMediaOutput>();
            _setMediaInputFunction = new LibVlcFunction<SetMediaInput>();
            _addMediaInputFunction = new LibVlcFunction<AddMediaInput>();
            _setMediaLoopFunction = new LibVlcFunction<SetMediaLoop>();
            _setVodMuxerFunction = new LibVlcFunction<SetVodMuxer>();
            _editMediaParasFunction = new LibVlcFunction<EditMediaParas>();
            _playNamedBroadcastFunction = new LibVlcFunction<PlayNamedBroadcast>();
            _stopNamedBroadcastFunction = new LibVlcFunction<StopNamedBroadcast>();
            _pauseNamedBroadcastFunction = new LibVlcFunction<PauseNamedBroadcast>();
            _seekInNamedBroadcastFunction = new LibVlcFunction<SeekInNamedBroadcast>();
            _returnJsonMessageFunction = new LibVlcFunction<ReturnJsonMessage>();
            _getMediaPositionFunction = new LibVlcFunction<GetMediaPosition>();
            _getMediaTimeFunction = new LibVlcFunction<GetMediaTime>();
            _getMediaLengthFunction = new LibVlcFunction<GetMediaLength>();
            _getMediaBackRateFunction = new LibVlcFunction<GetMediaBackRate>();
            _getMediaEventManagerFunction = new LibVlcFunction<GetMediaEventManager>();
            IsLibLoaded = true;
        }
コード例 #42
0
        public void Dispose()
        {
            SetCallbacks = null;
            SetFormatCallbacks = null;
            SetFormat = null;

            ToggleFullscreen = null;
            SetFullscreen = null;
            GetFullscreen = null;
            SetKeyInput = null;
            GetSize = null;
            GetCursor = null;
            GetScale = null;
            SetScale = null;
            GetAspectRatio = null;
            SetAspectRatio = null;
            GetSpu = null;
            GetSpuCount = null;
            GetSpuDescription = null;
            SetSpu = null;
            SetSubtitleFile = null;
            GetTeletext = null;
            SetTeletext = null;
            ToggleTeletext = null;
            GetTrackCount = null;
            GetTrack = null;
            SetTrack = null;
            TakeSnapshot = null;
            SetDeinterlace = null;
            GetIntegerMarquee = null;
            GetStringMarquee = null;
            SetIntegerMarquee = null;
            SetStringMarquee = null;
            GetIntegerLogoOption = null;
            SetIntegerLogoOption = null;
            SetStringLogoOption = null;
            GetIntegerAdjust = null;
            SetIntegerAdjust = null;
            GetFloatAdjust = null;
            SetFloatAdjust = null;
        }
コード例 #43
0
 /// <summary>
 ///     载入 LibVlc 的 MediaPlayer 模块,该方法会在 <see cref="Vlc.LoadLibVlc()" /> 中自动被调用
 /// </summary>
 /// <param name="libHandle"></param>
 /// <param name="libVersion"></param>
 /// <param name="devString"></param>
 internal static void LoadLibVlc()
 {
     if (!IsLibLoaded)
     {
         _createMediaPlayerFunction          = new LibVlcFunction <CreateMediaPlayer>();
         _createMediaPlayerFromMediaFunction = new LibVlcFunction <CreateMediaPlayerFromMedia>();
         _releaseMediaPlayerFunction         = new LibVlcFunction <ReleaseMediaPlayer>();
         _retainMediaPlayerFunction          = new LibVlcFunction <RetainMediaPlayer>();
         _setMediaFunction                 = new LibVlcFunction <SetMedia>();
         _getMediaFunction                 = new LibVlcFunction <GetMedia>();
         _getEventManagerFunction          = new LibVlcFunction <GetEventManager>();
         _isPlayingFunction                = new LibVlcFunction <IsPlaying>();
         _playFunction                     = new LibVlcFunction <Play>();
         _setPauseFunction                 = new LibVlcFunction <SetPause>();
         _setPositionFunction              = new LibVlcFunction <SetPosition>();
         _stopFunction                     = new LibVlcFunction <Stop>();
         _setVideoCallbackFunction         = new LibVlcFunction <SetVideoCallback>();
         _setVideoFormatFunction           = new LibVlcFunction <SetVideoFormat>();
         _setVideoFormatCallbackFunction   = new LibVlcFunction <SetVideoFormatCallback>();
         _setHwndFunction                  = new LibVlcFunction <SetHwnd>();
         _getHwndFunction                  = new LibVlcFunction <GetHwnd>();
         _setAudioCallbackFunction         = new LibVlcFunction <SetAudioCallback>();
         _setAudioFormatFunction           = new LibVlcFunction <SetAudioFormat>();
         _setAudioFormatCallbackFunction   = new LibVlcFunction <SetAudioFormatCallback>();
         _setAudioVolumeCallbackFunction   = new LibVlcFunction <SetAudioVolumeCallback>();
         _getLengthFunction                = new LibVlcFunction <GetLength>();
         _getTimeFunction                  = new LibVlcFunction <GetTime>();
         _setTimeFunction                  = new LibVlcFunction <SetTime>();
         _getPositionFunction              = new LibVlcFunction <GetPosition>();
         _setChapterFunction               = new LibVlcFunction <SetChapter>();
         _getChapterFunction               = new LibVlcFunction <GetChapter>();
         _getChapterCountFunction          = new LibVlcFunction <GetChapterCount>();
         _canPlayFunction                  = new LibVlcFunction <CanPlay>();
         _getTitleChapterCountFunction     = new LibVlcFunction <GetTitleChapterCount>();
         _setTitleFunction                 = new LibVlcFunction <SetTitle>();
         _getTitleFunction                 = new LibVlcFunction <GetTitle>();
         _getTitleCountFunction            = new LibVlcFunction <GetTitleCount>();
         _previousChapterFunction          = new LibVlcFunction <PreviousChapter>();
         _nextChapterFunction              = new LibVlcFunction <NextChapter>();
         _getRateFunction                  = new LibVlcFunction <GetRate>();
         _setRateFunction                  = new LibVlcFunction <SetRate>();
         _getStateFunction                 = new LibVlcFunction <GetState>();
         _getFpsFunction                   = new LibVlcFunction <GetFps>();
         _hasVoutFunction                  = new LibVlcFunction <HasVout>();
         _isSeekableFunction               = new LibVlcFunction <IsSeekable>();
         _canPauseFunction                 = new LibVlcFunction <CanPause>();
         _nextFrameFunction                = new LibVlcFunction <NextFrame>();
         _navigateFunction                 = new LibVlcFunction <Navigate>();
         _setVideoTitleDisplayFunction     = new LibVlcFunction <SetVideoTitleDisplay>();
         _toggleMuteFunction               = new LibVlcFunction <ToggleMute>();
         _getMuteFunction                  = new LibVlcFunction <GetMute>();
         _setMuteFunction                  = new LibVlcFunction <SetMute>();
         _getVolumeFunction                = new LibVlcFunction <GetVolume>();
         _setVolumeFunction                = new LibVlcFunction <SetVolume>();
         _getCursorFunction                = new LibVlcFunction <GetCursor>();
         _setCursorFunction                = new LibVlcFunction <SetCursor>();
         _setMouseDownFunction             = new LibVlcFunction <SetMouseDown>();
         _setMouseUpFunction               = new LibVlcFunction <SetMouseUp>();
         _getOutputChannelFunction         = new LibVlcFunction <GetOutputChannel>();
         _setOutputChannelFunction         = new LibVlcFunction <SetOutputChannel>();
         _getAudioTrackFunction            = new LibVlcFunction <GetAudioTrack>();
         _setAudioTrackFunction            = new LibVlcFunction <SetAudioTrack>();
         _getAudioTrackCountFunction       = new LibVlcFunction <GetAudioTrackCount>();
         _getAudioTrackDescriptionFunction = new LibVlcFunction <GetAudioTrackDescription>();
         _getSizeFunction                  = new LibVlcFunction <GetSize>();
         _setScaleFunction                 = new LibVlcFunction <SetScale>();
         _getScaleFunction                 = new LibVlcFunction <GetScale>();
         _setAspectRatioFunction           = new LibVlcFunction <SetAspectRatio>();
         _getAspectRatioFunction           = new LibVlcFunction <GetAspectRatio>();
         //_getVideoWidthFunction = new LibVlcFunction<GetVideoWidth>();
         //_getVideoHeightFunction = new LibVlcFunction<GetVideoHeight>();
         _getVideoTrackFunction            = new LibVlcFunction <GetVideoTrack>();
         _setVideoTrackFunction            = new LibVlcFunction <SetVideoTrack>();
         _getVideoTrackCountFunction       = new LibVlcFunction <GetVideoTrackCount>();
         _getVideoTrackDescriptionFunction = new LibVlcFunction <GetVideoTrackDescription>();
         _setEqualizerFunction             = new LibVlcFunction <SetEqualizer>();
         _enumAudioDeviceListFunction      = new LibVlcFunction <EnumAudioDeviceList>();
         _getAudioDeviceListFunction       = new LibVlcFunction <GetAudioDeviceList>();
         _getAudioOutputListFunction       = new LibVlcFunction <GetAudioOutputList>();
         _setAudioOutputFunction           = new LibVlcFunction <SetAudioOutput>();
         _setAudioDeviceFunction           = new LibVlcFunction <SetAudioDevice>();
         _getAudioDeviceFunction           = new LibVlcFunction <GetAudioDevice>();
         IsLibLoaded = true;
     }
 }