I thought it would be something simple
Could be a good idea to include that information in the description of the plugin.
Thanks a lot.
Code: Select all
WPRM_SETPARAM_ID = 0 # lParam - parameter id to be used by WPRM_PUTPARAM,
# WPRM_GETPARAM and COPY_PUTPARAMSTR
WPRM_PUTPARAM = 1 # lParam - new value of parameter, returns TRUE or FALSE
WPRM_GETPARAM = 2 # lParam - unused, return the value of parameter
WPRM_GETPARAM2 = 3 # lParam - parameter id
WPRM_STOP = 4
WPRM_RUN = 5
WPRM_GETSTATE = 6 # returns playback status
# -1 - if not available
# 0 - stopped
# 1 - paused
# 2 - running
WPRM_GETDURATION = 7 # returns movie duration in seconds
WPRM_GETCURTIME = 8 # returns current position in seconds
WPRM_PREVPRESET = 11
WPRM_NEXTPRESET = 12
WPRM_SETCURTIME = 13 # Set current time in seconds
//Changes
WPRM_FASTFORWARD = 15
WPRM_FASTREWIND = 16
//end of Changes
Code: Select all
#aType, aGroup, aClsName, aName, aDescription, aValue, aOptions
CMDS = (
(WParamAction, None, "Run", "Run", None, 5, None),
(WParamAction, None, "Stop", "Stop", None, 4, None),
//Changes
(WParamAction, None, "FASTFORWARD", "FASTFORWARD", None, 15, None),
(WParamAction, None, "FASTREWIND", "FASTREWIND", None, 16, None),
//end of Changes
#deprecated actions
(GetIntAction, "deprecated", "GetSubtitleDelay", "Get Subtitle Delay", None, 812, None),
(SetIntAction, "deprecated", "SetSubtitleDelay", "Set Subtitle Delay", None, 812, None),
(ChangeIntAction, "deprecated", "ChangeSubtitleDelay", "Change Subtitle Delay", None, 812, None),
#CropNzoom
(IntegerAction, "CropNzoom", "CropNzoomMagnificationX", "Crop: Magnification X", None, 714, (0, 100, True, 1)),
(IntegerAction, "CropNzoom", "CropNzoomMagnificationY", "Crop: Magnification Y", None, 720, (0, 100, True, 1)),
(ToggleAction, "CropNzoom", "CropNzoomMagnificationLock", "Crop: Magnification Lock", None, 721, None),
#DeBand
(IntegerAction, "GradFun", "GradFunThreshold", "DeBand: Threshold", None, 1156, (101, 2000, True, 100)),
#Deinterlacing
(ToggleAction, "Deinterlace", "DeinterlaceSwapFields", "Deinterlacing: Swap fields", None, 1409, None),
(SelectAction, "Deinterlace", "DeinterlaceMethod", "Deinterlacing: Method", None, 1403,
( (12, "Bypass"),
(0, "Linear interpolation"),
(1, "Linear blending"),
(2, "Cubic interpolation"),
(3, "Cubic blending"),
(4, "Median"),
(5, "TomsMoComp"),
(6, "DGBob"),
(7, "Framerate doubler"),
(8, "ffmpeg deinterlacer"),
(9, "DScaler plugin"),
(10, "5-tap lowpass"),
(11, "Kernel deinterlacer"),
(13, "Kernel bob" ))),
#Presets
(WParamAction, "Presets", "PreviousPreset", "Previous Preset", None, 11, None),
(WParamAction, "Presets", "NextPreset", "Next Preset", None, 12, None),
#subtitle actions
(IntegerAction, "Subtitles", "SubtitleDelay", "Subtitle: Delay", None, 812, None),
)
Code: Select all
482 public String ActivePreset
483 {
484 get
485 {
486 string tmpStr = getStringParam(FFDShowConstants.FFDShowDataId.IDFF_OSDcurPreset);
487 if (tmpStr != null && !tmpStr.Equals(""))
488 {
489 return tmpStr;
490 }
491 else
492 {
493 return DefaultVideoPreset;
494 }
495 }
496 set
497 {
498 if (IsFFDShowActive)
499 {
500 PlayState playState = getState();
501 if (playState == PlayState.PlayState || playState == PlayState.FastForwardRewind)
502 pauseVideo();
503 Win32.COPYDATASTRUCT cd = new Win32.COPYDATASTRUCT();
504 cd.dwData = new UIntPtr((uint)FFDSM_SET_ACTIVE_PRESET_STR);
505 #if UNICODE
506 cd.lpData = Marshal.StringToHGlobalUni(value);
507 #else
508 cd.lpData = Marshal.StringToHGlobalAnsi(value);
509 #endif
510 cd.cbData = (uint)Win32.GlobalSize(cd.lpData);
511 if (receiver == null)
512 receiver = new FFDShowReceiver(Thread.CurrentThread);
513 receiver.ReceivedString = null;
514 receiver.ReceivedType = 0;
515 //receiver.ParentThread = Thread.CurrentThread;
516 Win32.SendMessage(new IntPtr(ffDShowInstanceHandle), Win32.WM_COPYDATA, receiver.Handle.ToInt32(), ref cd);
517 if (playState == PlayState.PlayState || playState == PlayState.FastForwardRewind)
518 startVideo();
519 }
520 DefaultVideoPreset = value;
521 }
522 }
Code: Select all
cds = COPYDATASTRUCT()
cds.dwData = COPY_SETACTIVEPRESET
cds.lpData = cast(c_char_p(preset), PVOID)
cds.cbData = len(preset) + 1
SendMessage(hwnd, WM_COPYDATA, eg.messageReceiver.hwnd, addressof(cds))
Code: Select all
cds = COPYDATASTRUCT()
cds.dwData = COPY_SETACTIVEPRESET
cds.lpData = cast(c_wchar_p(preset), PVOID)
cds.cbData = len(preset)*2 + 1
return SendMessage(hwnd, WM_COPYDATA, eg.messageReceiver.hwnd, addressof(cds))
I will update to beta7 now and check your fix. I don't get any problems I will commit the change.Windows 98/ME support has been dropped starting with revision 2353.
Code: Select all
cds.cbData = (len(preset) + 1)*2Code: Select all
SendMessage(hwnd, WM_COPYDATA, [b]eg.messageReceiver.hwnd[/b], addressof(cds))