Update properties for current upstream master
This commit is contained in:
parent
f55b62667f
commit
d2ffe25700
2 changed files with 36 additions and 18 deletions
31
mpv-test.py
31
mpv-test.py
|
|
@ -39,18 +39,30 @@ class TestProperties(unittest.TestCase):
|
||||||
|
|
||||||
def test_completeness(self):
|
def test_completeness(self):
|
||||||
ledir = dir(self.m)
|
ledir = dir(self.m)
|
||||||
|
options = { o.strip('*') for o in self.m.options }
|
||||||
for prop in self.m.property_list:
|
for prop in self.m.property_list:
|
||||||
if prop in ('stream-path', 'demuxer', 'mixer-active'):
|
if prop in ('stream-path', 'demuxer', 'current-demuxer', 'mixer-active'):
|
||||||
continue # Property is deemed useless by man mpv(1)
|
continue # Property is deemed useless by man mpv(1)
|
||||||
if prop in ('osd-sym-cc', 'osd-ass-cc', 'working-directory'):
|
if prop in ('osd-sym-cc', 'osd-ass-cc', 'working-directory'):
|
||||||
continue # Property is deemed useless by me
|
continue # Property is deemed useless by me
|
||||||
if prop in ('clock', 'keepaspect',
|
if prop in ('clock', 'colormatrix-gamma', 'cache-percent', 'tv-scan', 'aspect', 'hwdec-preload', 'ass',
|
||||||
'tv-scan', 'tv-channel', 'tv-norm', 'tv-freq',
|
'audiofile', 'cursor-autohide-delay', 'delay', 'dvdangle', 'endpos', 'font', 'forcedsubsonly', 'format',
|
||||||
'ff-vid', 'ff-aid', 'ff-sid',
|
'lua', 'lua-opts', 'name', 'ss', 'media-keys', 'status-msg'):
|
||||||
'colormatrix-gamma'):
|
|
||||||
continue # Property is undocumented in man mpv(1) and we don't want to risk it
|
continue # Property is undocumented in man mpv(1) and we don't want to risk it
|
||||||
if prop in ('hwdec-active', 'hwdec-detected'):
|
if prop in ('hwdec-active', 'hwdec-detected', 'drop-frame-count', 'vo-drop-frame-count', 'fps',
|
||||||
continue # Property is deprecated
|
'mouse-movements', 'msgcolor', 'msgmodule', 'noar', 'noautosub', 'noconsolecontrols', 'nosound',
|
||||||
|
'osdlevel', 'playing-msg', 'spugauss', 'srate', 'stop-xscreensaver', 'sub-fuzziness', 'subcp',
|
||||||
|
'subdelay', 'subfile', 'subfont', 'subfont-text-scale', 'subfps', 'subpos', 'tvscan', 'autosub',
|
||||||
|
'autosub-match', 'idx', 'forceidx', 'ass-use-margins', 'input-unix-socket'):
|
||||||
|
continue # Property/option is deprecated
|
||||||
|
if any(prop.startswith(prefix) for prefix in ('sub-', 'ass-')):
|
||||||
|
continue # Property/option is deprecated
|
||||||
|
if prop.replace('_', '-') in options: # corrector for b0rked mixed_-formatting of some property names
|
||||||
|
continue # Property seems to be an aliased option
|
||||||
|
if prop in ('ad-spdif-dtshd', 'softvol', 'heartbeat-cmd', 'input-x11-keyboard',
|
||||||
|
'vo-vdpau-queuetime-windowed', 'demuxer-max-packets', '3dlut-size', 'right-alt-gr',
|
||||||
|
'mkv-subtitle-preroll', 'dtshd', 'softvol-max'):
|
||||||
|
continue # Property seems to be an aliased option that was forgotten in MPV.options
|
||||||
prop = prop.replace('-', '_')
|
prop = prop.replace('-', '_')
|
||||||
self.assertTrue(prop in ledir, 'Property {} not found'.format(prop))
|
self.assertTrue(prop in ledir, 'Property {} not found'.format(prop))
|
||||||
|
|
||||||
|
|
@ -190,10 +202,7 @@ class TestLifecycle(unittest.TestCase):
|
||||||
m.play(TESTVID)
|
m.play(TESTVID)
|
||||||
m.wait_for_playback()
|
m.wait_for_playback()
|
||||||
del m
|
del m
|
||||||
handler.assert_has_calls([
|
handler.assert_any_call('info', 'cplayer', 'Playing: ./test.webm')
|
||||||
mock.call('info', 'cplayer', 'Playing: test.webm'),
|
|
||||||
mock.call('info', 'cplayer', ' Video --vid=1 (*) (vp8)'),
|
|
||||||
mock.call('fatal', 'cplayer', 'No video or audio streams selected.')])
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
||||||
23
mpv.py
23
mpv.py
|
|
@ -772,15 +772,17 @@ ALL_PROPERTIES = {
|
||||||
'duration': (float, 'r'),
|
'duration': (float, 'r'),
|
||||||
'avsync': (float, 'r'),
|
'avsync': (float, 'r'),
|
||||||
'total-avsync-change': (float, 'r'),
|
'total-avsync-change': (float, 'r'),
|
||||||
'drop-frame-count': (int, 'r'),
|
# 'drop-frame-count': (int, 'r'),
|
||||||
|
'decoder-frame-drop-count': (int, 'r'),
|
||||||
'percent-pos': (float, 'rw'),
|
'percent-pos': (float, 'rw'),
|
||||||
# 'ratio-pos': (float, 'rw'),
|
# 'ratio-pos': (float, 'rw'),
|
||||||
|
'audio-pts': (float, 'r'),
|
||||||
'time-pos': (float, 'rw'),
|
'time-pos': (float, 'rw'),
|
||||||
'time-start': (float, 'r'),
|
'time-start': (float, 'r'),
|
||||||
'time-remaining': (float, 'r'),
|
'time-remaining': (float, 'r'),
|
||||||
'playtime-remaining': (float, 'r'),
|
'playtime-remaining': (float, 'r'),
|
||||||
'chapter': (int, 'rw'),
|
'chapter': (int, 'rw'),
|
||||||
'edition': (int, 'rw'),
|
'edition': (str, 'rw'),
|
||||||
'disc-titles': (int, 'r'),
|
'disc-titles': (int, 'r'),
|
||||||
'disc-title': (str, 'rw'),
|
'disc-title': (str, 'rw'),
|
||||||
# 'disc-menu-active': (bool, 'r'),
|
# 'disc-menu-active': (bool, 'r'),
|
||||||
|
|
@ -789,7 +791,7 @@ ALL_PROPERTIES = {
|
||||||
'angle': (int, 'rw'),
|
'angle': (int, 'rw'),
|
||||||
'pause': (bool, 'rw'),
|
'pause': (bool, 'rw'),
|
||||||
'core-idle': (bool, 'r'),
|
'core-idle': (bool, 'r'),
|
||||||
'cache': (int, 'r'),
|
'cache': (str, 'r'),
|
||||||
'cache-size': (int, 'rw'),
|
'cache-size': (int, 'rw'),
|
||||||
'cache-free': (int, 'r'),
|
'cache-free': (int, 'r'),
|
||||||
'cache-used': (int, 'r'),
|
'cache-used': (int, 'r'),
|
||||||
|
|
@ -842,7 +844,7 @@ ALL_PROPERTIES = {
|
||||||
'height': (int, 'r'),
|
'height': (int, 'r'),
|
||||||
'dwidth': (int, 'r'),
|
'dwidth': (int, 'r'),
|
||||||
'dheight': (int, 'r'),
|
'dheight': (int, 'r'),
|
||||||
'fps': (float, 'r'),
|
'container-fps': (float, 'r'),
|
||||||
'estimated-vf-fps': (float, 'r'),
|
'estimated-vf-fps': (float, 'r'),
|
||||||
'window-scale': (float, 'rw'),
|
'window-scale': (float, 'rw'),
|
||||||
'video-aspect': (str, 'rw'),
|
'video-aspect': (str, 'rw'),
|
||||||
|
|
@ -868,11 +870,12 @@ ALL_PROPERTIES = {
|
||||||
'sub-forced-only': (bool, 'rw'),
|
'sub-forced-only': (bool, 'rw'),
|
||||||
'sub-scale': (float, 'rw'),
|
'sub-scale': (float, 'rw'),
|
||||||
'sub-bitrate': (float, 'r'),
|
'sub-bitrate': (float, 'r'),
|
||||||
|
'sub-text': (str, 'r'),
|
||||||
'packet-sub-bitrate': (float, 'r'),
|
'packet-sub-bitrate': (float, 'r'),
|
||||||
# 'ass-use-margins': (bool, 'rw'),
|
# 'ass-use-margins': (bool, 'rw'),
|
||||||
'ass-vsfilter-aspect-compat': (bool, 'rw'),
|
'ass-vsfilter-aspect-compat': (bool, 'rw'),
|
||||||
'ass-style-override': (bool, 'rw'),
|
'ass-style-override': (bool, 'rw'),
|
||||||
'stream-capture': (str, 'rw'),
|
# 'stream-capture': (str, 'rw'),
|
||||||
'tv-brightness': (int, 'rw'),
|
'tv-brightness': (int, 'rw'),
|
||||||
'tv-contrast': (int, 'rw'),
|
'tv-contrast': (int, 'rw'),
|
||||||
'tv-saturation': (int, 'rw'),
|
'tv-saturation': (int, 'rw'),
|
||||||
|
|
@ -899,13 +902,17 @@ ALL_PROPERTIES = {
|
||||||
'file-format': (commalist,'r'), # Be careful with this one.
|
'file-format': (commalist,'r'), # Be careful with this one.
|
||||||
'mistimed-frame-count': (int, 'r'),
|
'mistimed-frame-count': (int, 'r'),
|
||||||
'vsync-ratio': (float, 'r'),
|
'vsync-ratio': (float, 'r'),
|
||||||
'vo-drop-frame-count': (int, 'r'),
|
# 'vo-drop-frame-count': (int, 'r'),
|
||||||
|
'frame-drop-count': (int, 'r'),
|
||||||
'vo-delayed-frame-count': (int, 'r'),
|
'vo-delayed-frame-count': (int, 'r'),
|
||||||
'playback-time': (float, 'rw'),
|
'playback-time': (float, 'rw'),
|
||||||
'demuxer-cache-duration': (float, 'r'),
|
'demuxer-cache-duration': (float, 'r'),
|
||||||
'demuxer-cache-time': (float, 'r'),
|
'demuxer-cache-time': (float, 'r'),
|
||||||
'demuxer-cache-idle': (bool, 'r'),
|
'demuxer-cache-idle': (bool, 'r'),
|
||||||
'idle': (bool, 'r'),
|
'demuxer-start-time': (float, 'r'),
|
||||||
|
'demuxer-via-network': (bool, 'r'),
|
||||||
|
# 'idle': (bool, 'r'),
|
||||||
|
'idle-active': (bool, 'r'), # dat name
|
||||||
'disc-title-list': (commalist,'r'),
|
'disc-title-list': (commalist,'r'),
|
||||||
'field-dominance': (str, 'rw'),
|
'field-dominance': (str, 'rw'),
|
||||||
'taskbar-progress': (bool, 'rw'),
|
'taskbar-progress': (bool, 'rw'),
|
||||||
|
|
@ -929,7 +936,9 @@ ALL_PROPERTIES = {
|
||||||
'display-fps': (float, 'r'), # access apparently misdocumented in the manpage
|
'display-fps': (float, 'r'), # access apparently misdocumented in the manpage
|
||||||
'estimated-display-fps': (float, 'r'),
|
'estimated-display-fps': (float, 'r'),
|
||||||
'vsync-jitter': (float, 'r'),
|
'vsync-jitter': (float, 'r'),
|
||||||
|
'profile-list': (node, 'r', False),
|
||||||
'video-params': (node, 'r', True),
|
'video-params': (node, 'r', True),
|
||||||
|
'video-dec-params': (node, 'r', True),
|
||||||
'video-out-params': (node, 'r', True),
|
'video-out-params': (node, 'r', True),
|
||||||
'track-list': (node, 'r', False),
|
'track-list': (node, 'r', False),
|
||||||
'playlist': (node, 'r', False),
|
'playlist': (node, 'r', False),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue