Commit Graph

7 Commits

Author SHA1 Message Date
rcombs 3b2b47e32a misc/node: add bstr-based variants for map_get() and map_add() 2023-01-28 14:20:20 -06:00
sfan5 1201d59f0b various: replace abort() with MP_ASSERT_UNREACHABLE() where appropriate
In debug mode the macro causes an assertion failure.
In release mode it works differently and tells the compiler that it can
assume the codepath will never execute. For this reason I was conversative
in replacing it, e.g. in mpv-internal code that exhausts all valid values
of an enum or when a condition is clear from directly preceding code.
2023-01-12 22:02:07 +01:00
wm4 cec37e98d5 misc: move some helper code from client.c
(Slightly oddly function names, because I want to avoid starting them
with mpv_*, which is reserved for public API.)
2018-05-24 19:56:34 +02:00
wm4 1157f07c5b node: move a mpv_node helper from ipc.c to shared code
This particular one is needed in a following commit.
2018-05-24 19:56:34 +02:00
wm4 ef402a1c8c command: use mpv_node helpers instead of duplicated code
They didn't exist yet when this code was added.

Completely untested.
2018-03-26 19:47:08 +02:00
wm4 f08ec22567 command: change demuxer-cache-state property to return multiple ranges
Even if the demuxer cache does not multiple ranges yet. This is to
reduce the pain should caching of multiple ranges ever be implemented.

Also change it from the sub properties stuff to return a mpv_node
directly, which is less roundabout. Sub-property access won't work
anymore, though.

Remove the seekable-start/-end fields as well, as they're redundant with
the ranges.

All this would normally be considered an API change, but since it's been
only a few days with no known users, change it immediately.

This adds some node.c helpers as well, as the code would be too damn
fugly otherwise.
2017-10-26 22:31:04 +02:00
wm4 a9a55ea7f2 misc: add some annoying mpv_node helpers
Sigh.

Some parts of mpv essentially duplicate this code (with varrying levels
of triviality) - this can be fixed "later".
2016-08-28 19:39:05 +02:00