chromium/third_party/mediapipe/src/mediapipe/calculators/tensorflow/unpack_media_sequence_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/calculators/core/packet_resampler_calculator.proto";
import "mediapipe/framework/calculator.proto";
import "mediapipe/util/audio_decoder.proto";

message UnpackMediaSequenceCalculatorOptions {
  extend mediapipe.CalculatorOptions {
    optional UnpackMediaSequenceCalculatorOptions ext = 244411537;
  }

  // Path to the root directory of the data set that SequenceExample directory
  // paths are relative from. If present, the input_side_packet overrides this
  // value.
  optional string dataset_root_directory = 1;

  // Time in seconds to pad before (or after) timestamps in context's
  // clip/timestamp/start and clip/timestamp/end. These settings modify the
  // clip's time range in the base_media_decoder_options.
  optional float padding_before_label = 3;
  optional float padding_after_label = 4;

  // Time in seconds to apply as additional padding to the media decoder, but
  // not to the packet resampler.
  optional float extra_padding_from_media_decoder = 5 [default = 0.0];

  // Stores the packet resampler settings for the graph. The most accurate
  // procedure for sampling a range of frames is to request a padded time range
  // from the MediaDecoderCalculator and then trim it down to the proper time
  // range with the PacketResamplerCalculator.
  optional PacketResamplerCalculatorOptions base_packet_resampler_options = 6;

  // Decode media from time zero. This setting overrides other padding
  // parameters for the MediaDecoderCalculator. End time parameters are still
  // respected.
  optional bool force_decoding_from_start_of_media = 7;

  // Stores the audio decoder settings for the graph. (e.g. which audio
  // stream to pull from the video.) The sequence's metadata overrides
  // the clip start and end times and outputs these for the
  // AudioDecoderCalculator to consume.
  optional AudioDecoderOptions base_audio_decoder_options = 9;

  // Often if a post-stream packet is stored in a SequenceExample, it should be
  // used as a pre-stream packet in a subsequent graph.
  optional bool output_poststream_as_prestream = 12;
}