Internal change

PiperOrigin-RevId: 523589395
This commit is contained in:
MediaPipe Team 2023-04-11 21:00:53 -07:00 committed by Copybara-Service
parent c9aa24b0e7
commit f923f6bcda
4 changed files with 6 additions and 7 deletions

View File

@ -647,7 +647,7 @@ TEST_F(UnpackMediaSequenceCalculatorTest, GetAudioDecoderOptionsOverride) {
TEST_F(UnpackMediaSequenceCalculatorTest, GetPacketResamplingOptions) { TEST_F(UnpackMediaSequenceCalculatorTest, GetPacketResamplingOptions) {
// TODO: Suport proto3 proto.Any in CalculatorOptions. // TODO: Suport proto3 proto.Any in CalculatorOptions.
// TODO: Avoid google::protobuf extensions in "RESAMPLER_OPTIONS". // TODO: Avoid proto2 extensions in "RESAMPLER_OPTIONS".
CalculatorOptions options; CalculatorOptions options;
options.MutableExtension(UnpackMediaSequenceCalculatorOptions::ext) options.MutableExtension(UnpackMediaSequenceCalculatorOptions::ext)
->set_padding_before_label(1); ->set_padding_before_label(1);

View File

@ -138,10 +138,10 @@ TEST(CalculatorTest, GetOptions) {
EXPECT_FALSE(cc_3->HasOptions<NightLightCalculatorOptions>()); EXPECT_FALSE(cc_3->HasOptions<NightLightCalculatorOptions>());
EXPECT_TRUE(cc_3->HasOptions<SkyLightCalculatorOptions>()); EXPECT_TRUE(cc_3->HasOptions<SkyLightCalculatorOptions>());
// Get a google::protobuf options extension from Node::options. // Get a proto2 options extension from Node::options.
EXPECT_EQ(cc_0->Options<NightLightCalculatorOptions>().jitter(), 0.123); EXPECT_EQ(cc_0->Options<NightLightCalculatorOptions>().jitter(), 0.123);
// Get a google::protobuf options extension from Node::node_options. // Get a proto2 options extension from Node::node_options.
EXPECT_EQ(cc_1->Options<NightLightCalculatorOptions>().jitter(), 0.123); EXPECT_EQ(cc_1->Options<NightLightCalculatorOptions>().jitter(), 0.123);
// Get a proto3 options protobuf::Any from Node::node_options. // Get a proto3 options protobuf::Any from Node::node_options.

View File

@ -17,9 +17,8 @@
#include <string> #include <string>
// Temporary forward declarations for google::protobuf support on portable // Temporary forward declarations for proto2 support on portable targets.
// targets. Use proto_ns inside namespace mediapipe instead of google::protobuf // Use proto_ns inside namespace mediapipe instead of proto2 namespace.
// namespace.
#include "google/protobuf/message.h" #include "google/protobuf/message.h"
#include "google/protobuf/message_lite.h" #include "google/protobuf/message_lite.h"
#include "google/protobuf/repeated_field.h" #include "google/protobuf/repeated_field.h"

View File

@ -28,7 +28,7 @@ class OptionsRegistry {
// Finds the descriptor for a protobuf. // Finds the descriptor for a protobuf.
static const Descriptor* GetProtobufDescriptor(const std::string& type_name); static const Descriptor* GetProtobufDescriptor(const std::string& type_name);
// Returns all known google::protobuf extensions to a type. // Returns all known proto2 extensions to a type.
static void FindAllExtensions(absl::string_view extendee, static void FindAllExtensions(absl::string_view extendee,
std::vector<const FieldDescriptor*>* result); std::vector<const FieldDescriptor*>* result);