summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmpv-test.py31
-rw-r--r--mpv.py23
2 files changed, 36 insertions, 18 deletions
diff --git a/mpv-test.py b/mpv-test.py
index f0cabe0..a7a53c6 100755
--- a/mpv-test.py
+++ b/mpv-test.py
@@ -39,18 +39,30 @@ class TestProperties(unittest.TestCase):
def test_completeness(self):
ledir = dir(self.m)
+ options = { o.strip('*') for o in self.m.options }
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)
if prop in ('osd-sym-cc', 'osd-ass-cc', 'working-directory'):
continue # Property is deemed useless by me
- if prop in ('clock', 'keepaspect',
- 'tv-scan', 'tv-channel', 'tv-norm', 'tv-freq',
- 'ff-vid', 'ff-aid', 'ff-sid',
- 'colormatrix-gamma'):
+ if prop in ('clock', 'colormatrix-gamma', 'cache-percent', 'tv-scan', 'aspect', 'hwdec-preload', 'ass',
+ 'audiofile', 'cursor-autohide-delay', 'delay', 'dvdangle', 'endpos', 'font', 'forcedsubsonly', 'format',
+ 'lua', 'lua-opts', 'name', 'ss', 'media-keys', 'status-msg'):
continue # Property is undocumented in man mpv(1) and we don't want to risk it
- if prop in ('hwdec-active', 'hwdec-detected'):
- continue # Property is deprecated
+ if prop in ('hwdec-active', 'hwdec-detected', 'drop-frame-count', 'vo-drop-frame-count', 'fps',
+ '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('-', '_')
self.assertTrue(prop in ledir, 'Property {} not found'.format(prop))
@@ -190,10 +202,7 @@ class TestLifecycle(unittest.TestCase):
m.play(TESTVID)
m.wait_for_playback()
del m
- handler.assert_has_calls([
- 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.')])
+ handler.assert_any_call('info', 'cplayer', 'Playing: ./test.webm')
if __name__ == '__main__':
diff --git a/mpv.py b/mpv.py
index 8aa813e..df34563 100644
--- a/mpv.py
+++ b/mpv.py
@@ -772,15 +772,17 @@ ALL_PROPERTIES = {
'duration': (float, 'r'),
'avsync': (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'),
# 'ratio-pos': (float, 'rw'),
+ 'audio-pts': (float, 'r'),
'time-pos': (float, 'rw'),
'time-start': (float, 'r'),
'time-remaining': (float, 'r'),
'playtime-remaining': (float, 'r'),
'chapter': (int, 'rw'),
- 'edition': (int, 'rw'),
+ 'edition': (str, 'rw'),
'disc-titles': (int, 'r'),
'disc-title': (str, 'rw'),
# 'disc-menu-active': (bool, 'r'),
@@ -789,7 +791,7 @@ ALL_PROPERTIES = {
'angle': (int, 'rw'),
'pause': (bool, 'rw'),
'core-idle': (bool, 'r'),
- 'cache': (int, 'r'),
+ 'cache': (str, 'r'),
'cache-size': (int, 'rw'),
'cache-free': (int, 'r'),
'cache-used': (int, 'r'),
@@ -842,7 +844,7 @@ ALL_PROPERTIES = {
'height': (int, 'r'),
'dwidth': (int, 'r'),
'dheight': (int, 'r'),
- 'fps': (float, 'r'),
+ 'container-fps': (float, 'r'),
'estimated-vf-fps': (float, 'r'),
'window-scale': (float, 'rw'),
'video-aspect': (str, 'rw'),
@@ -868,11 +870,12 @@ ALL_PROPERTIES = {
'sub-forced-only': (bool, 'rw'),
'sub-scale': (float, 'rw'),
'sub-bitrate': (float, 'r'),
+ 'sub-text': (str, 'r'),
'packet-sub-bitrate': (float, 'r'),
# 'ass-use-margins': (bool, 'rw'),
'ass-vsfilter-aspect-compat': (bool, 'rw'),
'ass-style-override': (bool, 'rw'),
- 'stream-capture': (str, 'rw'),
+# 'stream-capture': (str, 'rw'),
'tv-brightness': (int, 'rw'),
'tv-contrast': (int, 'rw'),
'tv-saturation': (int, 'rw'),
@@ -899,13 +902,17 @@ ALL_PROPERTIES = {
'file-format': (commalist,'r'), # Be careful with this one.
'mistimed-frame-count': (int, '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'),
'playback-time': (float, 'rw'),
'demuxer-cache-duration': (float, 'r'),
'demuxer-cache-time': (float, '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'),
'field-dominance': (str, 'rw'),
'taskbar-progress': (bool, 'rw'),
@@ -929,7 +936,9 @@ ALL_PROPERTIES = {
'display-fps': (float, 'r'), # access apparently misdocumented in the manpage
'estimated-display-fps': (float, 'r'),
'vsync-jitter': (float, 'r'),
+ 'profile-list': (node, 'r', False),
'video-params': (node, 'r', True),
+ 'video-dec-params': (node, 'r', True),
'video-out-params': (node, 'r', True),
'track-list': (node, 'r', False),
'playlist': (node, 'r', False),