Fixing a bug in the BypassCalculator "passthrough" output stream ids.

PiperOrigin-RevId: 487633708
This commit is contained in:
Hadon Nash 2022-11-10 14:03:49 -08:00 committed by Copybara-Service
parent 8ec4427bd7
commit d93caf00de
2 changed files with 4 additions and 4 deletions

View File

@ -130,7 +130,7 @@ class BypassCalculator : public Node {
pass_out.insert(entry.second); pass_out.insert(entry.second);
auto& packet = cc->Inputs().Get(entry.first).Value(); auto& packet = cc->Inputs().Get(entry.first).Value();
if (packet.Timestamp() == cc->InputTimestamp()) { if (packet.Timestamp() == cc->InputTimestamp()) {
cc->Outputs().Get(entry.first).AddPacket(packet); cc->Outputs().Get(entry.second).AddPacket(packet);
} }
} }
Timestamp bound = cc->InputTimestamp().NextAllowedInStream(); Timestamp bound = cc->InputTimestamp().NextAllowedInStream();

View File

@ -42,10 +42,10 @@ constexpr char kTestGraphConfig1[] = R"pb(
node { node {
calculator: "BypassCalculator" calculator: "BypassCalculator"
input_stream: "PASS:appearances" input_stream: "PASS:appearances"
input_stream: "TRUNCATE:0:video_frame" input_stream: "IGNORE:0:video_frame"
input_stream: "TRUNCATE:1:feature_config" input_stream: "IGNORE:1:feature_config"
output_stream: "PASS:passthrough_appearances" output_stream: "PASS:passthrough_appearances"
output_stream: "TRUNCATE:passthrough_federated_gaze_output" output_stream: "IGNORE:passthrough_federated_gaze_output"
node_options: { node_options: {
[type.googleapis.com/mediapipe.BypassCalculatorOptions] { [type.googleapis.com/mediapipe.BypassCalculatorOptions] {
pass_input_stream: "PASS" pass_input_stream: "PASS"