Skip to content

Commit

Permalink
FG-2933: Add CompressedAudio schema
Browse files Browse the repository at this point in the history
  • Loading branch information
fgwt202412 committed Dec 16, 2024
1 parent 4fc6a4f commit 09a6ae0
Show file tree
Hide file tree
Showing 15 changed files with 338 additions and 1 deletion.
26 changes: 26 additions & 0 deletions internal/__snapshots__/exportTypeScriptSchemas.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,31 @@ export type CompressedVideo = {
*/
format: string;
};
",
"CompressedAudio" => "// Generated by https://github.com/foxglove/schemas
// Options: {}
import { Time } from "./Time";
/** A single frame of a compressed audio bitstream */
export type CompressedAudio = {
/** Timestamp of audio frame */
timestamp: Time;
/**
* Compressed audio frame data.
*
* TK
*/
data: Uint8Array;
/**
* Audio format.
*
* Supported values: \`opus\`.
*/
format: string;
};
",
"CylinderPrimitive" => "// Generated by https://github.com/foxglove/schemas
// Options: {}
Expand Down Expand Up @@ -1104,6 +1129,7 @@ export enum PositionCovarianceType {
export * from "./CameraCalibration";
export * from "./CircleAnnotation";
export * from "./Color";
export * from "./CompressedAudio";
export * from "./CompressedImage";
export * from "./CompressedVideo";
export * from "./CubePrimitive";
Expand Down
26 changes: 26 additions & 0 deletions internal/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,31 @@ Specifically, the requirements for different \`format\` values are:
],
};

const CompressedAudio: FoxgloveMessageSchema = {
type: "message",
name: "CompressedAudio",
description: "A single frame of a compressed audio bitstream",
fields: [
{
name: "timestamp",
type: { type: "primitive", name: "time" },
description: "Timestamp of audio frame",
},
{
name: "data",
type: { type: "primitive", name: "bytes" },
description: `Compressed audio frame data.
TK`,
},
{
name: "format",
type: { type: "primitive", name: "string" },
description: "Audio format.\n\nSupported values: `opus`.",
},
],
};

const RawImage: FoxgloveMessageSchema = {
type: "message",
name: "RawImage",
Expand Down Expand Up @@ -1482,6 +1507,7 @@ export const foxgloveMessageSchemas = {
Color,
CompressedImage,
CompressedVideo,
CompressedAudio,
CylinderPrimitive,
CubePrimitive,
FrameTransform,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@foxglove/schemas",
"version": "1.6.6",
"version": "1.6.7",
"description": "Foxglove-defined message schemas for ROS, Protobuf, FlatBuffers, OMG IDL, and JSON",
"license": "MIT",
"repository": {
Expand Down
17 changes: 17 additions & 0 deletions ros_foxglove_msgs/ros1/CompressedAudio.msg

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

17 changes: 17 additions & 0 deletions ros_foxglove_msgs/ros2/CompressedAudio.msg

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

56 changes: 56 additions & 0 deletions schemas/README.md

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

23 changes: 23 additions & 0 deletions schemas/flatbuffer/CompressedAudio.fbs

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

33 changes: 33 additions & 0 deletions schemas/jsonschema/CompressedAudio.json

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

34 changes: 34 additions & 0 deletions schemas/jsonschema/index.ts

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

23 changes: 23 additions & 0 deletions schemas/omgidl/foxglove/CompressedAudio.idl

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

23 changes: 23 additions & 0 deletions schemas/proto/foxglove/CompressedAudio.proto

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

17 changes: 17 additions & 0 deletions schemas/ros1/CompressedAudio.msg

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

17 changes: 17 additions & 0 deletions schemas/ros2/CompressedAudio.msg

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

Loading

0 comments on commit 09a6ae0

Please sign in to comment.