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") ):
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