Skip to content

Commit

Permalink
Update CompressedVideo format strings (#155)
Browse files Browse the repository at this point in the history
Update CompressedVideo documentation for new formats, and describe
format and data in more detail
  • Loading branch information
jtbandes authored Nov 26, 2024
1 parent f028ba1 commit 2f1c3dd
Show file tree
Hide file tree
Showing 13 changed files with 226 additions and 17 deletions.
21 changes: 20 additions & 1 deletion internal/__snapshots__/exportTypeScriptSchemas.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,32 @@ export type CompressedVideo = {
* Compressed video frame data.
*
* For packet-based video codecs this data must begin and end on packet boundaries (no partial packets), and must contain enough video packets to decode exactly one image (either a keyframe or delta frame). Note: Foxglove does not support video streams that include B frames because they require lookahead.
*
* Specifically, the requirements for different \`format\` values are:
*
* - \`h264\`
* - Use Annex B formatted data
* - Each CompressedVideo message should contain enough NAL units to decode exactly one video frame
* - Each message containing a key frame (IDR) must also include a SPS NAL unit
*
* - \`h265\` (HEVC)
* - Use Annex B formatted data
* - Each CompressedVideo message should contain enough NAL units to decode exactly one video frame
* - Each message containing a key frame (IRAP) must also include relevant VPS/SPS/PPS NAL units
*
* - \`av1\`
* - Use the "Low overhead bitstream format" (section 5.2)
* - Each CompressedVideo message should contain enough OBUs to decode exactly one video frame
* - Each message containing a key frame must also include a Sequence Header OBU
*/
data: Uint8Array;
/**
* Video format.
*
* Supported values: \`h264\` (Annex B formatted data only)
* Supported values: \`h264\`, \`h265\`, \`av1\`.
*
* Note: compressed video support is subject to hardware limitations and patent licensing, so not all encodings may be supported on all platforms. See more about [H.265 support](https://caniuse.com/hevc) and [AV1 support](https://caniuse.com/av1).
*/
format: string;
};
Expand Down
25 changes: 22 additions & 3 deletions internal/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -810,13 +810,32 @@ const CompressedVideo: FoxgloveMessageSchema = {
{
name: "data",
type: { type: "primitive", name: "bytes" },
description:
"Compressed video frame data.\n\nFor packet-based video codecs this data must begin and end on packet boundaries (no partial packets), and must contain enough video packets to decode exactly one image (either a keyframe or delta frame). Note: Foxglove does not support video streams that include B frames because they require lookahead.",
description: `Compressed video frame data.
For packet-based video codecs this data must begin and end on packet boundaries (no partial packets), and must contain enough video packets to decode exactly one image (either a keyframe or delta frame). Note: Foxglove does not support video streams that include B frames because they require lookahead.
Specifically, the requirements for different \`format\` values are:
- \`h264\`
- Use Annex B formatted data
- Each CompressedVideo message should contain enough NAL units to decode exactly one video frame
- Each message containing a key frame (IDR) must also include a SPS NAL unit
- \`h265\` (HEVC)
- Use Annex B formatted data
- Each CompressedVideo message should contain enough NAL units to decode exactly one video frame
- Each message containing a key frame (IRAP) must also include relevant VPS/SPS/PPS NAL units
- \`av1\`
- Use the "Low overhead bitstream format" (section 5.2)
- Each CompressedVideo message should contain enough OBUs to decode exactly one video frame
- Each message containing a key frame must also include a Sequence Header OBU`,
},
{
name: "format",
type: { type: "primitive", name: "string" },
description: "Video format.\n\nSupported values: `h264` (Annex B formatted data only)",
description:
"Video format.\n\nSupported values: `h264`, `h265`, `av1`.\n\nNote: compressed video support is subject to hardware limitations and patent licensing, so not all encodings may be supported on all platforms. See more about [H.265 support](https://caniuse.com/hevc) and [AV1 support](https://caniuse.com/av1).",
},
],
};
Expand Down
21 changes: 20 additions & 1 deletion ros_foxglove_msgs/ros1/CompressedVideo.msg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 20 additions & 1 deletion ros_foxglove_msgs/ros2/CompressedVideo.msg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 20 additions & 1 deletion schemas/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 20 additions & 1 deletion schemas/flatbuffer/CompressedVideo.fbs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions schemas/jsonschema/CompressedVideo.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions schemas/jsonschema/index.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 20 additions & 1 deletion schemas/omgidl/foxglove/CompressedVideo.idl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 20 additions & 1 deletion schemas/proto/foxglove/CompressedVideo.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 20 additions & 1 deletion schemas/ros1/CompressedVideo.msg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2f1c3dd

Please sign in to comment.