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. |
25th March 2019, 15:47 | #21 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Yo Dude,
Just had a daft idea, hows bout info on current screen display size, depth, could introduce a number of other functions in same vein. No probs if not implemented, havva guddun EDIT: Was thinkin' to let user know likely frame size ahead of time, of frame returned from new ClipBoard_GetDIB() thingy.
__________________
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; 25th March 2019 at 16:14. |
25th March 2019, 16:27 | #22 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
Don't know what that means. Can you elaborate a bit?
__________________
Groucho's Avisynth Stuff |
|
25th March 2019, 16:30 | #23 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Post in thread before your post, Code:
ClipBoard_GetDIB() : Get DIB/BitMap from ClipBoard (RGB24 and RGB32[as RGB24] Only). Returns:- Int, 0 : DIB Bitmap not available on ClipBoard -1: Cannot Open Clipboard -2: Cannot get ClipBoard data -3: Lock ClipBoard memory failed -?: Other errors (See DebugView output, Google) Clip, DIB/Bitmap from ClipBoard. (Single Frame RGB24 @ 24FPS).
__________________
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 March 2019, 16:37 | #24 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
So far I have this:
Is that what you had in mind?
__________________
Groucho's Avisynth Stuff |
25th March 2019, 16:42 | #25 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Perfecto
EDIT: But, how come you got two screen x dimensions, dual displays perhaps EDIT: Dual dispay stuff did not even occur to me, function returning number of displays [eg Disps=SI_NumberDisplays()], and then SI_Display_XDim(Display=Disps-1) for Last display x dim. (above is zero relative display number).
__________________
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; 25th March 2019 at 16:48. |
25th March 2019, 16:47 | #26 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Typo in the script.
__________________
Groucho's Avisynth Stuff |
25th March 2019, 17:08 | #27 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
v0.1.0.6
- Added Device caps for the screen (SI_ScreenXRes, SI_ScreenYRes and SI_ScreenBitsPerPixel)
__________________
Groucho's Avisynth Stuff |
25th March 2019, 17:14 | #28 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Oooooo Lovely Jubbly.
__________________
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 March 2019, 17:52 | #29 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Its come in handy already
ShowAndWriteClipBoard_DIB.AVS Code:
# ShowAndWriteClipBoard_DIB.AVS # Show & Write to Image file, last Bitmap copied to ClipBoard (eg "CTRL/ALT/Print_Screen" or "CTRL/Fn/Print_Screen" or whatever your key combo is) # VDub2 does NOT need be TOP Window to CAP & Write Screen Using eg CTRL/ALT/Print_Screen ####### CONFIG ################ W=640 # If W > 0 then resize clipBoard Bitmap to W : Else use Original Screen X Dimension H=480 # If Y > 0 then resize clipBoard Bitmap to H : Else use Original Screen Y Dimension CHECKEVERY=24 # Check for ClipBoard BitMap every CHECKEVERY frames (24 = once per second for 24FPS Blankclip) # MPC-HC seems a little unresponsive to this script, VDub2 plays fine, x86 and x64. WRITE=True # Write BitMap to eg D:\CB_000000.BMP, Requires RT_Stats v1.43 if WRITEFILE NOT FullPathName (Incl COLON eg 'D:\') WRITEFILE="D:\ClipBoard\CB_" # Path MUST Exist ######## End Of CONFIG ############### WRITEFILE = (WRITE && FindStr(WRITEFILE,":")==0) ? RT_GetFullPathName(WRITEFILE) : WRITEFILE XRES=SI_ScreenResX YRES=SI_ScreenResY # Req Groucho2004 SysInfo plugin v0.1.0.7 W = (W<=0) ? XRES : W H = (H<=0) ? YRES : H RESIZE = (W!=XRES || H!=YRES) BlankClip(Width=W,Height=H,Length=24*60*60,Pixel_Type="RGB24").KillAudio CLP=Trim(0,-1) WrClp=CLP.BlankClip(Length=0) IMGN=0 # Dummy Prep SSS=""" n = current_frame CB=(n % CHECKEVERY == 0) ? ClipBoard_GetDIB() : 0 GotDIB=(CB.IsClip) (GotDIB) ? ClipBoard_Clear() : NOP CB = (GotDIB&&RESIZE) ? CB.BiCubicResize(W,H) : CB WrClp= (GotDIB&&WRITE) ? WrClp++CB : WrClp current_frame = (GotDIB&&WRITE) ? IMGN : n # Force ImageWriter to use our ClipBoard CAP frame number CLP = (GotDIB&&WRITE) ? WrClp.ImageWriter(WRITEFILE,type="bmp") : CLP IMGN = (GotDIB&&WRITE) ? IMGN + 1 : IMGN return CLP """ Scriptclip(SSS)
__________________
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; 25th March 2019 at 23:16. |
25th March 2019, 22:36 | #30 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
v0.1.0.7
- Added proper error handling for DevCaps - Renamed SI_ScreenXRes/SI_ScreenYRes to SI_ScreenResX/SI_ScreenResY - Added SI_CPUExtensions As usual, see first post in this thread for details.
__________________
Groucho's Avisynth Stuff |
21st April 2019, 12:42 | #31 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
No idea if at all of use, but just found this code in Wsus Offline update : Client/Bin/IfAdmin.cpp
Code:
// Code is a Microsoft sample found at http://msdn2.microsoft.com/en-us/library/aa376389.aspx #include "windows.h" #include "stdafx.h" int _tmain(int argc, _TCHAR* argv[]) { /*++ Routine Description: This routine returns TRUE if the caller's process is a member of the Administrators local group. Caller is NOT expected to be impersonating anyone and is expected to be able to open its own process and process token. Arguments: None. Return Value: TRUE - Caller has Administrators local group. FALSE - Caller does not have Administrators local group. -- */ BOOL b; SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY; PSID AdministratorsGroup; b = AllocateAndInitializeSid( &NtAuthority, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &AdministratorsGroup); if(b) { if (!CheckTokenMembership( NULL, AdministratorsGroup, &b)) { b = FALSE; } FreeSid(AdministratorsGroup); } return(b); } .
__________________
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 ??? |
21st April 2019, 13:34 | #32 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
__________________
Groucho's Avisynth Stuff |
|
23rd April 2019, 11:10 | #33 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
v0.1.0.8
- Added 'SI_ProcessBitness'
__________________
Groucho's Avisynth Stuff |
6th May 2019, 17:26 | #34 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Any chance of Windows NT version number, for use to eg decide which MvTools.dll to load, XP (<6.0) or Vista+ (>=6.0).
Much easier than having multiple Plugins setups for different hardware (better if avsi plugin loader based on NT version number). SI_OSVersion could be persuaded to assist but would be a bit of a tedious task and a bit convoluted. Thanks. Suggest maybe SI_NtVersionNumber(). Windows NT on WikiPedia:- https://en.wikipedia.org/wiki/Windows_NT And:- https://en.wikipedia.org/wiki/List_o...ndows_versions
__________________
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; 6th May 2019 at 17:39. |
6th May 2019, 19:13 | #35 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
Edit - SI_OSVersionNumber(): return string or float?
__________________
Groucho's Avisynth Stuff Last edited by Groucho2004; 6th May 2019 at 19:25. |
|
6th May 2019, 20:44 | #36 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Float preferable, easier for direct compare greater/equal/lesser style.
__________________
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 ??? |
7th May 2019, 00:40 | #37 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
v0.1.0.9
- Added 'SI_OSVersionNumber' - Changed 'SI_OSVersion' to 'SI_OSVersionString'
__________________
Groucho's Avisynth Stuff |
7th May 2019, 00:53 | #38 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Magical, thank you sir.
__________________
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 ??? |
17th May 2019, 00:28 | #39 | Link | |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,546
|
#25:
Quote:
Well, late to the party I am a bit indeed now, isn't it ;-) (In a "retiring home from a muscateller" mood...) And many thanks for your continued work, you both !
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." Last edited by Emulgator; 17th May 2019 at 00:31. |
|
20th June 2019, 21:27 | #40 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Hi Grouchy, can you tell, is there any contradiction in these two outputs regarding CPU extensions.
and Code:
InitExternalPlugins: InitExternalPlugins: Auto load plugins script ENTRY InitExternalPlugins: InitExternalPlugins:ShowAvsInfo: InitExternalPlugins:ShowAvsInfo: VersionString = 'AviSynth+ 0.1 (r2772, MT, i386)' InitExternalPlugins:ShowAvsInfo: OSVersionString = 'Windows 7 (x64) Service Pack 1.0 (Build 7601)' InitExternalPlugins:ShowAvsInfo: OSVersionNumber = 6.100000 InitExternalPlugins:ShowAvsInfo: CPUName = 'Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz / Yorkfield (Core 2 Quad) 6M' InitExternalPlugins:ShowAvsInfo: Cores = 04:04 (Phy:Log) InitExternalPlugins:ShowAvsInfo: CPU Extensions = 'MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1' InitExternalPlugins:ShowAvsInfo: Total Memory = 12221MB InitExternalPlugins:ShowAvsInfo: Avail Memory = 9824MB' InitExternalPlugins:ShowAvsInfo: Sys Bitness = 32 # EDIT: Actually 32 bit AVS bitness InitExternalPlugins:ShowAvsInfo: Screen Res = 1920x1080 InitExternalPlugins:ShowAvsInfo: Screen BitPerPixel = 32 InitExternalPlugins:ShowAvsInfo: Code:
RT_debugF("DBGVIEWCLEAR\n\nAuto load plugins script ENTRY\n",name="InitExternalPlugins: ") # 'DBGVIEWCLEAR' sent to Debugview window clears the window. (thanx Wonkey) # For whatever usage within this script Global G_InitPlugs_IsAvs26 = ( VersionNumber>=2.6 ) Global G_InitPlugs_IsAvsPlus = ( FindStr(VersionString, "AviSynth+")!= 0 || FindStr(VersionString, " Neo")!= 0 ) Global G_InitPlugs_Bitness = ( SI_ProcessBitness() ) Function ShowAvsInfo() { myName="InitExternalPlugins:ShowAvsInfo: " S=RT_String("\nVersionString = '%s'\n", VersionString) S=RT_String("%sOSVersionString = '%s'\n", S,SI_OSVersionString) S=RT_String("%sOSVersionNumber = %f\n", S,SI_OSVersionNumber) S=RT_String("%sCPUName = '%s'\n", S,SI_CPUName) S=RT_String("%sCores = %02d:%02d (Phy:Log)\n", S,SI_PhysicalCores,SI_LogicalCores) S=RT_String("%sCPU Extensions = '%s'\n", S,SI_CPUExtensions) S=RT_String("%sTotal Memory = %dMB\n", S,SI_TotalSystemMemory) S=RT_String("%sAvail Memory = %dMB'\n", S,SI_AvailableSystemMemory) S=RT_String("%sSys Bitness = %d\n", S,SI_ProcessBitness) S=RT_String("%sScreen Res = %dx%d\n", S,SI_ScreenResX,SI_ScreenResY) S=RT_String("%sScreen BitPerPixel = %d\n", S,SI_ScreenBitsPerPixel) RT_DebugF("%s",S,name=myName) } Function Load_CPP_Plugin(String fn) { myName = "InitExternalPlugins:Load_CPP_Plugin: " FN = RT_GetFullPathName(fn) EX = Exist(FN) Try { EX ? LoadPlugin(FN) : NOP EX ? RT_DebugF("%s LOADED OK",FN,name=my_Name) : RT_DebugF("%s NOT FOUND",FN,name=myName) } catch(msg) { RT_DebugF("ERROR on '%s'\nSysErr='%s'",FN,msg,name=myName) } } Function Load_C_Plugin(String fn) { myName = "InitExternalPlugins:Load_C_Plugin: " FN = RT_GetFullPathName(fn) EX = Exist(FN) Try { EX ? Load_Stdcall_Plugin(FN) : NOP EX ? RT_DebugF("%s LOADED OK",FN,name=my_Name) : RT_DebugF("%s NOT FOUND",FN,name=myName) } catch(msg) { RT_DebugF("ERROR on '%s'\nSysErr='%s'",FN,msg,name=myName) } } Function Import_Avsi(String fn) { # EDIT: This may not work at all myName = "InitExternalPlugins:Import_Avsi: " FN = RT_GetFullPathName(fn) EX = Exist(FN) Try { EX ? Import(FN) : NOP EX ? RT_DebugF("%s IMPORTED OK",FN,name=my_Name) : RT_DebugF("%s NOT FOUND",FN,name=myName) } catch(msg) { RT_DebugF("ERROR on '%s'\nSysErr='%s'",FN,msg,name=myName) } } ################## ShowAvsInfo() #Load_C_Plugin(".\FFMS_C\ffms2.dll") # FFMpegSource C Plugin #Import_Avsi(".\FFMS_C\ffms2.avsi") # FFMpegSource C Avsi file with LoadCPlugin line commented OUT. #Load_CPP_Plugin(".\FFMS2000_CPP\ffms2.dll") # FFMpegSource CPP Plugin #Import_Avsi(".\FFMS2000_CPP\ffms2.avsi") # FFMpegSource CPP Avsi file with LoadCPlugin line commented OUT. #Load_CPP_Plugin(".\LSMASH_CPP\LSMASHSource.dll") # L-Smash CPP #Load_CPP_Plugin(".\DGDecode\DGDecode_x86.DLL") # DGDecode CPP #Load_C_Plugin("C:\NON-INSTALL\DGAVCDec\DGAVCDecode.dll") # DGAVCDec C EDIT: Not sure if the avsi Import function actually works when import into local function, might have to use Eval on contents of file, even then might not work, dont know yet. we may need to somehow import into main level script, but dont know how from local function [maybe return contents of file to caller, and they need to eval on it at main level].
__________________
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; 20th June 2019 at 21:50. |
|
|