// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. syntax = "proto2"; package safari_sdk.protos.logging; option java_multiple_files = true; option java_outer_classname = "Video"; // Mapping of a video frame in the chunk and time the frame is associated with. message FrameTimestamp { // Frame index within the chunk. optional int32 frame_index = 1; // The time when the camera acquired the frame, referenced to some agreed-upon // clock. In nanoseconds. optional int64 timestamp_nsec = 2; } message VideoChunkInfo { // Container format enum Format { FORMAT_UNKNOWN = 0; RAW = 1; MP4 = 2; AVI = 3; WEBM = 4; } optional Format format = 1; optional int64 num_samples = 2; // Width and height counted in pixels optional int32 width = 3; optional int32 height = 4; // Duration of the chunk in nanoseconds. optional int64 duration_nsec = 5; // Timestamps of (a subset of) frames. repeated FrameTimestamp sampled_frame_timestamps = 6; } // The timestamp of the log entry (e.g. MCAP message timestamp) enclosing this // VideoChunk must specify the ending timestamp of the video chunk. message VideoChunk { optional VideoChunkInfo info = 1; // Embedded video data payload. optional bytes payload = 2; }