- config.av = ConfigSubsection();
- config.av.colorformat = configElement("config.av.colorformat", configBoolean, 1, ("CVBS", "RGB", "S-Video") );
- config.av.aspectratio = configElement("config.av.aspectratio", configBoolean, 0, ("4:3 Letterbox", "4:3 PanScan", "16:9", "16:9 always") );
- config.av.tvsystem = configElement("config.av.tvsystem", configBoolean, 0, ("PAL", "PAL + PAL60", "Multi", "NTSC") );
- config.av.wss = configElement("config.av.wss", configBoolean, 0, ("Enable", "Disable") );
- config.av.defaultac3 = configElement("config.av.defaultac3", configBoolean, 1, ("Enable", "Disable") );
- config.av.vcrswitch = configElement("config.av.vcrswitch", configBoolean, 0, ("Enable", "Disable") );
+ config.av = ConfigSubsection()
+ config.av.yuvenabled = ConfigBoolean(default=False)
+ colorformat_choices = {"cvbs": _("CVBS"), "rgb": _("RGB"), "svideo": _("S-Video")}
+
+ # when YUV is not enabled, don't let the user select it
+ if config.av.yuvenabled.value:
+ colorformat_choices["yuv"] = _("YPbPr")
+
+ config.av.colorformat = ConfigSelection(choices=colorformat_choices, default="rgb")
+ config.av.aspectratio = ConfigSelection(choices={
+ "4_3_letterbox": _("4:3 Letterbox"),
+ "4_3_panscan": _("4:3 PanScan"),
+ "16_9": _("16:9"),
+ "16_9_always": _("16:9 always"),
+ "16_10_letterbox": _("16:10 Letterbox"),
+ "16_10_panscan": _("16:10 PanScan"),
+ "16_9_letterbox": _("16:9 Letterbox")},
+ default = "4_3_letterbox")
+
+ config.av.aspect = ConfigSelection(choices={
+ "4_3": _("4:3"),
+ "16_9": _("16:9"),
+ "16_10": _("16:10"),
+ "auto": _("Automatic")},
+ default = "auto")
+ config.av.policy_169 = ConfigSelection(choices={
+ # TRANSLATORS: (aspect ratio policy: black bars on top/bottom) in doubt, keep english term.
+ "letterbox": _("Letterbox"),
+ # TRANSLATORS: (aspect ratio policy: cropped content on left/right) in doubt, keep english term
+ "panscan": _("Pan&Scan"),
+ # TRANSLATORS: (aspect ratio policy: display as fullscreen, even if this breaks the aspect)
+ "scale": _("Just Scale")},
+ default = "letterbox")
+ config.av.policy_43 = ConfigSelection(choices={
+ # TRANSLATORS: (aspect ratio policy: black bars on left/right) in doubt, keep english term.
+ "pillarbox": _("Pillarbox"),
+ # TRANSLATORS: (aspect ratio policy: cropped content on left/right) in doubt, keep english term
+ "panscan": _("Pan&Scan"),
+ # TRANSLATORS: (aspect ratio policy: display as fullscreen, with stretching the left/right)
+ "nonlinear": _("Nonlinear"),
+ # TRANSLATORS: (aspect ratio policy: display as fullscreen, even if this breaks the aspect)
+ "scale": _("Just Scale")},
+ default = "pillarbox")
+ config.av.tvsystem = ConfigSelection(choices = {"pal": _("PAL"), "ntsc": _("NTSC"), "multinorm": _("multinorm")}, default="pal")
+ config.av.wss = ConfigEnableDisable(default = True)
+ config.av.defaultac3 = ConfigYesNo(default = False)
+ config.av.generalAC3delay = ConfigSelectionNumber(-1000, 1000, 25, default = 0)
+ config.av.generalPCMdelay = ConfigSelectionNumber(-1000, 1000, 25, default = 0)
+ config.av.vcrswitch = ConfigEnableDisable(default = False)