diff options
author | hschang <chang@dev3> | 2015-11-25 02:10:15 (GMT) |
---|---|---|
committer | hschang <chang@dev3> | 2015-11-25 08:23:37 (GMT) |
commit | 09814ef3a2d9736f50dc5748522c7c6f1284bbb8 (patch) | |
tree | 2db699f27ab0ad462e85044da12a20494cbdb8fe | |
parent | f39d96abbc3e475cc0f988ac5ef1752009a180fa (diff) |
[TransCodingSetup] support 1080P with Solo4K.
-rwxr-xr-x | lib/python/Plugins/SystemPlugins/TransCodingSetup/plugin.py | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/lib/python/Plugins/SystemPlugins/TransCodingSetup/plugin.py b/lib/python/Plugins/SystemPlugins/TransCodingSetup/plugin.py index e0ed0df..61b76b4 100755 --- a/lib/python/Plugins/SystemPlugins/TransCodingSetup/plugin.py +++ b/lib/python/Plugins/SystemPlugins/TransCodingSetup/plugin.py @@ -92,7 +92,11 @@ def createTransCodingConfig(encoder): setAttr("automode", encoder, choice) if fileExists( getProcPath(encoder, "resolution") ): - choice = TconfigSelection(encoder, default = "480p", choices = [ ("480p", _("480p")), ("576p", _("576p")), ("720p", _("720p")), ("320x240", _("320x240")), ("160x120", _("160x120")) ] ) + resolutaion_choices = [ ("480p", _("480p")), ("576p", _("576p")), ("720p", _("720p")), ("320x240", _("320x240")), ("160x120", _("160x120")) ] + if vumodel in ("solo4k"): + resolutaion_choices.insert(3, ("1080p", _("1080p"))) + + choice = TconfigSelection(encoder, default = "480p", choices = resolutaion_choices ) setAttr("resolution", encoder, choice) if fileExists( getProcPath(encoder, "aspectratio") ): @@ -216,7 +220,20 @@ class TranscodingSetupInit: if value != setValue: print "[TranscodingSetup] set failed. (%s > %s)" % ( value, procPath ) return -1 - return 0 + + # Set bitrate "-1" when automode is "ON" and display_format is changed. + # At custom mode, set display_format -> width -> height -> bitrate (-1) + setname = procPath.split('/')[-1] + encoder = procPath.split('/')[-2] + if (setname == "display_format" and value != "custom") or (setname == "height"): + if hasAttr("automode", encoder) and getAttr("automode", encoder).value == "On": + if hasAttr("bitrate", encoder): + setProcValue(getProcPath(encoder ,"bitrate"), str(-1)) + elif hasAttr("framerate", encoder): + setProcValue(getProcPath(encoder ,"framerate"), str(-1)) + + return 0 + except: print "setConfig exception error (%s > %s)" % ( value, procPath ) return -1 |