hi,
with the recent changes in madVR I decided to redraw the OSD part of DSPlayer, so you can manage the structure of the OSD settings from an xml file
the file is located in "
Kodi/system/players/dsplayer/madvrsettings.xml", you can also put a modified file in "
%appdata%/kodi/userdata/dsplayer/madvrsettings.xml" to override the original one
if you need some extra strings you can create a strings file in "
%appdata%/kodi/userdata/dsplayer/strings.po" with only the extra strings you needs for your customized madvrsettings.xml
these files will be read once at startup so you have to restart kodi to see the changes.
you can see the file here:
https://github.com/aracnoz/xbmc/blob/Jar...ttings.xml
this is the main xml structure, you can also create sections within other sections
Code:
<settings>
<!-- video settings root -->
<group>
<setting />
<setting />
<setting />
</group>
<group>
<setting />
<setting />
<section>
<!-- new section -->
<group>
<setting />
<setting />
<setting />
</group>
<group>
<section>
<!-- sub section -->
<group>
<setting />
<setting />
</group>
<!-- end sub section -->
</section>
</group>
<group>
<setting />
<setting />
</group>
<!-- end new section -->
</section>
<setting />
<setting />
</group>
<!-- end video settings root -->
</settings>
on top of the file there are two special part to create the dummy profiles and to enable the debugging
this is to create the DSPlayer Dummy Group/Profile in madVR
Code:
<dsprofile path="processing" folder="deinterlacing|artifactRemoval|enhancements|zoomControl" />
<dsprofile path="scalingParent" folder="chromaUp|lumaUp|lumaDown|imageDoubling|upRefine" />
<dsprofile path="rendering" folder="smoothMotion|dithering" />
by uncommenting this part will be created a button to list all madVR settings in debug log with the current values
you will need these info to compile the madvrsettings.xml, you have to set the "path" with the right value to list the related madVR settings
with the debug mode active will be logged also events like SetSettings and GetSettings, don't not leave this part uncommented during normal playback to avoid unnecessary extra processing/logging
Code:
<!-- <debug path="processing|scalingParent|rendering" label="69999" /> -->
here some debug log sample, with [*] the SetSettings/GetSettings had success, with [x] has failed
Code:
OnSET:
DEBUG: [madVR debug][*][SetBoolbool ] autoActivateDeinterlacing = true (boolean)
DEBUG: [madVR debug][*][SetBoolbool ] ifInDoubtDeinterlace = false (boolean)
DEBUG: [madVR debug][*][SetString ] contentType = auto (string)
DEBUG: [madVR debug][*][SetBool ] scanPartialFrame = true (boolean)
DEBUG: [madVR debug][*][SetBool ] debandActive = true (boolean)
DEBUG: [madVR debug][*][SetInt ] debandLevel = 0 (integer)
DEBUG: [madVR debug][*][SetInt ] debandFadeLevel = 2 (integer)
OnGET:
DEBUG: [madVR debug][*][GetString ] chromaUp = SuperXbr150 (string)
DEBUG: [madVR debug][*][GetBool ] chromaAntiRinging = true (boolean)
DEBUG: [madVR debug][*][GetBool ] superChromaRes = true (boolean)
DEBUG: [madVR debug][*][GetFloat ] superChromaResStrength = 3 (3.000000) (integer)
DEBUG: [madVR debug][*][GetString ] lumaUp = Jinc3 (string)
DEBUG: [madVR debug][*][GetBool ] lumaUpAntiRinging = true (boolean)
DEBUG: [madVR debug][*][GetBool ] lumaUpSigmoidal = false (boolean)
DEBUG: [madVR debug][*][GetString ] lumaDown = SSIM1D100 (string)
DEBUG: [madVR debug][*][GetBoolbool ] lumaDownAntiRinging = true (boolean)
DEBUG: [madVR debug][*][GetBoolbool ] lumaDownAntiRingingSoft = false (boolean)
DEBUG: [madVR debug][*][GetBool ] lumaDownLinear = true (boolean)
here a sample of the all madVR settings listed by pressing the debug button
Code:
ALL SETTINGS BUTTON:
DEBUG: [madVR debug][Path ] ################################################################
DEBUG: [madVR debug][Path ] processing
DEBUG: [madVR debug][Path ] ################################################################
DEBUG: [madVR debug][Folder ] --------------------------------------------------------------
DEBUG: [madVR debug][Folder ] deinterlacing - deinterlacing folder
DEBUG: [madVR debug][Folder ] --------------------------------------------------------------
DEBUG: [madVR debug][Value ] autoActivateDeinterlacing = true (boolean) automatically activate deinterlacing when needed
DEBUG: [madVR debug][Value ] ifInDoubtDeinterlace = false (boolean) if in doubt, activate deinterlacing
DEBUG: [madVR debug][Value ] dontDeinterlace48i = true (boolean) disable deinterlacing for frame rates of 23.970 and 24.000 fps
DEBUG: [madVR debug][Value ] contentType = auto (string) source type
DEBUG: [madVR debug][Value ] scanPartialFrame = true (boolean) only look at pixels in the frame center
DEBUG: [madVR debug][Value ] deinterlaceThread = true (boolean) perform deinterlacing in separate thread
the
TYPES for the xml settings are: "
bool", "
list_string", "
list_int", "
list_boolbool", "
list_boolstring", "
list_boolint", "
float"
some madVR setting is managed by two variables, the first one only to enable the setting and the second one with the value so why some special type like "boolbool"
I had to hardcode 3 settings: in scaling "imagedouble", in zoom "arquickchange", "cleanborders", because the nature of these settings.
you can also add some dependencies to make the setting visible/enable at conditions, I cannot explain everything, but I think that you have just to read the xml file to get an idea
here some example to how to compile the XML using the info from the debug log.
TYPE: bool
Code:
DEBUG: [madVR debug][Value ] chromaAntiRinging = true (boolean) activate anti-ringing filter for chroma upsampling
XML:
Code:
<setting name="chromaAntiRinging" type="bool" label=70031 parent="chromaUp" default="false" />
TYPE: list_string
Code:
DEBUG: [madVR debug][Value ] chromaUp = SuperXbr150 (string) chroma upsampling
XML:
Code:
<setting name="chromaUp" type="list_string" label=70028 default="Bicubic75">
<option value="Nearest Neighbor" label=70001 />
<option value="Bilinear" label=70002 />
<option value="Mitchell-Netravali" label=70004 />
<option value="Catmull-Rom" label=70005 />
<option value="Bicubic50" label=70006 />
<option value="Bicubic60" label=70007 />
<option value="Bicubic75" label=70008 />
</setting>
TYPE: list_boolbool
Code:
DEBUG: [madVR debug][Value ] autoActivateDeinterlacing = true (boolean) automatically activate deinterlacing when needed
DEBUG: [madVR debug][Value ] ifInDoubtDeinterlace = false (boolean) if in doubt, activate deinterlacing
XML:
Code:
<setting name="autoActivateDeinterlacing" value="ifInDoubtDeinterlace" type="list_boolbool" label=70200 default="false">
<option value="-1" label=70117 /> <!-- disabled -->
<option value="true" label=70205 />
<option value="false" label=70206 />
</setting>
TYPE: list_boolstring
Code:
DEBUG: [madVR debug][Value ] smoothMotionEnabled = false (boolean) enable smooth motion frame rate conversion
DEBUG: [madVR debug][Value ] smoothMotionMode = avoidJudder (string) smooth motion mode
XML:
Code:
<setting name="smoothMotionEnabled" value="smoothMotionMode" type="list_boolstring" label=70300 default=-1>
<option value="-1" label=70117 /> <!-- disabled -->
<option value="avoidJudder" label=70301 />
<option value="almostAlways" label=70302 />
<option value="always" label=70303 />
</setting>