chromium/third_party/mediapipe/src/mediapipe/calculators/video/video_pre_stream_calculator.proto

// Copyright 2019 The MediaPipe Authors.
//
// 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
//
//      http://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 mediapipe;

import "mediapipe/framework/calculator.proto";

message VideoPreStreamCalculatorOptions {
  extend CalculatorOptions {
    optional VideoPreStreamCalculatorOptions ext = 151386123;
  }

  // An arbitrary number of frames per second.
  // Prefer the StandardFps enum to store industry-standard, safe FPS values.
  message Fps {
    // The possibly approximated value of the frame rate, in frames per second.
    // Unsafe to use in accurate computations because prone to rounding errors.
    // For example, the 23.976 FPS value has no exact representation as a
    // double.
    optional double value = 1;

    message Rational32 {
      optional int32 numerator = 1;
      optional int32 denominator = 2;
    }
    // The exact value of the frame rate, as a rational number.
    optional Rational32 ratio = 2;
  }
  optional Fps fps = 1;
}