コード例 #1
0
        public static Version BASS_DSHOW_GetVersion(int fieldcount)
        {
            if (fieldcount < 1)
            {
                fieldcount = 1;
            }
            if (fieldcount > 4)
            {
                fieldcount = 4;
            }
            int     num    = BassDShow.BASS_DSHOW_GetVersion();
            Version result = new Version(2, 4);

            switch (fieldcount)
            {
            case 1:
                result = new Version(num >> 24 & 255, 0);
                break;

            case 2:
                result = new Version(num >> 24 & 255, num >> 16 & 255);
                break;

            case 3:
                result = new Version(num >> 24 & 255, num >> 16 & 255, num >> 8 & 255);
                break;

            case 4:
                result = new Version(num >> 24 & 255, num >> 16 & 255, num >> 8 & 255, num & 255);
                break;
            }
            return(result);
        }
コード例 #2
0
        public static BASS_DSHOW_CHANNELINFO BASS_DSHOW_ChannelGetInfo(int handle)
        {
            BASS_DSHOW_CHANNELINFO result = new BASS_DSHOW_CHANNELINFO();

            BassDShow.BASS_DSHOW_ChannelGetInfo(handle, ref result);
            return(result);
        }
コード例 #3
0
 public static bool BASS_DSHOW_Init(IntPtr hWnd, BASSDSHOWInit flags)
 {
     if (!BassNet.OmitCheckVersion)
     {
         BassDShow.CheckVersion();
     }
     return(BassDShow.BASS_DSHOW_Init(hWnd, (int)flags));
 }
コード例 #4
0
        public static BASS_DSHOW_COLORRANGE BASS_DSHOW_ChannelColorRange(int handle, BASSDSHOWColorControl id)
        {
            BASS_DSHOW_COLORRANGE result = new BASS_DSHOW_COLORRANGE();

            if (BassDShow.BASS_DSHOW_ChannelColorRange(handle, id, ref result))
            {
                return(result);
            }
            return(null);
        }
コード例 #5
0
        public static Image BASS_DSHOW_ChannelGetBitmap(int handle)
        {
            IntPtr intPtr = BassDShow.BASS_DSHOW_ChannelGetBitmapPtr(handle);

            if (intPtr != IntPtr.Zero)
            {
                return(Image.FromHbitmap(intPtr));
            }
            return(null);
        }
コード例 #6
0
        public bool BASS_DSHOW_PluginGetInfo(int plugin, BASS_DSHOW_PLUGININFO info)
        {
            bool flag = BassDShow.BASS_DSHOW_PluginGetInfoInternal(plugin, ref info._internal);

            if (flag)
            {
                info.version        = info._internal.version;
                info.decoderType    = info._internal.decoderType;
                info.plgdescription = Utils.IntPtrAsStringAnsi(info._internal.plgdescription);
            }
            return(flag);
        }
コード例 #7
0
 private static void CheckVersion()
 {
     try
     {
         if (Utils.HighWord(BassDShow.BASS_DSHOW_GetVersion()) != 258)
         {
             Version                 version         = BassDShow.BASS_DSHOW_GetVersion(2);
             Version                 version2        = new Version(1, 2);
             FileVersionInfo         fileVersionInfo = null;
             ProcessModuleCollection modules         = Process.GetCurrentProcess().Modules;
             for (int i = modules.Count - 1; i >= 0; i--)
             {
                 ProcessModule processModule = modules[i];
                 if (processModule.ModuleName.ToLower().Equals("xVideo".ToLower()))
                 {
                     fileVersionInfo = processModule.FileVersionInfo;
                     break;
                 }
             }
             if (fileVersionInfo != null)
             {
                 MessageBox.Show(string.Format("An incorrect version of BASS_DSHOW was loaded!\r\n\r\nVersion loaded: {0}.{1}\r\nVersion expected: {2}.{3}\r\n\r\nFile: {4}\r\nFileVersion: {5}\r\nDescription: {6}\r\nCompany: {7}\r\nLanguage: {8}", new object[]
                 {
                     version.Major,
                     version.Minor,
                     version2.Major,
                     version2.Minor,
                     fileVersionInfo.FileName,
                     fileVersionInfo.FileVersion,
                     fileVersionInfo.FileDescription,
                     fileVersionInfo.CompanyName + " " + fileVersionInfo.LegalCopyright,
                     fileVersionInfo.Language
                 }), "Incorrect BASS_DSHOW Version", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
             }
             else
             {
                 MessageBox.Show(string.Format("An incorrect version of BASS_DSHOW was loaded!\r\n\r\nVersion loaded: {0}.{1}\r\nVersion expected: {2}.{3}", new object[]
                 {
                     version.Major,
                     version.Minor,
                     version2.Major,
                     version2.Minor
                 }), "Incorrect BASS_DSHOW Version", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
             }
         }
     }
     catch
     {
     }
 }
コード例 #8
0
        public static BASS_DSHOW_STREAMS BASS_DSHOW_ChannelGetStream(int handle, int index)
        {
            BASS_DSHOW_STREAMS bass_DSHOW_STREAMS = new BASS_DSHOW_STREAMS();

            if (BassDShow.BASS_DSHOW_ChannelGetStream(handle, index, ref bass_DSHOW_STREAMS._internal))
            {
                bass_DSHOW_STREAMS.format  = bass_DSHOW_STREAMS._internal.format;
                bass_DSHOW_STREAMS.name    = Utils.IntPtrAsStringAnsi(bass_DSHOW_STREAMS._internal.name);
                bass_DSHOW_STREAMS.index   = bass_DSHOW_STREAMS._internal.index;
                bass_DSHOW_STREAMS.enabled = bass_DSHOW_STREAMS._internal.enabled;
                return(bass_DSHOW_STREAMS);
            }
            return(null);
        }
コード例 #9
0
 public static int BASS_DSHOW_StreamCreateFilter(string file, string filter, IntPtr win, BASSFlag flags)
 {
     flags |= BASSFlag.BASS_UNICODE;
     return(BassDShow.BASS_DSHOW_StreamCreateFilterUnicode(file, filter, win, flags));
 }
コード例 #10
0
 public static bool BASS_DSHOW_Register(string email, string reg)
 {
     return(BassDShow.BASS_DSHOW_RegisterUnicode(email, reg, BASSFlag.BASS_UNICODE));
 }
コード例 #11
0
        public static int BASS_DSHOW_StreamCreateDVD(string dvd, IntPtr win, BASSFlag flags)
        {
            flags |= BASSFlag.BASS_UNICODE;

            return(BassDShow.BASS_DSHOW_StreamCreateDVDUnicode(dvd, win, flags));
        }
コード例 #12
0
 public static int BASS_DSHOW_LoadPluginDS(string guid, string name)
 {
     return(BassDShow.BASS_DSHOW_LoadPluginDSUnicode(guid, name, BASSFlag.BASS_UNICODE));
 }
コード例 #13
0
 public static int BASS_DSHOW_LoadPlugin(string file)
 {
     return(BassDShow.BASS_DSHOW_LoadPluginUnicode(file, BASSFlag.BASS_UNICODE));
 }
コード例 #14
0
 public static bool BASS_DSHOW_ChannelAddFile(int handle, string filename)
 {
     return(BassDShow.BASS_DSHOW_ChannelAddFileUnicode(handle, filename, BASSFlag.BASS_UNICODE));
 }