2022-11-20 22:16:05 +03:00
|
|
|
# <matroska root value> | matroska_path(".segment.tracks[0]") -> element
|
|
|
|
# <matroska root value> | matroska_path -> ".segment.tracks[0]"
|
|
|
|
# <matroska root value> | matroska_path(<matroska root value>) -> ".segment.tracks[0]"
|
2021-11-29 15:19:23 +03:00
|
|
|
def matroska_path(p):
|
2022-11-20 22:16:05 +03:00
|
|
|
_decode_value(
|
|
|
|
( if format != "matroska" then error("not matroska format") end
|
|
|
|
| _tree_path(.elements; .id; p)
|
|
|
|
)
|
|
|
|
);
|
2021-11-29 15:19:23 +03:00
|
|
|
def matroska_path:
|
2022-11-20 22:16:05 +03:00
|
|
|
( . as $c
|
|
|
|
| format_root
|
|
|
|
| matroska_path($c)
|
|
|
|
);
|