Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
24th February 2019, 12:26 | #1 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
SysInfo plugin v0.1.2.9
This plugin returns info about OS/CPU*/Memory/Screen/Avisynth
Code:
System related functions: string SI_OSVersionString() Returns Operating System info float SI_OSVersionNumber() int SI_OSBuildNumber float SI_OSServicePack bool SI_IsOS64Bit bool SI_IsWin10 bool SI_IsWin7 bool SI_IsWin8 bool SI_IsWin81 bool SI_IsWinServer2003 bool SI_IsWinServer2008 bool SI_IsWinServer2008R2 bool SI_IsWinServer2012 bool SI_IsWinServer2012R2 bool SI_IsWinVista bool SI_IsWinXP Convenience functions for the running OS string SI_CPUName() Returns the CPU brand string + code name int SI_NumberOfCPUs() Returns the number of physical CPUs in the system int SI_PhysicalCores() Returns the total number of physical cores in the system. If multiple CPUs are in the system, the sum of physical cores of all CPUs is returned. int SI_LogicalCores() Returns the total number of logical cores in the system. If multiple CPUs are in the system, the sum of logical cores of all CPUs is returned. string SI_CPUExtensions() Returns supported CPU extensions/Instruction sets. bool SI_HasAVX bool SI_HasAVX2 bool SI_HasAVX512 bool SI_HasFMA3 bool SI_HasFMA4 bool SI_HasMMX bool SI_HasSSE bool SI_HasSSE2 bool SI_HasSSE3 bool SI_HasSSE41 bool SI_HasSSE42 bool SI_HasSSSE3 Convenience functions for supported CPU extensions int SI_TotalSystemMemory() Returns the total system memory in MiB int SI_AvailableSystemMemory() Returns the available system memory in MiB string SI_ProcessName() Returns the name of the current process int SI_ProcessBitness() Returns the bitness of the current process int SI_ModulePath() Returns the path of the SysInfo plugin. int SI_ScreenResX() Returns the horizontal screen resolution int SI_ScreenResY() Returns the vertical screen resolution int SI_ScreenBitsPerPixel() Returns the screen BPP int SI_ScreenVRefresh() Returns the vertical refresh rate of the screen string SI_GetEnvVar(string "env_var") Returns the value of the environment variable "env_var" Example: Path = SI_GetEnvVar("PATH") The argument "env_var" is not case-sensitive string SI_UserName() Returns the name of the currently logged in user string SI_GetLogicalDrives() Returns logical drives with labels int SI_GetLogicalDriveTotalSize("drive_letter") Returns the total size (in MiB) for a given drive letter int SI_GetLogicalDriveFreeSpace("drive_letter") Returns the free space (in MiB) for a given drive letter int SI_GetLogicalDriveUsedSpace("drive_letter") Returns the used space (in MiB) for a given drive letter Avisynth related functions: string AI_AvsFileVersion Returns the value of the FileVersion resource property string AI_AvsProductVersion Returns the value of the ProductVersion resource property int AI_AvsPlusBuildNumber Returns the AVS+ build number bool AI_IsAvs26 Returns true if the Avisynth VersionNumber is >= 2.6 bool AI_IsAvsPlus Returns true for Avisynth+ string AI_AvsDLLPath() Returns the path of the loaded avisynth.dll string AI_AvsDLLTimeStamp() Returns the time stamp (last write time) of the loaded avisynth.dll bool AI_InternalFunctionExists(string "name") Returns true if an internal function ("name") is available in the current environment The argument 'name' is not case-sensitive bool AI_ExternalFunctionExists(string "name") Returns true if an external (plugin) function ("name") is available in the current environment The argument 'name' is not case-sensitive bool AI_FunctionExists(string "name") Returns true if an internal or external (plugin) function ("name") is available in the current environment The argument 'name' is not case-sensitive string AI_AutoLoadPath(string "registry_location") Returns the Avisynth auto-load directory/directories. Valid arguments for "registry_location" are (case sensitive!): (See http://avisynth.nl/index.php/AviSynth%2B#New_Functions for info on the origin of these arguments) USER_PLUS_PLUGINS MACHINE_PLUS_PLUGINS USER_CLASSIC_PLUGINS MACHINE_CLASSIC_PLUGINS Other functions: float SysInfoVersion() Returns SysInfo.dll version number Download (32 & 64 bit) (SysInfo_*.7z on the download page) Recent changes (full history in 'ChangeLog.txt'): v0.1.2.9 - Updated libcpuid (Intel Rocket Lake, AMD Ryzen Milan) *CPU feature detection uses Veselin Georgiev's libcpuid C-library.
__________________
Groucho's Avisynth Stuff Last edited by Groucho2004; 31st March 2021 at 18:35. |
24th February 2019, 12:54 | #3 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Thanks. This is my first plugin, I hope I didn't screw up.
__________________
Groucho's Avisynth Stuff Last edited by Groucho2004; 24th February 2019 at 13:53. |
24th February 2019, 15:12 | #4 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Hi G2K4,
Just pointing out something that you may like to query with your provider, below from FlagFox, FireFox extension. Maybe just means that it is not an HTTPS, dont know.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
24th February 2019, 15:23 | #5 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
It probably isn't. I signed up for this account 20+ years ago when I was still living in Ireland and have been using it for (free) data storage since.
If it is of concern to you I might change the hosting although this host is quite convenient for me...
__________________
Groucho's Avisynth Stuff Last edited by Groucho2004; 24th February 2019 at 21:50. |
24th February 2019, 15:45 | #6 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
It is of no concern to me, but as I noticed it, thought I would point it out.
However, took a little look at source, and think you need to use env->SaveString() when returning strings to avs. Avisynth has its own free store, as have you, you need hand over control and responsibility to free mem to avs. See Here:- https://forum.doom9.org/showthread.p...36#post1633936 EDIT: http://avisynth.nl/index.php/Filter_SDK/Env_SaveString EDIT: eg here Code:
AVSValue SI_OSVersion(AVSValue args, void* user_data, IScriptEnvironment* env) { if (!bOSVersionInitialized) GetOSVersion(); char * os; os = new char[4096]; sprintf(os, "%s", OSVersion.c_str()); // return os; AVSValue ret = env->SaveString(os); delete [] os; return ret; }
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 24th February 2019 at 15:57. |
24th February 2019, 16:00 | #7 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
Will change it in the next version.
__________________
Groucho's Avisynth Stuff Last edited by Groucho2004; 25th March 2019 at 22:56. |
|
24th February 2019, 21:44 | #9 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
v0.1.0.1
- Better error handling - Fixed some minor bugs - Added SI_NumberOfCPUs
__________________
Groucho's Avisynth Stuff |
25th February 2019, 00:20 | #10 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
v0.1.0.2
- Added SI_CPUClock - Added gpl/copyright stuff BTW, I'm open to suggestions as to what other functions to add (fitting within the scope/context of this plugin).
__________________
Groucho's Avisynth Stuff Last edited by Groucho2004; 25th February 2019 at 00:28. |
25th February 2019, 00:58 | #11 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
[Ie, would that be, nominal rated clock, current clock incl throttling, max burst clock (as on some ATOM chips, my Win10 ATOM Z3735F is quad @ 1.33GHz, burst to 1.8GHz).] Guessin' current.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
|
25th February 2019, 02:35 | #12 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
Anyway, I'll probably remove it since it's not terribly useful and, after reading the documentation, results can be unreliable in some cases.
__________________
Groucho's Avisynth Stuff Last edited by Groucho2004; 25th February 2019 at 02:42. |
|
25th February 2019, 07:41 | #13 | Link |
47.952fps@71.928Hz
Join Date: Mar 2011
Posts: 940
|
Wow, this cool. Thanks a lot! This is bound to help plenty out in the future.
__________________
Win10 (x64) build 19041 NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4) NTSC | DVD: R1 | BD: A AMD Ryzen 5 2600 @3.4GHz (6c/12th, I'm on AVX2 now!)
|
25th February 2019, 14:18 | #14 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
v0.1.0.3
- Added SI_AvailableSystemMemory - Removed SI_CPUClock
__________________
Groucho's Avisynth Stuff |
2nd March 2019, 13:56 | #15 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
v0.1.0.4
- Added SI_ModulePath - Updated some error messages 'SI_ModulePath' returns the directory in which SysInfo.dll resides and can be used for example to load DLL dependencies such as libfftw3f-3.dll via tsp's LoadDLL(). Example: Code:
LoadDLL(SI_ModulePath + "\libfftw3f-3.dll") AVISource("Test.avi") FFT3DFilter()
__________________
Groucho's Avisynth Stuff Last edited by Groucho2004; 14th March 2019 at 15:22. |
2nd March 2019, 14:37 | #16 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Perfect! Lazy People can use a autoLoadDLLs.avsi script like this now
\plugins \fft Code:
LoadDLL(SI_ModulePath + "\..\fft\libfftw3-3.dll") LoadDLL(SI_ModulePath + "\..\fft\libfftw3f-3.dll")
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database Last edited by ChaosKing; 2nd March 2019 at 14:39. |
2nd March 2019, 15:10 | #17 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Neat. Have not even considered that.
__________________
Groucho's Avisynth Stuff |
2nd March 2019, 22:09 | #18 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Me does this rel Plugins (same script works both x86 & x64 & Std) [Assuming x86/x64 dlls all have same name, or could eg switch on CPU]
InitExternalPlugins.avsi Code:
RT_DebugF("Init_ExternalPlugins") # ... fn6= ".\LSMASH_CPP\LSMASHSource.dll" # L-Smash CPP Exist(fn6) ? RT_DebugF("Loading %s",fn6) : RT_DebugF("NOT FOUND %s",fn6) Exist(fn6) ? LoadPlugin(fn6) : NOP
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 2nd March 2019 at 22:11. |
6th March 2019, 19:33 | #19 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
v0.1.0.5
- Added SI_TotalSystemMemory - Refactor/Reorganize
__________________
Groucho's Avisynth Stuff |
7th March 2019, 06:34 | #20 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Ooh lovely, Thank you Grouchy 200.4%
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 7th March 2019 at 06:47. |
Thread Tools | Search this Thread |
Display Modes | |
|
|