add a url for getting debug info about a .mp4 file

and add a unit test of path decoding along the way
This commit is contained in:
Scott Lamb
2018-12-29 13:06:44 -06:00
parent 1123adec5d
commit eb8a51aecb
4 changed files with 169 additions and 75 deletions

View File

@@ -302,6 +302,11 @@ Example request URI to retrieve recording id 1, skipping its first 26
TODO: error behavior on missing segment. It should be a 404, likely with an
`application/json` body describing what portion if any (still) exists.
### `/api/cameras/<uuid>/<stream>/view.mp4.txt`
A GET returns a `text/plain` debugging string for the `.mp4` generated by the
same URL minus the `.txt` suffix.
### `/api/cameras/<uuid>/<stream>/view.m4s`
A GET returns a `.mp4` suitable for use as a [HTML5 Media Source Extensions
@@ -328,12 +333,22 @@ recording segment for several reasons:
than one video sample entry, so a `.m4s` that uses more than one video
sample entry can't be used.
### `/api/cameras/<uuid>/<stream>/view.m4s.txt`
A GET returns a `text/plain` debugging string for the `.mp4` generated by the
same URL minus the `.txt` suffix.
### `/api/init/<sha1>.mp4`
A GET returns a `.mp4` suitable for use as a [HTML5 Media Source Extensions
initialization segment][init-segment]. The MIME type will be `video/mp4`, with
a `codecs` parameter as specified in [RFC 6381][rfc-6381].
### `/api/init/<sha1>.mp4.txt`
A GET returns a `text/plain` debugging string for the `.mp4` generated by the
same URL minus the `.txt` suffix.
[media-segment]: https://w3c.github.io/media-source/isobmff-byte-stream-format.html#iso-media-segments
[init-segment]: https://w3c.github.io/media-source/isobmff-byte-stream-format.html#iso-init-segments
[rfc-6381]: https://tools.ietf.org/html/rfc6381