Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 686979464
  • Loading branch information
anandolee authored and copybara-github committed Oct 17, 2024
1 parent b5b99fe commit 58cd91d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mediapipe/python/packet_getter.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from typing import List

from google.protobuf import message
from google.protobuf import message_factory
from google.protobuf import symbol_database
from mediapipe.python._framework_bindings import _packet_getter
from mediapipe.python._framework_bindings import packet as mp_packet
Expand Down Expand Up @@ -67,7 +68,7 @@ def get_proto(packet: mp_packet.Packet) -> message.Message:
raise TypeError('Can not find message descriptor by type name: %s' %
proto_type_name)

message_class = symbol_database.Default().GetPrototype(descriptor)
message_class = message_factory.GetMessageClass(descriptor)
# pylint:disable=protected-access
serialized_proto = _packet_getter._get_serialized_proto(packet)
# pylint:enable=protected-access
Expand Down Expand Up @@ -107,7 +108,7 @@ def get_proto_list(packet: mp_packet.Packet) -> List[message.Message]:
except KeyError:
raise TypeError('Can not find message descriptor by type name: %s' %
proto_type_name)
message_class = symbol_database.Default().GetPrototype(descriptor)
message_class = message_factory.GetMessageClass(descriptor)
# pylint:disable=protected-access
serialized_protos = _packet_getter._get_serialized_proto_list(packet)
# pylint:enable=protected-access
Expand Down

0 comments on commit 58cd91d

Please sign in to comment.