Add process_timestamp_bounds into RectToRenderScaleCalculatorOptions.

PiperOrigin-RevId: 502877541
This commit is contained in:
Jiuqiang Tang 2023-01-18 08:00:48 -08:00 committed by Copybara-Service
parent 3688757d17
commit 29484702ce
2 changed files with 7 additions and 1 deletions

View File

@ -80,7 +80,9 @@ absl::Status RectToRenderScaleCalculator::GetContract(CalculatorContract* cc) {
cc->Inputs().Tag(kNormRectTag).Set<NormalizedRect>(); cc->Inputs().Tag(kNormRectTag).Set<NormalizedRect>();
cc->Inputs().Tag(kImageSizeTag).Set<std::pair<int, int>>(); cc->Inputs().Tag(kImageSizeTag).Set<std::pair<int, int>>();
cc->Outputs().Tag(kRenderScaleTag).Set<float>(); cc->Outputs().Tag(kRenderScaleTag).Set<float>();
cc->SetProcessTimestampBounds(
cc->Options<RectToRenderScaleCalculatorOptions>()
.process_timestamp_bounds());
return absl::OkStatus(); return absl::OkStatus();
} }

View File

@ -29,4 +29,8 @@ message RectToRenderScaleCalculatorOptions {
// when actual object size on the image will be `B`, than all RenderData // when actual object size on the image will be `B`, than all RenderData
// primitives will be scaled with factor `B/A`. // primitives will be scaled with factor `B/A`.
optional float multiplier = 1 [default = 0.01]; optional float multiplier = 1 [default = 0.01];
// When true, Process is called for every new timestamp bound, with or without
// new packets.
optional bool process_timestamp_bounds = 2 [default = false];
} }