From 3c8550aabe203efb58024ac689170843d4ff99d8 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 8 Oct 2024 12:01:46 -0700 Subject: [PATCH 01/53] deps --- livekit-protocol/livekit/protocol/agent.py | 20 +- .../livekit/protocol/agent_dispatch.py | 16 +- .../livekit/protocol/analytics.py | 60 ++-- .../livekit/protocol/analytics.pyi | 6 +- livekit-protocol/livekit/protocol/egress.py | 44 ++- livekit-protocol/livekit/protocol/ingress.py | 22 +- livekit-protocol/livekit/protocol/models.py | 243 +++++++------ livekit-protocol/livekit/protocol/models.pyi | 121 ++++++- livekit-protocol/livekit/protocol/room.py | 20 +- livekit-protocol/livekit/protocol/sip.py | 185 ++++++---- livekit-protocol/livekit/protocol/sip.pyi | 95 +++++- livekit-protocol/livekit/protocol/webhook.py | 16 +- livekit-protocol/protocol | 2 +- livekit-rtc/generate_proto.sh | 3 +- .../livekit/rtc/_proto/audio_frame_pb2.py | 16 +- livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py | 16 +- livekit-rtc/livekit/rtc/_proto/ffi_pb2.py | 59 ++-- livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi | 75 ++++- livekit-rtc/livekit/rtc/_proto/handle_pb2.py | 16 +- .../livekit/rtc/_proto/participant_pb2.py | 18 +- livekit-rtc/livekit/rtc/_proto/room_pb2.py | 24 +- livekit-rtc/livekit/rtc/_proto/rpc_pb2.py | 63 ++++ livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi | 318 ++++++++++++++++++ livekit-rtc/livekit/rtc/_proto/stats_pb2.py | 18 +- livekit-rtc/livekit/rtc/_proto/track_pb2.py | 16 +- .../livekit/rtc/_proto/video_frame_pb2.py | 16 +- livekit-rtc/rust-sdks | 2 +- 27 files changed, 1177 insertions(+), 333 deletions(-) create mode 100644 livekit-rtc/livekit/rtc/_proto/rpc_pb2.py create mode 100644 livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi diff --git a/livekit-protocol/livekit/protocol/agent.py b/livekit-protocol/livekit/protocol/agent.py index 7a2fc5bb..dcc08102 100644 --- a/livekit-protocol/livekit/protocol/agent.py +++ b/livekit-protocol/livekit/protocol/agent.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: livekit_agent.proto -# Protobuf Python Version: 4.25.3 +# Protobuf Python Version: 5.28.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 28, + 0, + '', + 'livekit_agent.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -20,12 +30,12 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'agent', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' - _globals['_JOB'].fields_by_name['namespace']._options = None + _globals['_JOB'].fields_by_name['namespace']._loaded_options = None _globals['_JOB'].fields_by_name['namespace']._serialized_options = b'\030\001' - _globals['_AVAILABILITYRESPONSE_PARTICIPANTATTRIBUTESENTRY']._options = None + _globals['_AVAILABILITYRESPONSE_PARTICIPANTATTRIBUTESENTRY']._loaded_options = None _globals['_AVAILABILITYRESPONSE_PARTICIPANTATTRIBUTESENTRY']._serialized_options = b'8\001' _globals['_JOBTYPE']._serialized_start=2386 _globals['_JOBTYPE']._serialized_end=2426 diff --git a/livekit-protocol/livekit/protocol/agent_dispatch.py b/livekit-protocol/livekit/protocol/agent_dispatch.py index 7bdf63f9..5f4dfc99 100644 --- a/livekit-protocol/livekit/protocol/agent_dispatch.py +++ b/livekit-protocol/livekit/protocol/agent_dispatch.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: livekit_agent_dispatch.proto -# Protobuf Python Version: 4.25.3 +# Protobuf Python Version: 5.28.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 28, + 0, + '', + 'livekit_agent_dispatch.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -20,8 +30,8 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'agent_dispatch', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' _globals['_CREATEAGENTDISPATCHREQUEST']._serialized_start=62 _globals['_CREATEAGENTDISPATCHREQUEST']._serialized_end=142 diff --git a/livekit-protocol/livekit/protocol/analytics.py b/livekit-protocol/livekit/protocol/analytics.py index 15fef1ba..4d9e88bc 100644 --- a/livekit-protocol/livekit/protocol/analytics.py +++ b/livekit-protocol/livekit/protocol/analytics.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: livekit_analytics.proto -# Protobuf Python Version: 4.25.3 +# Protobuf Python Version: 5.28.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 28, + 0, + '', + 'livekit_analytics.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -18,36 +28,36 @@ from . import ingress as _ingress_ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17livekit_analytics.proto\x12\x07livekit\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x14livekit_models.proto\x1a\x14livekit_egress.proto\x1a\x15livekit_ingress.proto\"T\n\x13\x41nalyticsVideoLayer\x12\r\n\x05layer\x18\x01 \x01(\x05\x12\x0f\n\x07packets\x18\x02 \x01(\r\x12\r\n\x05\x62ytes\x18\x03 \x01(\x04\x12\x0e\n\x06\x66rames\x18\x04 \x01(\r\"\xb5\x03\n\x0f\x41nalyticsStream\x12\x0c\n\x04ssrc\x18\x01 \x01(\r\x12\x17\n\x0fprimary_packets\x18\x02 \x01(\r\x12\x15\n\rprimary_bytes\x18\x03 \x01(\x04\x12\x1a\n\x12retransmit_packets\x18\x04 \x01(\r\x12\x18\n\x10retransmit_bytes\x18\x05 \x01(\x04\x12\x17\n\x0fpadding_packets\x18\x06 \x01(\r\x12\x15\n\rpadding_bytes\x18\x07 \x01(\x04\x12\x14\n\x0cpackets_lost\x18\x08 \x01(\r\x12\x0e\n\x06\x66rames\x18\t \x01(\r\x12\x0b\n\x03rtt\x18\n \x01(\r\x12\x0e\n\x06jitter\x18\x0b \x01(\r\x12\r\n\x05nacks\x18\x0c \x01(\r\x12\x0c\n\x04plis\x18\r \x01(\r\x12\x0c\n\x04\x66irs\x18\x0e \x01(\r\x12\x32\n\x0cvideo_layers\x18\x0f \x03(\x0b\x32\x1c.livekit.AnalyticsVideoLayer\x12.\n\nstart_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd2\x02\n\rAnalyticsStat\x12\n\n\x02id\x18\x0e \x01(\t\x12\x15\n\ranalytics_key\x18\x01 \x01(\t\x12!\n\x04kind\x18\x02 \x01(\x0e\x32\x13.livekit.StreamType\x12.\n\ntime_stamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04node\x18\x04 \x01(\t\x12\x0f\n\x07room_id\x18\x05 \x01(\t\x12\x11\n\troom_name\x18\x06 \x01(\t\x12\x16\n\x0eparticipant_id\x18\x07 \x01(\t\x12\x10\n\x08track_id\x18\x08 \x01(\t\x12\r\n\x05score\x18\t \x01(\x02\x12)\n\x07streams\x18\n \x03(\x0b\x32\x18.livekit.AnalyticsStream\x12\x0c\n\x04mime\x18\x0b \x01(\t\x12\x11\n\tmin_score\x18\x0c \x01(\x02\x12\x14\n\x0cmedian_score\x18\r \x01(\x02\"7\n\x0e\x41nalyticsStats\x12%\n\x05stats\x18\x01 \x03(\x0b\x32\x16.livekit.AnalyticsStat\"\x9a\x02\n\x13\x41nalyticsClientMeta\x12\x0e\n\x06region\x18\x01 \x01(\t\x12\x0c\n\x04node\x18\x02 \x01(\t\x12\x13\n\x0b\x63lient_addr\x18\x03 \x01(\t\x12\x1b\n\x13\x63lient_connect_time\x18\x04 \x01(\r\x12\x17\n\x0f\x63onnection_type\x18\x05 \x01(\t\x12\x32\n\x10reconnect_reason\x18\x06 \x01(\x0e\x32\x18.livekit.ReconnectReason\x12\x15\n\x08geo_hash\x18\x07 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07\x63ountry\x18\x08 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x07isp_asn\x18\t \x01(\rH\x02\x88\x01\x01\x42\x0b\n\t_geo_hashB\n\n\x08_countryB\n\n\x08_isp_asn\"\xda\x05\n\x0e\x41nalyticsEvent\x12\n\n\x02id\x18\x19 \x01(\t\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.livekit.AnalyticsEventType\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07room_id\x18\x03 \x01(\t\x12\x1b\n\x04room\x18\x04 \x01(\x0b\x32\r.livekit.Room\x12\x16\n\x0eparticipant_id\x18\x05 \x01(\t\x12-\n\x0bparticipant\x18\x06 \x01(\x0b\x32\x18.livekit.ParticipantInfo\x12\x10\n\x08track_id\x18\x07 \x01(\t\x12!\n\x05track\x18\x08 \x01(\x0b\x32\x12.livekit.TrackInfo\x12\x15\n\ranalytics_key\x18\n \x01(\t\x12(\n\x0b\x63lient_info\x18\x0b \x01(\x0b\x32\x13.livekit.ClientInfo\x12\x31\n\x0b\x63lient_meta\x18\x0c \x01(\x0b\x32\x1c.livekit.AnalyticsClientMeta\x12\x11\n\tegress_id\x18\r \x01(\t\x12\x12\n\ningress_id\x18\x13 \x01(\t\x12;\n\x1cmax_subscribed_video_quality\x18\x0e \x01(\x0e\x32\x15.livekit.VideoQuality\x12+\n\tpublisher\x18\x0f \x01(\x0b\x32\x18.livekit.ParticipantInfo\x12\x0c\n\x04mime\x18\x10 \x01(\t\x12#\n\x06\x65gress\x18\x11 \x01(\x0b\x32\x13.livekit.EgressInfo\x12%\n\x07ingress\x18\x12 \x01(\x0b\x32\x14.livekit.IngressInfo\x12\r\n\x05\x65rror\x18\x14 \x01(\t\x12$\n\trtp_stats\x18\x15 \x01(\x0b\x32\x11.livekit.RTPStats\x12\x13\n\x0bvideo_layer\x18\x16 \x01(\x05\x12\x0f\n\x07node_id\x18\x18 \x01(\t\":\n\x0f\x41nalyticsEvents\x12\'\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x17.livekit.AnalyticsEvent\"\xa4\x01\n\x18\x41nalyticsRoomParticipant\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12-\n\x05state\x18\x04 \x01(\x0e\x32\x1e.livekit.ParticipantInfo.State\x12-\n\tjoined_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xa6\x01\n\rAnalyticsRoom\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x12\n\nproject_id\x18\x05 \x01(\t\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x0cparticipants\x18\x04 \x03(\x0b\x32!.livekit.AnalyticsRoomParticipant\"\x94\x01\n\x12\x41nalyticsNodeRooms\x12\x0f\n\x07node_id\x18\x01 \x01(\t\x12\x17\n\x0fsequence_number\x18\x02 \x01(\x04\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12%\n\x05rooms\x18\x04 \x03(\x0b\x32\x16.livekit.AnalyticsRoom**\n\nStreamType\x12\x0c\n\x08UPSTREAM\x10\x00\x12\x0e\n\nDOWNSTREAM\x10\x01*\x95\x05\n\x12\x41nalyticsEventType\x12\x10\n\x0cROOM_CREATED\x10\x00\x12\x0e\n\nROOM_ENDED\x10\x01\x12\x16\n\x12PARTICIPANT_JOINED\x10\x02\x12\x14\n\x10PARTICIPANT_LEFT\x10\x03\x12\x13\n\x0fTRACK_PUBLISHED\x10\x04\x12\x1b\n\x17TRACK_PUBLISH_REQUESTED\x10\x14\x12\x15\n\x11TRACK_UNPUBLISHED\x10\x05\x12\x14\n\x10TRACK_SUBSCRIBED\x10\x06\x12\x1d\n\x19TRACK_SUBSCRIBE_REQUESTED\x10\x15\x12\x1a\n\x16TRACK_SUBSCRIBE_FAILED\x10\x19\x12\x16\n\x12TRACK_UNSUBSCRIBED\x10\x07\x12\x1a\n\x16TRACK_PUBLISHED_UPDATE\x10\n\x12\x0f\n\x0bTRACK_MUTED\x10\x17\x12\x11\n\rTRACK_UNMUTED\x10\x18\x12\x17\n\x13TRACK_PUBLISH_STATS\x10\x1a\x12\x19\n\x15TRACK_SUBSCRIBE_STATS\x10\x1b\x12\x16\n\x12PARTICIPANT_ACTIVE\x10\x0b\x12\x17\n\x13PARTICIPANT_RESUMED\x10\x16\x12\x12\n\x0e\x45GRESS_STARTED\x10\x0c\x12\x10\n\x0c\x45GRESS_ENDED\x10\r\x12\x12\n\x0e\x45GRESS_UPDATED\x10\x1c\x12&\n\"TRACK_MAX_SUBSCRIBED_VIDEO_QUALITY\x10\x0e\x12\x0f\n\x0bRECONNECTED\x10\x0f\x12\x13\n\x0fINGRESS_CREATED\x10\x12\x12\x13\n\x0fINGRESS_DELETED\x10\x13\x12\x13\n\x0fINGRESS_STARTED\x10\x10\x12\x11\n\rINGRESS_ENDED\x10\x11\x12\x13\n\x0fINGRESS_UPDATED\x10\x1d\x42\x46Z#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17livekit_analytics.proto\x12\x07livekit\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x14livekit_models.proto\x1a\x14livekit_egress.proto\x1a\x15livekit_ingress.proto\"T\n\x13\x41nalyticsVideoLayer\x12\r\n\x05layer\x18\x01 \x01(\x05\x12\x0f\n\x07packets\x18\x02 \x01(\r\x12\r\n\x05\x62ytes\x18\x03 \x01(\x04\x12\x0e\n\x06\x66rames\x18\x04 \x01(\r\"\xd3\x03\n\x0f\x41nalyticsStream\x12\x0c\n\x04ssrc\x18\x01 \x01(\r\x12\x17\n\x0fprimary_packets\x18\x02 \x01(\r\x12\x15\n\rprimary_bytes\x18\x03 \x01(\x04\x12\x1a\n\x12retransmit_packets\x18\x04 \x01(\r\x12\x18\n\x10retransmit_bytes\x18\x05 \x01(\x04\x12\x17\n\x0fpadding_packets\x18\x06 \x01(\r\x12\x15\n\rpadding_bytes\x18\x07 \x01(\x04\x12\x14\n\x0cpackets_lost\x18\x08 \x01(\r\x12\x0e\n\x06\x66rames\x18\t \x01(\r\x12\x0b\n\x03rtt\x18\n \x01(\r\x12\x0e\n\x06jitter\x18\x0b \x01(\r\x12\r\n\x05nacks\x18\x0c \x01(\r\x12\x0c\n\x04plis\x18\r \x01(\r\x12\x0c\n\x04\x66irs\x18\x0e \x01(\r\x12\x32\n\x0cvideo_layers\x18\x0f \x03(\x0b\x32\x1c.livekit.AnalyticsVideoLayer\x12.\n\nstart_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1c\n\x14packets_out_of_order\x18\x13 \x01(\r\"\xd2\x02\n\rAnalyticsStat\x12\n\n\x02id\x18\x0e \x01(\t\x12\x15\n\ranalytics_key\x18\x01 \x01(\t\x12!\n\x04kind\x18\x02 \x01(\x0e\x32\x13.livekit.StreamType\x12.\n\ntime_stamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04node\x18\x04 \x01(\t\x12\x0f\n\x07room_id\x18\x05 \x01(\t\x12\x11\n\troom_name\x18\x06 \x01(\t\x12\x16\n\x0eparticipant_id\x18\x07 \x01(\t\x12\x10\n\x08track_id\x18\x08 \x01(\t\x12\r\n\x05score\x18\t \x01(\x02\x12)\n\x07streams\x18\n \x03(\x0b\x32\x18.livekit.AnalyticsStream\x12\x0c\n\x04mime\x18\x0b \x01(\t\x12\x11\n\tmin_score\x18\x0c \x01(\x02\x12\x14\n\x0cmedian_score\x18\r \x01(\x02\"7\n\x0e\x41nalyticsStats\x12%\n\x05stats\x18\x01 \x03(\x0b\x32\x16.livekit.AnalyticsStat\"\x9a\x02\n\x13\x41nalyticsClientMeta\x12\x0e\n\x06region\x18\x01 \x01(\t\x12\x0c\n\x04node\x18\x02 \x01(\t\x12\x13\n\x0b\x63lient_addr\x18\x03 \x01(\t\x12\x1b\n\x13\x63lient_connect_time\x18\x04 \x01(\r\x12\x17\n\x0f\x63onnection_type\x18\x05 \x01(\t\x12\x32\n\x10reconnect_reason\x18\x06 \x01(\x0e\x32\x18.livekit.ReconnectReason\x12\x15\n\x08geo_hash\x18\x07 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07\x63ountry\x18\x08 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x07isp_asn\x18\t \x01(\rH\x02\x88\x01\x01\x42\x0b\n\t_geo_hashB\n\n\x08_countryB\n\n\x08_isp_asn\"\xda\x05\n\x0e\x41nalyticsEvent\x12\n\n\x02id\x18\x19 \x01(\t\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.livekit.AnalyticsEventType\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07room_id\x18\x03 \x01(\t\x12\x1b\n\x04room\x18\x04 \x01(\x0b\x32\r.livekit.Room\x12\x16\n\x0eparticipant_id\x18\x05 \x01(\t\x12-\n\x0bparticipant\x18\x06 \x01(\x0b\x32\x18.livekit.ParticipantInfo\x12\x10\n\x08track_id\x18\x07 \x01(\t\x12!\n\x05track\x18\x08 \x01(\x0b\x32\x12.livekit.TrackInfo\x12\x15\n\ranalytics_key\x18\n \x01(\t\x12(\n\x0b\x63lient_info\x18\x0b \x01(\x0b\x32\x13.livekit.ClientInfo\x12\x31\n\x0b\x63lient_meta\x18\x0c \x01(\x0b\x32\x1c.livekit.AnalyticsClientMeta\x12\x11\n\tegress_id\x18\r \x01(\t\x12\x12\n\ningress_id\x18\x13 \x01(\t\x12;\n\x1cmax_subscribed_video_quality\x18\x0e \x01(\x0e\x32\x15.livekit.VideoQuality\x12+\n\tpublisher\x18\x0f \x01(\x0b\x32\x18.livekit.ParticipantInfo\x12\x0c\n\x04mime\x18\x10 \x01(\t\x12#\n\x06\x65gress\x18\x11 \x01(\x0b\x32\x13.livekit.EgressInfo\x12%\n\x07ingress\x18\x12 \x01(\x0b\x32\x14.livekit.IngressInfo\x12\r\n\x05\x65rror\x18\x14 \x01(\t\x12$\n\trtp_stats\x18\x15 \x01(\x0b\x32\x11.livekit.RTPStats\x12\x13\n\x0bvideo_layer\x18\x16 \x01(\x05\x12\x0f\n\x07node_id\x18\x18 \x01(\t\":\n\x0f\x41nalyticsEvents\x12\'\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x17.livekit.AnalyticsEvent\"\xa4\x01\n\x18\x41nalyticsRoomParticipant\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12-\n\x05state\x18\x04 \x01(\x0e\x32\x1e.livekit.ParticipantInfo.State\x12-\n\tjoined_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xa6\x01\n\rAnalyticsRoom\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x12\n\nproject_id\x18\x05 \x01(\t\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x0cparticipants\x18\x04 \x03(\x0b\x32!.livekit.AnalyticsRoomParticipant\"\x94\x01\n\x12\x41nalyticsNodeRooms\x12\x0f\n\x07node_id\x18\x01 \x01(\t\x12\x17\n\x0fsequence_number\x18\x02 \x01(\x04\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12%\n\x05rooms\x18\x04 \x03(\x0b\x32\x16.livekit.AnalyticsRoom**\n\nStreamType\x12\x0c\n\x08UPSTREAM\x10\x00\x12\x0e\n\nDOWNSTREAM\x10\x01*\x95\x05\n\x12\x41nalyticsEventType\x12\x10\n\x0cROOM_CREATED\x10\x00\x12\x0e\n\nROOM_ENDED\x10\x01\x12\x16\n\x12PARTICIPANT_JOINED\x10\x02\x12\x14\n\x10PARTICIPANT_LEFT\x10\x03\x12\x13\n\x0fTRACK_PUBLISHED\x10\x04\x12\x1b\n\x17TRACK_PUBLISH_REQUESTED\x10\x14\x12\x15\n\x11TRACK_UNPUBLISHED\x10\x05\x12\x14\n\x10TRACK_SUBSCRIBED\x10\x06\x12\x1d\n\x19TRACK_SUBSCRIBE_REQUESTED\x10\x15\x12\x1a\n\x16TRACK_SUBSCRIBE_FAILED\x10\x19\x12\x16\n\x12TRACK_UNSUBSCRIBED\x10\x07\x12\x1a\n\x16TRACK_PUBLISHED_UPDATE\x10\n\x12\x0f\n\x0bTRACK_MUTED\x10\x17\x12\x11\n\rTRACK_UNMUTED\x10\x18\x12\x17\n\x13TRACK_PUBLISH_STATS\x10\x1a\x12\x19\n\x15TRACK_SUBSCRIBE_STATS\x10\x1b\x12\x16\n\x12PARTICIPANT_ACTIVE\x10\x0b\x12\x17\n\x13PARTICIPANT_RESUMED\x10\x16\x12\x12\n\x0e\x45GRESS_STARTED\x10\x0c\x12\x10\n\x0c\x45GRESS_ENDED\x10\r\x12\x12\n\x0e\x45GRESS_UPDATED\x10\x1c\x12&\n\"TRACK_MAX_SUBSCRIBED_VIDEO_QUALITY\x10\x0e\x12\x0f\n\x0bRECONNECTED\x10\x0f\x12\x13\n\x0fINGRESS_CREATED\x10\x12\x12\x13\n\x0fINGRESS_DELETED\x10\x13\x12\x13\n\x0fINGRESS_STARTED\x10\x10\x12\x11\n\rINGRESS_ENDED\x10\x11\x12\x13\n\x0fINGRESS_UPDATED\x10\x1d\x42\x46Z#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'analytics', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' - _globals['_STREAMTYPE']._serialized_start=2625 - _globals['_STREAMTYPE']._serialized_end=2667 - _globals['_ANALYTICSEVENTTYPE']._serialized_start=2670 - _globals['_ANALYTICSEVENTTYPE']._serialized_end=3331 + _globals['_STREAMTYPE']._serialized_start=2655 + _globals['_STREAMTYPE']._serialized_end=2697 + _globals['_ANALYTICSEVENTTYPE']._serialized_start=2700 + _globals['_ANALYTICSEVENTTYPE']._serialized_end=3361 _globals['_ANALYTICSVIDEOLAYER']._serialized_start=136 _globals['_ANALYTICSVIDEOLAYER']._serialized_end=220 _globals['_ANALYTICSSTREAM']._serialized_start=223 - _globals['_ANALYTICSSTREAM']._serialized_end=660 - _globals['_ANALYTICSSTAT']._serialized_start=663 - _globals['_ANALYTICSSTAT']._serialized_end=1001 - _globals['_ANALYTICSSTATS']._serialized_start=1003 - _globals['_ANALYTICSSTATS']._serialized_end=1058 - _globals['_ANALYTICSCLIENTMETA']._serialized_start=1061 - _globals['_ANALYTICSCLIENTMETA']._serialized_end=1343 - _globals['_ANALYTICSEVENT']._serialized_start=1346 - _globals['_ANALYTICSEVENT']._serialized_end=2076 - _globals['_ANALYTICSEVENTS']._serialized_start=2078 - _globals['_ANALYTICSEVENTS']._serialized_end=2136 - _globals['_ANALYTICSROOMPARTICIPANT']._serialized_start=2139 - _globals['_ANALYTICSROOMPARTICIPANT']._serialized_end=2303 - _globals['_ANALYTICSROOM']._serialized_start=2306 - _globals['_ANALYTICSROOM']._serialized_end=2472 - _globals['_ANALYTICSNODEROOMS']._serialized_start=2475 - _globals['_ANALYTICSNODEROOMS']._serialized_end=2623 + _globals['_ANALYTICSSTREAM']._serialized_end=690 + _globals['_ANALYTICSSTAT']._serialized_start=693 + _globals['_ANALYTICSSTAT']._serialized_end=1031 + _globals['_ANALYTICSSTATS']._serialized_start=1033 + _globals['_ANALYTICSSTATS']._serialized_end=1088 + _globals['_ANALYTICSCLIENTMETA']._serialized_start=1091 + _globals['_ANALYTICSCLIENTMETA']._serialized_end=1373 + _globals['_ANALYTICSEVENT']._serialized_start=1376 + _globals['_ANALYTICSEVENT']._serialized_end=2106 + _globals['_ANALYTICSEVENTS']._serialized_start=2108 + _globals['_ANALYTICSEVENTS']._serialized_end=2166 + _globals['_ANALYTICSROOMPARTICIPANT']._serialized_start=2169 + _globals['_ANALYTICSROOMPARTICIPANT']._serialized_end=2333 + _globals['_ANALYTICSROOM']._serialized_start=2336 + _globals['_ANALYTICSROOM']._serialized_end=2502 + _globals['_ANALYTICSNODEROOMS']._serialized_start=2505 + _globals['_ANALYTICSNODEROOMS']._serialized_end=2653 # @@protoc_insertion_point(module_scope) diff --git a/livekit-protocol/livekit/protocol/analytics.pyi b/livekit-protocol/livekit/protocol/analytics.pyi index 30cfbd50..2a4c096d 100644 --- a/livekit-protocol/livekit/protocol/analytics.pyi +++ b/livekit-protocol/livekit/protocol/analytics.pyi @@ -89,7 +89,7 @@ class AnalyticsVideoLayer(_message.Message): def __init__(self, layer: _Optional[int] = ..., packets: _Optional[int] = ..., bytes: _Optional[int] = ..., frames: _Optional[int] = ...) -> None: ... class AnalyticsStream(_message.Message): - __slots__ = ("ssrc", "primary_packets", "primary_bytes", "retransmit_packets", "retransmit_bytes", "padding_packets", "padding_bytes", "packets_lost", "frames", "rtt", "jitter", "nacks", "plis", "firs", "video_layers", "start_time", "end_time") + __slots__ = ("ssrc", "primary_packets", "primary_bytes", "retransmit_packets", "retransmit_bytes", "padding_packets", "padding_bytes", "packets_lost", "frames", "rtt", "jitter", "nacks", "plis", "firs", "video_layers", "start_time", "end_time", "packets_out_of_order") SSRC_FIELD_NUMBER: _ClassVar[int] PRIMARY_PACKETS_FIELD_NUMBER: _ClassVar[int] PRIMARY_BYTES_FIELD_NUMBER: _ClassVar[int] @@ -107,6 +107,7 @@ class AnalyticsStream(_message.Message): VIDEO_LAYERS_FIELD_NUMBER: _ClassVar[int] START_TIME_FIELD_NUMBER: _ClassVar[int] END_TIME_FIELD_NUMBER: _ClassVar[int] + PACKETS_OUT_OF_ORDER_FIELD_NUMBER: _ClassVar[int] ssrc: int primary_packets: int primary_bytes: int @@ -124,7 +125,8 @@ class AnalyticsStream(_message.Message): video_layers: _containers.RepeatedCompositeFieldContainer[AnalyticsVideoLayer] start_time: _timestamp_pb2.Timestamp end_time: _timestamp_pb2.Timestamp - def __init__(self, ssrc: _Optional[int] = ..., primary_packets: _Optional[int] = ..., primary_bytes: _Optional[int] = ..., retransmit_packets: _Optional[int] = ..., retransmit_bytes: _Optional[int] = ..., padding_packets: _Optional[int] = ..., padding_bytes: _Optional[int] = ..., packets_lost: _Optional[int] = ..., frames: _Optional[int] = ..., rtt: _Optional[int] = ..., jitter: _Optional[int] = ..., nacks: _Optional[int] = ..., plis: _Optional[int] = ..., firs: _Optional[int] = ..., video_layers: _Optional[_Iterable[_Union[AnalyticsVideoLayer, _Mapping]]] = ..., start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + packets_out_of_order: int + def __init__(self, ssrc: _Optional[int] = ..., primary_packets: _Optional[int] = ..., primary_bytes: _Optional[int] = ..., retransmit_packets: _Optional[int] = ..., retransmit_bytes: _Optional[int] = ..., padding_packets: _Optional[int] = ..., padding_bytes: _Optional[int] = ..., packets_lost: _Optional[int] = ..., frames: _Optional[int] = ..., rtt: _Optional[int] = ..., jitter: _Optional[int] = ..., nacks: _Optional[int] = ..., plis: _Optional[int] = ..., firs: _Optional[int] = ..., video_layers: _Optional[_Iterable[_Union[AnalyticsVideoLayer, _Mapping]]] = ..., start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., packets_out_of_order: _Optional[int] = ...) -> None: ... class AnalyticsStat(_message.Message): __slots__ = ("id", "analytics_key", "kind", "time_stamp", "node", "room_id", "room_name", "participant_id", "track_id", "score", "streams", "mime", "min_score", "median_score") diff --git a/livekit-protocol/livekit/protocol/egress.py b/livekit-protocol/livekit/protocol/egress.py index 33cc66d1..55ea3811 100644 --- a/livekit-protocol/livekit/protocol/egress.py +++ b/livekit-protocol/livekit/protocol/egress.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: livekit_egress.proto -# Protobuf Python Version: 4.25.3 +# Protobuf Python Version: 5.28.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 28, + 0, + '', + 'livekit_egress.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -20,36 +30,36 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'egress', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' - _globals['_ROOMCOMPOSITEEGRESSREQUEST'].fields_by_name['file']._options = None + _globals['_ROOMCOMPOSITEEGRESSREQUEST'].fields_by_name['file']._loaded_options = None _globals['_ROOMCOMPOSITEEGRESSREQUEST'].fields_by_name['file']._serialized_options = b'\030\001' - _globals['_ROOMCOMPOSITEEGRESSREQUEST'].fields_by_name['stream']._options = None + _globals['_ROOMCOMPOSITEEGRESSREQUEST'].fields_by_name['stream']._loaded_options = None _globals['_ROOMCOMPOSITEEGRESSREQUEST'].fields_by_name['stream']._serialized_options = b'\030\001' - _globals['_ROOMCOMPOSITEEGRESSREQUEST'].fields_by_name['segments']._options = None + _globals['_ROOMCOMPOSITEEGRESSREQUEST'].fields_by_name['segments']._loaded_options = None _globals['_ROOMCOMPOSITEEGRESSREQUEST'].fields_by_name['segments']._serialized_options = b'\030\001' - _globals['_WEBEGRESSREQUEST'].fields_by_name['file']._options = None + _globals['_WEBEGRESSREQUEST'].fields_by_name['file']._loaded_options = None _globals['_WEBEGRESSREQUEST'].fields_by_name['file']._serialized_options = b'\030\001' - _globals['_WEBEGRESSREQUEST'].fields_by_name['stream']._options = None + _globals['_WEBEGRESSREQUEST'].fields_by_name['stream']._loaded_options = None _globals['_WEBEGRESSREQUEST'].fields_by_name['stream']._serialized_options = b'\030\001' - _globals['_WEBEGRESSREQUEST'].fields_by_name['segments']._options = None + _globals['_WEBEGRESSREQUEST'].fields_by_name['segments']._loaded_options = None _globals['_WEBEGRESSREQUEST'].fields_by_name['segments']._serialized_options = b'\030\001' - _globals['_TRACKCOMPOSITEEGRESSREQUEST'].fields_by_name['file']._options = None + _globals['_TRACKCOMPOSITEEGRESSREQUEST'].fields_by_name['file']._loaded_options = None _globals['_TRACKCOMPOSITEEGRESSREQUEST'].fields_by_name['file']._serialized_options = b'\030\001' - _globals['_TRACKCOMPOSITEEGRESSREQUEST'].fields_by_name['stream']._options = None + _globals['_TRACKCOMPOSITEEGRESSREQUEST'].fields_by_name['stream']._loaded_options = None _globals['_TRACKCOMPOSITEEGRESSREQUEST'].fields_by_name['stream']._serialized_options = b'\030\001' - _globals['_TRACKCOMPOSITEEGRESSREQUEST'].fields_by_name['segments']._options = None + _globals['_TRACKCOMPOSITEEGRESSREQUEST'].fields_by_name['segments']._loaded_options = None _globals['_TRACKCOMPOSITEEGRESSREQUEST'].fields_by_name['segments']._serialized_options = b'\030\001' - _globals['_S3UPLOAD_METADATAENTRY']._options = None + _globals['_S3UPLOAD_METADATAENTRY']._loaded_options = None _globals['_S3UPLOAD_METADATAENTRY']._serialized_options = b'8\001' - _globals['_EGRESSINFO'].fields_by_name['stream']._options = None + _globals['_EGRESSINFO'].fields_by_name['stream']._loaded_options = None _globals['_EGRESSINFO'].fields_by_name['stream']._serialized_options = b'\030\001' - _globals['_EGRESSINFO'].fields_by_name['file']._options = None + _globals['_EGRESSINFO'].fields_by_name['file']._loaded_options = None _globals['_EGRESSINFO'].fields_by_name['file']._serialized_options = b'\030\001' - _globals['_EGRESSINFO'].fields_by_name['segments']._options = None + _globals['_EGRESSINFO'].fields_by_name['segments']._loaded_options = None _globals['_EGRESSINFO'].fields_by_name['segments']._serialized_options = b'\030\001' - _globals['_STREAMINFOLIST']._options = None + _globals['_STREAMINFOLIST']._loaded_options = None _globals['_STREAMINFOLIST']._serialized_options = b'\030\001' _globals['_ENCODEDFILETYPE']._serialized_start=6954 _globals['_ENCODEDFILETYPE']._serialized_end=7011 diff --git a/livekit-protocol/livekit/protocol/ingress.py b/livekit-protocol/livekit/protocol/ingress.py index 7e29ad86..2c1bb720 100644 --- a/livekit-protocol/livekit/protocol/ingress.py +++ b/livekit-protocol/livekit/protocol/ingress.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: livekit_ingress.proto -# Protobuf Python Version: 4.25.3 +# Protobuf Python Version: 5.28.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 28, + 0, + '', + 'livekit_ingress.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -20,14 +30,14 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ingress', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' - _globals['_CREATEINGRESSREQUEST'].fields_by_name['bypass_transcoding']._options = None + _globals['_CREATEINGRESSREQUEST'].fields_by_name['bypass_transcoding']._loaded_options = None _globals['_CREATEINGRESSREQUEST'].fields_by_name['bypass_transcoding']._serialized_options = b'\030\001' - _globals['_INGRESSINFO'].fields_by_name['bypass_transcoding']._options = None + _globals['_INGRESSINFO'].fields_by_name['bypass_transcoding']._loaded_options = None _globals['_INGRESSINFO'].fields_by_name['bypass_transcoding']._serialized_options = b'\030\001' - _globals['_UPDATEINGRESSREQUEST'].fields_by_name['bypass_transcoding']._options = None + _globals['_UPDATEINGRESSREQUEST'].fields_by_name['bypass_transcoding']._loaded_options = None _globals['_UPDATEINGRESSREQUEST'].fields_by_name['bypass_transcoding']._serialized_options = b'\030\001' _globals['_INGRESSINPUT']._serialized_start=2742 _globals['_INGRESSINPUT']._serialized_end=2803 diff --git a/livekit-protocol/livekit/protocol/models.py b/livekit-protocol/livekit/protocol/models.py index 5c46fcb6..75a95f2e 100644 --- a/livekit-protocol/livekit/protocol/models.py +++ b/livekit-protocol/livekit/protocol/models.py @@ -1,142 +1,165 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: livekit_models.proto -# Protobuf Python Version: 4.25.3 +# Protobuf Python Version: 5.28.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 28, + 0, + '', + 'livekit_models.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 +import metrics as _metrics_ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14livekit_models.proto\x12\x07livekit\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc9\x02\n\x04Room\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x15\n\rempty_timeout\x18\x03 \x01(\r\x12\x19\n\x11\x64\x65parture_timeout\x18\x0e \x01(\r\x12\x18\n\x10max_participants\x18\x04 \x01(\r\x12\x15\n\rcreation_time\x18\x05 \x01(\x03\x12\x15\n\rturn_password\x18\x06 \x01(\t\x12&\n\x0e\x65nabled_codecs\x18\x07 \x03(\x0b\x32\x0e.livekit.Codec\x12\x10\n\x08metadata\x18\x08 \x01(\t\x12\x18\n\x10num_participants\x18\t \x01(\r\x12\x16\n\x0enum_publishers\x18\x0b \x01(\r\x12\x18\n\x10\x61\x63tive_recording\x18\n \x01(\x08\x12&\n\x07version\x18\r \x01(\x0b\x32\x15.livekit.TimedVersion\"(\n\x05\x43odec\x12\x0c\n\x04mime\x18\x01 \x01(\t\x12\x11\n\tfmtp_line\x18\x02 \x01(\t\"9\n\x0cPlayoutDelay\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0b\n\x03min\x18\x02 \x01(\r\x12\x0b\n\x03max\x18\x03 \x01(\r\"\xe6\x01\n\x15ParticipantPermission\x12\x15\n\rcan_subscribe\x18\x01 \x01(\x08\x12\x13\n\x0b\x63\x61n_publish\x18\x02 \x01(\x08\x12\x18\n\x10\x63\x61n_publish_data\x18\x03 \x01(\x08\x12\x31\n\x13\x63\x61n_publish_sources\x18\t \x03(\x0e\x32\x14.livekit.TrackSource\x12\x0e\n\x06hidden\x18\x07 \x01(\x08\x12\x14\n\x08recorder\x18\x08 \x01(\x08\x42\x02\x18\x01\x12\x1b\n\x13\x63\x61n_update_metadata\x18\n \x01(\x08\x12\x11\n\x05\x61gent\x18\x0b \x01(\x08\x42\x02\x18\x01\"\xf8\x04\n\x0fParticipantInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12-\n\x05state\x18\x03 \x01(\x0e\x32\x1e.livekit.ParticipantInfo.State\x12\"\n\x06tracks\x18\x04 \x03(\x0b\x32\x12.livekit.TrackInfo\x12\x10\n\x08metadata\x18\x05 \x01(\t\x12\x11\n\tjoined_at\x18\x06 \x01(\x03\x12\x0c\n\x04name\x18\t \x01(\t\x12\x0f\n\x07version\x18\n \x01(\r\x12\x32\n\npermission\x18\x0b \x01(\x0b\x32\x1e.livekit.ParticipantPermission\x12\x0e\n\x06region\x18\x0c \x01(\t\x12\x14\n\x0cis_publisher\x18\r \x01(\x08\x12+\n\x04kind\x18\x0e \x01(\x0e\x32\x1d.livekit.ParticipantInfo.Kind\x12<\n\nattributes\x18\x0f \x03(\x0b\x32(.livekit.ParticipantInfo.AttributesEntry\x12\x34\n\x11\x64isconnect_reason\x18\x10 \x01(\x0e\x32\x19.livekit.DisconnectReason\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\">\n\x05State\x12\x0b\n\x07JOINING\x10\x00\x12\n\n\x06JOINED\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x10\n\x0c\x44ISCONNECTED\x10\x03\"A\n\x04Kind\x12\x0c\n\x08STANDARD\x10\x00\x12\x0b\n\x07INGRESS\x10\x01\x12\n\n\x06\x45GRESS\x10\x02\x12\x07\n\x03SIP\x10\x03\x12\t\n\x05\x41GENT\x10\x04\"3\n\nEncryption\"%\n\x04Type\x12\x08\n\x04NONE\x10\x00\x12\x07\n\x03GCM\x10\x01\x12\n\n\x06\x43USTOM\x10\x02\"f\n\x12SimulcastCodecInfo\x12\x11\n\tmime_type\x18\x01 \x01(\t\x12\x0b\n\x03mid\x18\x02 \x01(\t\x12\x0b\n\x03\x63id\x18\x03 \x01(\t\x12#\n\x06layers\x18\x04 \x03(\x0b\x32\x13.livekit.VideoLayer\"\xf5\x03\n\tTrackInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12 \n\x04type\x18\x02 \x01(\x0e\x32\x12.livekit.TrackType\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\r\n\x05muted\x18\x04 \x01(\x08\x12\r\n\x05width\x18\x05 \x01(\r\x12\x0e\n\x06height\x18\x06 \x01(\r\x12\x11\n\tsimulcast\x18\x07 \x01(\x08\x12\x13\n\x0b\x64isable_dtx\x18\x08 \x01(\x08\x12$\n\x06source\x18\t \x01(\x0e\x32\x14.livekit.TrackSource\x12#\n\x06layers\x18\n \x03(\x0b\x32\x13.livekit.VideoLayer\x12\x11\n\tmime_type\x18\x0b \x01(\t\x12\x0b\n\x03mid\x18\x0c \x01(\t\x12+\n\x06\x63odecs\x18\r \x03(\x0b\x32\x1b.livekit.SimulcastCodecInfo\x12\x0e\n\x06stereo\x18\x0e \x01(\x08\x12\x13\n\x0b\x64isable_red\x18\x0f \x01(\x08\x12,\n\nencryption\x18\x10 \x01(\x0e\x32\x18.livekit.Encryption.Type\x12\x0e\n\x06stream\x18\x11 \x01(\t\x12&\n\x07version\x18\x12 \x01(\x0b\x32\x15.livekit.TimedVersion\x12\x32\n\x0e\x61udio_features\x18\x13 \x03(\x0e\x32\x1a.livekit.AudioTrackFeature\"r\n\nVideoLayer\x12&\n\x07quality\x18\x01 \x01(\x0e\x32\x15.livekit.VideoQuality\x12\r\n\x05width\x18\x02 \x01(\r\x12\x0e\n\x06height\x18\x03 \x01(\r\x12\x0f\n\x07\x62itrate\x18\x04 \x01(\r\x12\x0c\n\x04ssrc\x18\x05 \x01(\r\"\xd1\x02\n\nDataPacket\x12*\n\x04kind\x18\x01 \x01(\x0e\x32\x18.livekit.DataPacket.KindB\x02\x18\x01\x12\x1c\n\x14participant_identity\x18\x04 \x01(\t\x12\x1e\n\x16\x64\x65stination_identities\x18\x05 \x03(\t\x12#\n\x04user\x18\x02 \x01(\x0b\x32\x13.livekit.UserPacketH\x00\x12\x33\n\x07speaker\x18\x03 \x01(\x0b\x32\x1c.livekit.ActiveSpeakerUpdateB\x02\x18\x01H\x00\x12$\n\x08sip_dtmf\x18\x06 \x01(\x0b\x32\x10.livekit.SipDTMFH\x00\x12/\n\rtranscription\x18\x07 \x01(\x0b\x32\x16.livekit.TranscriptionH\x00\"\x1f\n\x04Kind\x12\x0c\n\x08RELIABLE\x10\x00\x12\t\n\x05LOSSY\x10\x01\x42\x07\n\x05value\"=\n\x13\x41\x63tiveSpeakerUpdate\x12&\n\x08speakers\x18\x01 \x03(\x0b\x32\x14.livekit.SpeakerInfo\"9\n\x0bSpeakerInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\r\n\x05level\x18\x02 \x01(\x02\x12\x0e\n\x06\x61\x63tive\x18\x03 \x01(\x08\"\xa0\x02\n\nUserPacket\x12\x1b\n\x0fparticipant_sid\x18\x01 \x01(\tB\x02\x18\x01\x12 \n\x14participant_identity\x18\x05 \x01(\tB\x02\x18\x01\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\x12\x1c\n\x10\x64\x65stination_sids\x18\x03 \x03(\tB\x02\x18\x01\x12\"\n\x16\x64\x65stination_identities\x18\x06 \x03(\tB\x02\x18\x01\x12\x12\n\x05topic\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x0f\n\x02id\x18\x08 \x01(\tH\x01\x88\x01\x01\x12\x17\n\nstart_time\x18\t \x01(\x04H\x02\x88\x01\x01\x12\x15\n\x08\x65nd_time\x18\n \x01(\x04H\x03\x88\x01\x01\x42\x08\n\x06_topicB\x05\n\x03_idB\r\n\x0b_start_timeB\x0b\n\t_end_time\"&\n\x07SipDTMF\x12\x0c\n\x04\x63ode\x18\x03 \x01(\r\x12\r\n\x05\x64igit\x18\x04 \x01(\t\"|\n\rTranscription\x12(\n transcribed_participant_identity\x18\x02 \x01(\t\x12\x10\n\x08track_id\x18\x03 \x01(\t\x12/\n\x08segments\x18\x04 \x03(\x0b\x32\x1d.livekit.TranscriptionSegment\"w\n\x14TranscriptionSegment\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04text\x18\x02 \x01(\t\x12\x12\n\nstart_time\x18\x03 \x01(\x04\x12\x10\n\x08\x65nd_time\x18\x04 \x01(\x04\x12\r\n\x05\x66inal\x18\x05 \x01(\x08\x12\x10\n\x08language\x18\x06 \x01(\t\"@\n\x11ParticipantTracks\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x12\n\ntrack_sids\x18\x02 \x03(\t\"\xce\x01\n\nServerInfo\x12,\n\x07\x65\x64ition\x18\x01 \x01(\x0e\x32\x1b.livekit.ServerInfo.Edition\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08protocol\x18\x03 \x01(\x05\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x0f\n\x07node_id\x18\x05 \x01(\t\x12\x12\n\ndebug_info\x18\x06 \x01(\t\x12\x16\n\x0e\x61gent_protocol\x18\x07 \x01(\x05\"\"\n\x07\x45\x64ition\x12\x0c\n\x08Standard\x10\x00\x12\t\n\x05\x43loud\x10\x01\"\xdd\x02\n\nClientInfo\x12$\n\x03sdk\x18\x01 \x01(\x0e\x32\x17.livekit.ClientInfo.SDK\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08protocol\x18\x03 \x01(\x05\x12\n\n\x02os\x18\x04 \x01(\t\x12\x12\n\nos_version\x18\x05 \x01(\t\x12\x14\n\x0c\x64\x65vice_model\x18\x06 \x01(\t\x12\x0f\n\x07\x62rowser\x18\x07 \x01(\t\x12\x17\n\x0f\x62rowser_version\x18\x08 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\t \x01(\t\x12\x0f\n\x07network\x18\n \x01(\t\"\x83\x01\n\x03SDK\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x06\n\x02JS\x10\x01\x12\t\n\x05SWIFT\x10\x02\x12\x0b\n\x07\x41NDROID\x10\x03\x12\x0b\n\x07\x46LUTTER\x10\x04\x12\x06\n\x02GO\x10\x05\x12\t\n\x05UNITY\x10\x06\x12\x10\n\x0cREACT_NATIVE\x10\x07\x12\x08\n\x04RUST\x10\x08\x12\n\n\x06PYTHON\x10\t\x12\x07\n\x03\x43PP\x10\n\"\x8c\x02\n\x13\x43lientConfiguration\x12*\n\x05video\x18\x01 \x01(\x0b\x32\x1b.livekit.VideoConfiguration\x12+\n\x06screen\x18\x02 \x01(\x0b\x32\x1b.livekit.VideoConfiguration\x12\x37\n\x11resume_connection\x18\x03 \x01(\x0e\x32\x1c.livekit.ClientConfigSetting\x12\x30\n\x0f\x64isabled_codecs\x18\x04 \x01(\x0b\x32\x17.livekit.DisabledCodecs\x12\x31\n\x0b\x66orce_relay\x18\x05 \x01(\x0e\x32\x1c.livekit.ClientConfigSetting\"L\n\x12VideoConfiguration\x12\x36\n\x10hardware_encoder\x18\x01 \x01(\x0e\x32\x1c.livekit.ClientConfigSetting\"Q\n\x0e\x44isabledCodecs\x12\x1e\n\x06\x63odecs\x18\x01 \x03(\x0b\x32\x0e.livekit.Codec\x12\x1f\n\x07publish\x18\x02 \x03(\x0b\x32\x0e.livekit.Codec\"\x80\x02\n\x08RTPDrift\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x64uration\x18\x03 \x01(\x01\x12\x17\n\x0fstart_timestamp\x18\x04 \x01(\x04\x12\x15\n\rend_timestamp\x18\x05 \x01(\x04\x12\x17\n\x0frtp_clock_ticks\x18\x06 \x01(\x04\x12\x15\n\rdrift_samples\x18\x07 \x01(\x03\x12\x10\n\x08\x64rift_ms\x18\x08 \x01(\x01\x12\x12\n\nclock_rate\x18\t \x01(\x01\"\xa0\n\n\x08RTPStats\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x64uration\x18\x03 \x01(\x01\x12\x0f\n\x07packets\x18\x04 \x01(\r\x12\x13\n\x0bpacket_rate\x18\x05 \x01(\x01\x12\r\n\x05\x62ytes\x18\x06 \x01(\x04\x12\x14\n\x0cheader_bytes\x18\' \x01(\x04\x12\x0f\n\x07\x62itrate\x18\x07 \x01(\x01\x12\x14\n\x0cpackets_lost\x18\x08 \x01(\r\x12\x18\n\x10packet_loss_rate\x18\t \x01(\x01\x12\x1e\n\x16packet_loss_percentage\x18\n \x01(\x02\x12\x19\n\x11packets_duplicate\x18\x0b \x01(\r\x12\x1d\n\x15packet_duplicate_rate\x18\x0c \x01(\x01\x12\x17\n\x0f\x62ytes_duplicate\x18\r \x01(\x04\x12\x1e\n\x16header_bytes_duplicate\x18( \x01(\x04\x12\x19\n\x11\x62itrate_duplicate\x18\x0e \x01(\x01\x12\x17\n\x0fpackets_padding\x18\x0f \x01(\r\x12\x1b\n\x13packet_padding_rate\x18\x10 \x01(\x01\x12\x15\n\rbytes_padding\x18\x11 \x01(\x04\x12\x1c\n\x14header_bytes_padding\x18) \x01(\x04\x12\x17\n\x0f\x62itrate_padding\x18\x12 \x01(\x01\x12\x1c\n\x14packets_out_of_order\x18\x13 \x01(\r\x12\x0e\n\x06\x66rames\x18\x14 \x01(\r\x12\x12\n\nframe_rate\x18\x15 \x01(\x01\x12\x16\n\x0ejitter_current\x18\x16 \x01(\x01\x12\x12\n\njitter_max\x18\x17 \x01(\x01\x12:\n\rgap_histogram\x18\x18 \x03(\x0b\x32#.livekit.RTPStats.GapHistogramEntry\x12\r\n\x05nacks\x18\x19 \x01(\r\x12\x11\n\tnack_acks\x18% \x01(\r\x12\x13\n\x0bnack_misses\x18\x1a \x01(\r\x12\x15\n\rnack_repeated\x18& \x01(\r\x12\x0c\n\x04plis\x18\x1b \x01(\r\x12,\n\x08last_pli\x18\x1c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x66irs\x18\x1d \x01(\r\x12,\n\x08last_fir\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0brtt_current\x18\x1f \x01(\r\x12\x0f\n\x07rtt_max\x18 \x01(\r\x12\x12\n\nkey_frames\x18! \x01(\r\x12\x32\n\x0elast_key_frame\x18\" \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0flayer_lock_plis\x18# \x01(\r\x12\x37\n\x13last_layer_lock_pli\x18$ \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\'\n\x0cpacket_drift\x18, \x01(\x0b\x32\x11.livekit.RTPDrift\x12\'\n\x0creport_drift\x18- \x01(\x0b\x32\x11.livekit.RTPDrift\x12/\n\x14rebased_report_drift\x18. \x01(\x0b\x32\x11.livekit.RTPDrift\x1a\x33\n\x11GapHistogramEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\"\x8c\x02\n\x11RTPForwarderState\x12\x0f\n\x07started\x18\x01 \x01(\x08\x12\x1f\n\x17reference_layer_spatial\x18\x02 \x01(\x05\x12\x16\n\x0epre_start_time\x18\x03 \x01(\x03\x12\x1b\n\x13\x65xt_first_timestamp\x18\x04 \x01(\x04\x12$\n\x1c\x64ummy_start_timestamp_offset\x18\x05 \x01(\x04\x12+\n\nrtp_munger\x18\x06 \x01(\x0b\x32\x17.livekit.RTPMungerState\x12-\n\nvp8_munger\x18\x07 \x01(\x0b\x32\x17.livekit.VP8MungerStateH\x00\x42\x0e\n\x0c\x63odec_munger\"\xcb\x01\n\x0eRTPMungerState\x12 \n\x18\x65xt_last_sequence_number\x18\x01 \x01(\x04\x12\'\n\x1f\x65xt_second_last_sequence_number\x18\x02 \x01(\x04\x12\x1a\n\x12\x65xt_last_timestamp\x18\x03 \x01(\x04\x12!\n\x19\x65xt_second_last_timestamp\x18\x04 \x01(\x04\x12\x13\n\x0blast_marker\x18\x05 \x01(\x08\x12\x1a\n\x12second_last_marker\x18\x06 \x01(\x08\"\xb8\x01\n\x0eVP8MungerState\x12\x1b\n\x13\x65xt_last_picture_id\x18\x01 \x01(\x05\x12\x17\n\x0fpicture_id_used\x18\x02 \x01(\x08\x12\x18\n\x10last_tl0_pic_idx\x18\x03 \x01(\r\x12\x18\n\x10tl0_pic_idx_used\x18\x04 \x01(\x08\x12\x10\n\x08tid_used\x18\x05 \x01(\x08\x12\x14\n\x0clast_key_idx\x18\x06 \x01(\r\x12\x14\n\x0ckey_idx_used\x18\x07 \x01(\x08\"1\n\x0cTimedVersion\x12\x12\n\nunix_micro\x18\x01 \x01(\x03\x12\r\n\x05ticks\x18\x02 \x01(\x05*/\n\nAudioCodec\x12\x0e\n\nDEFAULT_AC\x10\x00\x12\x08\n\x04OPUS\x10\x01\x12\x07\n\x03\x41\x41\x43\x10\x02*V\n\nVideoCodec\x12\x0e\n\nDEFAULT_VC\x10\x00\x12\x11\n\rH264_BASELINE\x10\x01\x12\r\n\tH264_MAIN\x10\x02\x12\r\n\tH264_HIGH\x10\x03\x12\x07\n\x03VP8\x10\x04*)\n\nImageCodec\x12\x0e\n\nIC_DEFAULT\x10\x00\x12\x0b\n\x07IC_JPEG\x10\x01*+\n\tTrackType\x12\t\n\x05\x41UDIO\x10\x00\x12\t\n\x05VIDEO\x10\x01\x12\x08\n\x04\x44\x41TA\x10\x02*`\n\x0bTrackSource\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x43\x41MERA\x10\x01\x12\x0e\n\nMICROPHONE\x10\x02\x12\x10\n\x0cSCREEN_SHARE\x10\x03\x12\x16\n\x12SCREEN_SHARE_AUDIO\x10\x04*6\n\x0cVideoQuality\x12\x07\n\x03LOW\x10\x00\x12\n\n\x06MEDIUM\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\x07\n\x03OFF\x10\x03*@\n\x11\x43onnectionQuality\x12\x08\n\x04POOR\x10\x00\x12\x08\n\x04GOOD\x10\x01\x12\r\n\tEXCELLENT\x10\x02\x12\x08\n\x04LOST\x10\x03*;\n\x13\x43lientConfigSetting\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02*\xec\x01\n\x10\x44isconnectReason\x12\x12\n\x0eUNKNOWN_REASON\x10\x00\x12\x14\n\x10\x43LIENT_INITIATED\x10\x01\x12\x16\n\x12\x44UPLICATE_IDENTITY\x10\x02\x12\x13\n\x0fSERVER_SHUTDOWN\x10\x03\x12\x17\n\x13PARTICIPANT_REMOVED\x10\x04\x12\x10\n\x0cROOM_DELETED\x10\x05\x12\x12\n\x0eSTATE_MISMATCH\x10\x06\x12\x10\n\x0cJOIN_FAILURE\x10\x07\x12\r\n\tMIGRATION\x10\x08\x12\x10\n\x0cSIGNAL_CLOSE\x10\t\x12\x0f\n\x0bROOM_CLOSED\x10\n*\x89\x01\n\x0fReconnectReason\x12\x0e\n\nRR_UNKNOWN\x10\x00\x12\x1a\n\x16RR_SIGNAL_DISCONNECTED\x10\x01\x12\x17\n\x13RR_PUBLISHER_FAILED\x10\x02\x12\x18\n\x14RR_SUBSCRIBER_FAILED\x10\x03\x12\x17\n\x13RR_SWITCH_CANDIDATE\x10\x04*T\n\x11SubscriptionError\x12\x0e\n\nSE_UNKNOWN\x10\x00\x12\x18\n\x14SE_CODEC_UNSUPPORTED\x10\x01\x12\x15\n\x11SE_TRACK_NOTFOUND\x10\x02*\xa3\x01\n\x11\x41udioTrackFeature\x12\r\n\tTF_STEREO\x10\x00\x12\r\n\tTF_NO_DTX\x10\x01\x12\x18\n\x14TF_AUTO_GAIN_CONTROL\x10\x02\x12\x18\n\x14TF_ECHO_CANCELLATION\x10\x03\x12\x18\n\x14TF_NOISE_SUPPRESSION\x10\x04\x12\"\n\x1eTF_ENHANCED_NOISE_CANCELLATION\x10\x05\x42\x46Z#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14livekit_models.proto\x12\x07livekit\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x15livekit_metrics.proto\"\xc9\x02\n\x04Room\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x15\n\rempty_timeout\x18\x03 \x01(\r\x12\x19\n\x11\x64\x65parture_timeout\x18\x0e \x01(\r\x12\x18\n\x10max_participants\x18\x04 \x01(\r\x12\x15\n\rcreation_time\x18\x05 \x01(\x03\x12\x15\n\rturn_password\x18\x06 \x01(\t\x12&\n\x0e\x65nabled_codecs\x18\x07 \x03(\x0b\x32\x0e.livekit.Codec\x12\x10\n\x08metadata\x18\x08 \x01(\t\x12\x18\n\x10num_participants\x18\t \x01(\r\x12\x16\n\x0enum_publishers\x18\x0b \x01(\r\x12\x18\n\x10\x61\x63tive_recording\x18\n \x01(\x08\x12&\n\x07version\x18\r \x01(\x0b\x32\x15.livekit.TimedVersion\"(\n\x05\x43odec\x12\x0c\n\x04mime\x18\x01 \x01(\t\x12\x11\n\tfmtp_line\x18\x02 \x01(\t\"9\n\x0cPlayoutDelay\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0b\n\x03min\x18\x02 \x01(\r\x12\x0b\n\x03max\x18\x03 \x01(\r\"\x85\x02\n\x15ParticipantPermission\x12\x15\n\rcan_subscribe\x18\x01 \x01(\x08\x12\x13\n\x0b\x63\x61n_publish\x18\x02 \x01(\x08\x12\x18\n\x10\x63\x61n_publish_data\x18\x03 \x01(\x08\x12\x31\n\x13\x63\x61n_publish_sources\x18\t \x03(\x0e\x32\x14.livekit.TrackSource\x12\x0e\n\x06hidden\x18\x07 \x01(\x08\x12\x14\n\x08recorder\x18\x08 \x01(\x08\x42\x02\x18\x01\x12\x1b\n\x13\x63\x61n_update_metadata\x18\n \x01(\x08\x12\x11\n\x05\x61gent\x18\x0b \x01(\x08\x42\x02\x18\x01\x12\x1d\n\x15\x63\x61n_subscribe_metrics\x18\x0c \x01(\x08\"\xf8\x04\n\x0fParticipantInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12-\n\x05state\x18\x03 \x01(\x0e\x32\x1e.livekit.ParticipantInfo.State\x12\"\n\x06tracks\x18\x04 \x03(\x0b\x32\x12.livekit.TrackInfo\x12\x10\n\x08metadata\x18\x05 \x01(\t\x12\x11\n\tjoined_at\x18\x06 \x01(\x03\x12\x0c\n\x04name\x18\t \x01(\t\x12\x0f\n\x07version\x18\n \x01(\r\x12\x32\n\npermission\x18\x0b \x01(\x0b\x32\x1e.livekit.ParticipantPermission\x12\x0e\n\x06region\x18\x0c \x01(\t\x12\x14\n\x0cis_publisher\x18\r \x01(\x08\x12+\n\x04kind\x18\x0e \x01(\x0e\x32\x1d.livekit.ParticipantInfo.Kind\x12<\n\nattributes\x18\x0f \x03(\x0b\x32(.livekit.ParticipantInfo.AttributesEntry\x12\x34\n\x11\x64isconnect_reason\x18\x10 \x01(\x0e\x32\x19.livekit.DisconnectReason\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\">\n\x05State\x12\x0b\n\x07JOINING\x10\x00\x12\n\n\x06JOINED\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x10\n\x0c\x44ISCONNECTED\x10\x03\"A\n\x04Kind\x12\x0c\n\x08STANDARD\x10\x00\x12\x0b\n\x07INGRESS\x10\x01\x12\n\n\x06\x45GRESS\x10\x02\x12\x07\n\x03SIP\x10\x03\x12\t\n\x05\x41GENT\x10\x04\"3\n\nEncryption\"%\n\x04Type\x12\x08\n\x04NONE\x10\x00\x12\x07\n\x03GCM\x10\x01\x12\n\n\x06\x43USTOM\x10\x02\"f\n\x12SimulcastCodecInfo\x12\x11\n\tmime_type\x18\x01 \x01(\t\x12\x0b\n\x03mid\x18\x02 \x01(\t\x12\x0b\n\x03\x63id\x18\x03 \x01(\t\x12#\n\x06layers\x18\x04 \x03(\x0b\x32\x13.livekit.VideoLayer\"\xf5\x03\n\tTrackInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12 \n\x04type\x18\x02 \x01(\x0e\x32\x12.livekit.TrackType\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\r\n\x05muted\x18\x04 \x01(\x08\x12\r\n\x05width\x18\x05 \x01(\r\x12\x0e\n\x06height\x18\x06 \x01(\r\x12\x11\n\tsimulcast\x18\x07 \x01(\x08\x12\x13\n\x0b\x64isable_dtx\x18\x08 \x01(\x08\x12$\n\x06source\x18\t \x01(\x0e\x32\x14.livekit.TrackSource\x12#\n\x06layers\x18\n \x03(\x0b\x32\x13.livekit.VideoLayer\x12\x11\n\tmime_type\x18\x0b \x01(\t\x12\x0b\n\x03mid\x18\x0c \x01(\t\x12+\n\x06\x63odecs\x18\r \x03(\x0b\x32\x1b.livekit.SimulcastCodecInfo\x12\x0e\n\x06stereo\x18\x0e \x01(\x08\x12\x13\n\x0b\x64isable_red\x18\x0f \x01(\x08\x12,\n\nencryption\x18\x10 \x01(\x0e\x32\x18.livekit.Encryption.Type\x12\x0e\n\x06stream\x18\x11 \x01(\t\x12&\n\x07version\x18\x12 \x01(\x0b\x32\x15.livekit.TimedVersion\x12\x32\n\x0e\x61udio_features\x18\x13 \x03(\x0e\x32\x1a.livekit.AudioTrackFeature\"r\n\nVideoLayer\x12&\n\x07quality\x18\x01 \x01(\x0e\x32\x15.livekit.VideoQuality\x12\r\n\x05width\x18\x02 \x01(\r\x12\x0e\n\x06height\x18\x03 \x01(\r\x12\x0f\n\x07\x62itrate\x18\x04 \x01(\r\x12\x0c\n\x04ssrc\x18\x05 \x01(\r\"\xa7\x04\n\nDataPacket\x12*\n\x04kind\x18\x01 \x01(\x0e\x32\x18.livekit.DataPacket.KindB\x02\x18\x01\x12\x1c\n\x14participant_identity\x18\x04 \x01(\t\x12\x1e\n\x16\x64\x65stination_identities\x18\x05 \x03(\t\x12#\n\x04user\x18\x02 \x01(\x0b\x32\x13.livekit.UserPacketH\x00\x12\x33\n\x07speaker\x18\x03 \x01(\x0b\x32\x1c.livekit.ActiveSpeakerUpdateB\x02\x18\x01H\x00\x12$\n\x08sip_dtmf\x18\x06 \x01(\x0b\x32\x10.livekit.SipDTMFH\x00\x12/\n\rtranscription\x18\x07 \x01(\x0b\x32\x16.livekit.TranscriptionH\x00\x12(\n\x07metrics\x18\x08 \x01(\x0b\x32\x15.livekit.MetricsBatchH\x00\x12,\n\x0c\x63hat_message\x18\t \x01(\x0b\x32\x14.livekit.ChatMessageH\x00\x12*\n\x0brpc_request\x18\n \x01(\x0b\x32\x13.livekit.RpcRequestH\x00\x12\"\n\x07rpc_ack\x18\x0b \x01(\x0b\x32\x0f.livekit.RpcAckH\x00\x12,\n\x0crpc_response\x18\x0c \x01(\x0b\x32\x14.livekit.RpcResponseH\x00\"\x1f\n\x04Kind\x12\x0c\n\x08RELIABLE\x10\x00\x12\t\n\x05LOSSY\x10\x01\x42\x07\n\x05value\"=\n\x13\x41\x63tiveSpeakerUpdate\x12&\n\x08speakers\x18\x01 \x03(\x0b\x32\x14.livekit.SpeakerInfo\"9\n\x0bSpeakerInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\r\n\x05level\x18\x02 \x01(\x02\x12\x0e\n\x06\x61\x63tive\x18\x03 \x01(\x08\"\xa0\x02\n\nUserPacket\x12\x1b\n\x0fparticipant_sid\x18\x01 \x01(\tB\x02\x18\x01\x12 \n\x14participant_identity\x18\x05 \x01(\tB\x02\x18\x01\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\x12\x1c\n\x10\x64\x65stination_sids\x18\x03 \x03(\tB\x02\x18\x01\x12\"\n\x16\x64\x65stination_identities\x18\x06 \x03(\tB\x02\x18\x01\x12\x12\n\x05topic\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x0f\n\x02id\x18\x08 \x01(\tH\x01\x88\x01\x01\x12\x17\n\nstart_time\x18\t \x01(\x04H\x02\x88\x01\x01\x12\x15\n\x08\x65nd_time\x18\n \x01(\x04H\x03\x88\x01\x01\x42\x08\n\x06_topicB\x05\n\x03_idB\r\n\x0b_start_timeB\x0b\n\t_end_time\"&\n\x07SipDTMF\x12\x0c\n\x04\x63ode\x18\x03 \x01(\r\x12\r\n\x05\x64igit\x18\x04 \x01(\t\"|\n\rTranscription\x12(\n transcribed_participant_identity\x18\x02 \x01(\t\x12\x10\n\x08track_id\x18\x03 \x01(\t\x12/\n\x08segments\x18\x04 \x03(\x0b\x32\x1d.livekit.TranscriptionSegment\"w\n\x14TranscriptionSegment\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04text\x18\x02 \x01(\t\x12\x12\n\nstart_time\x18\x03 \x01(\x04\x12\x10\n\x08\x65nd_time\x18\x04 \x01(\x04\x12\r\n\x05\x66inal\x18\x05 \x01(\x08\x12\x10\n\x08language\x18\x06 \x01(\t\"\x91\x01\n\x0b\x43hatMessage\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\ttimestamp\x18\x02 \x01(\x03\x12\x1b\n\x0e\x65\x64it_timestamp\x18\x03 \x01(\x03H\x00\x88\x01\x01\x12\x0f\n\x07message\x18\x04 \x01(\t\x12\x0f\n\x07\x64\x65leted\x18\x05 \x01(\x08\x12\x11\n\tgenerated\x18\x06 \x01(\x08\x42\x11\n\x0f_edit_timestamp\"g\n\nRpcRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06method\x18\x02 \x01(\t\x12\x0f\n\x07payload\x18\x03 \x01(\t\x12\x1b\n\x13response_timeout_ms\x18\x04 \x01(\r\x12\x0f\n\x07version\x18\x05 \x01(\r\"\x1c\n\x06RpcAck\x12\x12\n\nrequest_id\x18\x01 \x01(\t\"a\n\x0bRpcResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x11\n\x07payload\x18\x02 \x01(\tH\x00\x12\"\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x11.livekit.RpcErrorH\x00\x42\x07\n\x05value\"7\n\x08RpcError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\t\"@\n\x11ParticipantTracks\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x12\n\ntrack_sids\x18\x02 \x03(\t\"\xce\x01\n\nServerInfo\x12,\n\x07\x65\x64ition\x18\x01 \x01(\x0e\x32\x1b.livekit.ServerInfo.Edition\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08protocol\x18\x03 \x01(\x05\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x0f\n\x07node_id\x18\x05 \x01(\t\x12\x12\n\ndebug_info\x18\x06 \x01(\t\x12\x16\n\x0e\x61gent_protocol\x18\x07 \x01(\x05\"\"\n\x07\x45\x64ition\x12\x0c\n\x08Standard\x10\x00\x12\t\n\x05\x43loud\x10\x01\"\x8a\x03\n\nClientInfo\x12$\n\x03sdk\x18\x01 \x01(\x0e\x32\x17.livekit.ClientInfo.SDK\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08protocol\x18\x03 \x01(\x05\x12\n\n\x02os\x18\x04 \x01(\t\x12\x12\n\nos_version\x18\x05 \x01(\t\x12\x14\n\x0c\x64\x65vice_model\x18\x06 \x01(\t\x12\x0f\n\x07\x62rowser\x18\x07 \x01(\t\x12\x17\n\x0f\x62rowser_version\x18\x08 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\t \x01(\t\x12\x0f\n\x07network\x18\n \x01(\t\x12\x12\n\nother_sdks\x18\x0b \x01(\t\"\x9c\x01\n\x03SDK\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x06\n\x02JS\x10\x01\x12\t\n\x05SWIFT\x10\x02\x12\x0b\n\x07\x41NDROID\x10\x03\x12\x0b\n\x07\x46LUTTER\x10\x04\x12\x06\n\x02GO\x10\x05\x12\t\n\x05UNITY\x10\x06\x12\x10\n\x0cREACT_NATIVE\x10\x07\x12\x08\n\x04RUST\x10\x08\x12\n\n\x06PYTHON\x10\t\x12\x07\n\x03\x43PP\x10\n\x12\r\n\tUNITY_WEB\x10\x0b\x12\x08\n\x04NODE\x10\x0c\"\x8c\x02\n\x13\x43lientConfiguration\x12*\n\x05video\x18\x01 \x01(\x0b\x32\x1b.livekit.VideoConfiguration\x12+\n\x06screen\x18\x02 \x01(\x0b\x32\x1b.livekit.VideoConfiguration\x12\x37\n\x11resume_connection\x18\x03 \x01(\x0e\x32\x1c.livekit.ClientConfigSetting\x12\x30\n\x0f\x64isabled_codecs\x18\x04 \x01(\x0b\x32\x17.livekit.DisabledCodecs\x12\x31\n\x0b\x66orce_relay\x18\x05 \x01(\x0e\x32\x1c.livekit.ClientConfigSetting\"L\n\x12VideoConfiguration\x12\x36\n\x10hardware_encoder\x18\x01 \x01(\x0e\x32\x1c.livekit.ClientConfigSetting\"Q\n\x0e\x44isabledCodecs\x12\x1e\n\x06\x63odecs\x18\x01 \x03(\x0b\x32\x0e.livekit.Codec\x12\x1f\n\x07publish\x18\x02 \x03(\x0b\x32\x0e.livekit.Codec\"\x80\x02\n\x08RTPDrift\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x64uration\x18\x03 \x01(\x01\x12\x17\n\x0fstart_timestamp\x18\x04 \x01(\x04\x12\x15\n\rend_timestamp\x18\x05 \x01(\x04\x12\x17\n\x0frtp_clock_ticks\x18\x06 \x01(\x04\x12\x15\n\rdrift_samples\x18\x07 \x01(\x03\x12\x10\n\x08\x64rift_ms\x18\x08 \x01(\x01\x12\x12\n\nclock_rate\x18\t \x01(\x01\"\xd6\n\n\x08RTPStats\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x64uration\x18\x03 \x01(\x01\x12\x0f\n\x07packets\x18\x04 \x01(\r\x12\x13\n\x0bpacket_rate\x18\x05 \x01(\x01\x12\r\n\x05\x62ytes\x18\x06 \x01(\x04\x12\x14\n\x0cheader_bytes\x18\' \x01(\x04\x12\x0f\n\x07\x62itrate\x18\x07 \x01(\x01\x12\x14\n\x0cpackets_lost\x18\x08 \x01(\r\x12\x18\n\x10packet_loss_rate\x18\t \x01(\x01\x12\x1e\n\x16packet_loss_percentage\x18\n \x01(\x02\x12\x19\n\x11packets_duplicate\x18\x0b \x01(\r\x12\x1d\n\x15packet_duplicate_rate\x18\x0c \x01(\x01\x12\x17\n\x0f\x62ytes_duplicate\x18\r \x01(\x04\x12\x1e\n\x16header_bytes_duplicate\x18( \x01(\x04\x12\x19\n\x11\x62itrate_duplicate\x18\x0e \x01(\x01\x12\x17\n\x0fpackets_padding\x18\x0f \x01(\r\x12\x1b\n\x13packet_padding_rate\x18\x10 \x01(\x01\x12\x15\n\rbytes_padding\x18\x11 \x01(\x04\x12\x1c\n\x14header_bytes_padding\x18) \x01(\x04\x12\x17\n\x0f\x62itrate_padding\x18\x12 \x01(\x01\x12\x1c\n\x14packets_out_of_order\x18\x13 \x01(\r\x12\x0e\n\x06\x66rames\x18\x14 \x01(\r\x12\x12\n\nframe_rate\x18\x15 \x01(\x01\x12\x16\n\x0ejitter_current\x18\x16 \x01(\x01\x12\x12\n\njitter_max\x18\x17 \x01(\x01\x12:\n\rgap_histogram\x18\x18 \x03(\x0b\x32#.livekit.RTPStats.GapHistogramEntry\x12\r\n\x05nacks\x18\x19 \x01(\r\x12\x11\n\tnack_acks\x18% \x01(\r\x12\x13\n\x0bnack_misses\x18\x1a \x01(\r\x12\x15\n\rnack_repeated\x18& \x01(\r\x12\x0c\n\x04plis\x18\x1b \x01(\r\x12,\n\x08last_pli\x18\x1c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x66irs\x18\x1d \x01(\r\x12,\n\x08last_fir\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0brtt_current\x18\x1f \x01(\r\x12\x0f\n\x07rtt_max\x18 \x01(\r\x12\x12\n\nkey_frames\x18! \x01(\r\x12\x32\n\x0elast_key_frame\x18\" \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0flayer_lock_plis\x18# \x01(\r\x12\x37\n\x13last_layer_lock_pli\x18$ \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\'\n\x0cpacket_drift\x18, \x01(\x0b\x32\x11.livekit.RTPDrift\x12+\n\x10ntp_report_drift\x18- \x01(\x0b\x32\x11.livekit.RTPDrift\x12/\n\x14rebased_report_drift\x18. \x01(\x0b\x32\x11.livekit.RTPDrift\x12\x30\n\x15received_report_drift\x18/ \x01(\x0b\x32\x11.livekit.RTPDrift\x1a\x33\n\x11GapHistogramEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\"\xa2\x01\n\x15RTCPSenderReportState\x12\x15\n\rrtp_timestamp\x18\x01 \x01(\r\x12\x19\n\x11rtp_timestamp_ext\x18\x02 \x01(\x04\x12\x15\n\rntp_timestamp\x18\x03 \x01(\x04\x12\n\n\x02\x61t\x18\x04 \x01(\x03\x12\x13\n\x0b\x61t_adjusted\x18\x05 \x01(\x03\x12\x0f\n\x07packets\x18\x06 \x01(\r\x12\x0e\n\x06octets\x18\x07 \x01(\x04\"\xc9\x02\n\x11RTPForwarderState\x12\x0f\n\x07started\x18\x01 \x01(\x08\x12\x1f\n\x17reference_layer_spatial\x18\x02 \x01(\x05\x12\x16\n\x0epre_start_time\x18\x03 \x01(\x03\x12\x1b\n\x13\x65xt_first_timestamp\x18\x04 \x01(\x04\x12$\n\x1c\x64ummy_start_timestamp_offset\x18\x05 \x01(\x04\x12+\n\nrtp_munger\x18\x06 \x01(\x0b\x32\x17.livekit.RTPMungerState\x12-\n\nvp8_munger\x18\x07 \x01(\x0b\x32\x17.livekit.VP8MungerStateH\x00\x12;\n\x13sender_report_state\x18\x08 \x03(\x0b\x32\x1e.livekit.RTCPSenderReportStateB\x0e\n\x0c\x63odec_munger\"\xcb\x01\n\x0eRTPMungerState\x12 \n\x18\x65xt_last_sequence_number\x18\x01 \x01(\x04\x12\'\n\x1f\x65xt_second_last_sequence_number\x18\x02 \x01(\x04\x12\x1a\n\x12\x65xt_last_timestamp\x18\x03 \x01(\x04\x12!\n\x19\x65xt_second_last_timestamp\x18\x04 \x01(\x04\x12\x13\n\x0blast_marker\x18\x05 \x01(\x08\x12\x1a\n\x12second_last_marker\x18\x06 \x01(\x08\"\xb8\x01\n\x0eVP8MungerState\x12\x1b\n\x13\x65xt_last_picture_id\x18\x01 \x01(\x05\x12\x17\n\x0fpicture_id_used\x18\x02 \x01(\x08\x12\x18\n\x10last_tl0_pic_idx\x18\x03 \x01(\r\x12\x18\n\x10tl0_pic_idx_used\x18\x04 \x01(\x08\x12\x10\n\x08tid_used\x18\x05 \x01(\x08\x12\x14\n\x0clast_key_idx\x18\x06 \x01(\r\x12\x14\n\x0ckey_idx_used\x18\x07 \x01(\x08\"1\n\x0cTimedVersion\x12\x12\n\nunix_micro\x18\x01 \x01(\x03\x12\r\n\x05ticks\x18\x02 \x01(\x05*/\n\nAudioCodec\x12\x0e\n\nDEFAULT_AC\x10\x00\x12\x08\n\x04OPUS\x10\x01\x12\x07\n\x03\x41\x41\x43\x10\x02*V\n\nVideoCodec\x12\x0e\n\nDEFAULT_VC\x10\x00\x12\x11\n\rH264_BASELINE\x10\x01\x12\r\n\tH264_MAIN\x10\x02\x12\r\n\tH264_HIGH\x10\x03\x12\x07\n\x03VP8\x10\x04*)\n\nImageCodec\x12\x0e\n\nIC_DEFAULT\x10\x00\x12\x0b\n\x07IC_JPEG\x10\x01*+\n\tTrackType\x12\t\n\x05\x41UDIO\x10\x00\x12\t\n\x05VIDEO\x10\x01\x12\x08\n\x04\x44\x41TA\x10\x02*`\n\x0bTrackSource\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x43\x41MERA\x10\x01\x12\x0e\n\nMICROPHONE\x10\x02\x12\x10\n\x0cSCREEN_SHARE\x10\x03\x12\x16\n\x12SCREEN_SHARE_AUDIO\x10\x04*6\n\x0cVideoQuality\x12\x07\n\x03LOW\x10\x00\x12\n\n\x06MEDIUM\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\x07\n\x03OFF\x10\x03*@\n\x11\x43onnectionQuality\x12\x08\n\x04POOR\x10\x00\x12\x08\n\x04GOOD\x10\x01\x12\r\n\tEXCELLENT\x10\x02\x12\x08\n\x04LOST\x10\x03*;\n\x13\x43lientConfigSetting\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02*\xec\x01\n\x10\x44isconnectReason\x12\x12\n\x0eUNKNOWN_REASON\x10\x00\x12\x14\n\x10\x43LIENT_INITIATED\x10\x01\x12\x16\n\x12\x44UPLICATE_IDENTITY\x10\x02\x12\x13\n\x0fSERVER_SHUTDOWN\x10\x03\x12\x17\n\x13PARTICIPANT_REMOVED\x10\x04\x12\x10\n\x0cROOM_DELETED\x10\x05\x12\x12\n\x0eSTATE_MISMATCH\x10\x06\x12\x10\n\x0cJOIN_FAILURE\x10\x07\x12\r\n\tMIGRATION\x10\x08\x12\x10\n\x0cSIGNAL_CLOSE\x10\t\x12\x0f\n\x0bROOM_CLOSED\x10\n*\x89\x01\n\x0fReconnectReason\x12\x0e\n\nRR_UNKNOWN\x10\x00\x12\x1a\n\x16RR_SIGNAL_DISCONNECTED\x10\x01\x12\x17\n\x13RR_PUBLISHER_FAILED\x10\x02\x12\x18\n\x14RR_SUBSCRIBER_FAILED\x10\x03\x12\x17\n\x13RR_SWITCH_CANDIDATE\x10\x04*T\n\x11SubscriptionError\x12\x0e\n\nSE_UNKNOWN\x10\x00\x12\x18\n\x14SE_CODEC_UNSUPPORTED\x10\x01\x12\x15\n\x11SE_TRACK_NOTFOUND\x10\x02*\xa3\x01\n\x11\x41udioTrackFeature\x12\r\n\tTF_STEREO\x10\x00\x12\r\n\tTF_NO_DTX\x10\x01\x12\x18\n\x14TF_AUTO_GAIN_CONTROL\x10\x02\x12\x18\n\x14TF_ECHO_CANCELLATION\x10\x03\x12\x18\n\x14TF_NOISE_SUPPRESSION\x10\x04\x12\"\n\x1eTF_ENHANCED_NOISE_CANCELLATION\x10\x05\x42\x46Z#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'models', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' - _globals['_PARTICIPANTPERMISSION'].fields_by_name['recorder']._options = None + _globals['_PARTICIPANTPERMISSION'].fields_by_name['recorder']._loaded_options = None _globals['_PARTICIPANTPERMISSION'].fields_by_name['recorder']._serialized_options = b'\030\001' - _globals['_PARTICIPANTPERMISSION'].fields_by_name['agent']._options = None + _globals['_PARTICIPANTPERMISSION'].fields_by_name['agent']._loaded_options = None _globals['_PARTICIPANTPERMISSION'].fields_by_name['agent']._serialized_options = b'\030\001' - _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._options = None + _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._loaded_options = None _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._serialized_options = b'8\001' - _globals['_DATAPACKET'].fields_by_name['kind']._options = None + _globals['_DATAPACKET'].fields_by_name['kind']._loaded_options = None _globals['_DATAPACKET'].fields_by_name['kind']._serialized_options = b'\030\001' - _globals['_DATAPACKET'].fields_by_name['speaker']._options = None + _globals['_DATAPACKET'].fields_by_name['speaker']._loaded_options = None _globals['_DATAPACKET'].fields_by_name['speaker']._serialized_options = b'\030\001' - _globals['_USERPACKET'].fields_by_name['participant_sid']._options = None + _globals['_USERPACKET'].fields_by_name['participant_sid']._loaded_options = None _globals['_USERPACKET'].fields_by_name['participant_sid']._serialized_options = b'\030\001' - _globals['_USERPACKET'].fields_by_name['participant_identity']._options = None + _globals['_USERPACKET'].fields_by_name['participant_identity']._loaded_options = None _globals['_USERPACKET'].fields_by_name['participant_identity']._serialized_options = b'\030\001' - _globals['_USERPACKET'].fields_by_name['destination_sids']._options = None + _globals['_USERPACKET'].fields_by_name['destination_sids']._loaded_options = None _globals['_USERPACKET'].fields_by_name['destination_sids']._serialized_options = b'\030\001' - _globals['_USERPACKET'].fields_by_name['destination_identities']._options = None + _globals['_USERPACKET'].fields_by_name['destination_identities']._loaded_options = None _globals['_USERPACKET'].fields_by_name['destination_identities']._serialized_options = b'\030\001' - _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._options = None + _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._loaded_options = None _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._serialized_options = b'8\001' - _globals['_AUDIOCODEC']._serialized_start=6532 - _globals['_AUDIOCODEC']._serialized_end=6579 - _globals['_VIDEOCODEC']._serialized_start=6581 - _globals['_VIDEOCODEC']._serialized_end=6667 - _globals['_IMAGECODEC']._serialized_start=6669 - _globals['_IMAGECODEC']._serialized_end=6710 - _globals['_TRACKTYPE']._serialized_start=6712 - _globals['_TRACKTYPE']._serialized_end=6755 - _globals['_TRACKSOURCE']._serialized_start=6757 - _globals['_TRACKSOURCE']._serialized_end=6853 - _globals['_VIDEOQUALITY']._serialized_start=6855 - _globals['_VIDEOQUALITY']._serialized_end=6909 - _globals['_CONNECTIONQUALITY']._serialized_start=6911 - _globals['_CONNECTIONQUALITY']._serialized_end=6975 - _globals['_CLIENTCONFIGSETTING']._serialized_start=6977 - _globals['_CLIENTCONFIGSETTING']._serialized_end=7036 - _globals['_DISCONNECTREASON']._serialized_start=7039 - _globals['_DISCONNECTREASON']._serialized_end=7275 - _globals['_RECONNECTREASON']._serialized_start=7278 - _globals['_RECONNECTREASON']._serialized_end=7415 - _globals['_SUBSCRIPTIONERROR']._serialized_start=7417 - _globals['_SUBSCRIPTIONERROR']._serialized_end=7501 - _globals['_AUDIOTRACKFEATURE']._serialized_start=7504 - _globals['_AUDIOTRACKFEATURE']._serialized_end=7667 - _globals['_ROOM']._serialized_start=67 - _globals['_ROOM']._serialized_end=396 - _globals['_CODEC']._serialized_start=398 - _globals['_CODEC']._serialized_end=438 - _globals['_PLAYOUTDELAY']._serialized_start=440 - _globals['_PLAYOUTDELAY']._serialized_end=497 - _globals['_PARTICIPANTPERMISSION']._serialized_start=500 - _globals['_PARTICIPANTPERMISSION']._serialized_end=730 - _globals['_PARTICIPANTINFO']._serialized_start=733 - _globals['_PARTICIPANTINFO']._serialized_end=1365 - _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._serialized_start=1185 - _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._serialized_end=1234 - _globals['_PARTICIPANTINFO_STATE']._serialized_start=1236 - _globals['_PARTICIPANTINFO_STATE']._serialized_end=1298 - _globals['_PARTICIPANTINFO_KIND']._serialized_start=1300 - _globals['_PARTICIPANTINFO_KIND']._serialized_end=1365 - _globals['_ENCRYPTION']._serialized_start=1367 - _globals['_ENCRYPTION']._serialized_end=1418 - _globals['_ENCRYPTION_TYPE']._serialized_start=1381 - _globals['_ENCRYPTION_TYPE']._serialized_end=1418 - _globals['_SIMULCASTCODECINFO']._serialized_start=1420 - _globals['_SIMULCASTCODECINFO']._serialized_end=1522 - _globals['_TRACKINFO']._serialized_start=1525 - _globals['_TRACKINFO']._serialized_end=2026 - _globals['_VIDEOLAYER']._serialized_start=2028 - _globals['_VIDEOLAYER']._serialized_end=2142 - _globals['_DATAPACKET']._serialized_start=2145 - _globals['_DATAPACKET']._serialized_end=2482 - _globals['_DATAPACKET_KIND']._serialized_start=2442 - _globals['_DATAPACKET_KIND']._serialized_end=2473 - _globals['_ACTIVESPEAKERUPDATE']._serialized_start=2484 - _globals['_ACTIVESPEAKERUPDATE']._serialized_end=2545 - _globals['_SPEAKERINFO']._serialized_start=2547 - _globals['_SPEAKERINFO']._serialized_end=2604 - _globals['_USERPACKET']._serialized_start=2607 - _globals['_USERPACKET']._serialized_end=2895 - _globals['_SIPDTMF']._serialized_start=2897 - _globals['_SIPDTMF']._serialized_end=2935 - _globals['_TRANSCRIPTION']._serialized_start=2937 - _globals['_TRANSCRIPTION']._serialized_end=3061 - _globals['_TRANSCRIPTIONSEGMENT']._serialized_start=3063 - _globals['_TRANSCRIPTIONSEGMENT']._serialized_end=3182 - _globals['_PARTICIPANTTRACKS']._serialized_start=3184 - _globals['_PARTICIPANTTRACKS']._serialized_end=3248 - _globals['_SERVERINFO']._serialized_start=3251 - _globals['_SERVERINFO']._serialized_end=3457 - _globals['_SERVERINFO_EDITION']._serialized_start=3423 - _globals['_SERVERINFO_EDITION']._serialized_end=3457 - _globals['_CLIENTINFO']._serialized_start=3460 - _globals['_CLIENTINFO']._serialized_end=3809 - _globals['_CLIENTINFO_SDK']._serialized_start=3678 - _globals['_CLIENTINFO_SDK']._serialized_end=3809 - _globals['_CLIENTCONFIGURATION']._serialized_start=3812 - _globals['_CLIENTCONFIGURATION']._serialized_end=4080 - _globals['_VIDEOCONFIGURATION']._serialized_start=4082 - _globals['_VIDEOCONFIGURATION']._serialized_end=4158 - _globals['_DISABLEDCODECS']._serialized_start=4160 - _globals['_DISABLEDCODECS']._serialized_end=4241 - _globals['_RTPDRIFT']._serialized_start=4244 - _globals['_RTPDRIFT']._serialized_end=4500 - _globals['_RTPSTATS']._serialized_start=4503 - _globals['_RTPSTATS']._serialized_end=5815 - _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._serialized_start=5764 - _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._serialized_end=5815 - _globals['_RTPFORWARDERSTATE']._serialized_start=5818 - _globals['_RTPFORWARDERSTATE']._serialized_end=6086 - _globals['_RTPMUNGERSTATE']._serialized_start=6089 - _globals['_RTPMUNGERSTATE']._serialized_end=6292 - _globals['_VP8MUNGERSTATE']._serialized_start=6295 - _globals['_VP8MUNGERSTATE']._serialized_end=6479 - _globals['_TIMEDVERSION']._serialized_start=6481 - _globals['_TIMEDVERSION']._serialized_end=6530 + _globals['_AUDIOCODEC']._serialized_start=7564 + _globals['_AUDIOCODEC']._serialized_end=7611 + _globals['_VIDEOCODEC']._serialized_start=7613 + _globals['_VIDEOCODEC']._serialized_end=7699 + _globals['_IMAGECODEC']._serialized_start=7701 + _globals['_IMAGECODEC']._serialized_end=7742 + _globals['_TRACKTYPE']._serialized_start=7744 + _globals['_TRACKTYPE']._serialized_end=7787 + _globals['_TRACKSOURCE']._serialized_start=7789 + _globals['_TRACKSOURCE']._serialized_end=7885 + _globals['_VIDEOQUALITY']._serialized_start=7887 + _globals['_VIDEOQUALITY']._serialized_end=7941 + _globals['_CONNECTIONQUALITY']._serialized_start=7943 + _globals['_CONNECTIONQUALITY']._serialized_end=8007 + _globals['_CLIENTCONFIGSETTING']._serialized_start=8009 + _globals['_CLIENTCONFIGSETTING']._serialized_end=8068 + _globals['_DISCONNECTREASON']._serialized_start=8071 + _globals['_DISCONNECTREASON']._serialized_end=8307 + _globals['_RECONNECTREASON']._serialized_start=8310 + _globals['_RECONNECTREASON']._serialized_end=8447 + _globals['_SUBSCRIPTIONERROR']._serialized_start=8449 + _globals['_SUBSCRIPTIONERROR']._serialized_end=8533 + _globals['_AUDIOTRACKFEATURE']._serialized_start=8536 + _globals['_AUDIOTRACKFEATURE']._serialized_end=8699 + _globals['_ROOM']._serialized_start=90 + _globals['_ROOM']._serialized_end=419 + _globals['_CODEC']._serialized_start=421 + _globals['_CODEC']._serialized_end=461 + _globals['_PLAYOUTDELAY']._serialized_start=463 + _globals['_PLAYOUTDELAY']._serialized_end=520 + _globals['_PARTICIPANTPERMISSION']._serialized_start=523 + _globals['_PARTICIPANTPERMISSION']._serialized_end=784 + _globals['_PARTICIPANTINFO']._serialized_start=787 + _globals['_PARTICIPANTINFO']._serialized_end=1419 + _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._serialized_start=1239 + _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._serialized_end=1288 + _globals['_PARTICIPANTINFO_STATE']._serialized_start=1290 + _globals['_PARTICIPANTINFO_STATE']._serialized_end=1352 + _globals['_PARTICIPANTINFO_KIND']._serialized_start=1354 + _globals['_PARTICIPANTINFO_KIND']._serialized_end=1419 + _globals['_ENCRYPTION']._serialized_start=1421 + _globals['_ENCRYPTION']._serialized_end=1472 + _globals['_ENCRYPTION_TYPE']._serialized_start=1435 + _globals['_ENCRYPTION_TYPE']._serialized_end=1472 + _globals['_SIMULCASTCODECINFO']._serialized_start=1474 + _globals['_SIMULCASTCODECINFO']._serialized_end=1576 + _globals['_TRACKINFO']._serialized_start=1579 + _globals['_TRACKINFO']._serialized_end=2080 + _globals['_VIDEOLAYER']._serialized_start=2082 + _globals['_VIDEOLAYER']._serialized_end=2196 + _globals['_DATAPACKET']._serialized_start=2199 + _globals['_DATAPACKET']._serialized_end=2750 + _globals['_DATAPACKET_KIND']._serialized_start=2710 + _globals['_DATAPACKET_KIND']._serialized_end=2741 + _globals['_ACTIVESPEAKERUPDATE']._serialized_start=2752 + _globals['_ACTIVESPEAKERUPDATE']._serialized_end=2813 + _globals['_SPEAKERINFO']._serialized_start=2815 + _globals['_SPEAKERINFO']._serialized_end=2872 + _globals['_USERPACKET']._serialized_start=2875 + _globals['_USERPACKET']._serialized_end=3163 + _globals['_SIPDTMF']._serialized_start=3165 + _globals['_SIPDTMF']._serialized_end=3203 + _globals['_TRANSCRIPTION']._serialized_start=3205 + _globals['_TRANSCRIPTION']._serialized_end=3329 + _globals['_TRANSCRIPTIONSEGMENT']._serialized_start=3331 + _globals['_TRANSCRIPTIONSEGMENT']._serialized_end=3450 + _globals['_CHATMESSAGE']._serialized_start=3453 + _globals['_CHATMESSAGE']._serialized_end=3598 + _globals['_RPCREQUEST']._serialized_start=3600 + _globals['_RPCREQUEST']._serialized_end=3703 + _globals['_RPCACK']._serialized_start=3705 + _globals['_RPCACK']._serialized_end=3733 + _globals['_RPCRESPONSE']._serialized_start=3735 + _globals['_RPCRESPONSE']._serialized_end=3832 + _globals['_RPCERROR']._serialized_start=3834 + _globals['_RPCERROR']._serialized_end=3889 + _globals['_PARTICIPANTTRACKS']._serialized_start=3891 + _globals['_PARTICIPANTTRACKS']._serialized_end=3955 + _globals['_SERVERINFO']._serialized_start=3958 + _globals['_SERVERINFO']._serialized_end=4164 + _globals['_SERVERINFO_EDITION']._serialized_start=4130 + _globals['_SERVERINFO_EDITION']._serialized_end=4164 + _globals['_CLIENTINFO']._serialized_start=4167 + _globals['_CLIENTINFO']._serialized_end=4561 + _globals['_CLIENTINFO_SDK']._serialized_start=4405 + _globals['_CLIENTINFO_SDK']._serialized_end=4561 + _globals['_CLIENTCONFIGURATION']._serialized_start=4564 + _globals['_CLIENTCONFIGURATION']._serialized_end=4832 + _globals['_VIDEOCONFIGURATION']._serialized_start=4834 + _globals['_VIDEOCONFIGURATION']._serialized_end=4910 + _globals['_DISABLEDCODECS']._serialized_start=4912 + _globals['_DISABLEDCODECS']._serialized_end=4993 + _globals['_RTPDRIFT']._serialized_start=4996 + _globals['_RTPDRIFT']._serialized_end=5252 + _globals['_RTPSTATS']._serialized_start=5255 + _globals['_RTPSTATS']._serialized_end=6621 + _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._serialized_start=6570 + _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._serialized_end=6621 + _globals['_RTCPSENDERREPORTSTATE']._serialized_start=6624 + _globals['_RTCPSENDERREPORTSTATE']._serialized_end=6786 + _globals['_RTPFORWARDERSTATE']._serialized_start=6789 + _globals['_RTPFORWARDERSTATE']._serialized_end=7118 + _globals['_RTPMUNGERSTATE']._serialized_start=7121 + _globals['_RTPMUNGERSTATE']._serialized_end=7324 + _globals['_VP8MUNGERSTATE']._serialized_start=7327 + _globals['_VP8MUNGERSTATE']._serialized_end=7511 + _globals['_TIMEDVERSION']._serialized_start=7513 + _globals['_TIMEDVERSION']._serialized_end=7562 # @@protoc_insertion_point(module_scope) diff --git a/livekit-protocol/livekit/protocol/models.pyi b/livekit-protocol/livekit/protocol/models.pyi index 77182347..85b58fca 100644 --- a/livekit-protocol/livekit/protocol/models.pyi +++ b/livekit-protocol/livekit/protocol/models.pyi @@ -1,4 +1,5 @@ from google.protobuf import timestamp_pb2 as _timestamp_pb2 +import metrics as _metrics from google.protobuf.internal import containers as _containers from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor @@ -200,7 +201,7 @@ class PlayoutDelay(_message.Message): def __init__(self, enabled: bool = ..., min: _Optional[int] = ..., max: _Optional[int] = ...) -> None: ... class ParticipantPermission(_message.Message): - __slots__ = ("can_subscribe", "can_publish", "can_publish_data", "can_publish_sources", "hidden", "recorder", "can_update_metadata", "agent") + __slots__ = ("can_subscribe", "can_publish", "can_publish_data", "can_publish_sources", "hidden", "recorder", "can_update_metadata", "agent", "can_subscribe_metrics") CAN_SUBSCRIBE_FIELD_NUMBER: _ClassVar[int] CAN_PUBLISH_FIELD_NUMBER: _ClassVar[int] CAN_PUBLISH_DATA_FIELD_NUMBER: _ClassVar[int] @@ -209,6 +210,7 @@ class ParticipantPermission(_message.Message): RECORDER_FIELD_NUMBER: _ClassVar[int] CAN_UPDATE_METADATA_FIELD_NUMBER: _ClassVar[int] AGENT_FIELD_NUMBER: _ClassVar[int] + CAN_SUBSCRIBE_METRICS_FIELD_NUMBER: _ClassVar[int] can_subscribe: bool can_publish: bool can_publish_data: bool @@ -217,7 +219,8 @@ class ParticipantPermission(_message.Message): recorder: bool can_update_metadata: bool agent: bool - def __init__(self, can_subscribe: bool = ..., can_publish: bool = ..., can_publish_data: bool = ..., can_publish_sources: _Optional[_Iterable[_Union[TrackSource, str]]] = ..., hidden: bool = ..., recorder: bool = ..., can_update_metadata: bool = ..., agent: bool = ...) -> None: ... + can_subscribe_metrics: bool + def __init__(self, can_subscribe: bool = ..., can_publish: bool = ..., can_publish_data: bool = ..., can_publish_sources: _Optional[_Iterable[_Union[TrackSource, str]]] = ..., hidden: bool = ..., recorder: bool = ..., can_update_metadata: bool = ..., agent: bool = ..., can_subscribe_metrics: bool = ...) -> None: ... class ParticipantInfo(_message.Message): __slots__ = ("sid", "identity", "state", "tracks", "metadata", "joined_at", "name", "version", "permission", "region", "is_publisher", "kind", "attributes", "disconnect_reason") @@ -361,7 +364,7 @@ class VideoLayer(_message.Message): def __init__(self, quality: _Optional[_Union[VideoQuality, str]] = ..., width: _Optional[int] = ..., height: _Optional[int] = ..., bitrate: _Optional[int] = ..., ssrc: _Optional[int] = ...) -> None: ... class DataPacket(_message.Message): - __slots__ = ("kind", "participant_identity", "destination_identities", "user", "speaker", "sip_dtmf", "transcription") + __slots__ = ("kind", "participant_identity", "destination_identities", "user", "speaker", "sip_dtmf", "transcription", "metrics", "chat_message", "rpc_request", "rpc_ack", "rpc_response") class Kind(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = () RELIABLE: _ClassVar[DataPacket.Kind] @@ -375,6 +378,11 @@ class DataPacket(_message.Message): SPEAKER_FIELD_NUMBER: _ClassVar[int] SIP_DTMF_FIELD_NUMBER: _ClassVar[int] TRANSCRIPTION_FIELD_NUMBER: _ClassVar[int] + METRICS_FIELD_NUMBER: _ClassVar[int] + CHAT_MESSAGE_FIELD_NUMBER: _ClassVar[int] + RPC_REQUEST_FIELD_NUMBER: _ClassVar[int] + RPC_ACK_FIELD_NUMBER: _ClassVar[int] + RPC_RESPONSE_FIELD_NUMBER: _ClassVar[int] kind: DataPacket.Kind participant_identity: str destination_identities: _containers.RepeatedScalarFieldContainer[str] @@ -382,7 +390,12 @@ class DataPacket(_message.Message): speaker: ActiveSpeakerUpdate sip_dtmf: SipDTMF transcription: Transcription - def __init__(self, kind: _Optional[_Union[DataPacket.Kind, str]] = ..., participant_identity: _Optional[str] = ..., destination_identities: _Optional[_Iterable[str]] = ..., user: _Optional[_Union[UserPacket, _Mapping]] = ..., speaker: _Optional[_Union[ActiveSpeakerUpdate, _Mapping]] = ..., sip_dtmf: _Optional[_Union[SipDTMF, _Mapping]] = ..., transcription: _Optional[_Union[Transcription, _Mapping]] = ...) -> None: ... + metrics: _metrics.MetricsBatch + chat_message: ChatMessage + rpc_request: RpcRequest + rpc_ack: RpcAck + rpc_response: RpcResponse + def __init__(self, kind: _Optional[_Union[DataPacket.Kind, str]] = ..., participant_identity: _Optional[str] = ..., destination_identities: _Optional[_Iterable[str]] = ..., user: _Optional[_Union[UserPacket, _Mapping]] = ..., speaker: _Optional[_Union[ActiveSpeakerUpdate, _Mapping]] = ..., sip_dtmf: _Optional[_Union[SipDTMF, _Mapping]] = ..., transcription: _Optional[_Union[Transcription, _Mapping]] = ..., metrics: _Optional[_Union[_metrics.MetricsBatch, _Mapping]] = ..., chat_message: _Optional[_Union[ChatMessage, _Mapping]] = ..., rpc_request: _Optional[_Union[RpcRequest, _Mapping]] = ..., rpc_ack: _Optional[_Union[RpcAck, _Mapping]] = ..., rpc_response: _Optional[_Union[RpcResponse, _Mapping]] = ...) -> None: ... class ActiveSpeakerUpdate(_message.Message): __slots__ = ("speakers",) @@ -456,6 +469,62 @@ class TranscriptionSegment(_message.Message): language: str def __init__(self, id: _Optional[str] = ..., text: _Optional[str] = ..., start_time: _Optional[int] = ..., end_time: _Optional[int] = ..., final: bool = ..., language: _Optional[str] = ...) -> None: ... +class ChatMessage(_message.Message): + __slots__ = ("id", "timestamp", "edit_timestamp", "message", "deleted", "generated") + ID_FIELD_NUMBER: _ClassVar[int] + TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + EDIT_TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + MESSAGE_FIELD_NUMBER: _ClassVar[int] + DELETED_FIELD_NUMBER: _ClassVar[int] + GENERATED_FIELD_NUMBER: _ClassVar[int] + id: str + timestamp: int + edit_timestamp: int + message: str + deleted: bool + generated: bool + def __init__(self, id: _Optional[str] = ..., timestamp: _Optional[int] = ..., edit_timestamp: _Optional[int] = ..., message: _Optional[str] = ..., deleted: bool = ..., generated: bool = ...) -> None: ... + +class RpcRequest(_message.Message): + __slots__ = ("id", "method", "payload", "response_timeout_ms", "version") + ID_FIELD_NUMBER: _ClassVar[int] + METHOD_FIELD_NUMBER: _ClassVar[int] + PAYLOAD_FIELD_NUMBER: _ClassVar[int] + RESPONSE_TIMEOUT_MS_FIELD_NUMBER: _ClassVar[int] + VERSION_FIELD_NUMBER: _ClassVar[int] + id: str + method: str + payload: str + response_timeout_ms: int + version: int + def __init__(self, id: _Optional[str] = ..., method: _Optional[str] = ..., payload: _Optional[str] = ..., response_timeout_ms: _Optional[int] = ..., version: _Optional[int] = ...) -> None: ... + +class RpcAck(_message.Message): + __slots__ = ("request_id",) + REQUEST_ID_FIELD_NUMBER: _ClassVar[int] + request_id: str + def __init__(self, request_id: _Optional[str] = ...) -> None: ... + +class RpcResponse(_message.Message): + __slots__ = ("request_id", "payload", "error") + REQUEST_ID_FIELD_NUMBER: _ClassVar[int] + PAYLOAD_FIELD_NUMBER: _ClassVar[int] + ERROR_FIELD_NUMBER: _ClassVar[int] + request_id: str + payload: str + error: RpcError + def __init__(self, request_id: _Optional[str] = ..., payload: _Optional[str] = ..., error: _Optional[_Union[RpcError, _Mapping]] = ...) -> None: ... + +class RpcError(_message.Message): + __slots__ = ("code", "message", "data") + CODE_FIELD_NUMBER: _ClassVar[int] + MESSAGE_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + code: int + message: str + data: str + def __init__(self, code: _Optional[int] = ..., message: _Optional[str] = ..., data: _Optional[str] = ...) -> None: ... + class ParticipantTracks(_message.Message): __slots__ = ("participant_sid", "track_sids") PARTICIPANT_SID_FIELD_NUMBER: _ClassVar[int] @@ -489,7 +558,7 @@ class ServerInfo(_message.Message): def __init__(self, edition: _Optional[_Union[ServerInfo.Edition, str]] = ..., version: _Optional[str] = ..., protocol: _Optional[int] = ..., region: _Optional[str] = ..., node_id: _Optional[str] = ..., debug_info: _Optional[str] = ..., agent_protocol: _Optional[int] = ...) -> None: ... class ClientInfo(_message.Message): - __slots__ = ("sdk", "version", "protocol", "os", "os_version", "device_model", "browser", "browser_version", "address", "network") + __slots__ = ("sdk", "version", "protocol", "os", "os_version", "device_model", "browser", "browser_version", "address", "network", "other_sdks") class SDK(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = () UNKNOWN: _ClassVar[ClientInfo.SDK] @@ -503,6 +572,8 @@ class ClientInfo(_message.Message): RUST: _ClassVar[ClientInfo.SDK] PYTHON: _ClassVar[ClientInfo.SDK] CPP: _ClassVar[ClientInfo.SDK] + UNITY_WEB: _ClassVar[ClientInfo.SDK] + NODE: _ClassVar[ClientInfo.SDK] UNKNOWN: ClientInfo.SDK JS: ClientInfo.SDK SWIFT: ClientInfo.SDK @@ -514,6 +585,8 @@ class ClientInfo(_message.Message): RUST: ClientInfo.SDK PYTHON: ClientInfo.SDK CPP: ClientInfo.SDK + UNITY_WEB: ClientInfo.SDK + NODE: ClientInfo.SDK SDK_FIELD_NUMBER: _ClassVar[int] VERSION_FIELD_NUMBER: _ClassVar[int] PROTOCOL_FIELD_NUMBER: _ClassVar[int] @@ -524,6 +597,7 @@ class ClientInfo(_message.Message): BROWSER_VERSION_FIELD_NUMBER: _ClassVar[int] ADDRESS_FIELD_NUMBER: _ClassVar[int] NETWORK_FIELD_NUMBER: _ClassVar[int] + OTHER_SDKS_FIELD_NUMBER: _ClassVar[int] sdk: ClientInfo.SDK version: str protocol: int @@ -534,7 +608,8 @@ class ClientInfo(_message.Message): browser_version: str address: str network: str - def __init__(self, sdk: _Optional[_Union[ClientInfo.SDK, str]] = ..., version: _Optional[str] = ..., protocol: _Optional[int] = ..., os: _Optional[str] = ..., os_version: _Optional[str] = ..., device_model: _Optional[str] = ..., browser: _Optional[str] = ..., browser_version: _Optional[str] = ..., address: _Optional[str] = ..., network: _Optional[str] = ...) -> None: ... + other_sdks: str + def __init__(self, sdk: _Optional[_Union[ClientInfo.SDK, str]] = ..., version: _Optional[str] = ..., protocol: _Optional[int] = ..., os: _Optional[str] = ..., os_version: _Optional[str] = ..., device_model: _Optional[str] = ..., browser: _Optional[str] = ..., browser_version: _Optional[str] = ..., address: _Optional[str] = ..., network: _Optional[str] = ..., other_sdks: _Optional[str] = ...) -> None: ... class ClientConfiguration(_message.Message): __slots__ = ("video", "screen", "resume_connection", "disabled_codecs", "force_relay") @@ -587,7 +662,7 @@ class RTPDrift(_message.Message): def __init__(self, start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., duration: _Optional[float] = ..., start_timestamp: _Optional[int] = ..., end_timestamp: _Optional[int] = ..., rtp_clock_ticks: _Optional[int] = ..., drift_samples: _Optional[int] = ..., drift_ms: _Optional[float] = ..., clock_rate: _Optional[float] = ...) -> None: ... class RTPStats(_message.Message): - __slots__ = ("start_time", "end_time", "duration", "packets", "packet_rate", "bytes", "header_bytes", "bitrate", "packets_lost", "packet_loss_rate", "packet_loss_percentage", "packets_duplicate", "packet_duplicate_rate", "bytes_duplicate", "header_bytes_duplicate", "bitrate_duplicate", "packets_padding", "packet_padding_rate", "bytes_padding", "header_bytes_padding", "bitrate_padding", "packets_out_of_order", "frames", "frame_rate", "jitter_current", "jitter_max", "gap_histogram", "nacks", "nack_acks", "nack_misses", "nack_repeated", "plis", "last_pli", "firs", "last_fir", "rtt_current", "rtt_max", "key_frames", "last_key_frame", "layer_lock_plis", "last_layer_lock_pli", "packet_drift", "report_drift", "rebased_report_drift") + __slots__ = ("start_time", "end_time", "duration", "packets", "packet_rate", "bytes", "header_bytes", "bitrate", "packets_lost", "packet_loss_rate", "packet_loss_percentage", "packets_duplicate", "packet_duplicate_rate", "bytes_duplicate", "header_bytes_duplicate", "bitrate_duplicate", "packets_padding", "packet_padding_rate", "bytes_padding", "header_bytes_padding", "bitrate_padding", "packets_out_of_order", "frames", "frame_rate", "jitter_current", "jitter_max", "gap_histogram", "nacks", "nack_acks", "nack_misses", "nack_repeated", "plis", "last_pli", "firs", "last_fir", "rtt_current", "rtt_max", "key_frames", "last_key_frame", "layer_lock_plis", "last_layer_lock_pli", "packet_drift", "ntp_report_drift", "rebased_report_drift", "received_report_drift") class GapHistogramEntry(_message.Message): __slots__ = ("key", "value") KEY_FIELD_NUMBER: _ClassVar[int] @@ -637,8 +712,9 @@ class RTPStats(_message.Message): LAYER_LOCK_PLIS_FIELD_NUMBER: _ClassVar[int] LAST_LAYER_LOCK_PLI_FIELD_NUMBER: _ClassVar[int] PACKET_DRIFT_FIELD_NUMBER: _ClassVar[int] - REPORT_DRIFT_FIELD_NUMBER: _ClassVar[int] + NTP_REPORT_DRIFT_FIELD_NUMBER: _ClassVar[int] REBASED_REPORT_DRIFT_FIELD_NUMBER: _ClassVar[int] + RECEIVED_REPORT_DRIFT_FIELD_NUMBER: _ClassVar[int] start_time: _timestamp_pb2.Timestamp end_time: _timestamp_pb2.Timestamp duration: float @@ -681,12 +757,31 @@ class RTPStats(_message.Message): layer_lock_plis: int last_layer_lock_pli: _timestamp_pb2.Timestamp packet_drift: RTPDrift - report_drift: RTPDrift + ntp_report_drift: RTPDrift rebased_report_drift: RTPDrift - def __init__(self, start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., duration: _Optional[float] = ..., packets: _Optional[int] = ..., packet_rate: _Optional[float] = ..., bytes: _Optional[int] = ..., header_bytes: _Optional[int] = ..., bitrate: _Optional[float] = ..., packets_lost: _Optional[int] = ..., packet_loss_rate: _Optional[float] = ..., packet_loss_percentage: _Optional[float] = ..., packets_duplicate: _Optional[int] = ..., packet_duplicate_rate: _Optional[float] = ..., bytes_duplicate: _Optional[int] = ..., header_bytes_duplicate: _Optional[int] = ..., bitrate_duplicate: _Optional[float] = ..., packets_padding: _Optional[int] = ..., packet_padding_rate: _Optional[float] = ..., bytes_padding: _Optional[int] = ..., header_bytes_padding: _Optional[int] = ..., bitrate_padding: _Optional[float] = ..., packets_out_of_order: _Optional[int] = ..., frames: _Optional[int] = ..., frame_rate: _Optional[float] = ..., jitter_current: _Optional[float] = ..., jitter_max: _Optional[float] = ..., gap_histogram: _Optional[_Mapping[int, int]] = ..., nacks: _Optional[int] = ..., nack_acks: _Optional[int] = ..., nack_misses: _Optional[int] = ..., nack_repeated: _Optional[int] = ..., plis: _Optional[int] = ..., last_pli: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., firs: _Optional[int] = ..., last_fir: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., rtt_current: _Optional[int] = ..., rtt_max: _Optional[int] = ..., key_frames: _Optional[int] = ..., last_key_frame: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., layer_lock_plis: _Optional[int] = ..., last_layer_lock_pli: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., packet_drift: _Optional[_Union[RTPDrift, _Mapping]] = ..., report_drift: _Optional[_Union[RTPDrift, _Mapping]] = ..., rebased_report_drift: _Optional[_Union[RTPDrift, _Mapping]] = ...) -> None: ... + received_report_drift: RTPDrift + def __init__(self, start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., duration: _Optional[float] = ..., packets: _Optional[int] = ..., packet_rate: _Optional[float] = ..., bytes: _Optional[int] = ..., header_bytes: _Optional[int] = ..., bitrate: _Optional[float] = ..., packets_lost: _Optional[int] = ..., packet_loss_rate: _Optional[float] = ..., packet_loss_percentage: _Optional[float] = ..., packets_duplicate: _Optional[int] = ..., packet_duplicate_rate: _Optional[float] = ..., bytes_duplicate: _Optional[int] = ..., header_bytes_duplicate: _Optional[int] = ..., bitrate_duplicate: _Optional[float] = ..., packets_padding: _Optional[int] = ..., packet_padding_rate: _Optional[float] = ..., bytes_padding: _Optional[int] = ..., header_bytes_padding: _Optional[int] = ..., bitrate_padding: _Optional[float] = ..., packets_out_of_order: _Optional[int] = ..., frames: _Optional[int] = ..., frame_rate: _Optional[float] = ..., jitter_current: _Optional[float] = ..., jitter_max: _Optional[float] = ..., gap_histogram: _Optional[_Mapping[int, int]] = ..., nacks: _Optional[int] = ..., nack_acks: _Optional[int] = ..., nack_misses: _Optional[int] = ..., nack_repeated: _Optional[int] = ..., plis: _Optional[int] = ..., last_pli: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., firs: _Optional[int] = ..., last_fir: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., rtt_current: _Optional[int] = ..., rtt_max: _Optional[int] = ..., key_frames: _Optional[int] = ..., last_key_frame: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., layer_lock_plis: _Optional[int] = ..., last_layer_lock_pli: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., packet_drift: _Optional[_Union[RTPDrift, _Mapping]] = ..., ntp_report_drift: _Optional[_Union[RTPDrift, _Mapping]] = ..., rebased_report_drift: _Optional[_Union[RTPDrift, _Mapping]] = ..., received_report_drift: _Optional[_Union[RTPDrift, _Mapping]] = ...) -> None: ... + +class RTCPSenderReportState(_message.Message): + __slots__ = ("rtp_timestamp", "rtp_timestamp_ext", "ntp_timestamp", "at", "at_adjusted", "packets", "octets") + RTP_TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + RTP_TIMESTAMP_EXT_FIELD_NUMBER: _ClassVar[int] + NTP_TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + AT_FIELD_NUMBER: _ClassVar[int] + AT_ADJUSTED_FIELD_NUMBER: _ClassVar[int] + PACKETS_FIELD_NUMBER: _ClassVar[int] + OCTETS_FIELD_NUMBER: _ClassVar[int] + rtp_timestamp: int + rtp_timestamp_ext: int + ntp_timestamp: int + at: int + at_adjusted: int + packets: int + octets: int + def __init__(self, rtp_timestamp: _Optional[int] = ..., rtp_timestamp_ext: _Optional[int] = ..., ntp_timestamp: _Optional[int] = ..., at: _Optional[int] = ..., at_adjusted: _Optional[int] = ..., packets: _Optional[int] = ..., octets: _Optional[int] = ...) -> None: ... class RTPForwarderState(_message.Message): - __slots__ = ("started", "reference_layer_spatial", "pre_start_time", "ext_first_timestamp", "dummy_start_timestamp_offset", "rtp_munger", "vp8_munger") + __slots__ = ("started", "reference_layer_spatial", "pre_start_time", "ext_first_timestamp", "dummy_start_timestamp_offset", "rtp_munger", "vp8_munger", "sender_report_state") STARTED_FIELD_NUMBER: _ClassVar[int] REFERENCE_LAYER_SPATIAL_FIELD_NUMBER: _ClassVar[int] PRE_START_TIME_FIELD_NUMBER: _ClassVar[int] @@ -694,6 +789,7 @@ class RTPForwarderState(_message.Message): DUMMY_START_TIMESTAMP_OFFSET_FIELD_NUMBER: _ClassVar[int] RTP_MUNGER_FIELD_NUMBER: _ClassVar[int] VP8_MUNGER_FIELD_NUMBER: _ClassVar[int] + SENDER_REPORT_STATE_FIELD_NUMBER: _ClassVar[int] started: bool reference_layer_spatial: int pre_start_time: int @@ -701,7 +797,8 @@ class RTPForwarderState(_message.Message): dummy_start_timestamp_offset: int rtp_munger: RTPMungerState vp8_munger: VP8MungerState - def __init__(self, started: bool = ..., reference_layer_spatial: _Optional[int] = ..., pre_start_time: _Optional[int] = ..., ext_first_timestamp: _Optional[int] = ..., dummy_start_timestamp_offset: _Optional[int] = ..., rtp_munger: _Optional[_Union[RTPMungerState, _Mapping]] = ..., vp8_munger: _Optional[_Union[VP8MungerState, _Mapping]] = ...) -> None: ... + sender_report_state: _containers.RepeatedCompositeFieldContainer[RTCPSenderReportState] + def __init__(self, started: bool = ..., reference_layer_spatial: _Optional[int] = ..., pre_start_time: _Optional[int] = ..., ext_first_timestamp: _Optional[int] = ..., dummy_start_timestamp_offset: _Optional[int] = ..., rtp_munger: _Optional[_Union[RTPMungerState, _Mapping]] = ..., vp8_munger: _Optional[_Union[VP8MungerState, _Mapping]] = ..., sender_report_state: _Optional[_Iterable[_Union[RTCPSenderReportState, _Mapping]]] = ...) -> None: ... class RTPMungerState(_message.Message): __slots__ = ("ext_last_sequence_number", "ext_second_last_sequence_number", "ext_last_timestamp", "ext_second_last_timestamp", "last_marker", "second_last_marker") diff --git a/livekit-protocol/livekit/protocol/room.py b/livekit-protocol/livekit/protocol/room.py index dcb52b33..85ffe6b7 100644 --- a/livekit-protocol/livekit/protocol/room.py +++ b/livekit-protocol/livekit/protocol/room.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: livekit_room.proto -# Protobuf Python Version: 4.25.3 +# Protobuf Python Version: 5.28.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 28, + 0, + '', + 'livekit_room.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -22,12 +32,12 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'room', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' - _globals['_UPDATEPARTICIPANTREQUEST_ATTRIBUTESENTRY']._options = None + _globals['_UPDATEPARTICIPANTREQUEST_ATTRIBUTESENTRY']._loaded_options = None _globals['_UPDATEPARTICIPANTREQUEST_ATTRIBUTESENTRY']._serialized_options = b'8\001' - _globals['_SENDDATAREQUEST'].fields_by_name['destination_sids']._options = None + _globals['_SENDDATAREQUEST'].fields_by_name['destination_sids']._loaded_options = None _globals['_SENDDATAREQUEST'].fields_by_name['destination_sids']._serialized_options = b'\030\001' _globals['_CREATEROOMREQUEST']._serialized_start=106 _globals['_CREATEROOMREQUEST']._serialized_end=443 diff --git a/livekit-protocol/livekit/protocol/sip.py b/livekit-protocol/livekit/protocol/sip.py index 7106c3cc..dca5cf43 100644 --- a/livekit-protocol/livekit/protocol/sip.py +++ b/livekit-protocol/livekit/protocol/sip.py @@ -1,105 +1,144 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: livekit_sip.proto -# Protobuf Python Version: 4.25.3 +# Protobuf Python Version: 5.28.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 28, + 0, + '', + 'livekit_sip.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11livekit_sip.proto\x12\x07livekit\"\xaf\x02\n\x15\x43reateSIPTrunkRequest\x12\x19\n\x11inbound_addresses\x18\x01 \x03(\t\x12\x18\n\x10outbound_address\x18\x02 \x01(\t\x12\x17\n\x0foutbound_number\x18\x03 \x01(\t\x12!\n\x15inbound_numbers_regex\x18\x04 \x03(\tB\x02\x18\x01\x12\x17\n\x0finbound_numbers\x18\t \x03(\t\x12\x18\n\x10inbound_username\x18\x05 \x01(\t\x12\x18\n\x10inbound_password\x18\x06 \x01(\t\x12\x19\n\x11outbound_username\x18\x07 \x01(\t\x12\x19\n\x11outbound_password\x18\x08 \x01(\t\x12\x0c\n\x04name\x18\n \x01(\t\x12\x10\n\x08metadata\x18\x0b \x01(\t:\x02\x18\x01\"\xdb\x03\n\x0cSIPTrunkInfo\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12-\n\x04kind\x18\x0e \x01(\x0e\x32\x1f.livekit.SIPTrunkInfo.TrunkKind\x12\x19\n\x11inbound_addresses\x18\x02 \x03(\t\x12\x18\n\x10outbound_address\x18\x03 \x01(\t\x12\x17\n\x0foutbound_number\x18\x04 \x01(\t\x12(\n\ttransport\x18\r \x01(\x0e\x32\x15.livekit.SIPTransport\x12!\n\x15inbound_numbers_regex\x18\x05 \x03(\tB\x02\x18\x01\x12\x17\n\x0finbound_numbers\x18\n \x03(\t\x12\x18\n\x10inbound_username\x18\x06 \x01(\t\x12\x18\n\x10inbound_password\x18\x07 \x01(\t\x12\x19\n\x11outbound_username\x18\x08 \x01(\t\x12\x19\n\x11outbound_password\x18\t \x01(\t\x12\x0c\n\x04name\x18\x0b \x01(\t\x12\x10\n\x08metadata\x18\x0c \x01(\t\"D\n\tTrunkKind\x12\x10\n\x0cTRUNK_LEGACY\x10\x00\x12\x11\n\rTRUNK_INBOUND\x10\x01\x12\x12\n\x0eTRUNK_OUTBOUND\x10\x02:\x02\x18\x01\"K\n\x1c\x43reateSIPInboundTrunkRequest\x12+\n\x05trunk\x18\x01 \x01(\x0b\x32\x1c.livekit.SIPInboundTrunkInfo\"\xbe\x01\n\x13SIPInboundTrunkInfo\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08metadata\x18\x03 \x01(\t\x12\x0f\n\x07numbers\x18\x04 \x03(\t\x12\x19\n\x11\x61llowed_addresses\x18\x05 \x03(\t\x12\x17\n\x0f\x61llowed_numbers\x18\x06 \x03(\t\x12\x15\n\rauth_username\x18\x07 \x01(\t\x12\x15\n\rauth_password\x18\x08 \x01(\t\"M\n\x1d\x43reateSIPOutboundTrunkRequest\x12,\n\x05trunk\x18\x01 \x01(\x0b\x32\x1d.livekit.SIPOutboundTrunkInfo\"\xc6\x01\n\x14SIPOutboundTrunkInfo\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08metadata\x18\x03 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x04 \x01(\t\x12(\n\ttransport\x18\x05 \x01(\x0e\x32\x15.livekit.SIPTransport\x12\x0f\n\x07numbers\x18\x06 \x03(\t\x12\x15\n\rauth_username\x18\x07 \x01(\t\x12\x15\n\rauth_password\x18\x08 \x01(\t\"\x19\n\x13ListSIPTrunkRequest:\x02\x18\x01\"@\n\x14ListSIPTrunkResponse\x12$\n\x05items\x18\x01 \x03(\x0b\x32\x15.livekit.SIPTrunkInfo:\x02\x18\x01\"\x1c\n\x1aListSIPInboundTrunkRequest\"J\n\x1bListSIPInboundTrunkResponse\x12+\n\x05items\x18\x01 \x03(\x0b\x32\x1c.livekit.SIPInboundTrunkInfo\"\x1d\n\x1bListSIPOutboundTrunkRequest\"L\n\x1cListSIPOutboundTrunkResponse\x12,\n\x05items\x18\x01 \x03(\x0b\x32\x1d.livekit.SIPOutboundTrunkInfo\"-\n\x15\x44\x65leteSIPTrunkRequest\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\"7\n\x15SIPDispatchRuleDirect\x12\x11\n\troom_name\x18\x01 \x01(\t\x12\x0b\n\x03pin\x18\x02 \x01(\t\"=\n\x19SIPDispatchRuleIndividual\x12\x13\n\x0broom_prefix\x18\x01 \x01(\t\x12\x0b\n\x03pin\x18\x02 \x01(\t\"\xa1\x01\n\x0fSIPDispatchRule\x12>\n\x14\x64ispatch_rule_direct\x18\x01 \x01(\x0b\x32\x1e.livekit.SIPDispatchRuleDirectH\x00\x12\x46\n\x18\x64ispatch_rule_individual\x18\x02 \x01(\x0b\x32\".livekit.SIPDispatchRuleIndividualH\x00\x42\x06\n\x04rule\"\xab\x02\n\x1c\x43reateSIPDispatchRuleRequest\x12&\n\x04rule\x18\x01 \x01(\x0b\x32\x18.livekit.SIPDispatchRule\x12\x11\n\ttrunk_ids\x18\x02 \x03(\t\x12\x19\n\x11hide_phone_number\x18\x03 \x01(\x08\x12\x17\n\x0finbound_numbers\x18\x06 \x03(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x10\n\x08metadata\x18\x05 \x01(\t\x12I\n\nattributes\x18\x07 \x03(\x0b\x32\x35.livekit.CreateSIPDispatchRuleRequest.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb7\x02\n\x13SIPDispatchRuleInfo\x12\x1c\n\x14sip_dispatch_rule_id\x18\x01 \x01(\t\x12&\n\x04rule\x18\x02 \x01(\x0b\x32\x18.livekit.SIPDispatchRule\x12\x11\n\ttrunk_ids\x18\x03 \x03(\t\x12\x19\n\x11hide_phone_number\x18\x04 \x01(\x08\x12\x17\n\x0finbound_numbers\x18\x07 \x03(\t\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\x10\n\x08metadata\x18\x06 \x01(\t\x12@\n\nattributes\x18\x08 \x03(\x0b\x32,.livekit.SIPDispatchRuleInfo.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1c\n\x1aListSIPDispatchRuleRequest\"J\n\x1bListSIPDispatchRuleResponse\x12+\n\x05items\x18\x01 \x03(\x0b\x32\x1c.livekit.SIPDispatchRuleInfo\"<\n\x1c\x44\x65leteSIPDispatchRuleRequest\x12\x1c\n\x14sip_dispatch_rule_id\x18\x01 \x01(\t\"\x90\x03\n\x1b\x43reateSIPParticipantRequest\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12\x13\n\x0bsip_call_to\x18\x02 \x01(\t\x12\x11\n\troom_name\x18\x03 \x01(\t\x12\x1c\n\x14participant_identity\x18\x04 \x01(\t\x12\x18\n\x10participant_name\x18\x07 \x01(\t\x12\x1c\n\x14participant_metadata\x18\x08 \x01(\t\x12_\n\x16participant_attributes\x18\t \x03(\x0b\x32?.livekit.CreateSIPParticipantRequest.ParticipantAttributesEntry\x12\x0c\n\x04\x64tmf\x18\x05 \x01(\t\x12\x15\n\rplay_ringtone\x18\x06 \x01(\x08\x12\x19\n\x11hide_phone_number\x18\n \x01(\x08\x1a<\n\x1aParticipantAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"r\n\x12SIPParticipantInfo\x12\x16\n\x0eparticipant_id\x18\x01 \x01(\t\x12\x1c\n\x14participant_identity\x18\x02 \x01(\t\x12\x11\n\troom_name\x18\x03 \x01(\t\x12\x13\n\x0bsip_call_id\x18\x04 \x01(\t*k\n\x0cSIPTransport\x12\x16\n\x12SIP_TRANSPORT_AUTO\x10\x00\x12\x15\n\x11SIP_TRANSPORT_UDP\x10\x01\x12\x15\n\x11SIP_TRANSPORT_TCP\x10\x02\x12\x15\n\x11SIP_TRANSPORT_TLS\x10\x03\x32\xed\x07\n\x03SIP\x12L\n\x0e\x43reateSIPTrunk\x12\x1e.livekit.CreateSIPTrunkRequest\x1a\x15.livekit.SIPTrunkInfo\"\x03\x88\x02\x01\x12P\n\x0cListSIPTrunk\x12\x1c.livekit.ListSIPTrunkRequest\x1a\x1d.livekit.ListSIPTrunkResponse\"\x03\x88\x02\x01\x12\\\n\x15\x43reateSIPInboundTrunk\x12%.livekit.CreateSIPInboundTrunkRequest\x1a\x1c.livekit.SIPInboundTrunkInfo\x12_\n\x16\x43reateSIPOutboundTrunk\x12&.livekit.CreateSIPOutboundTrunkRequest\x1a\x1d.livekit.SIPOutboundTrunkInfo\x12`\n\x13ListSIPInboundTrunk\x12#.livekit.ListSIPInboundTrunkRequest\x1a$.livekit.ListSIPInboundTrunkResponse\x12\x63\n\x14ListSIPOutboundTrunk\x12$.livekit.ListSIPOutboundTrunkRequest\x1a%.livekit.ListSIPOutboundTrunkResponse\x12G\n\x0e\x44\x65leteSIPTrunk\x12\x1e.livekit.DeleteSIPTrunkRequest\x1a\x15.livekit.SIPTrunkInfo\x12\\\n\x15\x43reateSIPDispatchRule\x12%.livekit.CreateSIPDispatchRuleRequest\x1a\x1c.livekit.SIPDispatchRuleInfo\x12`\n\x13ListSIPDispatchRule\x12#.livekit.ListSIPDispatchRuleRequest\x1a$.livekit.ListSIPDispatchRuleResponse\x12\\\n\x15\x44\x65leteSIPDispatchRule\x12%.livekit.DeleteSIPDispatchRuleRequest\x1a\x1c.livekit.SIPDispatchRuleInfo\x12Y\n\x14\x43reateSIPParticipant\x12$.livekit.CreateSIPParticipantRequest\x1a\x1b.livekit.SIPParticipantInfoBFZ#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11livekit_sip.proto\x12\x07livekit\x1a\x1bgoogle/protobuf/empty.proto\"\xaf\x02\n\x15\x43reateSIPTrunkRequest\x12\x19\n\x11inbound_addresses\x18\x01 \x03(\t\x12\x18\n\x10outbound_address\x18\x02 \x01(\t\x12\x17\n\x0foutbound_number\x18\x03 \x01(\t\x12!\n\x15inbound_numbers_regex\x18\x04 \x03(\tB\x02\x18\x01\x12\x17\n\x0finbound_numbers\x18\t \x03(\t\x12\x18\n\x10inbound_username\x18\x05 \x01(\t\x12\x18\n\x10inbound_password\x18\x06 \x01(\t\x12\x19\n\x11outbound_username\x18\x07 \x01(\t\x12\x19\n\x11outbound_password\x18\x08 \x01(\t\x12\x0c\n\x04name\x18\n \x01(\t\x12\x10\n\x08metadata\x18\x0b \x01(\t:\x02\x18\x01\"\xdb\x03\n\x0cSIPTrunkInfo\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12-\n\x04kind\x18\x0e \x01(\x0e\x32\x1f.livekit.SIPTrunkInfo.TrunkKind\x12\x19\n\x11inbound_addresses\x18\x02 \x03(\t\x12\x18\n\x10outbound_address\x18\x03 \x01(\t\x12\x17\n\x0foutbound_number\x18\x04 \x01(\t\x12(\n\ttransport\x18\r \x01(\x0e\x32\x15.livekit.SIPTransport\x12!\n\x15inbound_numbers_regex\x18\x05 \x03(\tB\x02\x18\x01\x12\x17\n\x0finbound_numbers\x18\n \x03(\t\x12\x18\n\x10inbound_username\x18\x06 \x01(\t\x12\x18\n\x10inbound_password\x18\x07 \x01(\t\x12\x19\n\x11outbound_username\x18\x08 \x01(\t\x12\x19\n\x11outbound_password\x18\t \x01(\t\x12\x0c\n\x04name\x18\x0b \x01(\t\x12\x10\n\x08metadata\x18\x0c \x01(\t\"D\n\tTrunkKind\x12\x10\n\x0cTRUNK_LEGACY\x10\x00\x12\x11\n\rTRUNK_INBOUND\x10\x01\x12\x12\n\x0eTRUNK_OUTBOUND\x10\x02:\x02\x18\x01\"K\n\x1c\x43reateSIPInboundTrunkRequest\x12+\n\x05trunk\x18\x01 \x01(\x0b\x32\x1c.livekit.SIPInboundTrunkInfo\"\xbc\x03\n\x13SIPInboundTrunkInfo\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08metadata\x18\x03 \x01(\t\x12\x0f\n\x07numbers\x18\x04 \x03(\t\x12\x19\n\x11\x61llowed_addresses\x18\x05 \x03(\t\x12\x17\n\x0f\x61llowed_numbers\x18\x06 \x03(\t\x12\x15\n\rauth_username\x18\x07 \x01(\t\x12\x15\n\rauth_password\x18\x08 \x01(\t\x12:\n\x07headers\x18\t \x03(\x0b\x32).livekit.SIPInboundTrunkInfo.HeadersEntry\x12T\n\x15headers_to_attributes\x18\n \x03(\x0b\x32\x35.livekit.SIPInboundTrunkInfo.HeadersToAttributesEntry\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a:\n\x18HeadersToAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"M\n\x1d\x43reateSIPOutboundTrunkRequest\x12,\n\x05trunk\x18\x01 \x01(\x0b\x32\x1d.livekit.SIPOutboundTrunkInfo\"\xc6\x03\n\x14SIPOutboundTrunkInfo\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08metadata\x18\x03 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x04 \x01(\t\x12(\n\ttransport\x18\x05 \x01(\x0e\x32\x15.livekit.SIPTransport\x12\x0f\n\x07numbers\x18\x06 \x03(\t\x12\x15\n\rauth_username\x18\x07 \x01(\t\x12\x15\n\rauth_password\x18\x08 \x01(\t\x12;\n\x07headers\x18\t \x03(\x0b\x32*.livekit.SIPOutboundTrunkInfo.HeadersEntry\x12U\n\x15headers_to_attributes\x18\n \x03(\x0b\x32\x36.livekit.SIPOutboundTrunkInfo.HeadersToAttributesEntry\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a:\n\x18HeadersToAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"1\n\x19GetSIPInboundTrunkRequest\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\"I\n\x1aGetSIPInboundTrunkResponse\x12+\n\x05trunk\x18\x01 \x01(\x0b\x32\x1c.livekit.SIPInboundTrunkInfo\"2\n\x1aGetSIPOutboundTrunkRequest\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\"K\n\x1bGetSIPOutboundTrunkResponse\x12,\n\x05trunk\x18\x01 \x01(\x0b\x32\x1d.livekit.SIPOutboundTrunkInfo\"\x19\n\x13ListSIPTrunkRequest:\x02\x18\x01\"@\n\x14ListSIPTrunkResponse\x12$\n\x05items\x18\x01 \x03(\x0b\x32\x15.livekit.SIPTrunkInfo:\x02\x18\x01\"\x1c\n\x1aListSIPInboundTrunkRequest\"J\n\x1bListSIPInboundTrunkResponse\x12+\n\x05items\x18\x01 \x03(\x0b\x32\x1c.livekit.SIPInboundTrunkInfo\"\x1d\n\x1bListSIPOutboundTrunkRequest\"L\n\x1cListSIPOutboundTrunkResponse\x12,\n\x05items\x18\x01 \x03(\x0b\x32\x1d.livekit.SIPOutboundTrunkInfo\"-\n\x15\x44\x65leteSIPTrunkRequest\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\"7\n\x15SIPDispatchRuleDirect\x12\x11\n\troom_name\x18\x01 \x01(\t\x12\x0b\n\x03pin\x18\x02 \x01(\t\"=\n\x19SIPDispatchRuleIndividual\x12\x13\n\x0broom_prefix\x18\x01 \x01(\t\x12\x0b\n\x03pin\x18\x02 \x01(\t\"L\n\x15SIPDispatchRuleCallee\x12\x13\n\x0broom_prefix\x18\x01 \x01(\t\x12\x0b\n\x03pin\x18\x02 \x01(\t\x12\x11\n\trandomize\x18\x03 \x01(\x08\"\xe1\x01\n\x0fSIPDispatchRule\x12>\n\x14\x64ispatch_rule_direct\x18\x01 \x01(\x0b\x32\x1e.livekit.SIPDispatchRuleDirectH\x00\x12\x46\n\x18\x64ispatch_rule_individual\x18\x02 \x01(\x0b\x32\".livekit.SIPDispatchRuleIndividualH\x00\x12>\n\x14\x64ispatch_rule_callee\x18\x03 \x01(\x0b\x32\x1e.livekit.SIPDispatchRuleCalleeH\x00\x42\x06\n\x04rule\"\xab\x02\n\x1c\x43reateSIPDispatchRuleRequest\x12&\n\x04rule\x18\x01 \x01(\x0b\x32\x18.livekit.SIPDispatchRule\x12\x11\n\ttrunk_ids\x18\x02 \x03(\t\x12\x19\n\x11hide_phone_number\x18\x03 \x01(\x08\x12\x17\n\x0finbound_numbers\x18\x06 \x03(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x10\n\x08metadata\x18\x05 \x01(\t\x12I\n\nattributes\x18\x07 \x03(\x0b\x32\x35.livekit.CreateSIPDispatchRuleRequest.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb7\x02\n\x13SIPDispatchRuleInfo\x12\x1c\n\x14sip_dispatch_rule_id\x18\x01 \x01(\t\x12&\n\x04rule\x18\x02 \x01(\x0b\x32\x18.livekit.SIPDispatchRule\x12\x11\n\ttrunk_ids\x18\x03 \x03(\t\x12\x19\n\x11hide_phone_number\x18\x04 \x01(\x08\x12\x17\n\x0finbound_numbers\x18\x07 \x03(\t\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\x10\n\x08metadata\x18\x06 \x01(\t\x12@\n\nattributes\x18\x08 \x03(\x0b\x32,.livekit.SIPDispatchRuleInfo.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1c\n\x1aListSIPDispatchRuleRequest\"J\n\x1bListSIPDispatchRuleResponse\x12+\n\x05items\x18\x01 \x03(\x0b\x32\x1c.livekit.SIPDispatchRuleInfo\"<\n\x1c\x44\x65leteSIPDispatchRuleRequest\x12\x1c\n\x14sip_dispatch_rule_id\x18\x01 \x01(\t\"\x90\x03\n\x1b\x43reateSIPParticipantRequest\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12\x13\n\x0bsip_call_to\x18\x02 \x01(\t\x12\x11\n\troom_name\x18\x03 \x01(\t\x12\x1c\n\x14participant_identity\x18\x04 \x01(\t\x12\x18\n\x10participant_name\x18\x07 \x01(\t\x12\x1c\n\x14participant_metadata\x18\x08 \x01(\t\x12_\n\x16participant_attributes\x18\t \x03(\x0b\x32?.livekit.CreateSIPParticipantRequest.ParticipantAttributesEntry\x12\x0c\n\x04\x64tmf\x18\x05 \x01(\t\x12\x15\n\rplay_ringtone\x18\x06 \x01(\x08\x12\x19\n\x11hide_phone_number\x18\n \x01(\x08\x1a<\n\x1aParticipantAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"r\n\x12SIPParticipantInfo\x12\x16\n\x0eparticipant_id\x18\x01 \x01(\t\x12\x1c\n\x14participant_identity\x18\x02 \x01(\t\x12\x11\n\troom_name\x18\x03 \x01(\t\x12\x13\n\x0bsip_call_id\x18\x04 \x01(\t\"e\n\x1dTransferSIPParticipantRequest\x12\x1c\n\x14participant_identity\x18\x01 \x01(\t\x12\x11\n\troom_name\x18\x02 \x01(\t\x12\x13\n\x0btransfer_to\x18\x03 \x01(\t*k\n\x0cSIPTransport\x12\x16\n\x12SIP_TRANSPORT_AUTO\x10\x00\x12\x15\n\x11SIP_TRANSPORT_UDP\x10\x01\x12\x15\n\x11SIP_TRANSPORT_TCP\x10\x02\x12\x15\n\x11SIP_TRANSPORT_TLS\x10\x03\x32\x88\n\n\x03SIP\x12L\n\x0e\x43reateSIPTrunk\x12\x1e.livekit.CreateSIPTrunkRequest\x1a\x15.livekit.SIPTrunkInfo\"\x03\x88\x02\x01\x12P\n\x0cListSIPTrunk\x12\x1c.livekit.ListSIPTrunkRequest\x1a\x1d.livekit.ListSIPTrunkResponse\"\x03\x88\x02\x01\x12\\\n\x15\x43reateSIPInboundTrunk\x12%.livekit.CreateSIPInboundTrunkRequest\x1a\x1c.livekit.SIPInboundTrunkInfo\x12_\n\x16\x43reateSIPOutboundTrunk\x12&.livekit.CreateSIPOutboundTrunkRequest\x1a\x1d.livekit.SIPOutboundTrunkInfo\x12]\n\x12GetSIPInboundTrunk\x12\".livekit.GetSIPInboundTrunkRequest\x1a#.livekit.GetSIPInboundTrunkResponse\x12`\n\x13GetSIPOutboundTrunk\x12#.livekit.GetSIPOutboundTrunkRequest\x1a$.livekit.GetSIPOutboundTrunkResponse\x12`\n\x13ListSIPInboundTrunk\x12#.livekit.ListSIPInboundTrunkRequest\x1a$.livekit.ListSIPInboundTrunkResponse\x12\x63\n\x14ListSIPOutboundTrunk\x12$.livekit.ListSIPOutboundTrunkRequest\x1a%.livekit.ListSIPOutboundTrunkResponse\x12G\n\x0e\x44\x65leteSIPTrunk\x12\x1e.livekit.DeleteSIPTrunkRequest\x1a\x15.livekit.SIPTrunkInfo\x12\\\n\x15\x43reateSIPDispatchRule\x12%.livekit.CreateSIPDispatchRuleRequest\x1a\x1c.livekit.SIPDispatchRuleInfo\x12`\n\x13ListSIPDispatchRule\x12#.livekit.ListSIPDispatchRuleRequest\x1a$.livekit.ListSIPDispatchRuleResponse\x12\\\n\x15\x44\x65leteSIPDispatchRule\x12%.livekit.DeleteSIPDispatchRuleRequest\x1a\x1c.livekit.SIPDispatchRuleInfo\x12Y\n\x14\x43reateSIPParticipant\x12$.livekit.CreateSIPParticipantRequest\x1a\x1b.livekit.SIPParticipantInfo\x12X\n\x16TransferSIPParticipant\x12&.livekit.TransferSIPParticipantRequest\x1a\x16.google.protobuf.EmptyBFZ#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sip', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' - _globals['_CREATESIPTRUNKREQUEST'].fields_by_name['inbound_numbers_regex']._options = None + _globals['_CREATESIPTRUNKREQUEST'].fields_by_name['inbound_numbers_regex']._loaded_options = None _globals['_CREATESIPTRUNKREQUEST'].fields_by_name['inbound_numbers_regex']._serialized_options = b'\030\001' - _globals['_CREATESIPTRUNKREQUEST']._options = None + _globals['_CREATESIPTRUNKREQUEST']._loaded_options = None _globals['_CREATESIPTRUNKREQUEST']._serialized_options = b'\030\001' - _globals['_SIPTRUNKINFO'].fields_by_name['inbound_numbers_regex']._options = None + _globals['_SIPTRUNKINFO'].fields_by_name['inbound_numbers_regex']._loaded_options = None _globals['_SIPTRUNKINFO'].fields_by_name['inbound_numbers_regex']._serialized_options = b'\030\001' - _globals['_SIPTRUNKINFO']._options = None + _globals['_SIPTRUNKINFO']._loaded_options = None _globals['_SIPTRUNKINFO']._serialized_options = b'\030\001' - _globals['_LISTSIPTRUNKREQUEST']._options = None + _globals['_SIPINBOUNDTRUNKINFO_HEADERSENTRY']._loaded_options = None + _globals['_SIPINBOUNDTRUNKINFO_HEADERSENTRY']._serialized_options = b'8\001' + _globals['_SIPINBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._loaded_options = None + _globals['_SIPINBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._serialized_options = b'8\001' + _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSENTRY']._loaded_options = None + _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSENTRY']._serialized_options = b'8\001' + _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._loaded_options = None + _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._serialized_options = b'8\001' + _globals['_LISTSIPTRUNKREQUEST']._loaded_options = None _globals['_LISTSIPTRUNKREQUEST']._serialized_options = b'\030\001' - _globals['_LISTSIPTRUNKRESPONSE']._options = None + _globals['_LISTSIPTRUNKRESPONSE']._loaded_options = None _globals['_LISTSIPTRUNKRESPONSE']._serialized_options = b'\030\001' - _globals['_CREATESIPDISPATCHRULEREQUEST_ATTRIBUTESENTRY']._options = None + _globals['_CREATESIPDISPATCHRULEREQUEST_ATTRIBUTESENTRY']._loaded_options = None _globals['_CREATESIPDISPATCHRULEREQUEST_ATTRIBUTESENTRY']._serialized_options = b'8\001' - _globals['_SIPDISPATCHRULEINFO_ATTRIBUTESENTRY']._options = None + _globals['_SIPDISPATCHRULEINFO_ATTRIBUTESENTRY']._loaded_options = None _globals['_SIPDISPATCHRULEINFO_ATTRIBUTESENTRY']._serialized_options = b'8\001' - _globals['_CREATESIPPARTICIPANTREQUEST_PARTICIPANTATTRIBUTESENTRY']._options = None + _globals['_CREATESIPPARTICIPANTREQUEST_PARTICIPANTATTRIBUTESENTRY']._loaded_options = None _globals['_CREATESIPPARTICIPANTREQUEST_PARTICIPANTATTRIBUTESENTRY']._serialized_options = b'8\001' - _globals['_SIP'].methods_by_name['CreateSIPTrunk']._options = None + _globals['_SIP'].methods_by_name['CreateSIPTrunk']._loaded_options = None _globals['_SIP'].methods_by_name['CreateSIPTrunk']._serialized_options = b'\210\002\001' - _globals['_SIP'].methods_by_name['ListSIPTrunk']._options = None + _globals['_SIP'].methods_by_name['ListSIPTrunk']._loaded_options = None _globals['_SIP'].methods_by_name['ListSIPTrunk']._serialized_options = b'\210\002\001' - _globals['_SIPTRANSPORT']._serialized_start=3306 - _globals['_SIPTRANSPORT']._serialized_end=3413 - _globals['_CREATESIPTRUNKREQUEST']._serialized_start=31 - _globals['_CREATESIPTRUNKREQUEST']._serialized_end=334 - _globals['_SIPTRUNKINFO']._serialized_start=337 - _globals['_SIPTRUNKINFO']._serialized_end=812 - _globals['_SIPTRUNKINFO_TRUNKKIND']._serialized_start=740 - _globals['_SIPTRUNKINFO_TRUNKKIND']._serialized_end=808 - _globals['_CREATESIPINBOUNDTRUNKREQUEST']._serialized_start=814 - _globals['_CREATESIPINBOUNDTRUNKREQUEST']._serialized_end=889 - _globals['_SIPINBOUNDTRUNKINFO']._serialized_start=892 - _globals['_SIPINBOUNDTRUNKINFO']._serialized_end=1082 - _globals['_CREATESIPOUTBOUNDTRUNKREQUEST']._serialized_start=1084 - _globals['_CREATESIPOUTBOUNDTRUNKREQUEST']._serialized_end=1161 - _globals['_SIPOUTBOUNDTRUNKINFO']._serialized_start=1164 - _globals['_SIPOUTBOUNDTRUNKINFO']._serialized_end=1362 - _globals['_LISTSIPTRUNKREQUEST']._serialized_start=1364 - _globals['_LISTSIPTRUNKREQUEST']._serialized_end=1389 - _globals['_LISTSIPTRUNKRESPONSE']._serialized_start=1391 - _globals['_LISTSIPTRUNKRESPONSE']._serialized_end=1455 - _globals['_LISTSIPINBOUNDTRUNKREQUEST']._serialized_start=1457 - _globals['_LISTSIPINBOUNDTRUNKREQUEST']._serialized_end=1485 - _globals['_LISTSIPINBOUNDTRUNKRESPONSE']._serialized_start=1487 - _globals['_LISTSIPINBOUNDTRUNKRESPONSE']._serialized_end=1561 - _globals['_LISTSIPOUTBOUNDTRUNKREQUEST']._serialized_start=1563 - _globals['_LISTSIPOUTBOUNDTRUNKREQUEST']._serialized_end=1592 - _globals['_LISTSIPOUTBOUNDTRUNKRESPONSE']._serialized_start=1594 - _globals['_LISTSIPOUTBOUNDTRUNKRESPONSE']._serialized_end=1670 - _globals['_DELETESIPTRUNKREQUEST']._serialized_start=1672 - _globals['_DELETESIPTRUNKREQUEST']._serialized_end=1717 - _globals['_SIPDISPATCHRULEDIRECT']._serialized_start=1719 - _globals['_SIPDISPATCHRULEDIRECT']._serialized_end=1774 - _globals['_SIPDISPATCHRULEINDIVIDUAL']._serialized_start=1776 - _globals['_SIPDISPATCHRULEINDIVIDUAL']._serialized_end=1837 - _globals['_SIPDISPATCHRULE']._serialized_start=1840 - _globals['_SIPDISPATCHRULE']._serialized_end=2001 - _globals['_CREATESIPDISPATCHRULEREQUEST']._serialized_start=2004 - _globals['_CREATESIPDISPATCHRULEREQUEST']._serialized_end=2303 - _globals['_CREATESIPDISPATCHRULEREQUEST_ATTRIBUTESENTRY']._serialized_start=2254 - _globals['_CREATESIPDISPATCHRULEREQUEST_ATTRIBUTESENTRY']._serialized_end=2303 - _globals['_SIPDISPATCHRULEINFO']._serialized_start=2306 - _globals['_SIPDISPATCHRULEINFO']._serialized_end=2617 - _globals['_SIPDISPATCHRULEINFO_ATTRIBUTESENTRY']._serialized_start=2254 - _globals['_SIPDISPATCHRULEINFO_ATTRIBUTESENTRY']._serialized_end=2303 - _globals['_LISTSIPDISPATCHRULEREQUEST']._serialized_start=2619 - _globals['_LISTSIPDISPATCHRULEREQUEST']._serialized_end=2647 - _globals['_LISTSIPDISPATCHRULERESPONSE']._serialized_start=2649 - _globals['_LISTSIPDISPATCHRULERESPONSE']._serialized_end=2723 - _globals['_DELETESIPDISPATCHRULEREQUEST']._serialized_start=2725 - _globals['_DELETESIPDISPATCHRULEREQUEST']._serialized_end=2785 - _globals['_CREATESIPPARTICIPANTREQUEST']._serialized_start=2788 - _globals['_CREATESIPPARTICIPANTREQUEST']._serialized_end=3188 - _globals['_CREATESIPPARTICIPANTREQUEST_PARTICIPANTATTRIBUTESENTRY']._serialized_start=3128 - _globals['_CREATESIPPARTICIPANTREQUEST_PARTICIPANTATTRIBUTESENTRY']._serialized_end=3188 - _globals['_SIPPARTICIPANTINFO']._serialized_start=3190 - _globals['_SIPPARTICIPANTINFO']._serialized_end=3304 - _globals['_SIP']._serialized_start=3416 - _globals['_SIP']._serialized_end=4421 + _globals['_SIPTRANSPORT']._serialized_start=4345 + _globals['_SIPTRANSPORT']._serialized_end=4452 + _globals['_CREATESIPTRUNKREQUEST']._serialized_start=60 + _globals['_CREATESIPTRUNKREQUEST']._serialized_end=363 + _globals['_SIPTRUNKINFO']._serialized_start=366 + _globals['_SIPTRUNKINFO']._serialized_end=841 + _globals['_SIPTRUNKINFO_TRUNKKIND']._serialized_start=769 + _globals['_SIPTRUNKINFO_TRUNKKIND']._serialized_end=837 + _globals['_CREATESIPINBOUNDTRUNKREQUEST']._serialized_start=843 + _globals['_CREATESIPINBOUNDTRUNKREQUEST']._serialized_end=918 + _globals['_SIPINBOUNDTRUNKINFO']._serialized_start=921 + _globals['_SIPINBOUNDTRUNKINFO']._serialized_end=1365 + _globals['_SIPINBOUNDTRUNKINFO_HEADERSENTRY']._serialized_start=1259 + _globals['_SIPINBOUNDTRUNKINFO_HEADERSENTRY']._serialized_end=1305 + _globals['_SIPINBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._serialized_start=1307 + _globals['_SIPINBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._serialized_end=1365 + _globals['_CREATESIPOUTBOUNDTRUNKREQUEST']._serialized_start=1367 + _globals['_CREATESIPOUTBOUNDTRUNKREQUEST']._serialized_end=1444 + _globals['_SIPOUTBOUNDTRUNKINFO']._serialized_start=1447 + _globals['_SIPOUTBOUNDTRUNKINFO']._serialized_end=1901 + _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSENTRY']._serialized_start=1259 + _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSENTRY']._serialized_end=1305 + _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._serialized_start=1307 + _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._serialized_end=1365 + _globals['_GETSIPINBOUNDTRUNKREQUEST']._serialized_start=1903 + _globals['_GETSIPINBOUNDTRUNKREQUEST']._serialized_end=1952 + _globals['_GETSIPINBOUNDTRUNKRESPONSE']._serialized_start=1954 + _globals['_GETSIPINBOUNDTRUNKRESPONSE']._serialized_end=2027 + _globals['_GETSIPOUTBOUNDTRUNKREQUEST']._serialized_start=2029 + _globals['_GETSIPOUTBOUNDTRUNKREQUEST']._serialized_end=2079 + _globals['_GETSIPOUTBOUNDTRUNKRESPONSE']._serialized_start=2081 + _globals['_GETSIPOUTBOUNDTRUNKRESPONSE']._serialized_end=2156 + _globals['_LISTSIPTRUNKREQUEST']._serialized_start=2158 + _globals['_LISTSIPTRUNKREQUEST']._serialized_end=2183 + _globals['_LISTSIPTRUNKRESPONSE']._serialized_start=2185 + _globals['_LISTSIPTRUNKRESPONSE']._serialized_end=2249 + _globals['_LISTSIPINBOUNDTRUNKREQUEST']._serialized_start=2251 + _globals['_LISTSIPINBOUNDTRUNKREQUEST']._serialized_end=2279 + _globals['_LISTSIPINBOUNDTRUNKRESPONSE']._serialized_start=2281 + _globals['_LISTSIPINBOUNDTRUNKRESPONSE']._serialized_end=2355 + _globals['_LISTSIPOUTBOUNDTRUNKREQUEST']._serialized_start=2357 + _globals['_LISTSIPOUTBOUNDTRUNKREQUEST']._serialized_end=2386 + _globals['_LISTSIPOUTBOUNDTRUNKRESPONSE']._serialized_start=2388 + _globals['_LISTSIPOUTBOUNDTRUNKRESPONSE']._serialized_end=2464 + _globals['_DELETESIPTRUNKREQUEST']._serialized_start=2466 + _globals['_DELETESIPTRUNKREQUEST']._serialized_end=2511 + _globals['_SIPDISPATCHRULEDIRECT']._serialized_start=2513 + _globals['_SIPDISPATCHRULEDIRECT']._serialized_end=2568 + _globals['_SIPDISPATCHRULEINDIVIDUAL']._serialized_start=2570 + _globals['_SIPDISPATCHRULEINDIVIDUAL']._serialized_end=2631 + _globals['_SIPDISPATCHRULECALLEE']._serialized_start=2633 + _globals['_SIPDISPATCHRULECALLEE']._serialized_end=2709 + _globals['_SIPDISPATCHRULE']._serialized_start=2712 + _globals['_SIPDISPATCHRULE']._serialized_end=2937 + _globals['_CREATESIPDISPATCHRULEREQUEST']._serialized_start=2940 + _globals['_CREATESIPDISPATCHRULEREQUEST']._serialized_end=3239 + _globals['_CREATESIPDISPATCHRULEREQUEST_ATTRIBUTESENTRY']._serialized_start=3190 + _globals['_CREATESIPDISPATCHRULEREQUEST_ATTRIBUTESENTRY']._serialized_end=3239 + _globals['_SIPDISPATCHRULEINFO']._serialized_start=3242 + _globals['_SIPDISPATCHRULEINFO']._serialized_end=3553 + _globals['_SIPDISPATCHRULEINFO_ATTRIBUTESENTRY']._serialized_start=3190 + _globals['_SIPDISPATCHRULEINFO_ATTRIBUTESENTRY']._serialized_end=3239 + _globals['_LISTSIPDISPATCHRULEREQUEST']._serialized_start=3555 + _globals['_LISTSIPDISPATCHRULEREQUEST']._serialized_end=3583 + _globals['_LISTSIPDISPATCHRULERESPONSE']._serialized_start=3585 + _globals['_LISTSIPDISPATCHRULERESPONSE']._serialized_end=3659 + _globals['_DELETESIPDISPATCHRULEREQUEST']._serialized_start=3661 + _globals['_DELETESIPDISPATCHRULEREQUEST']._serialized_end=3721 + _globals['_CREATESIPPARTICIPANTREQUEST']._serialized_start=3724 + _globals['_CREATESIPPARTICIPANTREQUEST']._serialized_end=4124 + _globals['_CREATESIPPARTICIPANTREQUEST_PARTICIPANTATTRIBUTESENTRY']._serialized_start=4064 + _globals['_CREATESIPPARTICIPANTREQUEST_PARTICIPANTATTRIBUTESENTRY']._serialized_end=4124 + _globals['_SIPPARTICIPANTINFO']._serialized_start=4126 + _globals['_SIPPARTICIPANTINFO']._serialized_end=4240 + _globals['_TRANSFERSIPPARTICIPANTREQUEST']._serialized_start=4242 + _globals['_TRANSFERSIPPARTICIPANTREQUEST']._serialized_end=4343 + _globals['_SIP']._serialized_start=4455 + _globals['_SIP']._serialized_end=5743 # @@protoc_insertion_point(module_scope) diff --git a/livekit-protocol/livekit/protocol/sip.pyi b/livekit-protocol/livekit/protocol/sip.pyi index 770b8e30..366c13cd 100644 --- a/livekit-protocol/livekit/protocol/sip.pyi +++ b/livekit-protocol/livekit/protocol/sip.pyi @@ -1,3 +1,4 @@ +from google.protobuf import empty_pb2 as _empty_pb2 from google.protobuf.internal import containers as _containers from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor @@ -90,7 +91,21 @@ class CreateSIPInboundTrunkRequest(_message.Message): def __init__(self, trunk: _Optional[_Union[SIPInboundTrunkInfo, _Mapping]] = ...) -> None: ... class SIPInboundTrunkInfo(_message.Message): - __slots__ = ("sip_trunk_id", "name", "metadata", "numbers", "allowed_addresses", "allowed_numbers", "auth_username", "auth_password") + __slots__ = ("sip_trunk_id", "name", "metadata", "numbers", "allowed_addresses", "allowed_numbers", "auth_username", "auth_password", "headers", "headers_to_attributes") + class HeadersEntry(_message.Message): + __slots__ = ("key", "value") + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + class HeadersToAttributesEntry(_message.Message): + __slots__ = ("key", "value") + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... SIP_TRUNK_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] METADATA_FIELD_NUMBER: _ClassVar[int] @@ -99,6 +114,8 @@ class SIPInboundTrunkInfo(_message.Message): ALLOWED_NUMBERS_FIELD_NUMBER: _ClassVar[int] AUTH_USERNAME_FIELD_NUMBER: _ClassVar[int] AUTH_PASSWORD_FIELD_NUMBER: _ClassVar[int] + HEADERS_FIELD_NUMBER: _ClassVar[int] + HEADERS_TO_ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] sip_trunk_id: str name: str metadata: str @@ -107,7 +124,9 @@ class SIPInboundTrunkInfo(_message.Message): allowed_numbers: _containers.RepeatedScalarFieldContainer[str] auth_username: str auth_password: str - def __init__(self, sip_trunk_id: _Optional[str] = ..., name: _Optional[str] = ..., metadata: _Optional[str] = ..., numbers: _Optional[_Iterable[str]] = ..., allowed_addresses: _Optional[_Iterable[str]] = ..., allowed_numbers: _Optional[_Iterable[str]] = ..., auth_username: _Optional[str] = ..., auth_password: _Optional[str] = ...) -> None: ... + headers: _containers.ScalarMap[str, str] + headers_to_attributes: _containers.ScalarMap[str, str] + def __init__(self, sip_trunk_id: _Optional[str] = ..., name: _Optional[str] = ..., metadata: _Optional[str] = ..., numbers: _Optional[_Iterable[str]] = ..., allowed_addresses: _Optional[_Iterable[str]] = ..., allowed_numbers: _Optional[_Iterable[str]] = ..., auth_username: _Optional[str] = ..., auth_password: _Optional[str] = ..., headers: _Optional[_Mapping[str, str]] = ..., headers_to_attributes: _Optional[_Mapping[str, str]] = ...) -> None: ... class CreateSIPOutboundTrunkRequest(_message.Message): __slots__ = ("trunk",) @@ -116,7 +135,21 @@ class CreateSIPOutboundTrunkRequest(_message.Message): def __init__(self, trunk: _Optional[_Union[SIPOutboundTrunkInfo, _Mapping]] = ...) -> None: ... class SIPOutboundTrunkInfo(_message.Message): - __slots__ = ("sip_trunk_id", "name", "metadata", "address", "transport", "numbers", "auth_username", "auth_password") + __slots__ = ("sip_trunk_id", "name", "metadata", "address", "transport", "numbers", "auth_username", "auth_password", "headers", "headers_to_attributes") + class HeadersEntry(_message.Message): + __slots__ = ("key", "value") + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + class HeadersToAttributesEntry(_message.Message): + __slots__ = ("key", "value") + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... SIP_TRUNK_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] METADATA_FIELD_NUMBER: _ClassVar[int] @@ -125,6 +158,8 @@ class SIPOutboundTrunkInfo(_message.Message): NUMBERS_FIELD_NUMBER: _ClassVar[int] AUTH_USERNAME_FIELD_NUMBER: _ClassVar[int] AUTH_PASSWORD_FIELD_NUMBER: _ClassVar[int] + HEADERS_FIELD_NUMBER: _ClassVar[int] + HEADERS_TO_ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] sip_trunk_id: str name: str metadata: str @@ -133,7 +168,33 @@ class SIPOutboundTrunkInfo(_message.Message): numbers: _containers.RepeatedScalarFieldContainer[str] auth_username: str auth_password: str - def __init__(self, sip_trunk_id: _Optional[str] = ..., name: _Optional[str] = ..., metadata: _Optional[str] = ..., address: _Optional[str] = ..., transport: _Optional[_Union[SIPTransport, str]] = ..., numbers: _Optional[_Iterable[str]] = ..., auth_username: _Optional[str] = ..., auth_password: _Optional[str] = ...) -> None: ... + headers: _containers.ScalarMap[str, str] + headers_to_attributes: _containers.ScalarMap[str, str] + def __init__(self, sip_trunk_id: _Optional[str] = ..., name: _Optional[str] = ..., metadata: _Optional[str] = ..., address: _Optional[str] = ..., transport: _Optional[_Union[SIPTransport, str]] = ..., numbers: _Optional[_Iterable[str]] = ..., auth_username: _Optional[str] = ..., auth_password: _Optional[str] = ..., headers: _Optional[_Mapping[str, str]] = ..., headers_to_attributes: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class GetSIPInboundTrunkRequest(_message.Message): + __slots__ = ("sip_trunk_id",) + SIP_TRUNK_ID_FIELD_NUMBER: _ClassVar[int] + sip_trunk_id: str + def __init__(self, sip_trunk_id: _Optional[str] = ...) -> None: ... + +class GetSIPInboundTrunkResponse(_message.Message): + __slots__ = ("trunk",) + TRUNK_FIELD_NUMBER: _ClassVar[int] + trunk: SIPInboundTrunkInfo + def __init__(self, trunk: _Optional[_Union[SIPInboundTrunkInfo, _Mapping]] = ...) -> None: ... + +class GetSIPOutboundTrunkRequest(_message.Message): + __slots__ = ("sip_trunk_id",) + SIP_TRUNK_ID_FIELD_NUMBER: _ClassVar[int] + sip_trunk_id: str + def __init__(self, sip_trunk_id: _Optional[str] = ...) -> None: ... + +class GetSIPOutboundTrunkResponse(_message.Message): + __slots__ = ("trunk",) + TRUNK_FIELD_NUMBER: _ClassVar[int] + trunk: SIPOutboundTrunkInfo + def __init__(self, trunk: _Optional[_Union[SIPOutboundTrunkInfo, _Mapping]] = ...) -> None: ... class ListSIPTrunkRequest(_message.Message): __slots__ = () @@ -187,13 +248,25 @@ class SIPDispatchRuleIndividual(_message.Message): pin: str def __init__(self, room_prefix: _Optional[str] = ..., pin: _Optional[str] = ...) -> None: ... +class SIPDispatchRuleCallee(_message.Message): + __slots__ = ("room_prefix", "pin", "randomize") + ROOM_PREFIX_FIELD_NUMBER: _ClassVar[int] + PIN_FIELD_NUMBER: _ClassVar[int] + RANDOMIZE_FIELD_NUMBER: _ClassVar[int] + room_prefix: str + pin: str + randomize: bool + def __init__(self, room_prefix: _Optional[str] = ..., pin: _Optional[str] = ..., randomize: bool = ...) -> None: ... + class SIPDispatchRule(_message.Message): - __slots__ = ("dispatch_rule_direct", "dispatch_rule_individual") + __slots__ = ("dispatch_rule_direct", "dispatch_rule_individual", "dispatch_rule_callee") DISPATCH_RULE_DIRECT_FIELD_NUMBER: _ClassVar[int] DISPATCH_RULE_INDIVIDUAL_FIELD_NUMBER: _ClassVar[int] + DISPATCH_RULE_CALLEE_FIELD_NUMBER: _ClassVar[int] dispatch_rule_direct: SIPDispatchRuleDirect dispatch_rule_individual: SIPDispatchRuleIndividual - def __init__(self, dispatch_rule_direct: _Optional[_Union[SIPDispatchRuleDirect, _Mapping]] = ..., dispatch_rule_individual: _Optional[_Union[SIPDispatchRuleIndividual, _Mapping]] = ...) -> None: ... + dispatch_rule_callee: SIPDispatchRuleCallee + def __init__(self, dispatch_rule_direct: _Optional[_Union[SIPDispatchRuleDirect, _Mapping]] = ..., dispatch_rule_individual: _Optional[_Union[SIPDispatchRuleIndividual, _Mapping]] = ..., dispatch_rule_callee: _Optional[_Union[SIPDispatchRuleCallee, _Mapping]] = ...) -> None: ... class CreateSIPDispatchRuleRequest(_message.Message): __slots__ = ("rule", "trunk_ids", "hide_phone_number", "inbound_numbers", "name", "metadata", "attributes") @@ -305,3 +378,13 @@ class SIPParticipantInfo(_message.Message): room_name: str sip_call_id: str def __init__(self, participant_id: _Optional[str] = ..., participant_identity: _Optional[str] = ..., room_name: _Optional[str] = ..., sip_call_id: _Optional[str] = ...) -> None: ... + +class TransferSIPParticipantRequest(_message.Message): + __slots__ = ("participant_identity", "room_name", "transfer_to") + PARTICIPANT_IDENTITY_FIELD_NUMBER: _ClassVar[int] + ROOM_NAME_FIELD_NUMBER: _ClassVar[int] + TRANSFER_TO_FIELD_NUMBER: _ClassVar[int] + participant_identity: str + room_name: str + transfer_to: str + def __init__(self, participant_identity: _Optional[str] = ..., room_name: _Optional[str] = ..., transfer_to: _Optional[str] = ...) -> None: ... diff --git a/livekit-protocol/livekit/protocol/webhook.py b/livekit-protocol/livekit/protocol/webhook.py index 7c9f12c4..2ced9367 100644 --- a/livekit-protocol/livekit/protocol/webhook.py +++ b/livekit-protocol/livekit/protocol/webhook.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: livekit_webhook.proto -# Protobuf Python Version: 4.25.3 +# Protobuf Python Version: 5.28.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 28, + 0, + '', + 'livekit_webhook.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -22,8 +32,8 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'webhook', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' _globals['_WEBHOOKEVENT']._serialized_start=102 _globals['_WEBHOOKEVENT']._serialized_end=381 diff --git a/livekit-protocol/protocol b/livekit-protocol/protocol index 5c7350d2..a601adc5 160000 --- a/livekit-protocol/protocol +++ b/livekit-protocol/protocol @@ -1 +1 @@ -Subproject commit 5c7350d25904ed8fd8163e91ff47f0577ca6afad +Subproject commit a601adc5e9027820857a6d445b32a868b19d4184 diff --git a/livekit-rtc/generate_proto.sh b/livekit-rtc/generate_proto.sh index 1c4d0f03..0033a289 100755 --- a/livekit-rtc/generate_proto.sh +++ b/livekit-rtc/generate_proto.sh @@ -31,7 +31,8 @@ protoc \ $FFI_PROTOCOL/track.proto \ $FFI_PROTOCOL/video_frame.proto \ $FFI_PROTOCOL/e2ee.proto \ - $FFI_PROTOCOL/stats.proto + $FFI_PROTOCOL/stats.proto \ + $FFI_PROTOCOL/rpc.proto touch -a "$FFI_OUT_PYTHON/__init__.py" diff --git a/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py b/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py index 43937e3e..bf01c51b 100644 --- a/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: audio_frame.proto -# Protobuf Python Version: 4.25.1 +# Protobuf Python Version: 5.28.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 28, + 0, + '', + 'audio_frame.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -21,8 +31,8 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'audio_frame_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' _globals['_SOXRESAMPLERDATATYPE']._serialized_start=3469 _globals['_SOXRESAMPLERDATATYPE']._serialized_end=3543 diff --git a/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py b/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py index 18ed35f4..6b0c6961 100644 --- a/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: e2ee.proto -# Protobuf Python Version: 4.25.1 +# Protobuf Python Version: 5.28.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 28, + 0, + '', + 'e2ee.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -19,8 +29,8 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'e2ee_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' _globals['_ENCRYPTIONTYPE']._serialized_start=2937 _globals['_ENCRYPTIONTYPE']._serialized_end=2984 diff --git a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py index 500fea80..e23d0e13 100644 --- a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: ffi.proto -# Protobuf Python Version: 4.25.1 +# Protobuf Python Version: 5.28.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 28, + 0, + '', + 'ffi.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -17,34 +27,35 @@ from . import room_pb2 as room__pb2 from . import video_frame_pb2 as video__frame__pb2 from . import audio_frame_pb2 as audio__frame__pb2 +import rpc_pb2 as rpc__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tffi.proto\x12\rlivekit.proto\x1a\ne2ee.proto\x1a\x0btrack.proto\x1a\nroom.proto\x1a\x11video_frame.proto\x1a\x11\x61udio_frame.proto\"\xf4\x11\n\nFfiRequest\x12\x30\n\x07\x64ispose\x18\x02 \x01(\x0b\x32\x1d.livekit.proto.DisposeRequestH\x00\x12\x30\n\x07\x63onnect\x18\x03 \x01(\x0b\x32\x1d.livekit.proto.ConnectRequestH\x00\x12\x36\n\ndisconnect\x18\x04 \x01(\x0b\x32 .livekit.proto.DisconnectRequestH\x00\x12;\n\rpublish_track\x18\x05 \x01(\x0b\x32\".livekit.proto.PublishTrackRequestH\x00\x12?\n\x0funpublish_track\x18\x06 \x01(\x0b\x32$.livekit.proto.UnpublishTrackRequestH\x00\x12\x39\n\x0cpublish_data\x18\x07 \x01(\x0b\x32!.livekit.proto.PublishDataRequestH\x00\x12=\n\x0eset_subscribed\x18\x08 \x01(\x0b\x32#.livekit.proto.SetSubscribedRequestH\x00\x12\x44\n\x12set_local_metadata\x18\t \x01(\x0b\x32&.livekit.proto.SetLocalMetadataRequestH\x00\x12<\n\x0eset_local_name\x18\n \x01(\x0b\x32\".livekit.proto.SetLocalNameRequestH\x00\x12H\n\x14set_local_attributes\x18\x0b \x01(\x0b\x32(.livekit.proto.SetLocalAttributesRequestH\x00\x12\x42\n\x11get_session_stats\x18\x0c \x01(\x0b\x32%.livekit.proto.GetSessionStatsRequestH\x00\x12K\n\x15publish_transcription\x18\r \x01(\x0b\x32*.livekit.proto.PublishTranscriptionRequestH\x00\x12@\n\x10publish_sip_dtmf\x18\x0e \x01(\x0b\x32$.livekit.proto.PublishSipDtmfRequestH\x00\x12\x44\n\x12\x63reate_video_track\x18\x0f \x01(\x0b\x32&.livekit.proto.CreateVideoTrackRequestH\x00\x12\x44\n\x12\x63reate_audio_track\x18\x10 \x01(\x0b\x32&.livekit.proto.CreateAudioTrackRequestH\x00\x12@\n\x10local_track_mute\x18\x11 \x01(\x0b\x32$.livekit.proto.LocalTrackMuteRequestH\x00\x12\x46\n\x13\x65nable_remote_track\x18\x12 \x01(\x0b\x32\'.livekit.proto.EnableRemoteTrackRequestH\x00\x12\x33\n\tget_stats\x18\x13 \x01(\x0b\x32\x1e.livekit.proto.GetStatsRequestH\x00\x12@\n\x10new_video_stream\x18\x14 \x01(\x0b\x32$.livekit.proto.NewVideoStreamRequestH\x00\x12@\n\x10new_video_source\x18\x15 \x01(\x0b\x32$.livekit.proto.NewVideoSourceRequestH\x00\x12\x46\n\x13\x63\x61pture_video_frame\x18\x16 \x01(\x0b\x32\'.livekit.proto.CaptureVideoFrameRequestH\x00\x12;\n\rvideo_convert\x18\x17 \x01(\x0b\x32\".livekit.proto.VideoConvertRequestH\x00\x12Y\n\x1dvideo_stream_from_participant\x18\x18 \x01(\x0b\x32\x30.livekit.proto.VideoStreamFromParticipantRequestH\x00\x12@\n\x10new_audio_stream\x18\x19 \x01(\x0b\x32$.livekit.proto.NewAudioStreamRequestH\x00\x12@\n\x10new_audio_source\x18\x1a \x01(\x0b\x32$.livekit.proto.NewAudioSourceRequestH\x00\x12\x46\n\x13\x63\x61pture_audio_frame\x18\x1b \x01(\x0b\x32\'.livekit.proto.CaptureAudioFrameRequestH\x00\x12\x44\n\x12\x63lear_audio_buffer\x18\x1c \x01(\x0b\x32&.livekit.proto.ClearAudioBufferRequestH\x00\x12\x46\n\x13new_audio_resampler\x18\x1d \x01(\x0b\x32\'.livekit.proto.NewAudioResamplerRequestH\x00\x12\x44\n\x12remix_and_resample\x18\x1e \x01(\x0b\x32&.livekit.proto.RemixAndResampleRequestH\x00\x12*\n\x04\x65\x32\x65\x65\x18\x1f \x01(\x0b\x32\x1a.livekit.proto.E2eeRequestH\x00\x12Y\n\x1d\x61udio_stream_from_participant\x18 \x01(\x0b\x32\x30.livekit.proto.AudioStreamFromParticipantRequestH\x00\x12\x42\n\x11new_sox_resampler\x18! \x01(\x0b\x32%.livekit.proto.NewSoxResamplerRequestH\x00\x12\x44\n\x12push_sox_resampler\x18\" \x01(\x0b\x32&.livekit.proto.PushSoxResamplerRequestH\x00\x12\x46\n\x13\x66lush_sox_resampler\x18# \x01(\x0b\x32\'.livekit.proto.FlushSoxResamplerRequestH\x00\x42\t\n\x07message\"\x97\x12\n\x0b\x46\x66iResponse\x12\x31\n\x07\x64ispose\x18\x02 \x01(\x0b\x32\x1e.livekit.proto.DisposeResponseH\x00\x12\x31\n\x07\x63onnect\x18\x03 \x01(\x0b\x32\x1e.livekit.proto.ConnectResponseH\x00\x12\x37\n\ndisconnect\x18\x04 \x01(\x0b\x32!.livekit.proto.DisconnectResponseH\x00\x12<\n\rpublish_track\x18\x05 \x01(\x0b\x32#.livekit.proto.PublishTrackResponseH\x00\x12@\n\x0funpublish_track\x18\x06 \x01(\x0b\x32%.livekit.proto.UnpublishTrackResponseH\x00\x12:\n\x0cpublish_data\x18\x07 \x01(\x0b\x32\".livekit.proto.PublishDataResponseH\x00\x12>\n\x0eset_subscribed\x18\x08 \x01(\x0b\x32$.livekit.proto.SetSubscribedResponseH\x00\x12\x45\n\x12set_local_metadata\x18\t \x01(\x0b\x32\'.livekit.proto.SetLocalMetadataResponseH\x00\x12=\n\x0eset_local_name\x18\n \x01(\x0b\x32#.livekit.proto.SetLocalNameResponseH\x00\x12I\n\x14set_local_attributes\x18\x0b \x01(\x0b\x32).livekit.proto.SetLocalAttributesResponseH\x00\x12\x43\n\x11get_session_stats\x18\x0c \x01(\x0b\x32&.livekit.proto.GetSessionStatsResponseH\x00\x12L\n\x15publish_transcription\x18\r \x01(\x0b\x32+.livekit.proto.PublishTranscriptionResponseH\x00\x12\x41\n\x10publish_sip_dtmf\x18\x0e \x01(\x0b\x32%.livekit.proto.PublishSipDtmfResponseH\x00\x12\x45\n\x12\x63reate_video_track\x18\x0f \x01(\x0b\x32\'.livekit.proto.CreateVideoTrackResponseH\x00\x12\x45\n\x12\x63reate_audio_track\x18\x10 \x01(\x0b\x32\'.livekit.proto.CreateAudioTrackResponseH\x00\x12\x41\n\x10local_track_mute\x18\x11 \x01(\x0b\x32%.livekit.proto.LocalTrackMuteResponseH\x00\x12G\n\x13\x65nable_remote_track\x18\x12 \x01(\x0b\x32(.livekit.proto.EnableRemoteTrackResponseH\x00\x12\x34\n\tget_stats\x18\x13 \x01(\x0b\x32\x1f.livekit.proto.GetStatsResponseH\x00\x12\x41\n\x10new_video_stream\x18\x14 \x01(\x0b\x32%.livekit.proto.NewVideoStreamResponseH\x00\x12\x41\n\x10new_video_source\x18\x15 \x01(\x0b\x32%.livekit.proto.NewVideoSourceResponseH\x00\x12G\n\x13\x63\x61pture_video_frame\x18\x16 \x01(\x0b\x32(.livekit.proto.CaptureVideoFrameResponseH\x00\x12<\n\rvideo_convert\x18\x17 \x01(\x0b\x32#.livekit.proto.VideoConvertResponseH\x00\x12Z\n\x1dvideo_stream_from_participant\x18\x18 \x01(\x0b\x32\x31.livekit.proto.VideoStreamFromParticipantResponseH\x00\x12\x41\n\x10new_audio_stream\x18\x19 \x01(\x0b\x32%.livekit.proto.NewAudioStreamResponseH\x00\x12\x41\n\x10new_audio_source\x18\x1a \x01(\x0b\x32%.livekit.proto.NewAudioSourceResponseH\x00\x12G\n\x13\x63\x61pture_audio_frame\x18\x1b \x01(\x0b\x32(.livekit.proto.CaptureAudioFrameResponseH\x00\x12\x45\n\x12\x63lear_audio_buffer\x18\x1c \x01(\x0b\x32\'.livekit.proto.ClearAudioBufferResponseH\x00\x12G\n\x13new_audio_resampler\x18\x1d \x01(\x0b\x32(.livekit.proto.NewAudioResamplerResponseH\x00\x12\x45\n\x12remix_and_resample\x18\x1e \x01(\x0b\x32\'.livekit.proto.RemixAndResampleResponseH\x00\x12Z\n\x1d\x61udio_stream_from_participant\x18\x1f \x01(\x0b\x32\x31.livekit.proto.AudioStreamFromParticipantResponseH\x00\x12+\n\x04\x65\x32\x65\x65\x18 \x01(\x0b\x32\x1b.livekit.proto.E2eeResponseH\x00\x12\x43\n\x11new_sox_resampler\x18! \x01(\x0b\x32&.livekit.proto.NewSoxResamplerResponseH\x00\x12\x45\n\x12push_sox_resampler\x18\" \x01(\x0b\x32\'.livekit.proto.PushSoxResamplerResponseH\x00\x12G\n\x13\x66lush_sox_resampler\x18# \x01(\x0b\x32(.livekit.proto.FlushSoxResamplerResponseH\x00\x42\t\n\x07message\"\xc6\t\n\x08\x46\x66iEvent\x12.\n\nroom_event\x18\x01 \x01(\x0b\x32\x18.livekit.proto.RoomEventH\x00\x12\x30\n\x0btrack_event\x18\x02 \x01(\x0b\x32\x19.livekit.proto.TrackEventH\x00\x12=\n\x12video_stream_event\x18\x03 \x01(\x0b\x32\x1f.livekit.proto.VideoStreamEventH\x00\x12=\n\x12\x61udio_stream_event\x18\x04 \x01(\x0b\x32\x1f.livekit.proto.AudioStreamEventH\x00\x12\x31\n\x07\x63onnect\x18\x05 \x01(\x0b\x32\x1e.livekit.proto.ConnectCallbackH\x00\x12\x37\n\ndisconnect\x18\x07 \x01(\x0b\x32!.livekit.proto.DisconnectCallbackH\x00\x12\x31\n\x07\x64ispose\x18\x08 \x01(\x0b\x32\x1e.livekit.proto.DisposeCallbackH\x00\x12<\n\rpublish_track\x18\t \x01(\x0b\x32#.livekit.proto.PublishTrackCallbackH\x00\x12@\n\x0funpublish_track\x18\n \x01(\x0b\x32%.livekit.proto.UnpublishTrackCallbackH\x00\x12:\n\x0cpublish_data\x18\x0b \x01(\x0b\x32\".livekit.proto.PublishDataCallbackH\x00\x12L\n\x15publish_transcription\x18\x0c \x01(\x0b\x32+.livekit.proto.PublishTranscriptionCallbackH\x00\x12G\n\x13\x63\x61pture_audio_frame\x18\r \x01(\x0b\x32(.livekit.proto.CaptureAudioFrameCallbackH\x00\x12\x45\n\x12set_local_metadata\x18\x0e \x01(\x0b\x32\'.livekit.proto.SetLocalMetadataCallbackH\x00\x12=\n\x0eset_local_name\x18\x0f \x01(\x0b\x32#.livekit.proto.SetLocalNameCallbackH\x00\x12I\n\x14set_local_attributes\x18\x10 \x01(\x0b\x32).livekit.proto.SetLocalAttributesCallbackH\x00\x12\x34\n\tget_stats\x18\x11 \x01(\x0b\x32\x1f.livekit.proto.GetStatsCallbackH\x00\x12\'\n\x04logs\x18\x12 \x01(\x0b\x32\x17.livekit.proto.LogBatchH\x00\x12\x43\n\x11get_session_stats\x18\x13 \x01(\x0b\x32&.livekit.proto.GetSessionStatsCallbackH\x00\x12%\n\x05panic\x18\x14 \x01(\x0b\x32\x14.livekit.proto.PanicH\x00\x12\x41\n\x10publish_sip_dtmf\x18\x15 \x01(\x0b\x32%.livekit.proto.PublishSipDtmfCallbackH\x00\x42\t\n\x07message\"\x1f\n\x0e\x44isposeRequest\x12\r\n\x05\x61sync\x18\x01 \x01(\x08\"5\n\x0f\x44isposeResponse\x12\x15\n\x08\x61sync_id\x18\x01 \x01(\x04H\x00\x88\x01\x01\x42\x0b\n\t_async_id\"#\n\x0f\x44isposeCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"\xb6\x01\n\tLogRecord\x12&\n\x05level\x18\x01 \x01(\x0e\x32\x17.livekit.proto.LogLevel\x12\x0e\n\x06target\x18\x02 \x01(\t\x12\x18\n\x0bmodule_path\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04\x66ile\x18\x04 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04line\x18\x05 \x01(\rH\x02\x88\x01\x01\x12\x0f\n\x07message\x18\x06 \x01(\tB\x0e\n\x0c_module_pathB\x07\n\x05_fileB\x07\n\x05_line\"5\n\x08LogBatch\x12)\n\x07records\x18\x01 \x03(\x0b\x32\x18.livekit.proto.LogRecord\"\x18\n\x05Panic\x12\x0f\n\x07message\x18\x01 \x01(\t*S\n\x08LogLevel\x12\r\n\tLOG_ERROR\x10\x00\x12\x0c\n\x08LOG_WARN\x10\x01\x12\x0c\n\x08LOG_INFO\x10\x02\x12\r\n\tLOG_DEBUG\x10\x03\x12\r\n\tLOG_TRACE\x10\x04\x42\x10\xaa\x02\rLiveKit.Protob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tffi.proto\x12\rlivekit.proto\x1a\ne2ee.proto\x1a\x0btrack.proto\x1a\nroom.proto\x1a\x11video_frame.proto\x1a\x11\x61udio_frame.proto\x1a\trpc.proto\"\x9e\x14\n\nFfiRequest\x12\x30\n\x07\x64ispose\x18\x02 \x01(\x0b\x32\x1d.livekit.proto.DisposeRequestH\x00\x12\x30\n\x07\x63onnect\x18\x03 \x01(\x0b\x32\x1d.livekit.proto.ConnectRequestH\x00\x12\x36\n\ndisconnect\x18\x04 \x01(\x0b\x32 .livekit.proto.DisconnectRequestH\x00\x12;\n\rpublish_track\x18\x05 \x01(\x0b\x32\".livekit.proto.PublishTrackRequestH\x00\x12?\n\x0funpublish_track\x18\x06 \x01(\x0b\x32$.livekit.proto.UnpublishTrackRequestH\x00\x12\x39\n\x0cpublish_data\x18\x07 \x01(\x0b\x32!.livekit.proto.PublishDataRequestH\x00\x12=\n\x0eset_subscribed\x18\x08 \x01(\x0b\x32#.livekit.proto.SetSubscribedRequestH\x00\x12\x44\n\x12set_local_metadata\x18\t \x01(\x0b\x32&.livekit.proto.SetLocalMetadataRequestH\x00\x12<\n\x0eset_local_name\x18\n \x01(\x0b\x32\".livekit.proto.SetLocalNameRequestH\x00\x12H\n\x14set_local_attributes\x18\x0b \x01(\x0b\x32(.livekit.proto.SetLocalAttributesRequestH\x00\x12\x42\n\x11get_session_stats\x18\x0c \x01(\x0b\x32%.livekit.proto.GetSessionStatsRequestH\x00\x12K\n\x15publish_transcription\x18\r \x01(\x0b\x32*.livekit.proto.PublishTranscriptionRequestH\x00\x12@\n\x10publish_sip_dtmf\x18\x0e \x01(\x0b\x32$.livekit.proto.PublishSipDtmfRequestH\x00\x12\x44\n\x12\x63reate_video_track\x18\x0f \x01(\x0b\x32&.livekit.proto.CreateVideoTrackRequestH\x00\x12\x44\n\x12\x63reate_audio_track\x18\x10 \x01(\x0b\x32&.livekit.proto.CreateAudioTrackRequestH\x00\x12@\n\x10local_track_mute\x18\x11 \x01(\x0b\x32$.livekit.proto.LocalTrackMuteRequestH\x00\x12\x46\n\x13\x65nable_remote_track\x18\x12 \x01(\x0b\x32\'.livekit.proto.EnableRemoteTrackRequestH\x00\x12\x33\n\tget_stats\x18\x13 \x01(\x0b\x32\x1e.livekit.proto.GetStatsRequestH\x00\x12@\n\x10new_video_stream\x18\x14 \x01(\x0b\x32$.livekit.proto.NewVideoStreamRequestH\x00\x12@\n\x10new_video_source\x18\x15 \x01(\x0b\x32$.livekit.proto.NewVideoSourceRequestH\x00\x12\x46\n\x13\x63\x61pture_video_frame\x18\x16 \x01(\x0b\x32\'.livekit.proto.CaptureVideoFrameRequestH\x00\x12;\n\rvideo_convert\x18\x17 \x01(\x0b\x32\".livekit.proto.VideoConvertRequestH\x00\x12Y\n\x1dvideo_stream_from_participant\x18\x18 \x01(\x0b\x32\x30.livekit.proto.VideoStreamFromParticipantRequestH\x00\x12@\n\x10new_audio_stream\x18\x19 \x01(\x0b\x32$.livekit.proto.NewAudioStreamRequestH\x00\x12@\n\x10new_audio_source\x18\x1a \x01(\x0b\x32$.livekit.proto.NewAudioSourceRequestH\x00\x12\x46\n\x13\x63\x61pture_audio_frame\x18\x1b \x01(\x0b\x32\'.livekit.proto.CaptureAudioFrameRequestH\x00\x12\x44\n\x12\x63lear_audio_buffer\x18\x1c \x01(\x0b\x32&.livekit.proto.ClearAudioBufferRequestH\x00\x12\x46\n\x13new_audio_resampler\x18\x1d \x01(\x0b\x32\'.livekit.proto.NewAudioResamplerRequestH\x00\x12\x44\n\x12remix_and_resample\x18\x1e \x01(\x0b\x32&.livekit.proto.RemixAndResampleRequestH\x00\x12*\n\x04\x65\x32\x65\x65\x18\x1f \x01(\x0b\x32\x1a.livekit.proto.E2eeRequestH\x00\x12Y\n\x1d\x61udio_stream_from_participant\x18 \x01(\x0b\x32\x30.livekit.proto.AudioStreamFromParticipantRequestH\x00\x12\x42\n\x11new_sox_resampler\x18! \x01(\x0b\x32%.livekit.proto.NewSoxResamplerRequestH\x00\x12\x44\n\x12push_sox_resampler\x18\" \x01(\x0b\x32&.livekit.proto.PushSoxResamplerRequestH\x00\x12\x46\n\x13\x66lush_sox_resampler\x18# \x01(\x0b\x32\'.livekit.proto.FlushSoxResamplerRequestH\x00\x12\x37\n\x0bperform_rpc\x18$ \x01(\x0b\x32 .livekit.proto.PerformRpcRequestH\x00\x12\x46\n\x13register_rpc_method\x18% \x01(\x0b\x32\'.livekit.proto.RegisterRpcMethodRequestH\x00\x12J\n\x15unregister_rpc_method\x18& \x01(\x0b\x32).livekit.proto.UnregisterRpcMethodRequestH\x00\x12[\n\x1erpc_method_invocation_response\x18\' \x01(\x0b\x32\x31.livekit.proto.RpcMethodInvocationResponseRequestH\x00\x42\t\n\x07message\"\xc5\x14\n\x0b\x46\x66iResponse\x12\x31\n\x07\x64ispose\x18\x02 \x01(\x0b\x32\x1e.livekit.proto.DisposeResponseH\x00\x12\x31\n\x07\x63onnect\x18\x03 \x01(\x0b\x32\x1e.livekit.proto.ConnectResponseH\x00\x12\x37\n\ndisconnect\x18\x04 \x01(\x0b\x32!.livekit.proto.DisconnectResponseH\x00\x12<\n\rpublish_track\x18\x05 \x01(\x0b\x32#.livekit.proto.PublishTrackResponseH\x00\x12@\n\x0funpublish_track\x18\x06 \x01(\x0b\x32%.livekit.proto.UnpublishTrackResponseH\x00\x12:\n\x0cpublish_data\x18\x07 \x01(\x0b\x32\".livekit.proto.PublishDataResponseH\x00\x12>\n\x0eset_subscribed\x18\x08 \x01(\x0b\x32$.livekit.proto.SetSubscribedResponseH\x00\x12\x45\n\x12set_local_metadata\x18\t \x01(\x0b\x32\'.livekit.proto.SetLocalMetadataResponseH\x00\x12=\n\x0eset_local_name\x18\n \x01(\x0b\x32#.livekit.proto.SetLocalNameResponseH\x00\x12I\n\x14set_local_attributes\x18\x0b \x01(\x0b\x32).livekit.proto.SetLocalAttributesResponseH\x00\x12\x43\n\x11get_session_stats\x18\x0c \x01(\x0b\x32&.livekit.proto.GetSessionStatsResponseH\x00\x12L\n\x15publish_transcription\x18\r \x01(\x0b\x32+.livekit.proto.PublishTranscriptionResponseH\x00\x12\x41\n\x10publish_sip_dtmf\x18\x0e \x01(\x0b\x32%.livekit.proto.PublishSipDtmfResponseH\x00\x12\x45\n\x12\x63reate_video_track\x18\x0f \x01(\x0b\x32\'.livekit.proto.CreateVideoTrackResponseH\x00\x12\x45\n\x12\x63reate_audio_track\x18\x10 \x01(\x0b\x32\'.livekit.proto.CreateAudioTrackResponseH\x00\x12\x41\n\x10local_track_mute\x18\x11 \x01(\x0b\x32%.livekit.proto.LocalTrackMuteResponseH\x00\x12G\n\x13\x65nable_remote_track\x18\x12 \x01(\x0b\x32(.livekit.proto.EnableRemoteTrackResponseH\x00\x12\x34\n\tget_stats\x18\x13 \x01(\x0b\x32\x1f.livekit.proto.GetStatsResponseH\x00\x12\x41\n\x10new_video_stream\x18\x14 \x01(\x0b\x32%.livekit.proto.NewVideoStreamResponseH\x00\x12\x41\n\x10new_video_source\x18\x15 \x01(\x0b\x32%.livekit.proto.NewVideoSourceResponseH\x00\x12G\n\x13\x63\x61pture_video_frame\x18\x16 \x01(\x0b\x32(.livekit.proto.CaptureVideoFrameResponseH\x00\x12<\n\rvideo_convert\x18\x17 \x01(\x0b\x32#.livekit.proto.VideoConvertResponseH\x00\x12Z\n\x1dvideo_stream_from_participant\x18\x18 \x01(\x0b\x32\x31.livekit.proto.VideoStreamFromParticipantResponseH\x00\x12\x41\n\x10new_audio_stream\x18\x19 \x01(\x0b\x32%.livekit.proto.NewAudioStreamResponseH\x00\x12\x41\n\x10new_audio_source\x18\x1a \x01(\x0b\x32%.livekit.proto.NewAudioSourceResponseH\x00\x12G\n\x13\x63\x61pture_audio_frame\x18\x1b \x01(\x0b\x32(.livekit.proto.CaptureAudioFrameResponseH\x00\x12\x45\n\x12\x63lear_audio_buffer\x18\x1c \x01(\x0b\x32\'.livekit.proto.ClearAudioBufferResponseH\x00\x12G\n\x13new_audio_resampler\x18\x1d \x01(\x0b\x32(.livekit.proto.NewAudioResamplerResponseH\x00\x12\x45\n\x12remix_and_resample\x18\x1e \x01(\x0b\x32\'.livekit.proto.RemixAndResampleResponseH\x00\x12Z\n\x1d\x61udio_stream_from_participant\x18\x1f \x01(\x0b\x32\x31.livekit.proto.AudioStreamFromParticipantResponseH\x00\x12+\n\x04\x65\x32\x65\x65\x18 \x01(\x0b\x32\x1b.livekit.proto.E2eeResponseH\x00\x12\x43\n\x11new_sox_resampler\x18! \x01(\x0b\x32&.livekit.proto.NewSoxResamplerResponseH\x00\x12\x45\n\x12push_sox_resampler\x18\" \x01(\x0b\x32\'.livekit.proto.PushSoxResamplerResponseH\x00\x12G\n\x13\x66lush_sox_resampler\x18# \x01(\x0b\x32(.livekit.proto.FlushSoxResamplerResponseH\x00\x12\x38\n\x0bperform_rpc\x18$ \x01(\x0b\x32!.livekit.proto.PerformRpcResponseH\x00\x12G\n\x13register_rpc_method\x18% \x01(\x0b\x32(.livekit.proto.RegisterRpcMethodResponseH\x00\x12K\n\x15unregister_rpc_method\x18& \x01(\x0b\x32*.livekit.proto.UnregisterRpcMethodResponseH\x00\x12\\\n\x1erpc_method_invocation_response\x18\' \x01(\x0b\x32\x32.livekit.proto.RpcMethodInvocationResponseResponseH\x00\x42\t\n\x07message\"\xbe\x0c\n\x08\x46\x66iEvent\x12.\n\nroom_event\x18\x01 \x01(\x0b\x32\x18.livekit.proto.RoomEventH\x00\x12\x30\n\x0btrack_event\x18\x02 \x01(\x0b\x32\x19.livekit.proto.TrackEventH\x00\x12=\n\x12video_stream_event\x18\x03 \x01(\x0b\x32\x1f.livekit.proto.VideoStreamEventH\x00\x12=\n\x12\x61udio_stream_event\x18\x04 \x01(\x0b\x32\x1f.livekit.proto.AudioStreamEventH\x00\x12\x31\n\x07\x63onnect\x18\x05 \x01(\x0b\x32\x1e.livekit.proto.ConnectCallbackH\x00\x12\x37\n\ndisconnect\x18\x07 \x01(\x0b\x32!.livekit.proto.DisconnectCallbackH\x00\x12\x31\n\x07\x64ispose\x18\x08 \x01(\x0b\x32\x1e.livekit.proto.DisposeCallbackH\x00\x12<\n\rpublish_track\x18\t \x01(\x0b\x32#.livekit.proto.PublishTrackCallbackH\x00\x12@\n\x0funpublish_track\x18\n \x01(\x0b\x32%.livekit.proto.UnpublishTrackCallbackH\x00\x12:\n\x0cpublish_data\x18\x0b \x01(\x0b\x32\".livekit.proto.PublishDataCallbackH\x00\x12L\n\x15publish_transcription\x18\x0c \x01(\x0b\x32+.livekit.proto.PublishTranscriptionCallbackH\x00\x12G\n\x13\x63\x61pture_audio_frame\x18\r \x01(\x0b\x32(.livekit.proto.CaptureAudioFrameCallbackH\x00\x12\x45\n\x12set_local_metadata\x18\x0e \x01(\x0b\x32\'.livekit.proto.SetLocalMetadataCallbackH\x00\x12=\n\x0eset_local_name\x18\x0f \x01(\x0b\x32#.livekit.proto.SetLocalNameCallbackH\x00\x12I\n\x14set_local_attributes\x18\x10 \x01(\x0b\x32).livekit.proto.SetLocalAttributesCallbackH\x00\x12\x34\n\tget_stats\x18\x11 \x01(\x0b\x32\x1f.livekit.proto.GetStatsCallbackH\x00\x12\'\n\x04logs\x18\x12 \x01(\x0b\x32\x17.livekit.proto.LogBatchH\x00\x12\x43\n\x11get_session_stats\x18\x13 \x01(\x0b\x32&.livekit.proto.GetSessionStatsCallbackH\x00\x12%\n\x05panic\x18\x14 \x01(\x0b\x32\x14.livekit.proto.PanicH\x00\x12\x41\n\x10publish_sip_dtmf\x18\x15 \x01(\x0b\x32%.livekit.proto.PublishSipDtmfCallbackH\x00\x12\x38\n\x0bperform_rpc\x18\x16 \x01(\x0b\x32!.livekit.proto.PerformRpcCallbackH\x00\x12G\n\x13register_rpc_method\x18\x17 \x01(\x0b\x32(.livekit.proto.RegisterRpcMethodCallbackH\x00\x12K\n\x15unregister_rpc_method\x18\x18 \x01(\x0b\x32*.livekit.proto.UnregisterRpcMethodCallbackH\x00\x12H\n\x15rpc_method_invocation\x18\x19 \x01(\x0b\x32\'.livekit.proto.RpcMethodInvocationEventH\x00\x12\\\n\x1erpc_method_invocation_response\x18\x1a \x01(\x0b\x32\x32.livekit.proto.RpcMethodInvocationResponseCallbackH\x00\x42\t\n\x07message\"\x1f\n\x0e\x44isposeRequest\x12\r\n\x05\x61sync\x18\x01 \x01(\x08\"5\n\x0f\x44isposeResponse\x12\x15\n\x08\x61sync_id\x18\x01 \x01(\x04H\x00\x88\x01\x01\x42\x0b\n\t_async_id\"#\n\x0f\x44isposeCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"\xb6\x01\n\tLogRecord\x12&\n\x05level\x18\x01 \x01(\x0e\x32\x17.livekit.proto.LogLevel\x12\x0e\n\x06target\x18\x02 \x01(\t\x12\x18\n\x0bmodule_path\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04\x66ile\x18\x04 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04line\x18\x05 \x01(\rH\x02\x88\x01\x01\x12\x0f\n\x07message\x18\x06 \x01(\tB\x0e\n\x0c_module_pathB\x07\n\x05_fileB\x07\n\x05_line\"5\n\x08LogBatch\x12)\n\x07records\x18\x01 \x03(\x0b\x32\x18.livekit.proto.LogRecord\"\x18\n\x05Panic\x12\x0f\n\x07message\x18\x01 \x01(\t*S\n\x08LogLevel\x12\r\n\tLOG_ERROR\x10\x00\x12\x0c\n\x08LOG_WARN\x10\x01\x12\x0c\n\x08LOG_INFO\x10\x02\x12\r\n\tLOG_DEBUG\x10\x03\x12\r\n\tLOG_TRACE\x10\x04\x42\x10\xaa\x02\rLiveKit.Protob\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ffi_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' - _globals['_LOGLEVEL']._serialized_start=6344 - _globals['_LOGLEVEL']._serialized_end=6427 - _globals['_FFIREQUEST']._serialized_start=104 - _globals['_FFIREQUEST']._serialized_end=2396 - _globals['_FFIRESPONSE']._serialized_start=2399 - _globals['_FFIRESPONSE']._serialized_end=4726 - _globals['_FFIEVENT']._serialized_start=4729 - _globals['_FFIEVENT']._serialized_end=5951 - _globals['_DISPOSEREQUEST']._serialized_start=5953 - _globals['_DISPOSEREQUEST']._serialized_end=5984 - _globals['_DISPOSERESPONSE']._serialized_start=5986 - _globals['_DISPOSERESPONSE']._serialized_end=6039 - _globals['_DISPOSECALLBACK']._serialized_start=6041 - _globals['_DISPOSECALLBACK']._serialized_end=6076 - _globals['_LOGRECORD']._serialized_start=6079 - _globals['_LOGRECORD']._serialized_end=6261 - _globals['_LOGBATCH']._serialized_start=6263 - _globals['_LOGBATCH']._serialized_end=6316 - _globals['_PANIC']._serialized_start=6318 - _globals['_PANIC']._serialized_end=6342 + _globals['_LOGLEVEL']._serialized_start=7331 + _globals['_LOGLEVEL']._serialized_end=7414 + _globals['_FFIREQUEST']._serialized_start=115 + _globals['_FFIREQUEST']._serialized_end=2705 + _globals['_FFIRESPONSE']._serialized_start=2708 + _globals['_FFIRESPONSE']._serialized_end=5337 + _globals['_FFIEVENT']._serialized_start=5340 + _globals['_FFIEVENT']._serialized_end=6938 + _globals['_DISPOSEREQUEST']._serialized_start=6940 + _globals['_DISPOSEREQUEST']._serialized_end=6971 + _globals['_DISPOSERESPONSE']._serialized_start=6973 + _globals['_DISPOSERESPONSE']._serialized_end=7026 + _globals['_DISPOSECALLBACK']._serialized_start=7028 + _globals['_DISPOSECALLBACK']._serialized_end=7063 + _globals['_LOGRECORD']._serialized_start=7066 + _globals['_LOGRECORD']._serialized_end=7248 + _globals['_LOGBATCH']._serialized_start=7250 + _globals['_LOGBATCH']._serialized_end=7303 + _globals['_PANIC']._serialized_start=7305 + _globals['_PANIC']._serialized_end=7329 # @@protoc_insertion_point(module_scope) diff --git a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi index 958a02f1..8edd8de8 100644 --- a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi +++ b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi @@ -25,6 +25,7 @@ import google.protobuf.internal.containers import google.protobuf.internal.enum_type_wrapper import google.protobuf.message from . import room_pb2 +import rpc_pb2 import sys from . import track_pb2 import typing @@ -126,6 +127,10 @@ class FfiRequest(google.protobuf.message.Message): NEW_SOX_RESAMPLER_FIELD_NUMBER: builtins.int PUSH_SOX_RESAMPLER_FIELD_NUMBER: builtins.int FLUSH_SOX_RESAMPLER_FIELD_NUMBER: builtins.int + PERFORM_RPC_FIELD_NUMBER: builtins.int + REGISTER_RPC_METHOD_FIELD_NUMBER: builtins.int + UNREGISTER_RPC_METHOD_FIELD_NUMBER: builtins.int + RPC_METHOD_INVOCATION_RESPONSE_FIELD_NUMBER: builtins.int @property def dispose(self) -> global___DisposeRequest: ... @property @@ -202,6 +207,16 @@ class FfiRequest(google.protobuf.message.Message): def push_sox_resampler(self) -> audio_frame_pb2.PushSoxResamplerRequest: ... @property def flush_sox_resampler(self) -> audio_frame_pb2.FlushSoxResamplerRequest: ... + @property + def perform_rpc(self) -> rpc_pb2.PerformRpcRequest: + """RPC""" + + @property + def register_rpc_method(self) -> rpc_pb2.RegisterRpcMethodRequest: ... + @property + def unregister_rpc_method(self) -> rpc_pb2.UnregisterRpcMethodRequest: ... + @property + def rpc_method_invocation_response(self) -> rpc_pb2.RpcMethodInvocationResponseRequest: ... def __init__( self, *, @@ -239,10 +254,14 @@ class FfiRequest(google.protobuf.message.Message): new_sox_resampler: audio_frame_pb2.NewSoxResamplerRequest | None = ..., push_sox_resampler: audio_frame_pb2.PushSoxResamplerRequest | None = ..., flush_sox_resampler: audio_frame_pb2.FlushSoxResamplerRequest | None = ..., + perform_rpc: rpc_pb2.PerformRpcRequest | None = ..., + register_rpc_method: rpc_pb2.RegisterRpcMethodRequest | None = ..., + unregister_rpc_method: rpc_pb2.UnregisterRpcMethodRequest | None = ..., + rpc_method_invocation_response: rpc_pb2.RpcMethodInvocationResponseRequest | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["audio_stream_from_participant", b"audio_stream_from_participant", "capture_audio_frame", b"capture_audio_frame", "capture_video_frame", b"capture_video_frame", "clear_audio_buffer", b"clear_audio_buffer", "connect", b"connect", "create_audio_track", b"create_audio_track", "create_video_track", b"create_video_track", "disconnect", b"disconnect", "dispose", b"dispose", "e2ee", b"e2ee", "enable_remote_track", b"enable_remote_track", "flush_sox_resampler", b"flush_sox_resampler", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "local_track_mute", b"local_track_mute", "message", b"message", "new_audio_resampler", b"new_audio_resampler", "new_audio_source", b"new_audio_source", "new_audio_stream", b"new_audio_stream", "new_sox_resampler", b"new_sox_resampler", "new_video_source", b"new_video_source", "new_video_stream", b"new_video_stream", "publish_data", b"publish_data", "publish_sip_dtmf", b"publish_sip_dtmf", "publish_track", b"publish_track", "publish_transcription", b"publish_transcription", "push_sox_resampler", b"push_sox_resampler", "remix_and_resample", b"remix_and_resample", "set_local_attributes", b"set_local_attributes", "set_local_metadata", b"set_local_metadata", "set_local_name", b"set_local_name", "set_subscribed", b"set_subscribed", "unpublish_track", b"unpublish_track", "video_convert", b"video_convert", "video_stream_from_participant", b"video_stream_from_participant"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["audio_stream_from_participant", b"audio_stream_from_participant", "capture_audio_frame", b"capture_audio_frame", "capture_video_frame", b"capture_video_frame", "clear_audio_buffer", b"clear_audio_buffer", "connect", b"connect", "create_audio_track", b"create_audio_track", "create_video_track", b"create_video_track", "disconnect", b"disconnect", "dispose", b"dispose", "e2ee", b"e2ee", "enable_remote_track", b"enable_remote_track", "flush_sox_resampler", b"flush_sox_resampler", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "local_track_mute", b"local_track_mute", "message", b"message", "new_audio_resampler", b"new_audio_resampler", "new_audio_source", b"new_audio_source", "new_audio_stream", b"new_audio_stream", "new_sox_resampler", b"new_sox_resampler", "new_video_source", b"new_video_source", "new_video_stream", b"new_video_stream", "publish_data", b"publish_data", "publish_sip_dtmf", b"publish_sip_dtmf", "publish_track", b"publish_track", "publish_transcription", b"publish_transcription", "push_sox_resampler", b"push_sox_resampler", "remix_and_resample", b"remix_and_resample", "set_local_attributes", b"set_local_attributes", "set_local_metadata", b"set_local_metadata", "set_local_name", b"set_local_name", "set_subscribed", b"set_subscribed", "unpublish_track", b"unpublish_track", "video_convert", b"video_convert", "video_stream_from_participant", b"video_stream_from_participant"]) -> None: ... - def WhichOneof(self, oneof_group: typing.Literal["message", b"message"]) -> typing.Literal["dispose", "connect", "disconnect", "publish_track", "unpublish_track", "publish_data", "set_subscribed", "set_local_metadata", "set_local_name", "set_local_attributes", "get_session_stats", "publish_transcription", "publish_sip_dtmf", "create_video_track", "create_audio_track", "local_track_mute", "enable_remote_track", "get_stats", "new_video_stream", "new_video_source", "capture_video_frame", "video_convert", "video_stream_from_participant", "new_audio_stream", "new_audio_source", "capture_audio_frame", "clear_audio_buffer", "new_audio_resampler", "remix_and_resample", "e2ee", "audio_stream_from_participant", "new_sox_resampler", "push_sox_resampler", "flush_sox_resampler"] | None: ... + def HasField(self, field_name: typing.Literal["audio_stream_from_participant", b"audio_stream_from_participant", "capture_audio_frame", b"capture_audio_frame", "capture_video_frame", b"capture_video_frame", "clear_audio_buffer", b"clear_audio_buffer", "connect", b"connect", "create_audio_track", b"create_audio_track", "create_video_track", b"create_video_track", "disconnect", b"disconnect", "dispose", b"dispose", "e2ee", b"e2ee", "enable_remote_track", b"enable_remote_track", "flush_sox_resampler", b"flush_sox_resampler", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "local_track_mute", b"local_track_mute", "message", b"message", "new_audio_resampler", b"new_audio_resampler", "new_audio_source", b"new_audio_source", "new_audio_stream", b"new_audio_stream", "new_sox_resampler", b"new_sox_resampler", "new_video_source", b"new_video_source", "new_video_stream", b"new_video_stream", "perform_rpc", b"perform_rpc", "publish_data", b"publish_data", "publish_sip_dtmf", b"publish_sip_dtmf", "publish_track", b"publish_track", "publish_transcription", b"publish_transcription", "push_sox_resampler", b"push_sox_resampler", "register_rpc_method", b"register_rpc_method", "remix_and_resample", b"remix_and_resample", "rpc_method_invocation_response", b"rpc_method_invocation_response", "set_local_attributes", b"set_local_attributes", "set_local_metadata", b"set_local_metadata", "set_local_name", b"set_local_name", "set_subscribed", b"set_subscribed", "unpublish_track", b"unpublish_track", "unregister_rpc_method", b"unregister_rpc_method", "video_convert", b"video_convert", "video_stream_from_participant", b"video_stream_from_participant"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["audio_stream_from_participant", b"audio_stream_from_participant", "capture_audio_frame", b"capture_audio_frame", "capture_video_frame", b"capture_video_frame", "clear_audio_buffer", b"clear_audio_buffer", "connect", b"connect", "create_audio_track", b"create_audio_track", "create_video_track", b"create_video_track", "disconnect", b"disconnect", "dispose", b"dispose", "e2ee", b"e2ee", "enable_remote_track", b"enable_remote_track", "flush_sox_resampler", b"flush_sox_resampler", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "local_track_mute", b"local_track_mute", "message", b"message", "new_audio_resampler", b"new_audio_resampler", "new_audio_source", b"new_audio_source", "new_audio_stream", b"new_audio_stream", "new_sox_resampler", b"new_sox_resampler", "new_video_source", b"new_video_source", "new_video_stream", b"new_video_stream", "perform_rpc", b"perform_rpc", "publish_data", b"publish_data", "publish_sip_dtmf", b"publish_sip_dtmf", "publish_track", b"publish_track", "publish_transcription", b"publish_transcription", "push_sox_resampler", b"push_sox_resampler", "register_rpc_method", b"register_rpc_method", "remix_and_resample", b"remix_and_resample", "rpc_method_invocation_response", b"rpc_method_invocation_response", "set_local_attributes", b"set_local_attributes", "set_local_metadata", b"set_local_metadata", "set_local_name", b"set_local_name", "set_subscribed", b"set_subscribed", "unpublish_track", b"unpublish_track", "unregister_rpc_method", b"unregister_rpc_method", "video_convert", b"video_convert", "video_stream_from_participant", b"video_stream_from_participant"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["message", b"message"]) -> typing.Literal["dispose", "connect", "disconnect", "publish_track", "unpublish_track", "publish_data", "set_subscribed", "set_local_metadata", "set_local_name", "set_local_attributes", "get_session_stats", "publish_transcription", "publish_sip_dtmf", "create_video_track", "create_audio_track", "local_track_mute", "enable_remote_track", "get_stats", "new_video_stream", "new_video_source", "capture_video_frame", "video_convert", "video_stream_from_participant", "new_audio_stream", "new_audio_source", "capture_audio_frame", "clear_audio_buffer", "new_audio_resampler", "remix_and_resample", "e2ee", "audio_stream_from_participant", "new_sox_resampler", "push_sox_resampler", "flush_sox_resampler", "perform_rpc", "register_rpc_method", "unregister_rpc_method", "rpc_method_invocation_response"] | None: ... global___FfiRequest = FfiRequest @@ -286,6 +305,10 @@ class FfiResponse(google.protobuf.message.Message): NEW_SOX_RESAMPLER_FIELD_NUMBER: builtins.int PUSH_SOX_RESAMPLER_FIELD_NUMBER: builtins.int FLUSH_SOX_RESAMPLER_FIELD_NUMBER: builtins.int + PERFORM_RPC_FIELD_NUMBER: builtins.int + REGISTER_RPC_METHOD_FIELD_NUMBER: builtins.int + UNREGISTER_RPC_METHOD_FIELD_NUMBER: builtins.int + RPC_METHOD_INVOCATION_RESPONSE_FIELD_NUMBER: builtins.int @property def dispose(self) -> global___DisposeResponse: ... @property @@ -362,6 +385,16 @@ class FfiResponse(google.protobuf.message.Message): def push_sox_resampler(self) -> audio_frame_pb2.PushSoxResamplerResponse: ... @property def flush_sox_resampler(self) -> audio_frame_pb2.FlushSoxResamplerResponse: ... + @property + def perform_rpc(self) -> rpc_pb2.PerformRpcResponse: + """RPC""" + + @property + def register_rpc_method(self) -> rpc_pb2.RegisterRpcMethodResponse: ... + @property + def unregister_rpc_method(self) -> rpc_pb2.UnregisterRpcMethodResponse: ... + @property + def rpc_method_invocation_response(self) -> rpc_pb2.RpcMethodInvocationResponseResponse: ... def __init__( self, *, @@ -399,10 +432,14 @@ class FfiResponse(google.protobuf.message.Message): new_sox_resampler: audio_frame_pb2.NewSoxResamplerResponse | None = ..., push_sox_resampler: audio_frame_pb2.PushSoxResamplerResponse | None = ..., flush_sox_resampler: audio_frame_pb2.FlushSoxResamplerResponse | None = ..., + perform_rpc: rpc_pb2.PerformRpcResponse | None = ..., + register_rpc_method: rpc_pb2.RegisterRpcMethodResponse | None = ..., + unregister_rpc_method: rpc_pb2.UnregisterRpcMethodResponse | None = ..., + rpc_method_invocation_response: rpc_pb2.RpcMethodInvocationResponseResponse | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["audio_stream_from_participant", b"audio_stream_from_participant", "capture_audio_frame", b"capture_audio_frame", "capture_video_frame", b"capture_video_frame", "clear_audio_buffer", b"clear_audio_buffer", "connect", b"connect", "create_audio_track", b"create_audio_track", "create_video_track", b"create_video_track", "disconnect", b"disconnect", "dispose", b"dispose", "e2ee", b"e2ee", "enable_remote_track", b"enable_remote_track", "flush_sox_resampler", b"flush_sox_resampler", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "local_track_mute", b"local_track_mute", "message", b"message", "new_audio_resampler", b"new_audio_resampler", "new_audio_source", b"new_audio_source", "new_audio_stream", b"new_audio_stream", "new_sox_resampler", b"new_sox_resampler", "new_video_source", b"new_video_source", "new_video_stream", b"new_video_stream", "publish_data", b"publish_data", "publish_sip_dtmf", b"publish_sip_dtmf", "publish_track", b"publish_track", "publish_transcription", b"publish_transcription", "push_sox_resampler", b"push_sox_resampler", "remix_and_resample", b"remix_and_resample", "set_local_attributes", b"set_local_attributes", "set_local_metadata", b"set_local_metadata", "set_local_name", b"set_local_name", "set_subscribed", b"set_subscribed", "unpublish_track", b"unpublish_track", "video_convert", b"video_convert", "video_stream_from_participant", b"video_stream_from_participant"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["audio_stream_from_participant", b"audio_stream_from_participant", "capture_audio_frame", b"capture_audio_frame", "capture_video_frame", b"capture_video_frame", "clear_audio_buffer", b"clear_audio_buffer", "connect", b"connect", "create_audio_track", b"create_audio_track", "create_video_track", b"create_video_track", "disconnect", b"disconnect", "dispose", b"dispose", "e2ee", b"e2ee", "enable_remote_track", b"enable_remote_track", "flush_sox_resampler", b"flush_sox_resampler", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "local_track_mute", b"local_track_mute", "message", b"message", "new_audio_resampler", b"new_audio_resampler", "new_audio_source", b"new_audio_source", "new_audio_stream", b"new_audio_stream", "new_sox_resampler", b"new_sox_resampler", "new_video_source", b"new_video_source", "new_video_stream", b"new_video_stream", "publish_data", b"publish_data", "publish_sip_dtmf", b"publish_sip_dtmf", "publish_track", b"publish_track", "publish_transcription", b"publish_transcription", "push_sox_resampler", b"push_sox_resampler", "remix_and_resample", b"remix_and_resample", "set_local_attributes", b"set_local_attributes", "set_local_metadata", b"set_local_metadata", "set_local_name", b"set_local_name", "set_subscribed", b"set_subscribed", "unpublish_track", b"unpublish_track", "video_convert", b"video_convert", "video_stream_from_participant", b"video_stream_from_participant"]) -> None: ... - def WhichOneof(self, oneof_group: typing.Literal["message", b"message"]) -> typing.Literal["dispose", "connect", "disconnect", "publish_track", "unpublish_track", "publish_data", "set_subscribed", "set_local_metadata", "set_local_name", "set_local_attributes", "get_session_stats", "publish_transcription", "publish_sip_dtmf", "create_video_track", "create_audio_track", "local_track_mute", "enable_remote_track", "get_stats", "new_video_stream", "new_video_source", "capture_video_frame", "video_convert", "video_stream_from_participant", "new_audio_stream", "new_audio_source", "capture_audio_frame", "clear_audio_buffer", "new_audio_resampler", "remix_and_resample", "audio_stream_from_participant", "e2ee", "new_sox_resampler", "push_sox_resampler", "flush_sox_resampler"] | None: ... + def HasField(self, field_name: typing.Literal["audio_stream_from_participant", b"audio_stream_from_participant", "capture_audio_frame", b"capture_audio_frame", "capture_video_frame", b"capture_video_frame", "clear_audio_buffer", b"clear_audio_buffer", "connect", b"connect", "create_audio_track", b"create_audio_track", "create_video_track", b"create_video_track", "disconnect", b"disconnect", "dispose", b"dispose", "e2ee", b"e2ee", "enable_remote_track", b"enable_remote_track", "flush_sox_resampler", b"flush_sox_resampler", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "local_track_mute", b"local_track_mute", "message", b"message", "new_audio_resampler", b"new_audio_resampler", "new_audio_source", b"new_audio_source", "new_audio_stream", b"new_audio_stream", "new_sox_resampler", b"new_sox_resampler", "new_video_source", b"new_video_source", "new_video_stream", b"new_video_stream", "perform_rpc", b"perform_rpc", "publish_data", b"publish_data", "publish_sip_dtmf", b"publish_sip_dtmf", "publish_track", b"publish_track", "publish_transcription", b"publish_transcription", "push_sox_resampler", b"push_sox_resampler", "register_rpc_method", b"register_rpc_method", "remix_and_resample", b"remix_and_resample", "rpc_method_invocation_response", b"rpc_method_invocation_response", "set_local_attributes", b"set_local_attributes", "set_local_metadata", b"set_local_metadata", "set_local_name", b"set_local_name", "set_subscribed", b"set_subscribed", "unpublish_track", b"unpublish_track", "unregister_rpc_method", b"unregister_rpc_method", "video_convert", b"video_convert", "video_stream_from_participant", b"video_stream_from_participant"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["audio_stream_from_participant", b"audio_stream_from_participant", "capture_audio_frame", b"capture_audio_frame", "capture_video_frame", b"capture_video_frame", "clear_audio_buffer", b"clear_audio_buffer", "connect", b"connect", "create_audio_track", b"create_audio_track", "create_video_track", b"create_video_track", "disconnect", b"disconnect", "dispose", b"dispose", "e2ee", b"e2ee", "enable_remote_track", b"enable_remote_track", "flush_sox_resampler", b"flush_sox_resampler", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "local_track_mute", b"local_track_mute", "message", b"message", "new_audio_resampler", b"new_audio_resampler", "new_audio_source", b"new_audio_source", "new_audio_stream", b"new_audio_stream", "new_sox_resampler", b"new_sox_resampler", "new_video_source", b"new_video_source", "new_video_stream", b"new_video_stream", "perform_rpc", b"perform_rpc", "publish_data", b"publish_data", "publish_sip_dtmf", b"publish_sip_dtmf", "publish_track", b"publish_track", "publish_transcription", b"publish_transcription", "push_sox_resampler", b"push_sox_resampler", "register_rpc_method", b"register_rpc_method", "remix_and_resample", b"remix_and_resample", "rpc_method_invocation_response", b"rpc_method_invocation_response", "set_local_attributes", b"set_local_attributes", "set_local_metadata", b"set_local_metadata", "set_local_name", b"set_local_name", "set_subscribed", b"set_subscribed", "unpublish_track", b"unpublish_track", "unregister_rpc_method", b"unregister_rpc_method", "video_convert", b"video_convert", "video_stream_from_participant", b"video_stream_from_participant"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["message", b"message"]) -> typing.Literal["dispose", "connect", "disconnect", "publish_track", "unpublish_track", "publish_data", "set_subscribed", "set_local_metadata", "set_local_name", "set_local_attributes", "get_session_stats", "publish_transcription", "publish_sip_dtmf", "create_video_track", "create_audio_track", "local_track_mute", "enable_remote_track", "get_stats", "new_video_stream", "new_video_source", "capture_video_frame", "video_convert", "video_stream_from_participant", "new_audio_stream", "new_audio_source", "capture_audio_frame", "clear_audio_buffer", "new_audio_resampler", "remix_and_resample", "audio_stream_from_participant", "e2ee", "new_sox_resampler", "push_sox_resampler", "flush_sox_resampler", "perform_rpc", "register_rpc_method", "unregister_rpc_method", "rpc_method_invocation_response"] | None: ... global___FfiResponse = FfiResponse @@ -435,6 +472,11 @@ class FfiEvent(google.protobuf.message.Message): GET_SESSION_STATS_FIELD_NUMBER: builtins.int PANIC_FIELD_NUMBER: builtins.int PUBLISH_SIP_DTMF_FIELD_NUMBER: builtins.int + PERFORM_RPC_FIELD_NUMBER: builtins.int + REGISTER_RPC_METHOD_FIELD_NUMBER: builtins.int + UNREGISTER_RPC_METHOD_FIELD_NUMBER: builtins.int + RPC_METHOD_INVOCATION_FIELD_NUMBER: builtins.int + RPC_METHOD_INVOCATION_RESPONSE_FIELD_NUMBER: builtins.int @property def room_event(self) -> room_pb2.RoomEvent: ... @property @@ -475,6 +517,16 @@ class FfiEvent(google.protobuf.message.Message): def panic(self) -> global___Panic: ... @property def publish_sip_dtmf(self) -> room_pb2.PublishSipDtmfCallback: ... + @property + def perform_rpc(self) -> rpc_pb2.PerformRpcCallback: ... + @property + def register_rpc_method(self) -> rpc_pb2.RegisterRpcMethodCallback: ... + @property + def unregister_rpc_method(self) -> rpc_pb2.UnregisterRpcMethodCallback: ... + @property + def rpc_method_invocation(self) -> rpc_pb2.RpcMethodInvocationEvent: ... + @property + def rpc_method_invocation_response(self) -> rpc_pb2.RpcMethodInvocationResponseCallback: ... def __init__( self, *, @@ -498,10 +550,15 @@ class FfiEvent(google.protobuf.message.Message): get_session_stats: room_pb2.GetSessionStatsCallback | None = ..., panic: global___Panic | None = ..., publish_sip_dtmf: room_pb2.PublishSipDtmfCallback | None = ..., + perform_rpc: rpc_pb2.PerformRpcCallback | None = ..., + register_rpc_method: rpc_pb2.RegisterRpcMethodCallback | None = ..., + unregister_rpc_method: rpc_pb2.UnregisterRpcMethodCallback | None = ..., + rpc_method_invocation: rpc_pb2.RpcMethodInvocationEvent | None = ..., + rpc_method_invocation_response: rpc_pb2.RpcMethodInvocationResponseCallback | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["audio_stream_event", b"audio_stream_event", "capture_audio_frame", b"capture_audio_frame", "connect", b"connect", "disconnect", b"disconnect", "dispose", b"dispose", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "logs", b"logs", "message", b"message", "panic", b"panic", "publish_data", b"publish_data", "publish_sip_dtmf", b"publish_sip_dtmf", "publish_track", b"publish_track", "publish_transcription", b"publish_transcription", "room_event", b"room_event", "set_local_attributes", b"set_local_attributes", "set_local_metadata", b"set_local_metadata", "set_local_name", b"set_local_name", "track_event", b"track_event", "unpublish_track", b"unpublish_track", "video_stream_event", b"video_stream_event"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["audio_stream_event", b"audio_stream_event", "capture_audio_frame", b"capture_audio_frame", "connect", b"connect", "disconnect", b"disconnect", "dispose", b"dispose", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "logs", b"logs", "message", b"message", "panic", b"panic", "publish_data", b"publish_data", "publish_sip_dtmf", b"publish_sip_dtmf", "publish_track", b"publish_track", "publish_transcription", b"publish_transcription", "room_event", b"room_event", "set_local_attributes", b"set_local_attributes", "set_local_metadata", b"set_local_metadata", "set_local_name", b"set_local_name", "track_event", b"track_event", "unpublish_track", b"unpublish_track", "video_stream_event", b"video_stream_event"]) -> None: ... - def WhichOneof(self, oneof_group: typing.Literal["message", b"message"]) -> typing.Literal["room_event", "track_event", "video_stream_event", "audio_stream_event", "connect", "disconnect", "dispose", "publish_track", "unpublish_track", "publish_data", "publish_transcription", "capture_audio_frame", "set_local_metadata", "set_local_name", "set_local_attributes", "get_stats", "logs", "get_session_stats", "panic", "publish_sip_dtmf"] | None: ... + def HasField(self, field_name: typing.Literal["audio_stream_event", b"audio_stream_event", "capture_audio_frame", b"capture_audio_frame", "connect", b"connect", "disconnect", b"disconnect", "dispose", b"dispose", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "logs", b"logs", "message", b"message", "panic", b"panic", "perform_rpc", b"perform_rpc", "publish_data", b"publish_data", "publish_sip_dtmf", b"publish_sip_dtmf", "publish_track", b"publish_track", "publish_transcription", b"publish_transcription", "register_rpc_method", b"register_rpc_method", "room_event", b"room_event", "rpc_method_invocation", b"rpc_method_invocation", "rpc_method_invocation_response", b"rpc_method_invocation_response", "set_local_attributes", b"set_local_attributes", "set_local_metadata", b"set_local_metadata", "set_local_name", b"set_local_name", "track_event", b"track_event", "unpublish_track", b"unpublish_track", "unregister_rpc_method", b"unregister_rpc_method", "video_stream_event", b"video_stream_event"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["audio_stream_event", b"audio_stream_event", "capture_audio_frame", b"capture_audio_frame", "connect", b"connect", "disconnect", b"disconnect", "dispose", b"dispose", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "logs", b"logs", "message", b"message", "panic", b"panic", "perform_rpc", b"perform_rpc", "publish_data", b"publish_data", "publish_sip_dtmf", b"publish_sip_dtmf", "publish_track", b"publish_track", "publish_transcription", b"publish_transcription", "register_rpc_method", b"register_rpc_method", "room_event", b"room_event", "rpc_method_invocation", b"rpc_method_invocation", "rpc_method_invocation_response", b"rpc_method_invocation_response", "set_local_attributes", b"set_local_attributes", "set_local_metadata", b"set_local_metadata", "set_local_name", b"set_local_name", "track_event", b"track_event", "unpublish_track", b"unpublish_track", "unregister_rpc_method", b"unregister_rpc_method", "video_stream_event", b"video_stream_event"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["message", b"message"]) -> typing.Literal["room_event", "track_event", "video_stream_event", "audio_stream_event", "connect", "disconnect", "dispose", "publish_track", "unpublish_track", "publish_data", "publish_transcription", "capture_audio_frame", "set_local_metadata", "set_local_name", "set_local_attributes", "get_stats", "logs", "get_session_stats", "panic", "publish_sip_dtmf", "perform_rpc", "register_rpc_method", "unregister_rpc_method", "rpc_method_invocation", "rpc_method_invocation_response"] | None: ... global___FfiEvent = FfiEvent diff --git a/livekit-rtc/livekit/rtc/_proto/handle_pb2.py b/livekit-rtc/livekit/rtc/_proto/handle_pb2.py index 280ad670..d99bb12e 100644 --- a/livekit-rtc/livekit/rtc/_proto/handle_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/handle_pb2.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: handle.proto -# Protobuf Python Version: 4.25.1 +# Protobuf Python Version: 5.28.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 28, + 0, + '', + 'handle.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -19,8 +29,8 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'handle_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' _globals['_FFIOWNEDHANDLE']._serialized_start=31 _globals['_FFIOWNEDHANDLE']._serialized_end=59 diff --git a/livekit-rtc/livekit/rtc/_proto/participant_pb2.py b/livekit-rtc/livekit/rtc/_proto/participant_pb2.py index f0409b52..4eb50a59 100644 --- a/livekit-rtc/livekit/rtc/_proto/participant_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/participant_pb2.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: participant.proto -# Protobuf Python Version: 4.25.1 +# Protobuf Python Version: 5.28.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 28, + 0, + '', + 'participant.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -20,10 +30,10 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'participant_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' - _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._options = None + _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._loaded_options = None _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._serialized_options = b'8\001' _globals['_PARTICIPANTKIND']._serialized_start=412 _globals['_PARTICIPANTKIND']._serialized_end=573 diff --git a/livekit-rtc/livekit/rtc/_proto/room_pb2.py b/livekit-rtc/livekit/rtc/_proto/room_pb2.py index 220e5714..be0638ff 100644 --- a/livekit-rtc/livekit/rtc/_proto/room_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/room_pb2.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: room.proto -# Protobuf Python Version: 4.25.1 +# Protobuf Python Version: 5.28.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 28, + 0, + '', + 'room.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -25,16 +35,16 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'room_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' - _globals['_PUBLISHDATAREQUEST'].fields_by_name['destination_sids']._options = None + _globals['_PUBLISHDATAREQUEST'].fields_by_name['destination_sids']._loaded_options = None _globals['_PUBLISHDATAREQUEST'].fields_by_name['destination_sids']._serialized_options = b'\030\001' - _globals['_SETLOCALATTRIBUTESREQUEST_ATTRIBUTESENTRY']._options = None + _globals['_SETLOCALATTRIBUTESREQUEST_ATTRIBUTESENTRY']._loaded_options = None _globals['_SETLOCALATTRIBUTESREQUEST_ATTRIBUTESENTRY']._serialized_options = b'8\001' - _globals['_PARTICIPANTATTRIBUTESCHANGED_ATTRIBUTESENTRY']._options = None + _globals['_PARTICIPANTATTRIBUTESCHANGED_ATTRIBUTESENTRY']._loaded_options = None _globals['_PARTICIPANTATTRIBUTESCHANGED_ATTRIBUTESENTRY']._serialized_options = b'8\001' - _globals['_PARTICIPANTATTRIBUTESCHANGED_CHANGEDATTRIBUTESENTRY']._options = None + _globals['_PARTICIPANTATTRIBUTESCHANGED_CHANGEDATTRIBUTESENTRY']._loaded_options = None _globals['_PARTICIPANTATTRIBUTESCHANGED_CHANGEDATTRIBUTESENTRY']._serialized_options = b'8\001' _globals['_ICETRANSPORTTYPE']._serialized_start=8777 _globals['_ICETRANSPORTTYPE']._serialized_end=8857 diff --git a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py new file mode 100644 index 00000000..d20ce623 --- /dev/null +++ b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: rpc.proto +# Protobuf Python Version: 5.28.0 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 28, + 0, + '', + 'rpc.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\trpc.proto\x12\rlivekit.proto\"7\n\x08RpcError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\t\"\xae\x01\n\x11PerformRpcRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x1c\n\x14\x64\x65stination_identity\x18\x02 \x01(\t\x12\x0e\n\x06method\x18\x03 \x01(\t\x12\x0f\n\x07payload\x18\x04 \x01(\t\x12 \n\x13response_timeout_ms\x18\x05 \x01(\rH\x00\x88\x01\x01\x42\x16\n\x14_response_timeout_ms\"L\n\x18RegisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x0e\n\x06method\x18\x02 \x01(\t\"N\n\x1aUnregisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x0e\n\x06method\x18\x02 \x01(\t\"\xb6\x01\n\"RpcMethodInvocationResponseRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x15\n\rinvocation_id\x18\x02 \x01(\x04\x12\x14\n\x07payload\x18\x03 \x01(\tH\x00\x88\x01\x01\x12+\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x17.livekit.proto.RpcErrorH\x01\x88\x01\x01\x42\n\n\x08_payloadB\x08\n\x06_error\"&\n\x12PerformRpcResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"-\n\x19RegisterRpcMethodResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"/\n\x1bUnregisterRpcMethodResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"7\n#RpcMethodInvocationResponseResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"\x7f\n\x12PerformRpcCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\x12\x14\n\x07payload\x18\x02 \x01(\tH\x00\x88\x01\x01\x12+\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x17.livekit.proto.RpcErrorH\x01\x88\x01\x01\x42\n\n\x08_payloadB\x08\n\x06_error\"-\n\x19RegisterRpcMethodCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"/\n\x1bUnregisterRpcMethodCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"U\n#RpcMethodInvocationResponseCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\x12\x12\n\x05\x65rror\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_error\"\xb5\x01\n\x18RpcMethodInvocationEvent\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x15\n\rinvocation_id\x18\x02 \x01(\x04\x12\x0e\n\x06method\x18\x03 \x01(\t\x12\x12\n\nrequest_id\x18\x04 \x01(\t\x12\x17\n\x0f\x63\x61ller_identity\x18\x05 \x01(\t\x12\x0f\n\x07payload\x18\x06 \x01(\t\x12\x12\n\ntimeout_ms\x18\x07 \x01(\rB\x10\xaa\x02\rLiveKit.Protob\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'rpc_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' + _globals['_RPCERROR']._serialized_start=28 + _globals['_RPCERROR']._serialized_end=83 + _globals['_PERFORMRPCREQUEST']._serialized_start=86 + _globals['_PERFORMRPCREQUEST']._serialized_end=260 + _globals['_REGISTERRPCMETHODREQUEST']._serialized_start=262 + _globals['_REGISTERRPCMETHODREQUEST']._serialized_end=338 + _globals['_UNREGISTERRPCMETHODREQUEST']._serialized_start=340 + _globals['_UNREGISTERRPCMETHODREQUEST']._serialized_end=418 + _globals['_RPCMETHODINVOCATIONRESPONSEREQUEST']._serialized_start=421 + _globals['_RPCMETHODINVOCATIONRESPONSEREQUEST']._serialized_end=603 + _globals['_PERFORMRPCRESPONSE']._serialized_start=605 + _globals['_PERFORMRPCRESPONSE']._serialized_end=643 + _globals['_REGISTERRPCMETHODRESPONSE']._serialized_start=645 + _globals['_REGISTERRPCMETHODRESPONSE']._serialized_end=690 + _globals['_UNREGISTERRPCMETHODRESPONSE']._serialized_start=692 + _globals['_UNREGISTERRPCMETHODRESPONSE']._serialized_end=739 + _globals['_RPCMETHODINVOCATIONRESPONSERESPONSE']._serialized_start=741 + _globals['_RPCMETHODINVOCATIONRESPONSERESPONSE']._serialized_end=796 + _globals['_PERFORMRPCCALLBACK']._serialized_start=798 + _globals['_PERFORMRPCCALLBACK']._serialized_end=925 + _globals['_REGISTERRPCMETHODCALLBACK']._serialized_start=927 + _globals['_REGISTERRPCMETHODCALLBACK']._serialized_end=972 + _globals['_UNREGISTERRPCMETHODCALLBACK']._serialized_start=974 + _globals['_UNREGISTERRPCMETHODCALLBACK']._serialized_end=1021 + _globals['_RPCMETHODINVOCATIONRESPONSECALLBACK']._serialized_start=1023 + _globals['_RPCMETHODINVOCATIONRESPONSECALLBACK']._serialized_end=1108 + _globals['_RPCMETHODINVOCATIONEVENT']._serialized_start=1111 + _globals['_RPCMETHODINVOCATIONEVENT']._serialized_end=1292 +# @@protoc_insertion_point(module_scope) diff --git a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi new file mode 100644 index 00000000..a30c552c --- /dev/null +++ b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi @@ -0,0 +1,318 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +Copyright 2023 LiveKit, Inc. + +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. +""" + +import builtins +import google.protobuf.descriptor +import google.protobuf.message +import typing + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing.final +class RpcError(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CODE_FIELD_NUMBER: builtins.int + MESSAGE_FIELD_NUMBER: builtins.int + DATA_FIELD_NUMBER: builtins.int + code: builtins.int + message: builtins.str + data: builtins.str + def __init__( + self, + *, + code: builtins.int = ..., + message: builtins.str = ..., + data: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["code", b"code", "data", b"data", "message", b"message"]) -> None: ... + +global___RpcError = RpcError + +@typing.final +class PerformRpcRequest(google.protobuf.message.Message): + """FFI Requests""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + LOCAL_PARTICIPANT_HANDLE_FIELD_NUMBER: builtins.int + DESTINATION_IDENTITY_FIELD_NUMBER: builtins.int + METHOD_FIELD_NUMBER: builtins.int + PAYLOAD_FIELD_NUMBER: builtins.int + RESPONSE_TIMEOUT_MS_FIELD_NUMBER: builtins.int + local_participant_handle: builtins.int + destination_identity: builtins.str + method: builtins.str + payload: builtins.str + response_timeout_ms: builtins.int + def __init__( + self, + *, + local_participant_handle: builtins.int = ..., + destination_identity: builtins.str = ..., + method: builtins.str = ..., + payload: builtins.str = ..., + response_timeout_ms: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["_response_timeout_ms", b"_response_timeout_ms", "response_timeout_ms", b"response_timeout_ms"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_response_timeout_ms", b"_response_timeout_ms", "destination_identity", b"destination_identity", "local_participant_handle", b"local_participant_handle", "method", b"method", "payload", b"payload", "response_timeout_ms", b"response_timeout_ms"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_response_timeout_ms", b"_response_timeout_ms"]) -> typing.Literal["response_timeout_ms"] | None: ... + +global___PerformRpcRequest = PerformRpcRequest + +@typing.final +class RegisterRpcMethodRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + LOCAL_PARTICIPANT_HANDLE_FIELD_NUMBER: builtins.int + METHOD_FIELD_NUMBER: builtins.int + local_participant_handle: builtins.int + method: builtins.str + def __init__( + self, + *, + local_participant_handle: builtins.int = ..., + method: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["local_participant_handle", b"local_participant_handle", "method", b"method"]) -> None: ... + +global___RegisterRpcMethodRequest = RegisterRpcMethodRequest + +@typing.final +class UnregisterRpcMethodRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + LOCAL_PARTICIPANT_HANDLE_FIELD_NUMBER: builtins.int + METHOD_FIELD_NUMBER: builtins.int + local_participant_handle: builtins.int + method: builtins.str + def __init__( + self, + *, + local_participant_handle: builtins.int = ..., + method: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["local_participant_handle", b"local_participant_handle", "method", b"method"]) -> None: ... + +global___UnregisterRpcMethodRequest = UnregisterRpcMethodRequest + +@typing.final +class RpcMethodInvocationResponseRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + LOCAL_PARTICIPANT_HANDLE_FIELD_NUMBER: builtins.int + INVOCATION_ID_FIELD_NUMBER: builtins.int + PAYLOAD_FIELD_NUMBER: builtins.int + ERROR_FIELD_NUMBER: builtins.int + local_participant_handle: builtins.int + invocation_id: builtins.int + payload: builtins.str + @property + def error(self) -> global___RpcError: ... + def __init__( + self, + *, + local_participant_handle: builtins.int = ..., + invocation_id: builtins.int = ..., + payload: builtins.str | None = ..., + error: global___RpcError | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["_error", b"_error", "_payload", b"_payload", "error", b"error", "payload", b"payload"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_error", b"_error", "_payload", b"_payload", "error", b"error", "invocation_id", b"invocation_id", "local_participant_handle", b"local_participant_handle", "payload", b"payload"]) -> None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["_error", b"_error"]) -> typing.Literal["error"] | None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["_payload", b"_payload"]) -> typing.Literal["payload"] | None: ... + +global___RpcMethodInvocationResponseRequest = RpcMethodInvocationResponseRequest + +@typing.final +class PerformRpcResponse(google.protobuf.message.Message): + """FFI Responses""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + async_id: builtins.int + def __init__( + self, + *, + async_id: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... + +global___PerformRpcResponse = PerformRpcResponse + +@typing.final +class RegisterRpcMethodResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + async_id: builtins.int + def __init__( + self, + *, + async_id: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... + +global___RegisterRpcMethodResponse = RegisterRpcMethodResponse + +@typing.final +class UnregisterRpcMethodResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + async_id: builtins.int + def __init__( + self, + *, + async_id: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... + +global___UnregisterRpcMethodResponse = UnregisterRpcMethodResponse + +@typing.final +class RpcMethodInvocationResponseResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + async_id: builtins.int + def __init__( + self, + *, + async_id: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... + +global___RpcMethodInvocationResponseResponse = RpcMethodInvocationResponseResponse + +@typing.final +class PerformRpcCallback(google.protobuf.message.Message): + """FFI Callbacks""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + PAYLOAD_FIELD_NUMBER: builtins.int + ERROR_FIELD_NUMBER: builtins.int + async_id: builtins.int + payload: builtins.str + @property + def error(self) -> global___RpcError: ... + def __init__( + self, + *, + async_id: builtins.int = ..., + payload: builtins.str | None = ..., + error: global___RpcError | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["_error", b"_error", "_payload", b"_payload", "error", b"error", "payload", b"payload"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_error", b"_error", "_payload", b"_payload", "async_id", b"async_id", "error", b"error", "payload", b"payload"]) -> None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["_error", b"_error"]) -> typing.Literal["error"] | None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing.Literal["_payload", b"_payload"]) -> typing.Literal["payload"] | None: ... + +global___PerformRpcCallback = PerformRpcCallback + +@typing.final +class RegisterRpcMethodCallback(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + async_id: builtins.int + def __init__( + self, + *, + async_id: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... + +global___RegisterRpcMethodCallback = RegisterRpcMethodCallback + +@typing.final +class UnregisterRpcMethodCallback(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + async_id: builtins.int + def __init__( + self, + *, + async_id: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... + +global___UnregisterRpcMethodCallback = UnregisterRpcMethodCallback + +@typing.final +class RpcMethodInvocationResponseCallback(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + ERROR_FIELD_NUMBER: builtins.int + async_id: builtins.int + error: builtins.str + def __init__( + self, + *, + async_id: builtins.int = ..., + error: builtins.str | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["_error", b"_error", "error", b"error"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_error", b"_error", "async_id", b"async_id", "error", b"error"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_error", b"_error"]) -> typing.Literal["error"] | None: ... + +global___RpcMethodInvocationResponseCallback = RpcMethodInvocationResponseCallback + +@typing.final +class RpcMethodInvocationEvent(google.protobuf.message.Message): + """FFI Events""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + LOCAL_PARTICIPANT_HANDLE_FIELD_NUMBER: builtins.int + INVOCATION_ID_FIELD_NUMBER: builtins.int + METHOD_FIELD_NUMBER: builtins.int + REQUEST_ID_FIELD_NUMBER: builtins.int + CALLER_IDENTITY_FIELD_NUMBER: builtins.int + PAYLOAD_FIELD_NUMBER: builtins.int + TIMEOUT_MS_FIELD_NUMBER: builtins.int + local_participant_handle: builtins.int + invocation_id: builtins.int + method: builtins.str + request_id: builtins.str + caller_identity: builtins.str + payload: builtins.str + timeout_ms: builtins.int + def __init__( + self, + *, + local_participant_handle: builtins.int = ..., + invocation_id: builtins.int = ..., + method: builtins.str = ..., + request_id: builtins.str = ..., + caller_identity: builtins.str = ..., + payload: builtins.str = ..., + timeout_ms: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["caller_identity", b"caller_identity", "invocation_id", b"invocation_id", "local_participant_handle", b"local_participant_handle", "method", b"method", "payload", b"payload", "request_id", b"request_id", "timeout_ms", b"timeout_ms"]) -> None: ... + +global___RpcMethodInvocationEvent = RpcMethodInvocationEvent diff --git a/livekit-rtc/livekit/rtc/_proto/stats_pb2.py b/livekit-rtc/livekit/rtc/_proto/stats_pb2.py index 59ed5781..6d2defdd 100644 --- a/livekit-rtc/livekit/rtc/_proto/stats_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/stats_pb2.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: stats.proto -# Protobuf Python Version: 4.25.1 +# Protobuf Python Version: 5.28.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 28, + 0, + '', + 'stats.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -19,10 +29,10 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'stats_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' - _globals['_OUTBOUNDRTPSTREAMSTATS_QUALITYLIMITATIONDURATIONSENTRY']._options = None + _globals['_OUTBOUNDRTPSTREAMSTATS_QUALITYLIMITATIONDURATIONSENTRY']._loaded_options = None _globals['_OUTBOUNDRTPSTREAMSTATS_QUALITYLIMITATIONDURATIONSENTRY']._serialized_options = b'8\001' _globals['_DATACHANNELSTATE']._serialized_start=9217 _globals['_DATACHANNELSTATE']._serialized_end=9298 diff --git a/livekit-rtc/livekit/rtc/_proto/track_pb2.py b/livekit-rtc/livekit/rtc/_proto/track_pb2.py index 30830710..9eba5b3d 100644 --- a/livekit-rtc/livekit/rtc/_proto/track_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/track_pb2.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: track.proto -# Protobuf Python Version: 4.25.1 +# Protobuf Python Version: 5.28.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 28, + 0, + '', + 'track.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -22,8 +32,8 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'track_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' _globals['_TRACKKIND']._serialized_start=1433 _globals['_TRACKKIND']._serialized_end=1494 diff --git a/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py b/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py index 51a16e56..fe4828fa 100644 --- a/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: video_frame.proto -# Protobuf Python Version: 4.25.1 +# Protobuf Python Version: 5.28.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 28, + 0, + '', + 'video_frame.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -21,8 +31,8 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'video_frame_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' _globals['_VIDEOCODEC']._serialized_start=2484 _globals['_VIDEOCODEC']._serialized_end=2533 diff --git a/livekit-rtc/rust-sdks b/livekit-rtc/rust-sdks index 5d1f91ee..f7536415 160000 --- a/livekit-rtc/rust-sdks +++ b/livekit-rtc/rust-sdks @@ -1 +1 @@ -Subproject commit 5d1f91eed163d9badb296ff605cb0a500235a741 +Subproject commit f753641514c5e52ddba932e03cdbdde912af0c75 From f02791400a2cc95f91d26f9a1b6ff4bc60fda210 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 8 Oct 2024 12:07:17 -0700 Subject: [PATCH 02/53] rpcerror --- livekit-rtc/livekit/rtc/__init__.py | 3 +- livekit-rtc/livekit/rtc/rpc.py | 87 +++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 livekit-rtc/livekit/rtc/rpc.py diff --git a/livekit-rtc/livekit/rtc/__init__.py b/livekit-rtc/livekit/rtc/__init__.py index 9060631f..0195d947 100644 --- a/livekit-rtc/livekit/rtc/__init__.py +++ b/livekit-rtc/livekit/rtc/__init__.py @@ -71,7 +71,7 @@ from .video_stream import VideoFrameEvent, VideoStream from .audio_resampler import AudioResampler, AudioResamplerQuality from .utils import combine_audio_frames - +from .rpc import RpcError __all__ = [ "ConnectionQuality", "ConnectionState", @@ -131,6 +131,7 @@ "ChatMessage", "AudioResampler", "AudioResamplerQuality", + "RpcError", "combine_audio_frames", "__version__", ] diff --git a/livekit-rtc/livekit/rtc/rpc.py b/livekit-rtc/livekit/rtc/rpc.py new file mode 100644 index 00000000..cdb2f72a --- /dev/null +++ b/livekit-rtc/livekit/rtc/rpc.py @@ -0,0 +1,87 @@ +# Copyright 2023 LiveKit, Inc. +# +# 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. + +from typing import Optional, Dict, Union, ClassVar +from enum import IntEnum +from ._proto import rpc_pb2 as proto_rpc + +class RpcError(Exception): + """ + Specialized error handling for RPC methods. + + Instances of this type, when thrown in a method handler, will have their `message` + serialized and sent across the wire. The caller will receive an equivalent error on the other side. + + Build-in types are included but developers may use any string, with a max length of 256 bytes. + """ + + class ErrorCode(IntEnum): + APPLICATION_ERROR = 1500 + CONNECTION_TIMEOUT = 1501 + RESPONSE_TIMEOUT = 1502 + RECIPIENT_DISCONNECTED = 1503 + RESPONSE_PAYLOAD_TOO_LARGE = 1504 + SEND_FAILED = 1505 + + UNSUPPORTED_METHOD = 1400 + RECIPIENT_NOT_FOUND = 1401 + REQUEST_PAYLOAD_TOO_LARGE = 1402 + + ErrorMessage: ClassVar[Dict[ErrorCode, str]] = { + ErrorCode.APPLICATION_ERROR: 'Application error in method handler', + ErrorCode.CONNECTION_TIMEOUT: 'Connection timeout', + ErrorCode.RESPONSE_TIMEOUT: 'Response timeout', + ErrorCode.RECIPIENT_DISCONNECTED: 'Recipient disconnected', + ErrorCode.RESPONSE_PAYLOAD_TOO_LARGE: 'Response payload too large', + ErrorCode.SEND_FAILED: 'Failed to send', + + ErrorCode.UNSUPPORTED_METHOD: 'Method not supported at destination', + ErrorCode.RECIPIENT_NOT_FOUND: 'Recipient not found', + ErrorCode.REQUEST_PAYLOAD_TOO_LARGE: 'Request payload too large', + } + + def __init__(self, code: Union[int, 'RpcError.ErrorCode'], message: str, data: Optional[str] = None): + """ + Creates an error object with the given code and message, plus an optional data payload. + + If thrown in an RPC method handler, the error will be sent back to the caller. + + Error codes 1001-1999 are reserved for built-in errors (see RpcError.ErrorCode for their meanings). + """ + super().__init__(message) + self.code = code + self.message = message + self.data = data + + @classmethod + def from_proto(cls, proto: proto_rpc.RpcError) -> 'RpcError': + return cls(proto.code, proto.message, proto.data) + + def to_proto(self) -> proto_rpc.RpcError: + return proto_rpc.RpcError( + code=self.code, + message=self.message, + data=self.data + ) + + @classmethod + def built_in(cls, key: str, data: Optional[str] = None) -> 'RpcError': + """ + Creates an error object from the code, with an auto-populated message. + + @internal + """ + code = getattr(cls.ErrorCode, key) + message = cls.ErrorMessage[key] + return cls(code, message, data) From a0082c599892559028dc060816948d24530658a1 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 8 Oct 2024 12:17:24 -0700 Subject: [PATCH 03/53] participant --- livekit-rtc/livekit/rtc/participant.py | 181 ++++++++++++++++++++++++- livekit-rtc/livekit/rtc/room.py | 17 ++- livekit-rtc/livekit/rtc/rpc.py | 7 +- 3 files changed, 198 insertions(+), 7 deletions(-) diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 563c35cc..db424f81 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -15,7 +15,7 @@ from __future__ import annotations import ctypes -from typing import List, Union +from typing import List, Union, Callable, Dict, Awaitable, Optional from ._ffi_client import FfiClient, FfiHandle from ._proto import ffi_pb2 as proto_ffi @@ -34,7 +34,7 @@ TrackPublication, ) from .transcription import Transcription - +from .rpc import RpcError class PublishTrackError(Exception): def __init__(self, message: str) -> None: @@ -105,6 +105,7 @@ def __init__( super().__init__(owned_info) self._room_queue = room_queue self.track_publications: dict[str, LocalTrackPublication] = {} # type: ignore + self._rpc_handlers: Dict[str, Callable[[str, RemoteParticipant, str, int], Awaitable[str]]] = {} async def publish_data( self, @@ -220,6 +221,182 @@ async def publish_transcription(self, transcription: Transcription) -> None: if cb.publish_transcription.error: raise PublishTranscriptionError(cb.publish_transcription.error) + + async def perform_rpc( + self, + destination_identity: str, + method: str, + payload: str, + response_timeout_ms: Optional[int] = None + ) -> str: + """ + Initiate an RPC call to a remote participant. + + Args: + destination_identity (str): The `identity` of the destination participant + method (str): The method name to call + payload (str): The method payload + response_timeout_ms (Optional[int]): Timeout for receiving a response after initial connection + + Returns: + str: The response payload + + Raises: + RpcError: On failure. Details in `message`. + """ + req = proto_ffi.FfiRequest() + req.perform_rpc.local_participant_handle = self._ffi_handle.handle + req.perform_rpc.destination_identity = destination_identity + req.perform_rpc.method = method + req.perform_rpc.payload = payload + if response_timeout_ms is not None: + req.perform_rpc.response_timeout_ms = response_timeout_ms + + queue = FfiClient.instance.queue.subscribe() + try: + resp = FfiClient.instance.request(req) + cb = await queue.wait_for( + lambda e: (e.perform_rpc.async_id == resp.perform_rpc.async_id) + ) + finally: + FfiClient.instance.queue.unsubscribe(queue) + + if cb.perform_rpc.error: + raise RpcError.from_proto(cb.perform_rpc.error) + + return cb.perform_rpc.payload + + async def register_rpc_method( + self, + method: str, + handler: Callable[[str, 'RemoteParticipant', str, int], Awaitable[str]] + ) -> None: + """ + Establishes the participant as a receiver for calls of the specified RPC method. + Will overwrite any existing callback for the same method. + + Args: + method (str): The name of the indicated RPC method + handler (Callable): Will be invoked when an RPC request for this method is received + + Returns: + None + + Raises: + RpcError: On failure. Details in `message`. + + Example: + async def greet_handler(request_id: str, caller: RemoteParticipant, payload: str, response_timeout_ms: int) -> str: + print(f"Received greeting from {caller.identity}: {payload}") + return f"Hello, {caller.identity}!" + + await room.local_participant.register_rpc_method('greet', greet_handler) + + The handler receives the following parameters: + - `request_id`: A unique identifier for this RPC request + - `caller`: The RemoteParticipant who initiated the RPC call + - `payload`: The data sent by the caller (as a string) + - `response_timeout_ms`: The maximum time available to return a response + + The handler should return a string or a coroutine that resolves to a string. + If unable to respond within `response_timeout_ms`, the request will result in an error on the caller's side. + + You may raise errors of type `RpcError` with a string `message` in the handler, + and they will be received on the caller's side with the message intact. + Other errors raised in your handler will not be transmitted as-is, and will instead arrive to the caller as `1500` ("Application Error"). + """ + self._rpc_handlers[method] = handler + + req = proto_ffi.FfiRequest() + req.register_rpc_method.local_participant_handle = self._ffi_handle.handle + req.register_rpc_method.method = method + + queue = FfiClient.instance.queue.subscribe() + try: + resp = FfiClient.instance.request(req) + await queue.wait_for( + lambda e: ( + e.register_rpc_method.async_id == resp.register_rpc_method.async_id + ) + ) + finally: + FfiClient.instance.queue.unsubscribe(queue) + + + async def unregister_rpc_method(self, method: str) -> None: + """ + Unregisters a previously registered RPC method. + + Args: + method (str): The name of the RPC method to unregister + """ + self._rpc_handlers.pop(method, None) + + req = proto_ffi.FfiRequest() + req.unregister_rpc_method.local_participant_handle = self._ffi_handle.handle + req.unregister_rpc_method.method = method + + queue = FfiClient.instance.queue.subscribe() + try: + resp = FfiClient.instance.request(req) + await queue.wait_for( + lambda e: ( + e.unregister_rpc_method.async_id == resp.unregister_rpc_method.async_id + ) + ) + finally: + FfiClient.instance.queue.unsubscribe(queue) + + async def _handle_rpc_method_invocation( + self, + invocation_id: int, + method: str, + request_id: str, + caller: RemoteParticipant, + payload: str, + timeout_ms: int, + ) -> None: + response_error: Optional[RpcError] = None + response_payload: Optional[str] = None + + handler = self._rpc_handlers.get(method) + + if not handler: + response_error = RpcError.built_in('UNSUPPORTED_METHOD') + else: + try: + response_payload = await handler(request_id, caller, payload, timeout_ms) + except RpcError as error: + response_error = error + except Exception as error: + print( + f"Uncaught error returned by RPC handler for {method}. Returning UNCAUGHT_ERROR instead.", + error, + ) + response_error = RpcError.built_in('APPLICATION_ERROR') + + req = proto_ffi.RpcMethodInvocationResponseRequest( + invocation_id=invocation_id, + error=response_error.to_proto() if response_error else None, + payload=response_payload, + ) + + res = FfiClient.instance.request( + proto_ffi.FfiRequest(rpc_method_invocation_response=req) + ) + + queue = FfiClient.instance.queue.subscribe() + try: + cb = await queue.wait_for( + lambda e: ( + e.message.WhichOneof('message') == 'rpc_method_invocation_response' and + e.message.rpc_method_invocation_response.async_id == res.rpc_method_invocation_response.async_id + ) + ) + if cb.error: + print(f"error sending rpc method invocation response: {cb.error}") + finally: + FfiClient.instance.queue.unsubscribe(queue) async def set_metadata(self, metadata: str) -> None: """ diff --git a/livekit-rtc/livekit/rtc/room.py b/livekit-rtc/livekit/rtc/room.py index 41c287a0..ac10c56b 100644 --- a/livekit-rtc/livekit/rtc/room.py +++ b/livekit-rtc/livekit/rtc/room.py @@ -418,7 +418,9 @@ async def _listen_task(self) -> None: # listen to incoming room events while True: event = await self._ffi_queue.get() - if event.room_event.room_handle == self._ffi_handle.handle: # type: ignore + if event.message.WhichOneof("value") == "rpc_method_invocation": + self._on_rpc_method_invocation(event) + elif event.room_event.room_handle == self._ffi_handle.handle: # type: ignore if event.room_event.HasField("eos"): break @@ -435,6 +437,19 @@ async def _listen_task(self) -> None: # before processing the next one self._room_queue.put_nowait(event) await self._room_queue.join() + + def _on_rpc_method_invocation(self, event: proto_room.RoomEvent): + rpc_invocation = event.message.rpc_method_invocation + if rpc_invocation.local_participant_handle == self._local_participant._ffi_handle.handle: # type: ignore + caller = self._remote_participants.get(rpc_invocation.caller_identity) + self._local_participant._handle_rpc_method_invocation( + rpc_invocation.invocation_id, + rpc_invocation.method, + rpc_invocation.request_id, + caller, + rpc_invocation.payload, + rpc_invocation.timeout_ms, + ) def _on_room_event(self, event: proto_room.RoomEvent): which = event.WhichOneof("message") diff --git a/livekit-rtc/livekit/rtc/rpc.py b/livekit-rtc/livekit/rtc/rpc.py index cdb2f72a..e23be68f 100644 --- a/livekit-rtc/livekit/rtc/rpc.py +++ b/livekit-rtc/livekit/rtc/rpc.py @@ -76,12 +76,11 @@ def to_proto(self) -> proto_rpc.RpcError: ) @classmethod - def built_in(cls, key: str, data: Optional[str] = None) -> 'RpcError': + def built_in(cls, code: 'RpcError.ErrorCode', data: Optional[str] = None) -> 'RpcError': """ - Creates an error object from the code, with an auto-populated message. + Creates an error object from the ErrorCode, with an auto-populated message. @internal """ - code = getattr(cls.ErrorCode, key) - message = cls.ErrorMessage[key] + message = cls.ErrorMessage[code] return cls(code, message, data) From a0e2befef04d2b74c42ce1b7e120a2e2abac080a Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 8 Oct 2024 12:35:21 -0700 Subject: [PATCH 04/53] p --- livekit-rtc/generate_proto.sh | 2 +- livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py | 4 ++-- livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py | 4 ++-- livekit-rtc/livekit/rtc/_proto/ffi_pb2.py | 6 +++--- livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi | 2 +- livekit-rtc/livekit/rtc/_proto/handle_pb2.py | 4 ++-- livekit-rtc/livekit/rtc/_proto/participant_pb2.py | 4 ++-- livekit-rtc/livekit/rtc/_proto/room_pb2.py | 4 ++-- livekit-rtc/livekit/rtc/_proto/rpc_pb2.py | 4 ++-- livekit-rtc/livekit/rtc/_proto/stats_pb2.py | 4 ++-- livekit-rtc/livekit/rtc/_proto/track_pb2.py | 4 ++-- livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py | 4 ++-- 12 files changed, 23 insertions(+), 23 deletions(-) diff --git a/livekit-rtc/generate_proto.sh b/livekit-rtc/generate_proto.sh index 0033a289..30e957e7 100755 --- a/livekit-rtc/generate_proto.sh +++ b/livekit-rtc/generate_proto.sh @@ -37,5 +37,5 @@ protoc \ touch -a "$FFI_OUT_PYTHON/__init__.py" for f in "$FFI_OUT_PYTHON"/*.py "$FFI_OUT_PYTHON"/*.pyi; do - perl -i -pe 's|^(import (audio_frame_pb2\|ffi_pb2\|handle_pb2\|participant_pb2\|room_pb2\|track_pb2\|video_frame_pb2\|e2ee_pb2\|stats_pb2))|from . $1|g' "$f" + perl -i -pe 's|^(import (audio_frame_pb2\|ffi_pb2\|handle_pb2\|participant_pb2\|room_pb2\|track_pb2\|video_frame_pb2\|e2ee_pb2\|stats_pb2\|rpc_pb2))|from . $1|g' "$f" done diff --git a/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py b/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py index bf01c51b..d4922b57 100644 --- a/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: audio_frame.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -13,7 +13,7 @@ _runtime_version.Domain.PUBLIC, 5, 28, - 0, + 2, '', 'audio_frame.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py b/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py index 6b0c6961..4f0980dc 100644 --- a/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: e2ee.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -13,7 +13,7 @@ _runtime_version.Domain.PUBLIC, 5, 28, - 0, + 2, '', 'e2ee.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py index e23d0e13..88a4df55 100644 --- a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: ffi.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -13,7 +13,7 @@ _runtime_version.Domain.PUBLIC, 5, 28, - 0, + 2, '', 'ffi.proto' ) @@ -27,7 +27,7 @@ from . import room_pb2 as room__pb2 from . import video_frame_pb2 as video__frame__pb2 from . import audio_frame_pb2 as audio__frame__pb2 -import rpc_pb2 as rpc__pb2 +from . import rpc_pb2 as rpc__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tffi.proto\x12\rlivekit.proto\x1a\ne2ee.proto\x1a\x0btrack.proto\x1a\nroom.proto\x1a\x11video_frame.proto\x1a\x11\x61udio_frame.proto\x1a\trpc.proto\"\x9e\x14\n\nFfiRequest\x12\x30\n\x07\x64ispose\x18\x02 \x01(\x0b\x32\x1d.livekit.proto.DisposeRequestH\x00\x12\x30\n\x07\x63onnect\x18\x03 \x01(\x0b\x32\x1d.livekit.proto.ConnectRequestH\x00\x12\x36\n\ndisconnect\x18\x04 \x01(\x0b\x32 .livekit.proto.DisconnectRequestH\x00\x12;\n\rpublish_track\x18\x05 \x01(\x0b\x32\".livekit.proto.PublishTrackRequestH\x00\x12?\n\x0funpublish_track\x18\x06 \x01(\x0b\x32$.livekit.proto.UnpublishTrackRequestH\x00\x12\x39\n\x0cpublish_data\x18\x07 \x01(\x0b\x32!.livekit.proto.PublishDataRequestH\x00\x12=\n\x0eset_subscribed\x18\x08 \x01(\x0b\x32#.livekit.proto.SetSubscribedRequestH\x00\x12\x44\n\x12set_local_metadata\x18\t \x01(\x0b\x32&.livekit.proto.SetLocalMetadataRequestH\x00\x12<\n\x0eset_local_name\x18\n \x01(\x0b\x32\".livekit.proto.SetLocalNameRequestH\x00\x12H\n\x14set_local_attributes\x18\x0b \x01(\x0b\x32(.livekit.proto.SetLocalAttributesRequestH\x00\x12\x42\n\x11get_session_stats\x18\x0c \x01(\x0b\x32%.livekit.proto.GetSessionStatsRequestH\x00\x12K\n\x15publish_transcription\x18\r \x01(\x0b\x32*.livekit.proto.PublishTranscriptionRequestH\x00\x12@\n\x10publish_sip_dtmf\x18\x0e \x01(\x0b\x32$.livekit.proto.PublishSipDtmfRequestH\x00\x12\x44\n\x12\x63reate_video_track\x18\x0f \x01(\x0b\x32&.livekit.proto.CreateVideoTrackRequestH\x00\x12\x44\n\x12\x63reate_audio_track\x18\x10 \x01(\x0b\x32&.livekit.proto.CreateAudioTrackRequestH\x00\x12@\n\x10local_track_mute\x18\x11 \x01(\x0b\x32$.livekit.proto.LocalTrackMuteRequestH\x00\x12\x46\n\x13\x65nable_remote_track\x18\x12 \x01(\x0b\x32\'.livekit.proto.EnableRemoteTrackRequestH\x00\x12\x33\n\tget_stats\x18\x13 \x01(\x0b\x32\x1e.livekit.proto.GetStatsRequestH\x00\x12@\n\x10new_video_stream\x18\x14 \x01(\x0b\x32$.livekit.proto.NewVideoStreamRequestH\x00\x12@\n\x10new_video_source\x18\x15 \x01(\x0b\x32$.livekit.proto.NewVideoSourceRequestH\x00\x12\x46\n\x13\x63\x61pture_video_frame\x18\x16 \x01(\x0b\x32\'.livekit.proto.CaptureVideoFrameRequestH\x00\x12;\n\rvideo_convert\x18\x17 \x01(\x0b\x32\".livekit.proto.VideoConvertRequestH\x00\x12Y\n\x1dvideo_stream_from_participant\x18\x18 \x01(\x0b\x32\x30.livekit.proto.VideoStreamFromParticipantRequestH\x00\x12@\n\x10new_audio_stream\x18\x19 \x01(\x0b\x32$.livekit.proto.NewAudioStreamRequestH\x00\x12@\n\x10new_audio_source\x18\x1a \x01(\x0b\x32$.livekit.proto.NewAudioSourceRequestH\x00\x12\x46\n\x13\x63\x61pture_audio_frame\x18\x1b \x01(\x0b\x32\'.livekit.proto.CaptureAudioFrameRequestH\x00\x12\x44\n\x12\x63lear_audio_buffer\x18\x1c \x01(\x0b\x32&.livekit.proto.ClearAudioBufferRequestH\x00\x12\x46\n\x13new_audio_resampler\x18\x1d \x01(\x0b\x32\'.livekit.proto.NewAudioResamplerRequestH\x00\x12\x44\n\x12remix_and_resample\x18\x1e \x01(\x0b\x32&.livekit.proto.RemixAndResampleRequestH\x00\x12*\n\x04\x65\x32\x65\x65\x18\x1f \x01(\x0b\x32\x1a.livekit.proto.E2eeRequestH\x00\x12Y\n\x1d\x61udio_stream_from_participant\x18 \x01(\x0b\x32\x30.livekit.proto.AudioStreamFromParticipantRequestH\x00\x12\x42\n\x11new_sox_resampler\x18! \x01(\x0b\x32%.livekit.proto.NewSoxResamplerRequestH\x00\x12\x44\n\x12push_sox_resampler\x18\" \x01(\x0b\x32&.livekit.proto.PushSoxResamplerRequestH\x00\x12\x46\n\x13\x66lush_sox_resampler\x18# \x01(\x0b\x32\'.livekit.proto.FlushSoxResamplerRequestH\x00\x12\x37\n\x0bperform_rpc\x18$ \x01(\x0b\x32 .livekit.proto.PerformRpcRequestH\x00\x12\x46\n\x13register_rpc_method\x18% \x01(\x0b\x32\'.livekit.proto.RegisterRpcMethodRequestH\x00\x12J\n\x15unregister_rpc_method\x18& \x01(\x0b\x32).livekit.proto.UnregisterRpcMethodRequestH\x00\x12[\n\x1erpc_method_invocation_response\x18\' \x01(\x0b\x32\x31.livekit.proto.RpcMethodInvocationResponseRequestH\x00\x42\t\n\x07message\"\xc5\x14\n\x0b\x46\x66iResponse\x12\x31\n\x07\x64ispose\x18\x02 \x01(\x0b\x32\x1e.livekit.proto.DisposeResponseH\x00\x12\x31\n\x07\x63onnect\x18\x03 \x01(\x0b\x32\x1e.livekit.proto.ConnectResponseH\x00\x12\x37\n\ndisconnect\x18\x04 \x01(\x0b\x32!.livekit.proto.DisconnectResponseH\x00\x12<\n\rpublish_track\x18\x05 \x01(\x0b\x32#.livekit.proto.PublishTrackResponseH\x00\x12@\n\x0funpublish_track\x18\x06 \x01(\x0b\x32%.livekit.proto.UnpublishTrackResponseH\x00\x12:\n\x0cpublish_data\x18\x07 \x01(\x0b\x32\".livekit.proto.PublishDataResponseH\x00\x12>\n\x0eset_subscribed\x18\x08 \x01(\x0b\x32$.livekit.proto.SetSubscribedResponseH\x00\x12\x45\n\x12set_local_metadata\x18\t \x01(\x0b\x32\'.livekit.proto.SetLocalMetadataResponseH\x00\x12=\n\x0eset_local_name\x18\n \x01(\x0b\x32#.livekit.proto.SetLocalNameResponseH\x00\x12I\n\x14set_local_attributes\x18\x0b \x01(\x0b\x32).livekit.proto.SetLocalAttributesResponseH\x00\x12\x43\n\x11get_session_stats\x18\x0c \x01(\x0b\x32&.livekit.proto.GetSessionStatsResponseH\x00\x12L\n\x15publish_transcription\x18\r \x01(\x0b\x32+.livekit.proto.PublishTranscriptionResponseH\x00\x12\x41\n\x10publish_sip_dtmf\x18\x0e \x01(\x0b\x32%.livekit.proto.PublishSipDtmfResponseH\x00\x12\x45\n\x12\x63reate_video_track\x18\x0f \x01(\x0b\x32\'.livekit.proto.CreateVideoTrackResponseH\x00\x12\x45\n\x12\x63reate_audio_track\x18\x10 \x01(\x0b\x32\'.livekit.proto.CreateAudioTrackResponseH\x00\x12\x41\n\x10local_track_mute\x18\x11 \x01(\x0b\x32%.livekit.proto.LocalTrackMuteResponseH\x00\x12G\n\x13\x65nable_remote_track\x18\x12 \x01(\x0b\x32(.livekit.proto.EnableRemoteTrackResponseH\x00\x12\x34\n\tget_stats\x18\x13 \x01(\x0b\x32\x1f.livekit.proto.GetStatsResponseH\x00\x12\x41\n\x10new_video_stream\x18\x14 \x01(\x0b\x32%.livekit.proto.NewVideoStreamResponseH\x00\x12\x41\n\x10new_video_source\x18\x15 \x01(\x0b\x32%.livekit.proto.NewVideoSourceResponseH\x00\x12G\n\x13\x63\x61pture_video_frame\x18\x16 \x01(\x0b\x32(.livekit.proto.CaptureVideoFrameResponseH\x00\x12<\n\rvideo_convert\x18\x17 \x01(\x0b\x32#.livekit.proto.VideoConvertResponseH\x00\x12Z\n\x1dvideo_stream_from_participant\x18\x18 \x01(\x0b\x32\x31.livekit.proto.VideoStreamFromParticipantResponseH\x00\x12\x41\n\x10new_audio_stream\x18\x19 \x01(\x0b\x32%.livekit.proto.NewAudioStreamResponseH\x00\x12\x41\n\x10new_audio_source\x18\x1a \x01(\x0b\x32%.livekit.proto.NewAudioSourceResponseH\x00\x12G\n\x13\x63\x61pture_audio_frame\x18\x1b \x01(\x0b\x32(.livekit.proto.CaptureAudioFrameResponseH\x00\x12\x45\n\x12\x63lear_audio_buffer\x18\x1c \x01(\x0b\x32\'.livekit.proto.ClearAudioBufferResponseH\x00\x12G\n\x13new_audio_resampler\x18\x1d \x01(\x0b\x32(.livekit.proto.NewAudioResamplerResponseH\x00\x12\x45\n\x12remix_and_resample\x18\x1e \x01(\x0b\x32\'.livekit.proto.RemixAndResampleResponseH\x00\x12Z\n\x1d\x61udio_stream_from_participant\x18\x1f \x01(\x0b\x32\x31.livekit.proto.AudioStreamFromParticipantResponseH\x00\x12+\n\x04\x65\x32\x65\x65\x18 \x01(\x0b\x32\x1b.livekit.proto.E2eeResponseH\x00\x12\x43\n\x11new_sox_resampler\x18! \x01(\x0b\x32&.livekit.proto.NewSoxResamplerResponseH\x00\x12\x45\n\x12push_sox_resampler\x18\" \x01(\x0b\x32\'.livekit.proto.PushSoxResamplerResponseH\x00\x12G\n\x13\x66lush_sox_resampler\x18# \x01(\x0b\x32(.livekit.proto.FlushSoxResamplerResponseH\x00\x12\x38\n\x0bperform_rpc\x18$ \x01(\x0b\x32!.livekit.proto.PerformRpcResponseH\x00\x12G\n\x13register_rpc_method\x18% \x01(\x0b\x32(.livekit.proto.RegisterRpcMethodResponseH\x00\x12K\n\x15unregister_rpc_method\x18& \x01(\x0b\x32*.livekit.proto.UnregisterRpcMethodResponseH\x00\x12\\\n\x1erpc_method_invocation_response\x18\' \x01(\x0b\x32\x32.livekit.proto.RpcMethodInvocationResponseResponseH\x00\x42\t\n\x07message\"\xbe\x0c\n\x08\x46\x66iEvent\x12.\n\nroom_event\x18\x01 \x01(\x0b\x32\x18.livekit.proto.RoomEventH\x00\x12\x30\n\x0btrack_event\x18\x02 \x01(\x0b\x32\x19.livekit.proto.TrackEventH\x00\x12=\n\x12video_stream_event\x18\x03 \x01(\x0b\x32\x1f.livekit.proto.VideoStreamEventH\x00\x12=\n\x12\x61udio_stream_event\x18\x04 \x01(\x0b\x32\x1f.livekit.proto.AudioStreamEventH\x00\x12\x31\n\x07\x63onnect\x18\x05 \x01(\x0b\x32\x1e.livekit.proto.ConnectCallbackH\x00\x12\x37\n\ndisconnect\x18\x07 \x01(\x0b\x32!.livekit.proto.DisconnectCallbackH\x00\x12\x31\n\x07\x64ispose\x18\x08 \x01(\x0b\x32\x1e.livekit.proto.DisposeCallbackH\x00\x12<\n\rpublish_track\x18\t \x01(\x0b\x32#.livekit.proto.PublishTrackCallbackH\x00\x12@\n\x0funpublish_track\x18\n \x01(\x0b\x32%.livekit.proto.UnpublishTrackCallbackH\x00\x12:\n\x0cpublish_data\x18\x0b \x01(\x0b\x32\".livekit.proto.PublishDataCallbackH\x00\x12L\n\x15publish_transcription\x18\x0c \x01(\x0b\x32+.livekit.proto.PublishTranscriptionCallbackH\x00\x12G\n\x13\x63\x61pture_audio_frame\x18\r \x01(\x0b\x32(.livekit.proto.CaptureAudioFrameCallbackH\x00\x12\x45\n\x12set_local_metadata\x18\x0e \x01(\x0b\x32\'.livekit.proto.SetLocalMetadataCallbackH\x00\x12=\n\x0eset_local_name\x18\x0f \x01(\x0b\x32#.livekit.proto.SetLocalNameCallbackH\x00\x12I\n\x14set_local_attributes\x18\x10 \x01(\x0b\x32).livekit.proto.SetLocalAttributesCallbackH\x00\x12\x34\n\tget_stats\x18\x11 \x01(\x0b\x32\x1f.livekit.proto.GetStatsCallbackH\x00\x12\'\n\x04logs\x18\x12 \x01(\x0b\x32\x17.livekit.proto.LogBatchH\x00\x12\x43\n\x11get_session_stats\x18\x13 \x01(\x0b\x32&.livekit.proto.GetSessionStatsCallbackH\x00\x12%\n\x05panic\x18\x14 \x01(\x0b\x32\x14.livekit.proto.PanicH\x00\x12\x41\n\x10publish_sip_dtmf\x18\x15 \x01(\x0b\x32%.livekit.proto.PublishSipDtmfCallbackH\x00\x12\x38\n\x0bperform_rpc\x18\x16 \x01(\x0b\x32!.livekit.proto.PerformRpcCallbackH\x00\x12G\n\x13register_rpc_method\x18\x17 \x01(\x0b\x32(.livekit.proto.RegisterRpcMethodCallbackH\x00\x12K\n\x15unregister_rpc_method\x18\x18 \x01(\x0b\x32*.livekit.proto.UnregisterRpcMethodCallbackH\x00\x12H\n\x15rpc_method_invocation\x18\x19 \x01(\x0b\x32\'.livekit.proto.RpcMethodInvocationEventH\x00\x12\\\n\x1erpc_method_invocation_response\x18\x1a \x01(\x0b\x32\x32.livekit.proto.RpcMethodInvocationResponseCallbackH\x00\x42\t\n\x07message\"\x1f\n\x0e\x44isposeRequest\x12\r\n\x05\x61sync\x18\x01 \x01(\x08\"5\n\x0f\x44isposeResponse\x12\x15\n\x08\x61sync_id\x18\x01 \x01(\x04H\x00\x88\x01\x01\x42\x0b\n\t_async_id\"#\n\x0f\x44isposeCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"\xb6\x01\n\tLogRecord\x12&\n\x05level\x18\x01 \x01(\x0e\x32\x17.livekit.proto.LogLevel\x12\x0e\n\x06target\x18\x02 \x01(\t\x12\x18\n\x0bmodule_path\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04\x66ile\x18\x04 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04line\x18\x05 \x01(\rH\x02\x88\x01\x01\x12\x0f\n\x07message\x18\x06 \x01(\tB\x0e\n\x0c_module_pathB\x07\n\x05_fileB\x07\n\x05_line\"5\n\x08LogBatch\x12)\n\x07records\x18\x01 \x03(\x0b\x32\x18.livekit.proto.LogRecord\"\x18\n\x05Panic\x12\x0f\n\x07message\x18\x01 \x01(\t*S\n\x08LogLevel\x12\r\n\tLOG_ERROR\x10\x00\x12\x0c\n\x08LOG_WARN\x10\x01\x12\x0c\n\x08LOG_INFO\x10\x02\x12\r\n\tLOG_DEBUG\x10\x03\x12\r\n\tLOG_TRACE\x10\x04\x42\x10\xaa\x02\rLiveKit.Protob\x06proto3') diff --git a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi index 8edd8de8..b1347e56 100644 --- a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi +++ b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi @@ -25,7 +25,7 @@ import google.protobuf.internal.containers import google.protobuf.internal.enum_type_wrapper import google.protobuf.message from . import room_pb2 -import rpc_pb2 +from . import rpc_pb2 import sys from . import track_pb2 import typing diff --git a/livekit-rtc/livekit/rtc/_proto/handle_pb2.py b/livekit-rtc/livekit/rtc/_proto/handle_pb2.py index d99bb12e..4d17111c 100644 --- a/livekit-rtc/livekit/rtc/_proto/handle_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/handle_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: handle.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -13,7 +13,7 @@ _runtime_version.Domain.PUBLIC, 5, 28, - 0, + 2, '', 'handle.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/participant_pb2.py b/livekit-rtc/livekit/rtc/_proto/participant_pb2.py index 4eb50a59..30824060 100644 --- a/livekit-rtc/livekit/rtc/_proto/participant_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/participant_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: participant.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -13,7 +13,7 @@ _runtime_version.Domain.PUBLIC, 5, 28, - 0, + 2, '', 'participant.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/room_pb2.py b/livekit-rtc/livekit/rtc/_proto/room_pb2.py index be0638ff..f138bb77 100644 --- a/livekit-rtc/livekit/rtc/_proto/room_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/room_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: room.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -13,7 +13,7 @@ _runtime_version.Domain.PUBLIC, 5, 28, - 0, + 2, '', 'room.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py index d20ce623..77867fb1 100644 --- a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: rpc.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -13,7 +13,7 @@ _runtime_version.Domain.PUBLIC, 5, 28, - 0, + 2, '', 'rpc.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/stats_pb2.py b/livekit-rtc/livekit/rtc/_proto/stats_pb2.py index 6d2defdd..2fb387c3 100644 --- a/livekit-rtc/livekit/rtc/_proto/stats_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/stats_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: stats.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -13,7 +13,7 @@ _runtime_version.Domain.PUBLIC, 5, 28, - 0, + 2, '', 'stats.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/track_pb2.py b/livekit-rtc/livekit/rtc/_proto/track_pb2.py index 9eba5b3d..0599ce36 100644 --- a/livekit-rtc/livekit/rtc/_proto/track_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/track_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: track.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -13,7 +13,7 @@ _runtime_version.Domain.PUBLIC, 5, 28, - 0, + 2, '', 'track.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py b/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py index fe4828fa..bdea4286 100644 --- a/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: video_frame.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -13,7 +13,7 @@ _runtime_version.Domain.PUBLIC, 5, 28, - 0, + 2, '', 'video_frame.proto' ) From 4511ebec5a057c21c8fc67b45eba8f2ae398a536 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 19:43:17 +0000 Subject: [PATCH 05/53] generated protobuf --- livekit-protocol/livekit/protocol/agent.py | 20 ++------ .../livekit/protocol/agent_dispatch.py | 16 ++----- .../livekit/protocol/analytics.py | 16 ++----- livekit-protocol/livekit/protocol/egress.py | 44 +++++++----------- livekit-protocol/livekit/protocol/ingress.py | 22 +++------ livekit-protocol/livekit/protocol/models.py | 36 ++++++--------- livekit-protocol/livekit/protocol/room.py | 20 ++------ livekit-protocol/livekit/protocol/sip.py | 46 ++++++++----------- livekit-protocol/livekit/protocol/webhook.py | 16 ++----- 9 files changed, 73 insertions(+), 163 deletions(-) diff --git a/livekit-protocol/livekit/protocol/agent.py b/livekit-protocol/livekit/protocol/agent.py index dcc08102..7a2fc5bb 100644 --- a/livekit-protocol/livekit/protocol/agent.py +++ b/livekit-protocol/livekit/protocol/agent.py @@ -1,22 +1,12 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: livekit_agent.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 4.25.3 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder -_runtime_version.ValidateProtobufRuntimeVersion( - _runtime_version.Domain.PUBLIC, - 5, - 28, - 0, - '', - 'livekit_agent.proto' -) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -30,12 +20,12 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'agent', _globals) -if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' - _globals['_JOB'].fields_by_name['namespace']._loaded_options = None + _globals['_JOB'].fields_by_name['namespace']._options = None _globals['_JOB'].fields_by_name['namespace']._serialized_options = b'\030\001' - _globals['_AVAILABILITYRESPONSE_PARTICIPANTATTRIBUTESENTRY']._loaded_options = None + _globals['_AVAILABILITYRESPONSE_PARTICIPANTATTRIBUTESENTRY']._options = None _globals['_AVAILABILITYRESPONSE_PARTICIPANTATTRIBUTESENTRY']._serialized_options = b'8\001' _globals['_JOBTYPE']._serialized_start=2386 _globals['_JOBTYPE']._serialized_end=2426 diff --git a/livekit-protocol/livekit/protocol/agent_dispatch.py b/livekit-protocol/livekit/protocol/agent_dispatch.py index 5f4dfc99..7bdf63f9 100644 --- a/livekit-protocol/livekit/protocol/agent_dispatch.py +++ b/livekit-protocol/livekit/protocol/agent_dispatch.py @@ -1,22 +1,12 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: livekit_agent_dispatch.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 4.25.3 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder -_runtime_version.ValidateProtobufRuntimeVersion( - _runtime_version.Domain.PUBLIC, - 5, - 28, - 0, - '', - 'livekit_agent_dispatch.proto' -) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -30,8 +20,8 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'agent_dispatch', _globals) -if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' _globals['_CREATEAGENTDISPATCHREQUEST']._serialized_start=62 _globals['_CREATEAGENTDISPATCHREQUEST']._serialized_end=142 diff --git a/livekit-protocol/livekit/protocol/analytics.py b/livekit-protocol/livekit/protocol/analytics.py index 4d9e88bc..4eb31fd5 100644 --- a/livekit-protocol/livekit/protocol/analytics.py +++ b/livekit-protocol/livekit/protocol/analytics.py @@ -1,22 +1,12 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: livekit_analytics.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 4.25.3 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder -_runtime_version.ValidateProtobufRuntimeVersion( - _runtime_version.Domain.PUBLIC, - 5, - 28, - 0, - '', - 'livekit_analytics.proto' -) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -33,8 +23,8 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'analytics', _globals) -if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' _globals['_STREAMTYPE']._serialized_start=2655 _globals['_STREAMTYPE']._serialized_end=2697 diff --git a/livekit-protocol/livekit/protocol/egress.py b/livekit-protocol/livekit/protocol/egress.py index 55ea3811..33cc66d1 100644 --- a/livekit-protocol/livekit/protocol/egress.py +++ b/livekit-protocol/livekit/protocol/egress.py @@ -1,22 +1,12 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: livekit_egress.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 4.25.3 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder -_runtime_version.ValidateProtobufRuntimeVersion( - _runtime_version.Domain.PUBLIC, - 5, - 28, - 0, - '', - 'livekit_egress.proto' -) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -30,36 +20,36 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'egress', _globals) -if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' - _globals['_ROOMCOMPOSITEEGRESSREQUEST'].fields_by_name['file']._loaded_options = None + _globals['_ROOMCOMPOSITEEGRESSREQUEST'].fields_by_name['file']._options = None _globals['_ROOMCOMPOSITEEGRESSREQUEST'].fields_by_name['file']._serialized_options = b'\030\001' - _globals['_ROOMCOMPOSITEEGRESSREQUEST'].fields_by_name['stream']._loaded_options = None + _globals['_ROOMCOMPOSITEEGRESSREQUEST'].fields_by_name['stream']._options = None _globals['_ROOMCOMPOSITEEGRESSREQUEST'].fields_by_name['stream']._serialized_options = b'\030\001' - _globals['_ROOMCOMPOSITEEGRESSREQUEST'].fields_by_name['segments']._loaded_options = None + _globals['_ROOMCOMPOSITEEGRESSREQUEST'].fields_by_name['segments']._options = None _globals['_ROOMCOMPOSITEEGRESSREQUEST'].fields_by_name['segments']._serialized_options = b'\030\001' - _globals['_WEBEGRESSREQUEST'].fields_by_name['file']._loaded_options = None + _globals['_WEBEGRESSREQUEST'].fields_by_name['file']._options = None _globals['_WEBEGRESSREQUEST'].fields_by_name['file']._serialized_options = b'\030\001' - _globals['_WEBEGRESSREQUEST'].fields_by_name['stream']._loaded_options = None + _globals['_WEBEGRESSREQUEST'].fields_by_name['stream']._options = None _globals['_WEBEGRESSREQUEST'].fields_by_name['stream']._serialized_options = b'\030\001' - _globals['_WEBEGRESSREQUEST'].fields_by_name['segments']._loaded_options = None + _globals['_WEBEGRESSREQUEST'].fields_by_name['segments']._options = None _globals['_WEBEGRESSREQUEST'].fields_by_name['segments']._serialized_options = b'\030\001' - _globals['_TRACKCOMPOSITEEGRESSREQUEST'].fields_by_name['file']._loaded_options = None + _globals['_TRACKCOMPOSITEEGRESSREQUEST'].fields_by_name['file']._options = None _globals['_TRACKCOMPOSITEEGRESSREQUEST'].fields_by_name['file']._serialized_options = b'\030\001' - _globals['_TRACKCOMPOSITEEGRESSREQUEST'].fields_by_name['stream']._loaded_options = None + _globals['_TRACKCOMPOSITEEGRESSREQUEST'].fields_by_name['stream']._options = None _globals['_TRACKCOMPOSITEEGRESSREQUEST'].fields_by_name['stream']._serialized_options = b'\030\001' - _globals['_TRACKCOMPOSITEEGRESSREQUEST'].fields_by_name['segments']._loaded_options = None + _globals['_TRACKCOMPOSITEEGRESSREQUEST'].fields_by_name['segments']._options = None _globals['_TRACKCOMPOSITEEGRESSREQUEST'].fields_by_name['segments']._serialized_options = b'\030\001' - _globals['_S3UPLOAD_METADATAENTRY']._loaded_options = None + _globals['_S3UPLOAD_METADATAENTRY']._options = None _globals['_S3UPLOAD_METADATAENTRY']._serialized_options = b'8\001' - _globals['_EGRESSINFO'].fields_by_name['stream']._loaded_options = None + _globals['_EGRESSINFO'].fields_by_name['stream']._options = None _globals['_EGRESSINFO'].fields_by_name['stream']._serialized_options = b'\030\001' - _globals['_EGRESSINFO'].fields_by_name['file']._loaded_options = None + _globals['_EGRESSINFO'].fields_by_name['file']._options = None _globals['_EGRESSINFO'].fields_by_name['file']._serialized_options = b'\030\001' - _globals['_EGRESSINFO'].fields_by_name['segments']._loaded_options = None + _globals['_EGRESSINFO'].fields_by_name['segments']._options = None _globals['_EGRESSINFO'].fields_by_name['segments']._serialized_options = b'\030\001' - _globals['_STREAMINFOLIST']._loaded_options = None + _globals['_STREAMINFOLIST']._options = None _globals['_STREAMINFOLIST']._serialized_options = b'\030\001' _globals['_ENCODEDFILETYPE']._serialized_start=6954 _globals['_ENCODEDFILETYPE']._serialized_end=7011 diff --git a/livekit-protocol/livekit/protocol/ingress.py b/livekit-protocol/livekit/protocol/ingress.py index 2c1bb720..7e29ad86 100644 --- a/livekit-protocol/livekit/protocol/ingress.py +++ b/livekit-protocol/livekit/protocol/ingress.py @@ -1,22 +1,12 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: livekit_ingress.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 4.25.3 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder -_runtime_version.ValidateProtobufRuntimeVersion( - _runtime_version.Domain.PUBLIC, - 5, - 28, - 0, - '', - 'livekit_ingress.proto' -) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -30,14 +20,14 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ingress', _globals) -if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' - _globals['_CREATEINGRESSREQUEST'].fields_by_name['bypass_transcoding']._loaded_options = None + _globals['_CREATEINGRESSREQUEST'].fields_by_name['bypass_transcoding']._options = None _globals['_CREATEINGRESSREQUEST'].fields_by_name['bypass_transcoding']._serialized_options = b'\030\001' - _globals['_INGRESSINFO'].fields_by_name['bypass_transcoding']._loaded_options = None + _globals['_INGRESSINFO'].fields_by_name['bypass_transcoding']._options = None _globals['_INGRESSINFO'].fields_by_name['bypass_transcoding']._serialized_options = b'\030\001' - _globals['_UPDATEINGRESSREQUEST'].fields_by_name['bypass_transcoding']._loaded_options = None + _globals['_UPDATEINGRESSREQUEST'].fields_by_name['bypass_transcoding']._options = None _globals['_UPDATEINGRESSREQUEST'].fields_by_name['bypass_transcoding']._serialized_options = b'\030\001' _globals['_INGRESSINPUT']._serialized_start=2742 _globals['_INGRESSINPUT']._serialized_end=2803 diff --git a/livekit-protocol/livekit/protocol/models.py b/livekit-protocol/livekit/protocol/models.py index 75a95f2e..373529d7 100644 --- a/livekit-protocol/livekit/protocol/models.py +++ b/livekit-protocol/livekit/protocol/models.py @@ -1,22 +1,12 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: livekit_models.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 4.25.3 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder -_runtime_version.ValidateProtobufRuntimeVersion( - _runtime_version.Domain.PUBLIC, - 5, - 28, - 0, - '', - 'livekit_models.proto' -) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -31,28 +21,28 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'models', _globals) -if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' - _globals['_PARTICIPANTPERMISSION'].fields_by_name['recorder']._loaded_options = None + _globals['_PARTICIPANTPERMISSION'].fields_by_name['recorder']._options = None _globals['_PARTICIPANTPERMISSION'].fields_by_name['recorder']._serialized_options = b'\030\001' - _globals['_PARTICIPANTPERMISSION'].fields_by_name['agent']._loaded_options = None + _globals['_PARTICIPANTPERMISSION'].fields_by_name['agent']._options = None _globals['_PARTICIPANTPERMISSION'].fields_by_name['agent']._serialized_options = b'\030\001' - _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._loaded_options = None + _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._options = None _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._serialized_options = b'8\001' - _globals['_DATAPACKET'].fields_by_name['kind']._loaded_options = None + _globals['_DATAPACKET'].fields_by_name['kind']._options = None _globals['_DATAPACKET'].fields_by_name['kind']._serialized_options = b'\030\001' - _globals['_DATAPACKET'].fields_by_name['speaker']._loaded_options = None + _globals['_DATAPACKET'].fields_by_name['speaker']._options = None _globals['_DATAPACKET'].fields_by_name['speaker']._serialized_options = b'\030\001' - _globals['_USERPACKET'].fields_by_name['participant_sid']._loaded_options = None + _globals['_USERPACKET'].fields_by_name['participant_sid']._options = None _globals['_USERPACKET'].fields_by_name['participant_sid']._serialized_options = b'\030\001' - _globals['_USERPACKET'].fields_by_name['participant_identity']._loaded_options = None + _globals['_USERPACKET'].fields_by_name['participant_identity']._options = None _globals['_USERPACKET'].fields_by_name['participant_identity']._serialized_options = b'\030\001' - _globals['_USERPACKET'].fields_by_name['destination_sids']._loaded_options = None + _globals['_USERPACKET'].fields_by_name['destination_sids']._options = None _globals['_USERPACKET'].fields_by_name['destination_sids']._serialized_options = b'\030\001' - _globals['_USERPACKET'].fields_by_name['destination_identities']._loaded_options = None + _globals['_USERPACKET'].fields_by_name['destination_identities']._options = None _globals['_USERPACKET'].fields_by_name['destination_identities']._serialized_options = b'\030\001' - _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._loaded_options = None + _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._options = None _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._serialized_options = b'8\001' _globals['_AUDIOCODEC']._serialized_start=7564 _globals['_AUDIOCODEC']._serialized_end=7611 diff --git a/livekit-protocol/livekit/protocol/room.py b/livekit-protocol/livekit/protocol/room.py index 85ffe6b7..dcb52b33 100644 --- a/livekit-protocol/livekit/protocol/room.py +++ b/livekit-protocol/livekit/protocol/room.py @@ -1,22 +1,12 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: livekit_room.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 4.25.3 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder -_runtime_version.ValidateProtobufRuntimeVersion( - _runtime_version.Domain.PUBLIC, - 5, - 28, - 0, - '', - 'livekit_room.proto' -) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -32,12 +22,12 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'room', _globals) -if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' - _globals['_UPDATEPARTICIPANTREQUEST_ATTRIBUTESENTRY']._loaded_options = None + _globals['_UPDATEPARTICIPANTREQUEST_ATTRIBUTESENTRY']._options = None _globals['_UPDATEPARTICIPANTREQUEST_ATTRIBUTESENTRY']._serialized_options = b'8\001' - _globals['_SENDDATAREQUEST'].fields_by_name['destination_sids']._loaded_options = None + _globals['_SENDDATAREQUEST'].fields_by_name['destination_sids']._options = None _globals['_SENDDATAREQUEST'].fields_by_name['destination_sids']._serialized_options = b'\030\001' _globals['_CREATEROOMREQUEST']._serialized_start=106 _globals['_CREATEROOMREQUEST']._serialized_end=443 diff --git a/livekit-protocol/livekit/protocol/sip.py b/livekit-protocol/livekit/protocol/sip.py index dca5cf43..f48d581b 100644 --- a/livekit-protocol/livekit/protocol/sip.py +++ b/livekit-protocol/livekit/protocol/sip.py @@ -1,22 +1,12 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: livekit_sip.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 4.25.3 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder -_runtime_version.ValidateProtobufRuntimeVersion( - _runtime_version.Domain.PUBLIC, - 5, - 28, - 0, - '', - 'livekit_sip.proto' -) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -30,38 +20,38 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sip', _globals) -if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' - _globals['_CREATESIPTRUNKREQUEST'].fields_by_name['inbound_numbers_regex']._loaded_options = None + _globals['_CREATESIPTRUNKREQUEST'].fields_by_name['inbound_numbers_regex']._options = None _globals['_CREATESIPTRUNKREQUEST'].fields_by_name['inbound_numbers_regex']._serialized_options = b'\030\001' - _globals['_CREATESIPTRUNKREQUEST']._loaded_options = None + _globals['_CREATESIPTRUNKREQUEST']._options = None _globals['_CREATESIPTRUNKREQUEST']._serialized_options = b'\030\001' - _globals['_SIPTRUNKINFO'].fields_by_name['inbound_numbers_regex']._loaded_options = None + _globals['_SIPTRUNKINFO'].fields_by_name['inbound_numbers_regex']._options = None _globals['_SIPTRUNKINFO'].fields_by_name['inbound_numbers_regex']._serialized_options = b'\030\001' - _globals['_SIPTRUNKINFO']._loaded_options = None + _globals['_SIPTRUNKINFO']._options = None _globals['_SIPTRUNKINFO']._serialized_options = b'\030\001' - _globals['_SIPINBOUNDTRUNKINFO_HEADERSENTRY']._loaded_options = None + _globals['_SIPINBOUNDTRUNKINFO_HEADERSENTRY']._options = None _globals['_SIPINBOUNDTRUNKINFO_HEADERSENTRY']._serialized_options = b'8\001' - _globals['_SIPINBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._loaded_options = None + _globals['_SIPINBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._options = None _globals['_SIPINBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._serialized_options = b'8\001' - _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSENTRY']._loaded_options = None + _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSENTRY']._options = None _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSENTRY']._serialized_options = b'8\001' - _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._loaded_options = None + _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._options = None _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._serialized_options = b'8\001' - _globals['_LISTSIPTRUNKREQUEST']._loaded_options = None + _globals['_LISTSIPTRUNKREQUEST']._options = None _globals['_LISTSIPTRUNKREQUEST']._serialized_options = b'\030\001' - _globals['_LISTSIPTRUNKRESPONSE']._loaded_options = None + _globals['_LISTSIPTRUNKRESPONSE']._options = None _globals['_LISTSIPTRUNKRESPONSE']._serialized_options = b'\030\001' - _globals['_CREATESIPDISPATCHRULEREQUEST_ATTRIBUTESENTRY']._loaded_options = None + _globals['_CREATESIPDISPATCHRULEREQUEST_ATTRIBUTESENTRY']._options = None _globals['_CREATESIPDISPATCHRULEREQUEST_ATTRIBUTESENTRY']._serialized_options = b'8\001' - _globals['_SIPDISPATCHRULEINFO_ATTRIBUTESENTRY']._loaded_options = None + _globals['_SIPDISPATCHRULEINFO_ATTRIBUTESENTRY']._options = None _globals['_SIPDISPATCHRULEINFO_ATTRIBUTESENTRY']._serialized_options = b'8\001' - _globals['_CREATESIPPARTICIPANTREQUEST_PARTICIPANTATTRIBUTESENTRY']._loaded_options = None + _globals['_CREATESIPPARTICIPANTREQUEST_PARTICIPANTATTRIBUTESENTRY']._options = None _globals['_CREATESIPPARTICIPANTREQUEST_PARTICIPANTATTRIBUTESENTRY']._serialized_options = b'8\001' - _globals['_SIP'].methods_by_name['CreateSIPTrunk']._loaded_options = None + _globals['_SIP'].methods_by_name['CreateSIPTrunk']._options = None _globals['_SIP'].methods_by_name['CreateSIPTrunk']._serialized_options = b'\210\002\001' - _globals['_SIP'].methods_by_name['ListSIPTrunk']._loaded_options = None + _globals['_SIP'].methods_by_name['ListSIPTrunk']._options = None _globals['_SIP'].methods_by_name['ListSIPTrunk']._serialized_options = b'\210\002\001' _globals['_SIPTRANSPORT']._serialized_start=4345 _globals['_SIPTRANSPORT']._serialized_end=4452 diff --git a/livekit-protocol/livekit/protocol/webhook.py b/livekit-protocol/livekit/protocol/webhook.py index 2ced9367..7c9f12c4 100644 --- a/livekit-protocol/livekit/protocol/webhook.py +++ b/livekit-protocol/livekit/protocol/webhook.py @@ -1,22 +1,12 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: livekit_webhook.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 4.25.3 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder -_runtime_version.ValidateProtobufRuntimeVersion( - _runtime_version.Domain.PUBLIC, - 5, - 28, - 0, - '', - 'livekit_webhook.proto' -) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -32,8 +22,8 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'webhook', _globals) -if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' _globals['_WEBHOOKEVENT']._serialized_start=102 _globals['_WEBHOOKEVENT']._serialized_end=381 From 7e01e90f87153401ed5cf7eefc39fb113c77c231 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 8 Oct 2024 13:05:40 -0700 Subject: [PATCH 06/53] Close to working --- examples/rpc.py | 151 +++++++++++++ livekit-protocol/livekit/protocol/agent.py | 4 +- .../livekit/protocol/agent_dispatch.py | 4 +- .../livekit/protocol/analytics.py | 48 ++-- .../livekit/protocol/analytics.pyi | 6 +- livekit-protocol/livekit/protocol/egress.py | 4 +- livekit-protocol/livekit/protocol/ingress.py | 4 +- livekit-protocol/livekit/protocol/models.py | 211 ++++++++---------- livekit-protocol/livekit/protocol/models.pyi | 121 +--------- livekit-protocol/livekit/protocol/room.py | 4 +- livekit-protocol/livekit/protocol/sip.py | 151 +++++-------- livekit-protocol/livekit/protocol/sip.pyi | 95 +------- livekit-protocol/livekit/protocol/webhook.py | 4 +- livekit-protocol/protocol | 2 +- livekit-rtc/livekit/rtc/participant.py | 20 +- livekit-rtc/livekit/rtc/room.py | 11 +- 16 files changed, 382 insertions(+), 458 deletions(-) create mode 100644 examples/rpc.py diff --git a/examples/rpc.py b/examples/rpc.py new file mode 100644 index 00000000..5a5de3ad --- /dev/null +++ b/examples/rpc.py @@ -0,0 +1,151 @@ +from livekit import rtc, api +import os +import json +import asyncio +from dotenv import load_dotenv + +load_dotenv(dotenv_path='.env.local', override=False) +LIVEKIT_API_KEY = os.getenv('LIVEKIT_API_KEY') +LIVEKIT_API_SECRET = os.getenv('LIVEKIT_API_SECRET') +LIVEKIT_URL = os.getenv('LIVEKIT_URL') +if not LIVEKIT_API_KEY or not LIVEKIT_API_SECRET or not LIVEKIT_URL: + raise ValueError('Missing required environment variables. Please check your .env.local file.') + +async def main(): + room_name = f"rpc-test-{os.urandom(4).hex()}" + + print(f"Connecting participants to room: {room_name}") + + callers_room, greeters_room, math_genius_room = await asyncio.gather( + connect_participant('caller', room_name), + connect_participant('greeter', room_name), + connect_participant('math-genius', room_name) + ) + + # Register all methods for the receiving participant + await register_receiver_methods(greeters_room, math_genius_room) + + try: + print('\n\nRunning greeting example...') + await asyncio.gather(perform_greeting(callers_room)) + except Exception as error: + print('Error:', error) + + try: + print('\n\nRunning math example...') + await asyncio.gather( + perform_square_root(callers_room), + asyncio.sleep(2), + perform_quantum_hypergeometric_series(callers_room) + ) + except Exception as error: + print('Error:', error) + + print('\n\nParticipants done, disconnecting...') + await callers_room.disconnect() + await greeters_room.disconnect() + await math_genius_room.disconnect() + + print('Participants disconnected. Example completed.') + +async def register_receiver_methods(greeters_room: rtc.Room, math_genius_room: rtc.Room): + async def arrival_method(request_id: str, caller: rtc.RemoteParticipant, payload: str, response_timeout_ms: int): + print(f"[Greeter] Oh {caller.identity} arrived and said \"{payload}\"") + await asyncio.sleep(2) + return "Welcome and have a wonderful day!" + + async def square_root_method(request_id: str, caller: rtc.RemoteParticipant, payload: str, response_timeout_ms: int): + json_data = json.loads(payload) + number = json_data['number'] + print(f"[Math Genius] I guess {caller.identity} wants the square root of {number}. I've only got {response_timeout_ms / 1000} seconds to respond but I think I can pull it off.") + + print("[Math Genius] *doing math*…") + await asyncio.sleep(2) + + result = number ** 0.5 + print(f"[Math Genius] Aha! It's {result}") + return json.dumps({"result": result}) + + await greeters_room.local_participant.register_rpc_method('arrival', arrival_method) + await math_genius_room.local_participant.register_rpc_method('square-root', square_root_method) + +async def perform_greeting(room: rtc.Room): + print("[Caller] Letting the greeter know that I've arrived") + try: + response = await room.local_participant.perform_rpc('greeter', 'arrival', 'Hello') + print(f"[Caller] That's nice, the greeter said: \"{response}\"") + except Exception as error: + print('[Caller] RPC call failed:', error) + raise + +async def perform_square_root(room: rtc.Room): + print("[Caller] What's the square root of 16?") + try: + response = await room.local_participant.perform_rpc('math-genius', 'square-root', json.dumps({"number": 16})) + parsed_response = json.loads(response) + print(f"[Caller] Nice, the answer was {parsed_response['result']}") + except Exception as error: + print('[Caller] RPC call failed:', error) + raise + +async def perform_quantum_hypergeometric_series(room: rtc.Room): + print("[Caller] What's the quantum hypergeometric series of 42?") + try: + response = await room.local_participant.perform_rpc( + 'math-genius', + 'quantum-hypergeometric-series', + json.dumps({"number": 42}) + ) + parsed_response = json.loads(response) + print(f"[Caller] genius says {parsed_response['result']}!") + except rtc.RpcError as error: + if error.code == rtc.RpcError.ErrorCode.UNSUPPORTED_METHOD: + print("[Caller] Aww looks like the genius doesn't know that one.") + return + print('[Caller] Unexpected error:', error) + raise + except Exception as error: + print('[Caller] Unexpected error:', error) + raise + +def create_token(identity: str, room_name: str): + token = api.AccessToken(LIVEKIT_API_KEY, LIVEKIT_API_SECRET) \ + .with_identity(identity) \ + .with_grants(api.VideoGrants( + room=room_name, + room_join=True, + can_publish=True, + can_subscribe=True, + )) + return token.to_jwt() + +async def connect_participant(identity: str, room_name: str) -> rtc.Room: + room = rtc.Room() + token = create_token(identity, room_name) + + def on_disconnected(): + print(f"[{identity}] Disconnected from room") + + room.on('disconnected', on_disconnected) + + await room.connect(LIVEKIT_URL, token) + + async def wait_for_participants(): + if room.remote_participants: + return + participant_connected = asyncio.Event() + def _on_participant_connected(participant: rtc.RemoteParticipant): + room.off('participant_connected', _on_participant_connected) + participant_connected.set() + room.on('participant_connected', _on_participant_connected) + await participant_connected.wait() + + try: + await asyncio.wait_for(wait_for_participants(), timeout=5.0) + except asyncio.TimeoutError: + raise TimeoutError('Timed out waiting for participants') + + return room + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/livekit-protocol/livekit/protocol/agent.py b/livekit-protocol/livekit/protocol/agent.py index dcc08102..3b218c78 100644 --- a/livekit-protocol/livekit/protocol/agent.py +++ b/livekit-protocol/livekit/protocol/agent.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: livekit_agent.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -13,7 +13,7 @@ _runtime_version.Domain.PUBLIC, 5, 28, - 0, + 2, '', 'livekit_agent.proto' ) diff --git a/livekit-protocol/livekit/protocol/agent_dispatch.py b/livekit-protocol/livekit/protocol/agent_dispatch.py index 5f4dfc99..411f1c5b 100644 --- a/livekit-protocol/livekit/protocol/agent_dispatch.py +++ b/livekit-protocol/livekit/protocol/agent_dispatch.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: livekit_agent_dispatch.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -13,7 +13,7 @@ _runtime_version.Domain.PUBLIC, 5, 28, - 0, + 2, '', 'livekit_agent_dispatch.proto' ) diff --git a/livekit-protocol/livekit/protocol/analytics.py b/livekit-protocol/livekit/protocol/analytics.py index 4d9e88bc..d6aefe54 100644 --- a/livekit-protocol/livekit/protocol/analytics.py +++ b/livekit-protocol/livekit/protocol/analytics.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: livekit_analytics.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -13,7 +13,7 @@ _runtime_version.Domain.PUBLIC, 5, 28, - 0, + 2, '', 'livekit_analytics.proto' ) @@ -28,7 +28,7 @@ from . import ingress as _ingress_ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17livekit_analytics.proto\x12\x07livekit\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x14livekit_models.proto\x1a\x14livekit_egress.proto\x1a\x15livekit_ingress.proto\"T\n\x13\x41nalyticsVideoLayer\x12\r\n\x05layer\x18\x01 \x01(\x05\x12\x0f\n\x07packets\x18\x02 \x01(\r\x12\r\n\x05\x62ytes\x18\x03 \x01(\x04\x12\x0e\n\x06\x66rames\x18\x04 \x01(\r\"\xd3\x03\n\x0f\x41nalyticsStream\x12\x0c\n\x04ssrc\x18\x01 \x01(\r\x12\x17\n\x0fprimary_packets\x18\x02 \x01(\r\x12\x15\n\rprimary_bytes\x18\x03 \x01(\x04\x12\x1a\n\x12retransmit_packets\x18\x04 \x01(\r\x12\x18\n\x10retransmit_bytes\x18\x05 \x01(\x04\x12\x17\n\x0fpadding_packets\x18\x06 \x01(\r\x12\x15\n\rpadding_bytes\x18\x07 \x01(\x04\x12\x14\n\x0cpackets_lost\x18\x08 \x01(\r\x12\x0e\n\x06\x66rames\x18\t \x01(\r\x12\x0b\n\x03rtt\x18\n \x01(\r\x12\x0e\n\x06jitter\x18\x0b \x01(\r\x12\r\n\x05nacks\x18\x0c \x01(\r\x12\x0c\n\x04plis\x18\r \x01(\r\x12\x0c\n\x04\x66irs\x18\x0e \x01(\r\x12\x32\n\x0cvideo_layers\x18\x0f \x03(\x0b\x32\x1c.livekit.AnalyticsVideoLayer\x12.\n\nstart_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1c\n\x14packets_out_of_order\x18\x13 \x01(\r\"\xd2\x02\n\rAnalyticsStat\x12\n\n\x02id\x18\x0e \x01(\t\x12\x15\n\ranalytics_key\x18\x01 \x01(\t\x12!\n\x04kind\x18\x02 \x01(\x0e\x32\x13.livekit.StreamType\x12.\n\ntime_stamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04node\x18\x04 \x01(\t\x12\x0f\n\x07room_id\x18\x05 \x01(\t\x12\x11\n\troom_name\x18\x06 \x01(\t\x12\x16\n\x0eparticipant_id\x18\x07 \x01(\t\x12\x10\n\x08track_id\x18\x08 \x01(\t\x12\r\n\x05score\x18\t \x01(\x02\x12)\n\x07streams\x18\n \x03(\x0b\x32\x18.livekit.AnalyticsStream\x12\x0c\n\x04mime\x18\x0b \x01(\t\x12\x11\n\tmin_score\x18\x0c \x01(\x02\x12\x14\n\x0cmedian_score\x18\r \x01(\x02\"7\n\x0e\x41nalyticsStats\x12%\n\x05stats\x18\x01 \x03(\x0b\x32\x16.livekit.AnalyticsStat\"\x9a\x02\n\x13\x41nalyticsClientMeta\x12\x0e\n\x06region\x18\x01 \x01(\t\x12\x0c\n\x04node\x18\x02 \x01(\t\x12\x13\n\x0b\x63lient_addr\x18\x03 \x01(\t\x12\x1b\n\x13\x63lient_connect_time\x18\x04 \x01(\r\x12\x17\n\x0f\x63onnection_type\x18\x05 \x01(\t\x12\x32\n\x10reconnect_reason\x18\x06 \x01(\x0e\x32\x18.livekit.ReconnectReason\x12\x15\n\x08geo_hash\x18\x07 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07\x63ountry\x18\x08 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x07isp_asn\x18\t \x01(\rH\x02\x88\x01\x01\x42\x0b\n\t_geo_hashB\n\n\x08_countryB\n\n\x08_isp_asn\"\xda\x05\n\x0e\x41nalyticsEvent\x12\n\n\x02id\x18\x19 \x01(\t\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.livekit.AnalyticsEventType\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07room_id\x18\x03 \x01(\t\x12\x1b\n\x04room\x18\x04 \x01(\x0b\x32\r.livekit.Room\x12\x16\n\x0eparticipant_id\x18\x05 \x01(\t\x12-\n\x0bparticipant\x18\x06 \x01(\x0b\x32\x18.livekit.ParticipantInfo\x12\x10\n\x08track_id\x18\x07 \x01(\t\x12!\n\x05track\x18\x08 \x01(\x0b\x32\x12.livekit.TrackInfo\x12\x15\n\ranalytics_key\x18\n \x01(\t\x12(\n\x0b\x63lient_info\x18\x0b \x01(\x0b\x32\x13.livekit.ClientInfo\x12\x31\n\x0b\x63lient_meta\x18\x0c \x01(\x0b\x32\x1c.livekit.AnalyticsClientMeta\x12\x11\n\tegress_id\x18\r \x01(\t\x12\x12\n\ningress_id\x18\x13 \x01(\t\x12;\n\x1cmax_subscribed_video_quality\x18\x0e \x01(\x0e\x32\x15.livekit.VideoQuality\x12+\n\tpublisher\x18\x0f \x01(\x0b\x32\x18.livekit.ParticipantInfo\x12\x0c\n\x04mime\x18\x10 \x01(\t\x12#\n\x06\x65gress\x18\x11 \x01(\x0b\x32\x13.livekit.EgressInfo\x12%\n\x07ingress\x18\x12 \x01(\x0b\x32\x14.livekit.IngressInfo\x12\r\n\x05\x65rror\x18\x14 \x01(\t\x12$\n\trtp_stats\x18\x15 \x01(\x0b\x32\x11.livekit.RTPStats\x12\x13\n\x0bvideo_layer\x18\x16 \x01(\x05\x12\x0f\n\x07node_id\x18\x18 \x01(\t\":\n\x0f\x41nalyticsEvents\x12\'\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x17.livekit.AnalyticsEvent\"\xa4\x01\n\x18\x41nalyticsRoomParticipant\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12-\n\x05state\x18\x04 \x01(\x0e\x32\x1e.livekit.ParticipantInfo.State\x12-\n\tjoined_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xa6\x01\n\rAnalyticsRoom\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x12\n\nproject_id\x18\x05 \x01(\t\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x0cparticipants\x18\x04 \x03(\x0b\x32!.livekit.AnalyticsRoomParticipant\"\x94\x01\n\x12\x41nalyticsNodeRooms\x12\x0f\n\x07node_id\x18\x01 \x01(\t\x12\x17\n\x0fsequence_number\x18\x02 \x01(\x04\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12%\n\x05rooms\x18\x04 \x03(\x0b\x32\x16.livekit.AnalyticsRoom**\n\nStreamType\x12\x0c\n\x08UPSTREAM\x10\x00\x12\x0e\n\nDOWNSTREAM\x10\x01*\x95\x05\n\x12\x41nalyticsEventType\x12\x10\n\x0cROOM_CREATED\x10\x00\x12\x0e\n\nROOM_ENDED\x10\x01\x12\x16\n\x12PARTICIPANT_JOINED\x10\x02\x12\x14\n\x10PARTICIPANT_LEFT\x10\x03\x12\x13\n\x0fTRACK_PUBLISHED\x10\x04\x12\x1b\n\x17TRACK_PUBLISH_REQUESTED\x10\x14\x12\x15\n\x11TRACK_UNPUBLISHED\x10\x05\x12\x14\n\x10TRACK_SUBSCRIBED\x10\x06\x12\x1d\n\x19TRACK_SUBSCRIBE_REQUESTED\x10\x15\x12\x1a\n\x16TRACK_SUBSCRIBE_FAILED\x10\x19\x12\x16\n\x12TRACK_UNSUBSCRIBED\x10\x07\x12\x1a\n\x16TRACK_PUBLISHED_UPDATE\x10\n\x12\x0f\n\x0bTRACK_MUTED\x10\x17\x12\x11\n\rTRACK_UNMUTED\x10\x18\x12\x17\n\x13TRACK_PUBLISH_STATS\x10\x1a\x12\x19\n\x15TRACK_SUBSCRIBE_STATS\x10\x1b\x12\x16\n\x12PARTICIPANT_ACTIVE\x10\x0b\x12\x17\n\x13PARTICIPANT_RESUMED\x10\x16\x12\x12\n\x0e\x45GRESS_STARTED\x10\x0c\x12\x10\n\x0c\x45GRESS_ENDED\x10\r\x12\x12\n\x0e\x45GRESS_UPDATED\x10\x1c\x12&\n\"TRACK_MAX_SUBSCRIBED_VIDEO_QUALITY\x10\x0e\x12\x0f\n\x0bRECONNECTED\x10\x0f\x12\x13\n\x0fINGRESS_CREATED\x10\x12\x12\x13\n\x0fINGRESS_DELETED\x10\x13\x12\x13\n\x0fINGRESS_STARTED\x10\x10\x12\x11\n\rINGRESS_ENDED\x10\x11\x12\x13\n\x0fINGRESS_UPDATED\x10\x1d\x42\x46Z#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17livekit_analytics.proto\x12\x07livekit\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x14livekit_models.proto\x1a\x14livekit_egress.proto\x1a\x15livekit_ingress.proto\"T\n\x13\x41nalyticsVideoLayer\x12\r\n\x05layer\x18\x01 \x01(\x05\x12\x0f\n\x07packets\x18\x02 \x01(\r\x12\r\n\x05\x62ytes\x18\x03 \x01(\x04\x12\x0e\n\x06\x66rames\x18\x04 \x01(\r\"\xb5\x03\n\x0f\x41nalyticsStream\x12\x0c\n\x04ssrc\x18\x01 \x01(\r\x12\x17\n\x0fprimary_packets\x18\x02 \x01(\r\x12\x15\n\rprimary_bytes\x18\x03 \x01(\x04\x12\x1a\n\x12retransmit_packets\x18\x04 \x01(\r\x12\x18\n\x10retransmit_bytes\x18\x05 \x01(\x04\x12\x17\n\x0fpadding_packets\x18\x06 \x01(\r\x12\x15\n\rpadding_bytes\x18\x07 \x01(\x04\x12\x14\n\x0cpackets_lost\x18\x08 \x01(\r\x12\x0e\n\x06\x66rames\x18\t \x01(\r\x12\x0b\n\x03rtt\x18\n \x01(\r\x12\x0e\n\x06jitter\x18\x0b \x01(\r\x12\r\n\x05nacks\x18\x0c \x01(\r\x12\x0c\n\x04plis\x18\r \x01(\r\x12\x0c\n\x04\x66irs\x18\x0e \x01(\r\x12\x32\n\x0cvideo_layers\x18\x0f \x03(\x0b\x32\x1c.livekit.AnalyticsVideoLayer\x12.\n\nstart_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd2\x02\n\rAnalyticsStat\x12\n\n\x02id\x18\x0e \x01(\t\x12\x15\n\ranalytics_key\x18\x01 \x01(\t\x12!\n\x04kind\x18\x02 \x01(\x0e\x32\x13.livekit.StreamType\x12.\n\ntime_stamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04node\x18\x04 \x01(\t\x12\x0f\n\x07room_id\x18\x05 \x01(\t\x12\x11\n\troom_name\x18\x06 \x01(\t\x12\x16\n\x0eparticipant_id\x18\x07 \x01(\t\x12\x10\n\x08track_id\x18\x08 \x01(\t\x12\r\n\x05score\x18\t \x01(\x02\x12)\n\x07streams\x18\n \x03(\x0b\x32\x18.livekit.AnalyticsStream\x12\x0c\n\x04mime\x18\x0b \x01(\t\x12\x11\n\tmin_score\x18\x0c \x01(\x02\x12\x14\n\x0cmedian_score\x18\r \x01(\x02\"7\n\x0e\x41nalyticsStats\x12%\n\x05stats\x18\x01 \x03(\x0b\x32\x16.livekit.AnalyticsStat\"\x9a\x02\n\x13\x41nalyticsClientMeta\x12\x0e\n\x06region\x18\x01 \x01(\t\x12\x0c\n\x04node\x18\x02 \x01(\t\x12\x13\n\x0b\x63lient_addr\x18\x03 \x01(\t\x12\x1b\n\x13\x63lient_connect_time\x18\x04 \x01(\r\x12\x17\n\x0f\x63onnection_type\x18\x05 \x01(\t\x12\x32\n\x10reconnect_reason\x18\x06 \x01(\x0e\x32\x18.livekit.ReconnectReason\x12\x15\n\x08geo_hash\x18\x07 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07\x63ountry\x18\x08 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x07isp_asn\x18\t \x01(\rH\x02\x88\x01\x01\x42\x0b\n\t_geo_hashB\n\n\x08_countryB\n\n\x08_isp_asn\"\xda\x05\n\x0e\x41nalyticsEvent\x12\n\n\x02id\x18\x19 \x01(\t\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.livekit.AnalyticsEventType\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07room_id\x18\x03 \x01(\t\x12\x1b\n\x04room\x18\x04 \x01(\x0b\x32\r.livekit.Room\x12\x16\n\x0eparticipant_id\x18\x05 \x01(\t\x12-\n\x0bparticipant\x18\x06 \x01(\x0b\x32\x18.livekit.ParticipantInfo\x12\x10\n\x08track_id\x18\x07 \x01(\t\x12!\n\x05track\x18\x08 \x01(\x0b\x32\x12.livekit.TrackInfo\x12\x15\n\ranalytics_key\x18\n \x01(\t\x12(\n\x0b\x63lient_info\x18\x0b \x01(\x0b\x32\x13.livekit.ClientInfo\x12\x31\n\x0b\x63lient_meta\x18\x0c \x01(\x0b\x32\x1c.livekit.AnalyticsClientMeta\x12\x11\n\tegress_id\x18\r \x01(\t\x12\x12\n\ningress_id\x18\x13 \x01(\t\x12;\n\x1cmax_subscribed_video_quality\x18\x0e \x01(\x0e\x32\x15.livekit.VideoQuality\x12+\n\tpublisher\x18\x0f \x01(\x0b\x32\x18.livekit.ParticipantInfo\x12\x0c\n\x04mime\x18\x10 \x01(\t\x12#\n\x06\x65gress\x18\x11 \x01(\x0b\x32\x13.livekit.EgressInfo\x12%\n\x07ingress\x18\x12 \x01(\x0b\x32\x14.livekit.IngressInfo\x12\r\n\x05\x65rror\x18\x14 \x01(\t\x12$\n\trtp_stats\x18\x15 \x01(\x0b\x32\x11.livekit.RTPStats\x12\x13\n\x0bvideo_layer\x18\x16 \x01(\x05\x12\x0f\n\x07node_id\x18\x18 \x01(\t\":\n\x0f\x41nalyticsEvents\x12\'\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x17.livekit.AnalyticsEvent\"\xa4\x01\n\x18\x41nalyticsRoomParticipant\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12-\n\x05state\x18\x04 \x01(\x0e\x32\x1e.livekit.ParticipantInfo.State\x12-\n\tjoined_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xa6\x01\n\rAnalyticsRoom\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x12\n\nproject_id\x18\x05 \x01(\t\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x0cparticipants\x18\x04 \x03(\x0b\x32!.livekit.AnalyticsRoomParticipant\"\x94\x01\n\x12\x41nalyticsNodeRooms\x12\x0f\n\x07node_id\x18\x01 \x01(\t\x12\x17\n\x0fsequence_number\x18\x02 \x01(\x04\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12%\n\x05rooms\x18\x04 \x03(\x0b\x32\x16.livekit.AnalyticsRoom**\n\nStreamType\x12\x0c\n\x08UPSTREAM\x10\x00\x12\x0e\n\nDOWNSTREAM\x10\x01*\x95\x05\n\x12\x41nalyticsEventType\x12\x10\n\x0cROOM_CREATED\x10\x00\x12\x0e\n\nROOM_ENDED\x10\x01\x12\x16\n\x12PARTICIPANT_JOINED\x10\x02\x12\x14\n\x10PARTICIPANT_LEFT\x10\x03\x12\x13\n\x0fTRACK_PUBLISHED\x10\x04\x12\x1b\n\x17TRACK_PUBLISH_REQUESTED\x10\x14\x12\x15\n\x11TRACK_UNPUBLISHED\x10\x05\x12\x14\n\x10TRACK_SUBSCRIBED\x10\x06\x12\x1d\n\x19TRACK_SUBSCRIBE_REQUESTED\x10\x15\x12\x1a\n\x16TRACK_SUBSCRIBE_FAILED\x10\x19\x12\x16\n\x12TRACK_UNSUBSCRIBED\x10\x07\x12\x1a\n\x16TRACK_PUBLISHED_UPDATE\x10\n\x12\x0f\n\x0bTRACK_MUTED\x10\x17\x12\x11\n\rTRACK_UNMUTED\x10\x18\x12\x17\n\x13TRACK_PUBLISH_STATS\x10\x1a\x12\x19\n\x15TRACK_SUBSCRIBE_STATS\x10\x1b\x12\x16\n\x12PARTICIPANT_ACTIVE\x10\x0b\x12\x17\n\x13PARTICIPANT_RESUMED\x10\x16\x12\x12\n\x0e\x45GRESS_STARTED\x10\x0c\x12\x10\n\x0c\x45GRESS_ENDED\x10\r\x12\x12\n\x0e\x45GRESS_UPDATED\x10\x1c\x12&\n\"TRACK_MAX_SUBSCRIBED_VIDEO_QUALITY\x10\x0e\x12\x0f\n\x0bRECONNECTED\x10\x0f\x12\x13\n\x0fINGRESS_CREATED\x10\x12\x12\x13\n\x0fINGRESS_DELETED\x10\x13\x12\x13\n\x0fINGRESS_STARTED\x10\x10\x12\x11\n\rINGRESS_ENDED\x10\x11\x12\x13\n\x0fINGRESS_UPDATED\x10\x1d\x42\x46Z#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -36,28 +36,28 @@ if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' - _globals['_STREAMTYPE']._serialized_start=2655 - _globals['_STREAMTYPE']._serialized_end=2697 - _globals['_ANALYTICSEVENTTYPE']._serialized_start=2700 - _globals['_ANALYTICSEVENTTYPE']._serialized_end=3361 + _globals['_STREAMTYPE']._serialized_start=2625 + _globals['_STREAMTYPE']._serialized_end=2667 + _globals['_ANALYTICSEVENTTYPE']._serialized_start=2670 + _globals['_ANALYTICSEVENTTYPE']._serialized_end=3331 _globals['_ANALYTICSVIDEOLAYER']._serialized_start=136 _globals['_ANALYTICSVIDEOLAYER']._serialized_end=220 _globals['_ANALYTICSSTREAM']._serialized_start=223 - _globals['_ANALYTICSSTREAM']._serialized_end=690 - _globals['_ANALYTICSSTAT']._serialized_start=693 - _globals['_ANALYTICSSTAT']._serialized_end=1031 - _globals['_ANALYTICSSTATS']._serialized_start=1033 - _globals['_ANALYTICSSTATS']._serialized_end=1088 - _globals['_ANALYTICSCLIENTMETA']._serialized_start=1091 - _globals['_ANALYTICSCLIENTMETA']._serialized_end=1373 - _globals['_ANALYTICSEVENT']._serialized_start=1376 - _globals['_ANALYTICSEVENT']._serialized_end=2106 - _globals['_ANALYTICSEVENTS']._serialized_start=2108 - _globals['_ANALYTICSEVENTS']._serialized_end=2166 - _globals['_ANALYTICSROOMPARTICIPANT']._serialized_start=2169 - _globals['_ANALYTICSROOMPARTICIPANT']._serialized_end=2333 - _globals['_ANALYTICSROOM']._serialized_start=2336 - _globals['_ANALYTICSROOM']._serialized_end=2502 - _globals['_ANALYTICSNODEROOMS']._serialized_start=2505 - _globals['_ANALYTICSNODEROOMS']._serialized_end=2653 + _globals['_ANALYTICSSTREAM']._serialized_end=660 + _globals['_ANALYTICSSTAT']._serialized_start=663 + _globals['_ANALYTICSSTAT']._serialized_end=1001 + _globals['_ANALYTICSSTATS']._serialized_start=1003 + _globals['_ANALYTICSSTATS']._serialized_end=1058 + _globals['_ANALYTICSCLIENTMETA']._serialized_start=1061 + _globals['_ANALYTICSCLIENTMETA']._serialized_end=1343 + _globals['_ANALYTICSEVENT']._serialized_start=1346 + _globals['_ANALYTICSEVENT']._serialized_end=2076 + _globals['_ANALYTICSEVENTS']._serialized_start=2078 + _globals['_ANALYTICSEVENTS']._serialized_end=2136 + _globals['_ANALYTICSROOMPARTICIPANT']._serialized_start=2139 + _globals['_ANALYTICSROOMPARTICIPANT']._serialized_end=2303 + _globals['_ANALYTICSROOM']._serialized_start=2306 + _globals['_ANALYTICSROOM']._serialized_end=2472 + _globals['_ANALYTICSNODEROOMS']._serialized_start=2475 + _globals['_ANALYTICSNODEROOMS']._serialized_end=2623 # @@protoc_insertion_point(module_scope) diff --git a/livekit-protocol/livekit/protocol/analytics.pyi b/livekit-protocol/livekit/protocol/analytics.pyi index 2a4c096d..30cfbd50 100644 --- a/livekit-protocol/livekit/protocol/analytics.pyi +++ b/livekit-protocol/livekit/protocol/analytics.pyi @@ -89,7 +89,7 @@ class AnalyticsVideoLayer(_message.Message): def __init__(self, layer: _Optional[int] = ..., packets: _Optional[int] = ..., bytes: _Optional[int] = ..., frames: _Optional[int] = ...) -> None: ... class AnalyticsStream(_message.Message): - __slots__ = ("ssrc", "primary_packets", "primary_bytes", "retransmit_packets", "retransmit_bytes", "padding_packets", "padding_bytes", "packets_lost", "frames", "rtt", "jitter", "nacks", "plis", "firs", "video_layers", "start_time", "end_time", "packets_out_of_order") + __slots__ = ("ssrc", "primary_packets", "primary_bytes", "retransmit_packets", "retransmit_bytes", "padding_packets", "padding_bytes", "packets_lost", "frames", "rtt", "jitter", "nacks", "plis", "firs", "video_layers", "start_time", "end_time") SSRC_FIELD_NUMBER: _ClassVar[int] PRIMARY_PACKETS_FIELD_NUMBER: _ClassVar[int] PRIMARY_BYTES_FIELD_NUMBER: _ClassVar[int] @@ -107,7 +107,6 @@ class AnalyticsStream(_message.Message): VIDEO_LAYERS_FIELD_NUMBER: _ClassVar[int] START_TIME_FIELD_NUMBER: _ClassVar[int] END_TIME_FIELD_NUMBER: _ClassVar[int] - PACKETS_OUT_OF_ORDER_FIELD_NUMBER: _ClassVar[int] ssrc: int primary_packets: int primary_bytes: int @@ -125,8 +124,7 @@ class AnalyticsStream(_message.Message): video_layers: _containers.RepeatedCompositeFieldContainer[AnalyticsVideoLayer] start_time: _timestamp_pb2.Timestamp end_time: _timestamp_pb2.Timestamp - packets_out_of_order: int - def __init__(self, ssrc: _Optional[int] = ..., primary_packets: _Optional[int] = ..., primary_bytes: _Optional[int] = ..., retransmit_packets: _Optional[int] = ..., retransmit_bytes: _Optional[int] = ..., padding_packets: _Optional[int] = ..., padding_bytes: _Optional[int] = ..., packets_lost: _Optional[int] = ..., frames: _Optional[int] = ..., rtt: _Optional[int] = ..., jitter: _Optional[int] = ..., nacks: _Optional[int] = ..., plis: _Optional[int] = ..., firs: _Optional[int] = ..., video_layers: _Optional[_Iterable[_Union[AnalyticsVideoLayer, _Mapping]]] = ..., start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., packets_out_of_order: _Optional[int] = ...) -> None: ... + def __init__(self, ssrc: _Optional[int] = ..., primary_packets: _Optional[int] = ..., primary_bytes: _Optional[int] = ..., retransmit_packets: _Optional[int] = ..., retransmit_bytes: _Optional[int] = ..., padding_packets: _Optional[int] = ..., padding_bytes: _Optional[int] = ..., packets_lost: _Optional[int] = ..., frames: _Optional[int] = ..., rtt: _Optional[int] = ..., jitter: _Optional[int] = ..., nacks: _Optional[int] = ..., plis: _Optional[int] = ..., firs: _Optional[int] = ..., video_layers: _Optional[_Iterable[_Union[AnalyticsVideoLayer, _Mapping]]] = ..., start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class AnalyticsStat(_message.Message): __slots__ = ("id", "analytics_key", "kind", "time_stamp", "node", "room_id", "room_name", "participant_id", "track_id", "score", "streams", "mime", "min_score", "median_score") diff --git a/livekit-protocol/livekit/protocol/egress.py b/livekit-protocol/livekit/protocol/egress.py index 55ea3811..c19e7db8 100644 --- a/livekit-protocol/livekit/protocol/egress.py +++ b/livekit-protocol/livekit/protocol/egress.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: livekit_egress.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -13,7 +13,7 @@ _runtime_version.Domain.PUBLIC, 5, 28, - 0, + 2, '', 'livekit_egress.proto' ) diff --git a/livekit-protocol/livekit/protocol/ingress.py b/livekit-protocol/livekit/protocol/ingress.py index 2c1bb720..d7ef5114 100644 --- a/livekit-protocol/livekit/protocol/ingress.py +++ b/livekit-protocol/livekit/protocol/ingress.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: livekit_ingress.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -13,7 +13,7 @@ _runtime_version.Domain.PUBLIC, 5, 28, - 0, + 2, '', 'livekit_ingress.proto' ) diff --git a/livekit-protocol/livekit/protocol/models.py b/livekit-protocol/livekit/protocol/models.py index 75a95f2e..93d35bee 100644 --- a/livekit-protocol/livekit/protocol/models.py +++ b/livekit-protocol/livekit/protocol/models.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: livekit_models.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -13,7 +13,7 @@ _runtime_version.Domain.PUBLIC, 5, 28, - 0, + 2, '', 'livekit_models.proto' ) @@ -23,10 +23,9 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -import metrics as _metrics_ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14livekit_models.proto\x12\x07livekit\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x15livekit_metrics.proto\"\xc9\x02\n\x04Room\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x15\n\rempty_timeout\x18\x03 \x01(\r\x12\x19\n\x11\x64\x65parture_timeout\x18\x0e \x01(\r\x12\x18\n\x10max_participants\x18\x04 \x01(\r\x12\x15\n\rcreation_time\x18\x05 \x01(\x03\x12\x15\n\rturn_password\x18\x06 \x01(\t\x12&\n\x0e\x65nabled_codecs\x18\x07 \x03(\x0b\x32\x0e.livekit.Codec\x12\x10\n\x08metadata\x18\x08 \x01(\t\x12\x18\n\x10num_participants\x18\t \x01(\r\x12\x16\n\x0enum_publishers\x18\x0b \x01(\r\x12\x18\n\x10\x61\x63tive_recording\x18\n \x01(\x08\x12&\n\x07version\x18\r \x01(\x0b\x32\x15.livekit.TimedVersion\"(\n\x05\x43odec\x12\x0c\n\x04mime\x18\x01 \x01(\t\x12\x11\n\tfmtp_line\x18\x02 \x01(\t\"9\n\x0cPlayoutDelay\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0b\n\x03min\x18\x02 \x01(\r\x12\x0b\n\x03max\x18\x03 \x01(\r\"\x85\x02\n\x15ParticipantPermission\x12\x15\n\rcan_subscribe\x18\x01 \x01(\x08\x12\x13\n\x0b\x63\x61n_publish\x18\x02 \x01(\x08\x12\x18\n\x10\x63\x61n_publish_data\x18\x03 \x01(\x08\x12\x31\n\x13\x63\x61n_publish_sources\x18\t \x03(\x0e\x32\x14.livekit.TrackSource\x12\x0e\n\x06hidden\x18\x07 \x01(\x08\x12\x14\n\x08recorder\x18\x08 \x01(\x08\x42\x02\x18\x01\x12\x1b\n\x13\x63\x61n_update_metadata\x18\n \x01(\x08\x12\x11\n\x05\x61gent\x18\x0b \x01(\x08\x42\x02\x18\x01\x12\x1d\n\x15\x63\x61n_subscribe_metrics\x18\x0c \x01(\x08\"\xf8\x04\n\x0fParticipantInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12-\n\x05state\x18\x03 \x01(\x0e\x32\x1e.livekit.ParticipantInfo.State\x12\"\n\x06tracks\x18\x04 \x03(\x0b\x32\x12.livekit.TrackInfo\x12\x10\n\x08metadata\x18\x05 \x01(\t\x12\x11\n\tjoined_at\x18\x06 \x01(\x03\x12\x0c\n\x04name\x18\t \x01(\t\x12\x0f\n\x07version\x18\n \x01(\r\x12\x32\n\npermission\x18\x0b \x01(\x0b\x32\x1e.livekit.ParticipantPermission\x12\x0e\n\x06region\x18\x0c \x01(\t\x12\x14\n\x0cis_publisher\x18\r \x01(\x08\x12+\n\x04kind\x18\x0e \x01(\x0e\x32\x1d.livekit.ParticipantInfo.Kind\x12<\n\nattributes\x18\x0f \x03(\x0b\x32(.livekit.ParticipantInfo.AttributesEntry\x12\x34\n\x11\x64isconnect_reason\x18\x10 \x01(\x0e\x32\x19.livekit.DisconnectReason\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\">\n\x05State\x12\x0b\n\x07JOINING\x10\x00\x12\n\n\x06JOINED\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x10\n\x0c\x44ISCONNECTED\x10\x03\"A\n\x04Kind\x12\x0c\n\x08STANDARD\x10\x00\x12\x0b\n\x07INGRESS\x10\x01\x12\n\n\x06\x45GRESS\x10\x02\x12\x07\n\x03SIP\x10\x03\x12\t\n\x05\x41GENT\x10\x04\"3\n\nEncryption\"%\n\x04Type\x12\x08\n\x04NONE\x10\x00\x12\x07\n\x03GCM\x10\x01\x12\n\n\x06\x43USTOM\x10\x02\"f\n\x12SimulcastCodecInfo\x12\x11\n\tmime_type\x18\x01 \x01(\t\x12\x0b\n\x03mid\x18\x02 \x01(\t\x12\x0b\n\x03\x63id\x18\x03 \x01(\t\x12#\n\x06layers\x18\x04 \x03(\x0b\x32\x13.livekit.VideoLayer\"\xf5\x03\n\tTrackInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12 \n\x04type\x18\x02 \x01(\x0e\x32\x12.livekit.TrackType\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\r\n\x05muted\x18\x04 \x01(\x08\x12\r\n\x05width\x18\x05 \x01(\r\x12\x0e\n\x06height\x18\x06 \x01(\r\x12\x11\n\tsimulcast\x18\x07 \x01(\x08\x12\x13\n\x0b\x64isable_dtx\x18\x08 \x01(\x08\x12$\n\x06source\x18\t \x01(\x0e\x32\x14.livekit.TrackSource\x12#\n\x06layers\x18\n \x03(\x0b\x32\x13.livekit.VideoLayer\x12\x11\n\tmime_type\x18\x0b \x01(\t\x12\x0b\n\x03mid\x18\x0c \x01(\t\x12+\n\x06\x63odecs\x18\r \x03(\x0b\x32\x1b.livekit.SimulcastCodecInfo\x12\x0e\n\x06stereo\x18\x0e \x01(\x08\x12\x13\n\x0b\x64isable_red\x18\x0f \x01(\x08\x12,\n\nencryption\x18\x10 \x01(\x0e\x32\x18.livekit.Encryption.Type\x12\x0e\n\x06stream\x18\x11 \x01(\t\x12&\n\x07version\x18\x12 \x01(\x0b\x32\x15.livekit.TimedVersion\x12\x32\n\x0e\x61udio_features\x18\x13 \x03(\x0e\x32\x1a.livekit.AudioTrackFeature\"r\n\nVideoLayer\x12&\n\x07quality\x18\x01 \x01(\x0e\x32\x15.livekit.VideoQuality\x12\r\n\x05width\x18\x02 \x01(\r\x12\x0e\n\x06height\x18\x03 \x01(\r\x12\x0f\n\x07\x62itrate\x18\x04 \x01(\r\x12\x0c\n\x04ssrc\x18\x05 \x01(\r\"\xa7\x04\n\nDataPacket\x12*\n\x04kind\x18\x01 \x01(\x0e\x32\x18.livekit.DataPacket.KindB\x02\x18\x01\x12\x1c\n\x14participant_identity\x18\x04 \x01(\t\x12\x1e\n\x16\x64\x65stination_identities\x18\x05 \x03(\t\x12#\n\x04user\x18\x02 \x01(\x0b\x32\x13.livekit.UserPacketH\x00\x12\x33\n\x07speaker\x18\x03 \x01(\x0b\x32\x1c.livekit.ActiveSpeakerUpdateB\x02\x18\x01H\x00\x12$\n\x08sip_dtmf\x18\x06 \x01(\x0b\x32\x10.livekit.SipDTMFH\x00\x12/\n\rtranscription\x18\x07 \x01(\x0b\x32\x16.livekit.TranscriptionH\x00\x12(\n\x07metrics\x18\x08 \x01(\x0b\x32\x15.livekit.MetricsBatchH\x00\x12,\n\x0c\x63hat_message\x18\t \x01(\x0b\x32\x14.livekit.ChatMessageH\x00\x12*\n\x0brpc_request\x18\n \x01(\x0b\x32\x13.livekit.RpcRequestH\x00\x12\"\n\x07rpc_ack\x18\x0b \x01(\x0b\x32\x0f.livekit.RpcAckH\x00\x12,\n\x0crpc_response\x18\x0c \x01(\x0b\x32\x14.livekit.RpcResponseH\x00\"\x1f\n\x04Kind\x12\x0c\n\x08RELIABLE\x10\x00\x12\t\n\x05LOSSY\x10\x01\x42\x07\n\x05value\"=\n\x13\x41\x63tiveSpeakerUpdate\x12&\n\x08speakers\x18\x01 \x03(\x0b\x32\x14.livekit.SpeakerInfo\"9\n\x0bSpeakerInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\r\n\x05level\x18\x02 \x01(\x02\x12\x0e\n\x06\x61\x63tive\x18\x03 \x01(\x08\"\xa0\x02\n\nUserPacket\x12\x1b\n\x0fparticipant_sid\x18\x01 \x01(\tB\x02\x18\x01\x12 \n\x14participant_identity\x18\x05 \x01(\tB\x02\x18\x01\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\x12\x1c\n\x10\x64\x65stination_sids\x18\x03 \x03(\tB\x02\x18\x01\x12\"\n\x16\x64\x65stination_identities\x18\x06 \x03(\tB\x02\x18\x01\x12\x12\n\x05topic\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x0f\n\x02id\x18\x08 \x01(\tH\x01\x88\x01\x01\x12\x17\n\nstart_time\x18\t \x01(\x04H\x02\x88\x01\x01\x12\x15\n\x08\x65nd_time\x18\n \x01(\x04H\x03\x88\x01\x01\x42\x08\n\x06_topicB\x05\n\x03_idB\r\n\x0b_start_timeB\x0b\n\t_end_time\"&\n\x07SipDTMF\x12\x0c\n\x04\x63ode\x18\x03 \x01(\r\x12\r\n\x05\x64igit\x18\x04 \x01(\t\"|\n\rTranscription\x12(\n transcribed_participant_identity\x18\x02 \x01(\t\x12\x10\n\x08track_id\x18\x03 \x01(\t\x12/\n\x08segments\x18\x04 \x03(\x0b\x32\x1d.livekit.TranscriptionSegment\"w\n\x14TranscriptionSegment\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04text\x18\x02 \x01(\t\x12\x12\n\nstart_time\x18\x03 \x01(\x04\x12\x10\n\x08\x65nd_time\x18\x04 \x01(\x04\x12\r\n\x05\x66inal\x18\x05 \x01(\x08\x12\x10\n\x08language\x18\x06 \x01(\t\"\x91\x01\n\x0b\x43hatMessage\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\ttimestamp\x18\x02 \x01(\x03\x12\x1b\n\x0e\x65\x64it_timestamp\x18\x03 \x01(\x03H\x00\x88\x01\x01\x12\x0f\n\x07message\x18\x04 \x01(\t\x12\x0f\n\x07\x64\x65leted\x18\x05 \x01(\x08\x12\x11\n\tgenerated\x18\x06 \x01(\x08\x42\x11\n\x0f_edit_timestamp\"g\n\nRpcRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06method\x18\x02 \x01(\t\x12\x0f\n\x07payload\x18\x03 \x01(\t\x12\x1b\n\x13response_timeout_ms\x18\x04 \x01(\r\x12\x0f\n\x07version\x18\x05 \x01(\r\"\x1c\n\x06RpcAck\x12\x12\n\nrequest_id\x18\x01 \x01(\t\"a\n\x0bRpcResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x11\n\x07payload\x18\x02 \x01(\tH\x00\x12\"\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x11.livekit.RpcErrorH\x00\x42\x07\n\x05value\"7\n\x08RpcError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\t\"@\n\x11ParticipantTracks\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x12\n\ntrack_sids\x18\x02 \x03(\t\"\xce\x01\n\nServerInfo\x12,\n\x07\x65\x64ition\x18\x01 \x01(\x0e\x32\x1b.livekit.ServerInfo.Edition\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08protocol\x18\x03 \x01(\x05\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x0f\n\x07node_id\x18\x05 \x01(\t\x12\x12\n\ndebug_info\x18\x06 \x01(\t\x12\x16\n\x0e\x61gent_protocol\x18\x07 \x01(\x05\"\"\n\x07\x45\x64ition\x12\x0c\n\x08Standard\x10\x00\x12\t\n\x05\x43loud\x10\x01\"\x8a\x03\n\nClientInfo\x12$\n\x03sdk\x18\x01 \x01(\x0e\x32\x17.livekit.ClientInfo.SDK\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08protocol\x18\x03 \x01(\x05\x12\n\n\x02os\x18\x04 \x01(\t\x12\x12\n\nos_version\x18\x05 \x01(\t\x12\x14\n\x0c\x64\x65vice_model\x18\x06 \x01(\t\x12\x0f\n\x07\x62rowser\x18\x07 \x01(\t\x12\x17\n\x0f\x62rowser_version\x18\x08 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\t \x01(\t\x12\x0f\n\x07network\x18\n \x01(\t\x12\x12\n\nother_sdks\x18\x0b \x01(\t\"\x9c\x01\n\x03SDK\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x06\n\x02JS\x10\x01\x12\t\n\x05SWIFT\x10\x02\x12\x0b\n\x07\x41NDROID\x10\x03\x12\x0b\n\x07\x46LUTTER\x10\x04\x12\x06\n\x02GO\x10\x05\x12\t\n\x05UNITY\x10\x06\x12\x10\n\x0cREACT_NATIVE\x10\x07\x12\x08\n\x04RUST\x10\x08\x12\n\n\x06PYTHON\x10\t\x12\x07\n\x03\x43PP\x10\n\x12\r\n\tUNITY_WEB\x10\x0b\x12\x08\n\x04NODE\x10\x0c\"\x8c\x02\n\x13\x43lientConfiguration\x12*\n\x05video\x18\x01 \x01(\x0b\x32\x1b.livekit.VideoConfiguration\x12+\n\x06screen\x18\x02 \x01(\x0b\x32\x1b.livekit.VideoConfiguration\x12\x37\n\x11resume_connection\x18\x03 \x01(\x0e\x32\x1c.livekit.ClientConfigSetting\x12\x30\n\x0f\x64isabled_codecs\x18\x04 \x01(\x0b\x32\x17.livekit.DisabledCodecs\x12\x31\n\x0b\x66orce_relay\x18\x05 \x01(\x0e\x32\x1c.livekit.ClientConfigSetting\"L\n\x12VideoConfiguration\x12\x36\n\x10hardware_encoder\x18\x01 \x01(\x0e\x32\x1c.livekit.ClientConfigSetting\"Q\n\x0e\x44isabledCodecs\x12\x1e\n\x06\x63odecs\x18\x01 \x03(\x0b\x32\x0e.livekit.Codec\x12\x1f\n\x07publish\x18\x02 \x03(\x0b\x32\x0e.livekit.Codec\"\x80\x02\n\x08RTPDrift\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x64uration\x18\x03 \x01(\x01\x12\x17\n\x0fstart_timestamp\x18\x04 \x01(\x04\x12\x15\n\rend_timestamp\x18\x05 \x01(\x04\x12\x17\n\x0frtp_clock_ticks\x18\x06 \x01(\x04\x12\x15\n\rdrift_samples\x18\x07 \x01(\x03\x12\x10\n\x08\x64rift_ms\x18\x08 \x01(\x01\x12\x12\n\nclock_rate\x18\t \x01(\x01\"\xd6\n\n\x08RTPStats\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x64uration\x18\x03 \x01(\x01\x12\x0f\n\x07packets\x18\x04 \x01(\r\x12\x13\n\x0bpacket_rate\x18\x05 \x01(\x01\x12\r\n\x05\x62ytes\x18\x06 \x01(\x04\x12\x14\n\x0cheader_bytes\x18\' \x01(\x04\x12\x0f\n\x07\x62itrate\x18\x07 \x01(\x01\x12\x14\n\x0cpackets_lost\x18\x08 \x01(\r\x12\x18\n\x10packet_loss_rate\x18\t \x01(\x01\x12\x1e\n\x16packet_loss_percentage\x18\n \x01(\x02\x12\x19\n\x11packets_duplicate\x18\x0b \x01(\r\x12\x1d\n\x15packet_duplicate_rate\x18\x0c \x01(\x01\x12\x17\n\x0f\x62ytes_duplicate\x18\r \x01(\x04\x12\x1e\n\x16header_bytes_duplicate\x18( \x01(\x04\x12\x19\n\x11\x62itrate_duplicate\x18\x0e \x01(\x01\x12\x17\n\x0fpackets_padding\x18\x0f \x01(\r\x12\x1b\n\x13packet_padding_rate\x18\x10 \x01(\x01\x12\x15\n\rbytes_padding\x18\x11 \x01(\x04\x12\x1c\n\x14header_bytes_padding\x18) \x01(\x04\x12\x17\n\x0f\x62itrate_padding\x18\x12 \x01(\x01\x12\x1c\n\x14packets_out_of_order\x18\x13 \x01(\r\x12\x0e\n\x06\x66rames\x18\x14 \x01(\r\x12\x12\n\nframe_rate\x18\x15 \x01(\x01\x12\x16\n\x0ejitter_current\x18\x16 \x01(\x01\x12\x12\n\njitter_max\x18\x17 \x01(\x01\x12:\n\rgap_histogram\x18\x18 \x03(\x0b\x32#.livekit.RTPStats.GapHistogramEntry\x12\r\n\x05nacks\x18\x19 \x01(\r\x12\x11\n\tnack_acks\x18% \x01(\r\x12\x13\n\x0bnack_misses\x18\x1a \x01(\r\x12\x15\n\rnack_repeated\x18& \x01(\r\x12\x0c\n\x04plis\x18\x1b \x01(\r\x12,\n\x08last_pli\x18\x1c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x66irs\x18\x1d \x01(\r\x12,\n\x08last_fir\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0brtt_current\x18\x1f \x01(\r\x12\x0f\n\x07rtt_max\x18 \x01(\r\x12\x12\n\nkey_frames\x18! \x01(\r\x12\x32\n\x0elast_key_frame\x18\" \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0flayer_lock_plis\x18# \x01(\r\x12\x37\n\x13last_layer_lock_pli\x18$ \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\'\n\x0cpacket_drift\x18, \x01(\x0b\x32\x11.livekit.RTPDrift\x12+\n\x10ntp_report_drift\x18- \x01(\x0b\x32\x11.livekit.RTPDrift\x12/\n\x14rebased_report_drift\x18. \x01(\x0b\x32\x11.livekit.RTPDrift\x12\x30\n\x15received_report_drift\x18/ \x01(\x0b\x32\x11.livekit.RTPDrift\x1a\x33\n\x11GapHistogramEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\"\xa2\x01\n\x15RTCPSenderReportState\x12\x15\n\rrtp_timestamp\x18\x01 \x01(\r\x12\x19\n\x11rtp_timestamp_ext\x18\x02 \x01(\x04\x12\x15\n\rntp_timestamp\x18\x03 \x01(\x04\x12\n\n\x02\x61t\x18\x04 \x01(\x03\x12\x13\n\x0b\x61t_adjusted\x18\x05 \x01(\x03\x12\x0f\n\x07packets\x18\x06 \x01(\r\x12\x0e\n\x06octets\x18\x07 \x01(\x04\"\xc9\x02\n\x11RTPForwarderState\x12\x0f\n\x07started\x18\x01 \x01(\x08\x12\x1f\n\x17reference_layer_spatial\x18\x02 \x01(\x05\x12\x16\n\x0epre_start_time\x18\x03 \x01(\x03\x12\x1b\n\x13\x65xt_first_timestamp\x18\x04 \x01(\x04\x12$\n\x1c\x64ummy_start_timestamp_offset\x18\x05 \x01(\x04\x12+\n\nrtp_munger\x18\x06 \x01(\x0b\x32\x17.livekit.RTPMungerState\x12-\n\nvp8_munger\x18\x07 \x01(\x0b\x32\x17.livekit.VP8MungerStateH\x00\x12;\n\x13sender_report_state\x18\x08 \x03(\x0b\x32\x1e.livekit.RTCPSenderReportStateB\x0e\n\x0c\x63odec_munger\"\xcb\x01\n\x0eRTPMungerState\x12 \n\x18\x65xt_last_sequence_number\x18\x01 \x01(\x04\x12\'\n\x1f\x65xt_second_last_sequence_number\x18\x02 \x01(\x04\x12\x1a\n\x12\x65xt_last_timestamp\x18\x03 \x01(\x04\x12!\n\x19\x65xt_second_last_timestamp\x18\x04 \x01(\x04\x12\x13\n\x0blast_marker\x18\x05 \x01(\x08\x12\x1a\n\x12second_last_marker\x18\x06 \x01(\x08\"\xb8\x01\n\x0eVP8MungerState\x12\x1b\n\x13\x65xt_last_picture_id\x18\x01 \x01(\x05\x12\x17\n\x0fpicture_id_used\x18\x02 \x01(\x08\x12\x18\n\x10last_tl0_pic_idx\x18\x03 \x01(\r\x12\x18\n\x10tl0_pic_idx_used\x18\x04 \x01(\x08\x12\x10\n\x08tid_used\x18\x05 \x01(\x08\x12\x14\n\x0clast_key_idx\x18\x06 \x01(\r\x12\x14\n\x0ckey_idx_used\x18\x07 \x01(\x08\"1\n\x0cTimedVersion\x12\x12\n\nunix_micro\x18\x01 \x01(\x03\x12\r\n\x05ticks\x18\x02 \x01(\x05*/\n\nAudioCodec\x12\x0e\n\nDEFAULT_AC\x10\x00\x12\x08\n\x04OPUS\x10\x01\x12\x07\n\x03\x41\x41\x43\x10\x02*V\n\nVideoCodec\x12\x0e\n\nDEFAULT_VC\x10\x00\x12\x11\n\rH264_BASELINE\x10\x01\x12\r\n\tH264_MAIN\x10\x02\x12\r\n\tH264_HIGH\x10\x03\x12\x07\n\x03VP8\x10\x04*)\n\nImageCodec\x12\x0e\n\nIC_DEFAULT\x10\x00\x12\x0b\n\x07IC_JPEG\x10\x01*+\n\tTrackType\x12\t\n\x05\x41UDIO\x10\x00\x12\t\n\x05VIDEO\x10\x01\x12\x08\n\x04\x44\x41TA\x10\x02*`\n\x0bTrackSource\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x43\x41MERA\x10\x01\x12\x0e\n\nMICROPHONE\x10\x02\x12\x10\n\x0cSCREEN_SHARE\x10\x03\x12\x16\n\x12SCREEN_SHARE_AUDIO\x10\x04*6\n\x0cVideoQuality\x12\x07\n\x03LOW\x10\x00\x12\n\n\x06MEDIUM\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\x07\n\x03OFF\x10\x03*@\n\x11\x43onnectionQuality\x12\x08\n\x04POOR\x10\x00\x12\x08\n\x04GOOD\x10\x01\x12\r\n\tEXCELLENT\x10\x02\x12\x08\n\x04LOST\x10\x03*;\n\x13\x43lientConfigSetting\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02*\xec\x01\n\x10\x44isconnectReason\x12\x12\n\x0eUNKNOWN_REASON\x10\x00\x12\x14\n\x10\x43LIENT_INITIATED\x10\x01\x12\x16\n\x12\x44UPLICATE_IDENTITY\x10\x02\x12\x13\n\x0fSERVER_SHUTDOWN\x10\x03\x12\x17\n\x13PARTICIPANT_REMOVED\x10\x04\x12\x10\n\x0cROOM_DELETED\x10\x05\x12\x12\n\x0eSTATE_MISMATCH\x10\x06\x12\x10\n\x0cJOIN_FAILURE\x10\x07\x12\r\n\tMIGRATION\x10\x08\x12\x10\n\x0cSIGNAL_CLOSE\x10\t\x12\x0f\n\x0bROOM_CLOSED\x10\n*\x89\x01\n\x0fReconnectReason\x12\x0e\n\nRR_UNKNOWN\x10\x00\x12\x1a\n\x16RR_SIGNAL_DISCONNECTED\x10\x01\x12\x17\n\x13RR_PUBLISHER_FAILED\x10\x02\x12\x18\n\x14RR_SUBSCRIBER_FAILED\x10\x03\x12\x17\n\x13RR_SWITCH_CANDIDATE\x10\x04*T\n\x11SubscriptionError\x12\x0e\n\nSE_UNKNOWN\x10\x00\x12\x18\n\x14SE_CODEC_UNSUPPORTED\x10\x01\x12\x15\n\x11SE_TRACK_NOTFOUND\x10\x02*\xa3\x01\n\x11\x41udioTrackFeature\x12\r\n\tTF_STEREO\x10\x00\x12\r\n\tTF_NO_DTX\x10\x01\x12\x18\n\x14TF_AUTO_GAIN_CONTROL\x10\x02\x12\x18\n\x14TF_ECHO_CANCELLATION\x10\x03\x12\x18\n\x14TF_NOISE_SUPPRESSION\x10\x04\x12\"\n\x1eTF_ENHANCED_NOISE_CANCELLATION\x10\x05\x42\x46Z#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14livekit_models.proto\x12\x07livekit\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc9\x02\n\x04Room\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x15\n\rempty_timeout\x18\x03 \x01(\r\x12\x19\n\x11\x64\x65parture_timeout\x18\x0e \x01(\r\x12\x18\n\x10max_participants\x18\x04 \x01(\r\x12\x15\n\rcreation_time\x18\x05 \x01(\x03\x12\x15\n\rturn_password\x18\x06 \x01(\t\x12&\n\x0e\x65nabled_codecs\x18\x07 \x03(\x0b\x32\x0e.livekit.Codec\x12\x10\n\x08metadata\x18\x08 \x01(\t\x12\x18\n\x10num_participants\x18\t \x01(\r\x12\x16\n\x0enum_publishers\x18\x0b \x01(\r\x12\x18\n\x10\x61\x63tive_recording\x18\n \x01(\x08\x12&\n\x07version\x18\r \x01(\x0b\x32\x15.livekit.TimedVersion\"(\n\x05\x43odec\x12\x0c\n\x04mime\x18\x01 \x01(\t\x12\x11\n\tfmtp_line\x18\x02 \x01(\t\"9\n\x0cPlayoutDelay\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0b\n\x03min\x18\x02 \x01(\r\x12\x0b\n\x03max\x18\x03 \x01(\r\"\xe6\x01\n\x15ParticipantPermission\x12\x15\n\rcan_subscribe\x18\x01 \x01(\x08\x12\x13\n\x0b\x63\x61n_publish\x18\x02 \x01(\x08\x12\x18\n\x10\x63\x61n_publish_data\x18\x03 \x01(\x08\x12\x31\n\x13\x63\x61n_publish_sources\x18\t \x03(\x0e\x32\x14.livekit.TrackSource\x12\x0e\n\x06hidden\x18\x07 \x01(\x08\x12\x14\n\x08recorder\x18\x08 \x01(\x08\x42\x02\x18\x01\x12\x1b\n\x13\x63\x61n_update_metadata\x18\n \x01(\x08\x12\x11\n\x05\x61gent\x18\x0b \x01(\x08\x42\x02\x18\x01\"\xf8\x04\n\x0fParticipantInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12-\n\x05state\x18\x03 \x01(\x0e\x32\x1e.livekit.ParticipantInfo.State\x12\"\n\x06tracks\x18\x04 \x03(\x0b\x32\x12.livekit.TrackInfo\x12\x10\n\x08metadata\x18\x05 \x01(\t\x12\x11\n\tjoined_at\x18\x06 \x01(\x03\x12\x0c\n\x04name\x18\t \x01(\t\x12\x0f\n\x07version\x18\n \x01(\r\x12\x32\n\npermission\x18\x0b \x01(\x0b\x32\x1e.livekit.ParticipantPermission\x12\x0e\n\x06region\x18\x0c \x01(\t\x12\x14\n\x0cis_publisher\x18\r \x01(\x08\x12+\n\x04kind\x18\x0e \x01(\x0e\x32\x1d.livekit.ParticipantInfo.Kind\x12<\n\nattributes\x18\x0f \x03(\x0b\x32(.livekit.ParticipantInfo.AttributesEntry\x12\x34\n\x11\x64isconnect_reason\x18\x10 \x01(\x0e\x32\x19.livekit.DisconnectReason\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\">\n\x05State\x12\x0b\n\x07JOINING\x10\x00\x12\n\n\x06JOINED\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x10\n\x0c\x44ISCONNECTED\x10\x03\"A\n\x04Kind\x12\x0c\n\x08STANDARD\x10\x00\x12\x0b\n\x07INGRESS\x10\x01\x12\n\n\x06\x45GRESS\x10\x02\x12\x07\n\x03SIP\x10\x03\x12\t\n\x05\x41GENT\x10\x04\"3\n\nEncryption\"%\n\x04Type\x12\x08\n\x04NONE\x10\x00\x12\x07\n\x03GCM\x10\x01\x12\n\n\x06\x43USTOM\x10\x02\"f\n\x12SimulcastCodecInfo\x12\x11\n\tmime_type\x18\x01 \x01(\t\x12\x0b\n\x03mid\x18\x02 \x01(\t\x12\x0b\n\x03\x63id\x18\x03 \x01(\t\x12#\n\x06layers\x18\x04 \x03(\x0b\x32\x13.livekit.VideoLayer\"\xf5\x03\n\tTrackInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12 \n\x04type\x18\x02 \x01(\x0e\x32\x12.livekit.TrackType\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\r\n\x05muted\x18\x04 \x01(\x08\x12\r\n\x05width\x18\x05 \x01(\r\x12\x0e\n\x06height\x18\x06 \x01(\r\x12\x11\n\tsimulcast\x18\x07 \x01(\x08\x12\x13\n\x0b\x64isable_dtx\x18\x08 \x01(\x08\x12$\n\x06source\x18\t \x01(\x0e\x32\x14.livekit.TrackSource\x12#\n\x06layers\x18\n \x03(\x0b\x32\x13.livekit.VideoLayer\x12\x11\n\tmime_type\x18\x0b \x01(\t\x12\x0b\n\x03mid\x18\x0c \x01(\t\x12+\n\x06\x63odecs\x18\r \x03(\x0b\x32\x1b.livekit.SimulcastCodecInfo\x12\x0e\n\x06stereo\x18\x0e \x01(\x08\x12\x13\n\x0b\x64isable_red\x18\x0f \x01(\x08\x12,\n\nencryption\x18\x10 \x01(\x0e\x32\x18.livekit.Encryption.Type\x12\x0e\n\x06stream\x18\x11 \x01(\t\x12&\n\x07version\x18\x12 \x01(\x0b\x32\x15.livekit.TimedVersion\x12\x32\n\x0e\x61udio_features\x18\x13 \x03(\x0e\x32\x1a.livekit.AudioTrackFeature\"r\n\nVideoLayer\x12&\n\x07quality\x18\x01 \x01(\x0e\x32\x15.livekit.VideoQuality\x12\r\n\x05width\x18\x02 \x01(\r\x12\x0e\n\x06height\x18\x03 \x01(\r\x12\x0f\n\x07\x62itrate\x18\x04 \x01(\r\x12\x0c\n\x04ssrc\x18\x05 \x01(\r\"\xd1\x02\n\nDataPacket\x12*\n\x04kind\x18\x01 \x01(\x0e\x32\x18.livekit.DataPacket.KindB\x02\x18\x01\x12\x1c\n\x14participant_identity\x18\x04 \x01(\t\x12\x1e\n\x16\x64\x65stination_identities\x18\x05 \x03(\t\x12#\n\x04user\x18\x02 \x01(\x0b\x32\x13.livekit.UserPacketH\x00\x12\x33\n\x07speaker\x18\x03 \x01(\x0b\x32\x1c.livekit.ActiveSpeakerUpdateB\x02\x18\x01H\x00\x12$\n\x08sip_dtmf\x18\x06 \x01(\x0b\x32\x10.livekit.SipDTMFH\x00\x12/\n\rtranscription\x18\x07 \x01(\x0b\x32\x16.livekit.TranscriptionH\x00\"\x1f\n\x04Kind\x12\x0c\n\x08RELIABLE\x10\x00\x12\t\n\x05LOSSY\x10\x01\x42\x07\n\x05value\"=\n\x13\x41\x63tiveSpeakerUpdate\x12&\n\x08speakers\x18\x01 \x03(\x0b\x32\x14.livekit.SpeakerInfo\"9\n\x0bSpeakerInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\r\n\x05level\x18\x02 \x01(\x02\x12\x0e\n\x06\x61\x63tive\x18\x03 \x01(\x08\"\xa0\x02\n\nUserPacket\x12\x1b\n\x0fparticipant_sid\x18\x01 \x01(\tB\x02\x18\x01\x12 \n\x14participant_identity\x18\x05 \x01(\tB\x02\x18\x01\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\x12\x1c\n\x10\x64\x65stination_sids\x18\x03 \x03(\tB\x02\x18\x01\x12\"\n\x16\x64\x65stination_identities\x18\x06 \x03(\tB\x02\x18\x01\x12\x12\n\x05topic\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x0f\n\x02id\x18\x08 \x01(\tH\x01\x88\x01\x01\x12\x17\n\nstart_time\x18\t \x01(\x04H\x02\x88\x01\x01\x12\x15\n\x08\x65nd_time\x18\n \x01(\x04H\x03\x88\x01\x01\x42\x08\n\x06_topicB\x05\n\x03_idB\r\n\x0b_start_timeB\x0b\n\t_end_time\"&\n\x07SipDTMF\x12\x0c\n\x04\x63ode\x18\x03 \x01(\r\x12\r\n\x05\x64igit\x18\x04 \x01(\t\"|\n\rTranscription\x12(\n transcribed_participant_identity\x18\x02 \x01(\t\x12\x10\n\x08track_id\x18\x03 \x01(\t\x12/\n\x08segments\x18\x04 \x03(\x0b\x32\x1d.livekit.TranscriptionSegment\"w\n\x14TranscriptionSegment\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04text\x18\x02 \x01(\t\x12\x12\n\nstart_time\x18\x03 \x01(\x04\x12\x10\n\x08\x65nd_time\x18\x04 \x01(\x04\x12\r\n\x05\x66inal\x18\x05 \x01(\x08\x12\x10\n\x08language\x18\x06 \x01(\t\"@\n\x11ParticipantTracks\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x12\n\ntrack_sids\x18\x02 \x03(\t\"\xce\x01\n\nServerInfo\x12,\n\x07\x65\x64ition\x18\x01 \x01(\x0e\x32\x1b.livekit.ServerInfo.Edition\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08protocol\x18\x03 \x01(\x05\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x0f\n\x07node_id\x18\x05 \x01(\t\x12\x12\n\ndebug_info\x18\x06 \x01(\t\x12\x16\n\x0e\x61gent_protocol\x18\x07 \x01(\x05\"\"\n\x07\x45\x64ition\x12\x0c\n\x08Standard\x10\x00\x12\t\n\x05\x43loud\x10\x01\"\xdd\x02\n\nClientInfo\x12$\n\x03sdk\x18\x01 \x01(\x0e\x32\x17.livekit.ClientInfo.SDK\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08protocol\x18\x03 \x01(\x05\x12\n\n\x02os\x18\x04 \x01(\t\x12\x12\n\nos_version\x18\x05 \x01(\t\x12\x14\n\x0c\x64\x65vice_model\x18\x06 \x01(\t\x12\x0f\n\x07\x62rowser\x18\x07 \x01(\t\x12\x17\n\x0f\x62rowser_version\x18\x08 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\t \x01(\t\x12\x0f\n\x07network\x18\n \x01(\t\"\x83\x01\n\x03SDK\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x06\n\x02JS\x10\x01\x12\t\n\x05SWIFT\x10\x02\x12\x0b\n\x07\x41NDROID\x10\x03\x12\x0b\n\x07\x46LUTTER\x10\x04\x12\x06\n\x02GO\x10\x05\x12\t\n\x05UNITY\x10\x06\x12\x10\n\x0cREACT_NATIVE\x10\x07\x12\x08\n\x04RUST\x10\x08\x12\n\n\x06PYTHON\x10\t\x12\x07\n\x03\x43PP\x10\n\"\x8c\x02\n\x13\x43lientConfiguration\x12*\n\x05video\x18\x01 \x01(\x0b\x32\x1b.livekit.VideoConfiguration\x12+\n\x06screen\x18\x02 \x01(\x0b\x32\x1b.livekit.VideoConfiguration\x12\x37\n\x11resume_connection\x18\x03 \x01(\x0e\x32\x1c.livekit.ClientConfigSetting\x12\x30\n\x0f\x64isabled_codecs\x18\x04 \x01(\x0b\x32\x17.livekit.DisabledCodecs\x12\x31\n\x0b\x66orce_relay\x18\x05 \x01(\x0e\x32\x1c.livekit.ClientConfigSetting\"L\n\x12VideoConfiguration\x12\x36\n\x10hardware_encoder\x18\x01 \x01(\x0e\x32\x1c.livekit.ClientConfigSetting\"Q\n\x0e\x44isabledCodecs\x12\x1e\n\x06\x63odecs\x18\x01 \x03(\x0b\x32\x0e.livekit.Codec\x12\x1f\n\x07publish\x18\x02 \x03(\x0b\x32\x0e.livekit.Codec\"\x80\x02\n\x08RTPDrift\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x64uration\x18\x03 \x01(\x01\x12\x17\n\x0fstart_timestamp\x18\x04 \x01(\x04\x12\x15\n\rend_timestamp\x18\x05 \x01(\x04\x12\x17\n\x0frtp_clock_ticks\x18\x06 \x01(\x04\x12\x15\n\rdrift_samples\x18\x07 \x01(\x03\x12\x10\n\x08\x64rift_ms\x18\x08 \x01(\x01\x12\x12\n\nclock_rate\x18\t \x01(\x01\"\xa0\n\n\x08RTPStats\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x64uration\x18\x03 \x01(\x01\x12\x0f\n\x07packets\x18\x04 \x01(\r\x12\x13\n\x0bpacket_rate\x18\x05 \x01(\x01\x12\r\n\x05\x62ytes\x18\x06 \x01(\x04\x12\x14\n\x0cheader_bytes\x18\' \x01(\x04\x12\x0f\n\x07\x62itrate\x18\x07 \x01(\x01\x12\x14\n\x0cpackets_lost\x18\x08 \x01(\r\x12\x18\n\x10packet_loss_rate\x18\t \x01(\x01\x12\x1e\n\x16packet_loss_percentage\x18\n \x01(\x02\x12\x19\n\x11packets_duplicate\x18\x0b \x01(\r\x12\x1d\n\x15packet_duplicate_rate\x18\x0c \x01(\x01\x12\x17\n\x0f\x62ytes_duplicate\x18\r \x01(\x04\x12\x1e\n\x16header_bytes_duplicate\x18( \x01(\x04\x12\x19\n\x11\x62itrate_duplicate\x18\x0e \x01(\x01\x12\x17\n\x0fpackets_padding\x18\x0f \x01(\r\x12\x1b\n\x13packet_padding_rate\x18\x10 \x01(\x01\x12\x15\n\rbytes_padding\x18\x11 \x01(\x04\x12\x1c\n\x14header_bytes_padding\x18) \x01(\x04\x12\x17\n\x0f\x62itrate_padding\x18\x12 \x01(\x01\x12\x1c\n\x14packets_out_of_order\x18\x13 \x01(\r\x12\x0e\n\x06\x66rames\x18\x14 \x01(\r\x12\x12\n\nframe_rate\x18\x15 \x01(\x01\x12\x16\n\x0ejitter_current\x18\x16 \x01(\x01\x12\x12\n\njitter_max\x18\x17 \x01(\x01\x12:\n\rgap_histogram\x18\x18 \x03(\x0b\x32#.livekit.RTPStats.GapHistogramEntry\x12\r\n\x05nacks\x18\x19 \x01(\r\x12\x11\n\tnack_acks\x18% \x01(\r\x12\x13\n\x0bnack_misses\x18\x1a \x01(\r\x12\x15\n\rnack_repeated\x18& \x01(\r\x12\x0c\n\x04plis\x18\x1b \x01(\r\x12,\n\x08last_pli\x18\x1c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x66irs\x18\x1d \x01(\r\x12,\n\x08last_fir\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0brtt_current\x18\x1f \x01(\r\x12\x0f\n\x07rtt_max\x18 \x01(\r\x12\x12\n\nkey_frames\x18! \x01(\r\x12\x32\n\x0elast_key_frame\x18\" \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0flayer_lock_plis\x18# \x01(\r\x12\x37\n\x13last_layer_lock_pli\x18$ \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\'\n\x0cpacket_drift\x18, \x01(\x0b\x32\x11.livekit.RTPDrift\x12\'\n\x0creport_drift\x18- \x01(\x0b\x32\x11.livekit.RTPDrift\x12/\n\x14rebased_report_drift\x18. \x01(\x0b\x32\x11.livekit.RTPDrift\x1a\x33\n\x11GapHistogramEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\"\x8c\x02\n\x11RTPForwarderState\x12\x0f\n\x07started\x18\x01 \x01(\x08\x12\x1f\n\x17reference_layer_spatial\x18\x02 \x01(\x05\x12\x16\n\x0epre_start_time\x18\x03 \x01(\x03\x12\x1b\n\x13\x65xt_first_timestamp\x18\x04 \x01(\x04\x12$\n\x1c\x64ummy_start_timestamp_offset\x18\x05 \x01(\x04\x12+\n\nrtp_munger\x18\x06 \x01(\x0b\x32\x17.livekit.RTPMungerState\x12-\n\nvp8_munger\x18\x07 \x01(\x0b\x32\x17.livekit.VP8MungerStateH\x00\x42\x0e\n\x0c\x63odec_munger\"\xcb\x01\n\x0eRTPMungerState\x12 \n\x18\x65xt_last_sequence_number\x18\x01 \x01(\x04\x12\'\n\x1f\x65xt_second_last_sequence_number\x18\x02 \x01(\x04\x12\x1a\n\x12\x65xt_last_timestamp\x18\x03 \x01(\x04\x12!\n\x19\x65xt_second_last_timestamp\x18\x04 \x01(\x04\x12\x13\n\x0blast_marker\x18\x05 \x01(\x08\x12\x1a\n\x12second_last_marker\x18\x06 \x01(\x08\"\xb8\x01\n\x0eVP8MungerState\x12\x1b\n\x13\x65xt_last_picture_id\x18\x01 \x01(\x05\x12\x17\n\x0fpicture_id_used\x18\x02 \x01(\x08\x12\x18\n\x10last_tl0_pic_idx\x18\x03 \x01(\r\x12\x18\n\x10tl0_pic_idx_used\x18\x04 \x01(\x08\x12\x10\n\x08tid_used\x18\x05 \x01(\x08\x12\x14\n\x0clast_key_idx\x18\x06 \x01(\r\x12\x14\n\x0ckey_idx_used\x18\x07 \x01(\x08\"1\n\x0cTimedVersion\x12\x12\n\nunix_micro\x18\x01 \x01(\x03\x12\r\n\x05ticks\x18\x02 \x01(\x05*/\n\nAudioCodec\x12\x0e\n\nDEFAULT_AC\x10\x00\x12\x08\n\x04OPUS\x10\x01\x12\x07\n\x03\x41\x41\x43\x10\x02*V\n\nVideoCodec\x12\x0e\n\nDEFAULT_VC\x10\x00\x12\x11\n\rH264_BASELINE\x10\x01\x12\r\n\tH264_MAIN\x10\x02\x12\r\n\tH264_HIGH\x10\x03\x12\x07\n\x03VP8\x10\x04*)\n\nImageCodec\x12\x0e\n\nIC_DEFAULT\x10\x00\x12\x0b\n\x07IC_JPEG\x10\x01*+\n\tTrackType\x12\t\n\x05\x41UDIO\x10\x00\x12\t\n\x05VIDEO\x10\x01\x12\x08\n\x04\x44\x41TA\x10\x02*`\n\x0bTrackSource\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x43\x41MERA\x10\x01\x12\x0e\n\nMICROPHONE\x10\x02\x12\x10\n\x0cSCREEN_SHARE\x10\x03\x12\x16\n\x12SCREEN_SHARE_AUDIO\x10\x04*6\n\x0cVideoQuality\x12\x07\n\x03LOW\x10\x00\x12\n\n\x06MEDIUM\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\x07\n\x03OFF\x10\x03*@\n\x11\x43onnectionQuality\x12\x08\n\x04POOR\x10\x00\x12\x08\n\x04GOOD\x10\x01\x12\r\n\tEXCELLENT\x10\x02\x12\x08\n\x04LOST\x10\x03*;\n\x13\x43lientConfigSetting\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02*\xec\x01\n\x10\x44isconnectReason\x12\x12\n\x0eUNKNOWN_REASON\x10\x00\x12\x14\n\x10\x43LIENT_INITIATED\x10\x01\x12\x16\n\x12\x44UPLICATE_IDENTITY\x10\x02\x12\x13\n\x0fSERVER_SHUTDOWN\x10\x03\x12\x17\n\x13PARTICIPANT_REMOVED\x10\x04\x12\x10\n\x0cROOM_DELETED\x10\x05\x12\x12\n\x0eSTATE_MISMATCH\x10\x06\x12\x10\n\x0cJOIN_FAILURE\x10\x07\x12\r\n\tMIGRATION\x10\x08\x12\x10\n\x0cSIGNAL_CLOSE\x10\t\x12\x0f\n\x0bROOM_CLOSED\x10\n*\x89\x01\n\x0fReconnectReason\x12\x0e\n\nRR_UNKNOWN\x10\x00\x12\x1a\n\x16RR_SIGNAL_DISCONNECTED\x10\x01\x12\x17\n\x13RR_PUBLISHER_FAILED\x10\x02\x12\x18\n\x14RR_SUBSCRIBER_FAILED\x10\x03\x12\x17\n\x13RR_SWITCH_CANDIDATE\x10\x04*T\n\x11SubscriptionError\x12\x0e\n\nSE_UNKNOWN\x10\x00\x12\x18\n\x14SE_CODEC_UNSUPPORTED\x10\x01\x12\x15\n\x11SE_TRACK_NOTFOUND\x10\x02*\xa3\x01\n\x11\x41udioTrackFeature\x12\r\n\tTF_STEREO\x10\x00\x12\r\n\tTF_NO_DTX\x10\x01\x12\x18\n\x14TF_AUTO_GAIN_CONTROL\x10\x02\x12\x18\n\x14TF_ECHO_CANCELLATION\x10\x03\x12\x18\n\x14TF_NOISE_SUPPRESSION\x10\x04\x12\"\n\x1eTF_ENHANCED_NOISE_CANCELLATION\x10\x05\x42\x46Z#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -54,112 +53,100 @@ _globals['_USERPACKET'].fields_by_name['destination_identities']._serialized_options = b'\030\001' _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._loaded_options = None _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._serialized_options = b'8\001' - _globals['_AUDIOCODEC']._serialized_start=7564 - _globals['_AUDIOCODEC']._serialized_end=7611 - _globals['_VIDEOCODEC']._serialized_start=7613 - _globals['_VIDEOCODEC']._serialized_end=7699 - _globals['_IMAGECODEC']._serialized_start=7701 - _globals['_IMAGECODEC']._serialized_end=7742 - _globals['_TRACKTYPE']._serialized_start=7744 - _globals['_TRACKTYPE']._serialized_end=7787 - _globals['_TRACKSOURCE']._serialized_start=7789 - _globals['_TRACKSOURCE']._serialized_end=7885 - _globals['_VIDEOQUALITY']._serialized_start=7887 - _globals['_VIDEOQUALITY']._serialized_end=7941 - _globals['_CONNECTIONQUALITY']._serialized_start=7943 - _globals['_CONNECTIONQUALITY']._serialized_end=8007 - _globals['_CLIENTCONFIGSETTING']._serialized_start=8009 - _globals['_CLIENTCONFIGSETTING']._serialized_end=8068 - _globals['_DISCONNECTREASON']._serialized_start=8071 - _globals['_DISCONNECTREASON']._serialized_end=8307 - _globals['_RECONNECTREASON']._serialized_start=8310 - _globals['_RECONNECTREASON']._serialized_end=8447 - _globals['_SUBSCRIPTIONERROR']._serialized_start=8449 - _globals['_SUBSCRIPTIONERROR']._serialized_end=8533 - _globals['_AUDIOTRACKFEATURE']._serialized_start=8536 - _globals['_AUDIOTRACKFEATURE']._serialized_end=8699 - _globals['_ROOM']._serialized_start=90 - _globals['_ROOM']._serialized_end=419 - _globals['_CODEC']._serialized_start=421 - _globals['_CODEC']._serialized_end=461 - _globals['_PLAYOUTDELAY']._serialized_start=463 - _globals['_PLAYOUTDELAY']._serialized_end=520 - _globals['_PARTICIPANTPERMISSION']._serialized_start=523 - _globals['_PARTICIPANTPERMISSION']._serialized_end=784 - _globals['_PARTICIPANTINFO']._serialized_start=787 - _globals['_PARTICIPANTINFO']._serialized_end=1419 - _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._serialized_start=1239 - _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._serialized_end=1288 - _globals['_PARTICIPANTINFO_STATE']._serialized_start=1290 - _globals['_PARTICIPANTINFO_STATE']._serialized_end=1352 - _globals['_PARTICIPANTINFO_KIND']._serialized_start=1354 - _globals['_PARTICIPANTINFO_KIND']._serialized_end=1419 - _globals['_ENCRYPTION']._serialized_start=1421 - _globals['_ENCRYPTION']._serialized_end=1472 - _globals['_ENCRYPTION_TYPE']._serialized_start=1435 - _globals['_ENCRYPTION_TYPE']._serialized_end=1472 - _globals['_SIMULCASTCODECINFO']._serialized_start=1474 - _globals['_SIMULCASTCODECINFO']._serialized_end=1576 - _globals['_TRACKINFO']._serialized_start=1579 - _globals['_TRACKINFO']._serialized_end=2080 - _globals['_VIDEOLAYER']._serialized_start=2082 - _globals['_VIDEOLAYER']._serialized_end=2196 - _globals['_DATAPACKET']._serialized_start=2199 - _globals['_DATAPACKET']._serialized_end=2750 - _globals['_DATAPACKET_KIND']._serialized_start=2710 - _globals['_DATAPACKET_KIND']._serialized_end=2741 - _globals['_ACTIVESPEAKERUPDATE']._serialized_start=2752 - _globals['_ACTIVESPEAKERUPDATE']._serialized_end=2813 - _globals['_SPEAKERINFO']._serialized_start=2815 - _globals['_SPEAKERINFO']._serialized_end=2872 - _globals['_USERPACKET']._serialized_start=2875 - _globals['_USERPACKET']._serialized_end=3163 - _globals['_SIPDTMF']._serialized_start=3165 - _globals['_SIPDTMF']._serialized_end=3203 - _globals['_TRANSCRIPTION']._serialized_start=3205 - _globals['_TRANSCRIPTION']._serialized_end=3329 - _globals['_TRANSCRIPTIONSEGMENT']._serialized_start=3331 - _globals['_TRANSCRIPTIONSEGMENT']._serialized_end=3450 - _globals['_CHATMESSAGE']._serialized_start=3453 - _globals['_CHATMESSAGE']._serialized_end=3598 - _globals['_RPCREQUEST']._serialized_start=3600 - _globals['_RPCREQUEST']._serialized_end=3703 - _globals['_RPCACK']._serialized_start=3705 - _globals['_RPCACK']._serialized_end=3733 - _globals['_RPCRESPONSE']._serialized_start=3735 - _globals['_RPCRESPONSE']._serialized_end=3832 - _globals['_RPCERROR']._serialized_start=3834 - _globals['_RPCERROR']._serialized_end=3889 - _globals['_PARTICIPANTTRACKS']._serialized_start=3891 - _globals['_PARTICIPANTTRACKS']._serialized_end=3955 - _globals['_SERVERINFO']._serialized_start=3958 - _globals['_SERVERINFO']._serialized_end=4164 - _globals['_SERVERINFO_EDITION']._serialized_start=4130 - _globals['_SERVERINFO_EDITION']._serialized_end=4164 - _globals['_CLIENTINFO']._serialized_start=4167 - _globals['_CLIENTINFO']._serialized_end=4561 - _globals['_CLIENTINFO_SDK']._serialized_start=4405 - _globals['_CLIENTINFO_SDK']._serialized_end=4561 - _globals['_CLIENTCONFIGURATION']._serialized_start=4564 - _globals['_CLIENTCONFIGURATION']._serialized_end=4832 - _globals['_VIDEOCONFIGURATION']._serialized_start=4834 - _globals['_VIDEOCONFIGURATION']._serialized_end=4910 - _globals['_DISABLEDCODECS']._serialized_start=4912 - _globals['_DISABLEDCODECS']._serialized_end=4993 - _globals['_RTPDRIFT']._serialized_start=4996 - _globals['_RTPDRIFT']._serialized_end=5252 - _globals['_RTPSTATS']._serialized_start=5255 - _globals['_RTPSTATS']._serialized_end=6621 - _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._serialized_start=6570 - _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._serialized_end=6621 - _globals['_RTCPSENDERREPORTSTATE']._serialized_start=6624 - _globals['_RTCPSENDERREPORTSTATE']._serialized_end=6786 - _globals['_RTPFORWARDERSTATE']._serialized_start=6789 - _globals['_RTPFORWARDERSTATE']._serialized_end=7118 - _globals['_RTPMUNGERSTATE']._serialized_start=7121 - _globals['_RTPMUNGERSTATE']._serialized_end=7324 - _globals['_VP8MUNGERSTATE']._serialized_start=7327 - _globals['_VP8MUNGERSTATE']._serialized_end=7511 - _globals['_TIMEDVERSION']._serialized_start=7513 - _globals['_TIMEDVERSION']._serialized_end=7562 + _globals['_AUDIOCODEC']._serialized_start=6532 + _globals['_AUDIOCODEC']._serialized_end=6579 + _globals['_VIDEOCODEC']._serialized_start=6581 + _globals['_VIDEOCODEC']._serialized_end=6667 + _globals['_IMAGECODEC']._serialized_start=6669 + _globals['_IMAGECODEC']._serialized_end=6710 + _globals['_TRACKTYPE']._serialized_start=6712 + _globals['_TRACKTYPE']._serialized_end=6755 + _globals['_TRACKSOURCE']._serialized_start=6757 + _globals['_TRACKSOURCE']._serialized_end=6853 + _globals['_VIDEOQUALITY']._serialized_start=6855 + _globals['_VIDEOQUALITY']._serialized_end=6909 + _globals['_CONNECTIONQUALITY']._serialized_start=6911 + _globals['_CONNECTIONQUALITY']._serialized_end=6975 + _globals['_CLIENTCONFIGSETTING']._serialized_start=6977 + _globals['_CLIENTCONFIGSETTING']._serialized_end=7036 + _globals['_DISCONNECTREASON']._serialized_start=7039 + _globals['_DISCONNECTREASON']._serialized_end=7275 + _globals['_RECONNECTREASON']._serialized_start=7278 + _globals['_RECONNECTREASON']._serialized_end=7415 + _globals['_SUBSCRIPTIONERROR']._serialized_start=7417 + _globals['_SUBSCRIPTIONERROR']._serialized_end=7501 + _globals['_AUDIOTRACKFEATURE']._serialized_start=7504 + _globals['_AUDIOTRACKFEATURE']._serialized_end=7667 + _globals['_ROOM']._serialized_start=67 + _globals['_ROOM']._serialized_end=396 + _globals['_CODEC']._serialized_start=398 + _globals['_CODEC']._serialized_end=438 + _globals['_PLAYOUTDELAY']._serialized_start=440 + _globals['_PLAYOUTDELAY']._serialized_end=497 + _globals['_PARTICIPANTPERMISSION']._serialized_start=500 + _globals['_PARTICIPANTPERMISSION']._serialized_end=730 + _globals['_PARTICIPANTINFO']._serialized_start=733 + _globals['_PARTICIPANTINFO']._serialized_end=1365 + _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._serialized_start=1185 + _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._serialized_end=1234 + _globals['_PARTICIPANTINFO_STATE']._serialized_start=1236 + _globals['_PARTICIPANTINFO_STATE']._serialized_end=1298 + _globals['_PARTICIPANTINFO_KIND']._serialized_start=1300 + _globals['_PARTICIPANTINFO_KIND']._serialized_end=1365 + _globals['_ENCRYPTION']._serialized_start=1367 + _globals['_ENCRYPTION']._serialized_end=1418 + _globals['_ENCRYPTION_TYPE']._serialized_start=1381 + _globals['_ENCRYPTION_TYPE']._serialized_end=1418 + _globals['_SIMULCASTCODECINFO']._serialized_start=1420 + _globals['_SIMULCASTCODECINFO']._serialized_end=1522 + _globals['_TRACKINFO']._serialized_start=1525 + _globals['_TRACKINFO']._serialized_end=2026 + _globals['_VIDEOLAYER']._serialized_start=2028 + _globals['_VIDEOLAYER']._serialized_end=2142 + _globals['_DATAPACKET']._serialized_start=2145 + _globals['_DATAPACKET']._serialized_end=2482 + _globals['_DATAPACKET_KIND']._serialized_start=2442 + _globals['_DATAPACKET_KIND']._serialized_end=2473 + _globals['_ACTIVESPEAKERUPDATE']._serialized_start=2484 + _globals['_ACTIVESPEAKERUPDATE']._serialized_end=2545 + _globals['_SPEAKERINFO']._serialized_start=2547 + _globals['_SPEAKERINFO']._serialized_end=2604 + _globals['_USERPACKET']._serialized_start=2607 + _globals['_USERPACKET']._serialized_end=2895 + _globals['_SIPDTMF']._serialized_start=2897 + _globals['_SIPDTMF']._serialized_end=2935 + _globals['_TRANSCRIPTION']._serialized_start=2937 + _globals['_TRANSCRIPTION']._serialized_end=3061 + _globals['_TRANSCRIPTIONSEGMENT']._serialized_start=3063 + _globals['_TRANSCRIPTIONSEGMENT']._serialized_end=3182 + _globals['_PARTICIPANTTRACKS']._serialized_start=3184 + _globals['_PARTICIPANTTRACKS']._serialized_end=3248 + _globals['_SERVERINFO']._serialized_start=3251 + _globals['_SERVERINFO']._serialized_end=3457 + _globals['_SERVERINFO_EDITION']._serialized_start=3423 + _globals['_SERVERINFO_EDITION']._serialized_end=3457 + _globals['_CLIENTINFO']._serialized_start=3460 + _globals['_CLIENTINFO']._serialized_end=3809 + _globals['_CLIENTINFO_SDK']._serialized_start=3678 + _globals['_CLIENTINFO_SDK']._serialized_end=3809 + _globals['_CLIENTCONFIGURATION']._serialized_start=3812 + _globals['_CLIENTCONFIGURATION']._serialized_end=4080 + _globals['_VIDEOCONFIGURATION']._serialized_start=4082 + _globals['_VIDEOCONFIGURATION']._serialized_end=4158 + _globals['_DISABLEDCODECS']._serialized_start=4160 + _globals['_DISABLEDCODECS']._serialized_end=4241 + _globals['_RTPDRIFT']._serialized_start=4244 + _globals['_RTPDRIFT']._serialized_end=4500 + _globals['_RTPSTATS']._serialized_start=4503 + _globals['_RTPSTATS']._serialized_end=5815 + _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._serialized_start=5764 + _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._serialized_end=5815 + _globals['_RTPFORWARDERSTATE']._serialized_start=5818 + _globals['_RTPFORWARDERSTATE']._serialized_end=6086 + _globals['_RTPMUNGERSTATE']._serialized_start=6089 + _globals['_RTPMUNGERSTATE']._serialized_end=6292 + _globals['_VP8MUNGERSTATE']._serialized_start=6295 + _globals['_VP8MUNGERSTATE']._serialized_end=6479 + _globals['_TIMEDVERSION']._serialized_start=6481 + _globals['_TIMEDVERSION']._serialized_end=6530 # @@protoc_insertion_point(module_scope) diff --git a/livekit-protocol/livekit/protocol/models.pyi b/livekit-protocol/livekit/protocol/models.pyi index 85b58fca..77182347 100644 --- a/livekit-protocol/livekit/protocol/models.pyi +++ b/livekit-protocol/livekit/protocol/models.pyi @@ -1,5 +1,4 @@ from google.protobuf import timestamp_pb2 as _timestamp_pb2 -import metrics as _metrics from google.protobuf.internal import containers as _containers from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor @@ -201,7 +200,7 @@ class PlayoutDelay(_message.Message): def __init__(self, enabled: bool = ..., min: _Optional[int] = ..., max: _Optional[int] = ...) -> None: ... class ParticipantPermission(_message.Message): - __slots__ = ("can_subscribe", "can_publish", "can_publish_data", "can_publish_sources", "hidden", "recorder", "can_update_metadata", "agent", "can_subscribe_metrics") + __slots__ = ("can_subscribe", "can_publish", "can_publish_data", "can_publish_sources", "hidden", "recorder", "can_update_metadata", "agent") CAN_SUBSCRIBE_FIELD_NUMBER: _ClassVar[int] CAN_PUBLISH_FIELD_NUMBER: _ClassVar[int] CAN_PUBLISH_DATA_FIELD_NUMBER: _ClassVar[int] @@ -210,7 +209,6 @@ class ParticipantPermission(_message.Message): RECORDER_FIELD_NUMBER: _ClassVar[int] CAN_UPDATE_METADATA_FIELD_NUMBER: _ClassVar[int] AGENT_FIELD_NUMBER: _ClassVar[int] - CAN_SUBSCRIBE_METRICS_FIELD_NUMBER: _ClassVar[int] can_subscribe: bool can_publish: bool can_publish_data: bool @@ -219,8 +217,7 @@ class ParticipantPermission(_message.Message): recorder: bool can_update_metadata: bool agent: bool - can_subscribe_metrics: bool - def __init__(self, can_subscribe: bool = ..., can_publish: bool = ..., can_publish_data: bool = ..., can_publish_sources: _Optional[_Iterable[_Union[TrackSource, str]]] = ..., hidden: bool = ..., recorder: bool = ..., can_update_metadata: bool = ..., agent: bool = ..., can_subscribe_metrics: bool = ...) -> None: ... + def __init__(self, can_subscribe: bool = ..., can_publish: bool = ..., can_publish_data: bool = ..., can_publish_sources: _Optional[_Iterable[_Union[TrackSource, str]]] = ..., hidden: bool = ..., recorder: bool = ..., can_update_metadata: bool = ..., agent: bool = ...) -> None: ... class ParticipantInfo(_message.Message): __slots__ = ("sid", "identity", "state", "tracks", "metadata", "joined_at", "name", "version", "permission", "region", "is_publisher", "kind", "attributes", "disconnect_reason") @@ -364,7 +361,7 @@ class VideoLayer(_message.Message): def __init__(self, quality: _Optional[_Union[VideoQuality, str]] = ..., width: _Optional[int] = ..., height: _Optional[int] = ..., bitrate: _Optional[int] = ..., ssrc: _Optional[int] = ...) -> None: ... class DataPacket(_message.Message): - __slots__ = ("kind", "participant_identity", "destination_identities", "user", "speaker", "sip_dtmf", "transcription", "metrics", "chat_message", "rpc_request", "rpc_ack", "rpc_response") + __slots__ = ("kind", "participant_identity", "destination_identities", "user", "speaker", "sip_dtmf", "transcription") class Kind(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = () RELIABLE: _ClassVar[DataPacket.Kind] @@ -378,11 +375,6 @@ class DataPacket(_message.Message): SPEAKER_FIELD_NUMBER: _ClassVar[int] SIP_DTMF_FIELD_NUMBER: _ClassVar[int] TRANSCRIPTION_FIELD_NUMBER: _ClassVar[int] - METRICS_FIELD_NUMBER: _ClassVar[int] - CHAT_MESSAGE_FIELD_NUMBER: _ClassVar[int] - RPC_REQUEST_FIELD_NUMBER: _ClassVar[int] - RPC_ACK_FIELD_NUMBER: _ClassVar[int] - RPC_RESPONSE_FIELD_NUMBER: _ClassVar[int] kind: DataPacket.Kind participant_identity: str destination_identities: _containers.RepeatedScalarFieldContainer[str] @@ -390,12 +382,7 @@ class DataPacket(_message.Message): speaker: ActiveSpeakerUpdate sip_dtmf: SipDTMF transcription: Transcription - metrics: _metrics.MetricsBatch - chat_message: ChatMessage - rpc_request: RpcRequest - rpc_ack: RpcAck - rpc_response: RpcResponse - def __init__(self, kind: _Optional[_Union[DataPacket.Kind, str]] = ..., participant_identity: _Optional[str] = ..., destination_identities: _Optional[_Iterable[str]] = ..., user: _Optional[_Union[UserPacket, _Mapping]] = ..., speaker: _Optional[_Union[ActiveSpeakerUpdate, _Mapping]] = ..., sip_dtmf: _Optional[_Union[SipDTMF, _Mapping]] = ..., transcription: _Optional[_Union[Transcription, _Mapping]] = ..., metrics: _Optional[_Union[_metrics.MetricsBatch, _Mapping]] = ..., chat_message: _Optional[_Union[ChatMessage, _Mapping]] = ..., rpc_request: _Optional[_Union[RpcRequest, _Mapping]] = ..., rpc_ack: _Optional[_Union[RpcAck, _Mapping]] = ..., rpc_response: _Optional[_Union[RpcResponse, _Mapping]] = ...) -> None: ... + def __init__(self, kind: _Optional[_Union[DataPacket.Kind, str]] = ..., participant_identity: _Optional[str] = ..., destination_identities: _Optional[_Iterable[str]] = ..., user: _Optional[_Union[UserPacket, _Mapping]] = ..., speaker: _Optional[_Union[ActiveSpeakerUpdate, _Mapping]] = ..., sip_dtmf: _Optional[_Union[SipDTMF, _Mapping]] = ..., transcription: _Optional[_Union[Transcription, _Mapping]] = ...) -> None: ... class ActiveSpeakerUpdate(_message.Message): __slots__ = ("speakers",) @@ -469,62 +456,6 @@ class TranscriptionSegment(_message.Message): language: str def __init__(self, id: _Optional[str] = ..., text: _Optional[str] = ..., start_time: _Optional[int] = ..., end_time: _Optional[int] = ..., final: bool = ..., language: _Optional[str] = ...) -> None: ... -class ChatMessage(_message.Message): - __slots__ = ("id", "timestamp", "edit_timestamp", "message", "deleted", "generated") - ID_FIELD_NUMBER: _ClassVar[int] - TIMESTAMP_FIELD_NUMBER: _ClassVar[int] - EDIT_TIMESTAMP_FIELD_NUMBER: _ClassVar[int] - MESSAGE_FIELD_NUMBER: _ClassVar[int] - DELETED_FIELD_NUMBER: _ClassVar[int] - GENERATED_FIELD_NUMBER: _ClassVar[int] - id: str - timestamp: int - edit_timestamp: int - message: str - deleted: bool - generated: bool - def __init__(self, id: _Optional[str] = ..., timestamp: _Optional[int] = ..., edit_timestamp: _Optional[int] = ..., message: _Optional[str] = ..., deleted: bool = ..., generated: bool = ...) -> None: ... - -class RpcRequest(_message.Message): - __slots__ = ("id", "method", "payload", "response_timeout_ms", "version") - ID_FIELD_NUMBER: _ClassVar[int] - METHOD_FIELD_NUMBER: _ClassVar[int] - PAYLOAD_FIELD_NUMBER: _ClassVar[int] - RESPONSE_TIMEOUT_MS_FIELD_NUMBER: _ClassVar[int] - VERSION_FIELD_NUMBER: _ClassVar[int] - id: str - method: str - payload: str - response_timeout_ms: int - version: int - def __init__(self, id: _Optional[str] = ..., method: _Optional[str] = ..., payload: _Optional[str] = ..., response_timeout_ms: _Optional[int] = ..., version: _Optional[int] = ...) -> None: ... - -class RpcAck(_message.Message): - __slots__ = ("request_id",) - REQUEST_ID_FIELD_NUMBER: _ClassVar[int] - request_id: str - def __init__(self, request_id: _Optional[str] = ...) -> None: ... - -class RpcResponse(_message.Message): - __slots__ = ("request_id", "payload", "error") - REQUEST_ID_FIELD_NUMBER: _ClassVar[int] - PAYLOAD_FIELD_NUMBER: _ClassVar[int] - ERROR_FIELD_NUMBER: _ClassVar[int] - request_id: str - payload: str - error: RpcError - def __init__(self, request_id: _Optional[str] = ..., payload: _Optional[str] = ..., error: _Optional[_Union[RpcError, _Mapping]] = ...) -> None: ... - -class RpcError(_message.Message): - __slots__ = ("code", "message", "data") - CODE_FIELD_NUMBER: _ClassVar[int] - MESSAGE_FIELD_NUMBER: _ClassVar[int] - DATA_FIELD_NUMBER: _ClassVar[int] - code: int - message: str - data: str - def __init__(self, code: _Optional[int] = ..., message: _Optional[str] = ..., data: _Optional[str] = ...) -> None: ... - class ParticipantTracks(_message.Message): __slots__ = ("participant_sid", "track_sids") PARTICIPANT_SID_FIELD_NUMBER: _ClassVar[int] @@ -558,7 +489,7 @@ class ServerInfo(_message.Message): def __init__(self, edition: _Optional[_Union[ServerInfo.Edition, str]] = ..., version: _Optional[str] = ..., protocol: _Optional[int] = ..., region: _Optional[str] = ..., node_id: _Optional[str] = ..., debug_info: _Optional[str] = ..., agent_protocol: _Optional[int] = ...) -> None: ... class ClientInfo(_message.Message): - __slots__ = ("sdk", "version", "protocol", "os", "os_version", "device_model", "browser", "browser_version", "address", "network", "other_sdks") + __slots__ = ("sdk", "version", "protocol", "os", "os_version", "device_model", "browser", "browser_version", "address", "network") class SDK(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = () UNKNOWN: _ClassVar[ClientInfo.SDK] @@ -572,8 +503,6 @@ class ClientInfo(_message.Message): RUST: _ClassVar[ClientInfo.SDK] PYTHON: _ClassVar[ClientInfo.SDK] CPP: _ClassVar[ClientInfo.SDK] - UNITY_WEB: _ClassVar[ClientInfo.SDK] - NODE: _ClassVar[ClientInfo.SDK] UNKNOWN: ClientInfo.SDK JS: ClientInfo.SDK SWIFT: ClientInfo.SDK @@ -585,8 +514,6 @@ class ClientInfo(_message.Message): RUST: ClientInfo.SDK PYTHON: ClientInfo.SDK CPP: ClientInfo.SDK - UNITY_WEB: ClientInfo.SDK - NODE: ClientInfo.SDK SDK_FIELD_NUMBER: _ClassVar[int] VERSION_FIELD_NUMBER: _ClassVar[int] PROTOCOL_FIELD_NUMBER: _ClassVar[int] @@ -597,7 +524,6 @@ class ClientInfo(_message.Message): BROWSER_VERSION_FIELD_NUMBER: _ClassVar[int] ADDRESS_FIELD_NUMBER: _ClassVar[int] NETWORK_FIELD_NUMBER: _ClassVar[int] - OTHER_SDKS_FIELD_NUMBER: _ClassVar[int] sdk: ClientInfo.SDK version: str protocol: int @@ -608,8 +534,7 @@ class ClientInfo(_message.Message): browser_version: str address: str network: str - other_sdks: str - def __init__(self, sdk: _Optional[_Union[ClientInfo.SDK, str]] = ..., version: _Optional[str] = ..., protocol: _Optional[int] = ..., os: _Optional[str] = ..., os_version: _Optional[str] = ..., device_model: _Optional[str] = ..., browser: _Optional[str] = ..., browser_version: _Optional[str] = ..., address: _Optional[str] = ..., network: _Optional[str] = ..., other_sdks: _Optional[str] = ...) -> None: ... + def __init__(self, sdk: _Optional[_Union[ClientInfo.SDK, str]] = ..., version: _Optional[str] = ..., protocol: _Optional[int] = ..., os: _Optional[str] = ..., os_version: _Optional[str] = ..., device_model: _Optional[str] = ..., browser: _Optional[str] = ..., browser_version: _Optional[str] = ..., address: _Optional[str] = ..., network: _Optional[str] = ...) -> None: ... class ClientConfiguration(_message.Message): __slots__ = ("video", "screen", "resume_connection", "disabled_codecs", "force_relay") @@ -662,7 +587,7 @@ class RTPDrift(_message.Message): def __init__(self, start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., duration: _Optional[float] = ..., start_timestamp: _Optional[int] = ..., end_timestamp: _Optional[int] = ..., rtp_clock_ticks: _Optional[int] = ..., drift_samples: _Optional[int] = ..., drift_ms: _Optional[float] = ..., clock_rate: _Optional[float] = ...) -> None: ... class RTPStats(_message.Message): - __slots__ = ("start_time", "end_time", "duration", "packets", "packet_rate", "bytes", "header_bytes", "bitrate", "packets_lost", "packet_loss_rate", "packet_loss_percentage", "packets_duplicate", "packet_duplicate_rate", "bytes_duplicate", "header_bytes_duplicate", "bitrate_duplicate", "packets_padding", "packet_padding_rate", "bytes_padding", "header_bytes_padding", "bitrate_padding", "packets_out_of_order", "frames", "frame_rate", "jitter_current", "jitter_max", "gap_histogram", "nacks", "nack_acks", "nack_misses", "nack_repeated", "plis", "last_pli", "firs", "last_fir", "rtt_current", "rtt_max", "key_frames", "last_key_frame", "layer_lock_plis", "last_layer_lock_pli", "packet_drift", "ntp_report_drift", "rebased_report_drift", "received_report_drift") + __slots__ = ("start_time", "end_time", "duration", "packets", "packet_rate", "bytes", "header_bytes", "bitrate", "packets_lost", "packet_loss_rate", "packet_loss_percentage", "packets_duplicate", "packet_duplicate_rate", "bytes_duplicate", "header_bytes_duplicate", "bitrate_duplicate", "packets_padding", "packet_padding_rate", "bytes_padding", "header_bytes_padding", "bitrate_padding", "packets_out_of_order", "frames", "frame_rate", "jitter_current", "jitter_max", "gap_histogram", "nacks", "nack_acks", "nack_misses", "nack_repeated", "plis", "last_pli", "firs", "last_fir", "rtt_current", "rtt_max", "key_frames", "last_key_frame", "layer_lock_plis", "last_layer_lock_pli", "packet_drift", "report_drift", "rebased_report_drift") class GapHistogramEntry(_message.Message): __slots__ = ("key", "value") KEY_FIELD_NUMBER: _ClassVar[int] @@ -712,9 +637,8 @@ class RTPStats(_message.Message): LAYER_LOCK_PLIS_FIELD_NUMBER: _ClassVar[int] LAST_LAYER_LOCK_PLI_FIELD_NUMBER: _ClassVar[int] PACKET_DRIFT_FIELD_NUMBER: _ClassVar[int] - NTP_REPORT_DRIFT_FIELD_NUMBER: _ClassVar[int] + REPORT_DRIFT_FIELD_NUMBER: _ClassVar[int] REBASED_REPORT_DRIFT_FIELD_NUMBER: _ClassVar[int] - RECEIVED_REPORT_DRIFT_FIELD_NUMBER: _ClassVar[int] start_time: _timestamp_pb2.Timestamp end_time: _timestamp_pb2.Timestamp duration: float @@ -757,31 +681,12 @@ class RTPStats(_message.Message): layer_lock_plis: int last_layer_lock_pli: _timestamp_pb2.Timestamp packet_drift: RTPDrift - ntp_report_drift: RTPDrift + report_drift: RTPDrift rebased_report_drift: RTPDrift - received_report_drift: RTPDrift - def __init__(self, start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., duration: _Optional[float] = ..., packets: _Optional[int] = ..., packet_rate: _Optional[float] = ..., bytes: _Optional[int] = ..., header_bytes: _Optional[int] = ..., bitrate: _Optional[float] = ..., packets_lost: _Optional[int] = ..., packet_loss_rate: _Optional[float] = ..., packet_loss_percentage: _Optional[float] = ..., packets_duplicate: _Optional[int] = ..., packet_duplicate_rate: _Optional[float] = ..., bytes_duplicate: _Optional[int] = ..., header_bytes_duplicate: _Optional[int] = ..., bitrate_duplicate: _Optional[float] = ..., packets_padding: _Optional[int] = ..., packet_padding_rate: _Optional[float] = ..., bytes_padding: _Optional[int] = ..., header_bytes_padding: _Optional[int] = ..., bitrate_padding: _Optional[float] = ..., packets_out_of_order: _Optional[int] = ..., frames: _Optional[int] = ..., frame_rate: _Optional[float] = ..., jitter_current: _Optional[float] = ..., jitter_max: _Optional[float] = ..., gap_histogram: _Optional[_Mapping[int, int]] = ..., nacks: _Optional[int] = ..., nack_acks: _Optional[int] = ..., nack_misses: _Optional[int] = ..., nack_repeated: _Optional[int] = ..., plis: _Optional[int] = ..., last_pli: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., firs: _Optional[int] = ..., last_fir: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., rtt_current: _Optional[int] = ..., rtt_max: _Optional[int] = ..., key_frames: _Optional[int] = ..., last_key_frame: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., layer_lock_plis: _Optional[int] = ..., last_layer_lock_pli: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., packet_drift: _Optional[_Union[RTPDrift, _Mapping]] = ..., ntp_report_drift: _Optional[_Union[RTPDrift, _Mapping]] = ..., rebased_report_drift: _Optional[_Union[RTPDrift, _Mapping]] = ..., received_report_drift: _Optional[_Union[RTPDrift, _Mapping]] = ...) -> None: ... - -class RTCPSenderReportState(_message.Message): - __slots__ = ("rtp_timestamp", "rtp_timestamp_ext", "ntp_timestamp", "at", "at_adjusted", "packets", "octets") - RTP_TIMESTAMP_FIELD_NUMBER: _ClassVar[int] - RTP_TIMESTAMP_EXT_FIELD_NUMBER: _ClassVar[int] - NTP_TIMESTAMP_FIELD_NUMBER: _ClassVar[int] - AT_FIELD_NUMBER: _ClassVar[int] - AT_ADJUSTED_FIELD_NUMBER: _ClassVar[int] - PACKETS_FIELD_NUMBER: _ClassVar[int] - OCTETS_FIELD_NUMBER: _ClassVar[int] - rtp_timestamp: int - rtp_timestamp_ext: int - ntp_timestamp: int - at: int - at_adjusted: int - packets: int - octets: int - def __init__(self, rtp_timestamp: _Optional[int] = ..., rtp_timestamp_ext: _Optional[int] = ..., ntp_timestamp: _Optional[int] = ..., at: _Optional[int] = ..., at_adjusted: _Optional[int] = ..., packets: _Optional[int] = ..., octets: _Optional[int] = ...) -> None: ... + def __init__(self, start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., duration: _Optional[float] = ..., packets: _Optional[int] = ..., packet_rate: _Optional[float] = ..., bytes: _Optional[int] = ..., header_bytes: _Optional[int] = ..., bitrate: _Optional[float] = ..., packets_lost: _Optional[int] = ..., packet_loss_rate: _Optional[float] = ..., packet_loss_percentage: _Optional[float] = ..., packets_duplicate: _Optional[int] = ..., packet_duplicate_rate: _Optional[float] = ..., bytes_duplicate: _Optional[int] = ..., header_bytes_duplicate: _Optional[int] = ..., bitrate_duplicate: _Optional[float] = ..., packets_padding: _Optional[int] = ..., packet_padding_rate: _Optional[float] = ..., bytes_padding: _Optional[int] = ..., header_bytes_padding: _Optional[int] = ..., bitrate_padding: _Optional[float] = ..., packets_out_of_order: _Optional[int] = ..., frames: _Optional[int] = ..., frame_rate: _Optional[float] = ..., jitter_current: _Optional[float] = ..., jitter_max: _Optional[float] = ..., gap_histogram: _Optional[_Mapping[int, int]] = ..., nacks: _Optional[int] = ..., nack_acks: _Optional[int] = ..., nack_misses: _Optional[int] = ..., nack_repeated: _Optional[int] = ..., plis: _Optional[int] = ..., last_pli: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., firs: _Optional[int] = ..., last_fir: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., rtt_current: _Optional[int] = ..., rtt_max: _Optional[int] = ..., key_frames: _Optional[int] = ..., last_key_frame: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., layer_lock_plis: _Optional[int] = ..., last_layer_lock_pli: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., packet_drift: _Optional[_Union[RTPDrift, _Mapping]] = ..., report_drift: _Optional[_Union[RTPDrift, _Mapping]] = ..., rebased_report_drift: _Optional[_Union[RTPDrift, _Mapping]] = ...) -> None: ... class RTPForwarderState(_message.Message): - __slots__ = ("started", "reference_layer_spatial", "pre_start_time", "ext_first_timestamp", "dummy_start_timestamp_offset", "rtp_munger", "vp8_munger", "sender_report_state") + __slots__ = ("started", "reference_layer_spatial", "pre_start_time", "ext_first_timestamp", "dummy_start_timestamp_offset", "rtp_munger", "vp8_munger") STARTED_FIELD_NUMBER: _ClassVar[int] REFERENCE_LAYER_SPATIAL_FIELD_NUMBER: _ClassVar[int] PRE_START_TIME_FIELD_NUMBER: _ClassVar[int] @@ -789,7 +694,6 @@ class RTPForwarderState(_message.Message): DUMMY_START_TIMESTAMP_OFFSET_FIELD_NUMBER: _ClassVar[int] RTP_MUNGER_FIELD_NUMBER: _ClassVar[int] VP8_MUNGER_FIELD_NUMBER: _ClassVar[int] - SENDER_REPORT_STATE_FIELD_NUMBER: _ClassVar[int] started: bool reference_layer_spatial: int pre_start_time: int @@ -797,8 +701,7 @@ class RTPForwarderState(_message.Message): dummy_start_timestamp_offset: int rtp_munger: RTPMungerState vp8_munger: VP8MungerState - sender_report_state: _containers.RepeatedCompositeFieldContainer[RTCPSenderReportState] - def __init__(self, started: bool = ..., reference_layer_spatial: _Optional[int] = ..., pre_start_time: _Optional[int] = ..., ext_first_timestamp: _Optional[int] = ..., dummy_start_timestamp_offset: _Optional[int] = ..., rtp_munger: _Optional[_Union[RTPMungerState, _Mapping]] = ..., vp8_munger: _Optional[_Union[VP8MungerState, _Mapping]] = ..., sender_report_state: _Optional[_Iterable[_Union[RTCPSenderReportState, _Mapping]]] = ...) -> None: ... + def __init__(self, started: bool = ..., reference_layer_spatial: _Optional[int] = ..., pre_start_time: _Optional[int] = ..., ext_first_timestamp: _Optional[int] = ..., dummy_start_timestamp_offset: _Optional[int] = ..., rtp_munger: _Optional[_Union[RTPMungerState, _Mapping]] = ..., vp8_munger: _Optional[_Union[VP8MungerState, _Mapping]] = ...) -> None: ... class RTPMungerState(_message.Message): __slots__ = ("ext_last_sequence_number", "ext_second_last_sequence_number", "ext_last_timestamp", "ext_second_last_timestamp", "last_marker", "second_last_marker") diff --git a/livekit-protocol/livekit/protocol/room.py b/livekit-protocol/livekit/protocol/room.py index 85ffe6b7..10b758e2 100644 --- a/livekit-protocol/livekit/protocol/room.py +++ b/livekit-protocol/livekit/protocol/room.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: livekit_room.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -13,7 +13,7 @@ _runtime_version.Domain.PUBLIC, 5, 28, - 0, + 2, '', 'livekit_room.proto' ) diff --git a/livekit-protocol/livekit/protocol/sip.py b/livekit-protocol/livekit/protocol/sip.py index dca5cf43..9174c91a 100644 --- a/livekit-protocol/livekit/protocol/sip.py +++ b/livekit-protocol/livekit/protocol/sip.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: livekit_sip.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -13,7 +13,7 @@ _runtime_version.Domain.PUBLIC, 5, 28, - 0, + 2, '', 'livekit_sip.proto' ) @@ -22,10 +22,9 @@ _sym_db = _symbol_database.Default() -from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11livekit_sip.proto\x12\x07livekit\x1a\x1bgoogle/protobuf/empty.proto\"\xaf\x02\n\x15\x43reateSIPTrunkRequest\x12\x19\n\x11inbound_addresses\x18\x01 \x03(\t\x12\x18\n\x10outbound_address\x18\x02 \x01(\t\x12\x17\n\x0foutbound_number\x18\x03 \x01(\t\x12!\n\x15inbound_numbers_regex\x18\x04 \x03(\tB\x02\x18\x01\x12\x17\n\x0finbound_numbers\x18\t \x03(\t\x12\x18\n\x10inbound_username\x18\x05 \x01(\t\x12\x18\n\x10inbound_password\x18\x06 \x01(\t\x12\x19\n\x11outbound_username\x18\x07 \x01(\t\x12\x19\n\x11outbound_password\x18\x08 \x01(\t\x12\x0c\n\x04name\x18\n \x01(\t\x12\x10\n\x08metadata\x18\x0b \x01(\t:\x02\x18\x01\"\xdb\x03\n\x0cSIPTrunkInfo\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12-\n\x04kind\x18\x0e \x01(\x0e\x32\x1f.livekit.SIPTrunkInfo.TrunkKind\x12\x19\n\x11inbound_addresses\x18\x02 \x03(\t\x12\x18\n\x10outbound_address\x18\x03 \x01(\t\x12\x17\n\x0foutbound_number\x18\x04 \x01(\t\x12(\n\ttransport\x18\r \x01(\x0e\x32\x15.livekit.SIPTransport\x12!\n\x15inbound_numbers_regex\x18\x05 \x03(\tB\x02\x18\x01\x12\x17\n\x0finbound_numbers\x18\n \x03(\t\x12\x18\n\x10inbound_username\x18\x06 \x01(\t\x12\x18\n\x10inbound_password\x18\x07 \x01(\t\x12\x19\n\x11outbound_username\x18\x08 \x01(\t\x12\x19\n\x11outbound_password\x18\t \x01(\t\x12\x0c\n\x04name\x18\x0b \x01(\t\x12\x10\n\x08metadata\x18\x0c \x01(\t\"D\n\tTrunkKind\x12\x10\n\x0cTRUNK_LEGACY\x10\x00\x12\x11\n\rTRUNK_INBOUND\x10\x01\x12\x12\n\x0eTRUNK_OUTBOUND\x10\x02:\x02\x18\x01\"K\n\x1c\x43reateSIPInboundTrunkRequest\x12+\n\x05trunk\x18\x01 \x01(\x0b\x32\x1c.livekit.SIPInboundTrunkInfo\"\xbc\x03\n\x13SIPInboundTrunkInfo\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08metadata\x18\x03 \x01(\t\x12\x0f\n\x07numbers\x18\x04 \x03(\t\x12\x19\n\x11\x61llowed_addresses\x18\x05 \x03(\t\x12\x17\n\x0f\x61llowed_numbers\x18\x06 \x03(\t\x12\x15\n\rauth_username\x18\x07 \x01(\t\x12\x15\n\rauth_password\x18\x08 \x01(\t\x12:\n\x07headers\x18\t \x03(\x0b\x32).livekit.SIPInboundTrunkInfo.HeadersEntry\x12T\n\x15headers_to_attributes\x18\n \x03(\x0b\x32\x35.livekit.SIPInboundTrunkInfo.HeadersToAttributesEntry\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a:\n\x18HeadersToAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"M\n\x1d\x43reateSIPOutboundTrunkRequest\x12,\n\x05trunk\x18\x01 \x01(\x0b\x32\x1d.livekit.SIPOutboundTrunkInfo\"\xc6\x03\n\x14SIPOutboundTrunkInfo\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08metadata\x18\x03 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x04 \x01(\t\x12(\n\ttransport\x18\x05 \x01(\x0e\x32\x15.livekit.SIPTransport\x12\x0f\n\x07numbers\x18\x06 \x03(\t\x12\x15\n\rauth_username\x18\x07 \x01(\t\x12\x15\n\rauth_password\x18\x08 \x01(\t\x12;\n\x07headers\x18\t \x03(\x0b\x32*.livekit.SIPOutboundTrunkInfo.HeadersEntry\x12U\n\x15headers_to_attributes\x18\n \x03(\x0b\x32\x36.livekit.SIPOutboundTrunkInfo.HeadersToAttributesEntry\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a:\n\x18HeadersToAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"1\n\x19GetSIPInboundTrunkRequest\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\"I\n\x1aGetSIPInboundTrunkResponse\x12+\n\x05trunk\x18\x01 \x01(\x0b\x32\x1c.livekit.SIPInboundTrunkInfo\"2\n\x1aGetSIPOutboundTrunkRequest\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\"K\n\x1bGetSIPOutboundTrunkResponse\x12,\n\x05trunk\x18\x01 \x01(\x0b\x32\x1d.livekit.SIPOutboundTrunkInfo\"\x19\n\x13ListSIPTrunkRequest:\x02\x18\x01\"@\n\x14ListSIPTrunkResponse\x12$\n\x05items\x18\x01 \x03(\x0b\x32\x15.livekit.SIPTrunkInfo:\x02\x18\x01\"\x1c\n\x1aListSIPInboundTrunkRequest\"J\n\x1bListSIPInboundTrunkResponse\x12+\n\x05items\x18\x01 \x03(\x0b\x32\x1c.livekit.SIPInboundTrunkInfo\"\x1d\n\x1bListSIPOutboundTrunkRequest\"L\n\x1cListSIPOutboundTrunkResponse\x12,\n\x05items\x18\x01 \x03(\x0b\x32\x1d.livekit.SIPOutboundTrunkInfo\"-\n\x15\x44\x65leteSIPTrunkRequest\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\"7\n\x15SIPDispatchRuleDirect\x12\x11\n\troom_name\x18\x01 \x01(\t\x12\x0b\n\x03pin\x18\x02 \x01(\t\"=\n\x19SIPDispatchRuleIndividual\x12\x13\n\x0broom_prefix\x18\x01 \x01(\t\x12\x0b\n\x03pin\x18\x02 \x01(\t\"L\n\x15SIPDispatchRuleCallee\x12\x13\n\x0broom_prefix\x18\x01 \x01(\t\x12\x0b\n\x03pin\x18\x02 \x01(\t\x12\x11\n\trandomize\x18\x03 \x01(\x08\"\xe1\x01\n\x0fSIPDispatchRule\x12>\n\x14\x64ispatch_rule_direct\x18\x01 \x01(\x0b\x32\x1e.livekit.SIPDispatchRuleDirectH\x00\x12\x46\n\x18\x64ispatch_rule_individual\x18\x02 \x01(\x0b\x32\".livekit.SIPDispatchRuleIndividualH\x00\x12>\n\x14\x64ispatch_rule_callee\x18\x03 \x01(\x0b\x32\x1e.livekit.SIPDispatchRuleCalleeH\x00\x42\x06\n\x04rule\"\xab\x02\n\x1c\x43reateSIPDispatchRuleRequest\x12&\n\x04rule\x18\x01 \x01(\x0b\x32\x18.livekit.SIPDispatchRule\x12\x11\n\ttrunk_ids\x18\x02 \x03(\t\x12\x19\n\x11hide_phone_number\x18\x03 \x01(\x08\x12\x17\n\x0finbound_numbers\x18\x06 \x03(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x10\n\x08metadata\x18\x05 \x01(\t\x12I\n\nattributes\x18\x07 \x03(\x0b\x32\x35.livekit.CreateSIPDispatchRuleRequest.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb7\x02\n\x13SIPDispatchRuleInfo\x12\x1c\n\x14sip_dispatch_rule_id\x18\x01 \x01(\t\x12&\n\x04rule\x18\x02 \x01(\x0b\x32\x18.livekit.SIPDispatchRule\x12\x11\n\ttrunk_ids\x18\x03 \x03(\t\x12\x19\n\x11hide_phone_number\x18\x04 \x01(\x08\x12\x17\n\x0finbound_numbers\x18\x07 \x03(\t\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\x10\n\x08metadata\x18\x06 \x01(\t\x12@\n\nattributes\x18\x08 \x03(\x0b\x32,.livekit.SIPDispatchRuleInfo.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1c\n\x1aListSIPDispatchRuleRequest\"J\n\x1bListSIPDispatchRuleResponse\x12+\n\x05items\x18\x01 \x03(\x0b\x32\x1c.livekit.SIPDispatchRuleInfo\"<\n\x1c\x44\x65leteSIPDispatchRuleRequest\x12\x1c\n\x14sip_dispatch_rule_id\x18\x01 \x01(\t\"\x90\x03\n\x1b\x43reateSIPParticipantRequest\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12\x13\n\x0bsip_call_to\x18\x02 \x01(\t\x12\x11\n\troom_name\x18\x03 \x01(\t\x12\x1c\n\x14participant_identity\x18\x04 \x01(\t\x12\x18\n\x10participant_name\x18\x07 \x01(\t\x12\x1c\n\x14participant_metadata\x18\x08 \x01(\t\x12_\n\x16participant_attributes\x18\t \x03(\x0b\x32?.livekit.CreateSIPParticipantRequest.ParticipantAttributesEntry\x12\x0c\n\x04\x64tmf\x18\x05 \x01(\t\x12\x15\n\rplay_ringtone\x18\x06 \x01(\x08\x12\x19\n\x11hide_phone_number\x18\n \x01(\x08\x1a<\n\x1aParticipantAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"r\n\x12SIPParticipantInfo\x12\x16\n\x0eparticipant_id\x18\x01 \x01(\t\x12\x1c\n\x14participant_identity\x18\x02 \x01(\t\x12\x11\n\troom_name\x18\x03 \x01(\t\x12\x13\n\x0bsip_call_id\x18\x04 \x01(\t\"e\n\x1dTransferSIPParticipantRequest\x12\x1c\n\x14participant_identity\x18\x01 \x01(\t\x12\x11\n\troom_name\x18\x02 \x01(\t\x12\x13\n\x0btransfer_to\x18\x03 \x01(\t*k\n\x0cSIPTransport\x12\x16\n\x12SIP_TRANSPORT_AUTO\x10\x00\x12\x15\n\x11SIP_TRANSPORT_UDP\x10\x01\x12\x15\n\x11SIP_TRANSPORT_TCP\x10\x02\x12\x15\n\x11SIP_TRANSPORT_TLS\x10\x03\x32\x88\n\n\x03SIP\x12L\n\x0e\x43reateSIPTrunk\x12\x1e.livekit.CreateSIPTrunkRequest\x1a\x15.livekit.SIPTrunkInfo\"\x03\x88\x02\x01\x12P\n\x0cListSIPTrunk\x12\x1c.livekit.ListSIPTrunkRequest\x1a\x1d.livekit.ListSIPTrunkResponse\"\x03\x88\x02\x01\x12\\\n\x15\x43reateSIPInboundTrunk\x12%.livekit.CreateSIPInboundTrunkRequest\x1a\x1c.livekit.SIPInboundTrunkInfo\x12_\n\x16\x43reateSIPOutboundTrunk\x12&.livekit.CreateSIPOutboundTrunkRequest\x1a\x1d.livekit.SIPOutboundTrunkInfo\x12]\n\x12GetSIPInboundTrunk\x12\".livekit.GetSIPInboundTrunkRequest\x1a#.livekit.GetSIPInboundTrunkResponse\x12`\n\x13GetSIPOutboundTrunk\x12#.livekit.GetSIPOutboundTrunkRequest\x1a$.livekit.GetSIPOutboundTrunkResponse\x12`\n\x13ListSIPInboundTrunk\x12#.livekit.ListSIPInboundTrunkRequest\x1a$.livekit.ListSIPInboundTrunkResponse\x12\x63\n\x14ListSIPOutboundTrunk\x12$.livekit.ListSIPOutboundTrunkRequest\x1a%.livekit.ListSIPOutboundTrunkResponse\x12G\n\x0e\x44\x65leteSIPTrunk\x12\x1e.livekit.DeleteSIPTrunkRequest\x1a\x15.livekit.SIPTrunkInfo\x12\\\n\x15\x43reateSIPDispatchRule\x12%.livekit.CreateSIPDispatchRuleRequest\x1a\x1c.livekit.SIPDispatchRuleInfo\x12`\n\x13ListSIPDispatchRule\x12#.livekit.ListSIPDispatchRuleRequest\x1a$.livekit.ListSIPDispatchRuleResponse\x12\\\n\x15\x44\x65leteSIPDispatchRule\x12%.livekit.DeleteSIPDispatchRuleRequest\x1a\x1c.livekit.SIPDispatchRuleInfo\x12Y\n\x14\x43reateSIPParticipant\x12$.livekit.CreateSIPParticipantRequest\x1a\x1b.livekit.SIPParticipantInfo\x12X\n\x16TransferSIPParticipant\x12&.livekit.TransferSIPParticipantRequest\x1a\x16.google.protobuf.EmptyBFZ#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11livekit_sip.proto\x12\x07livekit\"\xaf\x02\n\x15\x43reateSIPTrunkRequest\x12\x19\n\x11inbound_addresses\x18\x01 \x03(\t\x12\x18\n\x10outbound_address\x18\x02 \x01(\t\x12\x17\n\x0foutbound_number\x18\x03 \x01(\t\x12!\n\x15inbound_numbers_regex\x18\x04 \x03(\tB\x02\x18\x01\x12\x17\n\x0finbound_numbers\x18\t \x03(\t\x12\x18\n\x10inbound_username\x18\x05 \x01(\t\x12\x18\n\x10inbound_password\x18\x06 \x01(\t\x12\x19\n\x11outbound_username\x18\x07 \x01(\t\x12\x19\n\x11outbound_password\x18\x08 \x01(\t\x12\x0c\n\x04name\x18\n \x01(\t\x12\x10\n\x08metadata\x18\x0b \x01(\t:\x02\x18\x01\"\xdb\x03\n\x0cSIPTrunkInfo\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12-\n\x04kind\x18\x0e \x01(\x0e\x32\x1f.livekit.SIPTrunkInfo.TrunkKind\x12\x19\n\x11inbound_addresses\x18\x02 \x03(\t\x12\x18\n\x10outbound_address\x18\x03 \x01(\t\x12\x17\n\x0foutbound_number\x18\x04 \x01(\t\x12(\n\ttransport\x18\r \x01(\x0e\x32\x15.livekit.SIPTransport\x12!\n\x15inbound_numbers_regex\x18\x05 \x03(\tB\x02\x18\x01\x12\x17\n\x0finbound_numbers\x18\n \x03(\t\x12\x18\n\x10inbound_username\x18\x06 \x01(\t\x12\x18\n\x10inbound_password\x18\x07 \x01(\t\x12\x19\n\x11outbound_username\x18\x08 \x01(\t\x12\x19\n\x11outbound_password\x18\t \x01(\t\x12\x0c\n\x04name\x18\x0b \x01(\t\x12\x10\n\x08metadata\x18\x0c \x01(\t\"D\n\tTrunkKind\x12\x10\n\x0cTRUNK_LEGACY\x10\x00\x12\x11\n\rTRUNK_INBOUND\x10\x01\x12\x12\n\x0eTRUNK_OUTBOUND\x10\x02:\x02\x18\x01\"K\n\x1c\x43reateSIPInboundTrunkRequest\x12+\n\x05trunk\x18\x01 \x01(\x0b\x32\x1c.livekit.SIPInboundTrunkInfo\"\xbe\x01\n\x13SIPInboundTrunkInfo\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08metadata\x18\x03 \x01(\t\x12\x0f\n\x07numbers\x18\x04 \x03(\t\x12\x19\n\x11\x61llowed_addresses\x18\x05 \x03(\t\x12\x17\n\x0f\x61llowed_numbers\x18\x06 \x03(\t\x12\x15\n\rauth_username\x18\x07 \x01(\t\x12\x15\n\rauth_password\x18\x08 \x01(\t\"M\n\x1d\x43reateSIPOutboundTrunkRequest\x12,\n\x05trunk\x18\x01 \x01(\x0b\x32\x1d.livekit.SIPOutboundTrunkInfo\"\xc6\x01\n\x14SIPOutboundTrunkInfo\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08metadata\x18\x03 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x04 \x01(\t\x12(\n\ttransport\x18\x05 \x01(\x0e\x32\x15.livekit.SIPTransport\x12\x0f\n\x07numbers\x18\x06 \x03(\t\x12\x15\n\rauth_username\x18\x07 \x01(\t\x12\x15\n\rauth_password\x18\x08 \x01(\t\"\x19\n\x13ListSIPTrunkRequest:\x02\x18\x01\"@\n\x14ListSIPTrunkResponse\x12$\n\x05items\x18\x01 \x03(\x0b\x32\x15.livekit.SIPTrunkInfo:\x02\x18\x01\"\x1c\n\x1aListSIPInboundTrunkRequest\"J\n\x1bListSIPInboundTrunkResponse\x12+\n\x05items\x18\x01 \x03(\x0b\x32\x1c.livekit.SIPInboundTrunkInfo\"\x1d\n\x1bListSIPOutboundTrunkRequest\"L\n\x1cListSIPOutboundTrunkResponse\x12,\n\x05items\x18\x01 \x03(\x0b\x32\x1d.livekit.SIPOutboundTrunkInfo\"-\n\x15\x44\x65leteSIPTrunkRequest\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\"7\n\x15SIPDispatchRuleDirect\x12\x11\n\troom_name\x18\x01 \x01(\t\x12\x0b\n\x03pin\x18\x02 \x01(\t\"=\n\x19SIPDispatchRuleIndividual\x12\x13\n\x0broom_prefix\x18\x01 \x01(\t\x12\x0b\n\x03pin\x18\x02 \x01(\t\"\xa1\x01\n\x0fSIPDispatchRule\x12>\n\x14\x64ispatch_rule_direct\x18\x01 \x01(\x0b\x32\x1e.livekit.SIPDispatchRuleDirectH\x00\x12\x46\n\x18\x64ispatch_rule_individual\x18\x02 \x01(\x0b\x32\".livekit.SIPDispatchRuleIndividualH\x00\x42\x06\n\x04rule\"\xab\x02\n\x1c\x43reateSIPDispatchRuleRequest\x12&\n\x04rule\x18\x01 \x01(\x0b\x32\x18.livekit.SIPDispatchRule\x12\x11\n\ttrunk_ids\x18\x02 \x03(\t\x12\x19\n\x11hide_phone_number\x18\x03 \x01(\x08\x12\x17\n\x0finbound_numbers\x18\x06 \x03(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x10\n\x08metadata\x18\x05 \x01(\t\x12I\n\nattributes\x18\x07 \x03(\x0b\x32\x35.livekit.CreateSIPDispatchRuleRequest.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb7\x02\n\x13SIPDispatchRuleInfo\x12\x1c\n\x14sip_dispatch_rule_id\x18\x01 \x01(\t\x12&\n\x04rule\x18\x02 \x01(\x0b\x32\x18.livekit.SIPDispatchRule\x12\x11\n\ttrunk_ids\x18\x03 \x03(\t\x12\x19\n\x11hide_phone_number\x18\x04 \x01(\x08\x12\x17\n\x0finbound_numbers\x18\x07 \x03(\t\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\x10\n\x08metadata\x18\x06 \x01(\t\x12@\n\nattributes\x18\x08 \x03(\x0b\x32,.livekit.SIPDispatchRuleInfo.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1c\n\x1aListSIPDispatchRuleRequest\"J\n\x1bListSIPDispatchRuleResponse\x12+\n\x05items\x18\x01 \x03(\x0b\x32\x1c.livekit.SIPDispatchRuleInfo\"<\n\x1c\x44\x65leteSIPDispatchRuleRequest\x12\x1c\n\x14sip_dispatch_rule_id\x18\x01 \x01(\t\"\x90\x03\n\x1b\x43reateSIPParticipantRequest\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12\x13\n\x0bsip_call_to\x18\x02 \x01(\t\x12\x11\n\troom_name\x18\x03 \x01(\t\x12\x1c\n\x14participant_identity\x18\x04 \x01(\t\x12\x18\n\x10participant_name\x18\x07 \x01(\t\x12\x1c\n\x14participant_metadata\x18\x08 \x01(\t\x12_\n\x16participant_attributes\x18\t \x03(\x0b\x32?.livekit.CreateSIPParticipantRequest.ParticipantAttributesEntry\x12\x0c\n\x04\x64tmf\x18\x05 \x01(\t\x12\x15\n\rplay_ringtone\x18\x06 \x01(\x08\x12\x19\n\x11hide_phone_number\x18\n \x01(\x08\x1a<\n\x1aParticipantAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"r\n\x12SIPParticipantInfo\x12\x16\n\x0eparticipant_id\x18\x01 \x01(\t\x12\x1c\n\x14participant_identity\x18\x02 \x01(\t\x12\x11\n\troom_name\x18\x03 \x01(\t\x12\x13\n\x0bsip_call_id\x18\x04 \x01(\t*k\n\x0cSIPTransport\x12\x16\n\x12SIP_TRANSPORT_AUTO\x10\x00\x12\x15\n\x11SIP_TRANSPORT_UDP\x10\x01\x12\x15\n\x11SIP_TRANSPORT_TCP\x10\x02\x12\x15\n\x11SIP_TRANSPORT_TLS\x10\x03\x32\xed\x07\n\x03SIP\x12L\n\x0e\x43reateSIPTrunk\x12\x1e.livekit.CreateSIPTrunkRequest\x1a\x15.livekit.SIPTrunkInfo\"\x03\x88\x02\x01\x12P\n\x0cListSIPTrunk\x12\x1c.livekit.ListSIPTrunkRequest\x1a\x1d.livekit.ListSIPTrunkResponse\"\x03\x88\x02\x01\x12\\\n\x15\x43reateSIPInboundTrunk\x12%.livekit.CreateSIPInboundTrunkRequest\x1a\x1c.livekit.SIPInboundTrunkInfo\x12_\n\x16\x43reateSIPOutboundTrunk\x12&.livekit.CreateSIPOutboundTrunkRequest\x1a\x1d.livekit.SIPOutboundTrunkInfo\x12`\n\x13ListSIPInboundTrunk\x12#.livekit.ListSIPInboundTrunkRequest\x1a$.livekit.ListSIPInboundTrunkResponse\x12\x63\n\x14ListSIPOutboundTrunk\x12$.livekit.ListSIPOutboundTrunkRequest\x1a%.livekit.ListSIPOutboundTrunkResponse\x12G\n\x0e\x44\x65leteSIPTrunk\x12\x1e.livekit.DeleteSIPTrunkRequest\x1a\x15.livekit.SIPTrunkInfo\x12\\\n\x15\x43reateSIPDispatchRule\x12%.livekit.CreateSIPDispatchRuleRequest\x1a\x1c.livekit.SIPDispatchRuleInfo\x12`\n\x13ListSIPDispatchRule\x12#.livekit.ListSIPDispatchRuleRequest\x1a$.livekit.ListSIPDispatchRuleResponse\x12\\\n\x15\x44\x65leteSIPDispatchRule\x12%.livekit.DeleteSIPDispatchRuleRequest\x1a\x1c.livekit.SIPDispatchRuleInfo\x12Y\n\x14\x43reateSIPParticipant\x12$.livekit.CreateSIPParticipantRequest\x1a\x1b.livekit.SIPParticipantInfoBFZ#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -41,14 +40,6 @@ _globals['_SIPTRUNKINFO'].fields_by_name['inbound_numbers_regex']._serialized_options = b'\030\001' _globals['_SIPTRUNKINFO']._loaded_options = None _globals['_SIPTRUNKINFO']._serialized_options = b'\030\001' - _globals['_SIPINBOUNDTRUNKINFO_HEADERSENTRY']._loaded_options = None - _globals['_SIPINBOUNDTRUNKINFO_HEADERSENTRY']._serialized_options = b'8\001' - _globals['_SIPINBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._loaded_options = None - _globals['_SIPINBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._serialized_options = b'8\001' - _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSENTRY']._loaded_options = None - _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSENTRY']._serialized_options = b'8\001' - _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._loaded_options = None - _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._serialized_options = b'8\001' _globals['_LISTSIPTRUNKREQUEST']._loaded_options = None _globals['_LISTSIPTRUNKREQUEST']._serialized_options = b'\030\001' _globals['_LISTSIPTRUNKRESPONSE']._loaded_options = None @@ -63,82 +54,62 @@ _globals['_SIP'].methods_by_name['CreateSIPTrunk']._serialized_options = b'\210\002\001' _globals['_SIP'].methods_by_name['ListSIPTrunk']._loaded_options = None _globals['_SIP'].methods_by_name['ListSIPTrunk']._serialized_options = b'\210\002\001' - _globals['_SIPTRANSPORT']._serialized_start=4345 - _globals['_SIPTRANSPORT']._serialized_end=4452 - _globals['_CREATESIPTRUNKREQUEST']._serialized_start=60 - _globals['_CREATESIPTRUNKREQUEST']._serialized_end=363 - _globals['_SIPTRUNKINFO']._serialized_start=366 - _globals['_SIPTRUNKINFO']._serialized_end=841 - _globals['_SIPTRUNKINFO_TRUNKKIND']._serialized_start=769 - _globals['_SIPTRUNKINFO_TRUNKKIND']._serialized_end=837 - _globals['_CREATESIPINBOUNDTRUNKREQUEST']._serialized_start=843 - _globals['_CREATESIPINBOUNDTRUNKREQUEST']._serialized_end=918 - _globals['_SIPINBOUNDTRUNKINFO']._serialized_start=921 - _globals['_SIPINBOUNDTRUNKINFO']._serialized_end=1365 - _globals['_SIPINBOUNDTRUNKINFO_HEADERSENTRY']._serialized_start=1259 - _globals['_SIPINBOUNDTRUNKINFO_HEADERSENTRY']._serialized_end=1305 - _globals['_SIPINBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._serialized_start=1307 - _globals['_SIPINBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._serialized_end=1365 - _globals['_CREATESIPOUTBOUNDTRUNKREQUEST']._serialized_start=1367 - _globals['_CREATESIPOUTBOUNDTRUNKREQUEST']._serialized_end=1444 - _globals['_SIPOUTBOUNDTRUNKINFO']._serialized_start=1447 - _globals['_SIPOUTBOUNDTRUNKINFO']._serialized_end=1901 - _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSENTRY']._serialized_start=1259 - _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSENTRY']._serialized_end=1305 - _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._serialized_start=1307 - _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._serialized_end=1365 - _globals['_GETSIPINBOUNDTRUNKREQUEST']._serialized_start=1903 - _globals['_GETSIPINBOUNDTRUNKREQUEST']._serialized_end=1952 - _globals['_GETSIPINBOUNDTRUNKRESPONSE']._serialized_start=1954 - _globals['_GETSIPINBOUNDTRUNKRESPONSE']._serialized_end=2027 - _globals['_GETSIPOUTBOUNDTRUNKREQUEST']._serialized_start=2029 - _globals['_GETSIPOUTBOUNDTRUNKREQUEST']._serialized_end=2079 - _globals['_GETSIPOUTBOUNDTRUNKRESPONSE']._serialized_start=2081 - _globals['_GETSIPOUTBOUNDTRUNKRESPONSE']._serialized_end=2156 - _globals['_LISTSIPTRUNKREQUEST']._serialized_start=2158 - _globals['_LISTSIPTRUNKREQUEST']._serialized_end=2183 - _globals['_LISTSIPTRUNKRESPONSE']._serialized_start=2185 - _globals['_LISTSIPTRUNKRESPONSE']._serialized_end=2249 - _globals['_LISTSIPINBOUNDTRUNKREQUEST']._serialized_start=2251 - _globals['_LISTSIPINBOUNDTRUNKREQUEST']._serialized_end=2279 - _globals['_LISTSIPINBOUNDTRUNKRESPONSE']._serialized_start=2281 - _globals['_LISTSIPINBOUNDTRUNKRESPONSE']._serialized_end=2355 - _globals['_LISTSIPOUTBOUNDTRUNKREQUEST']._serialized_start=2357 - _globals['_LISTSIPOUTBOUNDTRUNKREQUEST']._serialized_end=2386 - _globals['_LISTSIPOUTBOUNDTRUNKRESPONSE']._serialized_start=2388 - _globals['_LISTSIPOUTBOUNDTRUNKRESPONSE']._serialized_end=2464 - _globals['_DELETESIPTRUNKREQUEST']._serialized_start=2466 - _globals['_DELETESIPTRUNKREQUEST']._serialized_end=2511 - _globals['_SIPDISPATCHRULEDIRECT']._serialized_start=2513 - _globals['_SIPDISPATCHRULEDIRECT']._serialized_end=2568 - _globals['_SIPDISPATCHRULEINDIVIDUAL']._serialized_start=2570 - _globals['_SIPDISPATCHRULEINDIVIDUAL']._serialized_end=2631 - _globals['_SIPDISPATCHRULECALLEE']._serialized_start=2633 - _globals['_SIPDISPATCHRULECALLEE']._serialized_end=2709 - _globals['_SIPDISPATCHRULE']._serialized_start=2712 - _globals['_SIPDISPATCHRULE']._serialized_end=2937 - _globals['_CREATESIPDISPATCHRULEREQUEST']._serialized_start=2940 - _globals['_CREATESIPDISPATCHRULEREQUEST']._serialized_end=3239 - _globals['_CREATESIPDISPATCHRULEREQUEST_ATTRIBUTESENTRY']._serialized_start=3190 - _globals['_CREATESIPDISPATCHRULEREQUEST_ATTRIBUTESENTRY']._serialized_end=3239 - _globals['_SIPDISPATCHRULEINFO']._serialized_start=3242 - _globals['_SIPDISPATCHRULEINFO']._serialized_end=3553 - _globals['_SIPDISPATCHRULEINFO_ATTRIBUTESENTRY']._serialized_start=3190 - _globals['_SIPDISPATCHRULEINFO_ATTRIBUTESENTRY']._serialized_end=3239 - _globals['_LISTSIPDISPATCHRULEREQUEST']._serialized_start=3555 - _globals['_LISTSIPDISPATCHRULEREQUEST']._serialized_end=3583 - _globals['_LISTSIPDISPATCHRULERESPONSE']._serialized_start=3585 - _globals['_LISTSIPDISPATCHRULERESPONSE']._serialized_end=3659 - _globals['_DELETESIPDISPATCHRULEREQUEST']._serialized_start=3661 - _globals['_DELETESIPDISPATCHRULEREQUEST']._serialized_end=3721 - _globals['_CREATESIPPARTICIPANTREQUEST']._serialized_start=3724 - _globals['_CREATESIPPARTICIPANTREQUEST']._serialized_end=4124 - _globals['_CREATESIPPARTICIPANTREQUEST_PARTICIPANTATTRIBUTESENTRY']._serialized_start=4064 - _globals['_CREATESIPPARTICIPANTREQUEST_PARTICIPANTATTRIBUTESENTRY']._serialized_end=4124 - _globals['_SIPPARTICIPANTINFO']._serialized_start=4126 - _globals['_SIPPARTICIPANTINFO']._serialized_end=4240 - _globals['_TRANSFERSIPPARTICIPANTREQUEST']._serialized_start=4242 - _globals['_TRANSFERSIPPARTICIPANTREQUEST']._serialized_end=4343 - _globals['_SIP']._serialized_start=4455 - _globals['_SIP']._serialized_end=5743 + _globals['_SIPTRANSPORT']._serialized_start=3306 + _globals['_SIPTRANSPORT']._serialized_end=3413 + _globals['_CREATESIPTRUNKREQUEST']._serialized_start=31 + _globals['_CREATESIPTRUNKREQUEST']._serialized_end=334 + _globals['_SIPTRUNKINFO']._serialized_start=337 + _globals['_SIPTRUNKINFO']._serialized_end=812 + _globals['_SIPTRUNKINFO_TRUNKKIND']._serialized_start=740 + _globals['_SIPTRUNKINFO_TRUNKKIND']._serialized_end=808 + _globals['_CREATESIPINBOUNDTRUNKREQUEST']._serialized_start=814 + _globals['_CREATESIPINBOUNDTRUNKREQUEST']._serialized_end=889 + _globals['_SIPINBOUNDTRUNKINFO']._serialized_start=892 + _globals['_SIPINBOUNDTRUNKINFO']._serialized_end=1082 + _globals['_CREATESIPOUTBOUNDTRUNKREQUEST']._serialized_start=1084 + _globals['_CREATESIPOUTBOUNDTRUNKREQUEST']._serialized_end=1161 + _globals['_SIPOUTBOUNDTRUNKINFO']._serialized_start=1164 + _globals['_SIPOUTBOUNDTRUNKINFO']._serialized_end=1362 + _globals['_LISTSIPTRUNKREQUEST']._serialized_start=1364 + _globals['_LISTSIPTRUNKREQUEST']._serialized_end=1389 + _globals['_LISTSIPTRUNKRESPONSE']._serialized_start=1391 + _globals['_LISTSIPTRUNKRESPONSE']._serialized_end=1455 + _globals['_LISTSIPINBOUNDTRUNKREQUEST']._serialized_start=1457 + _globals['_LISTSIPINBOUNDTRUNKREQUEST']._serialized_end=1485 + _globals['_LISTSIPINBOUNDTRUNKRESPONSE']._serialized_start=1487 + _globals['_LISTSIPINBOUNDTRUNKRESPONSE']._serialized_end=1561 + _globals['_LISTSIPOUTBOUNDTRUNKREQUEST']._serialized_start=1563 + _globals['_LISTSIPOUTBOUNDTRUNKREQUEST']._serialized_end=1592 + _globals['_LISTSIPOUTBOUNDTRUNKRESPONSE']._serialized_start=1594 + _globals['_LISTSIPOUTBOUNDTRUNKRESPONSE']._serialized_end=1670 + _globals['_DELETESIPTRUNKREQUEST']._serialized_start=1672 + _globals['_DELETESIPTRUNKREQUEST']._serialized_end=1717 + _globals['_SIPDISPATCHRULEDIRECT']._serialized_start=1719 + _globals['_SIPDISPATCHRULEDIRECT']._serialized_end=1774 + _globals['_SIPDISPATCHRULEINDIVIDUAL']._serialized_start=1776 + _globals['_SIPDISPATCHRULEINDIVIDUAL']._serialized_end=1837 + _globals['_SIPDISPATCHRULE']._serialized_start=1840 + _globals['_SIPDISPATCHRULE']._serialized_end=2001 + _globals['_CREATESIPDISPATCHRULEREQUEST']._serialized_start=2004 + _globals['_CREATESIPDISPATCHRULEREQUEST']._serialized_end=2303 + _globals['_CREATESIPDISPATCHRULEREQUEST_ATTRIBUTESENTRY']._serialized_start=2254 + _globals['_CREATESIPDISPATCHRULEREQUEST_ATTRIBUTESENTRY']._serialized_end=2303 + _globals['_SIPDISPATCHRULEINFO']._serialized_start=2306 + _globals['_SIPDISPATCHRULEINFO']._serialized_end=2617 + _globals['_SIPDISPATCHRULEINFO_ATTRIBUTESENTRY']._serialized_start=2254 + _globals['_SIPDISPATCHRULEINFO_ATTRIBUTESENTRY']._serialized_end=2303 + _globals['_LISTSIPDISPATCHRULEREQUEST']._serialized_start=2619 + _globals['_LISTSIPDISPATCHRULEREQUEST']._serialized_end=2647 + _globals['_LISTSIPDISPATCHRULERESPONSE']._serialized_start=2649 + _globals['_LISTSIPDISPATCHRULERESPONSE']._serialized_end=2723 + _globals['_DELETESIPDISPATCHRULEREQUEST']._serialized_start=2725 + _globals['_DELETESIPDISPATCHRULEREQUEST']._serialized_end=2785 + _globals['_CREATESIPPARTICIPANTREQUEST']._serialized_start=2788 + _globals['_CREATESIPPARTICIPANTREQUEST']._serialized_end=3188 + _globals['_CREATESIPPARTICIPANTREQUEST_PARTICIPANTATTRIBUTESENTRY']._serialized_start=3128 + _globals['_CREATESIPPARTICIPANTREQUEST_PARTICIPANTATTRIBUTESENTRY']._serialized_end=3188 + _globals['_SIPPARTICIPANTINFO']._serialized_start=3190 + _globals['_SIPPARTICIPANTINFO']._serialized_end=3304 + _globals['_SIP']._serialized_start=3416 + _globals['_SIP']._serialized_end=4421 # @@protoc_insertion_point(module_scope) diff --git a/livekit-protocol/livekit/protocol/sip.pyi b/livekit-protocol/livekit/protocol/sip.pyi index 366c13cd..770b8e30 100644 --- a/livekit-protocol/livekit/protocol/sip.pyi +++ b/livekit-protocol/livekit/protocol/sip.pyi @@ -1,4 +1,3 @@ -from google.protobuf import empty_pb2 as _empty_pb2 from google.protobuf.internal import containers as _containers from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor @@ -91,21 +90,7 @@ class CreateSIPInboundTrunkRequest(_message.Message): def __init__(self, trunk: _Optional[_Union[SIPInboundTrunkInfo, _Mapping]] = ...) -> None: ... class SIPInboundTrunkInfo(_message.Message): - __slots__ = ("sip_trunk_id", "name", "metadata", "numbers", "allowed_addresses", "allowed_numbers", "auth_username", "auth_password", "headers", "headers_to_attributes") - class HeadersEntry(_message.Message): - __slots__ = ("key", "value") - KEY_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - key: str - value: str - def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... - class HeadersToAttributesEntry(_message.Message): - __slots__ = ("key", "value") - KEY_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - key: str - value: str - def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + __slots__ = ("sip_trunk_id", "name", "metadata", "numbers", "allowed_addresses", "allowed_numbers", "auth_username", "auth_password") SIP_TRUNK_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] METADATA_FIELD_NUMBER: _ClassVar[int] @@ -114,8 +99,6 @@ class SIPInboundTrunkInfo(_message.Message): ALLOWED_NUMBERS_FIELD_NUMBER: _ClassVar[int] AUTH_USERNAME_FIELD_NUMBER: _ClassVar[int] AUTH_PASSWORD_FIELD_NUMBER: _ClassVar[int] - HEADERS_FIELD_NUMBER: _ClassVar[int] - HEADERS_TO_ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] sip_trunk_id: str name: str metadata: str @@ -124,9 +107,7 @@ class SIPInboundTrunkInfo(_message.Message): allowed_numbers: _containers.RepeatedScalarFieldContainer[str] auth_username: str auth_password: str - headers: _containers.ScalarMap[str, str] - headers_to_attributes: _containers.ScalarMap[str, str] - def __init__(self, sip_trunk_id: _Optional[str] = ..., name: _Optional[str] = ..., metadata: _Optional[str] = ..., numbers: _Optional[_Iterable[str]] = ..., allowed_addresses: _Optional[_Iterable[str]] = ..., allowed_numbers: _Optional[_Iterable[str]] = ..., auth_username: _Optional[str] = ..., auth_password: _Optional[str] = ..., headers: _Optional[_Mapping[str, str]] = ..., headers_to_attributes: _Optional[_Mapping[str, str]] = ...) -> None: ... + def __init__(self, sip_trunk_id: _Optional[str] = ..., name: _Optional[str] = ..., metadata: _Optional[str] = ..., numbers: _Optional[_Iterable[str]] = ..., allowed_addresses: _Optional[_Iterable[str]] = ..., allowed_numbers: _Optional[_Iterable[str]] = ..., auth_username: _Optional[str] = ..., auth_password: _Optional[str] = ...) -> None: ... class CreateSIPOutboundTrunkRequest(_message.Message): __slots__ = ("trunk",) @@ -135,21 +116,7 @@ class CreateSIPOutboundTrunkRequest(_message.Message): def __init__(self, trunk: _Optional[_Union[SIPOutboundTrunkInfo, _Mapping]] = ...) -> None: ... class SIPOutboundTrunkInfo(_message.Message): - __slots__ = ("sip_trunk_id", "name", "metadata", "address", "transport", "numbers", "auth_username", "auth_password", "headers", "headers_to_attributes") - class HeadersEntry(_message.Message): - __slots__ = ("key", "value") - KEY_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - key: str - value: str - def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... - class HeadersToAttributesEntry(_message.Message): - __slots__ = ("key", "value") - KEY_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - key: str - value: str - def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + __slots__ = ("sip_trunk_id", "name", "metadata", "address", "transport", "numbers", "auth_username", "auth_password") SIP_TRUNK_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] METADATA_FIELD_NUMBER: _ClassVar[int] @@ -158,8 +125,6 @@ class SIPOutboundTrunkInfo(_message.Message): NUMBERS_FIELD_NUMBER: _ClassVar[int] AUTH_USERNAME_FIELD_NUMBER: _ClassVar[int] AUTH_PASSWORD_FIELD_NUMBER: _ClassVar[int] - HEADERS_FIELD_NUMBER: _ClassVar[int] - HEADERS_TO_ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] sip_trunk_id: str name: str metadata: str @@ -168,33 +133,7 @@ class SIPOutboundTrunkInfo(_message.Message): numbers: _containers.RepeatedScalarFieldContainer[str] auth_username: str auth_password: str - headers: _containers.ScalarMap[str, str] - headers_to_attributes: _containers.ScalarMap[str, str] - def __init__(self, sip_trunk_id: _Optional[str] = ..., name: _Optional[str] = ..., metadata: _Optional[str] = ..., address: _Optional[str] = ..., transport: _Optional[_Union[SIPTransport, str]] = ..., numbers: _Optional[_Iterable[str]] = ..., auth_username: _Optional[str] = ..., auth_password: _Optional[str] = ..., headers: _Optional[_Mapping[str, str]] = ..., headers_to_attributes: _Optional[_Mapping[str, str]] = ...) -> None: ... - -class GetSIPInboundTrunkRequest(_message.Message): - __slots__ = ("sip_trunk_id",) - SIP_TRUNK_ID_FIELD_NUMBER: _ClassVar[int] - sip_trunk_id: str - def __init__(self, sip_trunk_id: _Optional[str] = ...) -> None: ... - -class GetSIPInboundTrunkResponse(_message.Message): - __slots__ = ("trunk",) - TRUNK_FIELD_NUMBER: _ClassVar[int] - trunk: SIPInboundTrunkInfo - def __init__(self, trunk: _Optional[_Union[SIPInboundTrunkInfo, _Mapping]] = ...) -> None: ... - -class GetSIPOutboundTrunkRequest(_message.Message): - __slots__ = ("sip_trunk_id",) - SIP_TRUNK_ID_FIELD_NUMBER: _ClassVar[int] - sip_trunk_id: str - def __init__(self, sip_trunk_id: _Optional[str] = ...) -> None: ... - -class GetSIPOutboundTrunkResponse(_message.Message): - __slots__ = ("trunk",) - TRUNK_FIELD_NUMBER: _ClassVar[int] - trunk: SIPOutboundTrunkInfo - def __init__(self, trunk: _Optional[_Union[SIPOutboundTrunkInfo, _Mapping]] = ...) -> None: ... + def __init__(self, sip_trunk_id: _Optional[str] = ..., name: _Optional[str] = ..., metadata: _Optional[str] = ..., address: _Optional[str] = ..., transport: _Optional[_Union[SIPTransport, str]] = ..., numbers: _Optional[_Iterable[str]] = ..., auth_username: _Optional[str] = ..., auth_password: _Optional[str] = ...) -> None: ... class ListSIPTrunkRequest(_message.Message): __slots__ = () @@ -248,25 +187,13 @@ class SIPDispatchRuleIndividual(_message.Message): pin: str def __init__(self, room_prefix: _Optional[str] = ..., pin: _Optional[str] = ...) -> None: ... -class SIPDispatchRuleCallee(_message.Message): - __slots__ = ("room_prefix", "pin", "randomize") - ROOM_PREFIX_FIELD_NUMBER: _ClassVar[int] - PIN_FIELD_NUMBER: _ClassVar[int] - RANDOMIZE_FIELD_NUMBER: _ClassVar[int] - room_prefix: str - pin: str - randomize: bool - def __init__(self, room_prefix: _Optional[str] = ..., pin: _Optional[str] = ..., randomize: bool = ...) -> None: ... - class SIPDispatchRule(_message.Message): - __slots__ = ("dispatch_rule_direct", "dispatch_rule_individual", "dispatch_rule_callee") + __slots__ = ("dispatch_rule_direct", "dispatch_rule_individual") DISPATCH_RULE_DIRECT_FIELD_NUMBER: _ClassVar[int] DISPATCH_RULE_INDIVIDUAL_FIELD_NUMBER: _ClassVar[int] - DISPATCH_RULE_CALLEE_FIELD_NUMBER: _ClassVar[int] dispatch_rule_direct: SIPDispatchRuleDirect dispatch_rule_individual: SIPDispatchRuleIndividual - dispatch_rule_callee: SIPDispatchRuleCallee - def __init__(self, dispatch_rule_direct: _Optional[_Union[SIPDispatchRuleDirect, _Mapping]] = ..., dispatch_rule_individual: _Optional[_Union[SIPDispatchRuleIndividual, _Mapping]] = ..., dispatch_rule_callee: _Optional[_Union[SIPDispatchRuleCallee, _Mapping]] = ...) -> None: ... + def __init__(self, dispatch_rule_direct: _Optional[_Union[SIPDispatchRuleDirect, _Mapping]] = ..., dispatch_rule_individual: _Optional[_Union[SIPDispatchRuleIndividual, _Mapping]] = ...) -> None: ... class CreateSIPDispatchRuleRequest(_message.Message): __slots__ = ("rule", "trunk_ids", "hide_phone_number", "inbound_numbers", "name", "metadata", "attributes") @@ -378,13 +305,3 @@ class SIPParticipantInfo(_message.Message): room_name: str sip_call_id: str def __init__(self, participant_id: _Optional[str] = ..., participant_identity: _Optional[str] = ..., room_name: _Optional[str] = ..., sip_call_id: _Optional[str] = ...) -> None: ... - -class TransferSIPParticipantRequest(_message.Message): - __slots__ = ("participant_identity", "room_name", "transfer_to") - PARTICIPANT_IDENTITY_FIELD_NUMBER: _ClassVar[int] - ROOM_NAME_FIELD_NUMBER: _ClassVar[int] - TRANSFER_TO_FIELD_NUMBER: _ClassVar[int] - participant_identity: str - room_name: str - transfer_to: str - def __init__(self, participant_identity: _Optional[str] = ..., room_name: _Optional[str] = ..., transfer_to: _Optional[str] = ...) -> None: ... diff --git a/livekit-protocol/livekit/protocol/webhook.py b/livekit-protocol/livekit/protocol/webhook.py index 2ced9367..002a876a 100644 --- a/livekit-protocol/livekit/protocol/webhook.py +++ b/livekit-protocol/livekit/protocol/webhook.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: livekit_webhook.proto -# Protobuf Python Version: 5.28.0 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -13,7 +13,7 @@ _runtime_version.Domain.PUBLIC, 5, 28, - 0, + 2, '', 'livekit_webhook.proto' ) diff --git a/livekit-protocol/protocol b/livekit-protocol/protocol index a601adc5..5c7350d2 160000 --- a/livekit-protocol/protocol +++ b/livekit-protocol/protocol @@ -1 +1 @@ -Subproject commit a601adc5e9027820857a6d445b32a868b19d4184 +Subproject commit 5c7350d25904ed8fd8163e91ff47f0577ca6afad diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index db424f81..59f82c5f 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -35,6 +35,7 @@ ) from .transcription import Transcription from .rpc import RpcError +from ._proto.rpc_pb2 import RpcMethodInvocationResponseRequest class PublishTrackError(Exception): def __init__(self, message: str) -> None: @@ -375,26 +376,23 @@ async def _handle_rpc_method_invocation( ) response_error = RpcError.built_in('APPLICATION_ERROR') - req = proto_ffi.RpcMethodInvocationResponseRequest( + req = proto_ffi.FfiRequest(rpc_method_invocation_response=RpcMethodInvocationResponseRequest( invocation_id=invocation_id, error=response_error.to_proto() if response_error else None, - payload=response_payload, - ) - - res = FfiClient.instance.request( - proto_ffi.FfiRequest(rpc_method_invocation_response=req) - ) + payload=response_payload + )) + + res = FfiClient.instance.request(req) queue = FfiClient.instance.queue.subscribe() try: cb = await queue.wait_for( lambda e: ( - e.message.WhichOneof('message') == 'rpc_method_invocation_response' and - e.message.rpc_method_invocation_response.async_id == res.rpc_method_invocation_response.async_id + e.rpc_method_invocation_response.async_id == res.rpc_method_invocation_response.async_id ) ) - if cb.error: - print(f"error sending rpc method invocation response: {cb.error}") + if cb.rpc_method_invocation_response.error: + print(f"error sending rpc method invocation response: {cb.rpc_method_invocation_response.error}") finally: FfiClient.instance.queue.unsubscribe(queue) diff --git a/livekit-rtc/livekit/rtc/room.py b/livekit-rtc/livekit/rtc/room.py index ac10c56b..eb185cdd 100644 --- a/livekit-rtc/livekit/rtc/room.py +++ b/livekit-rtc/livekit/rtc/room.py @@ -418,8 +418,8 @@ async def _listen_task(self) -> None: # listen to incoming room events while True: event = await self._ffi_queue.get() - if event.message.WhichOneof("value") == "rpc_method_invocation": - self._on_rpc_method_invocation(event) + if event.WhichOneof("message") == "rpc_method_invocation": + self._on_rpc_method_invocation(event.rpc_method_invocation) elif event.room_event.room_handle == self._ffi_handle.handle: # type: ignore if event.room_event.HasField("eos"): break @@ -438,18 +438,17 @@ async def _listen_task(self) -> None: self._room_queue.put_nowait(event) await self._room_queue.join() - def _on_rpc_method_invocation(self, event: proto_room.RoomEvent): - rpc_invocation = event.message.rpc_method_invocation + def _on_rpc_method_invocation(self, rpc_invocation: proto_ffi.RpcMethodInvocation): if rpc_invocation.local_participant_handle == self._local_participant._ffi_handle.handle: # type: ignore caller = self._remote_participants.get(rpc_invocation.caller_identity) - self._local_participant._handle_rpc_method_invocation( + asyncio.create_task(self._local_participant._handle_rpc_method_invocation( rpc_invocation.invocation_id, rpc_invocation.method, rpc_invocation.request_id, caller, rpc_invocation.payload, rpc_invocation.timeout_ms, - ) + )) def _on_room_event(self, event: proto_room.RoomEvent): which = event.WhichOneof("message") From 1f7296c9ed9e0d4ff15e3b8e8d02c682e7d95721 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 20:06:53 +0000 Subject: [PATCH 07/53] generated protobuf --- .../livekit/protocol/analytics.py | 44 ++-- .../livekit/protocol/analytics.pyi | 6 +- livekit-protocol/livekit/protocol/models.py | 207 ++++++++---------- livekit-protocol/livekit/protocol/models.pyi | 121 +--------- livekit-protocol/livekit/protocol/sip.py | 147 +++++-------- livekit-protocol/livekit/protocol/sip.pyi | 95 +------- 6 files changed, 198 insertions(+), 422 deletions(-) diff --git a/livekit-protocol/livekit/protocol/analytics.py b/livekit-protocol/livekit/protocol/analytics.py index 4eb31fd5..15fef1ba 100644 --- a/livekit-protocol/livekit/protocol/analytics.py +++ b/livekit-protocol/livekit/protocol/analytics.py @@ -18,7 +18,7 @@ from . import ingress as _ingress_ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17livekit_analytics.proto\x12\x07livekit\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x14livekit_models.proto\x1a\x14livekit_egress.proto\x1a\x15livekit_ingress.proto\"T\n\x13\x41nalyticsVideoLayer\x12\r\n\x05layer\x18\x01 \x01(\x05\x12\x0f\n\x07packets\x18\x02 \x01(\r\x12\r\n\x05\x62ytes\x18\x03 \x01(\x04\x12\x0e\n\x06\x66rames\x18\x04 \x01(\r\"\xd3\x03\n\x0f\x41nalyticsStream\x12\x0c\n\x04ssrc\x18\x01 \x01(\r\x12\x17\n\x0fprimary_packets\x18\x02 \x01(\r\x12\x15\n\rprimary_bytes\x18\x03 \x01(\x04\x12\x1a\n\x12retransmit_packets\x18\x04 \x01(\r\x12\x18\n\x10retransmit_bytes\x18\x05 \x01(\x04\x12\x17\n\x0fpadding_packets\x18\x06 \x01(\r\x12\x15\n\rpadding_bytes\x18\x07 \x01(\x04\x12\x14\n\x0cpackets_lost\x18\x08 \x01(\r\x12\x0e\n\x06\x66rames\x18\t \x01(\r\x12\x0b\n\x03rtt\x18\n \x01(\r\x12\x0e\n\x06jitter\x18\x0b \x01(\r\x12\r\n\x05nacks\x18\x0c \x01(\r\x12\x0c\n\x04plis\x18\r \x01(\r\x12\x0c\n\x04\x66irs\x18\x0e \x01(\r\x12\x32\n\x0cvideo_layers\x18\x0f \x03(\x0b\x32\x1c.livekit.AnalyticsVideoLayer\x12.\n\nstart_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1c\n\x14packets_out_of_order\x18\x13 \x01(\r\"\xd2\x02\n\rAnalyticsStat\x12\n\n\x02id\x18\x0e \x01(\t\x12\x15\n\ranalytics_key\x18\x01 \x01(\t\x12!\n\x04kind\x18\x02 \x01(\x0e\x32\x13.livekit.StreamType\x12.\n\ntime_stamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04node\x18\x04 \x01(\t\x12\x0f\n\x07room_id\x18\x05 \x01(\t\x12\x11\n\troom_name\x18\x06 \x01(\t\x12\x16\n\x0eparticipant_id\x18\x07 \x01(\t\x12\x10\n\x08track_id\x18\x08 \x01(\t\x12\r\n\x05score\x18\t \x01(\x02\x12)\n\x07streams\x18\n \x03(\x0b\x32\x18.livekit.AnalyticsStream\x12\x0c\n\x04mime\x18\x0b \x01(\t\x12\x11\n\tmin_score\x18\x0c \x01(\x02\x12\x14\n\x0cmedian_score\x18\r \x01(\x02\"7\n\x0e\x41nalyticsStats\x12%\n\x05stats\x18\x01 \x03(\x0b\x32\x16.livekit.AnalyticsStat\"\x9a\x02\n\x13\x41nalyticsClientMeta\x12\x0e\n\x06region\x18\x01 \x01(\t\x12\x0c\n\x04node\x18\x02 \x01(\t\x12\x13\n\x0b\x63lient_addr\x18\x03 \x01(\t\x12\x1b\n\x13\x63lient_connect_time\x18\x04 \x01(\r\x12\x17\n\x0f\x63onnection_type\x18\x05 \x01(\t\x12\x32\n\x10reconnect_reason\x18\x06 \x01(\x0e\x32\x18.livekit.ReconnectReason\x12\x15\n\x08geo_hash\x18\x07 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07\x63ountry\x18\x08 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x07isp_asn\x18\t \x01(\rH\x02\x88\x01\x01\x42\x0b\n\t_geo_hashB\n\n\x08_countryB\n\n\x08_isp_asn\"\xda\x05\n\x0e\x41nalyticsEvent\x12\n\n\x02id\x18\x19 \x01(\t\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.livekit.AnalyticsEventType\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07room_id\x18\x03 \x01(\t\x12\x1b\n\x04room\x18\x04 \x01(\x0b\x32\r.livekit.Room\x12\x16\n\x0eparticipant_id\x18\x05 \x01(\t\x12-\n\x0bparticipant\x18\x06 \x01(\x0b\x32\x18.livekit.ParticipantInfo\x12\x10\n\x08track_id\x18\x07 \x01(\t\x12!\n\x05track\x18\x08 \x01(\x0b\x32\x12.livekit.TrackInfo\x12\x15\n\ranalytics_key\x18\n \x01(\t\x12(\n\x0b\x63lient_info\x18\x0b \x01(\x0b\x32\x13.livekit.ClientInfo\x12\x31\n\x0b\x63lient_meta\x18\x0c \x01(\x0b\x32\x1c.livekit.AnalyticsClientMeta\x12\x11\n\tegress_id\x18\r \x01(\t\x12\x12\n\ningress_id\x18\x13 \x01(\t\x12;\n\x1cmax_subscribed_video_quality\x18\x0e \x01(\x0e\x32\x15.livekit.VideoQuality\x12+\n\tpublisher\x18\x0f \x01(\x0b\x32\x18.livekit.ParticipantInfo\x12\x0c\n\x04mime\x18\x10 \x01(\t\x12#\n\x06\x65gress\x18\x11 \x01(\x0b\x32\x13.livekit.EgressInfo\x12%\n\x07ingress\x18\x12 \x01(\x0b\x32\x14.livekit.IngressInfo\x12\r\n\x05\x65rror\x18\x14 \x01(\t\x12$\n\trtp_stats\x18\x15 \x01(\x0b\x32\x11.livekit.RTPStats\x12\x13\n\x0bvideo_layer\x18\x16 \x01(\x05\x12\x0f\n\x07node_id\x18\x18 \x01(\t\":\n\x0f\x41nalyticsEvents\x12\'\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x17.livekit.AnalyticsEvent\"\xa4\x01\n\x18\x41nalyticsRoomParticipant\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12-\n\x05state\x18\x04 \x01(\x0e\x32\x1e.livekit.ParticipantInfo.State\x12-\n\tjoined_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xa6\x01\n\rAnalyticsRoom\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x12\n\nproject_id\x18\x05 \x01(\t\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x0cparticipants\x18\x04 \x03(\x0b\x32!.livekit.AnalyticsRoomParticipant\"\x94\x01\n\x12\x41nalyticsNodeRooms\x12\x0f\n\x07node_id\x18\x01 \x01(\t\x12\x17\n\x0fsequence_number\x18\x02 \x01(\x04\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12%\n\x05rooms\x18\x04 \x03(\x0b\x32\x16.livekit.AnalyticsRoom**\n\nStreamType\x12\x0c\n\x08UPSTREAM\x10\x00\x12\x0e\n\nDOWNSTREAM\x10\x01*\x95\x05\n\x12\x41nalyticsEventType\x12\x10\n\x0cROOM_CREATED\x10\x00\x12\x0e\n\nROOM_ENDED\x10\x01\x12\x16\n\x12PARTICIPANT_JOINED\x10\x02\x12\x14\n\x10PARTICIPANT_LEFT\x10\x03\x12\x13\n\x0fTRACK_PUBLISHED\x10\x04\x12\x1b\n\x17TRACK_PUBLISH_REQUESTED\x10\x14\x12\x15\n\x11TRACK_UNPUBLISHED\x10\x05\x12\x14\n\x10TRACK_SUBSCRIBED\x10\x06\x12\x1d\n\x19TRACK_SUBSCRIBE_REQUESTED\x10\x15\x12\x1a\n\x16TRACK_SUBSCRIBE_FAILED\x10\x19\x12\x16\n\x12TRACK_UNSUBSCRIBED\x10\x07\x12\x1a\n\x16TRACK_PUBLISHED_UPDATE\x10\n\x12\x0f\n\x0bTRACK_MUTED\x10\x17\x12\x11\n\rTRACK_UNMUTED\x10\x18\x12\x17\n\x13TRACK_PUBLISH_STATS\x10\x1a\x12\x19\n\x15TRACK_SUBSCRIBE_STATS\x10\x1b\x12\x16\n\x12PARTICIPANT_ACTIVE\x10\x0b\x12\x17\n\x13PARTICIPANT_RESUMED\x10\x16\x12\x12\n\x0e\x45GRESS_STARTED\x10\x0c\x12\x10\n\x0c\x45GRESS_ENDED\x10\r\x12\x12\n\x0e\x45GRESS_UPDATED\x10\x1c\x12&\n\"TRACK_MAX_SUBSCRIBED_VIDEO_QUALITY\x10\x0e\x12\x0f\n\x0bRECONNECTED\x10\x0f\x12\x13\n\x0fINGRESS_CREATED\x10\x12\x12\x13\n\x0fINGRESS_DELETED\x10\x13\x12\x13\n\x0fINGRESS_STARTED\x10\x10\x12\x11\n\rINGRESS_ENDED\x10\x11\x12\x13\n\x0fINGRESS_UPDATED\x10\x1d\x42\x46Z#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17livekit_analytics.proto\x12\x07livekit\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x14livekit_models.proto\x1a\x14livekit_egress.proto\x1a\x15livekit_ingress.proto\"T\n\x13\x41nalyticsVideoLayer\x12\r\n\x05layer\x18\x01 \x01(\x05\x12\x0f\n\x07packets\x18\x02 \x01(\r\x12\r\n\x05\x62ytes\x18\x03 \x01(\x04\x12\x0e\n\x06\x66rames\x18\x04 \x01(\r\"\xb5\x03\n\x0f\x41nalyticsStream\x12\x0c\n\x04ssrc\x18\x01 \x01(\r\x12\x17\n\x0fprimary_packets\x18\x02 \x01(\r\x12\x15\n\rprimary_bytes\x18\x03 \x01(\x04\x12\x1a\n\x12retransmit_packets\x18\x04 \x01(\r\x12\x18\n\x10retransmit_bytes\x18\x05 \x01(\x04\x12\x17\n\x0fpadding_packets\x18\x06 \x01(\r\x12\x15\n\rpadding_bytes\x18\x07 \x01(\x04\x12\x14\n\x0cpackets_lost\x18\x08 \x01(\r\x12\x0e\n\x06\x66rames\x18\t \x01(\r\x12\x0b\n\x03rtt\x18\n \x01(\r\x12\x0e\n\x06jitter\x18\x0b \x01(\r\x12\r\n\x05nacks\x18\x0c \x01(\r\x12\x0c\n\x04plis\x18\r \x01(\r\x12\x0c\n\x04\x66irs\x18\x0e \x01(\r\x12\x32\n\x0cvideo_layers\x18\x0f \x03(\x0b\x32\x1c.livekit.AnalyticsVideoLayer\x12.\n\nstart_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd2\x02\n\rAnalyticsStat\x12\n\n\x02id\x18\x0e \x01(\t\x12\x15\n\ranalytics_key\x18\x01 \x01(\t\x12!\n\x04kind\x18\x02 \x01(\x0e\x32\x13.livekit.StreamType\x12.\n\ntime_stamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04node\x18\x04 \x01(\t\x12\x0f\n\x07room_id\x18\x05 \x01(\t\x12\x11\n\troom_name\x18\x06 \x01(\t\x12\x16\n\x0eparticipant_id\x18\x07 \x01(\t\x12\x10\n\x08track_id\x18\x08 \x01(\t\x12\r\n\x05score\x18\t \x01(\x02\x12)\n\x07streams\x18\n \x03(\x0b\x32\x18.livekit.AnalyticsStream\x12\x0c\n\x04mime\x18\x0b \x01(\t\x12\x11\n\tmin_score\x18\x0c \x01(\x02\x12\x14\n\x0cmedian_score\x18\r \x01(\x02\"7\n\x0e\x41nalyticsStats\x12%\n\x05stats\x18\x01 \x03(\x0b\x32\x16.livekit.AnalyticsStat\"\x9a\x02\n\x13\x41nalyticsClientMeta\x12\x0e\n\x06region\x18\x01 \x01(\t\x12\x0c\n\x04node\x18\x02 \x01(\t\x12\x13\n\x0b\x63lient_addr\x18\x03 \x01(\t\x12\x1b\n\x13\x63lient_connect_time\x18\x04 \x01(\r\x12\x17\n\x0f\x63onnection_type\x18\x05 \x01(\t\x12\x32\n\x10reconnect_reason\x18\x06 \x01(\x0e\x32\x18.livekit.ReconnectReason\x12\x15\n\x08geo_hash\x18\x07 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07\x63ountry\x18\x08 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x07isp_asn\x18\t \x01(\rH\x02\x88\x01\x01\x42\x0b\n\t_geo_hashB\n\n\x08_countryB\n\n\x08_isp_asn\"\xda\x05\n\x0e\x41nalyticsEvent\x12\n\n\x02id\x18\x19 \x01(\t\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.livekit.AnalyticsEventType\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07room_id\x18\x03 \x01(\t\x12\x1b\n\x04room\x18\x04 \x01(\x0b\x32\r.livekit.Room\x12\x16\n\x0eparticipant_id\x18\x05 \x01(\t\x12-\n\x0bparticipant\x18\x06 \x01(\x0b\x32\x18.livekit.ParticipantInfo\x12\x10\n\x08track_id\x18\x07 \x01(\t\x12!\n\x05track\x18\x08 \x01(\x0b\x32\x12.livekit.TrackInfo\x12\x15\n\ranalytics_key\x18\n \x01(\t\x12(\n\x0b\x63lient_info\x18\x0b \x01(\x0b\x32\x13.livekit.ClientInfo\x12\x31\n\x0b\x63lient_meta\x18\x0c \x01(\x0b\x32\x1c.livekit.AnalyticsClientMeta\x12\x11\n\tegress_id\x18\r \x01(\t\x12\x12\n\ningress_id\x18\x13 \x01(\t\x12;\n\x1cmax_subscribed_video_quality\x18\x0e \x01(\x0e\x32\x15.livekit.VideoQuality\x12+\n\tpublisher\x18\x0f \x01(\x0b\x32\x18.livekit.ParticipantInfo\x12\x0c\n\x04mime\x18\x10 \x01(\t\x12#\n\x06\x65gress\x18\x11 \x01(\x0b\x32\x13.livekit.EgressInfo\x12%\n\x07ingress\x18\x12 \x01(\x0b\x32\x14.livekit.IngressInfo\x12\r\n\x05\x65rror\x18\x14 \x01(\t\x12$\n\trtp_stats\x18\x15 \x01(\x0b\x32\x11.livekit.RTPStats\x12\x13\n\x0bvideo_layer\x18\x16 \x01(\x05\x12\x0f\n\x07node_id\x18\x18 \x01(\t\":\n\x0f\x41nalyticsEvents\x12\'\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x17.livekit.AnalyticsEvent\"\xa4\x01\n\x18\x41nalyticsRoomParticipant\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12-\n\x05state\x18\x04 \x01(\x0e\x32\x1e.livekit.ParticipantInfo.State\x12-\n\tjoined_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xa6\x01\n\rAnalyticsRoom\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x12\n\nproject_id\x18\x05 \x01(\t\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x0cparticipants\x18\x04 \x03(\x0b\x32!.livekit.AnalyticsRoomParticipant\"\x94\x01\n\x12\x41nalyticsNodeRooms\x12\x0f\n\x07node_id\x18\x01 \x01(\t\x12\x17\n\x0fsequence_number\x18\x02 \x01(\x04\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12%\n\x05rooms\x18\x04 \x03(\x0b\x32\x16.livekit.AnalyticsRoom**\n\nStreamType\x12\x0c\n\x08UPSTREAM\x10\x00\x12\x0e\n\nDOWNSTREAM\x10\x01*\x95\x05\n\x12\x41nalyticsEventType\x12\x10\n\x0cROOM_CREATED\x10\x00\x12\x0e\n\nROOM_ENDED\x10\x01\x12\x16\n\x12PARTICIPANT_JOINED\x10\x02\x12\x14\n\x10PARTICIPANT_LEFT\x10\x03\x12\x13\n\x0fTRACK_PUBLISHED\x10\x04\x12\x1b\n\x17TRACK_PUBLISH_REQUESTED\x10\x14\x12\x15\n\x11TRACK_UNPUBLISHED\x10\x05\x12\x14\n\x10TRACK_SUBSCRIBED\x10\x06\x12\x1d\n\x19TRACK_SUBSCRIBE_REQUESTED\x10\x15\x12\x1a\n\x16TRACK_SUBSCRIBE_FAILED\x10\x19\x12\x16\n\x12TRACK_UNSUBSCRIBED\x10\x07\x12\x1a\n\x16TRACK_PUBLISHED_UPDATE\x10\n\x12\x0f\n\x0bTRACK_MUTED\x10\x17\x12\x11\n\rTRACK_UNMUTED\x10\x18\x12\x17\n\x13TRACK_PUBLISH_STATS\x10\x1a\x12\x19\n\x15TRACK_SUBSCRIBE_STATS\x10\x1b\x12\x16\n\x12PARTICIPANT_ACTIVE\x10\x0b\x12\x17\n\x13PARTICIPANT_RESUMED\x10\x16\x12\x12\n\x0e\x45GRESS_STARTED\x10\x0c\x12\x10\n\x0c\x45GRESS_ENDED\x10\r\x12\x12\n\x0e\x45GRESS_UPDATED\x10\x1c\x12&\n\"TRACK_MAX_SUBSCRIBED_VIDEO_QUALITY\x10\x0e\x12\x0f\n\x0bRECONNECTED\x10\x0f\x12\x13\n\x0fINGRESS_CREATED\x10\x12\x12\x13\n\x0fINGRESS_DELETED\x10\x13\x12\x13\n\x0fINGRESS_STARTED\x10\x10\x12\x11\n\rINGRESS_ENDED\x10\x11\x12\x13\n\x0fINGRESS_UPDATED\x10\x1d\x42\x46Z#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -26,28 +26,28 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' - _globals['_STREAMTYPE']._serialized_start=2655 - _globals['_STREAMTYPE']._serialized_end=2697 - _globals['_ANALYTICSEVENTTYPE']._serialized_start=2700 - _globals['_ANALYTICSEVENTTYPE']._serialized_end=3361 + _globals['_STREAMTYPE']._serialized_start=2625 + _globals['_STREAMTYPE']._serialized_end=2667 + _globals['_ANALYTICSEVENTTYPE']._serialized_start=2670 + _globals['_ANALYTICSEVENTTYPE']._serialized_end=3331 _globals['_ANALYTICSVIDEOLAYER']._serialized_start=136 _globals['_ANALYTICSVIDEOLAYER']._serialized_end=220 _globals['_ANALYTICSSTREAM']._serialized_start=223 - _globals['_ANALYTICSSTREAM']._serialized_end=690 - _globals['_ANALYTICSSTAT']._serialized_start=693 - _globals['_ANALYTICSSTAT']._serialized_end=1031 - _globals['_ANALYTICSSTATS']._serialized_start=1033 - _globals['_ANALYTICSSTATS']._serialized_end=1088 - _globals['_ANALYTICSCLIENTMETA']._serialized_start=1091 - _globals['_ANALYTICSCLIENTMETA']._serialized_end=1373 - _globals['_ANALYTICSEVENT']._serialized_start=1376 - _globals['_ANALYTICSEVENT']._serialized_end=2106 - _globals['_ANALYTICSEVENTS']._serialized_start=2108 - _globals['_ANALYTICSEVENTS']._serialized_end=2166 - _globals['_ANALYTICSROOMPARTICIPANT']._serialized_start=2169 - _globals['_ANALYTICSROOMPARTICIPANT']._serialized_end=2333 - _globals['_ANALYTICSROOM']._serialized_start=2336 - _globals['_ANALYTICSROOM']._serialized_end=2502 - _globals['_ANALYTICSNODEROOMS']._serialized_start=2505 - _globals['_ANALYTICSNODEROOMS']._serialized_end=2653 + _globals['_ANALYTICSSTREAM']._serialized_end=660 + _globals['_ANALYTICSSTAT']._serialized_start=663 + _globals['_ANALYTICSSTAT']._serialized_end=1001 + _globals['_ANALYTICSSTATS']._serialized_start=1003 + _globals['_ANALYTICSSTATS']._serialized_end=1058 + _globals['_ANALYTICSCLIENTMETA']._serialized_start=1061 + _globals['_ANALYTICSCLIENTMETA']._serialized_end=1343 + _globals['_ANALYTICSEVENT']._serialized_start=1346 + _globals['_ANALYTICSEVENT']._serialized_end=2076 + _globals['_ANALYTICSEVENTS']._serialized_start=2078 + _globals['_ANALYTICSEVENTS']._serialized_end=2136 + _globals['_ANALYTICSROOMPARTICIPANT']._serialized_start=2139 + _globals['_ANALYTICSROOMPARTICIPANT']._serialized_end=2303 + _globals['_ANALYTICSROOM']._serialized_start=2306 + _globals['_ANALYTICSROOM']._serialized_end=2472 + _globals['_ANALYTICSNODEROOMS']._serialized_start=2475 + _globals['_ANALYTICSNODEROOMS']._serialized_end=2623 # @@protoc_insertion_point(module_scope) diff --git a/livekit-protocol/livekit/protocol/analytics.pyi b/livekit-protocol/livekit/protocol/analytics.pyi index 2a4c096d..30cfbd50 100644 --- a/livekit-protocol/livekit/protocol/analytics.pyi +++ b/livekit-protocol/livekit/protocol/analytics.pyi @@ -89,7 +89,7 @@ class AnalyticsVideoLayer(_message.Message): def __init__(self, layer: _Optional[int] = ..., packets: _Optional[int] = ..., bytes: _Optional[int] = ..., frames: _Optional[int] = ...) -> None: ... class AnalyticsStream(_message.Message): - __slots__ = ("ssrc", "primary_packets", "primary_bytes", "retransmit_packets", "retransmit_bytes", "padding_packets", "padding_bytes", "packets_lost", "frames", "rtt", "jitter", "nacks", "plis", "firs", "video_layers", "start_time", "end_time", "packets_out_of_order") + __slots__ = ("ssrc", "primary_packets", "primary_bytes", "retransmit_packets", "retransmit_bytes", "padding_packets", "padding_bytes", "packets_lost", "frames", "rtt", "jitter", "nacks", "plis", "firs", "video_layers", "start_time", "end_time") SSRC_FIELD_NUMBER: _ClassVar[int] PRIMARY_PACKETS_FIELD_NUMBER: _ClassVar[int] PRIMARY_BYTES_FIELD_NUMBER: _ClassVar[int] @@ -107,7 +107,6 @@ class AnalyticsStream(_message.Message): VIDEO_LAYERS_FIELD_NUMBER: _ClassVar[int] START_TIME_FIELD_NUMBER: _ClassVar[int] END_TIME_FIELD_NUMBER: _ClassVar[int] - PACKETS_OUT_OF_ORDER_FIELD_NUMBER: _ClassVar[int] ssrc: int primary_packets: int primary_bytes: int @@ -125,8 +124,7 @@ class AnalyticsStream(_message.Message): video_layers: _containers.RepeatedCompositeFieldContainer[AnalyticsVideoLayer] start_time: _timestamp_pb2.Timestamp end_time: _timestamp_pb2.Timestamp - packets_out_of_order: int - def __init__(self, ssrc: _Optional[int] = ..., primary_packets: _Optional[int] = ..., primary_bytes: _Optional[int] = ..., retransmit_packets: _Optional[int] = ..., retransmit_bytes: _Optional[int] = ..., padding_packets: _Optional[int] = ..., padding_bytes: _Optional[int] = ..., packets_lost: _Optional[int] = ..., frames: _Optional[int] = ..., rtt: _Optional[int] = ..., jitter: _Optional[int] = ..., nacks: _Optional[int] = ..., plis: _Optional[int] = ..., firs: _Optional[int] = ..., video_layers: _Optional[_Iterable[_Union[AnalyticsVideoLayer, _Mapping]]] = ..., start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., packets_out_of_order: _Optional[int] = ...) -> None: ... + def __init__(self, ssrc: _Optional[int] = ..., primary_packets: _Optional[int] = ..., primary_bytes: _Optional[int] = ..., retransmit_packets: _Optional[int] = ..., retransmit_bytes: _Optional[int] = ..., padding_packets: _Optional[int] = ..., padding_bytes: _Optional[int] = ..., packets_lost: _Optional[int] = ..., frames: _Optional[int] = ..., rtt: _Optional[int] = ..., jitter: _Optional[int] = ..., nacks: _Optional[int] = ..., plis: _Optional[int] = ..., firs: _Optional[int] = ..., video_layers: _Optional[_Iterable[_Union[AnalyticsVideoLayer, _Mapping]]] = ..., start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class AnalyticsStat(_message.Message): __slots__ = ("id", "analytics_key", "kind", "time_stamp", "node", "room_id", "room_name", "participant_id", "track_id", "score", "streams", "mime", "min_score", "median_score") diff --git a/livekit-protocol/livekit/protocol/models.py b/livekit-protocol/livekit/protocol/models.py index 373529d7..5c46fcb6 100644 --- a/livekit-protocol/livekit/protocol/models.py +++ b/livekit-protocol/livekit/protocol/models.py @@ -13,10 +13,9 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -import metrics as _metrics_ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14livekit_models.proto\x12\x07livekit\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x15livekit_metrics.proto\"\xc9\x02\n\x04Room\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x15\n\rempty_timeout\x18\x03 \x01(\r\x12\x19\n\x11\x64\x65parture_timeout\x18\x0e \x01(\r\x12\x18\n\x10max_participants\x18\x04 \x01(\r\x12\x15\n\rcreation_time\x18\x05 \x01(\x03\x12\x15\n\rturn_password\x18\x06 \x01(\t\x12&\n\x0e\x65nabled_codecs\x18\x07 \x03(\x0b\x32\x0e.livekit.Codec\x12\x10\n\x08metadata\x18\x08 \x01(\t\x12\x18\n\x10num_participants\x18\t \x01(\r\x12\x16\n\x0enum_publishers\x18\x0b \x01(\r\x12\x18\n\x10\x61\x63tive_recording\x18\n \x01(\x08\x12&\n\x07version\x18\r \x01(\x0b\x32\x15.livekit.TimedVersion\"(\n\x05\x43odec\x12\x0c\n\x04mime\x18\x01 \x01(\t\x12\x11\n\tfmtp_line\x18\x02 \x01(\t\"9\n\x0cPlayoutDelay\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0b\n\x03min\x18\x02 \x01(\r\x12\x0b\n\x03max\x18\x03 \x01(\r\"\x85\x02\n\x15ParticipantPermission\x12\x15\n\rcan_subscribe\x18\x01 \x01(\x08\x12\x13\n\x0b\x63\x61n_publish\x18\x02 \x01(\x08\x12\x18\n\x10\x63\x61n_publish_data\x18\x03 \x01(\x08\x12\x31\n\x13\x63\x61n_publish_sources\x18\t \x03(\x0e\x32\x14.livekit.TrackSource\x12\x0e\n\x06hidden\x18\x07 \x01(\x08\x12\x14\n\x08recorder\x18\x08 \x01(\x08\x42\x02\x18\x01\x12\x1b\n\x13\x63\x61n_update_metadata\x18\n \x01(\x08\x12\x11\n\x05\x61gent\x18\x0b \x01(\x08\x42\x02\x18\x01\x12\x1d\n\x15\x63\x61n_subscribe_metrics\x18\x0c \x01(\x08\"\xf8\x04\n\x0fParticipantInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12-\n\x05state\x18\x03 \x01(\x0e\x32\x1e.livekit.ParticipantInfo.State\x12\"\n\x06tracks\x18\x04 \x03(\x0b\x32\x12.livekit.TrackInfo\x12\x10\n\x08metadata\x18\x05 \x01(\t\x12\x11\n\tjoined_at\x18\x06 \x01(\x03\x12\x0c\n\x04name\x18\t \x01(\t\x12\x0f\n\x07version\x18\n \x01(\r\x12\x32\n\npermission\x18\x0b \x01(\x0b\x32\x1e.livekit.ParticipantPermission\x12\x0e\n\x06region\x18\x0c \x01(\t\x12\x14\n\x0cis_publisher\x18\r \x01(\x08\x12+\n\x04kind\x18\x0e \x01(\x0e\x32\x1d.livekit.ParticipantInfo.Kind\x12<\n\nattributes\x18\x0f \x03(\x0b\x32(.livekit.ParticipantInfo.AttributesEntry\x12\x34\n\x11\x64isconnect_reason\x18\x10 \x01(\x0e\x32\x19.livekit.DisconnectReason\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\">\n\x05State\x12\x0b\n\x07JOINING\x10\x00\x12\n\n\x06JOINED\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x10\n\x0c\x44ISCONNECTED\x10\x03\"A\n\x04Kind\x12\x0c\n\x08STANDARD\x10\x00\x12\x0b\n\x07INGRESS\x10\x01\x12\n\n\x06\x45GRESS\x10\x02\x12\x07\n\x03SIP\x10\x03\x12\t\n\x05\x41GENT\x10\x04\"3\n\nEncryption\"%\n\x04Type\x12\x08\n\x04NONE\x10\x00\x12\x07\n\x03GCM\x10\x01\x12\n\n\x06\x43USTOM\x10\x02\"f\n\x12SimulcastCodecInfo\x12\x11\n\tmime_type\x18\x01 \x01(\t\x12\x0b\n\x03mid\x18\x02 \x01(\t\x12\x0b\n\x03\x63id\x18\x03 \x01(\t\x12#\n\x06layers\x18\x04 \x03(\x0b\x32\x13.livekit.VideoLayer\"\xf5\x03\n\tTrackInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12 \n\x04type\x18\x02 \x01(\x0e\x32\x12.livekit.TrackType\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\r\n\x05muted\x18\x04 \x01(\x08\x12\r\n\x05width\x18\x05 \x01(\r\x12\x0e\n\x06height\x18\x06 \x01(\r\x12\x11\n\tsimulcast\x18\x07 \x01(\x08\x12\x13\n\x0b\x64isable_dtx\x18\x08 \x01(\x08\x12$\n\x06source\x18\t \x01(\x0e\x32\x14.livekit.TrackSource\x12#\n\x06layers\x18\n \x03(\x0b\x32\x13.livekit.VideoLayer\x12\x11\n\tmime_type\x18\x0b \x01(\t\x12\x0b\n\x03mid\x18\x0c \x01(\t\x12+\n\x06\x63odecs\x18\r \x03(\x0b\x32\x1b.livekit.SimulcastCodecInfo\x12\x0e\n\x06stereo\x18\x0e \x01(\x08\x12\x13\n\x0b\x64isable_red\x18\x0f \x01(\x08\x12,\n\nencryption\x18\x10 \x01(\x0e\x32\x18.livekit.Encryption.Type\x12\x0e\n\x06stream\x18\x11 \x01(\t\x12&\n\x07version\x18\x12 \x01(\x0b\x32\x15.livekit.TimedVersion\x12\x32\n\x0e\x61udio_features\x18\x13 \x03(\x0e\x32\x1a.livekit.AudioTrackFeature\"r\n\nVideoLayer\x12&\n\x07quality\x18\x01 \x01(\x0e\x32\x15.livekit.VideoQuality\x12\r\n\x05width\x18\x02 \x01(\r\x12\x0e\n\x06height\x18\x03 \x01(\r\x12\x0f\n\x07\x62itrate\x18\x04 \x01(\r\x12\x0c\n\x04ssrc\x18\x05 \x01(\r\"\xa7\x04\n\nDataPacket\x12*\n\x04kind\x18\x01 \x01(\x0e\x32\x18.livekit.DataPacket.KindB\x02\x18\x01\x12\x1c\n\x14participant_identity\x18\x04 \x01(\t\x12\x1e\n\x16\x64\x65stination_identities\x18\x05 \x03(\t\x12#\n\x04user\x18\x02 \x01(\x0b\x32\x13.livekit.UserPacketH\x00\x12\x33\n\x07speaker\x18\x03 \x01(\x0b\x32\x1c.livekit.ActiveSpeakerUpdateB\x02\x18\x01H\x00\x12$\n\x08sip_dtmf\x18\x06 \x01(\x0b\x32\x10.livekit.SipDTMFH\x00\x12/\n\rtranscription\x18\x07 \x01(\x0b\x32\x16.livekit.TranscriptionH\x00\x12(\n\x07metrics\x18\x08 \x01(\x0b\x32\x15.livekit.MetricsBatchH\x00\x12,\n\x0c\x63hat_message\x18\t \x01(\x0b\x32\x14.livekit.ChatMessageH\x00\x12*\n\x0brpc_request\x18\n \x01(\x0b\x32\x13.livekit.RpcRequestH\x00\x12\"\n\x07rpc_ack\x18\x0b \x01(\x0b\x32\x0f.livekit.RpcAckH\x00\x12,\n\x0crpc_response\x18\x0c \x01(\x0b\x32\x14.livekit.RpcResponseH\x00\"\x1f\n\x04Kind\x12\x0c\n\x08RELIABLE\x10\x00\x12\t\n\x05LOSSY\x10\x01\x42\x07\n\x05value\"=\n\x13\x41\x63tiveSpeakerUpdate\x12&\n\x08speakers\x18\x01 \x03(\x0b\x32\x14.livekit.SpeakerInfo\"9\n\x0bSpeakerInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\r\n\x05level\x18\x02 \x01(\x02\x12\x0e\n\x06\x61\x63tive\x18\x03 \x01(\x08\"\xa0\x02\n\nUserPacket\x12\x1b\n\x0fparticipant_sid\x18\x01 \x01(\tB\x02\x18\x01\x12 \n\x14participant_identity\x18\x05 \x01(\tB\x02\x18\x01\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\x12\x1c\n\x10\x64\x65stination_sids\x18\x03 \x03(\tB\x02\x18\x01\x12\"\n\x16\x64\x65stination_identities\x18\x06 \x03(\tB\x02\x18\x01\x12\x12\n\x05topic\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x0f\n\x02id\x18\x08 \x01(\tH\x01\x88\x01\x01\x12\x17\n\nstart_time\x18\t \x01(\x04H\x02\x88\x01\x01\x12\x15\n\x08\x65nd_time\x18\n \x01(\x04H\x03\x88\x01\x01\x42\x08\n\x06_topicB\x05\n\x03_idB\r\n\x0b_start_timeB\x0b\n\t_end_time\"&\n\x07SipDTMF\x12\x0c\n\x04\x63ode\x18\x03 \x01(\r\x12\r\n\x05\x64igit\x18\x04 \x01(\t\"|\n\rTranscription\x12(\n transcribed_participant_identity\x18\x02 \x01(\t\x12\x10\n\x08track_id\x18\x03 \x01(\t\x12/\n\x08segments\x18\x04 \x03(\x0b\x32\x1d.livekit.TranscriptionSegment\"w\n\x14TranscriptionSegment\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04text\x18\x02 \x01(\t\x12\x12\n\nstart_time\x18\x03 \x01(\x04\x12\x10\n\x08\x65nd_time\x18\x04 \x01(\x04\x12\r\n\x05\x66inal\x18\x05 \x01(\x08\x12\x10\n\x08language\x18\x06 \x01(\t\"\x91\x01\n\x0b\x43hatMessage\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\ttimestamp\x18\x02 \x01(\x03\x12\x1b\n\x0e\x65\x64it_timestamp\x18\x03 \x01(\x03H\x00\x88\x01\x01\x12\x0f\n\x07message\x18\x04 \x01(\t\x12\x0f\n\x07\x64\x65leted\x18\x05 \x01(\x08\x12\x11\n\tgenerated\x18\x06 \x01(\x08\x42\x11\n\x0f_edit_timestamp\"g\n\nRpcRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06method\x18\x02 \x01(\t\x12\x0f\n\x07payload\x18\x03 \x01(\t\x12\x1b\n\x13response_timeout_ms\x18\x04 \x01(\r\x12\x0f\n\x07version\x18\x05 \x01(\r\"\x1c\n\x06RpcAck\x12\x12\n\nrequest_id\x18\x01 \x01(\t\"a\n\x0bRpcResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x11\n\x07payload\x18\x02 \x01(\tH\x00\x12\"\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x11.livekit.RpcErrorH\x00\x42\x07\n\x05value\"7\n\x08RpcError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\t\"@\n\x11ParticipantTracks\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x12\n\ntrack_sids\x18\x02 \x03(\t\"\xce\x01\n\nServerInfo\x12,\n\x07\x65\x64ition\x18\x01 \x01(\x0e\x32\x1b.livekit.ServerInfo.Edition\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08protocol\x18\x03 \x01(\x05\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x0f\n\x07node_id\x18\x05 \x01(\t\x12\x12\n\ndebug_info\x18\x06 \x01(\t\x12\x16\n\x0e\x61gent_protocol\x18\x07 \x01(\x05\"\"\n\x07\x45\x64ition\x12\x0c\n\x08Standard\x10\x00\x12\t\n\x05\x43loud\x10\x01\"\x8a\x03\n\nClientInfo\x12$\n\x03sdk\x18\x01 \x01(\x0e\x32\x17.livekit.ClientInfo.SDK\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08protocol\x18\x03 \x01(\x05\x12\n\n\x02os\x18\x04 \x01(\t\x12\x12\n\nos_version\x18\x05 \x01(\t\x12\x14\n\x0c\x64\x65vice_model\x18\x06 \x01(\t\x12\x0f\n\x07\x62rowser\x18\x07 \x01(\t\x12\x17\n\x0f\x62rowser_version\x18\x08 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\t \x01(\t\x12\x0f\n\x07network\x18\n \x01(\t\x12\x12\n\nother_sdks\x18\x0b \x01(\t\"\x9c\x01\n\x03SDK\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x06\n\x02JS\x10\x01\x12\t\n\x05SWIFT\x10\x02\x12\x0b\n\x07\x41NDROID\x10\x03\x12\x0b\n\x07\x46LUTTER\x10\x04\x12\x06\n\x02GO\x10\x05\x12\t\n\x05UNITY\x10\x06\x12\x10\n\x0cREACT_NATIVE\x10\x07\x12\x08\n\x04RUST\x10\x08\x12\n\n\x06PYTHON\x10\t\x12\x07\n\x03\x43PP\x10\n\x12\r\n\tUNITY_WEB\x10\x0b\x12\x08\n\x04NODE\x10\x0c\"\x8c\x02\n\x13\x43lientConfiguration\x12*\n\x05video\x18\x01 \x01(\x0b\x32\x1b.livekit.VideoConfiguration\x12+\n\x06screen\x18\x02 \x01(\x0b\x32\x1b.livekit.VideoConfiguration\x12\x37\n\x11resume_connection\x18\x03 \x01(\x0e\x32\x1c.livekit.ClientConfigSetting\x12\x30\n\x0f\x64isabled_codecs\x18\x04 \x01(\x0b\x32\x17.livekit.DisabledCodecs\x12\x31\n\x0b\x66orce_relay\x18\x05 \x01(\x0e\x32\x1c.livekit.ClientConfigSetting\"L\n\x12VideoConfiguration\x12\x36\n\x10hardware_encoder\x18\x01 \x01(\x0e\x32\x1c.livekit.ClientConfigSetting\"Q\n\x0e\x44isabledCodecs\x12\x1e\n\x06\x63odecs\x18\x01 \x03(\x0b\x32\x0e.livekit.Codec\x12\x1f\n\x07publish\x18\x02 \x03(\x0b\x32\x0e.livekit.Codec\"\x80\x02\n\x08RTPDrift\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x64uration\x18\x03 \x01(\x01\x12\x17\n\x0fstart_timestamp\x18\x04 \x01(\x04\x12\x15\n\rend_timestamp\x18\x05 \x01(\x04\x12\x17\n\x0frtp_clock_ticks\x18\x06 \x01(\x04\x12\x15\n\rdrift_samples\x18\x07 \x01(\x03\x12\x10\n\x08\x64rift_ms\x18\x08 \x01(\x01\x12\x12\n\nclock_rate\x18\t \x01(\x01\"\xd6\n\n\x08RTPStats\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x64uration\x18\x03 \x01(\x01\x12\x0f\n\x07packets\x18\x04 \x01(\r\x12\x13\n\x0bpacket_rate\x18\x05 \x01(\x01\x12\r\n\x05\x62ytes\x18\x06 \x01(\x04\x12\x14\n\x0cheader_bytes\x18\' \x01(\x04\x12\x0f\n\x07\x62itrate\x18\x07 \x01(\x01\x12\x14\n\x0cpackets_lost\x18\x08 \x01(\r\x12\x18\n\x10packet_loss_rate\x18\t \x01(\x01\x12\x1e\n\x16packet_loss_percentage\x18\n \x01(\x02\x12\x19\n\x11packets_duplicate\x18\x0b \x01(\r\x12\x1d\n\x15packet_duplicate_rate\x18\x0c \x01(\x01\x12\x17\n\x0f\x62ytes_duplicate\x18\r \x01(\x04\x12\x1e\n\x16header_bytes_duplicate\x18( \x01(\x04\x12\x19\n\x11\x62itrate_duplicate\x18\x0e \x01(\x01\x12\x17\n\x0fpackets_padding\x18\x0f \x01(\r\x12\x1b\n\x13packet_padding_rate\x18\x10 \x01(\x01\x12\x15\n\rbytes_padding\x18\x11 \x01(\x04\x12\x1c\n\x14header_bytes_padding\x18) \x01(\x04\x12\x17\n\x0f\x62itrate_padding\x18\x12 \x01(\x01\x12\x1c\n\x14packets_out_of_order\x18\x13 \x01(\r\x12\x0e\n\x06\x66rames\x18\x14 \x01(\r\x12\x12\n\nframe_rate\x18\x15 \x01(\x01\x12\x16\n\x0ejitter_current\x18\x16 \x01(\x01\x12\x12\n\njitter_max\x18\x17 \x01(\x01\x12:\n\rgap_histogram\x18\x18 \x03(\x0b\x32#.livekit.RTPStats.GapHistogramEntry\x12\r\n\x05nacks\x18\x19 \x01(\r\x12\x11\n\tnack_acks\x18% \x01(\r\x12\x13\n\x0bnack_misses\x18\x1a \x01(\r\x12\x15\n\rnack_repeated\x18& \x01(\r\x12\x0c\n\x04plis\x18\x1b \x01(\r\x12,\n\x08last_pli\x18\x1c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x66irs\x18\x1d \x01(\r\x12,\n\x08last_fir\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0brtt_current\x18\x1f \x01(\r\x12\x0f\n\x07rtt_max\x18 \x01(\r\x12\x12\n\nkey_frames\x18! \x01(\r\x12\x32\n\x0elast_key_frame\x18\" \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0flayer_lock_plis\x18# \x01(\r\x12\x37\n\x13last_layer_lock_pli\x18$ \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\'\n\x0cpacket_drift\x18, \x01(\x0b\x32\x11.livekit.RTPDrift\x12+\n\x10ntp_report_drift\x18- \x01(\x0b\x32\x11.livekit.RTPDrift\x12/\n\x14rebased_report_drift\x18. \x01(\x0b\x32\x11.livekit.RTPDrift\x12\x30\n\x15received_report_drift\x18/ \x01(\x0b\x32\x11.livekit.RTPDrift\x1a\x33\n\x11GapHistogramEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\"\xa2\x01\n\x15RTCPSenderReportState\x12\x15\n\rrtp_timestamp\x18\x01 \x01(\r\x12\x19\n\x11rtp_timestamp_ext\x18\x02 \x01(\x04\x12\x15\n\rntp_timestamp\x18\x03 \x01(\x04\x12\n\n\x02\x61t\x18\x04 \x01(\x03\x12\x13\n\x0b\x61t_adjusted\x18\x05 \x01(\x03\x12\x0f\n\x07packets\x18\x06 \x01(\r\x12\x0e\n\x06octets\x18\x07 \x01(\x04\"\xc9\x02\n\x11RTPForwarderState\x12\x0f\n\x07started\x18\x01 \x01(\x08\x12\x1f\n\x17reference_layer_spatial\x18\x02 \x01(\x05\x12\x16\n\x0epre_start_time\x18\x03 \x01(\x03\x12\x1b\n\x13\x65xt_first_timestamp\x18\x04 \x01(\x04\x12$\n\x1c\x64ummy_start_timestamp_offset\x18\x05 \x01(\x04\x12+\n\nrtp_munger\x18\x06 \x01(\x0b\x32\x17.livekit.RTPMungerState\x12-\n\nvp8_munger\x18\x07 \x01(\x0b\x32\x17.livekit.VP8MungerStateH\x00\x12;\n\x13sender_report_state\x18\x08 \x03(\x0b\x32\x1e.livekit.RTCPSenderReportStateB\x0e\n\x0c\x63odec_munger\"\xcb\x01\n\x0eRTPMungerState\x12 \n\x18\x65xt_last_sequence_number\x18\x01 \x01(\x04\x12\'\n\x1f\x65xt_second_last_sequence_number\x18\x02 \x01(\x04\x12\x1a\n\x12\x65xt_last_timestamp\x18\x03 \x01(\x04\x12!\n\x19\x65xt_second_last_timestamp\x18\x04 \x01(\x04\x12\x13\n\x0blast_marker\x18\x05 \x01(\x08\x12\x1a\n\x12second_last_marker\x18\x06 \x01(\x08\"\xb8\x01\n\x0eVP8MungerState\x12\x1b\n\x13\x65xt_last_picture_id\x18\x01 \x01(\x05\x12\x17\n\x0fpicture_id_used\x18\x02 \x01(\x08\x12\x18\n\x10last_tl0_pic_idx\x18\x03 \x01(\r\x12\x18\n\x10tl0_pic_idx_used\x18\x04 \x01(\x08\x12\x10\n\x08tid_used\x18\x05 \x01(\x08\x12\x14\n\x0clast_key_idx\x18\x06 \x01(\r\x12\x14\n\x0ckey_idx_used\x18\x07 \x01(\x08\"1\n\x0cTimedVersion\x12\x12\n\nunix_micro\x18\x01 \x01(\x03\x12\r\n\x05ticks\x18\x02 \x01(\x05*/\n\nAudioCodec\x12\x0e\n\nDEFAULT_AC\x10\x00\x12\x08\n\x04OPUS\x10\x01\x12\x07\n\x03\x41\x41\x43\x10\x02*V\n\nVideoCodec\x12\x0e\n\nDEFAULT_VC\x10\x00\x12\x11\n\rH264_BASELINE\x10\x01\x12\r\n\tH264_MAIN\x10\x02\x12\r\n\tH264_HIGH\x10\x03\x12\x07\n\x03VP8\x10\x04*)\n\nImageCodec\x12\x0e\n\nIC_DEFAULT\x10\x00\x12\x0b\n\x07IC_JPEG\x10\x01*+\n\tTrackType\x12\t\n\x05\x41UDIO\x10\x00\x12\t\n\x05VIDEO\x10\x01\x12\x08\n\x04\x44\x41TA\x10\x02*`\n\x0bTrackSource\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x43\x41MERA\x10\x01\x12\x0e\n\nMICROPHONE\x10\x02\x12\x10\n\x0cSCREEN_SHARE\x10\x03\x12\x16\n\x12SCREEN_SHARE_AUDIO\x10\x04*6\n\x0cVideoQuality\x12\x07\n\x03LOW\x10\x00\x12\n\n\x06MEDIUM\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\x07\n\x03OFF\x10\x03*@\n\x11\x43onnectionQuality\x12\x08\n\x04POOR\x10\x00\x12\x08\n\x04GOOD\x10\x01\x12\r\n\tEXCELLENT\x10\x02\x12\x08\n\x04LOST\x10\x03*;\n\x13\x43lientConfigSetting\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02*\xec\x01\n\x10\x44isconnectReason\x12\x12\n\x0eUNKNOWN_REASON\x10\x00\x12\x14\n\x10\x43LIENT_INITIATED\x10\x01\x12\x16\n\x12\x44UPLICATE_IDENTITY\x10\x02\x12\x13\n\x0fSERVER_SHUTDOWN\x10\x03\x12\x17\n\x13PARTICIPANT_REMOVED\x10\x04\x12\x10\n\x0cROOM_DELETED\x10\x05\x12\x12\n\x0eSTATE_MISMATCH\x10\x06\x12\x10\n\x0cJOIN_FAILURE\x10\x07\x12\r\n\tMIGRATION\x10\x08\x12\x10\n\x0cSIGNAL_CLOSE\x10\t\x12\x0f\n\x0bROOM_CLOSED\x10\n*\x89\x01\n\x0fReconnectReason\x12\x0e\n\nRR_UNKNOWN\x10\x00\x12\x1a\n\x16RR_SIGNAL_DISCONNECTED\x10\x01\x12\x17\n\x13RR_PUBLISHER_FAILED\x10\x02\x12\x18\n\x14RR_SUBSCRIBER_FAILED\x10\x03\x12\x17\n\x13RR_SWITCH_CANDIDATE\x10\x04*T\n\x11SubscriptionError\x12\x0e\n\nSE_UNKNOWN\x10\x00\x12\x18\n\x14SE_CODEC_UNSUPPORTED\x10\x01\x12\x15\n\x11SE_TRACK_NOTFOUND\x10\x02*\xa3\x01\n\x11\x41udioTrackFeature\x12\r\n\tTF_STEREO\x10\x00\x12\r\n\tTF_NO_DTX\x10\x01\x12\x18\n\x14TF_AUTO_GAIN_CONTROL\x10\x02\x12\x18\n\x14TF_ECHO_CANCELLATION\x10\x03\x12\x18\n\x14TF_NOISE_SUPPRESSION\x10\x04\x12\"\n\x1eTF_ENHANCED_NOISE_CANCELLATION\x10\x05\x42\x46Z#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14livekit_models.proto\x12\x07livekit\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc9\x02\n\x04Room\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x15\n\rempty_timeout\x18\x03 \x01(\r\x12\x19\n\x11\x64\x65parture_timeout\x18\x0e \x01(\r\x12\x18\n\x10max_participants\x18\x04 \x01(\r\x12\x15\n\rcreation_time\x18\x05 \x01(\x03\x12\x15\n\rturn_password\x18\x06 \x01(\t\x12&\n\x0e\x65nabled_codecs\x18\x07 \x03(\x0b\x32\x0e.livekit.Codec\x12\x10\n\x08metadata\x18\x08 \x01(\t\x12\x18\n\x10num_participants\x18\t \x01(\r\x12\x16\n\x0enum_publishers\x18\x0b \x01(\r\x12\x18\n\x10\x61\x63tive_recording\x18\n \x01(\x08\x12&\n\x07version\x18\r \x01(\x0b\x32\x15.livekit.TimedVersion\"(\n\x05\x43odec\x12\x0c\n\x04mime\x18\x01 \x01(\t\x12\x11\n\tfmtp_line\x18\x02 \x01(\t\"9\n\x0cPlayoutDelay\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x0b\n\x03min\x18\x02 \x01(\r\x12\x0b\n\x03max\x18\x03 \x01(\r\"\xe6\x01\n\x15ParticipantPermission\x12\x15\n\rcan_subscribe\x18\x01 \x01(\x08\x12\x13\n\x0b\x63\x61n_publish\x18\x02 \x01(\x08\x12\x18\n\x10\x63\x61n_publish_data\x18\x03 \x01(\x08\x12\x31\n\x13\x63\x61n_publish_sources\x18\t \x03(\x0e\x32\x14.livekit.TrackSource\x12\x0e\n\x06hidden\x18\x07 \x01(\x08\x12\x14\n\x08recorder\x18\x08 \x01(\x08\x42\x02\x18\x01\x12\x1b\n\x13\x63\x61n_update_metadata\x18\n \x01(\x08\x12\x11\n\x05\x61gent\x18\x0b \x01(\x08\x42\x02\x18\x01\"\xf8\x04\n\x0fParticipantInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12-\n\x05state\x18\x03 \x01(\x0e\x32\x1e.livekit.ParticipantInfo.State\x12\"\n\x06tracks\x18\x04 \x03(\x0b\x32\x12.livekit.TrackInfo\x12\x10\n\x08metadata\x18\x05 \x01(\t\x12\x11\n\tjoined_at\x18\x06 \x01(\x03\x12\x0c\n\x04name\x18\t \x01(\t\x12\x0f\n\x07version\x18\n \x01(\r\x12\x32\n\npermission\x18\x0b \x01(\x0b\x32\x1e.livekit.ParticipantPermission\x12\x0e\n\x06region\x18\x0c \x01(\t\x12\x14\n\x0cis_publisher\x18\r \x01(\x08\x12+\n\x04kind\x18\x0e \x01(\x0e\x32\x1d.livekit.ParticipantInfo.Kind\x12<\n\nattributes\x18\x0f \x03(\x0b\x32(.livekit.ParticipantInfo.AttributesEntry\x12\x34\n\x11\x64isconnect_reason\x18\x10 \x01(\x0e\x32\x19.livekit.DisconnectReason\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\">\n\x05State\x12\x0b\n\x07JOINING\x10\x00\x12\n\n\x06JOINED\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x10\n\x0c\x44ISCONNECTED\x10\x03\"A\n\x04Kind\x12\x0c\n\x08STANDARD\x10\x00\x12\x0b\n\x07INGRESS\x10\x01\x12\n\n\x06\x45GRESS\x10\x02\x12\x07\n\x03SIP\x10\x03\x12\t\n\x05\x41GENT\x10\x04\"3\n\nEncryption\"%\n\x04Type\x12\x08\n\x04NONE\x10\x00\x12\x07\n\x03GCM\x10\x01\x12\n\n\x06\x43USTOM\x10\x02\"f\n\x12SimulcastCodecInfo\x12\x11\n\tmime_type\x18\x01 \x01(\t\x12\x0b\n\x03mid\x18\x02 \x01(\t\x12\x0b\n\x03\x63id\x18\x03 \x01(\t\x12#\n\x06layers\x18\x04 \x03(\x0b\x32\x13.livekit.VideoLayer\"\xf5\x03\n\tTrackInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12 \n\x04type\x18\x02 \x01(\x0e\x32\x12.livekit.TrackType\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\r\n\x05muted\x18\x04 \x01(\x08\x12\r\n\x05width\x18\x05 \x01(\r\x12\x0e\n\x06height\x18\x06 \x01(\r\x12\x11\n\tsimulcast\x18\x07 \x01(\x08\x12\x13\n\x0b\x64isable_dtx\x18\x08 \x01(\x08\x12$\n\x06source\x18\t \x01(\x0e\x32\x14.livekit.TrackSource\x12#\n\x06layers\x18\n \x03(\x0b\x32\x13.livekit.VideoLayer\x12\x11\n\tmime_type\x18\x0b \x01(\t\x12\x0b\n\x03mid\x18\x0c \x01(\t\x12+\n\x06\x63odecs\x18\r \x03(\x0b\x32\x1b.livekit.SimulcastCodecInfo\x12\x0e\n\x06stereo\x18\x0e \x01(\x08\x12\x13\n\x0b\x64isable_red\x18\x0f \x01(\x08\x12,\n\nencryption\x18\x10 \x01(\x0e\x32\x18.livekit.Encryption.Type\x12\x0e\n\x06stream\x18\x11 \x01(\t\x12&\n\x07version\x18\x12 \x01(\x0b\x32\x15.livekit.TimedVersion\x12\x32\n\x0e\x61udio_features\x18\x13 \x03(\x0e\x32\x1a.livekit.AudioTrackFeature\"r\n\nVideoLayer\x12&\n\x07quality\x18\x01 \x01(\x0e\x32\x15.livekit.VideoQuality\x12\r\n\x05width\x18\x02 \x01(\r\x12\x0e\n\x06height\x18\x03 \x01(\r\x12\x0f\n\x07\x62itrate\x18\x04 \x01(\r\x12\x0c\n\x04ssrc\x18\x05 \x01(\r\"\xd1\x02\n\nDataPacket\x12*\n\x04kind\x18\x01 \x01(\x0e\x32\x18.livekit.DataPacket.KindB\x02\x18\x01\x12\x1c\n\x14participant_identity\x18\x04 \x01(\t\x12\x1e\n\x16\x64\x65stination_identities\x18\x05 \x03(\t\x12#\n\x04user\x18\x02 \x01(\x0b\x32\x13.livekit.UserPacketH\x00\x12\x33\n\x07speaker\x18\x03 \x01(\x0b\x32\x1c.livekit.ActiveSpeakerUpdateB\x02\x18\x01H\x00\x12$\n\x08sip_dtmf\x18\x06 \x01(\x0b\x32\x10.livekit.SipDTMFH\x00\x12/\n\rtranscription\x18\x07 \x01(\x0b\x32\x16.livekit.TranscriptionH\x00\"\x1f\n\x04Kind\x12\x0c\n\x08RELIABLE\x10\x00\x12\t\n\x05LOSSY\x10\x01\x42\x07\n\x05value\"=\n\x13\x41\x63tiveSpeakerUpdate\x12&\n\x08speakers\x18\x01 \x03(\x0b\x32\x14.livekit.SpeakerInfo\"9\n\x0bSpeakerInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\r\n\x05level\x18\x02 \x01(\x02\x12\x0e\n\x06\x61\x63tive\x18\x03 \x01(\x08\"\xa0\x02\n\nUserPacket\x12\x1b\n\x0fparticipant_sid\x18\x01 \x01(\tB\x02\x18\x01\x12 \n\x14participant_identity\x18\x05 \x01(\tB\x02\x18\x01\x12\x0f\n\x07payload\x18\x02 \x01(\x0c\x12\x1c\n\x10\x64\x65stination_sids\x18\x03 \x03(\tB\x02\x18\x01\x12\"\n\x16\x64\x65stination_identities\x18\x06 \x03(\tB\x02\x18\x01\x12\x12\n\x05topic\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x0f\n\x02id\x18\x08 \x01(\tH\x01\x88\x01\x01\x12\x17\n\nstart_time\x18\t \x01(\x04H\x02\x88\x01\x01\x12\x15\n\x08\x65nd_time\x18\n \x01(\x04H\x03\x88\x01\x01\x42\x08\n\x06_topicB\x05\n\x03_idB\r\n\x0b_start_timeB\x0b\n\t_end_time\"&\n\x07SipDTMF\x12\x0c\n\x04\x63ode\x18\x03 \x01(\r\x12\r\n\x05\x64igit\x18\x04 \x01(\t\"|\n\rTranscription\x12(\n transcribed_participant_identity\x18\x02 \x01(\t\x12\x10\n\x08track_id\x18\x03 \x01(\t\x12/\n\x08segments\x18\x04 \x03(\x0b\x32\x1d.livekit.TranscriptionSegment\"w\n\x14TranscriptionSegment\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04text\x18\x02 \x01(\t\x12\x12\n\nstart_time\x18\x03 \x01(\x04\x12\x10\n\x08\x65nd_time\x18\x04 \x01(\x04\x12\r\n\x05\x66inal\x18\x05 \x01(\x08\x12\x10\n\x08language\x18\x06 \x01(\t\"@\n\x11ParticipantTracks\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x12\n\ntrack_sids\x18\x02 \x03(\t\"\xce\x01\n\nServerInfo\x12,\n\x07\x65\x64ition\x18\x01 \x01(\x0e\x32\x1b.livekit.ServerInfo.Edition\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08protocol\x18\x03 \x01(\x05\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x0f\n\x07node_id\x18\x05 \x01(\t\x12\x12\n\ndebug_info\x18\x06 \x01(\t\x12\x16\n\x0e\x61gent_protocol\x18\x07 \x01(\x05\"\"\n\x07\x45\x64ition\x12\x0c\n\x08Standard\x10\x00\x12\t\n\x05\x43loud\x10\x01\"\xdd\x02\n\nClientInfo\x12$\n\x03sdk\x18\x01 \x01(\x0e\x32\x17.livekit.ClientInfo.SDK\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x10\n\x08protocol\x18\x03 \x01(\x05\x12\n\n\x02os\x18\x04 \x01(\t\x12\x12\n\nos_version\x18\x05 \x01(\t\x12\x14\n\x0c\x64\x65vice_model\x18\x06 \x01(\t\x12\x0f\n\x07\x62rowser\x18\x07 \x01(\t\x12\x17\n\x0f\x62rowser_version\x18\x08 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\t \x01(\t\x12\x0f\n\x07network\x18\n \x01(\t\"\x83\x01\n\x03SDK\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x06\n\x02JS\x10\x01\x12\t\n\x05SWIFT\x10\x02\x12\x0b\n\x07\x41NDROID\x10\x03\x12\x0b\n\x07\x46LUTTER\x10\x04\x12\x06\n\x02GO\x10\x05\x12\t\n\x05UNITY\x10\x06\x12\x10\n\x0cREACT_NATIVE\x10\x07\x12\x08\n\x04RUST\x10\x08\x12\n\n\x06PYTHON\x10\t\x12\x07\n\x03\x43PP\x10\n\"\x8c\x02\n\x13\x43lientConfiguration\x12*\n\x05video\x18\x01 \x01(\x0b\x32\x1b.livekit.VideoConfiguration\x12+\n\x06screen\x18\x02 \x01(\x0b\x32\x1b.livekit.VideoConfiguration\x12\x37\n\x11resume_connection\x18\x03 \x01(\x0e\x32\x1c.livekit.ClientConfigSetting\x12\x30\n\x0f\x64isabled_codecs\x18\x04 \x01(\x0b\x32\x17.livekit.DisabledCodecs\x12\x31\n\x0b\x66orce_relay\x18\x05 \x01(\x0e\x32\x1c.livekit.ClientConfigSetting\"L\n\x12VideoConfiguration\x12\x36\n\x10hardware_encoder\x18\x01 \x01(\x0e\x32\x1c.livekit.ClientConfigSetting\"Q\n\x0e\x44isabledCodecs\x12\x1e\n\x06\x63odecs\x18\x01 \x03(\x0b\x32\x0e.livekit.Codec\x12\x1f\n\x07publish\x18\x02 \x03(\x0b\x32\x0e.livekit.Codec\"\x80\x02\n\x08RTPDrift\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x64uration\x18\x03 \x01(\x01\x12\x17\n\x0fstart_timestamp\x18\x04 \x01(\x04\x12\x15\n\rend_timestamp\x18\x05 \x01(\x04\x12\x17\n\x0frtp_clock_ticks\x18\x06 \x01(\x04\x12\x15\n\rdrift_samples\x18\x07 \x01(\x03\x12\x10\n\x08\x64rift_ms\x18\x08 \x01(\x01\x12\x12\n\nclock_rate\x18\t \x01(\x01\"\xa0\n\n\x08RTPStats\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x64uration\x18\x03 \x01(\x01\x12\x0f\n\x07packets\x18\x04 \x01(\r\x12\x13\n\x0bpacket_rate\x18\x05 \x01(\x01\x12\r\n\x05\x62ytes\x18\x06 \x01(\x04\x12\x14\n\x0cheader_bytes\x18\' \x01(\x04\x12\x0f\n\x07\x62itrate\x18\x07 \x01(\x01\x12\x14\n\x0cpackets_lost\x18\x08 \x01(\r\x12\x18\n\x10packet_loss_rate\x18\t \x01(\x01\x12\x1e\n\x16packet_loss_percentage\x18\n \x01(\x02\x12\x19\n\x11packets_duplicate\x18\x0b \x01(\r\x12\x1d\n\x15packet_duplicate_rate\x18\x0c \x01(\x01\x12\x17\n\x0f\x62ytes_duplicate\x18\r \x01(\x04\x12\x1e\n\x16header_bytes_duplicate\x18( \x01(\x04\x12\x19\n\x11\x62itrate_duplicate\x18\x0e \x01(\x01\x12\x17\n\x0fpackets_padding\x18\x0f \x01(\r\x12\x1b\n\x13packet_padding_rate\x18\x10 \x01(\x01\x12\x15\n\rbytes_padding\x18\x11 \x01(\x04\x12\x1c\n\x14header_bytes_padding\x18) \x01(\x04\x12\x17\n\x0f\x62itrate_padding\x18\x12 \x01(\x01\x12\x1c\n\x14packets_out_of_order\x18\x13 \x01(\r\x12\x0e\n\x06\x66rames\x18\x14 \x01(\r\x12\x12\n\nframe_rate\x18\x15 \x01(\x01\x12\x16\n\x0ejitter_current\x18\x16 \x01(\x01\x12\x12\n\njitter_max\x18\x17 \x01(\x01\x12:\n\rgap_histogram\x18\x18 \x03(\x0b\x32#.livekit.RTPStats.GapHistogramEntry\x12\r\n\x05nacks\x18\x19 \x01(\r\x12\x11\n\tnack_acks\x18% \x01(\r\x12\x13\n\x0bnack_misses\x18\x1a \x01(\r\x12\x15\n\rnack_repeated\x18& \x01(\r\x12\x0c\n\x04plis\x18\x1b \x01(\r\x12,\n\x08last_pli\x18\x1c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x66irs\x18\x1d \x01(\r\x12,\n\x08last_fir\x18\x1e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0brtt_current\x18\x1f \x01(\r\x12\x0f\n\x07rtt_max\x18 \x01(\r\x12\x12\n\nkey_frames\x18! \x01(\r\x12\x32\n\x0elast_key_frame\x18\" \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0flayer_lock_plis\x18# \x01(\r\x12\x37\n\x13last_layer_lock_pli\x18$ \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\'\n\x0cpacket_drift\x18, \x01(\x0b\x32\x11.livekit.RTPDrift\x12\'\n\x0creport_drift\x18- \x01(\x0b\x32\x11.livekit.RTPDrift\x12/\n\x14rebased_report_drift\x18. \x01(\x0b\x32\x11.livekit.RTPDrift\x1a\x33\n\x11GapHistogramEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\"\x8c\x02\n\x11RTPForwarderState\x12\x0f\n\x07started\x18\x01 \x01(\x08\x12\x1f\n\x17reference_layer_spatial\x18\x02 \x01(\x05\x12\x16\n\x0epre_start_time\x18\x03 \x01(\x03\x12\x1b\n\x13\x65xt_first_timestamp\x18\x04 \x01(\x04\x12$\n\x1c\x64ummy_start_timestamp_offset\x18\x05 \x01(\x04\x12+\n\nrtp_munger\x18\x06 \x01(\x0b\x32\x17.livekit.RTPMungerState\x12-\n\nvp8_munger\x18\x07 \x01(\x0b\x32\x17.livekit.VP8MungerStateH\x00\x42\x0e\n\x0c\x63odec_munger\"\xcb\x01\n\x0eRTPMungerState\x12 \n\x18\x65xt_last_sequence_number\x18\x01 \x01(\x04\x12\'\n\x1f\x65xt_second_last_sequence_number\x18\x02 \x01(\x04\x12\x1a\n\x12\x65xt_last_timestamp\x18\x03 \x01(\x04\x12!\n\x19\x65xt_second_last_timestamp\x18\x04 \x01(\x04\x12\x13\n\x0blast_marker\x18\x05 \x01(\x08\x12\x1a\n\x12second_last_marker\x18\x06 \x01(\x08\"\xb8\x01\n\x0eVP8MungerState\x12\x1b\n\x13\x65xt_last_picture_id\x18\x01 \x01(\x05\x12\x17\n\x0fpicture_id_used\x18\x02 \x01(\x08\x12\x18\n\x10last_tl0_pic_idx\x18\x03 \x01(\r\x12\x18\n\x10tl0_pic_idx_used\x18\x04 \x01(\x08\x12\x10\n\x08tid_used\x18\x05 \x01(\x08\x12\x14\n\x0clast_key_idx\x18\x06 \x01(\r\x12\x14\n\x0ckey_idx_used\x18\x07 \x01(\x08\"1\n\x0cTimedVersion\x12\x12\n\nunix_micro\x18\x01 \x01(\x03\x12\r\n\x05ticks\x18\x02 \x01(\x05*/\n\nAudioCodec\x12\x0e\n\nDEFAULT_AC\x10\x00\x12\x08\n\x04OPUS\x10\x01\x12\x07\n\x03\x41\x41\x43\x10\x02*V\n\nVideoCodec\x12\x0e\n\nDEFAULT_VC\x10\x00\x12\x11\n\rH264_BASELINE\x10\x01\x12\r\n\tH264_MAIN\x10\x02\x12\r\n\tH264_HIGH\x10\x03\x12\x07\n\x03VP8\x10\x04*)\n\nImageCodec\x12\x0e\n\nIC_DEFAULT\x10\x00\x12\x0b\n\x07IC_JPEG\x10\x01*+\n\tTrackType\x12\t\n\x05\x41UDIO\x10\x00\x12\t\n\x05VIDEO\x10\x01\x12\x08\n\x04\x44\x41TA\x10\x02*`\n\x0bTrackSource\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06\x43\x41MERA\x10\x01\x12\x0e\n\nMICROPHONE\x10\x02\x12\x10\n\x0cSCREEN_SHARE\x10\x03\x12\x16\n\x12SCREEN_SHARE_AUDIO\x10\x04*6\n\x0cVideoQuality\x12\x07\n\x03LOW\x10\x00\x12\n\n\x06MEDIUM\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\x07\n\x03OFF\x10\x03*@\n\x11\x43onnectionQuality\x12\x08\n\x04POOR\x10\x00\x12\x08\n\x04GOOD\x10\x01\x12\r\n\tEXCELLENT\x10\x02\x12\x08\n\x04LOST\x10\x03*;\n\x13\x43lientConfigSetting\x12\t\n\x05UNSET\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02*\xec\x01\n\x10\x44isconnectReason\x12\x12\n\x0eUNKNOWN_REASON\x10\x00\x12\x14\n\x10\x43LIENT_INITIATED\x10\x01\x12\x16\n\x12\x44UPLICATE_IDENTITY\x10\x02\x12\x13\n\x0fSERVER_SHUTDOWN\x10\x03\x12\x17\n\x13PARTICIPANT_REMOVED\x10\x04\x12\x10\n\x0cROOM_DELETED\x10\x05\x12\x12\n\x0eSTATE_MISMATCH\x10\x06\x12\x10\n\x0cJOIN_FAILURE\x10\x07\x12\r\n\tMIGRATION\x10\x08\x12\x10\n\x0cSIGNAL_CLOSE\x10\t\x12\x0f\n\x0bROOM_CLOSED\x10\n*\x89\x01\n\x0fReconnectReason\x12\x0e\n\nRR_UNKNOWN\x10\x00\x12\x1a\n\x16RR_SIGNAL_DISCONNECTED\x10\x01\x12\x17\n\x13RR_PUBLISHER_FAILED\x10\x02\x12\x18\n\x14RR_SUBSCRIBER_FAILED\x10\x03\x12\x17\n\x13RR_SWITCH_CANDIDATE\x10\x04*T\n\x11SubscriptionError\x12\x0e\n\nSE_UNKNOWN\x10\x00\x12\x18\n\x14SE_CODEC_UNSUPPORTED\x10\x01\x12\x15\n\x11SE_TRACK_NOTFOUND\x10\x02*\xa3\x01\n\x11\x41udioTrackFeature\x12\r\n\tTF_STEREO\x10\x00\x12\r\n\tTF_NO_DTX\x10\x01\x12\x18\n\x14TF_AUTO_GAIN_CONTROL\x10\x02\x12\x18\n\x14TF_ECHO_CANCELLATION\x10\x03\x12\x18\n\x14TF_NOISE_SUPPRESSION\x10\x04\x12\"\n\x1eTF_ENHANCED_NOISE_CANCELLATION\x10\x05\x42\x46Z#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -44,112 +43,100 @@ _globals['_USERPACKET'].fields_by_name['destination_identities']._serialized_options = b'\030\001' _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._options = None _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._serialized_options = b'8\001' - _globals['_AUDIOCODEC']._serialized_start=7564 - _globals['_AUDIOCODEC']._serialized_end=7611 - _globals['_VIDEOCODEC']._serialized_start=7613 - _globals['_VIDEOCODEC']._serialized_end=7699 - _globals['_IMAGECODEC']._serialized_start=7701 - _globals['_IMAGECODEC']._serialized_end=7742 - _globals['_TRACKTYPE']._serialized_start=7744 - _globals['_TRACKTYPE']._serialized_end=7787 - _globals['_TRACKSOURCE']._serialized_start=7789 - _globals['_TRACKSOURCE']._serialized_end=7885 - _globals['_VIDEOQUALITY']._serialized_start=7887 - _globals['_VIDEOQUALITY']._serialized_end=7941 - _globals['_CONNECTIONQUALITY']._serialized_start=7943 - _globals['_CONNECTIONQUALITY']._serialized_end=8007 - _globals['_CLIENTCONFIGSETTING']._serialized_start=8009 - _globals['_CLIENTCONFIGSETTING']._serialized_end=8068 - _globals['_DISCONNECTREASON']._serialized_start=8071 - _globals['_DISCONNECTREASON']._serialized_end=8307 - _globals['_RECONNECTREASON']._serialized_start=8310 - _globals['_RECONNECTREASON']._serialized_end=8447 - _globals['_SUBSCRIPTIONERROR']._serialized_start=8449 - _globals['_SUBSCRIPTIONERROR']._serialized_end=8533 - _globals['_AUDIOTRACKFEATURE']._serialized_start=8536 - _globals['_AUDIOTRACKFEATURE']._serialized_end=8699 - _globals['_ROOM']._serialized_start=90 - _globals['_ROOM']._serialized_end=419 - _globals['_CODEC']._serialized_start=421 - _globals['_CODEC']._serialized_end=461 - _globals['_PLAYOUTDELAY']._serialized_start=463 - _globals['_PLAYOUTDELAY']._serialized_end=520 - _globals['_PARTICIPANTPERMISSION']._serialized_start=523 - _globals['_PARTICIPANTPERMISSION']._serialized_end=784 - _globals['_PARTICIPANTINFO']._serialized_start=787 - _globals['_PARTICIPANTINFO']._serialized_end=1419 - _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._serialized_start=1239 - _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._serialized_end=1288 - _globals['_PARTICIPANTINFO_STATE']._serialized_start=1290 - _globals['_PARTICIPANTINFO_STATE']._serialized_end=1352 - _globals['_PARTICIPANTINFO_KIND']._serialized_start=1354 - _globals['_PARTICIPANTINFO_KIND']._serialized_end=1419 - _globals['_ENCRYPTION']._serialized_start=1421 - _globals['_ENCRYPTION']._serialized_end=1472 - _globals['_ENCRYPTION_TYPE']._serialized_start=1435 - _globals['_ENCRYPTION_TYPE']._serialized_end=1472 - _globals['_SIMULCASTCODECINFO']._serialized_start=1474 - _globals['_SIMULCASTCODECINFO']._serialized_end=1576 - _globals['_TRACKINFO']._serialized_start=1579 - _globals['_TRACKINFO']._serialized_end=2080 - _globals['_VIDEOLAYER']._serialized_start=2082 - _globals['_VIDEOLAYER']._serialized_end=2196 - _globals['_DATAPACKET']._serialized_start=2199 - _globals['_DATAPACKET']._serialized_end=2750 - _globals['_DATAPACKET_KIND']._serialized_start=2710 - _globals['_DATAPACKET_KIND']._serialized_end=2741 - _globals['_ACTIVESPEAKERUPDATE']._serialized_start=2752 - _globals['_ACTIVESPEAKERUPDATE']._serialized_end=2813 - _globals['_SPEAKERINFO']._serialized_start=2815 - _globals['_SPEAKERINFO']._serialized_end=2872 - _globals['_USERPACKET']._serialized_start=2875 - _globals['_USERPACKET']._serialized_end=3163 - _globals['_SIPDTMF']._serialized_start=3165 - _globals['_SIPDTMF']._serialized_end=3203 - _globals['_TRANSCRIPTION']._serialized_start=3205 - _globals['_TRANSCRIPTION']._serialized_end=3329 - _globals['_TRANSCRIPTIONSEGMENT']._serialized_start=3331 - _globals['_TRANSCRIPTIONSEGMENT']._serialized_end=3450 - _globals['_CHATMESSAGE']._serialized_start=3453 - _globals['_CHATMESSAGE']._serialized_end=3598 - _globals['_RPCREQUEST']._serialized_start=3600 - _globals['_RPCREQUEST']._serialized_end=3703 - _globals['_RPCACK']._serialized_start=3705 - _globals['_RPCACK']._serialized_end=3733 - _globals['_RPCRESPONSE']._serialized_start=3735 - _globals['_RPCRESPONSE']._serialized_end=3832 - _globals['_RPCERROR']._serialized_start=3834 - _globals['_RPCERROR']._serialized_end=3889 - _globals['_PARTICIPANTTRACKS']._serialized_start=3891 - _globals['_PARTICIPANTTRACKS']._serialized_end=3955 - _globals['_SERVERINFO']._serialized_start=3958 - _globals['_SERVERINFO']._serialized_end=4164 - _globals['_SERVERINFO_EDITION']._serialized_start=4130 - _globals['_SERVERINFO_EDITION']._serialized_end=4164 - _globals['_CLIENTINFO']._serialized_start=4167 - _globals['_CLIENTINFO']._serialized_end=4561 - _globals['_CLIENTINFO_SDK']._serialized_start=4405 - _globals['_CLIENTINFO_SDK']._serialized_end=4561 - _globals['_CLIENTCONFIGURATION']._serialized_start=4564 - _globals['_CLIENTCONFIGURATION']._serialized_end=4832 - _globals['_VIDEOCONFIGURATION']._serialized_start=4834 - _globals['_VIDEOCONFIGURATION']._serialized_end=4910 - _globals['_DISABLEDCODECS']._serialized_start=4912 - _globals['_DISABLEDCODECS']._serialized_end=4993 - _globals['_RTPDRIFT']._serialized_start=4996 - _globals['_RTPDRIFT']._serialized_end=5252 - _globals['_RTPSTATS']._serialized_start=5255 - _globals['_RTPSTATS']._serialized_end=6621 - _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._serialized_start=6570 - _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._serialized_end=6621 - _globals['_RTCPSENDERREPORTSTATE']._serialized_start=6624 - _globals['_RTCPSENDERREPORTSTATE']._serialized_end=6786 - _globals['_RTPFORWARDERSTATE']._serialized_start=6789 - _globals['_RTPFORWARDERSTATE']._serialized_end=7118 - _globals['_RTPMUNGERSTATE']._serialized_start=7121 - _globals['_RTPMUNGERSTATE']._serialized_end=7324 - _globals['_VP8MUNGERSTATE']._serialized_start=7327 - _globals['_VP8MUNGERSTATE']._serialized_end=7511 - _globals['_TIMEDVERSION']._serialized_start=7513 - _globals['_TIMEDVERSION']._serialized_end=7562 + _globals['_AUDIOCODEC']._serialized_start=6532 + _globals['_AUDIOCODEC']._serialized_end=6579 + _globals['_VIDEOCODEC']._serialized_start=6581 + _globals['_VIDEOCODEC']._serialized_end=6667 + _globals['_IMAGECODEC']._serialized_start=6669 + _globals['_IMAGECODEC']._serialized_end=6710 + _globals['_TRACKTYPE']._serialized_start=6712 + _globals['_TRACKTYPE']._serialized_end=6755 + _globals['_TRACKSOURCE']._serialized_start=6757 + _globals['_TRACKSOURCE']._serialized_end=6853 + _globals['_VIDEOQUALITY']._serialized_start=6855 + _globals['_VIDEOQUALITY']._serialized_end=6909 + _globals['_CONNECTIONQUALITY']._serialized_start=6911 + _globals['_CONNECTIONQUALITY']._serialized_end=6975 + _globals['_CLIENTCONFIGSETTING']._serialized_start=6977 + _globals['_CLIENTCONFIGSETTING']._serialized_end=7036 + _globals['_DISCONNECTREASON']._serialized_start=7039 + _globals['_DISCONNECTREASON']._serialized_end=7275 + _globals['_RECONNECTREASON']._serialized_start=7278 + _globals['_RECONNECTREASON']._serialized_end=7415 + _globals['_SUBSCRIPTIONERROR']._serialized_start=7417 + _globals['_SUBSCRIPTIONERROR']._serialized_end=7501 + _globals['_AUDIOTRACKFEATURE']._serialized_start=7504 + _globals['_AUDIOTRACKFEATURE']._serialized_end=7667 + _globals['_ROOM']._serialized_start=67 + _globals['_ROOM']._serialized_end=396 + _globals['_CODEC']._serialized_start=398 + _globals['_CODEC']._serialized_end=438 + _globals['_PLAYOUTDELAY']._serialized_start=440 + _globals['_PLAYOUTDELAY']._serialized_end=497 + _globals['_PARTICIPANTPERMISSION']._serialized_start=500 + _globals['_PARTICIPANTPERMISSION']._serialized_end=730 + _globals['_PARTICIPANTINFO']._serialized_start=733 + _globals['_PARTICIPANTINFO']._serialized_end=1365 + _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._serialized_start=1185 + _globals['_PARTICIPANTINFO_ATTRIBUTESENTRY']._serialized_end=1234 + _globals['_PARTICIPANTINFO_STATE']._serialized_start=1236 + _globals['_PARTICIPANTINFO_STATE']._serialized_end=1298 + _globals['_PARTICIPANTINFO_KIND']._serialized_start=1300 + _globals['_PARTICIPANTINFO_KIND']._serialized_end=1365 + _globals['_ENCRYPTION']._serialized_start=1367 + _globals['_ENCRYPTION']._serialized_end=1418 + _globals['_ENCRYPTION_TYPE']._serialized_start=1381 + _globals['_ENCRYPTION_TYPE']._serialized_end=1418 + _globals['_SIMULCASTCODECINFO']._serialized_start=1420 + _globals['_SIMULCASTCODECINFO']._serialized_end=1522 + _globals['_TRACKINFO']._serialized_start=1525 + _globals['_TRACKINFO']._serialized_end=2026 + _globals['_VIDEOLAYER']._serialized_start=2028 + _globals['_VIDEOLAYER']._serialized_end=2142 + _globals['_DATAPACKET']._serialized_start=2145 + _globals['_DATAPACKET']._serialized_end=2482 + _globals['_DATAPACKET_KIND']._serialized_start=2442 + _globals['_DATAPACKET_KIND']._serialized_end=2473 + _globals['_ACTIVESPEAKERUPDATE']._serialized_start=2484 + _globals['_ACTIVESPEAKERUPDATE']._serialized_end=2545 + _globals['_SPEAKERINFO']._serialized_start=2547 + _globals['_SPEAKERINFO']._serialized_end=2604 + _globals['_USERPACKET']._serialized_start=2607 + _globals['_USERPACKET']._serialized_end=2895 + _globals['_SIPDTMF']._serialized_start=2897 + _globals['_SIPDTMF']._serialized_end=2935 + _globals['_TRANSCRIPTION']._serialized_start=2937 + _globals['_TRANSCRIPTION']._serialized_end=3061 + _globals['_TRANSCRIPTIONSEGMENT']._serialized_start=3063 + _globals['_TRANSCRIPTIONSEGMENT']._serialized_end=3182 + _globals['_PARTICIPANTTRACKS']._serialized_start=3184 + _globals['_PARTICIPANTTRACKS']._serialized_end=3248 + _globals['_SERVERINFO']._serialized_start=3251 + _globals['_SERVERINFO']._serialized_end=3457 + _globals['_SERVERINFO_EDITION']._serialized_start=3423 + _globals['_SERVERINFO_EDITION']._serialized_end=3457 + _globals['_CLIENTINFO']._serialized_start=3460 + _globals['_CLIENTINFO']._serialized_end=3809 + _globals['_CLIENTINFO_SDK']._serialized_start=3678 + _globals['_CLIENTINFO_SDK']._serialized_end=3809 + _globals['_CLIENTCONFIGURATION']._serialized_start=3812 + _globals['_CLIENTCONFIGURATION']._serialized_end=4080 + _globals['_VIDEOCONFIGURATION']._serialized_start=4082 + _globals['_VIDEOCONFIGURATION']._serialized_end=4158 + _globals['_DISABLEDCODECS']._serialized_start=4160 + _globals['_DISABLEDCODECS']._serialized_end=4241 + _globals['_RTPDRIFT']._serialized_start=4244 + _globals['_RTPDRIFT']._serialized_end=4500 + _globals['_RTPSTATS']._serialized_start=4503 + _globals['_RTPSTATS']._serialized_end=5815 + _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._serialized_start=5764 + _globals['_RTPSTATS_GAPHISTOGRAMENTRY']._serialized_end=5815 + _globals['_RTPFORWARDERSTATE']._serialized_start=5818 + _globals['_RTPFORWARDERSTATE']._serialized_end=6086 + _globals['_RTPMUNGERSTATE']._serialized_start=6089 + _globals['_RTPMUNGERSTATE']._serialized_end=6292 + _globals['_VP8MUNGERSTATE']._serialized_start=6295 + _globals['_VP8MUNGERSTATE']._serialized_end=6479 + _globals['_TIMEDVERSION']._serialized_start=6481 + _globals['_TIMEDVERSION']._serialized_end=6530 # @@protoc_insertion_point(module_scope) diff --git a/livekit-protocol/livekit/protocol/models.pyi b/livekit-protocol/livekit/protocol/models.pyi index 85b58fca..77182347 100644 --- a/livekit-protocol/livekit/protocol/models.pyi +++ b/livekit-protocol/livekit/protocol/models.pyi @@ -1,5 +1,4 @@ from google.protobuf import timestamp_pb2 as _timestamp_pb2 -import metrics as _metrics from google.protobuf.internal import containers as _containers from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor @@ -201,7 +200,7 @@ class PlayoutDelay(_message.Message): def __init__(self, enabled: bool = ..., min: _Optional[int] = ..., max: _Optional[int] = ...) -> None: ... class ParticipantPermission(_message.Message): - __slots__ = ("can_subscribe", "can_publish", "can_publish_data", "can_publish_sources", "hidden", "recorder", "can_update_metadata", "agent", "can_subscribe_metrics") + __slots__ = ("can_subscribe", "can_publish", "can_publish_data", "can_publish_sources", "hidden", "recorder", "can_update_metadata", "agent") CAN_SUBSCRIBE_FIELD_NUMBER: _ClassVar[int] CAN_PUBLISH_FIELD_NUMBER: _ClassVar[int] CAN_PUBLISH_DATA_FIELD_NUMBER: _ClassVar[int] @@ -210,7 +209,6 @@ class ParticipantPermission(_message.Message): RECORDER_FIELD_NUMBER: _ClassVar[int] CAN_UPDATE_METADATA_FIELD_NUMBER: _ClassVar[int] AGENT_FIELD_NUMBER: _ClassVar[int] - CAN_SUBSCRIBE_METRICS_FIELD_NUMBER: _ClassVar[int] can_subscribe: bool can_publish: bool can_publish_data: bool @@ -219,8 +217,7 @@ class ParticipantPermission(_message.Message): recorder: bool can_update_metadata: bool agent: bool - can_subscribe_metrics: bool - def __init__(self, can_subscribe: bool = ..., can_publish: bool = ..., can_publish_data: bool = ..., can_publish_sources: _Optional[_Iterable[_Union[TrackSource, str]]] = ..., hidden: bool = ..., recorder: bool = ..., can_update_metadata: bool = ..., agent: bool = ..., can_subscribe_metrics: bool = ...) -> None: ... + def __init__(self, can_subscribe: bool = ..., can_publish: bool = ..., can_publish_data: bool = ..., can_publish_sources: _Optional[_Iterable[_Union[TrackSource, str]]] = ..., hidden: bool = ..., recorder: bool = ..., can_update_metadata: bool = ..., agent: bool = ...) -> None: ... class ParticipantInfo(_message.Message): __slots__ = ("sid", "identity", "state", "tracks", "metadata", "joined_at", "name", "version", "permission", "region", "is_publisher", "kind", "attributes", "disconnect_reason") @@ -364,7 +361,7 @@ class VideoLayer(_message.Message): def __init__(self, quality: _Optional[_Union[VideoQuality, str]] = ..., width: _Optional[int] = ..., height: _Optional[int] = ..., bitrate: _Optional[int] = ..., ssrc: _Optional[int] = ...) -> None: ... class DataPacket(_message.Message): - __slots__ = ("kind", "participant_identity", "destination_identities", "user", "speaker", "sip_dtmf", "transcription", "metrics", "chat_message", "rpc_request", "rpc_ack", "rpc_response") + __slots__ = ("kind", "participant_identity", "destination_identities", "user", "speaker", "sip_dtmf", "transcription") class Kind(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = () RELIABLE: _ClassVar[DataPacket.Kind] @@ -378,11 +375,6 @@ class DataPacket(_message.Message): SPEAKER_FIELD_NUMBER: _ClassVar[int] SIP_DTMF_FIELD_NUMBER: _ClassVar[int] TRANSCRIPTION_FIELD_NUMBER: _ClassVar[int] - METRICS_FIELD_NUMBER: _ClassVar[int] - CHAT_MESSAGE_FIELD_NUMBER: _ClassVar[int] - RPC_REQUEST_FIELD_NUMBER: _ClassVar[int] - RPC_ACK_FIELD_NUMBER: _ClassVar[int] - RPC_RESPONSE_FIELD_NUMBER: _ClassVar[int] kind: DataPacket.Kind participant_identity: str destination_identities: _containers.RepeatedScalarFieldContainer[str] @@ -390,12 +382,7 @@ class DataPacket(_message.Message): speaker: ActiveSpeakerUpdate sip_dtmf: SipDTMF transcription: Transcription - metrics: _metrics.MetricsBatch - chat_message: ChatMessage - rpc_request: RpcRequest - rpc_ack: RpcAck - rpc_response: RpcResponse - def __init__(self, kind: _Optional[_Union[DataPacket.Kind, str]] = ..., participant_identity: _Optional[str] = ..., destination_identities: _Optional[_Iterable[str]] = ..., user: _Optional[_Union[UserPacket, _Mapping]] = ..., speaker: _Optional[_Union[ActiveSpeakerUpdate, _Mapping]] = ..., sip_dtmf: _Optional[_Union[SipDTMF, _Mapping]] = ..., transcription: _Optional[_Union[Transcription, _Mapping]] = ..., metrics: _Optional[_Union[_metrics.MetricsBatch, _Mapping]] = ..., chat_message: _Optional[_Union[ChatMessage, _Mapping]] = ..., rpc_request: _Optional[_Union[RpcRequest, _Mapping]] = ..., rpc_ack: _Optional[_Union[RpcAck, _Mapping]] = ..., rpc_response: _Optional[_Union[RpcResponse, _Mapping]] = ...) -> None: ... + def __init__(self, kind: _Optional[_Union[DataPacket.Kind, str]] = ..., participant_identity: _Optional[str] = ..., destination_identities: _Optional[_Iterable[str]] = ..., user: _Optional[_Union[UserPacket, _Mapping]] = ..., speaker: _Optional[_Union[ActiveSpeakerUpdate, _Mapping]] = ..., sip_dtmf: _Optional[_Union[SipDTMF, _Mapping]] = ..., transcription: _Optional[_Union[Transcription, _Mapping]] = ...) -> None: ... class ActiveSpeakerUpdate(_message.Message): __slots__ = ("speakers",) @@ -469,62 +456,6 @@ class TranscriptionSegment(_message.Message): language: str def __init__(self, id: _Optional[str] = ..., text: _Optional[str] = ..., start_time: _Optional[int] = ..., end_time: _Optional[int] = ..., final: bool = ..., language: _Optional[str] = ...) -> None: ... -class ChatMessage(_message.Message): - __slots__ = ("id", "timestamp", "edit_timestamp", "message", "deleted", "generated") - ID_FIELD_NUMBER: _ClassVar[int] - TIMESTAMP_FIELD_NUMBER: _ClassVar[int] - EDIT_TIMESTAMP_FIELD_NUMBER: _ClassVar[int] - MESSAGE_FIELD_NUMBER: _ClassVar[int] - DELETED_FIELD_NUMBER: _ClassVar[int] - GENERATED_FIELD_NUMBER: _ClassVar[int] - id: str - timestamp: int - edit_timestamp: int - message: str - deleted: bool - generated: bool - def __init__(self, id: _Optional[str] = ..., timestamp: _Optional[int] = ..., edit_timestamp: _Optional[int] = ..., message: _Optional[str] = ..., deleted: bool = ..., generated: bool = ...) -> None: ... - -class RpcRequest(_message.Message): - __slots__ = ("id", "method", "payload", "response_timeout_ms", "version") - ID_FIELD_NUMBER: _ClassVar[int] - METHOD_FIELD_NUMBER: _ClassVar[int] - PAYLOAD_FIELD_NUMBER: _ClassVar[int] - RESPONSE_TIMEOUT_MS_FIELD_NUMBER: _ClassVar[int] - VERSION_FIELD_NUMBER: _ClassVar[int] - id: str - method: str - payload: str - response_timeout_ms: int - version: int - def __init__(self, id: _Optional[str] = ..., method: _Optional[str] = ..., payload: _Optional[str] = ..., response_timeout_ms: _Optional[int] = ..., version: _Optional[int] = ...) -> None: ... - -class RpcAck(_message.Message): - __slots__ = ("request_id",) - REQUEST_ID_FIELD_NUMBER: _ClassVar[int] - request_id: str - def __init__(self, request_id: _Optional[str] = ...) -> None: ... - -class RpcResponse(_message.Message): - __slots__ = ("request_id", "payload", "error") - REQUEST_ID_FIELD_NUMBER: _ClassVar[int] - PAYLOAD_FIELD_NUMBER: _ClassVar[int] - ERROR_FIELD_NUMBER: _ClassVar[int] - request_id: str - payload: str - error: RpcError - def __init__(self, request_id: _Optional[str] = ..., payload: _Optional[str] = ..., error: _Optional[_Union[RpcError, _Mapping]] = ...) -> None: ... - -class RpcError(_message.Message): - __slots__ = ("code", "message", "data") - CODE_FIELD_NUMBER: _ClassVar[int] - MESSAGE_FIELD_NUMBER: _ClassVar[int] - DATA_FIELD_NUMBER: _ClassVar[int] - code: int - message: str - data: str - def __init__(self, code: _Optional[int] = ..., message: _Optional[str] = ..., data: _Optional[str] = ...) -> None: ... - class ParticipantTracks(_message.Message): __slots__ = ("participant_sid", "track_sids") PARTICIPANT_SID_FIELD_NUMBER: _ClassVar[int] @@ -558,7 +489,7 @@ class ServerInfo(_message.Message): def __init__(self, edition: _Optional[_Union[ServerInfo.Edition, str]] = ..., version: _Optional[str] = ..., protocol: _Optional[int] = ..., region: _Optional[str] = ..., node_id: _Optional[str] = ..., debug_info: _Optional[str] = ..., agent_protocol: _Optional[int] = ...) -> None: ... class ClientInfo(_message.Message): - __slots__ = ("sdk", "version", "protocol", "os", "os_version", "device_model", "browser", "browser_version", "address", "network", "other_sdks") + __slots__ = ("sdk", "version", "protocol", "os", "os_version", "device_model", "browser", "browser_version", "address", "network") class SDK(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = () UNKNOWN: _ClassVar[ClientInfo.SDK] @@ -572,8 +503,6 @@ class ClientInfo(_message.Message): RUST: _ClassVar[ClientInfo.SDK] PYTHON: _ClassVar[ClientInfo.SDK] CPP: _ClassVar[ClientInfo.SDK] - UNITY_WEB: _ClassVar[ClientInfo.SDK] - NODE: _ClassVar[ClientInfo.SDK] UNKNOWN: ClientInfo.SDK JS: ClientInfo.SDK SWIFT: ClientInfo.SDK @@ -585,8 +514,6 @@ class ClientInfo(_message.Message): RUST: ClientInfo.SDK PYTHON: ClientInfo.SDK CPP: ClientInfo.SDK - UNITY_WEB: ClientInfo.SDK - NODE: ClientInfo.SDK SDK_FIELD_NUMBER: _ClassVar[int] VERSION_FIELD_NUMBER: _ClassVar[int] PROTOCOL_FIELD_NUMBER: _ClassVar[int] @@ -597,7 +524,6 @@ class ClientInfo(_message.Message): BROWSER_VERSION_FIELD_NUMBER: _ClassVar[int] ADDRESS_FIELD_NUMBER: _ClassVar[int] NETWORK_FIELD_NUMBER: _ClassVar[int] - OTHER_SDKS_FIELD_NUMBER: _ClassVar[int] sdk: ClientInfo.SDK version: str protocol: int @@ -608,8 +534,7 @@ class ClientInfo(_message.Message): browser_version: str address: str network: str - other_sdks: str - def __init__(self, sdk: _Optional[_Union[ClientInfo.SDK, str]] = ..., version: _Optional[str] = ..., protocol: _Optional[int] = ..., os: _Optional[str] = ..., os_version: _Optional[str] = ..., device_model: _Optional[str] = ..., browser: _Optional[str] = ..., browser_version: _Optional[str] = ..., address: _Optional[str] = ..., network: _Optional[str] = ..., other_sdks: _Optional[str] = ...) -> None: ... + def __init__(self, sdk: _Optional[_Union[ClientInfo.SDK, str]] = ..., version: _Optional[str] = ..., protocol: _Optional[int] = ..., os: _Optional[str] = ..., os_version: _Optional[str] = ..., device_model: _Optional[str] = ..., browser: _Optional[str] = ..., browser_version: _Optional[str] = ..., address: _Optional[str] = ..., network: _Optional[str] = ...) -> None: ... class ClientConfiguration(_message.Message): __slots__ = ("video", "screen", "resume_connection", "disabled_codecs", "force_relay") @@ -662,7 +587,7 @@ class RTPDrift(_message.Message): def __init__(self, start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., duration: _Optional[float] = ..., start_timestamp: _Optional[int] = ..., end_timestamp: _Optional[int] = ..., rtp_clock_ticks: _Optional[int] = ..., drift_samples: _Optional[int] = ..., drift_ms: _Optional[float] = ..., clock_rate: _Optional[float] = ...) -> None: ... class RTPStats(_message.Message): - __slots__ = ("start_time", "end_time", "duration", "packets", "packet_rate", "bytes", "header_bytes", "bitrate", "packets_lost", "packet_loss_rate", "packet_loss_percentage", "packets_duplicate", "packet_duplicate_rate", "bytes_duplicate", "header_bytes_duplicate", "bitrate_duplicate", "packets_padding", "packet_padding_rate", "bytes_padding", "header_bytes_padding", "bitrate_padding", "packets_out_of_order", "frames", "frame_rate", "jitter_current", "jitter_max", "gap_histogram", "nacks", "nack_acks", "nack_misses", "nack_repeated", "plis", "last_pli", "firs", "last_fir", "rtt_current", "rtt_max", "key_frames", "last_key_frame", "layer_lock_plis", "last_layer_lock_pli", "packet_drift", "ntp_report_drift", "rebased_report_drift", "received_report_drift") + __slots__ = ("start_time", "end_time", "duration", "packets", "packet_rate", "bytes", "header_bytes", "bitrate", "packets_lost", "packet_loss_rate", "packet_loss_percentage", "packets_duplicate", "packet_duplicate_rate", "bytes_duplicate", "header_bytes_duplicate", "bitrate_duplicate", "packets_padding", "packet_padding_rate", "bytes_padding", "header_bytes_padding", "bitrate_padding", "packets_out_of_order", "frames", "frame_rate", "jitter_current", "jitter_max", "gap_histogram", "nacks", "nack_acks", "nack_misses", "nack_repeated", "plis", "last_pli", "firs", "last_fir", "rtt_current", "rtt_max", "key_frames", "last_key_frame", "layer_lock_plis", "last_layer_lock_pli", "packet_drift", "report_drift", "rebased_report_drift") class GapHistogramEntry(_message.Message): __slots__ = ("key", "value") KEY_FIELD_NUMBER: _ClassVar[int] @@ -712,9 +637,8 @@ class RTPStats(_message.Message): LAYER_LOCK_PLIS_FIELD_NUMBER: _ClassVar[int] LAST_LAYER_LOCK_PLI_FIELD_NUMBER: _ClassVar[int] PACKET_DRIFT_FIELD_NUMBER: _ClassVar[int] - NTP_REPORT_DRIFT_FIELD_NUMBER: _ClassVar[int] + REPORT_DRIFT_FIELD_NUMBER: _ClassVar[int] REBASED_REPORT_DRIFT_FIELD_NUMBER: _ClassVar[int] - RECEIVED_REPORT_DRIFT_FIELD_NUMBER: _ClassVar[int] start_time: _timestamp_pb2.Timestamp end_time: _timestamp_pb2.Timestamp duration: float @@ -757,31 +681,12 @@ class RTPStats(_message.Message): layer_lock_plis: int last_layer_lock_pli: _timestamp_pb2.Timestamp packet_drift: RTPDrift - ntp_report_drift: RTPDrift + report_drift: RTPDrift rebased_report_drift: RTPDrift - received_report_drift: RTPDrift - def __init__(self, start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., duration: _Optional[float] = ..., packets: _Optional[int] = ..., packet_rate: _Optional[float] = ..., bytes: _Optional[int] = ..., header_bytes: _Optional[int] = ..., bitrate: _Optional[float] = ..., packets_lost: _Optional[int] = ..., packet_loss_rate: _Optional[float] = ..., packet_loss_percentage: _Optional[float] = ..., packets_duplicate: _Optional[int] = ..., packet_duplicate_rate: _Optional[float] = ..., bytes_duplicate: _Optional[int] = ..., header_bytes_duplicate: _Optional[int] = ..., bitrate_duplicate: _Optional[float] = ..., packets_padding: _Optional[int] = ..., packet_padding_rate: _Optional[float] = ..., bytes_padding: _Optional[int] = ..., header_bytes_padding: _Optional[int] = ..., bitrate_padding: _Optional[float] = ..., packets_out_of_order: _Optional[int] = ..., frames: _Optional[int] = ..., frame_rate: _Optional[float] = ..., jitter_current: _Optional[float] = ..., jitter_max: _Optional[float] = ..., gap_histogram: _Optional[_Mapping[int, int]] = ..., nacks: _Optional[int] = ..., nack_acks: _Optional[int] = ..., nack_misses: _Optional[int] = ..., nack_repeated: _Optional[int] = ..., plis: _Optional[int] = ..., last_pli: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., firs: _Optional[int] = ..., last_fir: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., rtt_current: _Optional[int] = ..., rtt_max: _Optional[int] = ..., key_frames: _Optional[int] = ..., last_key_frame: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., layer_lock_plis: _Optional[int] = ..., last_layer_lock_pli: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., packet_drift: _Optional[_Union[RTPDrift, _Mapping]] = ..., ntp_report_drift: _Optional[_Union[RTPDrift, _Mapping]] = ..., rebased_report_drift: _Optional[_Union[RTPDrift, _Mapping]] = ..., received_report_drift: _Optional[_Union[RTPDrift, _Mapping]] = ...) -> None: ... - -class RTCPSenderReportState(_message.Message): - __slots__ = ("rtp_timestamp", "rtp_timestamp_ext", "ntp_timestamp", "at", "at_adjusted", "packets", "octets") - RTP_TIMESTAMP_FIELD_NUMBER: _ClassVar[int] - RTP_TIMESTAMP_EXT_FIELD_NUMBER: _ClassVar[int] - NTP_TIMESTAMP_FIELD_NUMBER: _ClassVar[int] - AT_FIELD_NUMBER: _ClassVar[int] - AT_ADJUSTED_FIELD_NUMBER: _ClassVar[int] - PACKETS_FIELD_NUMBER: _ClassVar[int] - OCTETS_FIELD_NUMBER: _ClassVar[int] - rtp_timestamp: int - rtp_timestamp_ext: int - ntp_timestamp: int - at: int - at_adjusted: int - packets: int - octets: int - def __init__(self, rtp_timestamp: _Optional[int] = ..., rtp_timestamp_ext: _Optional[int] = ..., ntp_timestamp: _Optional[int] = ..., at: _Optional[int] = ..., at_adjusted: _Optional[int] = ..., packets: _Optional[int] = ..., octets: _Optional[int] = ...) -> None: ... + def __init__(self, start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., duration: _Optional[float] = ..., packets: _Optional[int] = ..., packet_rate: _Optional[float] = ..., bytes: _Optional[int] = ..., header_bytes: _Optional[int] = ..., bitrate: _Optional[float] = ..., packets_lost: _Optional[int] = ..., packet_loss_rate: _Optional[float] = ..., packet_loss_percentage: _Optional[float] = ..., packets_duplicate: _Optional[int] = ..., packet_duplicate_rate: _Optional[float] = ..., bytes_duplicate: _Optional[int] = ..., header_bytes_duplicate: _Optional[int] = ..., bitrate_duplicate: _Optional[float] = ..., packets_padding: _Optional[int] = ..., packet_padding_rate: _Optional[float] = ..., bytes_padding: _Optional[int] = ..., header_bytes_padding: _Optional[int] = ..., bitrate_padding: _Optional[float] = ..., packets_out_of_order: _Optional[int] = ..., frames: _Optional[int] = ..., frame_rate: _Optional[float] = ..., jitter_current: _Optional[float] = ..., jitter_max: _Optional[float] = ..., gap_histogram: _Optional[_Mapping[int, int]] = ..., nacks: _Optional[int] = ..., nack_acks: _Optional[int] = ..., nack_misses: _Optional[int] = ..., nack_repeated: _Optional[int] = ..., plis: _Optional[int] = ..., last_pli: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., firs: _Optional[int] = ..., last_fir: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., rtt_current: _Optional[int] = ..., rtt_max: _Optional[int] = ..., key_frames: _Optional[int] = ..., last_key_frame: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., layer_lock_plis: _Optional[int] = ..., last_layer_lock_pli: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., packet_drift: _Optional[_Union[RTPDrift, _Mapping]] = ..., report_drift: _Optional[_Union[RTPDrift, _Mapping]] = ..., rebased_report_drift: _Optional[_Union[RTPDrift, _Mapping]] = ...) -> None: ... class RTPForwarderState(_message.Message): - __slots__ = ("started", "reference_layer_spatial", "pre_start_time", "ext_first_timestamp", "dummy_start_timestamp_offset", "rtp_munger", "vp8_munger", "sender_report_state") + __slots__ = ("started", "reference_layer_spatial", "pre_start_time", "ext_first_timestamp", "dummy_start_timestamp_offset", "rtp_munger", "vp8_munger") STARTED_FIELD_NUMBER: _ClassVar[int] REFERENCE_LAYER_SPATIAL_FIELD_NUMBER: _ClassVar[int] PRE_START_TIME_FIELD_NUMBER: _ClassVar[int] @@ -789,7 +694,6 @@ class RTPForwarderState(_message.Message): DUMMY_START_TIMESTAMP_OFFSET_FIELD_NUMBER: _ClassVar[int] RTP_MUNGER_FIELD_NUMBER: _ClassVar[int] VP8_MUNGER_FIELD_NUMBER: _ClassVar[int] - SENDER_REPORT_STATE_FIELD_NUMBER: _ClassVar[int] started: bool reference_layer_spatial: int pre_start_time: int @@ -797,8 +701,7 @@ class RTPForwarderState(_message.Message): dummy_start_timestamp_offset: int rtp_munger: RTPMungerState vp8_munger: VP8MungerState - sender_report_state: _containers.RepeatedCompositeFieldContainer[RTCPSenderReportState] - def __init__(self, started: bool = ..., reference_layer_spatial: _Optional[int] = ..., pre_start_time: _Optional[int] = ..., ext_first_timestamp: _Optional[int] = ..., dummy_start_timestamp_offset: _Optional[int] = ..., rtp_munger: _Optional[_Union[RTPMungerState, _Mapping]] = ..., vp8_munger: _Optional[_Union[VP8MungerState, _Mapping]] = ..., sender_report_state: _Optional[_Iterable[_Union[RTCPSenderReportState, _Mapping]]] = ...) -> None: ... + def __init__(self, started: bool = ..., reference_layer_spatial: _Optional[int] = ..., pre_start_time: _Optional[int] = ..., ext_first_timestamp: _Optional[int] = ..., dummy_start_timestamp_offset: _Optional[int] = ..., rtp_munger: _Optional[_Union[RTPMungerState, _Mapping]] = ..., vp8_munger: _Optional[_Union[VP8MungerState, _Mapping]] = ...) -> None: ... class RTPMungerState(_message.Message): __slots__ = ("ext_last_sequence_number", "ext_second_last_sequence_number", "ext_last_timestamp", "ext_second_last_timestamp", "last_marker", "second_last_marker") diff --git a/livekit-protocol/livekit/protocol/sip.py b/livekit-protocol/livekit/protocol/sip.py index f48d581b..7106c3cc 100644 --- a/livekit-protocol/livekit/protocol/sip.py +++ b/livekit-protocol/livekit/protocol/sip.py @@ -12,10 +12,9 @@ _sym_db = _symbol_database.Default() -from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11livekit_sip.proto\x12\x07livekit\x1a\x1bgoogle/protobuf/empty.proto\"\xaf\x02\n\x15\x43reateSIPTrunkRequest\x12\x19\n\x11inbound_addresses\x18\x01 \x03(\t\x12\x18\n\x10outbound_address\x18\x02 \x01(\t\x12\x17\n\x0foutbound_number\x18\x03 \x01(\t\x12!\n\x15inbound_numbers_regex\x18\x04 \x03(\tB\x02\x18\x01\x12\x17\n\x0finbound_numbers\x18\t \x03(\t\x12\x18\n\x10inbound_username\x18\x05 \x01(\t\x12\x18\n\x10inbound_password\x18\x06 \x01(\t\x12\x19\n\x11outbound_username\x18\x07 \x01(\t\x12\x19\n\x11outbound_password\x18\x08 \x01(\t\x12\x0c\n\x04name\x18\n \x01(\t\x12\x10\n\x08metadata\x18\x0b \x01(\t:\x02\x18\x01\"\xdb\x03\n\x0cSIPTrunkInfo\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12-\n\x04kind\x18\x0e \x01(\x0e\x32\x1f.livekit.SIPTrunkInfo.TrunkKind\x12\x19\n\x11inbound_addresses\x18\x02 \x03(\t\x12\x18\n\x10outbound_address\x18\x03 \x01(\t\x12\x17\n\x0foutbound_number\x18\x04 \x01(\t\x12(\n\ttransport\x18\r \x01(\x0e\x32\x15.livekit.SIPTransport\x12!\n\x15inbound_numbers_regex\x18\x05 \x03(\tB\x02\x18\x01\x12\x17\n\x0finbound_numbers\x18\n \x03(\t\x12\x18\n\x10inbound_username\x18\x06 \x01(\t\x12\x18\n\x10inbound_password\x18\x07 \x01(\t\x12\x19\n\x11outbound_username\x18\x08 \x01(\t\x12\x19\n\x11outbound_password\x18\t \x01(\t\x12\x0c\n\x04name\x18\x0b \x01(\t\x12\x10\n\x08metadata\x18\x0c \x01(\t\"D\n\tTrunkKind\x12\x10\n\x0cTRUNK_LEGACY\x10\x00\x12\x11\n\rTRUNK_INBOUND\x10\x01\x12\x12\n\x0eTRUNK_OUTBOUND\x10\x02:\x02\x18\x01\"K\n\x1c\x43reateSIPInboundTrunkRequest\x12+\n\x05trunk\x18\x01 \x01(\x0b\x32\x1c.livekit.SIPInboundTrunkInfo\"\xbc\x03\n\x13SIPInboundTrunkInfo\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08metadata\x18\x03 \x01(\t\x12\x0f\n\x07numbers\x18\x04 \x03(\t\x12\x19\n\x11\x61llowed_addresses\x18\x05 \x03(\t\x12\x17\n\x0f\x61llowed_numbers\x18\x06 \x03(\t\x12\x15\n\rauth_username\x18\x07 \x01(\t\x12\x15\n\rauth_password\x18\x08 \x01(\t\x12:\n\x07headers\x18\t \x03(\x0b\x32).livekit.SIPInboundTrunkInfo.HeadersEntry\x12T\n\x15headers_to_attributes\x18\n \x03(\x0b\x32\x35.livekit.SIPInboundTrunkInfo.HeadersToAttributesEntry\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a:\n\x18HeadersToAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"M\n\x1d\x43reateSIPOutboundTrunkRequest\x12,\n\x05trunk\x18\x01 \x01(\x0b\x32\x1d.livekit.SIPOutboundTrunkInfo\"\xc6\x03\n\x14SIPOutboundTrunkInfo\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08metadata\x18\x03 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x04 \x01(\t\x12(\n\ttransport\x18\x05 \x01(\x0e\x32\x15.livekit.SIPTransport\x12\x0f\n\x07numbers\x18\x06 \x03(\t\x12\x15\n\rauth_username\x18\x07 \x01(\t\x12\x15\n\rauth_password\x18\x08 \x01(\t\x12;\n\x07headers\x18\t \x03(\x0b\x32*.livekit.SIPOutboundTrunkInfo.HeadersEntry\x12U\n\x15headers_to_attributes\x18\n \x03(\x0b\x32\x36.livekit.SIPOutboundTrunkInfo.HeadersToAttributesEntry\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a:\n\x18HeadersToAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"1\n\x19GetSIPInboundTrunkRequest\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\"I\n\x1aGetSIPInboundTrunkResponse\x12+\n\x05trunk\x18\x01 \x01(\x0b\x32\x1c.livekit.SIPInboundTrunkInfo\"2\n\x1aGetSIPOutboundTrunkRequest\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\"K\n\x1bGetSIPOutboundTrunkResponse\x12,\n\x05trunk\x18\x01 \x01(\x0b\x32\x1d.livekit.SIPOutboundTrunkInfo\"\x19\n\x13ListSIPTrunkRequest:\x02\x18\x01\"@\n\x14ListSIPTrunkResponse\x12$\n\x05items\x18\x01 \x03(\x0b\x32\x15.livekit.SIPTrunkInfo:\x02\x18\x01\"\x1c\n\x1aListSIPInboundTrunkRequest\"J\n\x1bListSIPInboundTrunkResponse\x12+\n\x05items\x18\x01 \x03(\x0b\x32\x1c.livekit.SIPInboundTrunkInfo\"\x1d\n\x1bListSIPOutboundTrunkRequest\"L\n\x1cListSIPOutboundTrunkResponse\x12,\n\x05items\x18\x01 \x03(\x0b\x32\x1d.livekit.SIPOutboundTrunkInfo\"-\n\x15\x44\x65leteSIPTrunkRequest\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\"7\n\x15SIPDispatchRuleDirect\x12\x11\n\troom_name\x18\x01 \x01(\t\x12\x0b\n\x03pin\x18\x02 \x01(\t\"=\n\x19SIPDispatchRuleIndividual\x12\x13\n\x0broom_prefix\x18\x01 \x01(\t\x12\x0b\n\x03pin\x18\x02 \x01(\t\"L\n\x15SIPDispatchRuleCallee\x12\x13\n\x0broom_prefix\x18\x01 \x01(\t\x12\x0b\n\x03pin\x18\x02 \x01(\t\x12\x11\n\trandomize\x18\x03 \x01(\x08\"\xe1\x01\n\x0fSIPDispatchRule\x12>\n\x14\x64ispatch_rule_direct\x18\x01 \x01(\x0b\x32\x1e.livekit.SIPDispatchRuleDirectH\x00\x12\x46\n\x18\x64ispatch_rule_individual\x18\x02 \x01(\x0b\x32\".livekit.SIPDispatchRuleIndividualH\x00\x12>\n\x14\x64ispatch_rule_callee\x18\x03 \x01(\x0b\x32\x1e.livekit.SIPDispatchRuleCalleeH\x00\x42\x06\n\x04rule\"\xab\x02\n\x1c\x43reateSIPDispatchRuleRequest\x12&\n\x04rule\x18\x01 \x01(\x0b\x32\x18.livekit.SIPDispatchRule\x12\x11\n\ttrunk_ids\x18\x02 \x03(\t\x12\x19\n\x11hide_phone_number\x18\x03 \x01(\x08\x12\x17\n\x0finbound_numbers\x18\x06 \x03(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x10\n\x08metadata\x18\x05 \x01(\t\x12I\n\nattributes\x18\x07 \x03(\x0b\x32\x35.livekit.CreateSIPDispatchRuleRequest.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb7\x02\n\x13SIPDispatchRuleInfo\x12\x1c\n\x14sip_dispatch_rule_id\x18\x01 \x01(\t\x12&\n\x04rule\x18\x02 \x01(\x0b\x32\x18.livekit.SIPDispatchRule\x12\x11\n\ttrunk_ids\x18\x03 \x03(\t\x12\x19\n\x11hide_phone_number\x18\x04 \x01(\x08\x12\x17\n\x0finbound_numbers\x18\x07 \x03(\t\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\x10\n\x08metadata\x18\x06 \x01(\t\x12@\n\nattributes\x18\x08 \x03(\x0b\x32,.livekit.SIPDispatchRuleInfo.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1c\n\x1aListSIPDispatchRuleRequest\"J\n\x1bListSIPDispatchRuleResponse\x12+\n\x05items\x18\x01 \x03(\x0b\x32\x1c.livekit.SIPDispatchRuleInfo\"<\n\x1c\x44\x65leteSIPDispatchRuleRequest\x12\x1c\n\x14sip_dispatch_rule_id\x18\x01 \x01(\t\"\x90\x03\n\x1b\x43reateSIPParticipantRequest\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12\x13\n\x0bsip_call_to\x18\x02 \x01(\t\x12\x11\n\troom_name\x18\x03 \x01(\t\x12\x1c\n\x14participant_identity\x18\x04 \x01(\t\x12\x18\n\x10participant_name\x18\x07 \x01(\t\x12\x1c\n\x14participant_metadata\x18\x08 \x01(\t\x12_\n\x16participant_attributes\x18\t \x03(\x0b\x32?.livekit.CreateSIPParticipantRequest.ParticipantAttributesEntry\x12\x0c\n\x04\x64tmf\x18\x05 \x01(\t\x12\x15\n\rplay_ringtone\x18\x06 \x01(\x08\x12\x19\n\x11hide_phone_number\x18\n \x01(\x08\x1a<\n\x1aParticipantAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"r\n\x12SIPParticipantInfo\x12\x16\n\x0eparticipant_id\x18\x01 \x01(\t\x12\x1c\n\x14participant_identity\x18\x02 \x01(\t\x12\x11\n\troom_name\x18\x03 \x01(\t\x12\x13\n\x0bsip_call_id\x18\x04 \x01(\t\"e\n\x1dTransferSIPParticipantRequest\x12\x1c\n\x14participant_identity\x18\x01 \x01(\t\x12\x11\n\troom_name\x18\x02 \x01(\t\x12\x13\n\x0btransfer_to\x18\x03 \x01(\t*k\n\x0cSIPTransport\x12\x16\n\x12SIP_TRANSPORT_AUTO\x10\x00\x12\x15\n\x11SIP_TRANSPORT_UDP\x10\x01\x12\x15\n\x11SIP_TRANSPORT_TCP\x10\x02\x12\x15\n\x11SIP_TRANSPORT_TLS\x10\x03\x32\x88\n\n\x03SIP\x12L\n\x0e\x43reateSIPTrunk\x12\x1e.livekit.CreateSIPTrunkRequest\x1a\x15.livekit.SIPTrunkInfo\"\x03\x88\x02\x01\x12P\n\x0cListSIPTrunk\x12\x1c.livekit.ListSIPTrunkRequest\x1a\x1d.livekit.ListSIPTrunkResponse\"\x03\x88\x02\x01\x12\\\n\x15\x43reateSIPInboundTrunk\x12%.livekit.CreateSIPInboundTrunkRequest\x1a\x1c.livekit.SIPInboundTrunkInfo\x12_\n\x16\x43reateSIPOutboundTrunk\x12&.livekit.CreateSIPOutboundTrunkRequest\x1a\x1d.livekit.SIPOutboundTrunkInfo\x12]\n\x12GetSIPInboundTrunk\x12\".livekit.GetSIPInboundTrunkRequest\x1a#.livekit.GetSIPInboundTrunkResponse\x12`\n\x13GetSIPOutboundTrunk\x12#.livekit.GetSIPOutboundTrunkRequest\x1a$.livekit.GetSIPOutboundTrunkResponse\x12`\n\x13ListSIPInboundTrunk\x12#.livekit.ListSIPInboundTrunkRequest\x1a$.livekit.ListSIPInboundTrunkResponse\x12\x63\n\x14ListSIPOutboundTrunk\x12$.livekit.ListSIPOutboundTrunkRequest\x1a%.livekit.ListSIPOutboundTrunkResponse\x12G\n\x0e\x44\x65leteSIPTrunk\x12\x1e.livekit.DeleteSIPTrunkRequest\x1a\x15.livekit.SIPTrunkInfo\x12\\\n\x15\x43reateSIPDispatchRule\x12%.livekit.CreateSIPDispatchRuleRequest\x1a\x1c.livekit.SIPDispatchRuleInfo\x12`\n\x13ListSIPDispatchRule\x12#.livekit.ListSIPDispatchRuleRequest\x1a$.livekit.ListSIPDispatchRuleResponse\x12\\\n\x15\x44\x65leteSIPDispatchRule\x12%.livekit.DeleteSIPDispatchRuleRequest\x1a\x1c.livekit.SIPDispatchRuleInfo\x12Y\n\x14\x43reateSIPParticipant\x12$.livekit.CreateSIPParticipantRequest\x1a\x1b.livekit.SIPParticipantInfo\x12X\n\x16TransferSIPParticipant\x12&.livekit.TransferSIPParticipantRequest\x1a\x16.google.protobuf.EmptyBFZ#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11livekit_sip.proto\x12\x07livekit\"\xaf\x02\n\x15\x43reateSIPTrunkRequest\x12\x19\n\x11inbound_addresses\x18\x01 \x03(\t\x12\x18\n\x10outbound_address\x18\x02 \x01(\t\x12\x17\n\x0foutbound_number\x18\x03 \x01(\t\x12!\n\x15inbound_numbers_regex\x18\x04 \x03(\tB\x02\x18\x01\x12\x17\n\x0finbound_numbers\x18\t \x03(\t\x12\x18\n\x10inbound_username\x18\x05 \x01(\t\x12\x18\n\x10inbound_password\x18\x06 \x01(\t\x12\x19\n\x11outbound_username\x18\x07 \x01(\t\x12\x19\n\x11outbound_password\x18\x08 \x01(\t\x12\x0c\n\x04name\x18\n \x01(\t\x12\x10\n\x08metadata\x18\x0b \x01(\t:\x02\x18\x01\"\xdb\x03\n\x0cSIPTrunkInfo\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12-\n\x04kind\x18\x0e \x01(\x0e\x32\x1f.livekit.SIPTrunkInfo.TrunkKind\x12\x19\n\x11inbound_addresses\x18\x02 \x03(\t\x12\x18\n\x10outbound_address\x18\x03 \x01(\t\x12\x17\n\x0foutbound_number\x18\x04 \x01(\t\x12(\n\ttransport\x18\r \x01(\x0e\x32\x15.livekit.SIPTransport\x12!\n\x15inbound_numbers_regex\x18\x05 \x03(\tB\x02\x18\x01\x12\x17\n\x0finbound_numbers\x18\n \x03(\t\x12\x18\n\x10inbound_username\x18\x06 \x01(\t\x12\x18\n\x10inbound_password\x18\x07 \x01(\t\x12\x19\n\x11outbound_username\x18\x08 \x01(\t\x12\x19\n\x11outbound_password\x18\t \x01(\t\x12\x0c\n\x04name\x18\x0b \x01(\t\x12\x10\n\x08metadata\x18\x0c \x01(\t\"D\n\tTrunkKind\x12\x10\n\x0cTRUNK_LEGACY\x10\x00\x12\x11\n\rTRUNK_INBOUND\x10\x01\x12\x12\n\x0eTRUNK_OUTBOUND\x10\x02:\x02\x18\x01\"K\n\x1c\x43reateSIPInboundTrunkRequest\x12+\n\x05trunk\x18\x01 \x01(\x0b\x32\x1c.livekit.SIPInboundTrunkInfo\"\xbe\x01\n\x13SIPInboundTrunkInfo\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08metadata\x18\x03 \x01(\t\x12\x0f\n\x07numbers\x18\x04 \x03(\t\x12\x19\n\x11\x61llowed_addresses\x18\x05 \x03(\t\x12\x17\n\x0f\x61llowed_numbers\x18\x06 \x03(\t\x12\x15\n\rauth_username\x18\x07 \x01(\t\x12\x15\n\rauth_password\x18\x08 \x01(\t\"M\n\x1d\x43reateSIPOutboundTrunkRequest\x12,\n\x05trunk\x18\x01 \x01(\x0b\x32\x1d.livekit.SIPOutboundTrunkInfo\"\xc6\x01\n\x14SIPOutboundTrunkInfo\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08metadata\x18\x03 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x04 \x01(\t\x12(\n\ttransport\x18\x05 \x01(\x0e\x32\x15.livekit.SIPTransport\x12\x0f\n\x07numbers\x18\x06 \x03(\t\x12\x15\n\rauth_username\x18\x07 \x01(\t\x12\x15\n\rauth_password\x18\x08 \x01(\t\"\x19\n\x13ListSIPTrunkRequest:\x02\x18\x01\"@\n\x14ListSIPTrunkResponse\x12$\n\x05items\x18\x01 \x03(\x0b\x32\x15.livekit.SIPTrunkInfo:\x02\x18\x01\"\x1c\n\x1aListSIPInboundTrunkRequest\"J\n\x1bListSIPInboundTrunkResponse\x12+\n\x05items\x18\x01 \x03(\x0b\x32\x1c.livekit.SIPInboundTrunkInfo\"\x1d\n\x1bListSIPOutboundTrunkRequest\"L\n\x1cListSIPOutboundTrunkResponse\x12,\n\x05items\x18\x01 \x03(\x0b\x32\x1d.livekit.SIPOutboundTrunkInfo\"-\n\x15\x44\x65leteSIPTrunkRequest\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\"7\n\x15SIPDispatchRuleDirect\x12\x11\n\troom_name\x18\x01 \x01(\t\x12\x0b\n\x03pin\x18\x02 \x01(\t\"=\n\x19SIPDispatchRuleIndividual\x12\x13\n\x0broom_prefix\x18\x01 \x01(\t\x12\x0b\n\x03pin\x18\x02 \x01(\t\"\xa1\x01\n\x0fSIPDispatchRule\x12>\n\x14\x64ispatch_rule_direct\x18\x01 \x01(\x0b\x32\x1e.livekit.SIPDispatchRuleDirectH\x00\x12\x46\n\x18\x64ispatch_rule_individual\x18\x02 \x01(\x0b\x32\".livekit.SIPDispatchRuleIndividualH\x00\x42\x06\n\x04rule\"\xab\x02\n\x1c\x43reateSIPDispatchRuleRequest\x12&\n\x04rule\x18\x01 \x01(\x0b\x32\x18.livekit.SIPDispatchRule\x12\x11\n\ttrunk_ids\x18\x02 \x03(\t\x12\x19\n\x11hide_phone_number\x18\x03 \x01(\x08\x12\x17\n\x0finbound_numbers\x18\x06 \x03(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x10\n\x08metadata\x18\x05 \x01(\t\x12I\n\nattributes\x18\x07 \x03(\x0b\x32\x35.livekit.CreateSIPDispatchRuleRequest.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb7\x02\n\x13SIPDispatchRuleInfo\x12\x1c\n\x14sip_dispatch_rule_id\x18\x01 \x01(\t\x12&\n\x04rule\x18\x02 \x01(\x0b\x32\x18.livekit.SIPDispatchRule\x12\x11\n\ttrunk_ids\x18\x03 \x03(\t\x12\x19\n\x11hide_phone_number\x18\x04 \x01(\x08\x12\x17\n\x0finbound_numbers\x18\x07 \x03(\t\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\x10\n\x08metadata\x18\x06 \x01(\t\x12@\n\nattributes\x18\x08 \x03(\x0b\x32,.livekit.SIPDispatchRuleInfo.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1c\n\x1aListSIPDispatchRuleRequest\"J\n\x1bListSIPDispatchRuleResponse\x12+\n\x05items\x18\x01 \x03(\x0b\x32\x1c.livekit.SIPDispatchRuleInfo\"<\n\x1c\x44\x65leteSIPDispatchRuleRequest\x12\x1c\n\x14sip_dispatch_rule_id\x18\x01 \x01(\t\"\x90\x03\n\x1b\x43reateSIPParticipantRequest\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\x12\x13\n\x0bsip_call_to\x18\x02 \x01(\t\x12\x11\n\troom_name\x18\x03 \x01(\t\x12\x1c\n\x14participant_identity\x18\x04 \x01(\t\x12\x18\n\x10participant_name\x18\x07 \x01(\t\x12\x1c\n\x14participant_metadata\x18\x08 \x01(\t\x12_\n\x16participant_attributes\x18\t \x03(\x0b\x32?.livekit.CreateSIPParticipantRequest.ParticipantAttributesEntry\x12\x0c\n\x04\x64tmf\x18\x05 \x01(\t\x12\x15\n\rplay_ringtone\x18\x06 \x01(\x08\x12\x19\n\x11hide_phone_number\x18\n \x01(\x08\x1a<\n\x1aParticipantAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"r\n\x12SIPParticipantInfo\x12\x16\n\x0eparticipant_id\x18\x01 \x01(\t\x12\x1c\n\x14participant_identity\x18\x02 \x01(\t\x12\x11\n\troom_name\x18\x03 \x01(\t\x12\x13\n\x0bsip_call_id\x18\x04 \x01(\t*k\n\x0cSIPTransport\x12\x16\n\x12SIP_TRANSPORT_AUTO\x10\x00\x12\x15\n\x11SIP_TRANSPORT_UDP\x10\x01\x12\x15\n\x11SIP_TRANSPORT_TCP\x10\x02\x12\x15\n\x11SIP_TRANSPORT_TLS\x10\x03\x32\xed\x07\n\x03SIP\x12L\n\x0e\x43reateSIPTrunk\x12\x1e.livekit.CreateSIPTrunkRequest\x1a\x15.livekit.SIPTrunkInfo\"\x03\x88\x02\x01\x12P\n\x0cListSIPTrunk\x12\x1c.livekit.ListSIPTrunkRequest\x1a\x1d.livekit.ListSIPTrunkResponse\"\x03\x88\x02\x01\x12\\\n\x15\x43reateSIPInboundTrunk\x12%.livekit.CreateSIPInboundTrunkRequest\x1a\x1c.livekit.SIPInboundTrunkInfo\x12_\n\x16\x43reateSIPOutboundTrunk\x12&.livekit.CreateSIPOutboundTrunkRequest\x1a\x1d.livekit.SIPOutboundTrunkInfo\x12`\n\x13ListSIPInboundTrunk\x12#.livekit.ListSIPInboundTrunkRequest\x1a$.livekit.ListSIPInboundTrunkResponse\x12\x63\n\x14ListSIPOutboundTrunk\x12$.livekit.ListSIPOutboundTrunkRequest\x1a%.livekit.ListSIPOutboundTrunkResponse\x12G\n\x0e\x44\x65leteSIPTrunk\x12\x1e.livekit.DeleteSIPTrunkRequest\x1a\x15.livekit.SIPTrunkInfo\x12\\\n\x15\x43reateSIPDispatchRule\x12%.livekit.CreateSIPDispatchRuleRequest\x1a\x1c.livekit.SIPDispatchRuleInfo\x12`\n\x13ListSIPDispatchRule\x12#.livekit.ListSIPDispatchRuleRequest\x1a$.livekit.ListSIPDispatchRuleResponse\x12\\\n\x15\x44\x65leteSIPDispatchRule\x12%.livekit.DeleteSIPDispatchRuleRequest\x1a\x1c.livekit.SIPDispatchRuleInfo\x12Y\n\x14\x43reateSIPParticipant\x12$.livekit.CreateSIPParticipantRequest\x1a\x1b.livekit.SIPParticipantInfoBFZ#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -31,14 +30,6 @@ _globals['_SIPTRUNKINFO'].fields_by_name['inbound_numbers_regex']._serialized_options = b'\030\001' _globals['_SIPTRUNKINFO']._options = None _globals['_SIPTRUNKINFO']._serialized_options = b'\030\001' - _globals['_SIPINBOUNDTRUNKINFO_HEADERSENTRY']._options = None - _globals['_SIPINBOUNDTRUNKINFO_HEADERSENTRY']._serialized_options = b'8\001' - _globals['_SIPINBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._options = None - _globals['_SIPINBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._serialized_options = b'8\001' - _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSENTRY']._options = None - _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSENTRY']._serialized_options = b'8\001' - _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._options = None - _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._serialized_options = b'8\001' _globals['_LISTSIPTRUNKREQUEST']._options = None _globals['_LISTSIPTRUNKREQUEST']._serialized_options = b'\030\001' _globals['_LISTSIPTRUNKRESPONSE']._options = None @@ -53,82 +44,62 @@ _globals['_SIP'].methods_by_name['CreateSIPTrunk']._serialized_options = b'\210\002\001' _globals['_SIP'].methods_by_name['ListSIPTrunk']._options = None _globals['_SIP'].methods_by_name['ListSIPTrunk']._serialized_options = b'\210\002\001' - _globals['_SIPTRANSPORT']._serialized_start=4345 - _globals['_SIPTRANSPORT']._serialized_end=4452 - _globals['_CREATESIPTRUNKREQUEST']._serialized_start=60 - _globals['_CREATESIPTRUNKREQUEST']._serialized_end=363 - _globals['_SIPTRUNKINFO']._serialized_start=366 - _globals['_SIPTRUNKINFO']._serialized_end=841 - _globals['_SIPTRUNKINFO_TRUNKKIND']._serialized_start=769 - _globals['_SIPTRUNKINFO_TRUNKKIND']._serialized_end=837 - _globals['_CREATESIPINBOUNDTRUNKREQUEST']._serialized_start=843 - _globals['_CREATESIPINBOUNDTRUNKREQUEST']._serialized_end=918 - _globals['_SIPINBOUNDTRUNKINFO']._serialized_start=921 - _globals['_SIPINBOUNDTRUNKINFO']._serialized_end=1365 - _globals['_SIPINBOUNDTRUNKINFO_HEADERSENTRY']._serialized_start=1259 - _globals['_SIPINBOUNDTRUNKINFO_HEADERSENTRY']._serialized_end=1305 - _globals['_SIPINBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._serialized_start=1307 - _globals['_SIPINBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._serialized_end=1365 - _globals['_CREATESIPOUTBOUNDTRUNKREQUEST']._serialized_start=1367 - _globals['_CREATESIPOUTBOUNDTRUNKREQUEST']._serialized_end=1444 - _globals['_SIPOUTBOUNDTRUNKINFO']._serialized_start=1447 - _globals['_SIPOUTBOUNDTRUNKINFO']._serialized_end=1901 - _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSENTRY']._serialized_start=1259 - _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSENTRY']._serialized_end=1305 - _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._serialized_start=1307 - _globals['_SIPOUTBOUNDTRUNKINFO_HEADERSTOATTRIBUTESENTRY']._serialized_end=1365 - _globals['_GETSIPINBOUNDTRUNKREQUEST']._serialized_start=1903 - _globals['_GETSIPINBOUNDTRUNKREQUEST']._serialized_end=1952 - _globals['_GETSIPINBOUNDTRUNKRESPONSE']._serialized_start=1954 - _globals['_GETSIPINBOUNDTRUNKRESPONSE']._serialized_end=2027 - _globals['_GETSIPOUTBOUNDTRUNKREQUEST']._serialized_start=2029 - _globals['_GETSIPOUTBOUNDTRUNKREQUEST']._serialized_end=2079 - _globals['_GETSIPOUTBOUNDTRUNKRESPONSE']._serialized_start=2081 - _globals['_GETSIPOUTBOUNDTRUNKRESPONSE']._serialized_end=2156 - _globals['_LISTSIPTRUNKREQUEST']._serialized_start=2158 - _globals['_LISTSIPTRUNKREQUEST']._serialized_end=2183 - _globals['_LISTSIPTRUNKRESPONSE']._serialized_start=2185 - _globals['_LISTSIPTRUNKRESPONSE']._serialized_end=2249 - _globals['_LISTSIPINBOUNDTRUNKREQUEST']._serialized_start=2251 - _globals['_LISTSIPINBOUNDTRUNKREQUEST']._serialized_end=2279 - _globals['_LISTSIPINBOUNDTRUNKRESPONSE']._serialized_start=2281 - _globals['_LISTSIPINBOUNDTRUNKRESPONSE']._serialized_end=2355 - _globals['_LISTSIPOUTBOUNDTRUNKREQUEST']._serialized_start=2357 - _globals['_LISTSIPOUTBOUNDTRUNKREQUEST']._serialized_end=2386 - _globals['_LISTSIPOUTBOUNDTRUNKRESPONSE']._serialized_start=2388 - _globals['_LISTSIPOUTBOUNDTRUNKRESPONSE']._serialized_end=2464 - _globals['_DELETESIPTRUNKREQUEST']._serialized_start=2466 - _globals['_DELETESIPTRUNKREQUEST']._serialized_end=2511 - _globals['_SIPDISPATCHRULEDIRECT']._serialized_start=2513 - _globals['_SIPDISPATCHRULEDIRECT']._serialized_end=2568 - _globals['_SIPDISPATCHRULEINDIVIDUAL']._serialized_start=2570 - _globals['_SIPDISPATCHRULEINDIVIDUAL']._serialized_end=2631 - _globals['_SIPDISPATCHRULECALLEE']._serialized_start=2633 - _globals['_SIPDISPATCHRULECALLEE']._serialized_end=2709 - _globals['_SIPDISPATCHRULE']._serialized_start=2712 - _globals['_SIPDISPATCHRULE']._serialized_end=2937 - _globals['_CREATESIPDISPATCHRULEREQUEST']._serialized_start=2940 - _globals['_CREATESIPDISPATCHRULEREQUEST']._serialized_end=3239 - _globals['_CREATESIPDISPATCHRULEREQUEST_ATTRIBUTESENTRY']._serialized_start=3190 - _globals['_CREATESIPDISPATCHRULEREQUEST_ATTRIBUTESENTRY']._serialized_end=3239 - _globals['_SIPDISPATCHRULEINFO']._serialized_start=3242 - _globals['_SIPDISPATCHRULEINFO']._serialized_end=3553 - _globals['_SIPDISPATCHRULEINFO_ATTRIBUTESENTRY']._serialized_start=3190 - _globals['_SIPDISPATCHRULEINFO_ATTRIBUTESENTRY']._serialized_end=3239 - _globals['_LISTSIPDISPATCHRULEREQUEST']._serialized_start=3555 - _globals['_LISTSIPDISPATCHRULEREQUEST']._serialized_end=3583 - _globals['_LISTSIPDISPATCHRULERESPONSE']._serialized_start=3585 - _globals['_LISTSIPDISPATCHRULERESPONSE']._serialized_end=3659 - _globals['_DELETESIPDISPATCHRULEREQUEST']._serialized_start=3661 - _globals['_DELETESIPDISPATCHRULEREQUEST']._serialized_end=3721 - _globals['_CREATESIPPARTICIPANTREQUEST']._serialized_start=3724 - _globals['_CREATESIPPARTICIPANTREQUEST']._serialized_end=4124 - _globals['_CREATESIPPARTICIPANTREQUEST_PARTICIPANTATTRIBUTESENTRY']._serialized_start=4064 - _globals['_CREATESIPPARTICIPANTREQUEST_PARTICIPANTATTRIBUTESENTRY']._serialized_end=4124 - _globals['_SIPPARTICIPANTINFO']._serialized_start=4126 - _globals['_SIPPARTICIPANTINFO']._serialized_end=4240 - _globals['_TRANSFERSIPPARTICIPANTREQUEST']._serialized_start=4242 - _globals['_TRANSFERSIPPARTICIPANTREQUEST']._serialized_end=4343 - _globals['_SIP']._serialized_start=4455 - _globals['_SIP']._serialized_end=5743 + _globals['_SIPTRANSPORT']._serialized_start=3306 + _globals['_SIPTRANSPORT']._serialized_end=3413 + _globals['_CREATESIPTRUNKREQUEST']._serialized_start=31 + _globals['_CREATESIPTRUNKREQUEST']._serialized_end=334 + _globals['_SIPTRUNKINFO']._serialized_start=337 + _globals['_SIPTRUNKINFO']._serialized_end=812 + _globals['_SIPTRUNKINFO_TRUNKKIND']._serialized_start=740 + _globals['_SIPTRUNKINFO_TRUNKKIND']._serialized_end=808 + _globals['_CREATESIPINBOUNDTRUNKREQUEST']._serialized_start=814 + _globals['_CREATESIPINBOUNDTRUNKREQUEST']._serialized_end=889 + _globals['_SIPINBOUNDTRUNKINFO']._serialized_start=892 + _globals['_SIPINBOUNDTRUNKINFO']._serialized_end=1082 + _globals['_CREATESIPOUTBOUNDTRUNKREQUEST']._serialized_start=1084 + _globals['_CREATESIPOUTBOUNDTRUNKREQUEST']._serialized_end=1161 + _globals['_SIPOUTBOUNDTRUNKINFO']._serialized_start=1164 + _globals['_SIPOUTBOUNDTRUNKINFO']._serialized_end=1362 + _globals['_LISTSIPTRUNKREQUEST']._serialized_start=1364 + _globals['_LISTSIPTRUNKREQUEST']._serialized_end=1389 + _globals['_LISTSIPTRUNKRESPONSE']._serialized_start=1391 + _globals['_LISTSIPTRUNKRESPONSE']._serialized_end=1455 + _globals['_LISTSIPINBOUNDTRUNKREQUEST']._serialized_start=1457 + _globals['_LISTSIPINBOUNDTRUNKREQUEST']._serialized_end=1485 + _globals['_LISTSIPINBOUNDTRUNKRESPONSE']._serialized_start=1487 + _globals['_LISTSIPINBOUNDTRUNKRESPONSE']._serialized_end=1561 + _globals['_LISTSIPOUTBOUNDTRUNKREQUEST']._serialized_start=1563 + _globals['_LISTSIPOUTBOUNDTRUNKREQUEST']._serialized_end=1592 + _globals['_LISTSIPOUTBOUNDTRUNKRESPONSE']._serialized_start=1594 + _globals['_LISTSIPOUTBOUNDTRUNKRESPONSE']._serialized_end=1670 + _globals['_DELETESIPTRUNKREQUEST']._serialized_start=1672 + _globals['_DELETESIPTRUNKREQUEST']._serialized_end=1717 + _globals['_SIPDISPATCHRULEDIRECT']._serialized_start=1719 + _globals['_SIPDISPATCHRULEDIRECT']._serialized_end=1774 + _globals['_SIPDISPATCHRULEINDIVIDUAL']._serialized_start=1776 + _globals['_SIPDISPATCHRULEINDIVIDUAL']._serialized_end=1837 + _globals['_SIPDISPATCHRULE']._serialized_start=1840 + _globals['_SIPDISPATCHRULE']._serialized_end=2001 + _globals['_CREATESIPDISPATCHRULEREQUEST']._serialized_start=2004 + _globals['_CREATESIPDISPATCHRULEREQUEST']._serialized_end=2303 + _globals['_CREATESIPDISPATCHRULEREQUEST_ATTRIBUTESENTRY']._serialized_start=2254 + _globals['_CREATESIPDISPATCHRULEREQUEST_ATTRIBUTESENTRY']._serialized_end=2303 + _globals['_SIPDISPATCHRULEINFO']._serialized_start=2306 + _globals['_SIPDISPATCHRULEINFO']._serialized_end=2617 + _globals['_SIPDISPATCHRULEINFO_ATTRIBUTESENTRY']._serialized_start=2254 + _globals['_SIPDISPATCHRULEINFO_ATTRIBUTESENTRY']._serialized_end=2303 + _globals['_LISTSIPDISPATCHRULEREQUEST']._serialized_start=2619 + _globals['_LISTSIPDISPATCHRULEREQUEST']._serialized_end=2647 + _globals['_LISTSIPDISPATCHRULERESPONSE']._serialized_start=2649 + _globals['_LISTSIPDISPATCHRULERESPONSE']._serialized_end=2723 + _globals['_DELETESIPDISPATCHRULEREQUEST']._serialized_start=2725 + _globals['_DELETESIPDISPATCHRULEREQUEST']._serialized_end=2785 + _globals['_CREATESIPPARTICIPANTREQUEST']._serialized_start=2788 + _globals['_CREATESIPPARTICIPANTREQUEST']._serialized_end=3188 + _globals['_CREATESIPPARTICIPANTREQUEST_PARTICIPANTATTRIBUTESENTRY']._serialized_start=3128 + _globals['_CREATESIPPARTICIPANTREQUEST_PARTICIPANTATTRIBUTESENTRY']._serialized_end=3188 + _globals['_SIPPARTICIPANTINFO']._serialized_start=3190 + _globals['_SIPPARTICIPANTINFO']._serialized_end=3304 + _globals['_SIP']._serialized_start=3416 + _globals['_SIP']._serialized_end=4421 # @@protoc_insertion_point(module_scope) diff --git a/livekit-protocol/livekit/protocol/sip.pyi b/livekit-protocol/livekit/protocol/sip.pyi index 366c13cd..770b8e30 100644 --- a/livekit-protocol/livekit/protocol/sip.pyi +++ b/livekit-protocol/livekit/protocol/sip.pyi @@ -1,4 +1,3 @@ -from google.protobuf import empty_pb2 as _empty_pb2 from google.protobuf.internal import containers as _containers from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor @@ -91,21 +90,7 @@ class CreateSIPInboundTrunkRequest(_message.Message): def __init__(self, trunk: _Optional[_Union[SIPInboundTrunkInfo, _Mapping]] = ...) -> None: ... class SIPInboundTrunkInfo(_message.Message): - __slots__ = ("sip_trunk_id", "name", "metadata", "numbers", "allowed_addresses", "allowed_numbers", "auth_username", "auth_password", "headers", "headers_to_attributes") - class HeadersEntry(_message.Message): - __slots__ = ("key", "value") - KEY_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - key: str - value: str - def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... - class HeadersToAttributesEntry(_message.Message): - __slots__ = ("key", "value") - KEY_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - key: str - value: str - def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + __slots__ = ("sip_trunk_id", "name", "metadata", "numbers", "allowed_addresses", "allowed_numbers", "auth_username", "auth_password") SIP_TRUNK_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] METADATA_FIELD_NUMBER: _ClassVar[int] @@ -114,8 +99,6 @@ class SIPInboundTrunkInfo(_message.Message): ALLOWED_NUMBERS_FIELD_NUMBER: _ClassVar[int] AUTH_USERNAME_FIELD_NUMBER: _ClassVar[int] AUTH_PASSWORD_FIELD_NUMBER: _ClassVar[int] - HEADERS_FIELD_NUMBER: _ClassVar[int] - HEADERS_TO_ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] sip_trunk_id: str name: str metadata: str @@ -124,9 +107,7 @@ class SIPInboundTrunkInfo(_message.Message): allowed_numbers: _containers.RepeatedScalarFieldContainer[str] auth_username: str auth_password: str - headers: _containers.ScalarMap[str, str] - headers_to_attributes: _containers.ScalarMap[str, str] - def __init__(self, sip_trunk_id: _Optional[str] = ..., name: _Optional[str] = ..., metadata: _Optional[str] = ..., numbers: _Optional[_Iterable[str]] = ..., allowed_addresses: _Optional[_Iterable[str]] = ..., allowed_numbers: _Optional[_Iterable[str]] = ..., auth_username: _Optional[str] = ..., auth_password: _Optional[str] = ..., headers: _Optional[_Mapping[str, str]] = ..., headers_to_attributes: _Optional[_Mapping[str, str]] = ...) -> None: ... + def __init__(self, sip_trunk_id: _Optional[str] = ..., name: _Optional[str] = ..., metadata: _Optional[str] = ..., numbers: _Optional[_Iterable[str]] = ..., allowed_addresses: _Optional[_Iterable[str]] = ..., allowed_numbers: _Optional[_Iterable[str]] = ..., auth_username: _Optional[str] = ..., auth_password: _Optional[str] = ...) -> None: ... class CreateSIPOutboundTrunkRequest(_message.Message): __slots__ = ("trunk",) @@ -135,21 +116,7 @@ class CreateSIPOutboundTrunkRequest(_message.Message): def __init__(self, trunk: _Optional[_Union[SIPOutboundTrunkInfo, _Mapping]] = ...) -> None: ... class SIPOutboundTrunkInfo(_message.Message): - __slots__ = ("sip_trunk_id", "name", "metadata", "address", "transport", "numbers", "auth_username", "auth_password", "headers", "headers_to_attributes") - class HeadersEntry(_message.Message): - __slots__ = ("key", "value") - KEY_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - key: str - value: str - def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... - class HeadersToAttributesEntry(_message.Message): - __slots__ = ("key", "value") - KEY_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - key: str - value: str - def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + __slots__ = ("sip_trunk_id", "name", "metadata", "address", "transport", "numbers", "auth_username", "auth_password") SIP_TRUNK_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] METADATA_FIELD_NUMBER: _ClassVar[int] @@ -158,8 +125,6 @@ class SIPOutboundTrunkInfo(_message.Message): NUMBERS_FIELD_NUMBER: _ClassVar[int] AUTH_USERNAME_FIELD_NUMBER: _ClassVar[int] AUTH_PASSWORD_FIELD_NUMBER: _ClassVar[int] - HEADERS_FIELD_NUMBER: _ClassVar[int] - HEADERS_TO_ATTRIBUTES_FIELD_NUMBER: _ClassVar[int] sip_trunk_id: str name: str metadata: str @@ -168,33 +133,7 @@ class SIPOutboundTrunkInfo(_message.Message): numbers: _containers.RepeatedScalarFieldContainer[str] auth_username: str auth_password: str - headers: _containers.ScalarMap[str, str] - headers_to_attributes: _containers.ScalarMap[str, str] - def __init__(self, sip_trunk_id: _Optional[str] = ..., name: _Optional[str] = ..., metadata: _Optional[str] = ..., address: _Optional[str] = ..., transport: _Optional[_Union[SIPTransport, str]] = ..., numbers: _Optional[_Iterable[str]] = ..., auth_username: _Optional[str] = ..., auth_password: _Optional[str] = ..., headers: _Optional[_Mapping[str, str]] = ..., headers_to_attributes: _Optional[_Mapping[str, str]] = ...) -> None: ... - -class GetSIPInboundTrunkRequest(_message.Message): - __slots__ = ("sip_trunk_id",) - SIP_TRUNK_ID_FIELD_NUMBER: _ClassVar[int] - sip_trunk_id: str - def __init__(self, sip_trunk_id: _Optional[str] = ...) -> None: ... - -class GetSIPInboundTrunkResponse(_message.Message): - __slots__ = ("trunk",) - TRUNK_FIELD_NUMBER: _ClassVar[int] - trunk: SIPInboundTrunkInfo - def __init__(self, trunk: _Optional[_Union[SIPInboundTrunkInfo, _Mapping]] = ...) -> None: ... - -class GetSIPOutboundTrunkRequest(_message.Message): - __slots__ = ("sip_trunk_id",) - SIP_TRUNK_ID_FIELD_NUMBER: _ClassVar[int] - sip_trunk_id: str - def __init__(self, sip_trunk_id: _Optional[str] = ...) -> None: ... - -class GetSIPOutboundTrunkResponse(_message.Message): - __slots__ = ("trunk",) - TRUNK_FIELD_NUMBER: _ClassVar[int] - trunk: SIPOutboundTrunkInfo - def __init__(self, trunk: _Optional[_Union[SIPOutboundTrunkInfo, _Mapping]] = ...) -> None: ... + def __init__(self, sip_trunk_id: _Optional[str] = ..., name: _Optional[str] = ..., metadata: _Optional[str] = ..., address: _Optional[str] = ..., transport: _Optional[_Union[SIPTransport, str]] = ..., numbers: _Optional[_Iterable[str]] = ..., auth_username: _Optional[str] = ..., auth_password: _Optional[str] = ...) -> None: ... class ListSIPTrunkRequest(_message.Message): __slots__ = () @@ -248,25 +187,13 @@ class SIPDispatchRuleIndividual(_message.Message): pin: str def __init__(self, room_prefix: _Optional[str] = ..., pin: _Optional[str] = ...) -> None: ... -class SIPDispatchRuleCallee(_message.Message): - __slots__ = ("room_prefix", "pin", "randomize") - ROOM_PREFIX_FIELD_NUMBER: _ClassVar[int] - PIN_FIELD_NUMBER: _ClassVar[int] - RANDOMIZE_FIELD_NUMBER: _ClassVar[int] - room_prefix: str - pin: str - randomize: bool - def __init__(self, room_prefix: _Optional[str] = ..., pin: _Optional[str] = ..., randomize: bool = ...) -> None: ... - class SIPDispatchRule(_message.Message): - __slots__ = ("dispatch_rule_direct", "dispatch_rule_individual", "dispatch_rule_callee") + __slots__ = ("dispatch_rule_direct", "dispatch_rule_individual") DISPATCH_RULE_DIRECT_FIELD_NUMBER: _ClassVar[int] DISPATCH_RULE_INDIVIDUAL_FIELD_NUMBER: _ClassVar[int] - DISPATCH_RULE_CALLEE_FIELD_NUMBER: _ClassVar[int] dispatch_rule_direct: SIPDispatchRuleDirect dispatch_rule_individual: SIPDispatchRuleIndividual - dispatch_rule_callee: SIPDispatchRuleCallee - def __init__(self, dispatch_rule_direct: _Optional[_Union[SIPDispatchRuleDirect, _Mapping]] = ..., dispatch_rule_individual: _Optional[_Union[SIPDispatchRuleIndividual, _Mapping]] = ..., dispatch_rule_callee: _Optional[_Union[SIPDispatchRuleCallee, _Mapping]] = ...) -> None: ... + def __init__(self, dispatch_rule_direct: _Optional[_Union[SIPDispatchRuleDirect, _Mapping]] = ..., dispatch_rule_individual: _Optional[_Union[SIPDispatchRuleIndividual, _Mapping]] = ...) -> None: ... class CreateSIPDispatchRuleRequest(_message.Message): __slots__ = ("rule", "trunk_ids", "hide_phone_number", "inbound_numbers", "name", "metadata", "attributes") @@ -378,13 +305,3 @@ class SIPParticipantInfo(_message.Message): room_name: str sip_call_id: str def __init__(self, participant_id: _Optional[str] = ..., participant_identity: _Optional[str] = ..., room_name: _Optional[str] = ..., sip_call_id: _Optional[str] = ...) -> None: ... - -class TransferSIPParticipantRequest(_message.Message): - __slots__ = ("participant_identity", "room_name", "transfer_to") - PARTICIPANT_IDENTITY_FIELD_NUMBER: _ClassVar[int] - ROOM_NAME_FIELD_NUMBER: _ClassVar[int] - TRANSFER_TO_FIELD_NUMBER: _ClassVar[int] - participant_identity: str - room_name: str - transfer_to: str - def __init__(self, participant_identity: _Optional[str] = ..., room_name: _Optional[str] = ..., transfer_to: _Optional[str] = ...) -> None: ... From 6d48330abd92cb60f30b79434456e1bd6aab3ec2 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 8 Oct 2024 14:00:44 -0700 Subject: [PATCH 08/53] r --- examples/rpc.py | 4 ++-- livekit-rtc/livekit/rtc/_proto/rpc_pb2.py | 4 ++-- livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi | 8 ++++---- livekit-rtc/livekit/rtc/participant.py | 2 +- livekit-rtc/livekit/rtc/room.py | 2 +- livekit-rtc/rust-sdks | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/rpc.py b/examples/rpc.py index 5a5de3ad..6635093b 100644 --- a/examples/rpc.py +++ b/examples/rpc.py @@ -75,7 +75,7 @@ async def perform_greeting(room: rtc.Room): response = await room.local_participant.perform_rpc('greeter', 'arrival', 'Hello') print(f"[Caller] That's nice, the greeter said: \"{response}\"") except Exception as error: - print('[Caller] RPC call failed:', error) + print(f'[Caller] RPC call failed: {error}') raise async def perform_square_root(room: rtc.Room): @@ -85,7 +85,7 @@ async def perform_square_root(room: rtc.Room): parsed_response = json.loads(response) print(f"[Caller] Nice, the answer was {parsed_response['result']}") except Exception as error: - print('[Caller] RPC call failed:', error) + print(f'[Caller] RPC call failed: {error}') raise async def perform_quantum_hypergeometric_series(room: rtc.Room): diff --git a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py index 77867fb1..9e3b16ee 100644 --- a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py @@ -24,7 +24,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\trpc.proto\x12\rlivekit.proto\"7\n\x08RpcError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\t\"\xae\x01\n\x11PerformRpcRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x1c\n\x14\x64\x65stination_identity\x18\x02 \x01(\t\x12\x0e\n\x06method\x18\x03 \x01(\t\x12\x0f\n\x07payload\x18\x04 \x01(\t\x12 \n\x13response_timeout_ms\x18\x05 \x01(\rH\x00\x88\x01\x01\x42\x16\n\x14_response_timeout_ms\"L\n\x18RegisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x0e\n\x06method\x18\x02 \x01(\t\"N\n\x1aUnregisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x0e\n\x06method\x18\x02 \x01(\t\"\xb6\x01\n\"RpcMethodInvocationResponseRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x15\n\rinvocation_id\x18\x02 \x01(\x04\x12\x14\n\x07payload\x18\x03 \x01(\tH\x00\x88\x01\x01\x12+\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x17.livekit.proto.RpcErrorH\x01\x88\x01\x01\x42\n\n\x08_payloadB\x08\n\x06_error\"&\n\x12PerformRpcResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"-\n\x19RegisterRpcMethodResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"/\n\x1bUnregisterRpcMethodResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"7\n#RpcMethodInvocationResponseResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"\x7f\n\x12PerformRpcCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\x12\x14\n\x07payload\x18\x02 \x01(\tH\x00\x88\x01\x01\x12+\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x17.livekit.proto.RpcErrorH\x01\x88\x01\x01\x42\n\n\x08_payloadB\x08\n\x06_error\"-\n\x19RegisterRpcMethodCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"/\n\x1bUnregisterRpcMethodCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"U\n#RpcMethodInvocationResponseCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\x12\x12\n\x05\x65rror\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_error\"\xb5\x01\n\x18RpcMethodInvocationEvent\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x15\n\rinvocation_id\x18\x02 \x01(\x04\x12\x0e\n\x06method\x18\x03 \x01(\t\x12\x12\n\nrequest_id\x18\x04 \x01(\t\x12\x17\n\x0f\x63\x61ller_identity\x18\x05 \x01(\t\x12\x0f\n\x07payload\x18\x06 \x01(\t\x12\x12\n\ntimeout_ms\x18\x07 \x01(\rB\x10\xaa\x02\rLiveKit.Protob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\trpc.proto\x12\rlivekit.proto\"7\n\x08RpcError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\t\"\xae\x01\n\x11PerformRpcRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x1c\n\x14\x64\x65stination_identity\x18\x02 \x01(\t\x12\x0e\n\x06method\x18\x03 \x01(\t\x12\x0f\n\x07payload\x18\x04 \x01(\t\x12 \n\x13response_timeout_ms\x18\x05 \x01(\rH\x00\x88\x01\x01\x42\x16\n\x14_response_timeout_ms\"L\n\x18RegisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x0e\n\x06method\x18\x02 \x01(\t\"N\n\x1aUnregisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x0e\n\x06method\x18\x02 \x01(\t\"\xb6\x01\n\"RpcMethodInvocationResponseRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x15\n\rinvocation_id\x18\x02 \x01(\x04\x12\x14\n\x07payload\x18\x03 \x01(\tH\x00\x88\x01\x01\x12+\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x17.livekit.proto.RpcErrorH\x01\x88\x01\x01\x42\n\n\x08_payloadB\x08\n\x06_error\"&\n\x12PerformRpcResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"-\n\x19RegisterRpcMethodResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"/\n\x1bUnregisterRpcMethodResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"7\n#RpcMethodInvocationResponseResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"\x7f\n\x12PerformRpcCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\x12\x14\n\x07payload\x18\x02 \x01(\tH\x00\x88\x01\x01\x12+\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x17.livekit.proto.RpcErrorH\x01\x88\x01\x01\x42\n\n\x08_payloadB\x08\n\x06_error\"-\n\x19RegisterRpcMethodCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"/\n\x1bUnregisterRpcMethodCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"U\n#RpcMethodInvocationResponseCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\x12\x12\n\x05\x65rror\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_error\"\xbe\x01\n\x18RpcMethodInvocationEvent\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x15\n\rinvocation_id\x18\x02 \x01(\x04\x12\x0e\n\x06method\x18\x03 \x01(\t\x12\x12\n\nrequest_id\x18\x04 \x01(\t\x12\x17\n\x0f\x63\x61ller_identity\x18\x05 \x01(\t\x12\x0f\n\x07payload\x18\x06 \x01(\t\x12\x1b\n\x13response_timeout_ms\x18\x07 \x01(\rB\x10\xaa\x02\rLiveKit.Protob\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -59,5 +59,5 @@ _globals['_RPCMETHODINVOCATIONRESPONSECALLBACK']._serialized_start=1023 _globals['_RPCMETHODINVOCATIONRESPONSECALLBACK']._serialized_end=1108 _globals['_RPCMETHODINVOCATIONEVENT']._serialized_start=1111 - _globals['_RPCMETHODINVOCATIONEVENT']._serialized_end=1292 + _globals['_RPCMETHODINVOCATIONEVENT']._serialized_end=1301 # @@protoc_insertion_point(module_scope) diff --git a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi index a30c552c..daef9d3a 100644 --- a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi +++ b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi @@ -294,14 +294,14 @@ class RpcMethodInvocationEvent(google.protobuf.message.Message): REQUEST_ID_FIELD_NUMBER: builtins.int CALLER_IDENTITY_FIELD_NUMBER: builtins.int PAYLOAD_FIELD_NUMBER: builtins.int - TIMEOUT_MS_FIELD_NUMBER: builtins.int + RESPONSE_TIMEOUT_MS_FIELD_NUMBER: builtins.int local_participant_handle: builtins.int invocation_id: builtins.int method: builtins.str request_id: builtins.str caller_identity: builtins.str payload: builtins.str - timeout_ms: builtins.int + response_timeout_ms: builtins.int def __init__( self, *, @@ -311,8 +311,8 @@ class RpcMethodInvocationEvent(google.protobuf.message.Message): request_id: builtins.str = ..., caller_identity: builtins.str = ..., payload: builtins.str = ..., - timeout_ms: builtins.int = ..., + response_timeout_ms: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["caller_identity", b"caller_identity", "invocation_id", b"invocation_id", "local_participant_handle", b"local_participant_handle", "method", b"method", "payload", b"payload", "request_id", b"request_id", "timeout_ms", b"timeout_ms"]) -> None: ... + def ClearField(self, field_name: typing.Literal["caller_identity", b"caller_identity", "invocation_id", b"invocation_id", "local_participant_handle", b"local_participant_handle", "method", b"method", "payload", b"payload", "request_id", b"request_id", "response_timeout_ms", b"response_timeout_ms"]) -> None: ... global___RpcMethodInvocationEvent = RpcMethodInvocationEvent diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 59f82c5f..201ff350 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -355,7 +355,7 @@ async def _handle_rpc_method_invocation( request_id: str, caller: RemoteParticipant, payload: str, - timeout_ms: int, + response_timeout_ms: int, ) -> None: response_error: Optional[RpcError] = None response_payload: Optional[str] = None diff --git a/livekit-rtc/livekit/rtc/room.py b/livekit-rtc/livekit/rtc/room.py index eb185cdd..3eb42f4d 100644 --- a/livekit-rtc/livekit/rtc/room.py +++ b/livekit-rtc/livekit/rtc/room.py @@ -447,7 +447,7 @@ def _on_rpc_method_invocation(self, rpc_invocation: proto_ffi.RpcMethodInvocatio rpc_invocation.request_id, caller, rpc_invocation.payload, - rpc_invocation.timeout_ms, + rpc_invocation.response_timeout_ms, )) def _on_room_event(self, event: proto_room.RoomEvent): diff --git a/livekit-rtc/rust-sdks b/livekit-rtc/rust-sdks index f7536415..3f11cb0f 160000 --- a/livekit-rtc/rust-sdks +++ b/livekit-rtc/rust-sdks @@ -1 +1 @@ -Subproject commit f753641514c5e52ddba932e03cdbdde912af0c75 +Subproject commit 3f11cb0f875ed98816bc42c4f53f3fcfd2fffe9e From f2c50bbb624adbb784d768b245df46adf32e33e7 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 8 Oct 2024 14:12:10 -0700 Subject: [PATCH 09/53] wip --- livekit-rtc/livekit/rtc/participant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 201ff350..5f3560b6 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -366,7 +366,7 @@ async def _handle_rpc_method_invocation( response_error = RpcError.built_in('UNSUPPORTED_METHOD') else: try: - response_payload = await handler(request_id, caller, payload, timeout_ms) + response_payload = await handler(request_id, caller, payload, response_timeout_ms) except RpcError as error: response_error = error except Exception as error: From d6f8db813ea3f1138af68a52970d82d7d1560968 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 8 Oct 2024 14:45:31 -0700 Subject: [PATCH 10/53] Fixes --- examples/rpc.py | 12 +++++------- livekit-rtc/livekit/rtc/participant.py | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/examples/rpc.py b/examples/rpc.py index 6635093b..debd40d5 100644 --- a/examples/rpc.py +++ b/examples/rpc.py @@ -33,11 +33,9 @@ async def main(): try: print('\n\nRunning math example...') - await asyncio.gather( - perform_square_root(callers_room), - asyncio.sleep(2), - perform_quantum_hypergeometric_series(callers_room) - ) + await perform_square_root(callers_room) + await asyncio.sleep(2) + await perform_quantum_hypergeometric_series(callers_room) except Exception as error: print('Error:', error) @@ -123,8 +121,8 @@ async def connect_participant(identity: str, room_name: str) -> rtc.Room: room = rtc.Room() token = create_token(identity, room_name) - def on_disconnected(): - print(f"[{identity}] Disconnected from room") + def on_disconnected(reason: str): + print(f"[{identity}] Disconnected from room: {reason}") room.on('disconnected', on_disconnected) diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 5f3560b6..942129d8 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -262,7 +262,7 @@ async def perform_rpc( finally: FfiClient.instance.queue.unsubscribe(queue) - if cb.perform_rpc.error: + if cb.perform_rpc.HasField("error"): raise RpcError.from_proto(cb.perform_rpc.error) return cb.perform_rpc.payload From 01b9ede860c22615e713a1c38f9efdb8e5fa7466 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 8 Oct 2024 14:49:07 -0700 Subject: [PATCH 11/53] fmt --- examples/rpc.py | 124 ++++++++++++++++++++++++++++++------------------ 1 file changed, 79 insertions(+), 45 deletions(-) diff --git a/examples/rpc.py b/examples/rpc.py index debd40d5..f490f9c5 100644 --- a/examples/rpc.py +++ b/examples/rpc.py @@ -4,12 +4,15 @@ import asyncio from dotenv import load_dotenv -load_dotenv(dotenv_path='.env.local', override=False) -LIVEKIT_API_KEY = os.getenv('LIVEKIT_API_KEY') -LIVEKIT_API_SECRET = os.getenv('LIVEKIT_API_SECRET') -LIVEKIT_URL = os.getenv('LIVEKIT_URL') +load_dotenv(dotenv_path=".env.local", override=False) +LIVEKIT_API_KEY = os.getenv("LIVEKIT_API_KEY") +LIVEKIT_API_SECRET = os.getenv("LIVEKIT_API_SECRET") +LIVEKIT_URL = os.getenv("LIVEKIT_URL") if not LIVEKIT_API_KEY or not LIVEKIT_API_SECRET or not LIVEKIT_URL: - raise ValueError('Missing required environment variables. Please check your .env.local file.') + raise ValueError( + "Missing required environment variables. Please check your .env.local file." + ) + async def main(): room_name = f"rpc-test-{os.urandom(4).hex()}" @@ -17,82 +20,104 @@ async def main(): print(f"Connecting participants to room: {room_name}") callers_room, greeters_room, math_genius_room = await asyncio.gather( - connect_participant('caller', room_name), - connect_participant('greeter', room_name), - connect_participant('math-genius', room_name) + connect_participant("caller", room_name), + connect_participant("greeter", room_name), + connect_participant("math-genius", room_name), ) # Register all methods for the receiving participant await register_receiver_methods(greeters_room, math_genius_room) try: - print('\n\nRunning greeting example...') + print("\n\nRunning greeting example...") await asyncio.gather(perform_greeting(callers_room)) except Exception as error: - print('Error:', error) + print("Error:", error) try: - print('\n\nRunning math example...') + print("\n\nRunning math example...") await perform_square_root(callers_room) await asyncio.sleep(2) await perform_quantum_hypergeometric_series(callers_room) except Exception as error: - print('Error:', error) + print("Error:", error) - print('\n\nParticipants done, disconnecting...') + print("\n\nParticipants done, disconnecting...") await callers_room.disconnect() await greeters_room.disconnect() await math_genius_room.disconnect() - print('Participants disconnected. Example completed.') + print("Participants disconnected. Example completed.") + -async def register_receiver_methods(greeters_room: rtc.Room, math_genius_room: rtc.Room): - async def arrival_method(request_id: str, caller: rtc.RemoteParticipant, payload: str, response_timeout_ms: int): - print(f"[Greeter] Oh {caller.identity} arrived and said \"{payload}\"") +async def register_receiver_methods( + greeters_room: rtc.Room, math_genius_room: rtc.Room +): + async def arrival_method( + request_id: str, + caller: rtc.RemoteParticipant, + payload: str, + response_timeout_ms: int, + ): + print(f'[Greeter] Oh {caller.identity} arrived and said "{payload}"') await asyncio.sleep(2) return "Welcome and have a wonderful day!" - async def square_root_method(request_id: str, caller: rtc.RemoteParticipant, payload: str, response_timeout_ms: int): + async def square_root_method( + request_id: str, + caller: rtc.RemoteParticipant, + payload: str, + response_timeout_ms: int, + ): json_data = json.loads(payload) - number = json_data['number'] - print(f"[Math Genius] I guess {caller.identity} wants the square root of {number}. I've only got {response_timeout_ms / 1000} seconds to respond but I think I can pull it off.") + number = json_data["number"] + print( + f"[Math Genius] I guess {caller.identity} wants the square root of {number}. I've only got {response_timeout_ms / 1000} seconds to respond but I think I can pull it off." + ) print("[Math Genius] *doing math*…") await asyncio.sleep(2) - result = number ** 0.5 + result = number**0.5 print(f"[Math Genius] Aha! It's {result}") return json.dumps({"result": result}) - await greeters_room.local_participant.register_rpc_method('arrival', arrival_method) - await math_genius_room.local_participant.register_rpc_method('square-root', square_root_method) + await greeters_room.local_participant.register_rpc_method("arrival", arrival_method) + await math_genius_room.local_participant.register_rpc_method( + "square-root", square_root_method + ) + async def perform_greeting(room: rtc.Room): print("[Caller] Letting the greeter know that I've arrived") try: - response = await room.local_participant.perform_rpc('greeter', 'arrival', 'Hello') - print(f"[Caller] That's nice, the greeter said: \"{response}\"") + response = await room.local_participant.perform_rpc( + "greeter", "arrival", "Hello" + ) + print(f'[Caller] That\'s nice, the greeter said: "{response}"') except Exception as error: - print(f'[Caller] RPC call failed: {error}') + print(f"[Caller] RPC call failed: {error}") raise + async def perform_square_root(room: rtc.Room): print("[Caller] What's the square root of 16?") try: - response = await room.local_participant.perform_rpc('math-genius', 'square-root', json.dumps({"number": 16})) + response = await room.local_participant.perform_rpc( + "math-genius", "square-root", json.dumps({"number": 16}) + ) parsed_response = json.loads(response) print(f"[Caller] Nice, the answer was {parsed_response['result']}") except Exception as error: - print(f'[Caller] RPC call failed: {error}') + print(f"[Caller] RPC call failed: {error}") raise + async def perform_quantum_hypergeometric_series(room: rtc.Room): print("[Caller] What's the quantum hypergeometric series of 42?") try: response = await room.local_participant.perform_rpc( - 'math-genius', - 'quantum-hypergeometric-series', - json.dumps({"number": 42}) + "math-genius", "quantum-hypergeometric-series", json.dumps({"number": 42}) ) parsed_response = json.loads(response) print(f"[Caller] genius says {parsed_response['result']}!") @@ -100,23 +125,29 @@ async def perform_quantum_hypergeometric_series(room: rtc.Room): if error.code == rtc.RpcError.ErrorCode.UNSUPPORTED_METHOD: print("[Caller] Aww looks like the genius doesn't know that one.") return - print('[Caller] Unexpected error:', error) + print("[Caller] Unexpected error:", error) raise except Exception as error: - print('[Caller] Unexpected error:', error) + print("[Caller] Unexpected error:", error) raise + def create_token(identity: str, room_name: str): - token = api.AccessToken(LIVEKIT_API_KEY, LIVEKIT_API_SECRET) \ - .with_identity(identity) \ - .with_grants(api.VideoGrants( - room=room_name, - room_join=True, - can_publish=True, - can_subscribe=True, - )) + token = ( + api.AccessToken(LIVEKIT_API_KEY, LIVEKIT_API_SECRET) + .with_identity(identity) + .with_grants( + api.VideoGrants( + room=room_name, + room_join=True, + can_publish=True, + can_subscribe=True, + ) + ) + ) return token.to_jwt() + async def connect_participant(identity: str, room_name: str) -> rtc.Room: room = rtc.Room() token = create_token(identity, room_name) @@ -124,7 +155,7 @@ async def connect_participant(identity: str, room_name: str) -> rtc.Room: def on_disconnected(reason: str): print(f"[{identity}] Disconnected from room: {reason}") - room.on('disconnected', on_disconnected) + room.on("disconnected", on_disconnected) await room.connect(LIVEKIT_URL, token) @@ -132,18 +163,21 @@ async def wait_for_participants(): if room.remote_participants: return participant_connected = asyncio.Event() + def _on_participant_connected(participant: rtc.RemoteParticipant): - room.off('participant_connected', _on_participant_connected) + room.off("participant_connected", _on_participant_connected) participant_connected.set() - room.on('participant_connected', _on_participant_connected) + + room.on("participant_connected", _on_participant_connected) await participant_connected.wait() try: await asyncio.wait_for(wait_for_participants(), timeout=5.0) except asyncio.TimeoutError: - raise TimeoutError('Timed out waiting for participants') + raise TimeoutError("Timed out waiting for participants") return room + if __name__ == "__main__": asyncio.run(main()) From 8923184d22b953bbb0cfffdcf0291ce762e6229e Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 8 Oct 2024 14:49:18 -0700 Subject: [PATCH 12/53] format --- livekit-rtc/livekit/rtc/__init__.py | 1 + livekit-rtc/livekit/rtc/participant.py | 50 +++++++++++++++----------- livekit-rtc/livekit/rtc/room.py | 25 +++++++------ livekit-rtc/livekit/rtc/rpc.py | 39 ++++++++++---------- 4 files changed, 67 insertions(+), 48 deletions(-) diff --git a/livekit-rtc/livekit/rtc/__init__.py b/livekit-rtc/livekit/rtc/__init__.py index 0195d947..c7f58f57 100644 --- a/livekit-rtc/livekit/rtc/__init__.py +++ b/livekit-rtc/livekit/rtc/__init__.py @@ -72,6 +72,7 @@ from .audio_resampler import AudioResampler, AudioResamplerQuality from .utils import combine_audio_frames from .rpc import RpcError + __all__ = [ "ConnectionQuality", "ConnectionState", diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 942129d8..a8e9be65 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -37,6 +37,7 @@ from .rpc import RpcError from ._proto.rpc_pb2 import RpcMethodInvocationResponseRequest + class PublishTrackError(Exception): def __init__(self, message: str) -> None: self.message = message @@ -106,7 +107,9 @@ def __init__( super().__init__(owned_info) self._room_queue = room_queue self.track_publications: dict[str, LocalTrackPublication] = {} # type: ignore - self._rpc_handlers: Dict[str, Callable[[str, RemoteParticipant, str, int], Awaitable[str]]] = {} + self._rpc_handlers: Dict[ + str, Callable[[str, RemoteParticipant, str, int], Awaitable[str]] + ] = {} async def publish_data( self, @@ -222,13 +225,13 @@ async def publish_transcription(self, transcription: Transcription) -> None: if cb.publish_transcription.error: raise PublishTranscriptionError(cb.publish_transcription.error) - + async def perform_rpc( self, destination_identity: str, method: str, payload: str, - response_timeout_ms: Optional[int] = None + response_timeout_ms: Optional[int] = None, ) -> str: """ Initiate an RPC call to a remote participant. @@ -266,11 +269,11 @@ async def perform_rpc( raise RpcError.from_proto(cb.perform_rpc.error) return cb.perform_rpc.payload - + async def register_rpc_method( self, method: str, - handler: Callable[[str, 'RemoteParticipant', str, int], Awaitable[str]] + handler: Callable[[str, "RemoteParticipant", str, int], Awaitable[str]], ) -> None: """ Establishes the participant as a receiver for calls of the specified RPC method. @@ -323,7 +326,6 @@ async def greet_handler(request_id: str, caller: RemoteParticipant, payload: str finally: FfiClient.instance.queue.unsubscribe(queue) - async def unregister_rpc_method(self, method: str) -> None: """ Unregisters a previously registered RPC method. @@ -342,12 +344,13 @@ async def unregister_rpc_method(self, method: str) -> None: resp = FfiClient.instance.request(req) await queue.wait_for( lambda e: ( - e.unregister_rpc_method.async_id == resp.unregister_rpc_method.async_id + e.unregister_rpc_method.async_id + == resp.unregister_rpc_method.async_id ) ) finally: FfiClient.instance.queue.unsubscribe(queue) - + async def _handle_rpc_method_invocation( self, invocation_id: int, @@ -363,10 +366,12 @@ async def _handle_rpc_method_invocation( handler = self._rpc_handlers.get(method) if not handler: - response_error = RpcError.built_in('UNSUPPORTED_METHOD') + response_error = RpcError.built_in("UNSUPPORTED_METHOD") else: try: - response_payload = await handler(request_id, caller, payload, response_timeout_ms) + response_payload = await handler( + request_id, caller, payload, response_timeout_ms + ) except RpcError as error: response_error = error except Exception as error: @@ -374,25 +379,30 @@ async def _handle_rpc_method_invocation( f"Uncaught error returned by RPC handler for {method}. Returning UNCAUGHT_ERROR instead.", error, ) - response_error = RpcError.built_in('APPLICATION_ERROR') - - req = proto_ffi.FfiRequest(rpc_method_invocation_response=RpcMethodInvocationResponseRequest( - invocation_id=invocation_id, - error=response_error.to_proto() if response_error else None, - payload=response_payload - )) - + response_error = RpcError.built_in("APPLICATION_ERROR") + + req = proto_ffi.FfiRequest( + rpc_method_invocation_response=RpcMethodInvocationResponseRequest( + invocation_id=invocation_id, + error=response_error.to_proto() if response_error else None, + payload=response_payload, + ) + ) + res = FfiClient.instance.request(req) queue = FfiClient.instance.queue.subscribe() try: cb = await queue.wait_for( lambda e: ( - e.rpc_method_invocation_response.async_id == res.rpc_method_invocation_response.async_id + e.rpc_method_invocation_response.async_id + == res.rpc_method_invocation_response.async_id ) ) if cb.rpc_method_invocation_response.error: - print(f"error sending rpc method invocation response: {cb.rpc_method_invocation_response.error}") + print( + f"error sending rpc method invocation response: {cb.rpc_method_invocation_response.error}" + ) finally: FfiClient.instance.queue.unsubscribe(queue) diff --git a/livekit-rtc/livekit/rtc/room.py b/livekit-rtc/livekit/rtc/room.py index 3eb42f4d..1362da73 100644 --- a/livekit-rtc/livekit/rtc/room.py +++ b/livekit-rtc/livekit/rtc/room.py @@ -437,18 +437,23 @@ async def _listen_task(self) -> None: # before processing the next one self._room_queue.put_nowait(event) await self._room_queue.join() - + def _on_rpc_method_invocation(self, rpc_invocation: proto_ffi.RpcMethodInvocation): - if rpc_invocation.local_participant_handle == self._local_participant._ffi_handle.handle: # type: ignore + if ( + rpc_invocation.local_participant_handle + == self._local_participant._ffi_handle.handle + ): # type: ignore caller = self._remote_participants.get(rpc_invocation.caller_identity) - asyncio.create_task(self._local_participant._handle_rpc_method_invocation( - rpc_invocation.invocation_id, - rpc_invocation.method, - rpc_invocation.request_id, - caller, - rpc_invocation.payload, - rpc_invocation.response_timeout_ms, - )) + asyncio.create_task( + self._local_participant._handle_rpc_method_invocation( + rpc_invocation.invocation_id, + rpc_invocation.method, + rpc_invocation.request_id, + caller, + rpc_invocation.payload, + rpc_invocation.response_timeout_ms, + ) + ) def _on_room_event(self, event: proto_room.RoomEvent): which = event.WhichOneof("message") diff --git a/livekit-rtc/livekit/rtc/rpc.py b/livekit-rtc/livekit/rtc/rpc.py index e23be68f..a3b1661c 100644 --- a/livekit-rtc/livekit/rtc/rpc.py +++ b/livekit-rtc/livekit/rtc/rpc.py @@ -16,6 +16,7 @@ from enum import IntEnum from ._proto import rpc_pb2 as proto_rpc + class RpcError(Exception): """ Specialized error handling for RPC methods. @@ -39,19 +40,23 @@ class ErrorCode(IntEnum): REQUEST_PAYLOAD_TOO_LARGE = 1402 ErrorMessage: ClassVar[Dict[ErrorCode, str]] = { - ErrorCode.APPLICATION_ERROR: 'Application error in method handler', - ErrorCode.CONNECTION_TIMEOUT: 'Connection timeout', - ErrorCode.RESPONSE_TIMEOUT: 'Response timeout', - ErrorCode.RECIPIENT_DISCONNECTED: 'Recipient disconnected', - ErrorCode.RESPONSE_PAYLOAD_TOO_LARGE: 'Response payload too large', - ErrorCode.SEND_FAILED: 'Failed to send', - - ErrorCode.UNSUPPORTED_METHOD: 'Method not supported at destination', - ErrorCode.RECIPIENT_NOT_FOUND: 'Recipient not found', - ErrorCode.REQUEST_PAYLOAD_TOO_LARGE: 'Request payload too large', + ErrorCode.APPLICATION_ERROR: "Application error in method handler", + ErrorCode.CONNECTION_TIMEOUT: "Connection timeout", + ErrorCode.RESPONSE_TIMEOUT: "Response timeout", + ErrorCode.RECIPIENT_DISCONNECTED: "Recipient disconnected", + ErrorCode.RESPONSE_PAYLOAD_TOO_LARGE: "Response payload too large", + ErrorCode.SEND_FAILED: "Failed to send", + ErrorCode.UNSUPPORTED_METHOD: "Method not supported at destination", + ErrorCode.RECIPIENT_NOT_FOUND: "Recipient not found", + ErrorCode.REQUEST_PAYLOAD_TOO_LARGE: "Request payload too large", } - def __init__(self, code: Union[int, 'RpcError.ErrorCode'], message: str, data: Optional[str] = None): + def __init__( + self, + code: Union[int, "RpcError.ErrorCode"], + message: str, + data: Optional[str] = None, + ): """ Creates an error object with the given code and message, plus an optional data payload. @@ -65,18 +70,16 @@ def __init__(self, code: Union[int, 'RpcError.ErrorCode'], message: str, data: O self.data = data @classmethod - def from_proto(cls, proto: proto_rpc.RpcError) -> 'RpcError': + def from_proto(cls, proto: proto_rpc.RpcError) -> "RpcError": return cls(proto.code, proto.message, proto.data) def to_proto(self) -> proto_rpc.RpcError: - return proto_rpc.RpcError( - code=self.code, - message=self.message, - data=self.data - ) + return proto_rpc.RpcError(code=self.code, message=self.message, data=self.data) @classmethod - def built_in(cls, code: 'RpcError.ErrorCode', data: Optional[str] = None) -> 'RpcError': + def built_in( + cls, code: "RpcError.ErrorCode", data: Optional[str] = None + ) -> "RpcError": """ Creates an error object from the ErrorCode, with an auto-populated message. From e22b112e3b4515e51bceb568778a35ac974f2c64 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 8 Oct 2024 15:01:37 -0700 Subject: [PATCH 13/53] fixes --- livekit-rtc/livekit/rtc/_proto/rpc_pb2.py | 56 +++++++++++----------- livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi | 6 ++- livekit-rtc/livekit/rtc/participant.py | 4 +- livekit-rtc/livekit/rtc/room.py | 13 ++++- livekit-rtc/livekit/rtc/rpc.py | 4 +- livekit-rtc/rust-sdks | 2 +- 6 files changed, 47 insertions(+), 38 deletions(-) diff --git a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py index 9e3b16ee..c7e29758 100644 --- a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py @@ -24,7 +24,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\trpc.proto\x12\rlivekit.proto\"7\n\x08RpcError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\t\"\xae\x01\n\x11PerformRpcRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x1c\n\x14\x64\x65stination_identity\x18\x02 \x01(\t\x12\x0e\n\x06method\x18\x03 \x01(\t\x12\x0f\n\x07payload\x18\x04 \x01(\t\x12 \n\x13response_timeout_ms\x18\x05 \x01(\rH\x00\x88\x01\x01\x42\x16\n\x14_response_timeout_ms\"L\n\x18RegisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x0e\n\x06method\x18\x02 \x01(\t\"N\n\x1aUnregisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x0e\n\x06method\x18\x02 \x01(\t\"\xb6\x01\n\"RpcMethodInvocationResponseRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x15\n\rinvocation_id\x18\x02 \x01(\x04\x12\x14\n\x07payload\x18\x03 \x01(\tH\x00\x88\x01\x01\x12+\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x17.livekit.proto.RpcErrorH\x01\x88\x01\x01\x42\n\n\x08_payloadB\x08\n\x06_error\"&\n\x12PerformRpcResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"-\n\x19RegisterRpcMethodResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"/\n\x1bUnregisterRpcMethodResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"7\n#RpcMethodInvocationResponseResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"\x7f\n\x12PerformRpcCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\x12\x14\n\x07payload\x18\x02 \x01(\tH\x00\x88\x01\x01\x12+\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x17.livekit.proto.RpcErrorH\x01\x88\x01\x01\x42\n\n\x08_payloadB\x08\n\x06_error\"-\n\x19RegisterRpcMethodCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"/\n\x1bUnregisterRpcMethodCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"U\n#RpcMethodInvocationResponseCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\x12\x12\n\x05\x65rror\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_error\"\xbe\x01\n\x18RpcMethodInvocationEvent\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x15\n\rinvocation_id\x18\x02 \x01(\x04\x12\x0e\n\x06method\x18\x03 \x01(\t\x12\x12\n\nrequest_id\x18\x04 \x01(\t\x12\x17\n\x0f\x63\x61ller_identity\x18\x05 \x01(\t\x12\x0f\n\x07payload\x18\x06 \x01(\t\x12\x1b\n\x13response_timeout_ms\x18\x07 \x01(\rB\x10\xaa\x02\rLiveKit.Protob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\trpc.proto\x12\rlivekit.proto\"E\n\x08RpcError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x11\n\x04\x64\x61ta\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_data\"\xae\x01\n\x11PerformRpcRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x1c\n\x14\x64\x65stination_identity\x18\x02 \x01(\t\x12\x0e\n\x06method\x18\x03 \x01(\t\x12\x0f\n\x07payload\x18\x04 \x01(\t\x12 \n\x13response_timeout_ms\x18\x05 \x01(\rH\x00\x88\x01\x01\x42\x16\n\x14_response_timeout_ms\"L\n\x18RegisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x0e\n\x06method\x18\x02 \x01(\t\"N\n\x1aUnregisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x0e\n\x06method\x18\x02 \x01(\t\"\xb6\x01\n\"RpcMethodInvocationResponseRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x15\n\rinvocation_id\x18\x02 \x01(\x04\x12\x14\n\x07payload\x18\x03 \x01(\tH\x00\x88\x01\x01\x12+\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x17.livekit.proto.RpcErrorH\x01\x88\x01\x01\x42\n\n\x08_payloadB\x08\n\x06_error\"&\n\x12PerformRpcResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"-\n\x19RegisterRpcMethodResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"/\n\x1bUnregisterRpcMethodResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"7\n#RpcMethodInvocationResponseResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"\x7f\n\x12PerformRpcCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\x12\x14\n\x07payload\x18\x02 \x01(\tH\x00\x88\x01\x01\x12+\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x17.livekit.proto.RpcErrorH\x01\x88\x01\x01\x42\n\n\x08_payloadB\x08\n\x06_error\"-\n\x19RegisterRpcMethodCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"/\n\x1bUnregisterRpcMethodCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"U\n#RpcMethodInvocationResponseCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\x12\x12\n\x05\x65rror\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_error\"\xbe\x01\n\x18RpcMethodInvocationEvent\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x15\n\rinvocation_id\x18\x02 \x01(\x04\x12\x0e\n\x06method\x18\x03 \x01(\t\x12\x12\n\nrequest_id\x18\x04 \x01(\t\x12\x17\n\x0f\x63\x61ller_identity\x18\x05 \x01(\t\x12\x0f\n\x07payload\x18\x06 \x01(\t\x12\x1b\n\x13response_timeout_ms\x18\x07 \x01(\rB\x10\xaa\x02\rLiveKit.Protob\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -33,31 +33,31 @@ _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' _globals['_RPCERROR']._serialized_start=28 - _globals['_RPCERROR']._serialized_end=83 - _globals['_PERFORMRPCREQUEST']._serialized_start=86 - _globals['_PERFORMRPCREQUEST']._serialized_end=260 - _globals['_REGISTERRPCMETHODREQUEST']._serialized_start=262 - _globals['_REGISTERRPCMETHODREQUEST']._serialized_end=338 - _globals['_UNREGISTERRPCMETHODREQUEST']._serialized_start=340 - _globals['_UNREGISTERRPCMETHODREQUEST']._serialized_end=418 - _globals['_RPCMETHODINVOCATIONRESPONSEREQUEST']._serialized_start=421 - _globals['_RPCMETHODINVOCATIONRESPONSEREQUEST']._serialized_end=603 - _globals['_PERFORMRPCRESPONSE']._serialized_start=605 - _globals['_PERFORMRPCRESPONSE']._serialized_end=643 - _globals['_REGISTERRPCMETHODRESPONSE']._serialized_start=645 - _globals['_REGISTERRPCMETHODRESPONSE']._serialized_end=690 - _globals['_UNREGISTERRPCMETHODRESPONSE']._serialized_start=692 - _globals['_UNREGISTERRPCMETHODRESPONSE']._serialized_end=739 - _globals['_RPCMETHODINVOCATIONRESPONSERESPONSE']._serialized_start=741 - _globals['_RPCMETHODINVOCATIONRESPONSERESPONSE']._serialized_end=796 - _globals['_PERFORMRPCCALLBACK']._serialized_start=798 - _globals['_PERFORMRPCCALLBACK']._serialized_end=925 - _globals['_REGISTERRPCMETHODCALLBACK']._serialized_start=927 - _globals['_REGISTERRPCMETHODCALLBACK']._serialized_end=972 - _globals['_UNREGISTERRPCMETHODCALLBACK']._serialized_start=974 - _globals['_UNREGISTERRPCMETHODCALLBACK']._serialized_end=1021 - _globals['_RPCMETHODINVOCATIONRESPONSECALLBACK']._serialized_start=1023 - _globals['_RPCMETHODINVOCATIONRESPONSECALLBACK']._serialized_end=1108 - _globals['_RPCMETHODINVOCATIONEVENT']._serialized_start=1111 - _globals['_RPCMETHODINVOCATIONEVENT']._serialized_end=1301 + _globals['_RPCERROR']._serialized_end=97 + _globals['_PERFORMRPCREQUEST']._serialized_start=100 + _globals['_PERFORMRPCREQUEST']._serialized_end=274 + _globals['_REGISTERRPCMETHODREQUEST']._serialized_start=276 + _globals['_REGISTERRPCMETHODREQUEST']._serialized_end=352 + _globals['_UNREGISTERRPCMETHODREQUEST']._serialized_start=354 + _globals['_UNREGISTERRPCMETHODREQUEST']._serialized_end=432 + _globals['_RPCMETHODINVOCATIONRESPONSEREQUEST']._serialized_start=435 + _globals['_RPCMETHODINVOCATIONRESPONSEREQUEST']._serialized_end=617 + _globals['_PERFORMRPCRESPONSE']._serialized_start=619 + _globals['_PERFORMRPCRESPONSE']._serialized_end=657 + _globals['_REGISTERRPCMETHODRESPONSE']._serialized_start=659 + _globals['_REGISTERRPCMETHODRESPONSE']._serialized_end=704 + _globals['_UNREGISTERRPCMETHODRESPONSE']._serialized_start=706 + _globals['_UNREGISTERRPCMETHODRESPONSE']._serialized_end=753 + _globals['_RPCMETHODINVOCATIONRESPONSERESPONSE']._serialized_start=755 + _globals['_RPCMETHODINVOCATIONRESPONSERESPONSE']._serialized_end=810 + _globals['_PERFORMRPCCALLBACK']._serialized_start=812 + _globals['_PERFORMRPCCALLBACK']._serialized_end=939 + _globals['_REGISTERRPCMETHODCALLBACK']._serialized_start=941 + _globals['_REGISTERRPCMETHODCALLBACK']._serialized_end=986 + _globals['_UNREGISTERRPCMETHODCALLBACK']._serialized_start=988 + _globals['_UNREGISTERRPCMETHODCALLBACK']._serialized_end=1035 + _globals['_RPCMETHODINVOCATIONRESPONSECALLBACK']._serialized_start=1037 + _globals['_RPCMETHODINVOCATIONRESPONSECALLBACK']._serialized_end=1122 + _globals['_RPCMETHODINVOCATIONEVENT']._serialized_start=1125 + _globals['_RPCMETHODINVOCATIONEVENT']._serialized_end=1315 # @@protoc_insertion_point(module_scope) diff --git a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi index daef9d3a..6c2c05eb 100644 --- a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi +++ b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi @@ -38,9 +38,11 @@ class RpcError(google.protobuf.message.Message): *, code: builtins.int = ..., message: builtins.str = ..., - data: builtins.str = ..., + data: builtins.str | None = ..., ) -> None: ... - def ClearField(self, field_name: typing.Literal["code", b"code", "data", b"data", "message", b"message"]) -> None: ... + def HasField(self, field_name: typing.Literal["_data", b"_data", "data", b"data"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_data", b"_data", "code", b"code", "data", b"data", "message", b"message"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_data", b"_data"]) -> typing.Literal["data"] | None: ... global___RpcError = RpcError diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index a8e9be65..3f1f0f97 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -366,7 +366,7 @@ async def _handle_rpc_method_invocation( handler = self._rpc_handlers.get(method) if not handler: - response_error = RpcError.built_in("UNSUPPORTED_METHOD") + response_error = RpcError._built_in(RpcError.ErrorCode.UNSUPPORTED_METHOD) else: try: response_payload = await handler( @@ -379,7 +379,7 @@ async def _handle_rpc_method_invocation( f"Uncaught error returned by RPC handler for {method}. Returning UNCAUGHT_ERROR instead.", error, ) - response_error = RpcError.built_in("APPLICATION_ERROR") + response_error = RpcError._built_in(RpcError.ErrorCode.APPLICATION_ERROR) req = proto_ffi.FfiRequest( rpc_method_invocation_response=RpcMethodInvocationResponseRequest( diff --git a/livekit-rtc/livekit/rtc/room.py b/livekit-rtc/livekit/rtc/room.py index 1362da73..1f3e1feb 100644 --- a/livekit-rtc/livekit/rtc/room.py +++ b/livekit-rtc/livekit/rtc/room.py @@ -26,6 +26,7 @@ from ._proto import room_pb2 as proto_room from ._proto.room_pb2 import ConnectionState from ._proto.track_pb2 import TrackKind +from ._proto.rpc_pb2 import RpcMethodInvocationEvent from ._utils import BroadcastQueue from .e2ee import E2EEManager, E2EEOptions from .participant import LocalParticipant, Participant, RemoteParticipant @@ -438,12 +439,20 @@ async def _listen_task(self) -> None: self._room_queue.put_nowait(event) await self._room_queue.join() - def _on_rpc_method_invocation(self, rpc_invocation: proto_ffi.RpcMethodInvocation): + def _on_rpc_method_invocation(self, rpc_invocation: RpcMethodInvocationEvent): + if self._local_participant is None: + logging.warning("Received RPC invocation before local participant was initialized") + return + if ( rpc_invocation.local_participant_handle == self._local_participant._ffi_handle.handle - ): # type: ignore + ): caller = self._remote_participants.get(rpc_invocation.caller_identity) + if caller is None: + logging.warning(f"Caller {rpc_invocation.caller_identity} not found") + return + asyncio.create_task( self._local_participant._handle_rpc_method_invocation( rpc_invocation.invocation_id, diff --git a/livekit-rtc/livekit/rtc/rpc.py b/livekit-rtc/livekit/rtc/rpc.py index a3b1661c..a11073bb 100644 --- a/livekit-rtc/livekit/rtc/rpc.py +++ b/livekit-rtc/livekit/rtc/rpc.py @@ -77,13 +77,11 @@ def to_proto(self) -> proto_rpc.RpcError: return proto_rpc.RpcError(code=self.code, message=self.message, data=self.data) @classmethod - def built_in( + def _built_in( cls, code: "RpcError.ErrorCode", data: Optional[str] = None ) -> "RpcError": """ Creates an error object from the ErrorCode, with an auto-populated message. - - @internal """ message = cls.ErrorMessage[code] return cls(code, message, data) diff --git a/livekit-rtc/rust-sdks b/livekit-rtc/rust-sdks index 3f11cb0f..b37ef6eb 160000 --- a/livekit-rtc/rust-sdks +++ b/livekit-rtc/rust-sdks @@ -1 +1 @@ -Subproject commit 3f11cb0f875ed98816bc42c4f53f3fcfd2fffe9e +Subproject commit b37ef6eb5af96c0cf77704e048fcd385d64b8b61 From 575d79c9b1409882e3617c93aacd669b42b6c39f Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 8 Oct 2024 15:09:25 -0700 Subject: [PATCH 14/53] add divide by zero example --- examples/rpc.py | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/examples/rpc.py b/examples/rpc.py index f490f9c5..a79877f0 100644 --- a/examples/rpc.py +++ b/examples/rpc.py @@ -42,6 +42,12 @@ async def main(): except Exception as error: print("Error:", error) + try: + print("\n\nRunning divide by zero example...") + await perform_divide(callers_room) + except Exception as error: + print("Error:", error) + print("\n\nParticipants done, disconnecting...") await callers_room.disconnect() await greeters_room.disconnect() @@ -82,10 +88,30 @@ async def square_root_method( print(f"[Math Genius] Aha! It's {result}") return json.dumps({"result": result}) + async def divide_method( + request_id: str, + caller: rtc.RemoteParticipant, + payload: str, + response_timeout_ms: int, + ): + json_data = json.loads(payload) + dividend = json_data["dividend"] + divisor = json_data["divisor"] + print(f"[Math Genius] {caller.identity} wants to divide {dividend} by {divisor}.") + + if divisor == 0: + raise ValueError("Cannot divide by zero!") + + result = dividend / divisor + return json.dumps({"result": result}) + await greeters_room.local_participant.register_rpc_method("arrival", arrival_method) await math_genius_room.local_participant.register_rpc_method( "square-root", square_root_method ) + await math_genius_room.local_participant.register_rpc_method( + "divide", divide_method + ) async def perform_greeting(room: rtc.Room): @@ -132,6 +158,23 @@ async def perform_quantum_hypergeometric_series(room: rtc.Room): raise +async def perform_divide(room: rtc.Room): + print("[Caller] Let's try to divide by zero!") + try: + response = await room.local_participant.perform_rpc( + "math-genius", "divide", json.dumps({"dividend": 10, "divisor": 0}) + ) + parsed_response = json.loads(response) + print(f"[Caller] The result is {parsed_response['result']}") + except rtc.RpcError as error: + if error.code == rtc.RpcError.ErrorCode.APPLICATION_ERROR: + print("[Caller] Aww something went wrong over there, too bad!") + else: + print(f"[Caller] RPC call failed with unexpected RpcError: {error}") + except Exception as error: + print(f"[Caller] RPC call failed with unexpected error: {error}") + + def create_token(identity: str, room_name: str): token = ( api.AccessToken(LIVEKIT_API_KEY, LIVEKIT_API_SECRET) From 775b199578805aa77833cb2551fb707562b42468 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 8 Oct 2024 15:57:25 -0700 Subject: [PATCH 15/53] byz --- examples/rpc.py | 19 ++++++++----------- livekit-rtc/livekit/rtc/participant.py | 2 +- livekit-rtc/rust-sdks | 2 +- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/examples/rpc.py b/examples/rpc.py index a79877f0..c7ef69d4 100644 --- a/examples/rpc.py +++ b/examples/rpc.py @@ -35,16 +35,16 @@ async def main(): print("Error:", error) try: - print("\n\nRunning math example...") - await perform_square_root(callers_room) - await asyncio.sleep(2) - await perform_quantum_hypergeometric_series(callers_room) + print("\n\nRunning error handling example...") + await perform_divide(callers_room) except Exception as error: print("Error:", error) try: - print("\n\nRunning divide by zero example...") - await perform_divide(callers_room) + print("\n\nRunning math example...") + await perform_square_root(callers_room) + await asyncio.sleep(2) + await perform_quantum_hypergeometric_series(callers_room) except Exception as error: print("Error:", error) @@ -99,9 +99,6 @@ async def divide_method( divisor = json_data["divisor"] print(f"[Math Genius] {caller.identity} wants to divide {dividend} by {divisor}.") - if divisor == 0: - raise ValueError("Cannot divide by zero!") - result = dividend / divisor return json.dumps({"result": result}) @@ -159,7 +156,7 @@ async def perform_quantum_hypergeometric_series(room: rtc.Room): async def perform_divide(room: rtc.Room): - print("[Caller] Let's try to divide by zero!") + print("[Caller] Let's divide 10 by 0.") try: response = await room.local_participant.perform_rpc( "math-genius", "divide", json.dumps({"dividend": 10, "divisor": 0}) @@ -168,7 +165,7 @@ async def perform_divide(room: rtc.Room): print(f"[Caller] The result is {parsed_response['result']}") except rtc.RpcError as error: if error.code == rtc.RpcError.ErrorCode.APPLICATION_ERROR: - print("[Caller] Aww something went wrong over there, too bad!") + print("[Caller] Aww something went wrong with that one, lets try something else.") else: print(f"[Caller] RPC call failed with unexpected RpcError: {error}") except Exception as error: diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 3f1f0f97..5137a30b 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -376,7 +376,7 @@ async def _handle_rpc_method_invocation( response_error = error except Exception as error: print( - f"Uncaught error returned by RPC handler for {method}. Returning UNCAUGHT_ERROR instead.", + f"Uncaught error returned by RPC handler for {method}. Returning APPLICATION_ERROR instead.", error, ) response_error = RpcError._built_in(RpcError.ErrorCode.APPLICATION_ERROR) diff --git a/livekit-rtc/rust-sdks b/livekit-rtc/rust-sdks index b37ef6eb..089b748d 160000 --- a/livekit-rtc/rust-sdks +++ b/livekit-rtc/rust-sdks @@ -1 +1 @@ -Subproject commit b37ef6eb5af96c0cf77704e048fcd385d64b8b61 +Subproject commit 089b748d3efb3fac2e291f03a234e73676b0dfa2 From f02e98b4e1491c0bc4b11a5bc35ba2a356fa1873 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 8 Oct 2024 16:11:23 -0700 Subject: [PATCH 16/53] ruff --- examples/rpc.py | 10 +++++++--- livekit-rtc/livekit/rtc/participant.py | 4 +++- livekit-rtc/livekit/rtc/room.py | 4 +++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/examples/rpc.py b/examples/rpc.py index c7ef69d4..0bfc9dc6 100644 --- a/examples/rpc.py +++ b/examples/rpc.py @@ -97,8 +97,10 @@ async def divide_method( json_data = json.loads(payload) dividend = json_data["dividend"] divisor = json_data["divisor"] - print(f"[Math Genius] {caller.identity} wants to divide {dividend} by {divisor}.") - + print( + f"[Math Genius] {caller.identity} wants to divide {dividend} by {divisor}." + ) + result = dividend / divisor return json.dumps({"result": result}) @@ -165,7 +167,9 @@ async def perform_divide(room: rtc.Room): print(f"[Caller] The result is {parsed_response['result']}") except rtc.RpcError as error: if error.code == rtc.RpcError.ErrorCode.APPLICATION_ERROR: - print("[Caller] Aww something went wrong with that one, lets try something else.") + print( + "[Caller] Aww something went wrong with that one, lets try something else." + ) else: print(f"[Caller] RPC call failed with unexpected RpcError: {error}") except Exception as error: diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 5137a30b..fad9080e 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -379,7 +379,9 @@ async def _handle_rpc_method_invocation( f"Uncaught error returned by RPC handler for {method}. Returning APPLICATION_ERROR instead.", error, ) - response_error = RpcError._built_in(RpcError.ErrorCode.APPLICATION_ERROR) + response_error = RpcError._built_in( + RpcError.ErrorCode.APPLICATION_ERROR + ) req = proto_ffi.FfiRequest( rpc_method_invocation_response=RpcMethodInvocationResponseRequest( diff --git a/livekit-rtc/livekit/rtc/room.py b/livekit-rtc/livekit/rtc/room.py index 1f3e1feb..54cf6651 100644 --- a/livekit-rtc/livekit/rtc/room.py +++ b/livekit-rtc/livekit/rtc/room.py @@ -441,7 +441,9 @@ async def _listen_task(self) -> None: def _on_rpc_method_invocation(self, rpc_invocation: RpcMethodInvocationEvent): if self._local_participant is None: - logging.warning("Received RPC invocation before local participant was initialized") + logging.warning( + "Received RPC invocation before local participant was initialized" + ) return if ( From 8c50014140506f538d0b14de77c956dcdb0f1790 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 15 Oct 2024 13:25:42 -0700 Subject: [PATCH 17/53] use identity --- examples/rpc.py | 12 ++++++------ livekit-rtc/livekit/rtc/participant.py | 6 +++--- livekit-rtc/livekit/rtc/room.py | 7 +------ 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/examples/rpc.py b/examples/rpc.py index 0bfc9dc6..288b3e9c 100644 --- a/examples/rpc.py +++ b/examples/rpc.py @@ -61,24 +61,24 @@ async def register_receiver_methods( ): async def arrival_method( request_id: str, - caller: rtc.RemoteParticipant, + caller_identity: str, payload: str, response_timeout_ms: int, ): - print(f'[Greeter] Oh {caller.identity} arrived and said "{payload}"') + print(f'[Greeter] Oh {caller_identity} arrived and said "{payload}"') await asyncio.sleep(2) return "Welcome and have a wonderful day!" async def square_root_method( request_id: str, - caller: rtc.RemoteParticipant, + caller_identity: str, payload: str, response_timeout_ms: int, ): json_data = json.loads(payload) number = json_data["number"] print( - f"[Math Genius] I guess {caller.identity} wants the square root of {number}. I've only got {response_timeout_ms / 1000} seconds to respond but I think I can pull it off." + f"[Math Genius] I guess {caller_identity} wants the square root of {number}. I've only got {response_timeout_ms / 1000} seconds to respond but I think I can pull it off." ) print("[Math Genius] *doing math*…") @@ -90,7 +90,7 @@ async def square_root_method( async def divide_method( request_id: str, - caller: rtc.RemoteParticipant, + caller_identity: str, payload: str, response_timeout_ms: int, ): @@ -98,7 +98,7 @@ async def divide_method( dividend = json_data["dividend"] divisor = json_data["divisor"] print( - f"[Math Genius] {caller.identity} wants to divide {dividend} by {divisor}." + f"[Math Genius] {caller_identity} wants to divide {dividend} by {divisor}." ) result = dividend / divisor diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 95c6e997..b948b420 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -305,9 +305,9 @@ async def register_rpc_method( RpcError: On failure. Details in `message`. Example: - async def greet_handler(request_id: str, caller: RemoteParticipant, payload: str, response_timeout_ms: int) -> str: - print(f"Received greeting from {caller.identity}: {payload}") - return f"Hello, {caller.identity}!" + async def greet_handler(request_id: str, caller_identity: str, payload: str, response_timeout_ms: int) -> str: + print(f"Received greeting from {caller_identity}: {payload}") + return f"Hello, {caller_identity}!" await room.local_participant.register_rpc_method('greet', greet_handler) diff --git a/livekit-rtc/livekit/rtc/room.py b/livekit-rtc/livekit/rtc/room.py index 3c9bfa47..20e6022d 100644 --- a/livekit-rtc/livekit/rtc/room.py +++ b/livekit-rtc/livekit/rtc/room.py @@ -450,17 +450,12 @@ def _on_rpc_method_invocation(self, rpc_invocation: RpcMethodInvocationEvent): rpc_invocation.local_participant_handle == self._local_participant._ffi_handle.handle ): - caller = self._remote_participants.get(rpc_invocation.caller_identity) - if caller is None: - logging.warning(f"Caller {rpc_invocation.caller_identity} not found") - return - asyncio.create_task( self._local_participant._handle_rpc_method_invocation( rpc_invocation.invocation_id, rpc_invocation.method, rpc_invocation.request_id, - caller, + rpc_invocation.caller_identity, rpc_invocation.payload, rpc_invocation.response_timeout_ms, ) From e562202461c14057384a8f0fa821144822ce4d6b Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Wed, 23 Oct 2024 12:35:18 -0700 Subject: [PATCH 18/53] sm --- livekit-rtc/rust-sdks | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/livekit-rtc/rust-sdks b/livekit-rtc/rust-sdks index 089b748d..865cdcf1 160000 --- a/livekit-rtc/rust-sdks +++ b/livekit-rtc/rust-sdks @@ -1 +1 @@ -Subproject commit 089b748d3efb3fac2e291f03a234e73676b0dfa2 +Subproject commit 865cdcf1ab21ccc6da20abd63bfd58ac1242cff1 From cb76a60f7f2673171f71ebc589ad9d10c758873e Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Wed, 23 Oct 2024 12:42:45 -0700 Subject: [PATCH 19/53] p --- .../livekit/rtc/_proto/audio_frame_pb2.py | 6 +- livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py | 6 +- livekit-rtc/livekit/rtc/_proto/ffi_pb2.py | 49 +-- livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi | 75 ++++- livekit-rtc/livekit/rtc/_proto/handle_pb2.py | 6 +- .../livekit/rtc/_proto/participant_pb2.py | 6 +- livekit-rtc/livekit/rtc/_proto/room_pb2.py | 6 +- livekit-rtc/livekit/rtc/_proto/rpc_pb2.py | 56 ++-- livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi | 285 +++++++----------- livekit-rtc/livekit/rtc/_proto/stats_pb2.py | 6 +- livekit-rtc/livekit/rtc/_proto/track_pb2.py | 6 +- .../livekit/rtc/_proto/video_frame_pb2.py | 6 +- 12 files changed, 248 insertions(+), 265 deletions(-) diff --git a/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py b/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py index be9e5af4..3e2b0468 100644 --- a/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: audio_frame.proto -# Protobuf Python Version: 5.27.1 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, - 27, - 1, + 28, + 2, '', 'audio_frame.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py b/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py index 11f92061..a78828b9 100644 --- a/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: e2ee.proto -# Protobuf Python Version: 5.27.1 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, - 27, - 1, + 28, + 2, '', 'e2ee.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py index d7765eb4..fddcdcc7 100644 --- a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: ffi.proto -# Protobuf Python Version: 5.27.1 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, - 27, - 1, + 28, + 2, '', 'ffi.proto' ) @@ -27,9 +27,10 @@ from . import room_pb2 as room__pb2 from . import video_frame_pb2 as video__frame__pb2 from . import audio_frame_pb2 as audio__frame__pb2 +from . import rpc_pb2 as rpc__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tffi.proto\x12\rlivekit.proto\x1a\ne2ee.proto\x1a\x0btrack.proto\x1a\nroom.proto\x1a\x11video_frame.proto\x1a\x11\x61udio_frame.proto\"\xfc\x12\n\nFfiRequest\x12\x30\n\x07\x64ispose\x18\x02 \x01(\x0b\x32\x1d.livekit.proto.DisposeRequestH\x00\x12\x30\n\x07\x63onnect\x18\x03 \x01(\x0b\x32\x1d.livekit.proto.ConnectRequestH\x00\x12\x36\n\ndisconnect\x18\x04 \x01(\x0b\x32 .livekit.proto.DisconnectRequestH\x00\x12;\n\rpublish_track\x18\x05 \x01(\x0b\x32\".livekit.proto.PublishTrackRequestH\x00\x12?\n\x0funpublish_track\x18\x06 \x01(\x0b\x32$.livekit.proto.UnpublishTrackRequestH\x00\x12\x39\n\x0cpublish_data\x18\x07 \x01(\x0b\x32!.livekit.proto.PublishDataRequestH\x00\x12=\n\x0eset_subscribed\x18\x08 \x01(\x0b\x32#.livekit.proto.SetSubscribedRequestH\x00\x12\x44\n\x12set_local_metadata\x18\t \x01(\x0b\x32&.livekit.proto.SetLocalMetadataRequestH\x00\x12<\n\x0eset_local_name\x18\n \x01(\x0b\x32\".livekit.proto.SetLocalNameRequestH\x00\x12H\n\x14set_local_attributes\x18\x0b \x01(\x0b\x32(.livekit.proto.SetLocalAttributesRequestH\x00\x12\x42\n\x11get_session_stats\x18\x0c \x01(\x0b\x32%.livekit.proto.GetSessionStatsRequestH\x00\x12K\n\x15publish_transcription\x18\r \x01(\x0b\x32*.livekit.proto.PublishTranscriptionRequestH\x00\x12@\n\x10publish_sip_dtmf\x18\x0e \x01(\x0b\x32$.livekit.proto.PublishSipDtmfRequestH\x00\x12\x44\n\x12\x63reate_video_track\x18\x0f \x01(\x0b\x32&.livekit.proto.CreateVideoTrackRequestH\x00\x12\x44\n\x12\x63reate_audio_track\x18\x10 \x01(\x0b\x32&.livekit.proto.CreateAudioTrackRequestH\x00\x12@\n\x10local_track_mute\x18\x11 \x01(\x0b\x32$.livekit.proto.LocalTrackMuteRequestH\x00\x12\x46\n\x13\x65nable_remote_track\x18\x12 \x01(\x0b\x32\'.livekit.proto.EnableRemoteTrackRequestH\x00\x12\x33\n\tget_stats\x18\x13 \x01(\x0b\x32\x1e.livekit.proto.GetStatsRequestH\x00\x12@\n\x10new_video_stream\x18\x14 \x01(\x0b\x32$.livekit.proto.NewVideoStreamRequestH\x00\x12@\n\x10new_video_source\x18\x15 \x01(\x0b\x32$.livekit.proto.NewVideoSourceRequestH\x00\x12\x46\n\x13\x63\x61pture_video_frame\x18\x16 \x01(\x0b\x32\'.livekit.proto.CaptureVideoFrameRequestH\x00\x12;\n\rvideo_convert\x18\x17 \x01(\x0b\x32\".livekit.proto.VideoConvertRequestH\x00\x12Y\n\x1dvideo_stream_from_participant\x18\x18 \x01(\x0b\x32\x30.livekit.proto.VideoStreamFromParticipantRequestH\x00\x12@\n\x10new_audio_stream\x18\x19 \x01(\x0b\x32$.livekit.proto.NewAudioStreamRequestH\x00\x12@\n\x10new_audio_source\x18\x1a \x01(\x0b\x32$.livekit.proto.NewAudioSourceRequestH\x00\x12\x46\n\x13\x63\x61pture_audio_frame\x18\x1b \x01(\x0b\x32\'.livekit.proto.CaptureAudioFrameRequestH\x00\x12\x44\n\x12\x63lear_audio_buffer\x18\x1c \x01(\x0b\x32&.livekit.proto.ClearAudioBufferRequestH\x00\x12\x46\n\x13new_audio_resampler\x18\x1d \x01(\x0b\x32\'.livekit.proto.NewAudioResamplerRequestH\x00\x12\x44\n\x12remix_and_resample\x18\x1e \x01(\x0b\x32&.livekit.proto.RemixAndResampleRequestH\x00\x12*\n\x04\x65\x32\x65\x65\x18\x1f \x01(\x0b\x32\x1a.livekit.proto.E2eeRequestH\x00\x12Y\n\x1d\x61udio_stream_from_participant\x18 \x01(\x0b\x32\x30.livekit.proto.AudioStreamFromParticipantRequestH\x00\x12\x42\n\x11new_sox_resampler\x18! \x01(\x0b\x32%.livekit.proto.NewSoxResamplerRequestH\x00\x12\x44\n\x12push_sox_resampler\x18\" \x01(\x0b\x32&.livekit.proto.PushSoxResamplerRequestH\x00\x12\x46\n\x13\x66lush_sox_resampler\x18# \x01(\x0b\x32\'.livekit.proto.FlushSoxResamplerRequestH\x00\x12\x42\n\x11send_chat_message\x18$ \x01(\x0b\x32%.livekit.proto.SendChatMessageRequestH\x00\x12\x42\n\x11\x65\x64it_chat_message\x18% \x01(\x0b\x32%.livekit.proto.EditChatMessageRequestH\x00\x42\t\n\x07message\"\xdc\x12\n\x0b\x46\x66iResponse\x12\x31\n\x07\x64ispose\x18\x02 \x01(\x0b\x32\x1e.livekit.proto.DisposeResponseH\x00\x12\x31\n\x07\x63onnect\x18\x03 \x01(\x0b\x32\x1e.livekit.proto.ConnectResponseH\x00\x12\x37\n\ndisconnect\x18\x04 \x01(\x0b\x32!.livekit.proto.DisconnectResponseH\x00\x12<\n\rpublish_track\x18\x05 \x01(\x0b\x32#.livekit.proto.PublishTrackResponseH\x00\x12@\n\x0funpublish_track\x18\x06 \x01(\x0b\x32%.livekit.proto.UnpublishTrackResponseH\x00\x12:\n\x0cpublish_data\x18\x07 \x01(\x0b\x32\".livekit.proto.PublishDataResponseH\x00\x12>\n\x0eset_subscribed\x18\x08 \x01(\x0b\x32$.livekit.proto.SetSubscribedResponseH\x00\x12\x45\n\x12set_local_metadata\x18\t \x01(\x0b\x32\'.livekit.proto.SetLocalMetadataResponseH\x00\x12=\n\x0eset_local_name\x18\n \x01(\x0b\x32#.livekit.proto.SetLocalNameResponseH\x00\x12I\n\x14set_local_attributes\x18\x0b \x01(\x0b\x32).livekit.proto.SetLocalAttributesResponseH\x00\x12\x43\n\x11get_session_stats\x18\x0c \x01(\x0b\x32&.livekit.proto.GetSessionStatsResponseH\x00\x12L\n\x15publish_transcription\x18\r \x01(\x0b\x32+.livekit.proto.PublishTranscriptionResponseH\x00\x12\x41\n\x10publish_sip_dtmf\x18\x0e \x01(\x0b\x32%.livekit.proto.PublishSipDtmfResponseH\x00\x12\x45\n\x12\x63reate_video_track\x18\x0f \x01(\x0b\x32\'.livekit.proto.CreateVideoTrackResponseH\x00\x12\x45\n\x12\x63reate_audio_track\x18\x10 \x01(\x0b\x32\'.livekit.proto.CreateAudioTrackResponseH\x00\x12\x41\n\x10local_track_mute\x18\x11 \x01(\x0b\x32%.livekit.proto.LocalTrackMuteResponseH\x00\x12G\n\x13\x65nable_remote_track\x18\x12 \x01(\x0b\x32(.livekit.proto.EnableRemoteTrackResponseH\x00\x12\x34\n\tget_stats\x18\x13 \x01(\x0b\x32\x1f.livekit.proto.GetStatsResponseH\x00\x12\x41\n\x10new_video_stream\x18\x14 \x01(\x0b\x32%.livekit.proto.NewVideoStreamResponseH\x00\x12\x41\n\x10new_video_source\x18\x15 \x01(\x0b\x32%.livekit.proto.NewVideoSourceResponseH\x00\x12G\n\x13\x63\x61pture_video_frame\x18\x16 \x01(\x0b\x32(.livekit.proto.CaptureVideoFrameResponseH\x00\x12<\n\rvideo_convert\x18\x17 \x01(\x0b\x32#.livekit.proto.VideoConvertResponseH\x00\x12Z\n\x1dvideo_stream_from_participant\x18\x18 \x01(\x0b\x32\x31.livekit.proto.VideoStreamFromParticipantResponseH\x00\x12\x41\n\x10new_audio_stream\x18\x19 \x01(\x0b\x32%.livekit.proto.NewAudioStreamResponseH\x00\x12\x41\n\x10new_audio_source\x18\x1a \x01(\x0b\x32%.livekit.proto.NewAudioSourceResponseH\x00\x12G\n\x13\x63\x61pture_audio_frame\x18\x1b \x01(\x0b\x32(.livekit.proto.CaptureAudioFrameResponseH\x00\x12\x45\n\x12\x63lear_audio_buffer\x18\x1c \x01(\x0b\x32\'.livekit.proto.ClearAudioBufferResponseH\x00\x12G\n\x13new_audio_resampler\x18\x1d \x01(\x0b\x32(.livekit.proto.NewAudioResamplerResponseH\x00\x12\x45\n\x12remix_and_resample\x18\x1e \x01(\x0b\x32\'.livekit.proto.RemixAndResampleResponseH\x00\x12Z\n\x1d\x61udio_stream_from_participant\x18\x1f \x01(\x0b\x32\x31.livekit.proto.AudioStreamFromParticipantResponseH\x00\x12+\n\x04\x65\x32\x65\x65\x18 \x01(\x0b\x32\x1b.livekit.proto.E2eeResponseH\x00\x12\x43\n\x11new_sox_resampler\x18! \x01(\x0b\x32&.livekit.proto.NewSoxResamplerResponseH\x00\x12\x45\n\x12push_sox_resampler\x18\" \x01(\x0b\x32\'.livekit.proto.PushSoxResamplerResponseH\x00\x12G\n\x13\x66lush_sox_resampler\x18# \x01(\x0b\x32(.livekit.proto.FlushSoxResamplerResponseH\x00\x12\x43\n\x11send_chat_message\x18$ \x01(\x0b\x32&.livekit.proto.SendChatMessageResponseH\x00\x42\t\n\x07message\"\x86\n\n\x08\x46\x66iEvent\x12.\n\nroom_event\x18\x01 \x01(\x0b\x32\x18.livekit.proto.RoomEventH\x00\x12\x30\n\x0btrack_event\x18\x02 \x01(\x0b\x32\x19.livekit.proto.TrackEventH\x00\x12=\n\x12video_stream_event\x18\x03 \x01(\x0b\x32\x1f.livekit.proto.VideoStreamEventH\x00\x12=\n\x12\x61udio_stream_event\x18\x04 \x01(\x0b\x32\x1f.livekit.proto.AudioStreamEventH\x00\x12\x31\n\x07\x63onnect\x18\x05 \x01(\x0b\x32\x1e.livekit.proto.ConnectCallbackH\x00\x12\x37\n\ndisconnect\x18\x07 \x01(\x0b\x32!.livekit.proto.DisconnectCallbackH\x00\x12\x31\n\x07\x64ispose\x18\x08 \x01(\x0b\x32\x1e.livekit.proto.DisposeCallbackH\x00\x12<\n\rpublish_track\x18\t \x01(\x0b\x32#.livekit.proto.PublishTrackCallbackH\x00\x12@\n\x0funpublish_track\x18\n \x01(\x0b\x32%.livekit.proto.UnpublishTrackCallbackH\x00\x12:\n\x0cpublish_data\x18\x0b \x01(\x0b\x32\".livekit.proto.PublishDataCallbackH\x00\x12L\n\x15publish_transcription\x18\x0c \x01(\x0b\x32+.livekit.proto.PublishTranscriptionCallbackH\x00\x12G\n\x13\x63\x61pture_audio_frame\x18\r \x01(\x0b\x32(.livekit.proto.CaptureAudioFrameCallbackH\x00\x12\x45\n\x12set_local_metadata\x18\x0e \x01(\x0b\x32\'.livekit.proto.SetLocalMetadataCallbackH\x00\x12=\n\x0eset_local_name\x18\x0f \x01(\x0b\x32#.livekit.proto.SetLocalNameCallbackH\x00\x12I\n\x14set_local_attributes\x18\x10 \x01(\x0b\x32).livekit.proto.SetLocalAttributesCallbackH\x00\x12\x34\n\tget_stats\x18\x11 \x01(\x0b\x32\x1f.livekit.proto.GetStatsCallbackH\x00\x12\'\n\x04logs\x18\x12 \x01(\x0b\x32\x17.livekit.proto.LogBatchH\x00\x12\x43\n\x11get_session_stats\x18\x13 \x01(\x0b\x32&.livekit.proto.GetSessionStatsCallbackH\x00\x12%\n\x05panic\x18\x14 \x01(\x0b\x32\x14.livekit.proto.PanicH\x00\x12\x41\n\x10publish_sip_dtmf\x18\x15 \x01(\x0b\x32%.livekit.proto.PublishSipDtmfCallbackH\x00\x12>\n\x0c\x63hat_message\x18\x16 \x01(\x0b\x32&.livekit.proto.SendChatMessageCallbackH\x00\x42\t\n\x07message\"\x1f\n\x0e\x44isposeRequest\x12\r\n\x05\x61sync\x18\x01 \x02(\x08\"#\n\x0f\x44isposeResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"#\n\x0f\x44isposeCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\"\x85\x01\n\tLogRecord\x12&\n\x05level\x18\x01 \x02(\x0e\x32\x17.livekit.proto.LogLevel\x12\x0e\n\x06target\x18\x02 \x02(\t\x12\x13\n\x0bmodule_path\x18\x03 \x01(\t\x12\x0c\n\x04\x66ile\x18\x04 \x01(\t\x12\x0c\n\x04line\x18\x05 \x01(\r\x12\x0f\n\x07message\x18\x06 \x02(\t\"5\n\x08LogBatch\x12)\n\x07records\x18\x01 \x03(\x0b\x32\x18.livekit.proto.LogRecord\"\x18\n\x05Panic\x12\x0f\n\x07message\x18\x01 \x02(\t*S\n\x08LogLevel\x12\r\n\tLOG_ERROR\x10\x00\x12\x0c\n\x08LOG_WARN\x10\x01\x12\x0c\n\x08LOG_INFO\x10\x02\x12\r\n\tLOG_DEBUG\x10\x03\x12\r\n\tLOG_TRACE\x10\x04\x42\x10\xaa\x02\rLiveKit.Proto') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tffi.proto\x12\rlivekit.proto\x1a\ne2ee.proto\x1a\x0btrack.proto\x1a\nroom.proto\x1a\x11video_frame.proto\x1a\x11\x61udio_frame.proto\x1a\trpc.proto\"\xa6\x15\n\nFfiRequest\x12\x30\n\x07\x64ispose\x18\x02 \x01(\x0b\x32\x1d.livekit.proto.DisposeRequestH\x00\x12\x30\n\x07\x63onnect\x18\x03 \x01(\x0b\x32\x1d.livekit.proto.ConnectRequestH\x00\x12\x36\n\ndisconnect\x18\x04 \x01(\x0b\x32 .livekit.proto.DisconnectRequestH\x00\x12;\n\rpublish_track\x18\x05 \x01(\x0b\x32\".livekit.proto.PublishTrackRequestH\x00\x12?\n\x0funpublish_track\x18\x06 \x01(\x0b\x32$.livekit.proto.UnpublishTrackRequestH\x00\x12\x39\n\x0cpublish_data\x18\x07 \x01(\x0b\x32!.livekit.proto.PublishDataRequestH\x00\x12=\n\x0eset_subscribed\x18\x08 \x01(\x0b\x32#.livekit.proto.SetSubscribedRequestH\x00\x12\x44\n\x12set_local_metadata\x18\t \x01(\x0b\x32&.livekit.proto.SetLocalMetadataRequestH\x00\x12<\n\x0eset_local_name\x18\n \x01(\x0b\x32\".livekit.proto.SetLocalNameRequestH\x00\x12H\n\x14set_local_attributes\x18\x0b \x01(\x0b\x32(.livekit.proto.SetLocalAttributesRequestH\x00\x12\x42\n\x11get_session_stats\x18\x0c \x01(\x0b\x32%.livekit.proto.GetSessionStatsRequestH\x00\x12K\n\x15publish_transcription\x18\r \x01(\x0b\x32*.livekit.proto.PublishTranscriptionRequestH\x00\x12@\n\x10publish_sip_dtmf\x18\x0e \x01(\x0b\x32$.livekit.proto.PublishSipDtmfRequestH\x00\x12\x44\n\x12\x63reate_video_track\x18\x0f \x01(\x0b\x32&.livekit.proto.CreateVideoTrackRequestH\x00\x12\x44\n\x12\x63reate_audio_track\x18\x10 \x01(\x0b\x32&.livekit.proto.CreateAudioTrackRequestH\x00\x12@\n\x10local_track_mute\x18\x11 \x01(\x0b\x32$.livekit.proto.LocalTrackMuteRequestH\x00\x12\x46\n\x13\x65nable_remote_track\x18\x12 \x01(\x0b\x32\'.livekit.proto.EnableRemoteTrackRequestH\x00\x12\x33\n\tget_stats\x18\x13 \x01(\x0b\x32\x1e.livekit.proto.GetStatsRequestH\x00\x12@\n\x10new_video_stream\x18\x14 \x01(\x0b\x32$.livekit.proto.NewVideoStreamRequestH\x00\x12@\n\x10new_video_source\x18\x15 \x01(\x0b\x32$.livekit.proto.NewVideoSourceRequestH\x00\x12\x46\n\x13\x63\x61pture_video_frame\x18\x16 \x01(\x0b\x32\'.livekit.proto.CaptureVideoFrameRequestH\x00\x12;\n\rvideo_convert\x18\x17 \x01(\x0b\x32\".livekit.proto.VideoConvertRequestH\x00\x12Y\n\x1dvideo_stream_from_participant\x18\x18 \x01(\x0b\x32\x30.livekit.proto.VideoStreamFromParticipantRequestH\x00\x12@\n\x10new_audio_stream\x18\x19 \x01(\x0b\x32$.livekit.proto.NewAudioStreamRequestH\x00\x12@\n\x10new_audio_source\x18\x1a \x01(\x0b\x32$.livekit.proto.NewAudioSourceRequestH\x00\x12\x46\n\x13\x63\x61pture_audio_frame\x18\x1b \x01(\x0b\x32\'.livekit.proto.CaptureAudioFrameRequestH\x00\x12\x44\n\x12\x63lear_audio_buffer\x18\x1c \x01(\x0b\x32&.livekit.proto.ClearAudioBufferRequestH\x00\x12\x46\n\x13new_audio_resampler\x18\x1d \x01(\x0b\x32\'.livekit.proto.NewAudioResamplerRequestH\x00\x12\x44\n\x12remix_and_resample\x18\x1e \x01(\x0b\x32&.livekit.proto.RemixAndResampleRequestH\x00\x12*\n\x04\x65\x32\x65\x65\x18\x1f \x01(\x0b\x32\x1a.livekit.proto.E2eeRequestH\x00\x12Y\n\x1d\x61udio_stream_from_participant\x18 \x01(\x0b\x32\x30.livekit.proto.AudioStreamFromParticipantRequestH\x00\x12\x42\n\x11new_sox_resampler\x18! \x01(\x0b\x32%.livekit.proto.NewSoxResamplerRequestH\x00\x12\x44\n\x12push_sox_resampler\x18\" \x01(\x0b\x32&.livekit.proto.PushSoxResamplerRequestH\x00\x12\x46\n\x13\x66lush_sox_resampler\x18# \x01(\x0b\x32\'.livekit.proto.FlushSoxResamplerRequestH\x00\x12\x42\n\x11send_chat_message\x18$ \x01(\x0b\x32%.livekit.proto.SendChatMessageRequestH\x00\x12\x42\n\x11\x65\x64it_chat_message\x18% \x01(\x0b\x32%.livekit.proto.EditChatMessageRequestH\x00\x12\x37\n\x0bperform_rpc\x18& \x01(\x0b\x32 .livekit.proto.PerformRpcRequestH\x00\x12\x46\n\x13register_rpc_method\x18\' \x01(\x0b\x32\'.livekit.proto.RegisterRpcMethodRequestH\x00\x12J\n\x15unregister_rpc_method\x18( \x01(\x0b\x32).livekit.proto.UnregisterRpcMethodRequestH\x00\x12[\n\x1erpc_method_invocation_response\x18) \x01(\x0b\x32\x31.livekit.proto.RpcMethodInvocationResponseRequestH\x00\x42\t\n\x07message\"\x8a\x15\n\x0b\x46\x66iResponse\x12\x31\n\x07\x64ispose\x18\x02 \x01(\x0b\x32\x1e.livekit.proto.DisposeResponseH\x00\x12\x31\n\x07\x63onnect\x18\x03 \x01(\x0b\x32\x1e.livekit.proto.ConnectResponseH\x00\x12\x37\n\ndisconnect\x18\x04 \x01(\x0b\x32!.livekit.proto.DisconnectResponseH\x00\x12<\n\rpublish_track\x18\x05 \x01(\x0b\x32#.livekit.proto.PublishTrackResponseH\x00\x12@\n\x0funpublish_track\x18\x06 \x01(\x0b\x32%.livekit.proto.UnpublishTrackResponseH\x00\x12:\n\x0cpublish_data\x18\x07 \x01(\x0b\x32\".livekit.proto.PublishDataResponseH\x00\x12>\n\x0eset_subscribed\x18\x08 \x01(\x0b\x32$.livekit.proto.SetSubscribedResponseH\x00\x12\x45\n\x12set_local_metadata\x18\t \x01(\x0b\x32\'.livekit.proto.SetLocalMetadataResponseH\x00\x12=\n\x0eset_local_name\x18\n \x01(\x0b\x32#.livekit.proto.SetLocalNameResponseH\x00\x12I\n\x14set_local_attributes\x18\x0b \x01(\x0b\x32).livekit.proto.SetLocalAttributesResponseH\x00\x12\x43\n\x11get_session_stats\x18\x0c \x01(\x0b\x32&.livekit.proto.GetSessionStatsResponseH\x00\x12L\n\x15publish_transcription\x18\r \x01(\x0b\x32+.livekit.proto.PublishTranscriptionResponseH\x00\x12\x41\n\x10publish_sip_dtmf\x18\x0e \x01(\x0b\x32%.livekit.proto.PublishSipDtmfResponseH\x00\x12\x45\n\x12\x63reate_video_track\x18\x0f \x01(\x0b\x32\'.livekit.proto.CreateVideoTrackResponseH\x00\x12\x45\n\x12\x63reate_audio_track\x18\x10 \x01(\x0b\x32\'.livekit.proto.CreateAudioTrackResponseH\x00\x12\x41\n\x10local_track_mute\x18\x11 \x01(\x0b\x32%.livekit.proto.LocalTrackMuteResponseH\x00\x12G\n\x13\x65nable_remote_track\x18\x12 \x01(\x0b\x32(.livekit.proto.EnableRemoteTrackResponseH\x00\x12\x34\n\tget_stats\x18\x13 \x01(\x0b\x32\x1f.livekit.proto.GetStatsResponseH\x00\x12\x41\n\x10new_video_stream\x18\x14 \x01(\x0b\x32%.livekit.proto.NewVideoStreamResponseH\x00\x12\x41\n\x10new_video_source\x18\x15 \x01(\x0b\x32%.livekit.proto.NewVideoSourceResponseH\x00\x12G\n\x13\x63\x61pture_video_frame\x18\x16 \x01(\x0b\x32(.livekit.proto.CaptureVideoFrameResponseH\x00\x12<\n\rvideo_convert\x18\x17 \x01(\x0b\x32#.livekit.proto.VideoConvertResponseH\x00\x12Z\n\x1dvideo_stream_from_participant\x18\x18 \x01(\x0b\x32\x31.livekit.proto.VideoStreamFromParticipantResponseH\x00\x12\x41\n\x10new_audio_stream\x18\x19 \x01(\x0b\x32%.livekit.proto.NewAudioStreamResponseH\x00\x12\x41\n\x10new_audio_source\x18\x1a \x01(\x0b\x32%.livekit.proto.NewAudioSourceResponseH\x00\x12G\n\x13\x63\x61pture_audio_frame\x18\x1b \x01(\x0b\x32(.livekit.proto.CaptureAudioFrameResponseH\x00\x12\x45\n\x12\x63lear_audio_buffer\x18\x1c \x01(\x0b\x32\'.livekit.proto.ClearAudioBufferResponseH\x00\x12G\n\x13new_audio_resampler\x18\x1d \x01(\x0b\x32(.livekit.proto.NewAudioResamplerResponseH\x00\x12\x45\n\x12remix_and_resample\x18\x1e \x01(\x0b\x32\'.livekit.proto.RemixAndResampleResponseH\x00\x12Z\n\x1d\x61udio_stream_from_participant\x18\x1f \x01(\x0b\x32\x31.livekit.proto.AudioStreamFromParticipantResponseH\x00\x12+\n\x04\x65\x32\x65\x65\x18 \x01(\x0b\x32\x1b.livekit.proto.E2eeResponseH\x00\x12\x43\n\x11new_sox_resampler\x18! \x01(\x0b\x32&.livekit.proto.NewSoxResamplerResponseH\x00\x12\x45\n\x12push_sox_resampler\x18\" \x01(\x0b\x32\'.livekit.proto.PushSoxResamplerResponseH\x00\x12G\n\x13\x66lush_sox_resampler\x18# \x01(\x0b\x32(.livekit.proto.FlushSoxResamplerResponseH\x00\x12\x43\n\x11send_chat_message\x18$ \x01(\x0b\x32&.livekit.proto.SendChatMessageResponseH\x00\x12\x38\n\x0bperform_rpc\x18% \x01(\x0b\x32!.livekit.proto.PerformRpcResponseH\x00\x12G\n\x13register_rpc_method\x18& \x01(\x0b\x32(.livekit.proto.RegisterRpcMethodResponseH\x00\x12K\n\x15unregister_rpc_method\x18\' \x01(\x0b\x32*.livekit.proto.UnregisterRpcMethodResponseH\x00\x12\\\n\x1erpc_method_invocation_response\x18( \x01(\x0b\x32\x32.livekit.proto.RpcMethodInvocationResponseResponseH\x00\x42\t\n\x07message\"\xfe\x0c\n\x08\x46\x66iEvent\x12.\n\nroom_event\x18\x01 \x01(\x0b\x32\x18.livekit.proto.RoomEventH\x00\x12\x30\n\x0btrack_event\x18\x02 \x01(\x0b\x32\x19.livekit.proto.TrackEventH\x00\x12=\n\x12video_stream_event\x18\x03 \x01(\x0b\x32\x1f.livekit.proto.VideoStreamEventH\x00\x12=\n\x12\x61udio_stream_event\x18\x04 \x01(\x0b\x32\x1f.livekit.proto.AudioStreamEventH\x00\x12\x31\n\x07\x63onnect\x18\x05 \x01(\x0b\x32\x1e.livekit.proto.ConnectCallbackH\x00\x12\x37\n\ndisconnect\x18\x07 \x01(\x0b\x32!.livekit.proto.DisconnectCallbackH\x00\x12\x31\n\x07\x64ispose\x18\x08 \x01(\x0b\x32\x1e.livekit.proto.DisposeCallbackH\x00\x12<\n\rpublish_track\x18\t \x01(\x0b\x32#.livekit.proto.PublishTrackCallbackH\x00\x12@\n\x0funpublish_track\x18\n \x01(\x0b\x32%.livekit.proto.UnpublishTrackCallbackH\x00\x12:\n\x0cpublish_data\x18\x0b \x01(\x0b\x32\".livekit.proto.PublishDataCallbackH\x00\x12L\n\x15publish_transcription\x18\x0c \x01(\x0b\x32+.livekit.proto.PublishTranscriptionCallbackH\x00\x12G\n\x13\x63\x61pture_audio_frame\x18\r \x01(\x0b\x32(.livekit.proto.CaptureAudioFrameCallbackH\x00\x12\x45\n\x12set_local_metadata\x18\x0e \x01(\x0b\x32\'.livekit.proto.SetLocalMetadataCallbackH\x00\x12=\n\x0eset_local_name\x18\x0f \x01(\x0b\x32#.livekit.proto.SetLocalNameCallbackH\x00\x12I\n\x14set_local_attributes\x18\x10 \x01(\x0b\x32).livekit.proto.SetLocalAttributesCallbackH\x00\x12\x34\n\tget_stats\x18\x11 \x01(\x0b\x32\x1f.livekit.proto.GetStatsCallbackH\x00\x12\'\n\x04logs\x18\x12 \x01(\x0b\x32\x17.livekit.proto.LogBatchH\x00\x12\x43\n\x11get_session_stats\x18\x13 \x01(\x0b\x32&.livekit.proto.GetSessionStatsCallbackH\x00\x12%\n\x05panic\x18\x14 \x01(\x0b\x32\x14.livekit.proto.PanicH\x00\x12\x41\n\x10publish_sip_dtmf\x18\x15 \x01(\x0b\x32%.livekit.proto.PublishSipDtmfCallbackH\x00\x12>\n\x0c\x63hat_message\x18\x16 \x01(\x0b\x32&.livekit.proto.SendChatMessageCallbackH\x00\x12\x38\n\x0bperform_rpc\x18\x17 \x01(\x0b\x32!.livekit.proto.PerformRpcCallbackH\x00\x12G\n\x13register_rpc_method\x18\x18 \x01(\x0b\x32(.livekit.proto.RegisterRpcMethodCallbackH\x00\x12K\n\x15unregister_rpc_method\x18\x19 \x01(\x0b\x32*.livekit.proto.UnregisterRpcMethodCallbackH\x00\x12H\n\x15rpc_method_invocation\x18\x1a \x01(\x0b\x32\'.livekit.proto.RpcMethodInvocationEventH\x00\x12\\\n\x1erpc_method_invocation_response\x18\x1b \x01(\x0b\x32\x32.livekit.proto.RpcMethodInvocationResponseCallbackH\x00\x42\t\n\x07message\"\x1f\n\x0e\x44isposeRequest\x12\r\n\x05\x61sync\x18\x01 \x02(\x08\"#\n\x0f\x44isposeResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"#\n\x0f\x44isposeCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\"\x85\x01\n\tLogRecord\x12&\n\x05level\x18\x01 \x02(\x0e\x32\x17.livekit.proto.LogLevel\x12\x0e\n\x06target\x18\x02 \x02(\t\x12\x13\n\x0bmodule_path\x18\x03 \x01(\t\x12\x0c\n\x04\x66ile\x18\x04 \x01(\t\x12\x0c\n\x04line\x18\x05 \x01(\r\x12\x0f\n\x07message\x18\x06 \x02(\t\"5\n\x08LogBatch\x12)\n\x07records\x18\x01 \x03(\x0b\x32\x18.livekit.proto.LogRecord\"\x18\n\x05Panic\x12\x0f\n\x07message\x18\x01 \x02(\t*S\n\x08LogLevel\x12\r\n\tLOG_ERROR\x10\x00\x12\x0c\n\x08LOG_WARN\x10\x01\x12\x0c\n\x08LOG_INFO\x10\x02\x12\r\n\tLOG_DEBUG\x10\x03\x12\r\n\tLOG_TRACE\x10\x04\x42\x10\xaa\x02\rLiveKit.Proto') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -37,24 +38,24 @@ if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' - _globals['_LOGLEVEL']._serialized_start=6546 - _globals['_LOGLEVEL']._serialized_end=6629 - _globals['_FFIREQUEST']._serialized_start=104 - _globals['_FFIREQUEST']._serialized_end=2532 - _globals['_FFIRESPONSE']._serialized_start=2535 - _globals['_FFIRESPONSE']._serialized_end=4931 - _globals['_FFIEVENT']._serialized_start=4934 - _globals['_FFIEVENT']._serialized_end=6220 - _globals['_DISPOSEREQUEST']._serialized_start=6222 - _globals['_DISPOSEREQUEST']._serialized_end=6253 - _globals['_DISPOSERESPONSE']._serialized_start=6255 - _globals['_DISPOSERESPONSE']._serialized_end=6290 - _globals['_DISPOSECALLBACK']._serialized_start=6292 - _globals['_DISPOSECALLBACK']._serialized_end=6327 - _globals['_LOGRECORD']._serialized_start=6330 - _globals['_LOGRECORD']._serialized_end=6463 - _globals['_LOGBATCH']._serialized_start=6465 - _globals['_LOGBATCH']._serialized_end=6518 - _globals['_PANIC']._serialized_start=6520 - _globals['_PANIC']._serialized_end=6544 + _globals['_LOGLEVEL']._serialized_start=7533 + _globals['_LOGLEVEL']._serialized_end=7616 + _globals['_FFIREQUEST']._serialized_start=115 + _globals['_FFIREQUEST']._serialized_end=2841 + _globals['_FFIRESPONSE']._serialized_start=2844 + _globals['_FFIRESPONSE']._serialized_end=5542 + _globals['_FFIEVENT']._serialized_start=5545 + _globals['_FFIEVENT']._serialized_end=7207 + _globals['_DISPOSEREQUEST']._serialized_start=7209 + _globals['_DISPOSEREQUEST']._serialized_end=7240 + _globals['_DISPOSERESPONSE']._serialized_start=7242 + _globals['_DISPOSERESPONSE']._serialized_end=7277 + _globals['_DISPOSECALLBACK']._serialized_start=7279 + _globals['_DISPOSECALLBACK']._serialized_end=7314 + _globals['_LOGRECORD']._serialized_start=7317 + _globals['_LOGRECORD']._serialized_end=7450 + _globals['_LOGBATCH']._serialized_start=7452 + _globals['_LOGBATCH']._serialized_end=7505 + _globals['_PANIC']._serialized_start=7507 + _globals['_PANIC']._serialized_end=7531 # @@protoc_insertion_point(module_scope) diff --git a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi index a386c82b..ecdccac4 100644 --- a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi +++ b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi @@ -10,6 +10,7 @@ import google.protobuf.internal.containers import google.protobuf.internal.enum_type_wrapper import google.protobuf.message from . import room_pb2 +from . import rpc_pb2 from . import track_pb2 import typing import typing_extensions @@ -105,6 +106,10 @@ class FfiRequest(google.protobuf.message.Message): FLUSH_SOX_RESAMPLER_FIELD_NUMBER: builtins.int SEND_CHAT_MESSAGE_FIELD_NUMBER: builtins.int EDIT_CHAT_MESSAGE_FIELD_NUMBER: builtins.int + PERFORM_RPC_FIELD_NUMBER: builtins.int + REGISTER_RPC_METHOD_FIELD_NUMBER: builtins.int + UNREGISTER_RPC_METHOD_FIELD_NUMBER: builtins.int + RPC_METHOD_INVOCATION_RESPONSE_FIELD_NUMBER: builtins.int @property def dispose(self) -> global___DisposeRequest: ... @property @@ -185,6 +190,16 @@ class FfiRequest(google.protobuf.message.Message): def send_chat_message(self) -> room_pb2.SendChatMessageRequest: ... @property def edit_chat_message(self) -> room_pb2.EditChatMessageRequest: ... + @property + def perform_rpc(self) -> rpc_pb2.PerformRpcRequest: + """RPC""" + pass + @property + def register_rpc_method(self) -> rpc_pb2.RegisterRpcMethodRequest: ... + @property + def unregister_rpc_method(self) -> rpc_pb2.UnregisterRpcMethodRequest: ... + @property + def rpc_method_invocation_response(self) -> rpc_pb2.RpcMethodInvocationResponseRequest: ... def __init__(self, *, dispose: typing.Optional[global___DisposeRequest] = ..., @@ -223,10 +238,14 @@ class FfiRequest(google.protobuf.message.Message): flush_sox_resampler: typing.Optional[audio_frame_pb2.FlushSoxResamplerRequest] = ..., send_chat_message: typing.Optional[room_pb2.SendChatMessageRequest] = ..., edit_chat_message: typing.Optional[room_pb2.EditChatMessageRequest] = ..., + perform_rpc: typing.Optional[rpc_pb2.PerformRpcRequest] = ..., + register_rpc_method: typing.Optional[rpc_pb2.RegisterRpcMethodRequest] = ..., + unregister_rpc_method: typing.Optional[rpc_pb2.UnregisterRpcMethodRequest] = ..., + rpc_method_invocation_response: typing.Optional[rpc_pb2.RpcMethodInvocationResponseRequest] = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["audio_stream_from_participant",b"audio_stream_from_participant","capture_audio_frame",b"capture_audio_frame","capture_video_frame",b"capture_video_frame","clear_audio_buffer",b"clear_audio_buffer","connect",b"connect","create_audio_track",b"create_audio_track","create_video_track",b"create_video_track","disconnect",b"disconnect","dispose",b"dispose","e2ee",b"e2ee","edit_chat_message",b"edit_chat_message","enable_remote_track",b"enable_remote_track","flush_sox_resampler",b"flush_sox_resampler","get_session_stats",b"get_session_stats","get_stats",b"get_stats","local_track_mute",b"local_track_mute","message",b"message","new_audio_resampler",b"new_audio_resampler","new_audio_source",b"new_audio_source","new_audio_stream",b"new_audio_stream","new_sox_resampler",b"new_sox_resampler","new_video_source",b"new_video_source","new_video_stream",b"new_video_stream","publish_data",b"publish_data","publish_sip_dtmf",b"publish_sip_dtmf","publish_track",b"publish_track","publish_transcription",b"publish_transcription","push_sox_resampler",b"push_sox_resampler","remix_and_resample",b"remix_and_resample","send_chat_message",b"send_chat_message","set_local_attributes",b"set_local_attributes","set_local_metadata",b"set_local_metadata","set_local_name",b"set_local_name","set_subscribed",b"set_subscribed","unpublish_track",b"unpublish_track","video_convert",b"video_convert","video_stream_from_participant",b"video_stream_from_participant"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["audio_stream_from_participant",b"audio_stream_from_participant","capture_audio_frame",b"capture_audio_frame","capture_video_frame",b"capture_video_frame","clear_audio_buffer",b"clear_audio_buffer","connect",b"connect","create_audio_track",b"create_audio_track","create_video_track",b"create_video_track","disconnect",b"disconnect","dispose",b"dispose","e2ee",b"e2ee","edit_chat_message",b"edit_chat_message","enable_remote_track",b"enable_remote_track","flush_sox_resampler",b"flush_sox_resampler","get_session_stats",b"get_session_stats","get_stats",b"get_stats","local_track_mute",b"local_track_mute","message",b"message","new_audio_resampler",b"new_audio_resampler","new_audio_source",b"new_audio_source","new_audio_stream",b"new_audio_stream","new_sox_resampler",b"new_sox_resampler","new_video_source",b"new_video_source","new_video_stream",b"new_video_stream","publish_data",b"publish_data","publish_sip_dtmf",b"publish_sip_dtmf","publish_track",b"publish_track","publish_transcription",b"publish_transcription","push_sox_resampler",b"push_sox_resampler","remix_and_resample",b"remix_and_resample","send_chat_message",b"send_chat_message","set_local_attributes",b"set_local_attributes","set_local_metadata",b"set_local_metadata","set_local_name",b"set_local_name","set_subscribed",b"set_subscribed","unpublish_track",b"unpublish_track","video_convert",b"video_convert","video_stream_from_participant",b"video_stream_from_participant"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["message",b"message"]) -> typing.Optional[typing_extensions.Literal["dispose","connect","disconnect","publish_track","unpublish_track","publish_data","set_subscribed","set_local_metadata","set_local_name","set_local_attributes","get_session_stats","publish_transcription","publish_sip_dtmf","create_video_track","create_audio_track","local_track_mute","enable_remote_track","get_stats","new_video_stream","new_video_source","capture_video_frame","video_convert","video_stream_from_participant","new_audio_stream","new_audio_source","capture_audio_frame","clear_audio_buffer","new_audio_resampler","remix_and_resample","e2ee","audio_stream_from_participant","new_sox_resampler","push_sox_resampler","flush_sox_resampler","send_chat_message","edit_chat_message"]]: ... + def HasField(self, field_name: typing_extensions.Literal["audio_stream_from_participant",b"audio_stream_from_participant","capture_audio_frame",b"capture_audio_frame","capture_video_frame",b"capture_video_frame","clear_audio_buffer",b"clear_audio_buffer","connect",b"connect","create_audio_track",b"create_audio_track","create_video_track",b"create_video_track","disconnect",b"disconnect","dispose",b"dispose","e2ee",b"e2ee","edit_chat_message",b"edit_chat_message","enable_remote_track",b"enable_remote_track","flush_sox_resampler",b"flush_sox_resampler","get_session_stats",b"get_session_stats","get_stats",b"get_stats","local_track_mute",b"local_track_mute","message",b"message","new_audio_resampler",b"new_audio_resampler","new_audio_source",b"new_audio_source","new_audio_stream",b"new_audio_stream","new_sox_resampler",b"new_sox_resampler","new_video_source",b"new_video_source","new_video_stream",b"new_video_stream","perform_rpc",b"perform_rpc","publish_data",b"publish_data","publish_sip_dtmf",b"publish_sip_dtmf","publish_track",b"publish_track","publish_transcription",b"publish_transcription","push_sox_resampler",b"push_sox_resampler","register_rpc_method",b"register_rpc_method","remix_and_resample",b"remix_and_resample","rpc_method_invocation_response",b"rpc_method_invocation_response","send_chat_message",b"send_chat_message","set_local_attributes",b"set_local_attributes","set_local_metadata",b"set_local_metadata","set_local_name",b"set_local_name","set_subscribed",b"set_subscribed","unpublish_track",b"unpublish_track","unregister_rpc_method",b"unregister_rpc_method","video_convert",b"video_convert","video_stream_from_participant",b"video_stream_from_participant"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["audio_stream_from_participant",b"audio_stream_from_participant","capture_audio_frame",b"capture_audio_frame","capture_video_frame",b"capture_video_frame","clear_audio_buffer",b"clear_audio_buffer","connect",b"connect","create_audio_track",b"create_audio_track","create_video_track",b"create_video_track","disconnect",b"disconnect","dispose",b"dispose","e2ee",b"e2ee","edit_chat_message",b"edit_chat_message","enable_remote_track",b"enable_remote_track","flush_sox_resampler",b"flush_sox_resampler","get_session_stats",b"get_session_stats","get_stats",b"get_stats","local_track_mute",b"local_track_mute","message",b"message","new_audio_resampler",b"new_audio_resampler","new_audio_source",b"new_audio_source","new_audio_stream",b"new_audio_stream","new_sox_resampler",b"new_sox_resampler","new_video_source",b"new_video_source","new_video_stream",b"new_video_stream","perform_rpc",b"perform_rpc","publish_data",b"publish_data","publish_sip_dtmf",b"publish_sip_dtmf","publish_track",b"publish_track","publish_transcription",b"publish_transcription","push_sox_resampler",b"push_sox_resampler","register_rpc_method",b"register_rpc_method","remix_and_resample",b"remix_and_resample","rpc_method_invocation_response",b"rpc_method_invocation_response","send_chat_message",b"send_chat_message","set_local_attributes",b"set_local_attributes","set_local_metadata",b"set_local_metadata","set_local_name",b"set_local_name","set_subscribed",b"set_subscribed","unpublish_track",b"unpublish_track","unregister_rpc_method",b"unregister_rpc_method","video_convert",b"video_convert","video_stream_from_participant",b"video_stream_from_participant"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["message",b"message"]) -> typing.Optional[typing_extensions.Literal["dispose","connect","disconnect","publish_track","unpublish_track","publish_data","set_subscribed","set_local_metadata","set_local_name","set_local_attributes","get_session_stats","publish_transcription","publish_sip_dtmf","create_video_track","create_audio_track","local_track_mute","enable_remote_track","get_stats","new_video_stream","new_video_source","capture_video_frame","video_convert","video_stream_from_participant","new_audio_stream","new_audio_source","capture_audio_frame","clear_audio_buffer","new_audio_resampler","remix_and_resample","e2ee","audio_stream_from_participant","new_sox_resampler","push_sox_resampler","flush_sox_resampler","send_chat_message","edit_chat_message","perform_rpc","register_rpc_method","unregister_rpc_method","rpc_method_invocation_response"]]: ... global___FfiRequest = FfiRequest class FfiResponse(google.protobuf.message.Message): @@ -267,6 +286,10 @@ class FfiResponse(google.protobuf.message.Message): PUSH_SOX_RESAMPLER_FIELD_NUMBER: builtins.int FLUSH_SOX_RESAMPLER_FIELD_NUMBER: builtins.int SEND_CHAT_MESSAGE_FIELD_NUMBER: builtins.int + PERFORM_RPC_FIELD_NUMBER: builtins.int + REGISTER_RPC_METHOD_FIELD_NUMBER: builtins.int + UNREGISTER_RPC_METHOD_FIELD_NUMBER: builtins.int + RPC_METHOD_INVOCATION_RESPONSE_FIELD_NUMBER: builtins.int @property def dispose(self) -> global___DisposeResponse: ... @property @@ -345,6 +368,16 @@ class FfiResponse(google.protobuf.message.Message): def flush_sox_resampler(self) -> audio_frame_pb2.FlushSoxResamplerResponse: ... @property def send_chat_message(self) -> room_pb2.SendChatMessageResponse: ... + @property + def perform_rpc(self) -> rpc_pb2.PerformRpcResponse: + """RPC""" + pass + @property + def register_rpc_method(self) -> rpc_pb2.RegisterRpcMethodResponse: ... + @property + def unregister_rpc_method(self) -> rpc_pb2.UnregisterRpcMethodResponse: ... + @property + def rpc_method_invocation_response(self) -> rpc_pb2.RpcMethodInvocationResponseResponse: ... def __init__(self, *, dispose: typing.Optional[global___DisposeResponse] = ..., @@ -382,10 +415,14 @@ class FfiResponse(google.protobuf.message.Message): push_sox_resampler: typing.Optional[audio_frame_pb2.PushSoxResamplerResponse] = ..., flush_sox_resampler: typing.Optional[audio_frame_pb2.FlushSoxResamplerResponse] = ..., send_chat_message: typing.Optional[room_pb2.SendChatMessageResponse] = ..., + perform_rpc: typing.Optional[rpc_pb2.PerformRpcResponse] = ..., + register_rpc_method: typing.Optional[rpc_pb2.RegisterRpcMethodResponse] = ..., + unregister_rpc_method: typing.Optional[rpc_pb2.UnregisterRpcMethodResponse] = ..., + rpc_method_invocation_response: typing.Optional[rpc_pb2.RpcMethodInvocationResponseResponse] = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["audio_stream_from_participant",b"audio_stream_from_participant","capture_audio_frame",b"capture_audio_frame","capture_video_frame",b"capture_video_frame","clear_audio_buffer",b"clear_audio_buffer","connect",b"connect","create_audio_track",b"create_audio_track","create_video_track",b"create_video_track","disconnect",b"disconnect","dispose",b"dispose","e2ee",b"e2ee","enable_remote_track",b"enable_remote_track","flush_sox_resampler",b"flush_sox_resampler","get_session_stats",b"get_session_stats","get_stats",b"get_stats","local_track_mute",b"local_track_mute","message",b"message","new_audio_resampler",b"new_audio_resampler","new_audio_source",b"new_audio_source","new_audio_stream",b"new_audio_stream","new_sox_resampler",b"new_sox_resampler","new_video_source",b"new_video_source","new_video_stream",b"new_video_stream","publish_data",b"publish_data","publish_sip_dtmf",b"publish_sip_dtmf","publish_track",b"publish_track","publish_transcription",b"publish_transcription","push_sox_resampler",b"push_sox_resampler","remix_and_resample",b"remix_and_resample","send_chat_message",b"send_chat_message","set_local_attributes",b"set_local_attributes","set_local_metadata",b"set_local_metadata","set_local_name",b"set_local_name","set_subscribed",b"set_subscribed","unpublish_track",b"unpublish_track","video_convert",b"video_convert","video_stream_from_participant",b"video_stream_from_participant"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["audio_stream_from_participant",b"audio_stream_from_participant","capture_audio_frame",b"capture_audio_frame","capture_video_frame",b"capture_video_frame","clear_audio_buffer",b"clear_audio_buffer","connect",b"connect","create_audio_track",b"create_audio_track","create_video_track",b"create_video_track","disconnect",b"disconnect","dispose",b"dispose","e2ee",b"e2ee","enable_remote_track",b"enable_remote_track","flush_sox_resampler",b"flush_sox_resampler","get_session_stats",b"get_session_stats","get_stats",b"get_stats","local_track_mute",b"local_track_mute","message",b"message","new_audio_resampler",b"new_audio_resampler","new_audio_source",b"new_audio_source","new_audio_stream",b"new_audio_stream","new_sox_resampler",b"new_sox_resampler","new_video_source",b"new_video_source","new_video_stream",b"new_video_stream","publish_data",b"publish_data","publish_sip_dtmf",b"publish_sip_dtmf","publish_track",b"publish_track","publish_transcription",b"publish_transcription","push_sox_resampler",b"push_sox_resampler","remix_and_resample",b"remix_and_resample","send_chat_message",b"send_chat_message","set_local_attributes",b"set_local_attributes","set_local_metadata",b"set_local_metadata","set_local_name",b"set_local_name","set_subscribed",b"set_subscribed","unpublish_track",b"unpublish_track","video_convert",b"video_convert","video_stream_from_participant",b"video_stream_from_participant"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["message",b"message"]) -> typing.Optional[typing_extensions.Literal["dispose","connect","disconnect","publish_track","unpublish_track","publish_data","set_subscribed","set_local_metadata","set_local_name","set_local_attributes","get_session_stats","publish_transcription","publish_sip_dtmf","create_video_track","create_audio_track","local_track_mute","enable_remote_track","get_stats","new_video_stream","new_video_source","capture_video_frame","video_convert","video_stream_from_participant","new_audio_stream","new_audio_source","capture_audio_frame","clear_audio_buffer","new_audio_resampler","remix_and_resample","audio_stream_from_participant","e2ee","new_sox_resampler","push_sox_resampler","flush_sox_resampler","send_chat_message"]]: ... + def HasField(self, field_name: typing_extensions.Literal["audio_stream_from_participant",b"audio_stream_from_participant","capture_audio_frame",b"capture_audio_frame","capture_video_frame",b"capture_video_frame","clear_audio_buffer",b"clear_audio_buffer","connect",b"connect","create_audio_track",b"create_audio_track","create_video_track",b"create_video_track","disconnect",b"disconnect","dispose",b"dispose","e2ee",b"e2ee","enable_remote_track",b"enable_remote_track","flush_sox_resampler",b"flush_sox_resampler","get_session_stats",b"get_session_stats","get_stats",b"get_stats","local_track_mute",b"local_track_mute","message",b"message","new_audio_resampler",b"new_audio_resampler","new_audio_source",b"new_audio_source","new_audio_stream",b"new_audio_stream","new_sox_resampler",b"new_sox_resampler","new_video_source",b"new_video_source","new_video_stream",b"new_video_stream","perform_rpc",b"perform_rpc","publish_data",b"publish_data","publish_sip_dtmf",b"publish_sip_dtmf","publish_track",b"publish_track","publish_transcription",b"publish_transcription","push_sox_resampler",b"push_sox_resampler","register_rpc_method",b"register_rpc_method","remix_and_resample",b"remix_and_resample","rpc_method_invocation_response",b"rpc_method_invocation_response","send_chat_message",b"send_chat_message","set_local_attributes",b"set_local_attributes","set_local_metadata",b"set_local_metadata","set_local_name",b"set_local_name","set_subscribed",b"set_subscribed","unpublish_track",b"unpublish_track","unregister_rpc_method",b"unregister_rpc_method","video_convert",b"video_convert","video_stream_from_participant",b"video_stream_from_participant"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["audio_stream_from_participant",b"audio_stream_from_participant","capture_audio_frame",b"capture_audio_frame","capture_video_frame",b"capture_video_frame","clear_audio_buffer",b"clear_audio_buffer","connect",b"connect","create_audio_track",b"create_audio_track","create_video_track",b"create_video_track","disconnect",b"disconnect","dispose",b"dispose","e2ee",b"e2ee","enable_remote_track",b"enable_remote_track","flush_sox_resampler",b"flush_sox_resampler","get_session_stats",b"get_session_stats","get_stats",b"get_stats","local_track_mute",b"local_track_mute","message",b"message","new_audio_resampler",b"new_audio_resampler","new_audio_source",b"new_audio_source","new_audio_stream",b"new_audio_stream","new_sox_resampler",b"new_sox_resampler","new_video_source",b"new_video_source","new_video_stream",b"new_video_stream","perform_rpc",b"perform_rpc","publish_data",b"publish_data","publish_sip_dtmf",b"publish_sip_dtmf","publish_track",b"publish_track","publish_transcription",b"publish_transcription","push_sox_resampler",b"push_sox_resampler","register_rpc_method",b"register_rpc_method","remix_and_resample",b"remix_and_resample","rpc_method_invocation_response",b"rpc_method_invocation_response","send_chat_message",b"send_chat_message","set_local_attributes",b"set_local_attributes","set_local_metadata",b"set_local_metadata","set_local_name",b"set_local_name","set_subscribed",b"set_subscribed","unpublish_track",b"unpublish_track","unregister_rpc_method",b"unregister_rpc_method","video_convert",b"video_convert","video_stream_from_participant",b"video_stream_from_participant"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["message",b"message"]) -> typing.Optional[typing_extensions.Literal["dispose","connect","disconnect","publish_track","unpublish_track","publish_data","set_subscribed","set_local_metadata","set_local_name","set_local_attributes","get_session_stats","publish_transcription","publish_sip_dtmf","create_video_track","create_audio_track","local_track_mute","enable_remote_track","get_stats","new_video_stream","new_video_source","capture_video_frame","video_convert","video_stream_from_participant","new_audio_stream","new_audio_source","capture_audio_frame","clear_audio_buffer","new_audio_resampler","remix_and_resample","audio_stream_from_participant","e2ee","new_sox_resampler","push_sox_resampler","flush_sox_resampler","send_chat_message","perform_rpc","register_rpc_method","unregister_rpc_method","rpc_method_invocation_response"]]: ... global___FfiResponse = FfiResponse class FfiEvent(google.protobuf.message.Message): @@ -415,6 +452,11 @@ class FfiEvent(google.protobuf.message.Message): PANIC_FIELD_NUMBER: builtins.int PUBLISH_SIP_DTMF_FIELD_NUMBER: builtins.int CHAT_MESSAGE_FIELD_NUMBER: builtins.int + PERFORM_RPC_FIELD_NUMBER: builtins.int + REGISTER_RPC_METHOD_FIELD_NUMBER: builtins.int + UNREGISTER_RPC_METHOD_FIELD_NUMBER: builtins.int + RPC_METHOD_INVOCATION_FIELD_NUMBER: builtins.int + RPC_METHOD_INVOCATION_RESPONSE_FIELD_NUMBER: builtins.int @property def room_event(self) -> room_pb2.RoomEvent: ... @property @@ -457,6 +499,16 @@ class FfiEvent(google.protobuf.message.Message): def publish_sip_dtmf(self) -> room_pb2.PublishSipDtmfCallback: ... @property def chat_message(self) -> room_pb2.SendChatMessageCallback: ... + @property + def perform_rpc(self) -> rpc_pb2.PerformRpcCallback: ... + @property + def register_rpc_method(self) -> rpc_pb2.RegisterRpcMethodCallback: ... + @property + def unregister_rpc_method(self) -> rpc_pb2.UnregisterRpcMethodCallback: ... + @property + def rpc_method_invocation(self) -> rpc_pb2.RpcMethodInvocationEvent: ... + @property + def rpc_method_invocation_response(self) -> rpc_pb2.RpcMethodInvocationResponseCallback: ... def __init__(self, *, room_event: typing.Optional[room_pb2.RoomEvent] = ..., @@ -480,10 +532,15 @@ class FfiEvent(google.protobuf.message.Message): panic: typing.Optional[global___Panic] = ..., publish_sip_dtmf: typing.Optional[room_pb2.PublishSipDtmfCallback] = ..., chat_message: typing.Optional[room_pb2.SendChatMessageCallback] = ..., + perform_rpc: typing.Optional[rpc_pb2.PerformRpcCallback] = ..., + register_rpc_method: typing.Optional[rpc_pb2.RegisterRpcMethodCallback] = ..., + unregister_rpc_method: typing.Optional[rpc_pb2.UnregisterRpcMethodCallback] = ..., + rpc_method_invocation: typing.Optional[rpc_pb2.RpcMethodInvocationEvent] = ..., + rpc_method_invocation_response: typing.Optional[rpc_pb2.RpcMethodInvocationResponseCallback] = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["audio_stream_event",b"audio_stream_event","capture_audio_frame",b"capture_audio_frame","chat_message",b"chat_message","connect",b"connect","disconnect",b"disconnect","dispose",b"dispose","get_session_stats",b"get_session_stats","get_stats",b"get_stats","logs",b"logs","message",b"message","panic",b"panic","publish_data",b"publish_data","publish_sip_dtmf",b"publish_sip_dtmf","publish_track",b"publish_track","publish_transcription",b"publish_transcription","room_event",b"room_event","set_local_attributes",b"set_local_attributes","set_local_metadata",b"set_local_metadata","set_local_name",b"set_local_name","track_event",b"track_event","unpublish_track",b"unpublish_track","video_stream_event",b"video_stream_event"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["audio_stream_event",b"audio_stream_event","capture_audio_frame",b"capture_audio_frame","chat_message",b"chat_message","connect",b"connect","disconnect",b"disconnect","dispose",b"dispose","get_session_stats",b"get_session_stats","get_stats",b"get_stats","logs",b"logs","message",b"message","panic",b"panic","publish_data",b"publish_data","publish_sip_dtmf",b"publish_sip_dtmf","publish_track",b"publish_track","publish_transcription",b"publish_transcription","room_event",b"room_event","set_local_attributes",b"set_local_attributes","set_local_metadata",b"set_local_metadata","set_local_name",b"set_local_name","track_event",b"track_event","unpublish_track",b"unpublish_track","video_stream_event",b"video_stream_event"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["message",b"message"]) -> typing.Optional[typing_extensions.Literal["room_event","track_event","video_stream_event","audio_stream_event","connect","disconnect","dispose","publish_track","unpublish_track","publish_data","publish_transcription","capture_audio_frame","set_local_metadata","set_local_name","set_local_attributes","get_stats","logs","get_session_stats","panic","publish_sip_dtmf","chat_message"]]: ... + def HasField(self, field_name: typing_extensions.Literal["audio_stream_event",b"audio_stream_event","capture_audio_frame",b"capture_audio_frame","chat_message",b"chat_message","connect",b"connect","disconnect",b"disconnect","dispose",b"dispose","get_session_stats",b"get_session_stats","get_stats",b"get_stats","logs",b"logs","message",b"message","panic",b"panic","perform_rpc",b"perform_rpc","publish_data",b"publish_data","publish_sip_dtmf",b"publish_sip_dtmf","publish_track",b"publish_track","publish_transcription",b"publish_transcription","register_rpc_method",b"register_rpc_method","room_event",b"room_event","rpc_method_invocation",b"rpc_method_invocation","rpc_method_invocation_response",b"rpc_method_invocation_response","set_local_attributes",b"set_local_attributes","set_local_metadata",b"set_local_metadata","set_local_name",b"set_local_name","track_event",b"track_event","unpublish_track",b"unpublish_track","unregister_rpc_method",b"unregister_rpc_method","video_stream_event",b"video_stream_event"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["audio_stream_event",b"audio_stream_event","capture_audio_frame",b"capture_audio_frame","chat_message",b"chat_message","connect",b"connect","disconnect",b"disconnect","dispose",b"dispose","get_session_stats",b"get_session_stats","get_stats",b"get_stats","logs",b"logs","message",b"message","panic",b"panic","perform_rpc",b"perform_rpc","publish_data",b"publish_data","publish_sip_dtmf",b"publish_sip_dtmf","publish_track",b"publish_track","publish_transcription",b"publish_transcription","register_rpc_method",b"register_rpc_method","room_event",b"room_event","rpc_method_invocation",b"rpc_method_invocation","rpc_method_invocation_response",b"rpc_method_invocation_response","set_local_attributes",b"set_local_attributes","set_local_metadata",b"set_local_metadata","set_local_name",b"set_local_name","track_event",b"track_event","unpublish_track",b"unpublish_track","unregister_rpc_method",b"unregister_rpc_method","video_stream_event",b"video_stream_event"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["message",b"message"]) -> typing.Optional[typing_extensions.Literal["room_event","track_event","video_stream_event","audio_stream_event","connect","disconnect","dispose","publish_track","unpublish_track","publish_data","publish_transcription","capture_audio_frame","set_local_metadata","set_local_name","set_local_attributes","get_stats","logs","get_session_stats","panic","publish_sip_dtmf","chat_message","perform_rpc","register_rpc_method","unregister_rpc_method","rpc_method_invocation","rpc_method_invocation_response"]]: ... global___FfiEvent = FfiEvent class DisposeRequest(google.protobuf.message.Message): diff --git a/livekit-rtc/livekit/rtc/_proto/handle_pb2.py b/livekit-rtc/livekit/rtc/_proto/handle_pb2.py index 75d0a067..e4f82a56 100644 --- a/livekit-rtc/livekit/rtc/_proto/handle_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/handle_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: handle.proto -# Protobuf Python Version: 5.27.1 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, - 27, - 1, + 28, + 2, '', 'handle.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/participant_pb2.py b/livekit-rtc/livekit/rtc/_proto/participant_pb2.py index f1149371..d0f3fa43 100644 --- a/livekit-rtc/livekit/rtc/_proto/participant_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/participant_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: participant.proto -# Protobuf Python Version: 5.27.1 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, - 27, - 1, + 28, + 2, '', 'participant.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/room_pb2.py b/livekit-rtc/livekit/rtc/_proto/room_pb2.py index e53170ee..d494a8c5 100644 --- a/livekit-rtc/livekit/rtc/_proto/room_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/room_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: room.proto -# Protobuf Python Version: 5.27.1 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, - 27, - 1, + 28, + 2, '', 'room.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py index c7e29758..34257ae9 100644 --- a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py @@ -24,7 +24,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\trpc.proto\x12\rlivekit.proto\"E\n\x08RpcError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x11\n\x04\x64\x61ta\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_data\"\xae\x01\n\x11PerformRpcRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x1c\n\x14\x64\x65stination_identity\x18\x02 \x01(\t\x12\x0e\n\x06method\x18\x03 \x01(\t\x12\x0f\n\x07payload\x18\x04 \x01(\t\x12 \n\x13response_timeout_ms\x18\x05 \x01(\rH\x00\x88\x01\x01\x42\x16\n\x14_response_timeout_ms\"L\n\x18RegisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x0e\n\x06method\x18\x02 \x01(\t\"N\n\x1aUnregisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x0e\n\x06method\x18\x02 \x01(\t\"\xb6\x01\n\"RpcMethodInvocationResponseRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x15\n\rinvocation_id\x18\x02 \x01(\x04\x12\x14\n\x07payload\x18\x03 \x01(\tH\x00\x88\x01\x01\x12+\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x17.livekit.proto.RpcErrorH\x01\x88\x01\x01\x42\n\n\x08_payloadB\x08\n\x06_error\"&\n\x12PerformRpcResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"-\n\x19RegisterRpcMethodResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"/\n\x1bUnregisterRpcMethodResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"7\n#RpcMethodInvocationResponseResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"\x7f\n\x12PerformRpcCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\x12\x14\n\x07payload\x18\x02 \x01(\tH\x00\x88\x01\x01\x12+\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x17.livekit.proto.RpcErrorH\x01\x88\x01\x01\x42\n\n\x08_payloadB\x08\n\x06_error\"-\n\x19RegisterRpcMethodCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"/\n\x1bUnregisterRpcMethodCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"U\n#RpcMethodInvocationResponseCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\x12\x12\n\x05\x65rror\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_error\"\xbe\x01\n\x18RpcMethodInvocationEvent\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x15\n\rinvocation_id\x18\x02 \x01(\x04\x12\x0e\n\x06method\x18\x03 \x01(\t\x12\x12\n\nrequest_id\x18\x04 \x01(\t\x12\x17\n\x0f\x63\x61ller_identity\x18\x05 \x01(\t\x12\x0f\n\x07payload\x18\x06 \x01(\t\x12\x1b\n\x13response_timeout_ms\x18\x07 \x01(\rB\x10\xaa\x02\rLiveKit.Protob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\trpc.proto\x12\rlivekit.proto\"7\n\x08RpcError\x12\x0c\n\x04\x63ode\x18\x01 \x02(\r\x12\x0f\n\x07message\x18\x02 \x02(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\t\"\x91\x01\n\x11PerformRpcRequest\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x1c\n\x14\x64\x65stination_identity\x18\x02 \x02(\t\x12\x0e\n\x06method\x18\x03 \x02(\t\x12\x0f\n\x07payload\x18\x04 \x02(\t\x12\x1b\n\x13response_timeout_ms\x18\x05 \x01(\r\"L\n\x18RegisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x0e\n\x06method\x18\x02 \x02(\t\"N\n\x1aUnregisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x0e\n\x06method\x18\x02 \x02(\t\"\x96\x01\n\"RpcMethodInvocationResponseRequest\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x15\n\rinvocation_id\x18\x02 \x02(\x04\x12\x0f\n\x07payload\x18\x03 \x01(\t\x12&\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x17.livekit.proto.RpcError\"&\n\x12PerformRpcResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\"-\n\x19RegisterRpcMethodResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\"/\n\x1bUnregisterRpcMethodResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\"7\n#RpcMethodInvocationResponseResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\"_\n\x12PerformRpcCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\x12\x0f\n\x07payload\x18\x02 \x01(\t\x12&\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x17.livekit.proto.RpcError\"-\n\x19RegisterRpcMethodCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\"/\n\x1bUnregisterRpcMethodCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\"F\n#RpcMethodInvocationResponseCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"\xbe\x01\n\x18RpcMethodInvocationEvent\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x15\n\rinvocation_id\x18\x02 \x02(\x04\x12\x0e\n\x06method\x18\x03 \x02(\t\x12\x12\n\nrequest_id\x18\x04 \x02(\t\x12\x17\n\x0f\x63\x61ller_identity\x18\x05 \x02(\t\x12\x0f\n\x07payload\x18\x06 \x02(\t\x12\x1b\n\x13response_timeout_ms\x18\x07 \x02(\rB\x10\xaa\x02\rLiveKit.Proto') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -33,31 +33,31 @@ _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' _globals['_RPCERROR']._serialized_start=28 - _globals['_RPCERROR']._serialized_end=97 - _globals['_PERFORMRPCREQUEST']._serialized_start=100 - _globals['_PERFORMRPCREQUEST']._serialized_end=274 - _globals['_REGISTERRPCMETHODREQUEST']._serialized_start=276 - _globals['_REGISTERRPCMETHODREQUEST']._serialized_end=352 - _globals['_UNREGISTERRPCMETHODREQUEST']._serialized_start=354 - _globals['_UNREGISTERRPCMETHODREQUEST']._serialized_end=432 - _globals['_RPCMETHODINVOCATIONRESPONSEREQUEST']._serialized_start=435 - _globals['_RPCMETHODINVOCATIONRESPONSEREQUEST']._serialized_end=617 - _globals['_PERFORMRPCRESPONSE']._serialized_start=619 - _globals['_PERFORMRPCRESPONSE']._serialized_end=657 - _globals['_REGISTERRPCMETHODRESPONSE']._serialized_start=659 - _globals['_REGISTERRPCMETHODRESPONSE']._serialized_end=704 - _globals['_UNREGISTERRPCMETHODRESPONSE']._serialized_start=706 - _globals['_UNREGISTERRPCMETHODRESPONSE']._serialized_end=753 - _globals['_RPCMETHODINVOCATIONRESPONSERESPONSE']._serialized_start=755 - _globals['_RPCMETHODINVOCATIONRESPONSERESPONSE']._serialized_end=810 - _globals['_PERFORMRPCCALLBACK']._serialized_start=812 - _globals['_PERFORMRPCCALLBACK']._serialized_end=939 - _globals['_REGISTERRPCMETHODCALLBACK']._serialized_start=941 - _globals['_REGISTERRPCMETHODCALLBACK']._serialized_end=986 - _globals['_UNREGISTERRPCMETHODCALLBACK']._serialized_start=988 - _globals['_UNREGISTERRPCMETHODCALLBACK']._serialized_end=1035 - _globals['_RPCMETHODINVOCATIONRESPONSECALLBACK']._serialized_start=1037 - _globals['_RPCMETHODINVOCATIONRESPONSECALLBACK']._serialized_end=1122 - _globals['_RPCMETHODINVOCATIONEVENT']._serialized_start=1125 - _globals['_RPCMETHODINVOCATIONEVENT']._serialized_end=1315 + _globals['_RPCERROR']._serialized_end=83 + _globals['_PERFORMRPCREQUEST']._serialized_start=86 + _globals['_PERFORMRPCREQUEST']._serialized_end=231 + _globals['_REGISTERRPCMETHODREQUEST']._serialized_start=233 + _globals['_REGISTERRPCMETHODREQUEST']._serialized_end=309 + _globals['_UNREGISTERRPCMETHODREQUEST']._serialized_start=311 + _globals['_UNREGISTERRPCMETHODREQUEST']._serialized_end=389 + _globals['_RPCMETHODINVOCATIONRESPONSEREQUEST']._serialized_start=392 + _globals['_RPCMETHODINVOCATIONRESPONSEREQUEST']._serialized_end=542 + _globals['_PERFORMRPCRESPONSE']._serialized_start=544 + _globals['_PERFORMRPCRESPONSE']._serialized_end=582 + _globals['_REGISTERRPCMETHODRESPONSE']._serialized_start=584 + _globals['_REGISTERRPCMETHODRESPONSE']._serialized_end=629 + _globals['_UNREGISTERRPCMETHODRESPONSE']._serialized_start=631 + _globals['_UNREGISTERRPCMETHODRESPONSE']._serialized_end=678 + _globals['_RPCMETHODINVOCATIONRESPONSERESPONSE']._serialized_start=680 + _globals['_RPCMETHODINVOCATIONRESPONSERESPONSE']._serialized_end=735 + _globals['_PERFORMRPCCALLBACK']._serialized_start=737 + _globals['_PERFORMRPCCALLBACK']._serialized_end=832 + _globals['_REGISTERRPCMETHODCALLBACK']._serialized_start=834 + _globals['_REGISTERRPCMETHODCALLBACK']._serialized_end=879 + _globals['_UNREGISTERRPCMETHODCALLBACK']._serialized_start=881 + _globals['_UNREGISTERRPCMETHODCALLBACK']._serialized_end=928 + _globals['_RPCMETHODINVOCATIONRESPONSECALLBACK']._serialized_start=930 + _globals['_RPCMETHODINVOCATIONRESPONSECALLBACK']._serialized_end=1000 + _globals['_RPCMETHODINVOCATIONEVENT']._serialized_start=1003 + _globals['_RPCMETHODINVOCATIONEVENT']._serialized_end=1193 # @@protoc_insertion_point(module_scope) diff --git a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi index 6c2c05eb..55afffc0 100644 --- a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi +++ b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi @@ -1,295 +1,221 @@ """ @generated by mypy-protobuf. Do not edit manually! isort:skip_file -Copyright 2023 LiveKit, Inc. - -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. """ - import builtins import google.protobuf.descriptor import google.protobuf.message import typing +import typing_extensions DESCRIPTOR: google.protobuf.descriptor.FileDescriptor -@typing.final class RpcError(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - CODE_FIELD_NUMBER: builtins.int MESSAGE_FIELD_NUMBER: builtins.int DATA_FIELD_NUMBER: builtins.int code: builtins.int - message: builtins.str - data: builtins.str - def __init__( - self, + message: typing.Text + data: typing.Text + def __init__(self, *, - code: builtins.int = ..., - message: builtins.str = ..., - data: builtins.str | None = ..., - ) -> None: ... - def HasField(self, field_name: typing.Literal["_data", b"_data", "data", b"data"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["_data", b"_data", "code", b"code", "data", b"data", "message", b"message"]) -> None: ... - def WhichOneof(self, oneof_group: typing.Literal["_data", b"_data"]) -> typing.Literal["data"] | None: ... - + code: typing.Optional[builtins.int] = ..., + message: typing.Optional[typing.Text] = ..., + data: typing.Optional[typing.Text] = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["code",b"code","data",b"data","message",b"message"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["code",b"code","data",b"data","message",b"message"]) -> None: ... global___RpcError = RpcError -@typing.final class PerformRpcRequest(google.protobuf.message.Message): """FFI Requests""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor - LOCAL_PARTICIPANT_HANDLE_FIELD_NUMBER: builtins.int DESTINATION_IDENTITY_FIELD_NUMBER: builtins.int METHOD_FIELD_NUMBER: builtins.int PAYLOAD_FIELD_NUMBER: builtins.int RESPONSE_TIMEOUT_MS_FIELD_NUMBER: builtins.int local_participant_handle: builtins.int - destination_identity: builtins.str - method: builtins.str - payload: builtins.str + destination_identity: typing.Text + method: typing.Text + payload: typing.Text response_timeout_ms: builtins.int - def __init__( - self, + def __init__(self, *, - local_participant_handle: builtins.int = ..., - destination_identity: builtins.str = ..., - method: builtins.str = ..., - payload: builtins.str = ..., - response_timeout_ms: builtins.int | None = ..., - ) -> None: ... - def HasField(self, field_name: typing.Literal["_response_timeout_ms", b"_response_timeout_ms", "response_timeout_ms", b"response_timeout_ms"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["_response_timeout_ms", b"_response_timeout_ms", "destination_identity", b"destination_identity", "local_participant_handle", b"local_participant_handle", "method", b"method", "payload", b"payload", "response_timeout_ms", b"response_timeout_ms"]) -> None: ... - def WhichOneof(self, oneof_group: typing.Literal["_response_timeout_ms", b"_response_timeout_ms"]) -> typing.Literal["response_timeout_ms"] | None: ... - + local_participant_handle: typing.Optional[builtins.int] = ..., + destination_identity: typing.Optional[typing.Text] = ..., + method: typing.Optional[typing.Text] = ..., + payload: typing.Optional[typing.Text] = ..., + response_timeout_ms: typing.Optional[builtins.int] = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["destination_identity",b"destination_identity","local_participant_handle",b"local_participant_handle","method",b"method","payload",b"payload","response_timeout_ms",b"response_timeout_ms"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["destination_identity",b"destination_identity","local_participant_handle",b"local_participant_handle","method",b"method","payload",b"payload","response_timeout_ms",b"response_timeout_ms"]) -> None: ... global___PerformRpcRequest = PerformRpcRequest -@typing.final class RegisterRpcMethodRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - LOCAL_PARTICIPANT_HANDLE_FIELD_NUMBER: builtins.int METHOD_FIELD_NUMBER: builtins.int local_participant_handle: builtins.int - method: builtins.str - def __init__( - self, + method: typing.Text + def __init__(self, *, - local_participant_handle: builtins.int = ..., - method: builtins.str = ..., - ) -> None: ... - def ClearField(self, field_name: typing.Literal["local_participant_handle", b"local_participant_handle", "method", b"method"]) -> None: ... - + local_participant_handle: typing.Optional[builtins.int] = ..., + method: typing.Optional[typing.Text] = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["local_participant_handle",b"local_participant_handle","method",b"method"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["local_participant_handle",b"local_participant_handle","method",b"method"]) -> None: ... global___RegisterRpcMethodRequest = RegisterRpcMethodRequest -@typing.final class UnregisterRpcMethodRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - LOCAL_PARTICIPANT_HANDLE_FIELD_NUMBER: builtins.int METHOD_FIELD_NUMBER: builtins.int local_participant_handle: builtins.int - method: builtins.str - def __init__( - self, + method: typing.Text + def __init__(self, *, - local_participant_handle: builtins.int = ..., - method: builtins.str = ..., - ) -> None: ... - def ClearField(self, field_name: typing.Literal["local_participant_handle", b"local_participant_handle", "method", b"method"]) -> None: ... - + local_participant_handle: typing.Optional[builtins.int] = ..., + method: typing.Optional[typing.Text] = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["local_participant_handle",b"local_participant_handle","method",b"method"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["local_participant_handle",b"local_participant_handle","method",b"method"]) -> None: ... global___UnregisterRpcMethodRequest = UnregisterRpcMethodRequest -@typing.final class RpcMethodInvocationResponseRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - LOCAL_PARTICIPANT_HANDLE_FIELD_NUMBER: builtins.int INVOCATION_ID_FIELD_NUMBER: builtins.int PAYLOAD_FIELD_NUMBER: builtins.int ERROR_FIELD_NUMBER: builtins.int local_participant_handle: builtins.int invocation_id: builtins.int - payload: builtins.str + payload: typing.Text @property def error(self) -> global___RpcError: ... - def __init__( - self, + def __init__(self, *, - local_participant_handle: builtins.int = ..., - invocation_id: builtins.int = ..., - payload: builtins.str | None = ..., - error: global___RpcError | None = ..., - ) -> None: ... - def HasField(self, field_name: typing.Literal["_error", b"_error", "_payload", b"_payload", "error", b"error", "payload", b"payload"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["_error", b"_error", "_payload", b"_payload", "error", b"error", "invocation_id", b"invocation_id", "local_participant_handle", b"local_participant_handle", "payload", b"payload"]) -> None: ... - @typing.overload - def WhichOneof(self, oneof_group: typing.Literal["_error", b"_error"]) -> typing.Literal["error"] | None: ... - @typing.overload - def WhichOneof(self, oneof_group: typing.Literal["_payload", b"_payload"]) -> typing.Literal["payload"] | None: ... - + local_participant_handle: typing.Optional[builtins.int] = ..., + invocation_id: typing.Optional[builtins.int] = ..., + payload: typing.Optional[typing.Text] = ..., + error: typing.Optional[global___RpcError] = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["error",b"error","invocation_id",b"invocation_id","local_participant_handle",b"local_participant_handle","payload",b"payload"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["error",b"error","invocation_id",b"invocation_id","local_participant_handle",b"local_participant_handle","payload",b"payload"]) -> None: ... global___RpcMethodInvocationResponseRequest = RpcMethodInvocationResponseRequest -@typing.final class PerformRpcResponse(google.protobuf.message.Message): """FFI Responses""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor - ASYNC_ID_FIELD_NUMBER: builtins.int async_id: builtins.int - def __init__( - self, + def __init__(self, *, - async_id: builtins.int = ..., - ) -> None: ... - def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... - + async_id: typing.Optional[builtins.int] = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> None: ... global___PerformRpcResponse = PerformRpcResponse -@typing.final class RegisterRpcMethodResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - ASYNC_ID_FIELD_NUMBER: builtins.int async_id: builtins.int - def __init__( - self, + def __init__(self, *, - async_id: builtins.int = ..., - ) -> None: ... - def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... - + async_id: typing.Optional[builtins.int] = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> None: ... global___RegisterRpcMethodResponse = RegisterRpcMethodResponse -@typing.final class UnregisterRpcMethodResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - ASYNC_ID_FIELD_NUMBER: builtins.int async_id: builtins.int - def __init__( - self, + def __init__(self, *, - async_id: builtins.int = ..., - ) -> None: ... - def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... - + async_id: typing.Optional[builtins.int] = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> None: ... global___UnregisterRpcMethodResponse = UnregisterRpcMethodResponse -@typing.final class RpcMethodInvocationResponseResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - ASYNC_ID_FIELD_NUMBER: builtins.int async_id: builtins.int - def __init__( - self, + def __init__(self, *, - async_id: builtins.int = ..., - ) -> None: ... - def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... - + async_id: typing.Optional[builtins.int] = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> None: ... global___RpcMethodInvocationResponseResponse = RpcMethodInvocationResponseResponse -@typing.final class PerformRpcCallback(google.protobuf.message.Message): """FFI Callbacks""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor - ASYNC_ID_FIELD_NUMBER: builtins.int PAYLOAD_FIELD_NUMBER: builtins.int ERROR_FIELD_NUMBER: builtins.int async_id: builtins.int - payload: builtins.str + payload: typing.Text @property def error(self) -> global___RpcError: ... - def __init__( - self, + def __init__(self, *, - async_id: builtins.int = ..., - payload: builtins.str | None = ..., - error: global___RpcError | None = ..., - ) -> None: ... - def HasField(self, field_name: typing.Literal["_error", b"_error", "_payload", b"_payload", "error", b"error", "payload", b"payload"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["_error", b"_error", "_payload", b"_payload", "async_id", b"async_id", "error", b"error", "payload", b"payload"]) -> None: ... - @typing.overload - def WhichOneof(self, oneof_group: typing.Literal["_error", b"_error"]) -> typing.Literal["error"] | None: ... - @typing.overload - def WhichOneof(self, oneof_group: typing.Literal["_payload", b"_payload"]) -> typing.Literal["payload"] | None: ... - + async_id: typing.Optional[builtins.int] = ..., + payload: typing.Optional[typing.Text] = ..., + error: typing.Optional[global___RpcError] = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["async_id",b"async_id","error",b"error","payload",b"payload"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["async_id",b"async_id","error",b"error","payload",b"payload"]) -> None: ... global___PerformRpcCallback = PerformRpcCallback -@typing.final class RegisterRpcMethodCallback(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - ASYNC_ID_FIELD_NUMBER: builtins.int async_id: builtins.int - def __init__( - self, + def __init__(self, *, - async_id: builtins.int = ..., - ) -> None: ... - def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... - + async_id: typing.Optional[builtins.int] = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> None: ... global___RegisterRpcMethodCallback = RegisterRpcMethodCallback -@typing.final class UnregisterRpcMethodCallback(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - ASYNC_ID_FIELD_NUMBER: builtins.int async_id: builtins.int - def __init__( - self, + def __init__(self, *, - async_id: builtins.int = ..., - ) -> None: ... - def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... - + async_id: typing.Optional[builtins.int] = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> None: ... global___UnregisterRpcMethodCallback = UnregisterRpcMethodCallback -@typing.final class RpcMethodInvocationResponseCallback(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - ASYNC_ID_FIELD_NUMBER: builtins.int ERROR_FIELD_NUMBER: builtins.int async_id: builtins.int - error: builtins.str - def __init__( - self, + error: typing.Text + def __init__(self, *, - async_id: builtins.int = ..., - error: builtins.str | None = ..., - ) -> None: ... - def HasField(self, field_name: typing.Literal["_error", b"_error", "error", b"error"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["_error", b"_error", "async_id", b"async_id", "error", b"error"]) -> None: ... - def WhichOneof(self, oneof_group: typing.Literal["_error", b"_error"]) -> typing.Literal["error"] | None: ... - + async_id: typing.Optional[builtins.int] = ..., + error: typing.Optional[typing.Text] = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["async_id",b"async_id","error",b"error"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["async_id",b"async_id","error",b"error"]) -> None: ... global___RpcMethodInvocationResponseCallback = RpcMethodInvocationResponseCallback -@typing.final class RpcMethodInvocationEvent(google.protobuf.message.Message): """FFI Events""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor - LOCAL_PARTICIPANT_HANDLE_FIELD_NUMBER: builtins.int INVOCATION_ID_FIELD_NUMBER: builtins.int METHOD_FIELD_NUMBER: builtins.int @@ -299,22 +225,21 @@ class RpcMethodInvocationEvent(google.protobuf.message.Message): RESPONSE_TIMEOUT_MS_FIELD_NUMBER: builtins.int local_participant_handle: builtins.int invocation_id: builtins.int - method: builtins.str - request_id: builtins.str - caller_identity: builtins.str - payload: builtins.str + method: typing.Text + request_id: typing.Text + caller_identity: typing.Text + payload: typing.Text response_timeout_ms: builtins.int - def __init__( - self, + def __init__(self, *, - local_participant_handle: builtins.int = ..., - invocation_id: builtins.int = ..., - method: builtins.str = ..., - request_id: builtins.str = ..., - caller_identity: builtins.str = ..., - payload: builtins.str = ..., - response_timeout_ms: builtins.int = ..., - ) -> None: ... - def ClearField(self, field_name: typing.Literal["caller_identity", b"caller_identity", "invocation_id", b"invocation_id", "local_participant_handle", b"local_participant_handle", "method", b"method", "payload", b"payload", "request_id", b"request_id", "response_timeout_ms", b"response_timeout_ms"]) -> None: ... - + local_participant_handle: typing.Optional[builtins.int] = ..., + invocation_id: typing.Optional[builtins.int] = ..., + method: typing.Optional[typing.Text] = ..., + request_id: typing.Optional[typing.Text] = ..., + caller_identity: typing.Optional[typing.Text] = ..., + payload: typing.Optional[typing.Text] = ..., + response_timeout_ms: typing.Optional[builtins.int] = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["caller_identity",b"caller_identity","invocation_id",b"invocation_id","local_participant_handle",b"local_participant_handle","method",b"method","payload",b"payload","request_id",b"request_id","response_timeout_ms",b"response_timeout_ms"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["caller_identity",b"caller_identity","invocation_id",b"invocation_id","local_participant_handle",b"local_participant_handle","method",b"method","payload",b"payload","request_id",b"request_id","response_timeout_ms",b"response_timeout_ms"]) -> None: ... global___RpcMethodInvocationEvent = RpcMethodInvocationEvent diff --git a/livekit-rtc/livekit/rtc/_proto/stats_pb2.py b/livekit-rtc/livekit/rtc/_proto/stats_pb2.py index cdef3e9d..15f1415b 100644 --- a/livekit-rtc/livekit/rtc/_proto/stats_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/stats_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: stats.proto -# Protobuf Python Version: 5.27.1 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, - 27, - 1, + 28, + 2, '', 'stats.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/track_pb2.py b/livekit-rtc/livekit/rtc/_proto/track_pb2.py index eda9f861..9aab1a4c 100644 --- a/livekit-rtc/livekit/rtc/_proto/track_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/track_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: track.proto -# Protobuf Python Version: 5.27.1 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, - 27, - 1, + 28, + 2, '', 'track.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py b/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py index 83362599..31c7bbb8 100644 --- a/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: video_frame.proto -# Protobuf Python Version: 5.27.1 +# Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, - 27, - 1, + 28, + 2, '', 'video_frame.proto' ) From 0afd947b795b568889fcd5877d0d9aa5ebfdb94f Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Wed, 23 Oct 2024 13:01:06 -0700 Subject: [PATCH 20/53] fixes --- livekit-rtc/livekit/rtc/participant.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index a3ee3c37..89eb844c 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -114,9 +114,9 @@ def __init__( ) -> None: super().__init__(owned_info) self._room_queue = room_queue - self.track_publications: dict[str, LocalTrackPublication] = {} # type: ignore + self._track_publications: dict[str, LocalTrackPublication] = {} # type: ignore self._rpc_handlers: Dict[ - str, Callable[[str, RemoteParticipant, str, int], Awaitable[str]] + str, Callable[[str, str, str, int], Awaitable[str]] ] = {} @property @@ -288,7 +288,7 @@ async def perform_rpc( async def register_rpc_method( self, method: str, - handler: Callable[[str, "RemoteParticipant", str, int], Awaitable[str]], + handler: Callable[[str, str, str, int], Awaitable[str]], ) -> None: """ Establishes the participant as a receiver for calls of the specified RPC method. @@ -313,7 +313,7 @@ async def greet_handler(request_id: str, caller_identity: str, payload: str, res The handler receives the following parameters: - `request_id`: A unique identifier for this RPC request - - `caller`: The RemoteParticipant who initiated the RPC call + - `caller_identity`: The identity of the RemoteParticipant who initiated the RPC call - `payload`: The data sent by the caller (as a string) - `response_timeout_ms`: The maximum time available to return a response @@ -371,7 +371,7 @@ async def _handle_rpc_method_invocation( invocation_id: int, method: str, request_id: str, - caller: RemoteParticipant, + caller_identity: str, payload: str, response_timeout_ms: int, ) -> None: @@ -385,7 +385,7 @@ async def _handle_rpc_method_invocation( else: try: response_payload = await handler( - request_id, caller, payload, response_timeout_ms + request_id, caller_identity, payload, response_timeout_ms ) except RpcError as error: response_error = error From 01a2c4f71151be961d5016d81b618fda7d2b72ba Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Wed, 23 Oct 2024 13:13:44 -0700 Subject: [PATCH 21/53] v --- livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py | 6 +++--- livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py | 6 +++--- livekit-rtc/livekit/rtc/_proto/ffi_pb2.py | 6 +++--- livekit-rtc/livekit/rtc/_proto/handle_pb2.py | 6 +++--- livekit-rtc/livekit/rtc/_proto/participant_pb2.py | 6 +++--- livekit-rtc/livekit/rtc/_proto/room_pb2.py | 6 +++--- livekit-rtc/livekit/rtc/_proto/rpc_pb2.py | 6 +++--- livekit-rtc/livekit/rtc/_proto/stats_pb2.py | 6 +++--- livekit-rtc/livekit/rtc/_proto/track_pb2.py | 6 +++--- livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py | 6 +++--- 10 files changed, 30 insertions(+), 30 deletions(-) diff --git a/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py b/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py index 3e2b0468..be9e5af4 100644 --- a/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: audio_frame.proto -# Protobuf Python Version: 5.28.2 +# Protobuf Python Version: 5.27.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, - 28, - 2, + 27, + 1, '', 'audio_frame.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py b/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py index a78828b9..11f92061 100644 --- a/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: e2ee.proto -# Protobuf Python Version: 5.28.2 +# Protobuf Python Version: 5.27.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, - 28, - 2, + 27, + 1, '', 'e2ee.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py index fddcdcc7..c0347d5e 100644 --- a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: ffi.proto -# Protobuf Python Version: 5.28.2 +# Protobuf Python Version: 5.27.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, - 28, - 2, + 27, + 1, '', 'ffi.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/handle_pb2.py b/livekit-rtc/livekit/rtc/_proto/handle_pb2.py index e4f82a56..75d0a067 100644 --- a/livekit-rtc/livekit/rtc/_proto/handle_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/handle_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: handle.proto -# Protobuf Python Version: 5.28.2 +# Protobuf Python Version: 5.27.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, - 28, - 2, + 27, + 1, '', 'handle.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/participant_pb2.py b/livekit-rtc/livekit/rtc/_proto/participant_pb2.py index d0f3fa43..f1149371 100644 --- a/livekit-rtc/livekit/rtc/_proto/participant_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/participant_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: participant.proto -# Protobuf Python Version: 5.28.2 +# Protobuf Python Version: 5.27.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, - 28, - 2, + 27, + 1, '', 'participant.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/room_pb2.py b/livekit-rtc/livekit/rtc/_proto/room_pb2.py index d494a8c5..e53170ee 100644 --- a/livekit-rtc/livekit/rtc/_proto/room_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/room_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: room.proto -# Protobuf Python Version: 5.28.2 +# Protobuf Python Version: 5.27.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, - 28, - 2, + 27, + 1, '', 'room.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py index 34257ae9..e222b746 100644 --- a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: rpc.proto -# Protobuf Python Version: 5.28.2 +# Protobuf Python Version: 5.27.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, - 28, - 2, + 27, + 1, '', 'rpc.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/stats_pb2.py b/livekit-rtc/livekit/rtc/_proto/stats_pb2.py index 15f1415b..cdef3e9d 100644 --- a/livekit-rtc/livekit/rtc/_proto/stats_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/stats_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: stats.proto -# Protobuf Python Version: 5.28.2 +# Protobuf Python Version: 5.27.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, - 28, - 2, + 27, + 1, '', 'stats.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/track_pb2.py b/livekit-rtc/livekit/rtc/_proto/track_pb2.py index 9aab1a4c..eda9f861 100644 --- a/livekit-rtc/livekit/rtc/_proto/track_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/track_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: track.proto -# Protobuf Python Version: 5.28.2 +# Protobuf Python Version: 5.27.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, - 28, - 2, + 27, + 1, '', 'track.proto' ) diff --git a/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py b/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py index 31c7bbb8..83362599 100644 --- a/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: video_frame.proto -# Protobuf Python Version: 5.28.2 +# Protobuf Python Version: 5.27.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, - 28, - 2, + 27, + 1, '', 'video_frame.proto' ) From fba2a7adecdaf0bc812a8477cb4bf9a96bc9de56 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 22:42:51 +0000 Subject: [PATCH 22/53] generated protobuf --- livekit-rtc/livekit/rtc/_proto/ffi_pb2.py | 25 --- livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi | 157 -------------- livekit-rtc/livekit/rtc/_proto/rpc_pb2.py | 47 ----- livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi | 229 --------------------- 4 files changed, 458 deletions(-) diff --git a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py index dcc9bad1..a96586f1 100644 --- a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py @@ -20,11 +20,7 @@ from . import rpc_pb2 as rpc__pb2 -<<<<<<< HEAD -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tffi.proto\x12\rlivekit.proto\x1a\ne2ee.proto\x1a\x0btrack.proto\x1a\nroom.proto\x1a\x11video_frame.proto\x1a\x11\x61udio_frame.proto\x1a\trpc.proto\"\xa6\x15\n\nFfiRequest\x12\x30\n\x07\x64ispose\x18\x02 \x01(\x0b\x32\x1d.livekit.proto.DisposeRequestH\x00\x12\x30\n\x07\x63onnect\x18\x03 \x01(\x0b\x32\x1d.livekit.proto.ConnectRequestH\x00\x12\x36\n\ndisconnect\x18\x04 \x01(\x0b\x32 .livekit.proto.DisconnectRequestH\x00\x12;\n\rpublish_track\x18\x05 \x01(\x0b\x32\".livekit.proto.PublishTrackRequestH\x00\x12?\n\x0funpublish_track\x18\x06 \x01(\x0b\x32$.livekit.proto.UnpublishTrackRequestH\x00\x12\x39\n\x0cpublish_data\x18\x07 \x01(\x0b\x32!.livekit.proto.PublishDataRequestH\x00\x12=\n\x0eset_subscribed\x18\x08 \x01(\x0b\x32#.livekit.proto.SetSubscribedRequestH\x00\x12\x44\n\x12set_local_metadata\x18\t \x01(\x0b\x32&.livekit.proto.SetLocalMetadataRequestH\x00\x12<\n\x0eset_local_name\x18\n \x01(\x0b\x32\".livekit.proto.SetLocalNameRequestH\x00\x12H\n\x14set_local_attributes\x18\x0b \x01(\x0b\x32(.livekit.proto.SetLocalAttributesRequestH\x00\x12\x42\n\x11get_session_stats\x18\x0c \x01(\x0b\x32%.livekit.proto.GetSessionStatsRequestH\x00\x12K\n\x15publish_transcription\x18\r \x01(\x0b\x32*.livekit.proto.PublishTranscriptionRequestH\x00\x12@\n\x10publish_sip_dtmf\x18\x0e \x01(\x0b\x32$.livekit.proto.PublishSipDtmfRequestH\x00\x12\x44\n\x12\x63reate_video_track\x18\x0f \x01(\x0b\x32&.livekit.proto.CreateVideoTrackRequestH\x00\x12\x44\n\x12\x63reate_audio_track\x18\x10 \x01(\x0b\x32&.livekit.proto.CreateAudioTrackRequestH\x00\x12@\n\x10local_track_mute\x18\x11 \x01(\x0b\x32$.livekit.proto.LocalTrackMuteRequestH\x00\x12\x46\n\x13\x65nable_remote_track\x18\x12 \x01(\x0b\x32\'.livekit.proto.EnableRemoteTrackRequestH\x00\x12\x33\n\tget_stats\x18\x13 \x01(\x0b\x32\x1e.livekit.proto.GetStatsRequestH\x00\x12@\n\x10new_video_stream\x18\x14 \x01(\x0b\x32$.livekit.proto.NewVideoStreamRequestH\x00\x12@\n\x10new_video_source\x18\x15 \x01(\x0b\x32$.livekit.proto.NewVideoSourceRequestH\x00\x12\x46\n\x13\x63\x61pture_video_frame\x18\x16 \x01(\x0b\x32\'.livekit.proto.CaptureVideoFrameRequestH\x00\x12;\n\rvideo_convert\x18\x17 \x01(\x0b\x32\".livekit.proto.VideoConvertRequestH\x00\x12Y\n\x1dvideo_stream_from_participant\x18\x18 \x01(\x0b\x32\x30.livekit.proto.VideoStreamFromParticipantRequestH\x00\x12@\n\x10new_audio_stream\x18\x19 \x01(\x0b\x32$.livekit.proto.NewAudioStreamRequestH\x00\x12@\n\x10new_audio_source\x18\x1a \x01(\x0b\x32$.livekit.proto.NewAudioSourceRequestH\x00\x12\x46\n\x13\x63\x61pture_audio_frame\x18\x1b \x01(\x0b\x32\'.livekit.proto.CaptureAudioFrameRequestH\x00\x12\x44\n\x12\x63lear_audio_buffer\x18\x1c \x01(\x0b\x32&.livekit.proto.ClearAudioBufferRequestH\x00\x12\x46\n\x13new_audio_resampler\x18\x1d \x01(\x0b\x32\'.livekit.proto.NewAudioResamplerRequestH\x00\x12\x44\n\x12remix_and_resample\x18\x1e \x01(\x0b\x32&.livekit.proto.RemixAndResampleRequestH\x00\x12*\n\x04\x65\x32\x65\x65\x18\x1f \x01(\x0b\x32\x1a.livekit.proto.E2eeRequestH\x00\x12Y\n\x1d\x61udio_stream_from_participant\x18 \x01(\x0b\x32\x30.livekit.proto.AudioStreamFromParticipantRequestH\x00\x12\x42\n\x11new_sox_resampler\x18! \x01(\x0b\x32%.livekit.proto.NewSoxResamplerRequestH\x00\x12\x44\n\x12push_sox_resampler\x18\" \x01(\x0b\x32&.livekit.proto.PushSoxResamplerRequestH\x00\x12\x46\n\x13\x66lush_sox_resampler\x18# \x01(\x0b\x32\'.livekit.proto.FlushSoxResamplerRequestH\x00\x12\x42\n\x11send_chat_message\x18$ \x01(\x0b\x32%.livekit.proto.SendChatMessageRequestH\x00\x12\x42\n\x11\x65\x64it_chat_message\x18% \x01(\x0b\x32%.livekit.proto.EditChatMessageRequestH\x00\x12\x37\n\x0bperform_rpc\x18& \x01(\x0b\x32 .livekit.proto.PerformRpcRequestH\x00\x12\x46\n\x13register_rpc_method\x18\' \x01(\x0b\x32\'.livekit.proto.RegisterRpcMethodRequestH\x00\x12J\n\x15unregister_rpc_method\x18( \x01(\x0b\x32).livekit.proto.UnregisterRpcMethodRequestH\x00\x12[\n\x1erpc_method_invocation_response\x18) \x01(\x0b\x32\x31.livekit.proto.RpcMethodInvocationResponseRequestH\x00\x42\t\n\x07message\"\x8a\x15\n\x0b\x46\x66iResponse\x12\x31\n\x07\x64ispose\x18\x02 \x01(\x0b\x32\x1e.livekit.proto.DisposeResponseH\x00\x12\x31\n\x07\x63onnect\x18\x03 \x01(\x0b\x32\x1e.livekit.proto.ConnectResponseH\x00\x12\x37\n\ndisconnect\x18\x04 \x01(\x0b\x32!.livekit.proto.DisconnectResponseH\x00\x12<\n\rpublish_track\x18\x05 \x01(\x0b\x32#.livekit.proto.PublishTrackResponseH\x00\x12@\n\x0funpublish_track\x18\x06 \x01(\x0b\x32%.livekit.proto.UnpublishTrackResponseH\x00\x12:\n\x0cpublish_data\x18\x07 \x01(\x0b\x32\".livekit.proto.PublishDataResponseH\x00\x12>\n\x0eset_subscribed\x18\x08 \x01(\x0b\x32$.livekit.proto.SetSubscribedResponseH\x00\x12\x45\n\x12set_local_metadata\x18\t \x01(\x0b\x32\'.livekit.proto.SetLocalMetadataResponseH\x00\x12=\n\x0eset_local_name\x18\n \x01(\x0b\x32#.livekit.proto.SetLocalNameResponseH\x00\x12I\n\x14set_local_attributes\x18\x0b \x01(\x0b\x32).livekit.proto.SetLocalAttributesResponseH\x00\x12\x43\n\x11get_session_stats\x18\x0c \x01(\x0b\x32&.livekit.proto.GetSessionStatsResponseH\x00\x12L\n\x15publish_transcription\x18\r \x01(\x0b\x32+.livekit.proto.PublishTranscriptionResponseH\x00\x12\x41\n\x10publish_sip_dtmf\x18\x0e \x01(\x0b\x32%.livekit.proto.PublishSipDtmfResponseH\x00\x12\x45\n\x12\x63reate_video_track\x18\x0f \x01(\x0b\x32\'.livekit.proto.CreateVideoTrackResponseH\x00\x12\x45\n\x12\x63reate_audio_track\x18\x10 \x01(\x0b\x32\'.livekit.proto.CreateAudioTrackResponseH\x00\x12\x41\n\x10local_track_mute\x18\x11 \x01(\x0b\x32%.livekit.proto.LocalTrackMuteResponseH\x00\x12G\n\x13\x65nable_remote_track\x18\x12 \x01(\x0b\x32(.livekit.proto.EnableRemoteTrackResponseH\x00\x12\x34\n\tget_stats\x18\x13 \x01(\x0b\x32\x1f.livekit.proto.GetStatsResponseH\x00\x12\x41\n\x10new_video_stream\x18\x14 \x01(\x0b\x32%.livekit.proto.NewVideoStreamResponseH\x00\x12\x41\n\x10new_video_source\x18\x15 \x01(\x0b\x32%.livekit.proto.NewVideoSourceResponseH\x00\x12G\n\x13\x63\x61pture_video_frame\x18\x16 \x01(\x0b\x32(.livekit.proto.CaptureVideoFrameResponseH\x00\x12<\n\rvideo_convert\x18\x17 \x01(\x0b\x32#.livekit.proto.VideoConvertResponseH\x00\x12Z\n\x1dvideo_stream_from_participant\x18\x18 \x01(\x0b\x32\x31.livekit.proto.VideoStreamFromParticipantResponseH\x00\x12\x41\n\x10new_audio_stream\x18\x19 \x01(\x0b\x32%.livekit.proto.NewAudioStreamResponseH\x00\x12\x41\n\x10new_audio_source\x18\x1a \x01(\x0b\x32%.livekit.proto.NewAudioSourceResponseH\x00\x12G\n\x13\x63\x61pture_audio_frame\x18\x1b \x01(\x0b\x32(.livekit.proto.CaptureAudioFrameResponseH\x00\x12\x45\n\x12\x63lear_audio_buffer\x18\x1c \x01(\x0b\x32\'.livekit.proto.ClearAudioBufferResponseH\x00\x12G\n\x13new_audio_resampler\x18\x1d \x01(\x0b\x32(.livekit.proto.NewAudioResamplerResponseH\x00\x12\x45\n\x12remix_and_resample\x18\x1e \x01(\x0b\x32\'.livekit.proto.RemixAndResampleResponseH\x00\x12Z\n\x1d\x61udio_stream_from_participant\x18\x1f \x01(\x0b\x32\x31.livekit.proto.AudioStreamFromParticipantResponseH\x00\x12+\n\x04\x65\x32\x65\x65\x18 \x01(\x0b\x32\x1b.livekit.proto.E2eeResponseH\x00\x12\x43\n\x11new_sox_resampler\x18! \x01(\x0b\x32&.livekit.proto.NewSoxResamplerResponseH\x00\x12\x45\n\x12push_sox_resampler\x18\" \x01(\x0b\x32\'.livekit.proto.PushSoxResamplerResponseH\x00\x12G\n\x13\x66lush_sox_resampler\x18# \x01(\x0b\x32(.livekit.proto.FlushSoxResamplerResponseH\x00\x12\x43\n\x11send_chat_message\x18$ \x01(\x0b\x32&.livekit.proto.SendChatMessageResponseH\x00\x12\x38\n\x0bperform_rpc\x18% \x01(\x0b\x32!.livekit.proto.PerformRpcResponseH\x00\x12G\n\x13register_rpc_method\x18& \x01(\x0b\x32(.livekit.proto.RegisterRpcMethodResponseH\x00\x12K\n\x15unregister_rpc_method\x18\' \x01(\x0b\x32*.livekit.proto.UnregisterRpcMethodResponseH\x00\x12\\\n\x1erpc_method_invocation_response\x18( \x01(\x0b\x32\x32.livekit.proto.RpcMethodInvocationResponseResponseH\x00\x42\t\n\x07message\"\xfe\x0c\n\x08\x46\x66iEvent\x12.\n\nroom_event\x18\x01 \x01(\x0b\x32\x18.livekit.proto.RoomEventH\x00\x12\x30\n\x0btrack_event\x18\x02 \x01(\x0b\x32\x19.livekit.proto.TrackEventH\x00\x12=\n\x12video_stream_event\x18\x03 \x01(\x0b\x32\x1f.livekit.proto.VideoStreamEventH\x00\x12=\n\x12\x61udio_stream_event\x18\x04 \x01(\x0b\x32\x1f.livekit.proto.AudioStreamEventH\x00\x12\x31\n\x07\x63onnect\x18\x05 \x01(\x0b\x32\x1e.livekit.proto.ConnectCallbackH\x00\x12\x37\n\ndisconnect\x18\x07 \x01(\x0b\x32!.livekit.proto.DisconnectCallbackH\x00\x12\x31\n\x07\x64ispose\x18\x08 \x01(\x0b\x32\x1e.livekit.proto.DisposeCallbackH\x00\x12<\n\rpublish_track\x18\t \x01(\x0b\x32#.livekit.proto.PublishTrackCallbackH\x00\x12@\n\x0funpublish_track\x18\n \x01(\x0b\x32%.livekit.proto.UnpublishTrackCallbackH\x00\x12:\n\x0cpublish_data\x18\x0b \x01(\x0b\x32\".livekit.proto.PublishDataCallbackH\x00\x12L\n\x15publish_transcription\x18\x0c \x01(\x0b\x32+.livekit.proto.PublishTranscriptionCallbackH\x00\x12G\n\x13\x63\x61pture_audio_frame\x18\r \x01(\x0b\x32(.livekit.proto.CaptureAudioFrameCallbackH\x00\x12\x45\n\x12set_local_metadata\x18\x0e \x01(\x0b\x32\'.livekit.proto.SetLocalMetadataCallbackH\x00\x12=\n\x0eset_local_name\x18\x0f \x01(\x0b\x32#.livekit.proto.SetLocalNameCallbackH\x00\x12I\n\x14set_local_attributes\x18\x10 \x01(\x0b\x32).livekit.proto.SetLocalAttributesCallbackH\x00\x12\x34\n\tget_stats\x18\x11 \x01(\x0b\x32\x1f.livekit.proto.GetStatsCallbackH\x00\x12\'\n\x04logs\x18\x12 \x01(\x0b\x32\x17.livekit.proto.LogBatchH\x00\x12\x43\n\x11get_session_stats\x18\x13 \x01(\x0b\x32&.livekit.proto.GetSessionStatsCallbackH\x00\x12%\n\x05panic\x18\x14 \x01(\x0b\x32\x14.livekit.proto.PanicH\x00\x12\x41\n\x10publish_sip_dtmf\x18\x15 \x01(\x0b\x32%.livekit.proto.PublishSipDtmfCallbackH\x00\x12>\n\x0c\x63hat_message\x18\x16 \x01(\x0b\x32&.livekit.proto.SendChatMessageCallbackH\x00\x12\x38\n\x0bperform_rpc\x18\x17 \x01(\x0b\x32!.livekit.proto.PerformRpcCallbackH\x00\x12G\n\x13register_rpc_method\x18\x18 \x01(\x0b\x32(.livekit.proto.RegisterRpcMethodCallbackH\x00\x12K\n\x15unregister_rpc_method\x18\x19 \x01(\x0b\x32*.livekit.proto.UnregisterRpcMethodCallbackH\x00\x12H\n\x15rpc_method_invocation\x18\x1a \x01(\x0b\x32\'.livekit.proto.RpcMethodInvocationEventH\x00\x12\\\n\x1erpc_method_invocation_response\x18\x1b \x01(\x0b\x32\x32.livekit.proto.RpcMethodInvocationResponseCallbackH\x00\x42\t\n\x07message\"\x1f\n\x0e\x44isposeRequest\x12\r\n\x05\x61sync\x18\x01 \x02(\x08\"#\n\x0f\x44isposeResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"#\n\x0f\x44isposeCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\"\x85\x01\n\tLogRecord\x12&\n\x05level\x18\x01 \x02(\x0e\x32\x17.livekit.proto.LogLevel\x12\x0e\n\x06target\x18\x02 \x02(\t\x12\x13\n\x0bmodule_path\x18\x03 \x01(\t\x12\x0c\n\x04\x66ile\x18\x04 \x01(\t\x12\x0c\n\x04line\x18\x05 \x01(\r\x12\x0f\n\x07message\x18\x06 \x02(\t\"5\n\x08LogBatch\x12)\n\x07records\x18\x01 \x03(\x0b\x32\x18.livekit.proto.LogRecord\"\x18\n\x05Panic\x12\x0f\n\x07message\x18\x01 \x02(\t*S\n\x08LogLevel\x12\r\n\tLOG_ERROR\x10\x00\x12\x0c\n\x08LOG_WARN\x10\x01\x12\x0c\n\x08LOG_INFO\x10\x02\x12\r\n\tLOG_DEBUG\x10\x03\x12\r\n\tLOG_TRACE\x10\x04\x42\x10\xaa\x02\rLiveKit.Proto') -======= DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tffi.proto\x12\rlivekit.proto\x1a\ne2ee.proto\x1a\x0btrack.proto\x1a\nroom.proto\x1a\x11video_frame.proto\x1a\x11\x61udio_frame.proto\x1a\trpc.proto\"\xa6\x15\n\nFfiRequest\x12\x30\n\x07\x64ispose\x18\x02 \x01(\x0b\x32\x1d.livekit.proto.DisposeRequestH\x00\x12\x30\n\x07\x63onnect\x18\x03 \x01(\x0b\x32\x1d.livekit.proto.ConnectRequestH\x00\x12\x36\n\ndisconnect\x18\x04 \x01(\x0b\x32 .livekit.proto.DisconnectRequestH\x00\x12;\n\rpublish_track\x18\x05 \x01(\x0b\x32\".livekit.proto.PublishTrackRequestH\x00\x12?\n\x0funpublish_track\x18\x06 \x01(\x0b\x32$.livekit.proto.UnpublishTrackRequestH\x00\x12\x39\n\x0cpublish_data\x18\x07 \x01(\x0b\x32!.livekit.proto.PublishDataRequestH\x00\x12=\n\x0eset_subscribed\x18\x08 \x01(\x0b\x32#.livekit.proto.SetSubscribedRequestH\x00\x12\x44\n\x12set_local_metadata\x18\t \x01(\x0b\x32&.livekit.proto.SetLocalMetadataRequestH\x00\x12<\n\x0eset_local_name\x18\n \x01(\x0b\x32\".livekit.proto.SetLocalNameRequestH\x00\x12H\n\x14set_local_attributes\x18\x0b \x01(\x0b\x32(.livekit.proto.SetLocalAttributesRequestH\x00\x12\x42\n\x11get_session_stats\x18\x0c \x01(\x0b\x32%.livekit.proto.GetSessionStatsRequestH\x00\x12K\n\x15publish_transcription\x18\r \x01(\x0b\x32*.livekit.proto.PublishTranscriptionRequestH\x00\x12@\n\x10publish_sip_dtmf\x18\x0e \x01(\x0b\x32$.livekit.proto.PublishSipDtmfRequestH\x00\x12\x44\n\x12\x63reate_video_track\x18\x0f \x01(\x0b\x32&.livekit.proto.CreateVideoTrackRequestH\x00\x12\x44\n\x12\x63reate_audio_track\x18\x10 \x01(\x0b\x32&.livekit.proto.CreateAudioTrackRequestH\x00\x12@\n\x10local_track_mute\x18\x11 \x01(\x0b\x32$.livekit.proto.LocalTrackMuteRequestH\x00\x12\x46\n\x13\x65nable_remote_track\x18\x12 \x01(\x0b\x32\'.livekit.proto.EnableRemoteTrackRequestH\x00\x12\x33\n\tget_stats\x18\x13 \x01(\x0b\x32\x1e.livekit.proto.GetStatsRequestH\x00\x12@\n\x10new_video_stream\x18\x14 \x01(\x0b\x32$.livekit.proto.NewVideoStreamRequestH\x00\x12@\n\x10new_video_source\x18\x15 \x01(\x0b\x32$.livekit.proto.NewVideoSourceRequestH\x00\x12\x46\n\x13\x63\x61pture_video_frame\x18\x16 \x01(\x0b\x32\'.livekit.proto.CaptureVideoFrameRequestH\x00\x12;\n\rvideo_convert\x18\x17 \x01(\x0b\x32\".livekit.proto.VideoConvertRequestH\x00\x12Y\n\x1dvideo_stream_from_participant\x18\x18 \x01(\x0b\x32\x30.livekit.proto.VideoStreamFromParticipantRequestH\x00\x12@\n\x10new_audio_stream\x18\x19 \x01(\x0b\x32$.livekit.proto.NewAudioStreamRequestH\x00\x12@\n\x10new_audio_source\x18\x1a \x01(\x0b\x32$.livekit.proto.NewAudioSourceRequestH\x00\x12\x46\n\x13\x63\x61pture_audio_frame\x18\x1b \x01(\x0b\x32\'.livekit.proto.CaptureAudioFrameRequestH\x00\x12\x44\n\x12\x63lear_audio_buffer\x18\x1c \x01(\x0b\x32&.livekit.proto.ClearAudioBufferRequestH\x00\x12\x46\n\x13new_audio_resampler\x18\x1d \x01(\x0b\x32\'.livekit.proto.NewAudioResamplerRequestH\x00\x12\x44\n\x12remix_and_resample\x18\x1e \x01(\x0b\x32&.livekit.proto.RemixAndResampleRequestH\x00\x12*\n\x04\x65\x32\x65\x65\x18\x1f \x01(\x0b\x32\x1a.livekit.proto.E2eeRequestH\x00\x12Y\n\x1d\x61udio_stream_from_participant\x18 \x01(\x0b\x32\x30.livekit.proto.AudioStreamFromParticipantRequestH\x00\x12\x42\n\x11new_sox_resampler\x18! \x01(\x0b\x32%.livekit.proto.NewSoxResamplerRequestH\x00\x12\x44\n\x12push_sox_resampler\x18\" \x01(\x0b\x32&.livekit.proto.PushSoxResamplerRequestH\x00\x12\x46\n\x13\x66lush_sox_resampler\x18# \x01(\x0b\x32\'.livekit.proto.FlushSoxResamplerRequestH\x00\x12\x42\n\x11send_chat_message\x18$ \x01(\x0b\x32%.livekit.proto.SendChatMessageRequestH\x00\x12\x42\n\x11\x65\x64it_chat_message\x18% \x01(\x0b\x32%.livekit.proto.EditChatMessageRequestH\x00\x12\x37\n\x0bperform_rpc\x18& \x01(\x0b\x32 .livekit.proto.PerformRpcRequestH\x00\x12\x46\n\x13register_rpc_method\x18\' \x01(\x0b\x32\'.livekit.proto.RegisterRpcMethodRequestH\x00\x12J\n\x15unregister_rpc_method\x18( \x01(\x0b\x32).livekit.proto.UnregisterRpcMethodRequestH\x00\x12[\n\x1erpc_method_invocation_response\x18) \x01(\x0b\x32\x31.livekit.proto.RpcMethodInvocationResponseRequestH\x00\x42\t\n\x07message\"\x8a\x15\n\x0b\x46\x66iResponse\x12\x31\n\x07\x64ispose\x18\x02 \x01(\x0b\x32\x1e.livekit.proto.DisposeResponseH\x00\x12\x31\n\x07\x63onnect\x18\x03 \x01(\x0b\x32\x1e.livekit.proto.ConnectResponseH\x00\x12\x37\n\ndisconnect\x18\x04 \x01(\x0b\x32!.livekit.proto.DisconnectResponseH\x00\x12<\n\rpublish_track\x18\x05 \x01(\x0b\x32#.livekit.proto.PublishTrackResponseH\x00\x12@\n\x0funpublish_track\x18\x06 \x01(\x0b\x32%.livekit.proto.UnpublishTrackResponseH\x00\x12:\n\x0cpublish_data\x18\x07 \x01(\x0b\x32\".livekit.proto.PublishDataResponseH\x00\x12>\n\x0eset_subscribed\x18\x08 \x01(\x0b\x32$.livekit.proto.SetSubscribedResponseH\x00\x12\x45\n\x12set_local_metadata\x18\t \x01(\x0b\x32\'.livekit.proto.SetLocalMetadataResponseH\x00\x12=\n\x0eset_local_name\x18\n \x01(\x0b\x32#.livekit.proto.SetLocalNameResponseH\x00\x12I\n\x14set_local_attributes\x18\x0b \x01(\x0b\x32).livekit.proto.SetLocalAttributesResponseH\x00\x12\x43\n\x11get_session_stats\x18\x0c \x01(\x0b\x32&.livekit.proto.GetSessionStatsResponseH\x00\x12L\n\x15publish_transcription\x18\r \x01(\x0b\x32+.livekit.proto.PublishTranscriptionResponseH\x00\x12\x41\n\x10publish_sip_dtmf\x18\x0e \x01(\x0b\x32%.livekit.proto.PublishSipDtmfResponseH\x00\x12\x45\n\x12\x63reate_video_track\x18\x0f \x01(\x0b\x32\'.livekit.proto.CreateVideoTrackResponseH\x00\x12\x45\n\x12\x63reate_audio_track\x18\x10 \x01(\x0b\x32\'.livekit.proto.CreateAudioTrackResponseH\x00\x12\x41\n\x10local_track_mute\x18\x11 \x01(\x0b\x32%.livekit.proto.LocalTrackMuteResponseH\x00\x12G\n\x13\x65nable_remote_track\x18\x12 \x01(\x0b\x32(.livekit.proto.EnableRemoteTrackResponseH\x00\x12\x34\n\tget_stats\x18\x13 \x01(\x0b\x32\x1f.livekit.proto.GetStatsResponseH\x00\x12\x41\n\x10new_video_stream\x18\x14 \x01(\x0b\x32%.livekit.proto.NewVideoStreamResponseH\x00\x12\x41\n\x10new_video_source\x18\x15 \x01(\x0b\x32%.livekit.proto.NewVideoSourceResponseH\x00\x12G\n\x13\x63\x61pture_video_frame\x18\x16 \x01(\x0b\x32(.livekit.proto.CaptureVideoFrameResponseH\x00\x12<\n\rvideo_convert\x18\x17 \x01(\x0b\x32#.livekit.proto.VideoConvertResponseH\x00\x12Z\n\x1dvideo_stream_from_participant\x18\x18 \x01(\x0b\x32\x31.livekit.proto.VideoStreamFromParticipantResponseH\x00\x12\x41\n\x10new_audio_stream\x18\x19 \x01(\x0b\x32%.livekit.proto.NewAudioStreamResponseH\x00\x12\x41\n\x10new_audio_source\x18\x1a \x01(\x0b\x32%.livekit.proto.NewAudioSourceResponseH\x00\x12G\n\x13\x63\x61pture_audio_frame\x18\x1b \x01(\x0b\x32(.livekit.proto.CaptureAudioFrameResponseH\x00\x12\x45\n\x12\x63lear_audio_buffer\x18\x1c \x01(\x0b\x32\'.livekit.proto.ClearAudioBufferResponseH\x00\x12G\n\x13new_audio_resampler\x18\x1d \x01(\x0b\x32(.livekit.proto.NewAudioResamplerResponseH\x00\x12\x45\n\x12remix_and_resample\x18\x1e \x01(\x0b\x32\'.livekit.proto.RemixAndResampleResponseH\x00\x12Z\n\x1d\x61udio_stream_from_participant\x18\x1f \x01(\x0b\x32\x31.livekit.proto.AudioStreamFromParticipantResponseH\x00\x12+\n\x04\x65\x32\x65\x65\x18 \x01(\x0b\x32\x1b.livekit.proto.E2eeResponseH\x00\x12\x43\n\x11new_sox_resampler\x18! \x01(\x0b\x32&.livekit.proto.NewSoxResamplerResponseH\x00\x12\x45\n\x12push_sox_resampler\x18\" \x01(\x0b\x32\'.livekit.proto.PushSoxResamplerResponseH\x00\x12G\n\x13\x66lush_sox_resampler\x18# \x01(\x0b\x32(.livekit.proto.FlushSoxResamplerResponseH\x00\x12\x43\n\x11send_chat_message\x18$ \x01(\x0b\x32&.livekit.proto.SendChatMessageResponseH\x00\x12\x38\n\x0bperform_rpc\x18% \x01(\x0b\x32!.livekit.proto.PerformRpcResponseH\x00\x12G\n\x13register_rpc_method\x18& \x01(\x0b\x32(.livekit.proto.RegisterRpcMethodResponseH\x00\x12K\n\x15unregister_rpc_method\x18\' \x01(\x0b\x32*.livekit.proto.UnregisterRpcMethodResponseH\x00\x12\\\n\x1erpc_method_invocation_response\x18( \x01(\x0b\x32\x32.livekit.proto.RpcMethodInvocationResponseResponseH\x00\x42\t\n\x07message\"\x8a\x0b\n\x08\x46\x66iEvent\x12.\n\nroom_event\x18\x01 \x01(\x0b\x32\x18.livekit.proto.RoomEventH\x00\x12\x30\n\x0btrack_event\x18\x02 \x01(\x0b\x32\x19.livekit.proto.TrackEventH\x00\x12=\n\x12video_stream_event\x18\x03 \x01(\x0b\x32\x1f.livekit.proto.VideoStreamEventH\x00\x12=\n\x12\x61udio_stream_event\x18\x04 \x01(\x0b\x32\x1f.livekit.proto.AudioStreamEventH\x00\x12\x31\n\x07\x63onnect\x18\x05 \x01(\x0b\x32\x1e.livekit.proto.ConnectCallbackH\x00\x12\x37\n\ndisconnect\x18\x07 \x01(\x0b\x32!.livekit.proto.DisconnectCallbackH\x00\x12\x31\n\x07\x64ispose\x18\x08 \x01(\x0b\x32\x1e.livekit.proto.DisposeCallbackH\x00\x12<\n\rpublish_track\x18\t \x01(\x0b\x32#.livekit.proto.PublishTrackCallbackH\x00\x12@\n\x0funpublish_track\x18\n \x01(\x0b\x32%.livekit.proto.UnpublishTrackCallbackH\x00\x12:\n\x0cpublish_data\x18\x0b \x01(\x0b\x32\".livekit.proto.PublishDataCallbackH\x00\x12L\n\x15publish_transcription\x18\x0c \x01(\x0b\x32+.livekit.proto.PublishTranscriptionCallbackH\x00\x12G\n\x13\x63\x61pture_audio_frame\x18\r \x01(\x0b\x32(.livekit.proto.CaptureAudioFrameCallbackH\x00\x12\x45\n\x12set_local_metadata\x18\x0e \x01(\x0b\x32\'.livekit.proto.SetLocalMetadataCallbackH\x00\x12=\n\x0eset_local_name\x18\x0f \x01(\x0b\x32#.livekit.proto.SetLocalNameCallbackH\x00\x12I\n\x14set_local_attributes\x18\x10 \x01(\x0b\x32).livekit.proto.SetLocalAttributesCallbackH\x00\x12\x34\n\tget_stats\x18\x11 \x01(\x0b\x32\x1f.livekit.proto.GetStatsCallbackH\x00\x12\'\n\x04logs\x18\x12 \x01(\x0b\x32\x17.livekit.proto.LogBatchH\x00\x12\x43\n\x11get_session_stats\x18\x13 \x01(\x0b\x32&.livekit.proto.GetSessionStatsCallbackH\x00\x12%\n\x05panic\x18\x14 \x01(\x0b\x32\x14.livekit.proto.PanicH\x00\x12\x41\n\x10publish_sip_dtmf\x18\x15 \x01(\x0b\x32%.livekit.proto.PublishSipDtmfCallbackH\x00\x12>\n\x0c\x63hat_message\x18\x16 \x01(\x0b\x32&.livekit.proto.SendChatMessageCallbackH\x00\x12\x38\n\x0bperform_rpc\x18\x17 \x01(\x0b\x32!.livekit.proto.PerformRpcCallbackH\x00\x12H\n\x15rpc_method_invocation\x18\x18 \x01(\x0b\x32\'.livekit.proto.RpcMethodInvocationEventH\x00\x42\t\n\x07message\"\x1f\n\x0e\x44isposeRequest\x12\r\n\x05\x61sync\x18\x01 \x02(\x08\"#\n\x0f\x44isposeResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"#\n\x0f\x44isposeCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\"\x85\x01\n\tLogRecord\x12&\n\x05level\x18\x01 \x02(\x0e\x32\x17.livekit.proto.LogLevel\x12\x0e\n\x06target\x18\x02 \x02(\t\x12\x13\n\x0bmodule_path\x18\x03 \x01(\t\x12\x0c\n\x04\x66ile\x18\x04 \x01(\t\x12\x0c\n\x04line\x18\x05 \x01(\r\x12\x0f\n\x07message\x18\x06 \x02(\t\"5\n\x08LogBatch\x12)\n\x07records\x18\x01 \x03(\x0b\x32\x18.livekit.proto.LogRecord\"\x18\n\x05Panic\x12\x0f\n\x07message\x18\x01 \x02(\t*S\n\x08LogLevel\x12\r\n\tLOG_ERROR\x10\x00\x12\x0c\n\x08LOG_WARN\x10\x01\x12\x0c\n\x08LOG_INFO\x10\x02\x12\r\n\tLOG_DEBUG\x10\x03\x12\r\n\tLOG_TRACE\x10\x04\x42\x10\xaa\x02\rLiveKit.Proto') ->>>>>>> origin/main _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -32,33 +28,13 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' -<<<<<<< HEAD - _globals['_LOGLEVEL']._serialized_start=7533 - _globals['_LOGLEVEL']._serialized_end=7616 -======= _globals['_LOGLEVEL']._serialized_start=7289 _globals['_LOGLEVEL']._serialized_end=7372 ->>>>>>> origin/main _globals['_FFIREQUEST']._serialized_start=115 _globals['_FFIREQUEST']._serialized_end=2841 _globals['_FFIRESPONSE']._serialized_start=2844 _globals['_FFIRESPONSE']._serialized_end=5542 _globals['_FFIEVENT']._serialized_start=5545 -<<<<<<< HEAD - _globals['_FFIEVENT']._serialized_end=7207 - _globals['_DISPOSEREQUEST']._serialized_start=7209 - _globals['_DISPOSEREQUEST']._serialized_end=7240 - _globals['_DISPOSERESPONSE']._serialized_start=7242 - _globals['_DISPOSERESPONSE']._serialized_end=7277 - _globals['_DISPOSECALLBACK']._serialized_start=7279 - _globals['_DISPOSECALLBACK']._serialized_end=7314 - _globals['_LOGRECORD']._serialized_start=7317 - _globals['_LOGRECORD']._serialized_end=7450 - _globals['_LOGBATCH']._serialized_start=7452 - _globals['_LOGBATCH']._serialized_end=7505 - _globals['_PANIC']._serialized_start=7507 - _globals['_PANIC']._serialized_end=7531 -======= _globals['_FFIEVENT']._serialized_end=6963 _globals['_DISPOSEREQUEST']._serialized_start=6965 _globals['_DISPOSEREQUEST']._serialized_end=6996 @@ -72,5 +48,4 @@ _globals['_LOGBATCH']._serialized_end=7261 _globals['_PANIC']._serialized_start=7263 _globals['_PANIC']._serialized_end=7287 ->>>>>>> origin/main # @@protoc_insertion_point(module_scope) diff --git a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi index 1d4aadbd..5799ce3f 100644 --- a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi +++ b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi @@ -26,10 +26,7 @@ import google.protobuf.internal.enum_type_wrapper import google.protobuf.message from . import room_pb2 from . import rpc_pb2 -<<<<<<< HEAD -======= import sys ->>>>>>> origin/main from . import track_pb2 import typing from . import video_frame_pb2 @@ -219,65 +216,13 @@ class FfiRequest(google.protobuf.message.Message): @property def perform_rpc(self) -> rpc_pb2.PerformRpcRequest: """RPC""" -<<<<<<< HEAD - pass -======= ->>>>>>> origin/main @property def register_rpc_method(self) -> rpc_pb2.RegisterRpcMethodRequest: ... @property def unregister_rpc_method(self) -> rpc_pb2.UnregisterRpcMethodRequest: ... @property def rpc_method_invocation_response(self) -> rpc_pb2.RpcMethodInvocationResponseRequest: ... -<<<<<<< HEAD - def __init__(self, - *, - dispose: typing.Optional[global___DisposeRequest] = ..., - connect: typing.Optional[room_pb2.ConnectRequest] = ..., - disconnect: typing.Optional[room_pb2.DisconnectRequest] = ..., - publish_track: typing.Optional[room_pb2.PublishTrackRequest] = ..., - unpublish_track: typing.Optional[room_pb2.UnpublishTrackRequest] = ..., - publish_data: typing.Optional[room_pb2.PublishDataRequest] = ..., - set_subscribed: typing.Optional[room_pb2.SetSubscribedRequest] = ..., - set_local_metadata: typing.Optional[room_pb2.SetLocalMetadataRequest] = ..., - set_local_name: typing.Optional[room_pb2.SetLocalNameRequest] = ..., - set_local_attributes: typing.Optional[room_pb2.SetLocalAttributesRequest] = ..., - get_session_stats: typing.Optional[room_pb2.GetSessionStatsRequest] = ..., - publish_transcription: typing.Optional[room_pb2.PublishTranscriptionRequest] = ..., - publish_sip_dtmf: typing.Optional[room_pb2.PublishSipDtmfRequest] = ..., - create_video_track: typing.Optional[track_pb2.CreateVideoTrackRequest] = ..., - create_audio_track: typing.Optional[track_pb2.CreateAudioTrackRequest] = ..., - local_track_mute: typing.Optional[track_pb2.LocalTrackMuteRequest] = ..., - enable_remote_track: typing.Optional[track_pb2.EnableRemoteTrackRequest] = ..., - get_stats: typing.Optional[track_pb2.GetStatsRequest] = ..., - new_video_stream: typing.Optional[video_frame_pb2.NewVideoStreamRequest] = ..., - new_video_source: typing.Optional[video_frame_pb2.NewVideoSourceRequest] = ..., - capture_video_frame: typing.Optional[video_frame_pb2.CaptureVideoFrameRequest] = ..., - video_convert: typing.Optional[video_frame_pb2.VideoConvertRequest] = ..., - video_stream_from_participant: typing.Optional[video_frame_pb2.VideoStreamFromParticipantRequest] = ..., - new_audio_stream: typing.Optional[audio_frame_pb2.NewAudioStreamRequest] = ..., - new_audio_source: typing.Optional[audio_frame_pb2.NewAudioSourceRequest] = ..., - capture_audio_frame: typing.Optional[audio_frame_pb2.CaptureAudioFrameRequest] = ..., - clear_audio_buffer: typing.Optional[audio_frame_pb2.ClearAudioBufferRequest] = ..., - new_audio_resampler: typing.Optional[audio_frame_pb2.NewAudioResamplerRequest] = ..., - remix_and_resample: typing.Optional[audio_frame_pb2.RemixAndResampleRequest] = ..., - e2ee: typing.Optional[e2ee_pb2.E2eeRequest] = ..., - audio_stream_from_participant: typing.Optional[audio_frame_pb2.AudioStreamFromParticipantRequest] = ..., - new_sox_resampler: typing.Optional[audio_frame_pb2.NewSoxResamplerRequest] = ..., - push_sox_resampler: typing.Optional[audio_frame_pb2.PushSoxResamplerRequest] = ..., - flush_sox_resampler: typing.Optional[audio_frame_pb2.FlushSoxResamplerRequest] = ..., - send_chat_message: typing.Optional[room_pb2.SendChatMessageRequest] = ..., - edit_chat_message: typing.Optional[room_pb2.EditChatMessageRequest] = ..., - perform_rpc: typing.Optional[rpc_pb2.PerformRpcRequest] = ..., - register_rpc_method: typing.Optional[rpc_pb2.RegisterRpcMethodRequest] = ..., - unregister_rpc_method: typing.Optional[rpc_pb2.UnregisterRpcMethodRequest] = ..., - rpc_method_invocation_response: typing.Optional[rpc_pb2.RpcMethodInvocationResponseRequest] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["audio_stream_from_participant",b"audio_stream_from_participant","capture_audio_frame",b"capture_audio_frame","capture_video_frame",b"capture_video_frame","clear_audio_buffer",b"clear_audio_buffer","connect",b"connect","create_audio_track",b"create_audio_track","create_video_track",b"create_video_track","disconnect",b"disconnect","dispose",b"dispose","e2ee",b"e2ee","edit_chat_message",b"edit_chat_message","enable_remote_track",b"enable_remote_track","flush_sox_resampler",b"flush_sox_resampler","get_session_stats",b"get_session_stats","get_stats",b"get_stats","local_track_mute",b"local_track_mute","message",b"message","new_audio_resampler",b"new_audio_resampler","new_audio_source",b"new_audio_source","new_audio_stream",b"new_audio_stream","new_sox_resampler",b"new_sox_resampler","new_video_source",b"new_video_source","new_video_stream",b"new_video_stream","perform_rpc",b"perform_rpc","publish_data",b"publish_data","publish_sip_dtmf",b"publish_sip_dtmf","publish_track",b"publish_track","publish_transcription",b"publish_transcription","push_sox_resampler",b"push_sox_resampler","register_rpc_method",b"register_rpc_method","remix_and_resample",b"remix_and_resample","rpc_method_invocation_response",b"rpc_method_invocation_response","send_chat_message",b"send_chat_message","set_local_attributes",b"set_local_attributes","set_local_metadata",b"set_local_metadata","set_local_name",b"set_local_name","set_subscribed",b"set_subscribed","unpublish_track",b"unpublish_track","unregister_rpc_method",b"unregister_rpc_method","video_convert",b"video_convert","video_stream_from_participant",b"video_stream_from_participant"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["audio_stream_from_participant",b"audio_stream_from_participant","capture_audio_frame",b"capture_audio_frame","capture_video_frame",b"capture_video_frame","clear_audio_buffer",b"clear_audio_buffer","connect",b"connect","create_audio_track",b"create_audio_track","create_video_track",b"create_video_track","disconnect",b"disconnect","dispose",b"dispose","e2ee",b"e2ee","edit_chat_message",b"edit_chat_message","enable_remote_track",b"enable_remote_track","flush_sox_resampler",b"flush_sox_resampler","get_session_stats",b"get_session_stats","get_stats",b"get_stats","local_track_mute",b"local_track_mute","message",b"message","new_audio_resampler",b"new_audio_resampler","new_audio_source",b"new_audio_source","new_audio_stream",b"new_audio_stream","new_sox_resampler",b"new_sox_resampler","new_video_source",b"new_video_source","new_video_stream",b"new_video_stream","perform_rpc",b"perform_rpc","publish_data",b"publish_data","publish_sip_dtmf",b"publish_sip_dtmf","publish_track",b"publish_track","publish_transcription",b"publish_transcription","push_sox_resampler",b"push_sox_resampler","register_rpc_method",b"register_rpc_method","remix_and_resample",b"remix_and_resample","rpc_method_invocation_response",b"rpc_method_invocation_response","send_chat_message",b"send_chat_message","set_local_attributes",b"set_local_attributes","set_local_metadata",b"set_local_metadata","set_local_name",b"set_local_name","set_subscribed",b"set_subscribed","unpublish_track",b"unpublish_track","unregister_rpc_method",b"unregister_rpc_method","video_convert",b"video_convert","video_stream_from_participant",b"video_stream_from_participant"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["message",b"message"]) -> typing.Optional[typing_extensions.Literal["dispose","connect","disconnect","publish_track","unpublish_track","publish_data","set_subscribed","set_local_metadata","set_local_name","set_local_attributes","get_session_stats","publish_transcription","publish_sip_dtmf","create_video_track","create_audio_track","local_track_mute","enable_remote_track","get_stats","new_video_stream","new_video_source","capture_video_frame","video_convert","video_stream_from_participant","new_audio_stream","new_audio_source","capture_audio_frame","clear_audio_buffer","new_audio_resampler","remix_and_resample","e2ee","audio_stream_from_participant","new_sox_resampler","push_sox_resampler","flush_sox_resampler","send_chat_message","edit_chat_message","perform_rpc","register_rpc_method","unregister_rpc_method","rpc_method_invocation_response"]]: ... -======= def __init__( self, *, @@ -326,7 +271,6 @@ class FfiRequest(google.protobuf.message.Message): def ClearField(self, field_name: typing.Literal["audio_stream_from_participant", b"audio_stream_from_participant", "capture_audio_frame", b"capture_audio_frame", "capture_video_frame", b"capture_video_frame", "clear_audio_buffer", b"clear_audio_buffer", "connect", b"connect", "create_audio_track", b"create_audio_track", "create_video_track", b"create_video_track", "disconnect", b"disconnect", "dispose", b"dispose", "e2ee", b"e2ee", "edit_chat_message", b"edit_chat_message", "enable_remote_track", b"enable_remote_track", "flush_sox_resampler", b"flush_sox_resampler", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "local_track_mute", b"local_track_mute", "message", b"message", "new_audio_resampler", b"new_audio_resampler", "new_audio_source", b"new_audio_source", "new_audio_stream", b"new_audio_stream", "new_sox_resampler", b"new_sox_resampler", "new_video_source", b"new_video_source", "new_video_stream", b"new_video_stream", "perform_rpc", b"perform_rpc", "publish_data", b"publish_data", "publish_sip_dtmf", b"publish_sip_dtmf", "publish_track", b"publish_track", "publish_transcription", b"publish_transcription", "push_sox_resampler", b"push_sox_resampler", "register_rpc_method", b"register_rpc_method", "remix_and_resample", b"remix_and_resample", "rpc_method_invocation_response", b"rpc_method_invocation_response", "send_chat_message", b"send_chat_message", "set_local_attributes", b"set_local_attributes", "set_local_metadata", b"set_local_metadata", "set_local_name", b"set_local_name", "set_subscribed", b"set_subscribed", "unpublish_track", b"unpublish_track", "unregister_rpc_method", b"unregister_rpc_method", "video_convert", b"video_convert", "video_stream_from_participant", b"video_stream_from_participant"]) -> None: ... def WhichOneof(self, oneof_group: typing.Literal["message", b"message"]) -> typing.Literal["dispose", "connect", "disconnect", "publish_track", "unpublish_track", "publish_data", "set_subscribed", "set_local_metadata", "set_local_name", "set_local_attributes", "get_session_stats", "publish_transcription", "publish_sip_dtmf", "create_video_track", "create_audio_track", "local_track_mute", "enable_remote_track", "get_stats", "new_video_stream", "new_video_source", "capture_video_frame", "video_convert", "video_stream_from_participant", "new_audio_stream", "new_audio_source", "capture_audio_frame", "clear_audio_buffer", "new_audio_resampler", "remix_and_resample", "e2ee", "audio_stream_from_participant", "new_sox_resampler", "push_sox_resampler", "flush_sox_resampler", "send_chat_message", "edit_chat_message", "perform_rpc", "register_rpc_method", "unregister_rpc_method", "rpc_method_invocation_response"] | None: ... ->>>>>>> origin/main global___FfiRequest = FfiRequest @typing.final @@ -455,64 +399,13 @@ class FfiResponse(google.protobuf.message.Message): @property def perform_rpc(self) -> rpc_pb2.PerformRpcResponse: """RPC""" -<<<<<<< HEAD - pass -======= ->>>>>>> origin/main @property def register_rpc_method(self) -> rpc_pb2.RegisterRpcMethodResponse: ... @property def unregister_rpc_method(self) -> rpc_pb2.UnregisterRpcMethodResponse: ... @property def rpc_method_invocation_response(self) -> rpc_pb2.RpcMethodInvocationResponseResponse: ... -<<<<<<< HEAD - def __init__(self, - *, - dispose: typing.Optional[global___DisposeResponse] = ..., - connect: typing.Optional[room_pb2.ConnectResponse] = ..., - disconnect: typing.Optional[room_pb2.DisconnectResponse] = ..., - publish_track: typing.Optional[room_pb2.PublishTrackResponse] = ..., - unpublish_track: typing.Optional[room_pb2.UnpublishTrackResponse] = ..., - publish_data: typing.Optional[room_pb2.PublishDataResponse] = ..., - set_subscribed: typing.Optional[room_pb2.SetSubscribedResponse] = ..., - set_local_metadata: typing.Optional[room_pb2.SetLocalMetadataResponse] = ..., - set_local_name: typing.Optional[room_pb2.SetLocalNameResponse] = ..., - set_local_attributes: typing.Optional[room_pb2.SetLocalAttributesResponse] = ..., - get_session_stats: typing.Optional[room_pb2.GetSessionStatsResponse] = ..., - publish_transcription: typing.Optional[room_pb2.PublishTranscriptionResponse] = ..., - publish_sip_dtmf: typing.Optional[room_pb2.PublishSipDtmfResponse] = ..., - create_video_track: typing.Optional[track_pb2.CreateVideoTrackResponse] = ..., - create_audio_track: typing.Optional[track_pb2.CreateAudioTrackResponse] = ..., - local_track_mute: typing.Optional[track_pb2.LocalTrackMuteResponse] = ..., - enable_remote_track: typing.Optional[track_pb2.EnableRemoteTrackResponse] = ..., - get_stats: typing.Optional[track_pb2.GetStatsResponse] = ..., - new_video_stream: typing.Optional[video_frame_pb2.NewVideoStreamResponse] = ..., - new_video_source: typing.Optional[video_frame_pb2.NewVideoSourceResponse] = ..., - capture_video_frame: typing.Optional[video_frame_pb2.CaptureVideoFrameResponse] = ..., - video_convert: typing.Optional[video_frame_pb2.VideoConvertResponse] = ..., - video_stream_from_participant: typing.Optional[video_frame_pb2.VideoStreamFromParticipantResponse] = ..., - new_audio_stream: typing.Optional[audio_frame_pb2.NewAudioStreamResponse] = ..., - new_audio_source: typing.Optional[audio_frame_pb2.NewAudioSourceResponse] = ..., - capture_audio_frame: typing.Optional[audio_frame_pb2.CaptureAudioFrameResponse] = ..., - clear_audio_buffer: typing.Optional[audio_frame_pb2.ClearAudioBufferResponse] = ..., - new_audio_resampler: typing.Optional[audio_frame_pb2.NewAudioResamplerResponse] = ..., - remix_and_resample: typing.Optional[audio_frame_pb2.RemixAndResampleResponse] = ..., - audio_stream_from_participant: typing.Optional[audio_frame_pb2.AudioStreamFromParticipantResponse] = ..., - e2ee: typing.Optional[e2ee_pb2.E2eeResponse] = ..., - new_sox_resampler: typing.Optional[audio_frame_pb2.NewSoxResamplerResponse] = ..., - push_sox_resampler: typing.Optional[audio_frame_pb2.PushSoxResamplerResponse] = ..., - flush_sox_resampler: typing.Optional[audio_frame_pb2.FlushSoxResamplerResponse] = ..., - send_chat_message: typing.Optional[room_pb2.SendChatMessageResponse] = ..., - perform_rpc: typing.Optional[rpc_pb2.PerformRpcResponse] = ..., - register_rpc_method: typing.Optional[rpc_pb2.RegisterRpcMethodResponse] = ..., - unregister_rpc_method: typing.Optional[rpc_pb2.UnregisterRpcMethodResponse] = ..., - rpc_method_invocation_response: typing.Optional[rpc_pb2.RpcMethodInvocationResponseResponse] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["audio_stream_from_participant",b"audio_stream_from_participant","capture_audio_frame",b"capture_audio_frame","capture_video_frame",b"capture_video_frame","clear_audio_buffer",b"clear_audio_buffer","connect",b"connect","create_audio_track",b"create_audio_track","create_video_track",b"create_video_track","disconnect",b"disconnect","dispose",b"dispose","e2ee",b"e2ee","enable_remote_track",b"enable_remote_track","flush_sox_resampler",b"flush_sox_resampler","get_session_stats",b"get_session_stats","get_stats",b"get_stats","local_track_mute",b"local_track_mute","message",b"message","new_audio_resampler",b"new_audio_resampler","new_audio_source",b"new_audio_source","new_audio_stream",b"new_audio_stream","new_sox_resampler",b"new_sox_resampler","new_video_source",b"new_video_source","new_video_stream",b"new_video_stream","perform_rpc",b"perform_rpc","publish_data",b"publish_data","publish_sip_dtmf",b"publish_sip_dtmf","publish_track",b"publish_track","publish_transcription",b"publish_transcription","push_sox_resampler",b"push_sox_resampler","register_rpc_method",b"register_rpc_method","remix_and_resample",b"remix_and_resample","rpc_method_invocation_response",b"rpc_method_invocation_response","send_chat_message",b"send_chat_message","set_local_attributes",b"set_local_attributes","set_local_metadata",b"set_local_metadata","set_local_name",b"set_local_name","set_subscribed",b"set_subscribed","unpublish_track",b"unpublish_track","unregister_rpc_method",b"unregister_rpc_method","video_convert",b"video_convert","video_stream_from_participant",b"video_stream_from_participant"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["audio_stream_from_participant",b"audio_stream_from_participant","capture_audio_frame",b"capture_audio_frame","capture_video_frame",b"capture_video_frame","clear_audio_buffer",b"clear_audio_buffer","connect",b"connect","create_audio_track",b"create_audio_track","create_video_track",b"create_video_track","disconnect",b"disconnect","dispose",b"dispose","e2ee",b"e2ee","enable_remote_track",b"enable_remote_track","flush_sox_resampler",b"flush_sox_resampler","get_session_stats",b"get_session_stats","get_stats",b"get_stats","local_track_mute",b"local_track_mute","message",b"message","new_audio_resampler",b"new_audio_resampler","new_audio_source",b"new_audio_source","new_audio_stream",b"new_audio_stream","new_sox_resampler",b"new_sox_resampler","new_video_source",b"new_video_source","new_video_stream",b"new_video_stream","perform_rpc",b"perform_rpc","publish_data",b"publish_data","publish_sip_dtmf",b"publish_sip_dtmf","publish_track",b"publish_track","publish_transcription",b"publish_transcription","push_sox_resampler",b"push_sox_resampler","register_rpc_method",b"register_rpc_method","remix_and_resample",b"remix_and_resample","rpc_method_invocation_response",b"rpc_method_invocation_response","send_chat_message",b"send_chat_message","set_local_attributes",b"set_local_attributes","set_local_metadata",b"set_local_metadata","set_local_name",b"set_local_name","set_subscribed",b"set_subscribed","unpublish_track",b"unpublish_track","unregister_rpc_method",b"unregister_rpc_method","video_convert",b"video_convert","video_stream_from_participant",b"video_stream_from_participant"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["message",b"message"]) -> typing.Optional[typing_extensions.Literal["dispose","connect","disconnect","publish_track","unpublish_track","publish_data","set_subscribed","set_local_metadata","set_local_name","set_local_attributes","get_session_stats","publish_transcription","publish_sip_dtmf","create_video_track","create_audio_track","local_track_mute","enable_remote_track","get_stats","new_video_stream","new_video_source","capture_video_frame","video_convert","video_stream_from_participant","new_audio_stream","new_audio_source","capture_audio_frame","clear_audio_buffer","new_audio_resampler","remix_and_resample","audio_stream_from_participant","e2ee","new_sox_resampler","push_sox_resampler","flush_sox_resampler","send_chat_message","perform_rpc","register_rpc_method","unregister_rpc_method","rpc_method_invocation_response"]]: ... -======= def __init__( self, *, @@ -560,7 +453,6 @@ class FfiResponse(google.protobuf.message.Message): def ClearField(self, field_name: typing.Literal["audio_stream_from_participant", b"audio_stream_from_participant", "capture_audio_frame", b"capture_audio_frame", "capture_video_frame", b"capture_video_frame", "clear_audio_buffer", b"clear_audio_buffer", "connect", b"connect", "create_audio_track", b"create_audio_track", "create_video_track", b"create_video_track", "disconnect", b"disconnect", "dispose", b"dispose", "e2ee", b"e2ee", "enable_remote_track", b"enable_remote_track", "flush_sox_resampler", b"flush_sox_resampler", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "local_track_mute", b"local_track_mute", "message", b"message", "new_audio_resampler", b"new_audio_resampler", "new_audio_source", b"new_audio_source", "new_audio_stream", b"new_audio_stream", "new_sox_resampler", b"new_sox_resampler", "new_video_source", b"new_video_source", "new_video_stream", b"new_video_stream", "perform_rpc", b"perform_rpc", "publish_data", b"publish_data", "publish_sip_dtmf", b"publish_sip_dtmf", "publish_track", b"publish_track", "publish_transcription", b"publish_transcription", "push_sox_resampler", b"push_sox_resampler", "register_rpc_method", b"register_rpc_method", "remix_and_resample", b"remix_and_resample", "rpc_method_invocation_response", b"rpc_method_invocation_response", "send_chat_message", b"send_chat_message", "set_local_attributes", b"set_local_attributes", "set_local_metadata", b"set_local_metadata", "set_local_name", b"set_local_name", "set_subscribed", b"set_subscribed", "unpublish_track", b"unpublish_track", "unregister_rpc_method", b"unregister_rpc_method", "video_convert", b"video_convert", "video_stream_from_participant", b"video_stream_from_participant"]) -> None: ... def WhichOneof(self, oneof_group: typing.Literal["message", b"message"]) -> typing.Literal["dispose", "connect", "disconnect", "publish_track", "unpublish_track", "publish_data", "set_subscribed", "set_local_metadata", "set_local_name", "set_local_attributes", "get_session_stats", "publish_transcription", "publish_sip_dtmf", "create_video_track", "create_audio_track", "local_track_mute", "enable_remote_track", "get_stats", "new_video_stream", "new_video_source", "capture_video_frame", "video_convert", "video_stream_from_participant", "new_audio_stream", "new_audio_source", "capture_audio_frame", "clear_audio_buffer", "new_audio_resampler", "remix_and_resample", "audio_stream_from_participant", "e2ee", "new_sox_resampler", "push_sox_resampler", "flush_sox_resampler", "send_chat_message", "perform_rpc", "register_rpc_method", "unregister_rpc_method", "rpc_method_invocation_response"] | None: ... ->>>>>>> origin/main global___FfiResponse = FfiResponse @typing.final @@ -594,14 +486,7 @@ class FfiEvent(google.protobuf.message.Message): PUBLISH_SIP_DTMF_FIELD_NUMBER: builtins.int CHAT_MESSAGE_FIELD_NUMBER: builtins.int PERFORM_RPC_FIELD_NUMBER: builtins.int -<<<<<<< HEAD - REGISTER_RPC_METHOD_FIELD_NUMBER: builtins.int - UNREGISTER_RPC_METHOD_FIELD_NUMBER: builtins.int - RPC_METHOD_INVOCATION_FIELD_NUMBER: builtins.int - RPC_METHOD_INVOCATION_RESPONSE_FIELD_NUMBER: builtins.int -======= RPC_METHOD_INVOCATION_FIELD_NUMBER: builtins.int ->>>>>>> origin/main @property def room_event(self) -> room_pb2.RoomEvent: ... @property @@ -647,47 +532,6 @@ class FfiEvent(google.protobuf.message.Message): @property def perform_rpc(self) -> rpc_pb2.PerformRpcCallback: ... @property -<<<<<<< HEAD - def register_rpc_method(self) -> rpc_pb2.RegisterRpcMethodCallback: ... - @property - def unregister_rpc_method(self) -> rpc_pb2.UnregisterRpcMethodCallback: ... - @property - def rpc_method_invocation(self) -> rpc_pb2.RpcMethodInvocationEvent: ... - @property - def rpc_method_invocation_response(self) -> rpc_pb2.RpcMethodInvocationResponseCallback: ... - def __init__(self, - *, - room_event: typing.Optional[room_pb2.RoomEvent] = ..., - track_event: typing.Optional[track_pb2.TrackEvent] = ..., - video_stream_event: typing.Optional[video_frame_pb2.VideoStreamEvent] = ..., - audio_stream_event: typing.Optional[audio_frame_pb2.AudioStreamEvent] = ..., - connect: typing.Optional[room_pb2.ConnectCallback] = ..., - disconnect: typing.Optional[room_pb2.DisconnectCallback] = ..., - dispose: typing.Optional[global___DisposeCallback] = ..., - publish_track: typing.Optional[room_pb2.PublishTrackCallback] = ..., - unpublish_track: typing.Optional[room_pb2.UnpublishTrackCallback] = ..., - publish_data: typing.Optional[room_pb2.PublishDataCallback] = ..., - publish_transcription: typing.Optional[room_pb2.PublishTranscriptionCallback] = ..., - capture_audio_frame: typing.Optional[audio_frame_pb2.CaptureAudioFrameCallback] = ..., - set_local_metadata: typing.Optional[room_pb2.SetLocalMetadataCallback] = ..., - set_local_name: typing.Optional[room_pb2.SetLocalNameCallback] = ..., - set_local_attributes: typing.Optional[room_pb2.SetLocalAttributesCallback] = ..., - get_stats: typing.Optional[track_pb2.GetStatsCallback] = ..., - logs: typing.Optional[global___LogBatch] = ..., - get_session_stats: typing.Optional[room_pb2.GetSessionStatsCallback] = ..., - panic: typing.Optional[global___Panic] = ..., - publish_sip_dtmf: typing.Optional[room_pb2.PublishSipDtmfCallback] = ..., - chat_message: typing.Optional[room_pb2.SendChatMessageCallback] = ..., - perform_rpc: typing.Optional[rpc_pb2.PerformRpcCallback] = ..., - register_rpc_method: typing.Optional[rpc_pb2.RegisterRpcMethodCallback] = ..., - unregister_rpc_method: typing.Optional[rpc_pb2.UnregisterRpcMethodCallback] = ..., - rpc_method_invocation: typing.Optional[rpc_pb2.RpcMethodInvocationEvent] = ..., - rpc_method_invocation_response: typing.Optional[rpc_pb2.RpcMethodInvocationResponseCallback] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["audio_stream_event",b"audio_stream_event","capture_audio_frame",b"capture_audio_frame","chat_message",b"chat_message","connect",b"connect","disconnect",b"disconnect","dispose",b"dispose","get_session_stats",b"get_session_stats","get_stats",b"get_stats","logs",b"logs","message",b"message","panic",b"panic","perform_rpc",b"perform_rpc","publish_data",b"publish_data","publish_sip_dtmf",b"publish_sip_dtmf","publish_track",b"publish_track","publish_transcription",b"publish_transcription","register_rpc_method",b"register_rpc_method","room_event",b"room_event","rpc_method_invocation",b"rpc_method_invocation","rpc_method_invocation_response",b"rpc_method_invocation_response","set_local_attributes",b"set_local_attributes","set_local_metadata",b"set_local_metadata","set_local_name",b"set_local_name","track_event",b"track_event","unpublish_track",b"unpublish_track","unregister_rpc_method",b"unregister_rpc_method","video_stream_event",b"video_stream_event"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["audio_stream_event",b"audio_stream_event","capture_audio_frame",b"capture_audio_frame","chat_message",b"chat_message","connect",b"connect","disconnect",b"disconnect","dispose",b"dispose","get_session_stats",b"get_session_stats","get_stats",b"get_stats","logs",b"logs","message",b"message","panic",b"panic","perform_rpc",b"perform_rpc","publish_data",b"publish_data","publish_sip_dtmf",b"publish_sip_dtmf","publish_track",b"publish_track","publish_transcription",b"publish_transcription","register_rpc_method",b"register_rpc_method","room_event",b"room_event","rpc_method_invocation",b"rpc_method_invocation","rpc_method_invocation_response",b"rpc_method_invocation_response","set_local_attributes",b"set_local_attributes","set_local_metadata",b"set_local_metadata","set_local_name",b"set_local_name","track_event",b"track_event","unpublish_track",b"unpublish_track","unregister_rpc_method",b"unregister_rpc_method","video_stream_event",b"video_stream_event"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["message",b"message"]) -> typing.Optional[typing_extensions.Literal["room_event","track_event","video_stream_event","audio_stream_event","connect","disconnect","dispose","publish_track","unpublish_track","publish_data","publish_transcription","capture_audio_frame","set_local_metadata","set_local_name","set_local_attributes","get_stats","logs","get_session_stats","panic","publish_sip_dtmf","chat_message","perform_rpc","register_rpc_method","unregister_rpc_method","rpc_method_invocation","rpc_method_invocation_response"]]: ... -======= def rpc_method_invocation(self) -> rpc_pb2.RpcMethodInvocationEvent: ... def __init__( self, @@ -720,7 +564,6 @@ class FfiEvent(google.protobuf.message.Message): def ClearField(self, field_name: typing.Literal["audio_stream_event", b"audio_stream_event", "capture_audio_frame", b"capture_audio_frame", "chat_message", b"chat_message", "connect", b"connect", "disconnect", b"disconnect", "dispose", b"dispose", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "logs", b"logs", "message", b"message", "panic", b"panic", "perform_rpc", b"perform_rpc", "publish_data", b"publish_data", "publish_sip_dtmf", b"publish_sip_dtmf", "publish_track", b"publish_track", "publish_transcription", b"publish_transcription", "room_event", b"room_event", "rpc_method_invocation", b"rpc_method_invocation", "set_local_attributes", b"set_local_attributes", "set_local_metadata", b"set_local_metadata", "set_local_name", b"set_local_name", "track_event", b"track_event", "unpublish_track", b"unpublish_track", "video_stream_event", b"video_stream_event"]) -> None: ... def WhichOneof(self, oneof_group: typing.Literal["message", b"message"]) -> typing.Literal["room_event", "track_event", "video_stream_event", "audio_stream_event", "connect", "disconnect", "dispose", "publish_track", "unpublish_track", "publish_data", "publish_transcription", "capture_audio_frame", "set_local_metadata", "set_local_name", "set_local_attributes", "get_stats", "logs", "get_session_stats", "panic", "publish_sip_dtmf", "chat_message", "perform_rpc", "rpc_method_invocation"] | None: ... ->>>>>>> origin/main global___FfiEvent = FfiEvent @typing.final diff --git a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py index e2918f20..eeb1f9ff 100644 --- a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.py @@ -1,24 +1,5 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -<<<<<<< HEAD -# NO CHECKED-IN PROTOBUF GENCODE -# source: rpc.proto -# Protobuf Python Version: 5.27.1 -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import runtime_version as _runtime_version -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder -_runtime_version.ValidateProtobufRuntimeVersion( - _runtime_version.Domain.PUBLIC, - 5, - 27, - 1, - '', - 'rpc.proto' -) -======= # source: rpc.proto # Protobuf Python Version: 4.25.1 """Generated protocol buffer code.""" @@ -26,7 +7,6 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder ->>>>>>> origin/main # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -34,22 +14,13 @@ -<<<<<<< HEAD -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\trpc.proto\x12\rlivekit.proto\"7\n\x08RpcError\x12\x0c\n\x04\x63ode\x18\x01 \x02(\r\x12\x0f\n\x07message\x18\x02 \x02(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\t\"\x91\x01\n\x11PerformRpcRequest\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x1c\n\x14\x64\x65stination_identity\x18\x02 \x02(\t\x12\x0e\n\x06method\x18\x03 \x02(\t\x12\x0f\n\x07payload\x18\x04 \x02(\t\x12\x1b\n\x13response_timeout_ms\x18\x05 \x01(\r\"L\n\x18RegisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x0e\n\x06method\x18\x02 \x02(\t\"N\n\x1aUnregisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x0e\n\x06method\x18\x02 \x02(\t\"\x96\x01\n\"RpcMethodInvocationResponseRequest\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x15\n\rinvocation_id\x18\x02 \x02(\x04\x12\x0f\n\x07payload\x18\x03 \x01(\t\x12&\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x17.livekit.proto.RpcError\"&\n\x12PerformRpcResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\"-\n\x19RegisterRpcMethodResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\"/\n\x1bUnregisterRpcMethodResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\"7\n#RpcMethodInvocationResponseResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\"_\n\x12PerformRpcCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\x12\x0f\n\x07payload\x18\x02 \x01(\t\x12&\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x17.livekit.proto.RpcError\"-\n\x19RegisterRpcMethodCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\"/\n\x1bUnregisterRpcMethodCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\"F\n#RpcMethodInvocationResponseCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"\xbe\x01\n\x18RpcMethodInvocationEvent\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x15\n\rinvocation_id\x18\x02 \x02(\x04\x12\x0e\n\x06method\x18\x03 \x02(\t\x12\x12\n\nrequest_id\x18\x04 \x02(\t\x12\x17\n\x0f\x63\x61ller_identity\x18\x05 \x02(\t\x12\x0f\n\x07payload\x18\x06 \x02(\t\x12\x1b\n\x13response_timeout_ms\x18\x07 \x02(\rB\x10\xaa\x02\rLiveKit.Proto') -======= DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\trpc.proto\x12\rlivekit.proto\"7\n\x08RpcError\x12\x0c\n\x04\x63ode\x18\x01 \x02(\r\x12\x0f\n\x07message\x18\x02 \x02(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\t\"\x91\x01\n\x11PerformRpcRequest\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x1c\n\x14\x64\x65stination_identity\x18\x02 \x02(\t\x12\x0e\n\x06method\x18\x03 \x02(\t\x12\x0f\n\x07payload\x18\x04 \x02(\t\x12\x1b\n\x13response_timeout_ms\x18\x05 \x01(\r\"L\n\x18RegisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x0e\n\x06method\x18\x02 \x02(\t\"N\n\x1aUnregisterRpcMethodRequest\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x0e\n\x06method\x18\x02 \x02(\t\"\x96\x01\n\"RpcMethodInvocationResponseRequest\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x15\n\rinvocation_id\x18\x02 \x02(\x04\x12\x0f\n\x07payload\x18\x03 \x01(\t\x12&\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x17.livekit.proto.RpcError\"&\n\x12PerformRpcResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\"\x1b\n\x19RegisterRpcMethodResponse\"\x1d\n\x1bUnregisterRpcMethodResponse\"4\n#RpcMethodInvocationResponseResponse\x12\r\n\x05\x65rror\x18\x01 \x01(\t\"_\n\x12PerformRpcCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x02(\x04\x12\x0f\n\x07payload\x18\x02 \x01(\t\x12&\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x17.livekit.proto.RpcError\"\xbe\x01\n\x18RpcMethodInvocationEvent\x12 \n\x18local_participant_handle\x18\x01 \x02(\x04\x12\x15\n\rinvocation_id\x18\x02 \x02(\x04\x12\x0e\n\x06method\x18\x03 \x02(\t\x12\x12\n\nrequest_id\x18\x04 \x02(\t\x12\x17\n\x0f\x63\x61ller_identity\x18\x05 \x02(\t\x12\x0f\n\x07payload\x18\x06 \x02(\t\x12\x1b\n\x13response_timeout_ms\x18\x07 \x02(\rB\x10\xaa\x02\rLiveKit.Proto') ->>>>>>> origin/main _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'rpc_pb2', _globals) -<<<<<<< HEAD -if not _descriptor._USE_C_DESCRIPTORS: - _globals['DESCRIPTOR']._loaded_options = None -======= if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None ->>>>>>> origin/main _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' _globals['_RPCERROR']._serialized_start=28 _globals['_RPCERROR']._serialized_end=83 @@ -64,23 +35,6 @@ _globals['_PERFORMRPCRESPONSE']._serialized_start=544 _globals['_PERFORMRPCRESPONSE']._serialized_end=582 _globals['_REGISTERRPCMETHODRESPONSE']._serialized_start=584 -<<<<<<< HEAD - _globals['_REGISTERRPCMETHODRESPONSE']._serialized_end=629 - _globals['_UNREGISTERRPCMETHODRESPONSE']._serialized_start=631 - _globals['_UNREGISTERRPCMETHODRESPONSE']._serialized_end=678 - _globals['_RPCMETHODINVOCATIONRESPONSERESPONSE']._serialized_start=680 - _globals['_RPCMETHODINVOCATIONRESPONSERESPONSE']._serialized_end=735 - _globals['_PERFORMRPCCALLBACK']._serialized_start=737 - _globals['_PERFORMRPCCALLBACK']._serialized_end=832 - _globals['_REGISTERRPCMETHODCALLBACK']._serialized_start=834 - _globals['_REGISTERRPCMETHODCALLBACK']._serialized_end=879 - _globals['_UNREGISTERRPCMETHODCALLBACK']._serialized_start=881 - _globals['_UNREGISTERRPCMETHODCALLBACK']._serialized_end=928 - _globals['_RPCMETHODINVOCATIONRESPONSECALLBACK']._serialized_start=930 - _globals['_RPCMETHODINVOCATIONRESPONSECALLBACK']._serialized_end=1000 - _globals['_RPCMETHODINVOCATIONEVENT']._serialized_start=1003 - _globals['_RPCMETHODINVOCATIONEVENT']._serialized_end=1193 -======= _globals['_REGISTERRPCMETHODRESPONSE']._serialized_end=611 _globals['_UNREGISTERRPCMETHODRESPONSE']._serialized_start=613 _globals['_UNREGISTERRPCMETHODRESPONSE']._serialized_end=642 @@ -90,5 +44,4 @@ _globals['_PERFORMRPCCALLBACK']._serialized_end=793 _globals['_RPCMETHODINVOCATIONEVENT']._serialized_start=796 _globals['_RPCMETHODINVOCATIONEVENT']._serialized_end=986 ->>>>>>> origin/main # @@protoc_insertion_point(module_scope) diff --git a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi index d2e6703f..20330912 100644 --- a/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi +++ b/livekit-rtc/livekit/rtc/_proto/rpc_pb2.pyi @@ -1,9 +1,6 @@ """ @generated by mypy-protobuf. Do not edit manually! isort:skip_file -<<<<<<< HEAD -""" -======= Copyright 2023 LiveKit, Inc. Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,19 +16,10 @@ See the License for the specific language governing permissions and limitations under the License. """ ->>>>>>> origin/main import builtins import google.protobuf.descriptor import google.protobuf.message import typing -<<<<<<< HEAD -import typing_extensions - -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor - -class RpcError(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor -======= DESCRIPTOR: google.protobuf.descriptor.FileDescriptor @@ -39,28 +27,10 @@ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor class RpcError(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor ->>>>>>> origin/main CODE_FIELD_NUMBER: builtins.int MESSAGE_FIELD_NUMBER: builtins.int DATA_FIELD_NUMBER: builtins.int code: builtins.int -<<<<<<< HEAD - message: typing.Text - data: typing.Text - def __init__(self, - *, - code: typing.Optional[builtins.int] = ..., - message: typing.Optional[typing.Text] = ..., - data: typing.Optional[typing.Text] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["code",b"code","data",b"data","message",b"message"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["code",b"code","data",b"data","message",b"message"]) -> None: ... -global___RpcError = RpcError - -class PerformRpcRequest(google.protobuf.message.Message): - """FFI Requests""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor -======= message: builtins.str data: builtins.str def __init__( @@ -81,63 +51,12 @@ class PerformRpcRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor ->>>>>>> origin/main LOCAL_PARTICIPANT_HANDLE_FIELD_NUMBER: builtins.int DESTINATION_IDENTITY_FIELD_NUMBER: builtins.int METHOD_FIELD_NUMBER: builtins.int PAYLOAD_FIELD_NUMBER: builtins.int RESPONSE_TIMEOUT_MS_FIELD_NUMBER: builtins.int local_participant_handle: builtins.int -<<<<<<< HEAD - destination_identity: typing.Text - method: typing.Text - payload: typing.Text - response_timeout_ms: builtins.int - def __init__(self, - *, - local_participant_handle: typing.Optional[builtins.int] = ..., - destination_identity: typing.Optional[typing.Text] = ..., - method: typing.Optional[typing.Text] = ..., - payload: typing.Optional[typing.Text] = ..., - response_timeout_ms: typing.Optional[builtins.int] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["destination_identity",b"destination_identity","local_participant_handle",b"local_participant_handle","method",b"method","payload",b"payload","response_timeout_ms",b"response_timeout_ms"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["destination_identity",b"destination_identity","local_participant_handle",b"local_participant_handle","method",b"method","payload",b"payload","response_timeout_ms",b"response_timeout_ms"]) -> None: ... -global___PerformRpcRequest = PerformRpcRequest - -class RegisterRpcMethodRequest(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - LOCAL_PARTICIPANT_HANDLE_FIELD_NUMBER: builtins.int - METHOD_FIELD_NUMBER: builtins.int - local_participant_handle: builtins.int - method: typing.Text - def __init__(self, - *, - local_participant_handle: typing.Optional[builtins.int] = ..., - method: typing.Optional[typing.Text] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["local_participant_handle",b"local_participant_handle","method",b"method"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["local_participant_handle",b"local_participant_handle","method",b"method"]) -> None: ... -global___RegisterRpcMethodRequest = RegisterRpcMethodRequest - -class UnregisterRpcMethodRequest(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - LOCAL_PARTICIPANT_HANDLE_FIELD_NUMBER: builtins.int - METHOD_FIELD_NUMBER: builtins.int - local_participant_handle: builtins.int - method: typing.Text - def __init__(self, - *, - local_participant_handle: typing.Optional[builtins.int] = ..., - method: typing.Optional[typing.Text] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["local_participant_handle",b"local_participant_handle","method",b"method"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["local_participant_handle",b"local_participant_handle","method",b"method"]) -> None: ... -global___UnregisterRpcMethodRequest = UnregisterRpcMethodRequest - -class RpcMethodInvocationResponseRequest(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor -======= destination_identity: builtins.str method: builtins.str payload: builtins.str @@ -198,81 +117,12 @@ global___UnregisterRpcMethodRequest = UnregisterRpcMethodRequest class RpcMethodInvocationResponseRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor ->>>>>>> origin/main LOCAL_PARTICIPANT_HANDLE_FIELD_NUMBER: builtins.int INVOCATION_ID_FIELD_NUMBER: builtins.int PAYLOAD_FIELD_NUMBER: builtins.int ERROR_FIELD_NUMBER: builtins.int local_participant_handle: builtins.int invocation_id: builtins.int -<<<<<<< HEAD - payload: typing.Text - @property - def error(self) -> global___RpcError: ... - def __init__(self, - *, - local_participant_handle: typing.Optional[builtins.int] = ..., - invocation_id: typing.Optional[builtins.int] = ..., - payload: typing.Optional[typing.Text] = ..., - error: typing.Optional[global___RpcError] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["error",b"error","invocation_id",b"invocation_id","local_participant_handle",b"local_participant_handle","payload",b"payload"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["error",b"error","invocation_id",b"invocation_id","local_participant_handle",b"local_participant_handle","payload",b"payload"]) -> None: ... -global___RpcMethodInvocationResponseRequest = RpcMethodInvocationResponseRequest - -class PerformRpcResponse(google.protobuf.message.Message): - """FFI Responses""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor - ASYNC_ID_FIELD_NUMBER: builtins.int - async_id: builtins.int - def __init__(self, - *, - async_id: typing.Optional[builtins.int] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> None: ... -global___PerformRpcResponse = PerformRpcResponse - -class RegisterRpcMethodResponse(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - ASYNC_ID_FIELD_NUMBER: builtins.int - async_id: builtins.int - def __init__(self, - *, - async_id: typing.Optional[builtins.int] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> None: ... -global___RegisterRpcMethodResponse = RegisterRpcMethodResponse - -class UnregisterRpcMethodResponse(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - ASYNC_ID_FIELD_NUMBER: builtins.int - async_id: builtins.int - def __init__(self, - *, - async_id: typing.Optional[builtins.int] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> None: ... -global___UnregisterRpcMethodResponse = UnregisterRpcMethodResponse - -class RpcMethodInvocationResponseResponse(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - ASYNC_ID_FIELD_NUMBER: builtins.int - async_id: builtins.int - def __init__(self, - *, - async_id: typing.Optional[builtins.int] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> None: ... -global___RpcMethodInvocationResponseResponse = RpcMethodInvocationResponseResponse - -class PerformRpcCallback(google.protobuf.message.Message): - """FFI Callbacks""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor -======= payload: builtins.str @property def error(self) -> global___RpcError: ... @@ -349,68 +199,10 @@ class PerformRpcCallback(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor ->>>>>>> origin/main ASYNC_ID_FIELD_NUMBER: builtins.int PAYLOAD_FIELD_NUMBER: builtins.int ERROR_FIELD_NUMBER: builtins.int async_id: builtins.int -<<<<<<< HEAD - payload: typing.Text - @property - def error(self) -> global___RpcError: ... - def __init__(self, - *, - async_id: typing.Optional[builtins.int] = ..., - payload: typing.Optional[typing.Text] = ..., - error: typing.Optional[global___RpcError] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["async_id",b"async_id","error",b"error","payload",b"payload"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id",b"async_id","error",b"error","payload",b"payload"]) -> None: ... -global___PerformRpcCallback = PerformRpcCallback - -class RegisterRpcMethodCallback(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - ASYNC_ID_FIELD_NUMBER: builtins.int - async_id: builtins.int - def __init__(self, - *, - async_id: typing.Optional[builtins.int] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> None: ... -global___RegisterRpcMethodCallback = RegisterRpcMethodCallback - -class UnregisterRpcMethodCallback(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - ASYNC_ID_FIELD_NUMBER: builtins.int - async_id: builtins.int - def __init__(self, - *, - async_id: typing.Optional[builtins.int] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id",b"async_id"]) -> None: ... -global___UnregisterRpcMethodCallback = UnregisterRpcMethodCallback - -class RpcMethodInvocationResponseCallback(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - ASYNC_ID_FIELD_NUMBER: builtins.int - ERROR_FIELD_NUMBER: builtins.int - async_id: builtins.int - error: typing.Text - def __init__(self, - *, - async_id: typing.Optional[builtins.int] = ..., - error: typing.Optional[typing.Text] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["async_id",b"async_id","error",b"error"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id",b"async_id","error",b"error"]) -> None: ... -global___RpcMethodInvocationResponseCallback = RpcMethodInvocationResponseCallback - -class RpcMethodInvocationEvent(google.protobuf.message.Message): - """FFI Events""" - DESCRIPTOR: google.protobuf.descriptor.Descriptor -======= payload: builtins.str @property def error(self) -> global___RpcError: ... @@ -432,7 +224,6 @@ class RpcMethodInvocationEvent(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor ->>>>>>> origin/main LOCAL_PARTICIPANT_HANDLE_FIELD_NUMBER: builtins.int INVOCATION_ID_FIELD_NUMBER: builtins.int METHOD_FIELD_NUMBER: builtins.int @@ -442,25 +233,6 @@ class RpcMethodInvocationEvent(google.protobuf.message.Message): RESPONSE_TIMEOUT_MS_FIELD_NUMBER: builtins.int local_participant_handle: builtins.int invocation_id: builtins.int -<<<<<<< HEAD - method: typing.Text - request_id: typing.Text - caller_identity: typing.Text - payload: typing.Text - response_timeout_ms: builtins.int - def __init__(self, - *, - local_participant_handle: typing.Optional[builtins.int] = ..., - invocation_id: typing.Optional[builtins.int] = ..., - method: typing.Optional[typing.Text] = ..., - request_id: typing.Optional[typing.Text] = ..., - caller_identity: typing.Optional[typing.Text] = ..., - payload: typing.Optional[typing.Text] = ..., - response_timeout_ms: typing.Optional[builtins.int] = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["caller_identity",b"caller_identity","invocation_id",b"invocation_id","local_participant_handle",b"local_participant_handle","method",b"method","payload",b"payload","request_id",b"request_id","response_timeout_ms",b"response_timeout_ms"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["caller_identity",b"caller_identity","invocation_id",b"invocation_id","local_participant_handle",b"local_participant_handle","method",b"method","payload",b"payload","request_id",b"request_id","response_timeout_ms",b"response_timeout_ms"]) -> None: ... -======= method: builtins.str request_id: builtins.str caller_identity: builtins.str @@ -480,5 +252,4 @@ class RpcMethodInvocationEvent(google.protobuf.message.Message): def HasField(self, field_name: typing.Literal["caller_identity", b"caller_identity", "invocation_id", b"invocation_id", "local_participant_handle", b"local_participant_handle", "method", b"method", "payload", b"payload", "request_id", b"request_id", "response_timeout_ms", b"response_timeout_ms"]) -> builtins.bool: ... def ClearField(self, field_name: typing.Literal["caller_identity", b"caller_identity", "invocation_id", b"invocation_id", "local_participant_handle", b"local_participant_handle", "method", b"method", "payload", b"payload", "request_id", b"request_id", "response_timeout_ms", b"response_timeout_ms"]) -> None: ... ->>>>>>> origin/main global___RpcMethodInvocationEvent = RpcMethodInvocationEvent From aeed6744e5a30f8cab882fc5a86af8691a19928c Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Fri, 25 Oct 2024 12:00:36 -0700 Subject: [PATCH 23/53] error --- livekit-rtc/livekit/rtc/rpc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/livekit-rtc/livekit/rtc/rpc.py b/livekit-rtc/livekit/rtc/rpc.py index a11073bb..11a7c88e 100644 --- a/livekit-rtc/livekit/rtc/rpc.py +++ b/livekit-rtc/livekit/rtc/rpc.py @@ -38,6 +38,7 @@ class ErrorCode(IntEnum): UNSUPPORTED_METHOD = 1400 RECIPIENT_NOT_FOUND = 1401 REQUEST_PAYLOAD_TOO_LARGE = 1402 + UNSUPPORTED_SERVER = 1403 ErrorMessage: ClassVar[Dict[ErrorCode, str]] = { ErrorCode.APPLICATION_ERROR: "Application error in method handler", @@ -49,6 +50,7 @@ class ErrorCode(IntEnum): ErrorCode.UNSUPPORTED_METHOD: "Method not supported at destination", ErrorCode.RECIPIENT_NOT_FOUND: "Recipient not found", ErrorCode.REQUEST_PAYLOAD_TOO_LARGE: "Request payload too large", + ErrorCode.UNSUPPORTED_SERVER: "RPC not supported by server", } def __init__( From 63b42bc00720430bcf33461b8ce708a844c577c1 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Fri, 25 Oct 2024 12:06:32 -0700 Subject: [PATCH 24/53] remove --- livekit-rtc/livekit/rtc/participant.py | 43 ++++---------------------- 1 file changed, 6 insertions(+), 37 deletions(-) diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 89eb844c..2d0f265c 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -285,7 +285,7 @@ async def perform_rpc( return cb.perform_rpc.payload - async def register_rpc_method( + def register_rpc_method( self, method: str, handler: Callable[[str, str, str, int], Awaitable[str]], @@ -330,18 +330,9 @@ async def greet_handler(request_id: str, caller_identity: str, payload: str, res req.register_rpc_method.local_participant_handle = self._ffi_handle.handle req.register_rpc_method.method = method - queue = FfiClient.instance.queue.subscribe() - try: - resp = FfiClient.instance.request(req) - await queue.wait_for( - lambda e: ( - e.register_rpc_method.async_id == resp.register_rpc_method.async_id - ) - ) - finally: - FfiClient.instance.queue.unsubscribe(queue) + FfiClient.instance.request(req) - async def unregister_rpc_method(self, method: str) -> None: + def unregister_rpc_method(self, method: str) -> None: """ Unregisters a previously registered RPC method. @@ -354,17 +345,7 @@ async def unregister_rpc_method(self, method: str) -> None: req.unregister_rpc_method.local_participant_handle = self._ffi_handle.handle req.unregister_rpc_method.method = method - queue = FfiClient.instance.queue.subscribe() - try: - resp = FfiClient.instance.request(req) - await queue.wait_for( - lambda e: ( - e.unregister_rpc_method.async_id - == resp.unregister_rpc_method.async_id - ) - ) - finally: - FfiClient.instance.queue.unsubscribe(queue) + FfiClient.instance.request(req) async def _handle_rpc_method_invocation( self, @@ -408,20 +389,8 @@ async def _handle_rpc_method_invocation( res = FfiClient.instance.request(req) - queue = FfiClient.instance.queue.subscribe() - try: - cb = await queue.wait_for( - lambda e: ( - e.rpc_method_invocation_response.async_id - == res.rpc_method_invocation_response.async_id - ) - ) - if cb.rpc_method_invocation_response.error: - print( - f"error sending rpc method invocation response: {cb.rpc_method_invocation_response.error}" - ) - finally: - FfiClient.instance.queue.unsubscribe(queue) + if res.error: + print(f"error sending rpc method invocation response: {res.error}") async def set_metadata(self, metadata: str) -> None: """ From 4df795e5ea29833fbc1d50d9094031d24096befb Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Fri, 25 Oct 2024 12:32:21 -0700 Subject: [PATCH 25/53] readme --- README.md | 52 ++++++++++++++++++++++++++ examples/rpc.py | 10 ++--- livekit-rtc/livekit/rtc/participant.py | 7 +++- 3 files changed, 62 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index fab78596..76b8ca0e 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,58 @@ def on_message_received(msg: rtc.ChatMessage): await chat.send_message("hello world") ``` + +### RPC + +Perform your own predefined method calls from one participant to another. + +This feature is especially powerful when used with [Agents](https://docs.livekit.io/agents), for instance to forward LLM function calls to your client application. + +#### Registering an RPC method + +The participant who implements the method and will receive its calls must first register support: + +```python +async def handle_greet(request_id: str, caller_identity: str, payload: str, response_timeout_ms: int): + print(f"Received greeting from {caller_identity}: {payload}") + return f"Hello, {caller_identity}!" + +room.local_participant.register_rpc_method( + # method name - can be any string that makes sense for your application + 'greet', + + # method handler - will be called when the method is invoked by a RemoteParticipant + handle_greet +) +``` + +In addition to the payload, your handler will also receive `response_timeout_ms`, which informs you the maximum time available to return a response. If you are unable to respond in time, the call will result in an error on the caller's side. + +#### Performing an RPC request + +The caller may then initiate an RPC call like so: + +```python +try: + response = await room.local_participant.perform_rpc( + 'recipient-identity', + 'greet', + 'Hello from RPC!' + ) + print('RPC response:', response) +except Exception as e: + print('RPC call failed:', e) +``` + +You may find it useful to adjust the `response_timeout_ms` parameter, which indicates the amount of time you will wait for a response. We recommend keeping this value as low as possible while still satisfying the constraints of your application. + +#### Errors + +LiveKit is a dynamic realtime environment and calls can fail for various reasons. + +You may throw errors of the type `RpcError` with a string `message` in an RPC method handler and they will be received on the caller's side with the message intact. Other errors will not be transmitted and will instead arrive to the caller as `1500` ("Application Error"). Other built-in errors are detailed in `RpcError`. + + ## Examples - [Facelandmark](https://github.com/livekit/python-sdks/tree/main/examples/face_landmark): Use mediapipe to detect face landmarks (eyes, nose ...) diff --git a/examples/rpc.py b/examples/rpc.py index 288b3e9c..1846430f 100644 --- a/examples/rpc.py +++ b/examples/rpc.py @@ -26,7 +26,7 @@ async def main(): ) # Register all methods for the receiving participant - await register_receiver_methods(greeters_room, math_genius_room) + register_receiver_methods(greeters_room, math_genius_room) try: print("\n\nRunning greeting example...") @@ -56,7 +56,7 @@ async def main(): print("Participants disconnected. Example completed.") -async def register_receiver_methods( +def register_receiver_methods( greeters_room: rtc.Room, math_genius_room: rtc.Room ): async def arrival_method( @@ -104,11 +104,11 @@ async def divide_method( result = dividend / divisor return json.dumps({"result": result}) - await greeters_room.local_participant.register_rpc_method("arrival", arrival_method) - await math_genius_room.local_participant.register_rpc_method( + greeters_room.local_participant.register_rpc_method("arrival", arrival_method) + math_genius_room.local_participant.register_rpc_method( "square-root", square_root_method ) - await math_genius_room.local_participant.register_rpc_method( + math_genius_room.local_participant.register_rpc_method( "divide", divide_method ) diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 2d0f265c..aacaf0e2 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -381,6 +381,7 @@ async def _handle_rpc_method_invocation( req = proto_ffi.FfiRequest( rpc_method_invocation_response=RpcMethodInvocationResponseRequest( + local_participant_handle=self._ffi_handle.handle, invocation_id=invocation_id, error=response_error.to_proto() if response_error else None, payload=response_payload, @@ -389,8 +390,10 @@ async def _handle_rpc_method_invocation( res = FfiClient.instance.request(req) - if res.error: - print(f"error sending rpc method invocation response: {res.error}") + if res.rpc_method_invocation_response.error: + print( + f"error sending rpc method invocation response: {res.rpc_method_invocation_response.error}" + ) async def set_metadata(self, metadata: str) -> None: """ From b8bd0b3760a4f4951f0423a844e53370eb000ee1 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Fri, 25 Oct 2024 12:32:30 -0700 Subject: [PATCH 26/53] fmt --- examples/rpc.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/examples/rpc.py b/examples/rpc.py index 1846430f..1aa7a739 100644 --- a/examples/rpc.py +++ b/examples/rpc.py @@ -56,9 +56,7 @@ async def main(): print("Participants disconnected. Example completed.") -def register_receiver_methods( - greeters_room: rtc.Room, math_genius_room: rtc.Room -): +def register_receiver_methods(greeters_room: rtc.Room, math_genius_room: rtc.Room): async def arrival_method( request_id: str, caller_identity: str, @@ -108,9 +106,7 @@ async def divide_method( math_genius_room.local_participant.register_rpc_method( "square-root", square_root_method ) - math_genius_room.local_participant.register_rpc_method( - "divide", divide_method - ) + math_genius_room.local_participant.register_rpc_method("divide", divide_method) async def perform_greeting(room: rtc.Room): From 5b5ff039713a7cc075fea64eb4c122251064c382 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Fri, 25 Oct 2024 12:34:43 -0700 Subject: [PATCH 27/53] print --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 76b8ca0e..28de4036 100644 --- a/README.md +++ b/README.md @@ -166,9 +166,9 @@ try: 'greet', 'Hello from RPC!' ) - print('RPC response:', response) + print(f"RPC response: {response}") except Exception as e: - print('RPC call failed:', e) + print(f"RPC call failed: {e}") ``` You may find it useful to adjust the `response_timeout_ms` parameter, which indicates the amount of time you will wait for a response. We recommend keeping this value as low as possible while still satisfying the constraints of your application. From e6196eb8e8de3ed6888a75d055f9037555ea6efd Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Fri, 25 Oct 2024 15:54:15 -0700 Subject: [PATCH 28/53] Decorator variant --- README.md | 9 +-------- examples/rpc.py | 11 +++-------- livekit-rtc/livekit/rtc/participant.py | 21 +++++++++++++++++++++ 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 28de4036..b90fa163 100644 --- a/README.md +++ b/README.md @@ -140,17 +140,10 @@ This feature is especially powerful when used with [Agents](https://docs.livekit The participant who implements the method and will receive its calls must first register support: ```python +@room.local_participant.rpc_method("greet") async def handle_greet(request_id: str, caller_identity: str, payload: str, response_timeout_ms: int): print(f"Received greeting from {caller_identity}: {payload}") return f"Hello, {caller_identity}!" - -room.local_participant.register_rpc_method( - # method name - can be any string that makes sense for your application - 'greet', - - # method handler - will be called when the method is invoked by a RemoteParticipant - handle_greet -) ``` In addition to the payload, your handler will also receive `response_timeout_ms`, which informs you the maximum time available to return a response. If you are unable to respond in time, the call will result in an error on the caller's side. diff --git a/examples/rpc.py b/examples/rpc.py index 1aa7a739..ccc1c4d1 100644 --- a/examples/rpc.py +++ b/examples/rpc.py @@ -25,7 +25,6 @@ async def main(): connect_participant("math-genius", room_name), ) - # Register all methods for the receiving participant register_receiver_methods(greeters_room, math_genius_room) try: @@ -57,6 +56,7 @@ async def main(): def register_receiver_methods(greeters_room: rtc.Room, math_genius_room: rtc.Room): + @greeters_room.local_participant.rpc_method("arrival") async def arrival_method( request_id: str, caller_identity: str, @@ -67,6 +67,7 @@ async def arrival_method( await asyncio.sleep(2) return "Welcome and have a wonderful day!" + @math_genius_room.local_participant.rpc_method("square-root") async def square_root_method( request_id: str, caller_identity: str, @@ -86,6 +87,7 @@ async def square_root_method( print(f"[Math Genius] Aha! It's {result}") return json.dumps({"result": result}) + @math_genius_room.local_participant.rpc_method("divide") async def divide_method( request_id: str, caller_identity: str, @@ -102,13 +104,6 @@ async def divide_method( result = dividend / divisor return json.dumps({"result": result}) - greeters_room.local_participant.register_rpc_method("arrival", arrival_method) - math_genius_room.local_participant.register_rpc_method( - "square-root", square_root_method - ) - math_genius_room.local_participant.register_rpc_method("divide", divide_method) - - async def perform_greeting(room: rtc.Room): print("[Caller] Letting the greeter know that I've arrived") try: diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index aacaf0e2..f1bd7d8c 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -331,6 +331,27 @@ async def greet_handler(request_id: str, caller_identity: str, payload: str, res req.register_rpc_method.method = method FfiClient.instance.request(req) + + def rpc_method(self, method: str): + """ + Decorator form of `register_rpc_method` + + Args: + method (str): The name of the indicated RPC method + + Example: + @local_participant.rpc_method("greet") + async def greet_handler(request_id: str, caller_identity: str, payload: str, response_timeout_ms: int) -> str: + print(f"Received greeting from {caller_identity}: {payload}") + return f"Hello, {caller_identity}!" + + See Also: + `register_rpc_method` for more details + """ + def decorator(handler: Callable[[str, str, str, int], Awaitable[str]]): + self.register_rpc_method(method, handler) + return handler + return decorator def unregister_rpc_method(self, method: str) -> None: """ From cdd942c4cf8f9c2bb630ae8281c3745669a4bacf Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Fri, 25 Oct 2024 16:21:37 -0700 Subject: [PATCH 29/53] fmt --- examples/rpc.py | 1 + livekit-rtc/livekit/rtc/participant.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/rpc.py b/examples/rpc.py index ccc1c4d1..c5d037d2 100644 --- a/examples/rpc.py +++ b/examples/rpc.py @@ -104,6 +104,7 @@ async def divide_method( result = dividend / divisor return json.dumps({"result": result}) + async def perform_greeting(room: rtc.Room): print("[Caller] Letting the greeter know that I've arrived") try: diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index f1bd7d8c..7327e626 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -331,11 +331,11 @@ async def greet_handler(request_id: str, caller_identity: str, payload: str, res req.register_rpc_method.method = method FfiClient.instance.request(req) - + def rpc_method(self, method: str): """ Decorator form of `register_rpc_method` - + Args: method (str): The name of the indicated RPC method @@ -348,9 +348,11 @@ async def greet_handler(request_id: str, caller_identity: str, payload: str, res See Also: `register_rpc_method` for more details """ + def decorator(handler: Callable[[str, str, str, int], Awaitable[str]]): self.register_rpc_method(method, handler) return handler + return decorator def unregister_rpc_method(self, method: str) -> None: From bb4015104ba28b1804f36465d0b249fe1fb738dc Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 28 Oct 2024 11:18:30 -0700 Subject: [PATCH 30/53] logger --- livekit-rtc/livekit/rtc/participant.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 7327e626..3f720bbb 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -37,6 +37,7 @@ from .transcription import Transcription from .rpc import RpcError from ._proto.rpc_pb2 import RpcMethodInvocationResponseRequest +from .log import logger class PublishTrackError(Exception): @@ -394,9 +395,8 @@ async def _handle_rpc_method_invocation( except RpcError as error: response_error = error except Exception as error: - print( - f"Uncaught error returned by RPC handler for {method}. Returning APPLICATION_ERROR instead.", - error, + logger.exception( + f"Uncaught error returned by RPC handler for {method}. Returning APPLICATION_ERROR instead. Original error: {error}", ) response_error = RpcError._built_in( RpcError.ErrorCode.APPLICATION_ERROR @@ -414,7 +414,7 @@ async def _handle_rpc_method_invocation( res = FfiClient.instance.request(req) if res.rpc_method_invocation_response.error: - print( + logger.exception( f"error sending rpc method invocation response: {res.rpc_method_invocation_response.error}" ) From 0d2a2d19dc4b487af8acc6403aaf5d993f989d0c Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 28 Oct 2024 11:23:30 -0700 Subject: [PATCH 31/53] allow sync --- examples/rpc.py | 2 +- livekit-rtc/livekit/rtc/participant.py | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/examples/rpc.py b/examples/rpc.py index c5d037d2..92cf7a8a 100644 --- a/examples/rpc.py +++ b/examples/rpc.py @@ -88,7 +88,7 @@ async def square_root_method( return json.dumps({"result": result}) @math_genius_room.local_participant.rpc_method("divide") - async def divide_method( + def divide_method( request_id: str, caller_identity: str, payload: str, diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 3f720bbb..9b39df39 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -38,6 +38,7 @@ from .rpc import RpcError from ._proto.rpc_pb2 import RpcMethodInvocationResponseRequest from .log import logger +import asyncio class PublishTrackError(Exception): @@ -117,7 +118,7 @@ def __init__( self._room_queue = room_queue self._track_publications: dict[str, LocalTrackPublication] = {} # type: ignore self._rpc_handlers: Dict[ - str, Callable[[str, str, str, int], Awaitable[str]] + str, Callable[[str, str, str, int], Union[Awaitable[str], str]] ] = {} @property @@ -289,7 +290,7 @@ async def perform_rpc( def register_rpc_method( self, method: str, - handler: Callable[[str, str, str, int], Awaitable[str]], + handler: Callable[[str, str, str, int], Union[Awaitable[str], str]], ) -> None: """ Establishes the participant as a receiver for calls of the specified RPC method. @@ -389,9 +390,14 @@ async def _handle_rpc_method_invocation( response_error = RpcError._built_in(RpcError.ErrorCode.UNSUPPORTED_METHOD) else: try: - response_payload = await handler( - request_id, caller_identity, payload, response_timeout_ms - ) + if asyncio.iscoroutinefunction(handler): + response_payload = await handler( + request_id, caller_identity, payload, response_timeout_ms + ) + else: + response_payload = handler( + request_id, caller_identity, payload, response_timeout_ms + ) except RpcError as error: response_error = error except Exception as error: From 99c7ea791e59a222f5a1ef2b56bce8a2a10faa28 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 28 Oct 2024 11:25:10 -0700 Subject: [PATCH 32/53] remove --- livekit-rtc/livekit/rtc/room.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/livekit-rtc/livekit/rtc/room.py b/livekit-rtc/livekit/rtc/room.py index 17c3d59e..d89c7edc 100644 --- a/livekit-rtc/livekit/rtc/room.py +++ b/livekit-rtc/livekit/rtc/room.py @@ -440,12 +440,6 @@ async def _listen_task(self) -> None: await self._room_queue.join() def _on_rpc_method_invocation(self, rpc_invocation: RpcMethodInvocationEvent): - if self._local_participant is None: - logging.warning( - "Received RPC invocation before local participant was initialized" - ) - return - if ( rpc_invocation.local_participant_handle == self._local_participant._ffi_handle.handle From 3f0404092f6569fb4f5f45929fb4c27f52fbddd6 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 28 Oct 2024 11:31:11 -0700 Subject: [PATCH 33/53] store task --- livekit-rtc/livekit/rtc/room.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/livekit-rtc/livekit/rtc/room.py b/livekit-rtc/livekit/rtc/room.py index d89c7edc..d3178238 100644 --- a/livekit-rtc/livekit/rtc/room.py +++ b/livekit-rtc/livekit/rtc/room.py @@ -131,6 +131,7 @@ def __init__(self, loop: Optional[asyncio.AbstractEventLoop] = None) -> None: self._loop = loop or asyncio.get_event_loop() self._room_queue = BroadcastQueue[proto_ffi.FfiEvent]() self._info = proto_room.RoomInfo() + self._rpc_invocation_tasks: set[asyncio.Task] = set() self._remote_participants: Dict[str, RemoteParticipant] = {} self._connection_state = ConnectionState.CONN_DISCONNECTED @@ -412,6 +413,11 @@ async def disconnect(self) -> None: finally: FfiClient.instance.queue.unsubscribe(queue) + if self._rpc_invocation_tasks: + for task in self._rpc_invocation_tasks: + task.cancel() + await asyncio.gather(*self._rpc_invocation_tasks, return_exceptions=True) + await self._task FfiClient.instance.queue.unsubscribe(self._ffi_queue) @@ -444,7 +450,7 @@ def _on_rpc_method_invocation(self, rpc_invocation: RpcMethodInvocationEvent): rpc_invocation.local_participant_handle == self._local_participant._ffi_handle.handle ): - asyncio.create_task( + task = self._loop.create_task( self._local_participant._handle_rpc_method_invocation( rpc_invocation.invocation_id, rpc_invocation.method, @@ -454,6 +460,8 @@ def _on_rpc_method_invocation(self, rpc_invocation: RpcMethodInvocationEvent): rpc_invocation.response_timeout_ms, ) ) + self._rpc_invocation_tasks.add(task) + task.add_done_callback(self._rpc_tasks.discard) def _on_room_event(self, event: proto_room.RoomEvent): which = event.WhichOneof("message") @@ -730,3 +738,8 @@ def __repr__(self) -> str: sid = self._first_sid_future.result() return f"rtc.Room(sid={sid}, name={self.name}, metadata={self.metadata}, connection_state={self._connection_state})" + + + + + From 98ecaa9a56e1905a37874ca393ec2118df5f9686 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 28 Oct 2024 11:32:22 -0700 Subject: [PATCH 34/53] typoi --- livekit-rtc/livekit/rtc/room.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/livekit-rtc/livekit/rtc/room.py b/livekit-rtc/livekit/rtc/room.py index d3178238..28a0b8cc 100644 --- a/livekit-rtc/livekit/rtc/room.py +++ b/livekit-rtc/livekit/rtc/room.py @@ -461,7 +461,7 @@ def _on_rpc_method_invocation(self, rpc_invocation: RpcMethodInvocationEvent): ) ) self._rpc_invocation_tasks.add(task) - task.add_done_callback(self._rpc_tasks.discard) + task.add_done_callback(self._rpc_invocation_tasks.discard) def _on_room_event(self, event: proto_room.RoomEvent): which = event.WhichOneof("message") From a52403212a35a7615ba989ad43297cd7fb837d97 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 28 Oct 2024 12:20:02 -0700 Subject: [PATCH 35/53] Fixes --- README.md | 6 +- examples/rpc.py | 150 ++++++++++++++++++------- livekit-rtc/livekit/rtc/participant.py | 40 ++++--- livekit-rtc/livekit/rtc/room.py | 14 +-- 4 files changed, 145 insertions(+), 65 deletions(-) diff --git a/README.md b/README.md index b90fa163..75c9c5ea 100644 --- a/README.md +++ b/README.md @@ -141,12 +141,12 @@ The participant who implements the method and will receive its calls must first ```python @room.local_participant.rpc_method("greet") -async def handle_greet(request_id: str, caller_identity: str, payload: str, response_timeout_ms: int): +async def handle_greet(request_id: str, caller_identity: str, payload: str, response_timeout: float): print(f"Received greeting from {caller_identity}: {payload}") return f"Hello, {caller_identity}!" ``` -In addition to the payload, your handler will also receive `response_timeout_ms`, which informs you the maximum time available to return a response. If you are unable to respond in time, the call will result in an error on the caller's side. +In addition to the payload, your handler will also receive `response_timeout`, which informs you the maximum time available to return a response. If you are unable to respond in time, the call will result in an error on the caller's side. #### Performing an RPC request @@ -164,7 +164,7 @@ except Exception as e: print(f"RPC call failed: {e}") ``` -You may find it useful to adjust the `response_timeout_ms` parameter, which indicates the amount of time you will wait for a response. We recommend keeping this value as low as possible while still satisfying the constraints of your application. +You may find it useful to adjust the `response_timeout` parameter, which indicates the amount of time you will wait for a response. We recommend keeping this value as low as possible while still satisfying the constraints of your application. #### Errors diff --git a/examples/rpc.py b/examples/rpc.py index 92cf7a8a..580b17df 100644 --- a/examples/rpc.py +++ b/examples/rpc.py @@ -3,6 +3,7 @@ import json import asyncio from dotenv import load_dotenv +import time load_dotenv(dotenv_path=".env.local", override=False) LIVEKIT_API_KEY = os.getenv("LIVEKIT_API_KEY") @@ -15,44 +16,74 @@ async def main(): - room_name = f"rpc-test-{os.urandom(4).hex()}" - - print(f"Connecting participants to room: {room_name}") - - callers_room, greeters_room, math_genius_room = await asyncio.gather( - connect_participant("caller", room_name), - connect_participant("greeter", room_name), - connect_participant("math-genius", room_name), - ) - - register_receiver_methods(greeters_room, math_genius_room) - + rooms = [] # Keep track of all rooms for cleanup try: - print("\n\nRunning greeting example...") - await asyncio.gather(perform_greeting(callers_room)) - except Exception as error: - print("Error:", error) + room_name = f"rpc-test-{os.urandom(4).hex()}" + print(f"Connecting participants to room: {room_name}") - try: - print("\n\nRunning error handling example...") - await perform_divide(callers_room) - except Exception as error: - print("Error:", error) - - try: - print("\n\nRunning math example...") - await perform_square_root(callers_room) - await asyncio.sleep(2) - await perform_quantum_hypergeometric_series(callers_room) - except Exception as error: - print("Error:", error) - - print("\n\nParticipants done, disconnecting...") - await callers_room.disconnect() - await greeters_room.disconnect() - await math_genius_room.disconnect() - - print("Participants disconnected. Example completed.") + callers_room, greeters_room, math_genius_room = await asyncio.gather( + connect_participant("caller", room_name), + connect_participant("greeter", room_name), + connect_participant("math-genius", room_name), + ) + rooms = [callers_room, greeters_room, math_genius_room] + + register_receiver_methods(greeters_room, math_genius_room) + + try: + print("\n\nRunning greeting example...") + await asyncio.gather(perform_greeting(callers_room)) + except Exception as error: + print("Error:", error) + + try: + print("\n\nRunning error handling example...") + await perform_divide(callers_room) + except Exception as error: + print("Error:", error) + + try: + print("\n\nRunning math example...") + await perform_square_root(callers_room) + await asyncio.sleep(2) + await perform_quantum_hypergeometric_series(callers_room) + except Exception as error: + print("Error:", error) + + try: + print("\n\nRunning long calculation with timeout...") + await asyncio.create_task(perform_long_calculation(callers_room)) + except Exception as error: + print("Error:", error) + + try: + print("\n\nRunning long calculation with disconnect...") + # Start the long calculation + long_calc_task = asyncio.create_task(perform_long_calculation(callers_room)) + # Wait a bit then disconnect the math genius + await asyncio.sleep(5) + print("\nDisconnecting math genius early...") + await math_genius_room.disconnect() + # Wait for the calculation to fail + await long_calc_task + except Exception as error: + print("Error:", error) + + print("\n\nParticipants done, disconnecting remaining participants...") + await callers_room.disconnect() + await greeters_room.disconnect() + + print("Participants disconnected. Example completed.") + + except KeyboardInterrupt: + print("\nReceived interrupt signal, cleaning up...") + except Exception as e: + print(f"Unexpected error: {e}") + finally: + # Clean up all rooms + print("Disconnecting all participants...") + await asyncio.gather(*(room.disconnect() for room in rooms), return_exceptions=True) + print("Cleanup complete") def register_receiver_methods(greeters_room: rtc.Room, math_genius_room: rtc.Room): @@ -61,7 +92,7 @@ async def arrival_method( request_id: str, caller_identity: str, payload: str, - response_timeout_ms: int, + response_timeout: float, ): print(f'[Greeter] Oh {caller_identity} arrived and said "{payload}"') await asyncio.sleep(2) @@ -72,12 +103,12 @@ async def square_root_method( request_id: str, caller_identity: str, payload: str, - response_timeout_ms: int, + response_timeout: float, ): json_data = json.loads(payload) number = json_data["number"] print( - f"[Math Genius] I guess {caller_identity} wants the square root of {number}. I've only got {response_timeout_ms / 1000} seconds to respond but I think I can pull it off." + f"[Math Genius] I guess {caller_identity} wants the square root of {number}. I've only got {response_timeout} seconds to respond but I think I can pull it off." ) print("[Math Genius] *doing math*…") @@ -92,7 +123,7 @@ def divide_method( request_id: str, caller_identity: str, payload: str, - response_timeout_ms: int, + response_timeout: float, ): json_data = json.loads(payload) dividend = json_data["dividend"] @@ -104,6 +135,18 @@ def divide_method( result = dividend / divisor return json.dumps({"result": result}) + @math_genius_room.local_participant.rpc_method("long-calculation") + async def long_calculation_method( + request_id: str, + caller_identity: str, + payload: str, + response_timeout: float, + ): + print(f"[Math Genius] Starting a very long calculation for {caller_identity}") + print(f"[Math Genius] This will take 30 seconds even though you're only giving me {response_timeout} seconds") + await asyncio.sleep(30) + return json.dumps({"result": "Calculation complete!"}) + async def perform_greeting(room: rtc.Room): print("[Caller] Letting the greeter know that I've arrived") @@ -168,6 +211,28 @@ async def perform_divide(room: rtc.Room): print(f"[Caller] RPC call failed with unexpected error: {error}") +async def perform_long_calculation(room: rtc.Room): + print("[Caller] Giving the math genius 10s to complete a long calculation") + try: + response = await room.local_participant.perform_rpc( + "math-genius", + "long-calculation", + json.dumps({}), + response_timeout=10 + ) + parsed_response = json.loads(response) + print(f"[Caller] Result: {parsed_response['result']}") + except rtc.RpcError as error: + if error.code == rtc.RpcError.ErrorCode.RESPONSE_TIMEOUT: + print("[Caller] Math genius took too long to respond") + elif error.code == rtc.RpcError.ErrorCode.RECIPIENT_DISCONNECTED: + print("[Caller] Math genius disconnected before response was received") + else: + print(f"[Caller] Unexpected RPC error: {error}") + except Exception as error: + print(f"[Caller] Unexpected error: {error}") + + def create_token(identity: str, room_name: str): token = ( api.AccessToken(LIVEKIT_API_KEY, LIVEKIT_API_SECRET) @@ -216,4 +281,7 @@ def _on_participant_connected(participant: rtc.RemoteParticipant): if __name__ == "__main__": - asyncio.run(main()) + try: + asyncio.run(main()) + except KeyboardInterrupt: + print("\nProgram terminated by user") diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 9b39df39..30d31088 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -248,7 +248,7 @@ async def perform_rpc( destination_identity: str, method: str, payload: str, - response_timeout_ms: Optional[int] = None, + response_timeout: Optional[float] = None, ) -> str: """ Initiate an RPC call to a remote participant. @@ -257,7 +257,7 @@ async def perform_rpc( destination_identity (str): The `identity` of the destination participant method (str): The method name to call payload (str): The method payload - response_timeout_ms (Optional[int]): Timeout for receiving a response after initial connection + response_timeout (Optional[float]): Timeout for receiving a response after initial connection Returns: str: The response payload @@ -270,8 +270,8 @@ async def perform_rpc( req.perform_rpc.destination_identity = destination_identity req.perform_rpc.method = method req.perform_rpc.payload = payload - if response_timeout_ms is not None: - req.perform_rpc.response_timeout_ms = response_timeout_ms + if response_timeout is not None: + req.perform_rpc.response_timeout_ms = int(response_timeout * 1000) queue = FfiClient.instance.queue.subscribe() try: @@ -307,7 +307,7 @@ def register_rpc_method( RpcError: On failure. Details in `message`. Example: - async def greet_handler(request_id: str, caller_identity: str, payload: str, response_timeout_ms: int) -> str: + async def greet_handler(request_id: str, caller_identity: str, payload: str, response_timeout: float) -> str: print(f"Received greeting from {caller_identity}: {payload}") return f"Hello, {caller_identity}!" @@ -317,10 +317,10 @@ async def greet_handler(request_id: str, caller_identity: str, payload: str, res - `request_id`: A unique identifier for this RPC request - `caller_identity`: The identity of the RemoteParticipant who initiated the RPC call - `payload`: The data sent by the caller (as a string) - - `response_timeout_ms`: The maximum time available to return a response + - `response_timeout`: The maximum time available to return a response The handler should return a string or a coroutine that resolves to a string. - If unable to respond within `response_timeout_ms`, the request will result in an error on the caller's side. + If unable to respond within `response_timeout`, the request will result in an error on the caller's side. You may raise errors of type `RpcError` with a string `message` in the handler, and they will be received on the caller's side with the message intact. @@ -343,7 +343,7 @@ def rpc_method(self, method: str): Example: @local_participant.rpc_method("greet") - async def greet_handler(request_id: str, caller_identity: str, payload: str, response_timeout_ms: int) -> str: + async def greet_handler(request_id: str, caller_identity: str, payload: str, response_timeout: float) -> str: print(f"Received greeting from {caller_identity}: {payload}") return f"Hello, {caller_identity}!" @@ -379,7 +379,7 @@ async def _handle_rpc_method_invocation( request_id: str, caller_identity: str, payload: str, - response_timeout_ms: int, + response_timeout: float, ) -> None: response_error: Optional[RpcError] = None response_payload: Optional[str] = None @@ -391,12 +391,24 @@ async def _handle_rpc_method_invocation( else: try: if asyncio.iscoroutinefunction(handler): - response_payload = await handler( - request_id, caller_identity, payload, response_timeout_ms - ) + async def run_handler(): + try: + return await handler( + request_id, caller_identity, payload, response_timeout + ) + except asyncio.CancelledError: + # This will be caught by the outer try-except if it's due to timeout + raise + + try: + response_payload = await asyncio.wait_for(run_handler(), timeout=response_timeout) + except asyncio.TimeoutError: + raise RpcError._built_in(RpcError.ErrorCode.RESPONSE_TIMEOUT) + except asyncio.CancelledError: + raise RpcError._built_in(RpcError.ErrorCode.RECIPIENT_DISCONNECTED) else: response_payload = handler( - request_id, caller_identity, payload, response_timeout_ms + request_id, caller_identity, payload, response_timeout ) except RpcError as error: response_error = error @@ -589,3 +601,5 @@ def track_publications(self) -> Mapping[str, RemoteTrackPublication]: def __repr__(self) -> str: return f"rtc.RemoteParticipant(sid={self.sid}, identity={self.identity}, name={self.name})" + + diff --git a/livekit-rtc/livekit/rtc/room.py b/livekit-rtc/livekit/rtc/room.py index 28a0b8cc..442753bd 100644 --- a/livekit-rtc/livekit/rtc/room.py +++ b/livekit-rtc/livekit/rtc/room.py @@ -400,10 +400,14 @@ async def disconnect(self) -> None: """Disconnects from the room.""" if not self.isconnected(): return + + if self._rpc_invocation_tasks: + for task in self._rpc_invocation_tasks: + task.cancel() + await asyncio.gather(*self._rpc_invocation_tasks, return_exceptions=True) req = proto_ffi.FfiRequest() req.disconnect.room_handle = self._ffi_handle.handle # type: ignore - queue = FfiClient.instance.queue.subscribe() try: resp = FfiClient.instance.request(req) @@ -412,12 +416,6 @@ async def disconnect(self) -> None: ) finally: FfiClient.instance.queue.unsubscribe(queue) - - if self._rpc_invocation_tasks: - for task in self._rpc_invocation_tasks: - task.cancel() - await asyncio.gather(*self._rpc_invocation_tasks, return_exceptions=True) - await self._task FfiClient.instance.queue.unsubscribe(self._ffi_queue) @@ -457,7 +455,7 @@ def _on_rpc_method_invocation(self, rpc_invocation: RpcMethodInvocationEvent): rpc_invocation.request_id, rpc_invocation.caller_identity, rpc_invocation.payload, - rpc_invocation.response_timeout_ms, + rpc_invocation.response_timeout_ms / 1000.0, ) ) self._rpc_invocation_tasks.add(task) From b518e688c2fcd384fc2997444f2f4e6c0455516a Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 28 Oct 2024 12:28:17 -0700 Subject: [PATCH 36/53] kwargs --- README.md | 6 +++--- examples/rpc.py | 22 +++++++++++++++------- livekit-rtc/livekit/rtc/participant.py | 4 +++- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 75c9c5ea..78ef902f 100644 --- a/README.md +++ b/README.md @@ -155,9 +155,9 @@ The caller may then initiate an RPC call like so: ```python try: response = await room.local_participant.perform_rpc( - 'recipient-identity', - 'greet', - 'Hello from RPC!' + destination_identity='recipient-identity', + method='greet', + payload='Hello from RPC!' ) print(f"RPC response: {response}") except Exception as e: diff --git a/examples/rpc.py b/examples/rpc.py index 580b17df..1c83a078 100644 --- a/examples/rpc.py +++ b/examples/rpc.py @@ -152,7 +152,9 @@ async def perform_greeting(room: rtc.Room): print("[Caller] Letting the greeter know that I've arrived") try: response = await room.local_participant.perform_rpc( - "greeter", "arrival", "Hello" + destination_identity="greeter", + method="arrival", + payload="Hello" ) print(f'[Caller] That\'s nice, the greeter said: "{response}"') except Exception as error: @@ -164,7 +166,9 @@ async def perform_square_root(room: rtc.Room): print("[Caller] What's the square root of 16?") try: response = await room.local_participant.perform_rpc( - "math-genius", "square-root", json.dumps({"number": 16}) + destination_identity="math-genius", + method="square-root", + payload=json.dumps({"number": 16}) ) parsed_response = json.loads(response) print(f"[Caller] Nice, the answer was {parsed_response['result']}") @@ -177,7 +181,9 @@ async def perform_quantum_hypergeometric_series(room: rtc.Room): print("[Caller] What's the quantum hypergeometric series of 42?") try: response = await room.local_participant.perform_rpc( - "math-genius", "quantum-hypergeometric-series", json.dumps({"number": 42}) + destination_identity="math-genius", + method="quantum-hypergeometric-series", + payload=json.dumps({"number": 42}) ) parsed_response = json.loads(response) print(f"[Caller] genius says {parsed_response['result']}!") @@ -196,7 +202,9 @@ async def perform_divide(room: rtc.Room): print("[Caller] Let's divide 10 by 0.") try: response = await room.local_participant.perform_rpc( - "math-genius", "divide", json.dumps({"dividend": 10, "divisor": 0}) + destination_identity="math-genius", + method="divide", + payload=json.dumps({"dividend": 10, "divisor": 0}) ) parsed_response = json.loads(response) print(f"[Caller] The result is {parsed_response['result']}") @@ -215,9 +223,9 @@ async def perform_long_calculation(room: rtc.Room): print("[Caller] Giving the math genius 10s to complete a long calculation") try: response = await room.local_participant.perform_rpc( - "math-genius", - "long-calculation", - json.dumps({}), + destination_identity="math-genius", + method="long-calculation", + payload=json.dumps({}), response_timeout=10 ) parsed_response = json.loads(response) diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 30d31088..b42021db 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -65,7 +65,6 @@ class PublishTranscriptionError(Exception): def __init__(self, message: str) -> None: self.message = message - class Participant(ABC): def __init__(self, owned_info: proto_participant.OwnedParticipant) -> None: self._info = owned_info.info @@ -245,6 +244,7 @@ async def publish_transcription(self, transcription: Transcription) -> None: async def perform_rpc( self, + *, destination_identity: str, method: str, payload: str, @@ -603,3 +603,5 @@ def __repr__(self) -> str: return f"rtc.RemoteParticipant(sid={self.sid}, identity={self.identity}, name={self.name})" + + From 47d46cb11738feafc792bd451d435a26d541e4fe Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 28 Oct 2024 12:30:30 -0700 Subject: [PATCH 37/53] ruff --- examples/rpc.py | 22 ++++++++++++---------- livekit-rtc/livekit/rtc/participant.py | 14 ++++++++------ livekit-rtc/livekit/rtc/room.py | 7 +------ 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/examples/rpc.py b/examples/rpc.py index 1c83a078..dd17c54b 100644 --- a/examples/rpc.py +++ b/examples/rpc.py @@ -55,7 +55,7 @@ async def main(): await asyncio.create_task(perform_long_calculation(callers_room)) except Exception as error: print("Error:", error) - + try: print("\n\nRunning long calculation with disconnect...") # Start the long calculation @@ -82,7 +82,9 @@ async def main(): finally: # Clean up all rooms print("Disconnecting all participants...") - await asyncio.gather(*(room.disconnect() for room in rooms), return_exceptions=True) + await asyncio.gather( + *(room.disconnect() for room in rooms), return_exceptions=True + ) print("Cleanup complete") @@ -143,7 +145,9 @@ async def long_calculation_method( response_timeout: float, ): print(f"[Math Genius] Starting a very long calculation for {caller_identity}") - print(f"[Math Genius] This will take 30 seconds even though you're only giving me {response_timeout} seconds") + print( + f"[Math Genius] This will take 30 seconds even though you're only giving me {response_timeout} seconds" + ) await asyncio.sleep(30) return json.dumps({"result": "Calculation complete!"}) @@ -152,9 +156,7 @@ async def perform_greeting(room: rtc.Room): print("[Caller] Letting the greeter know that I've arrived") try: response = await room.local_participant.perform_rpc( - destination_identity="greeter", - method="arrival", - payload="Hello" + destination_identity="greeter", method="arrival", payload="Hello" ) print(f'[Caller] That\'s nice, the greeter said: "{response}"') except Exception as error: @@ -168,7 +170,7 @@ async def perform_square_root(room: rtc.Room): response = await room.local_participant.perform_rpc( destination_identity="math-genius", method="square-root", - payload=json.dumps({"number": 16}) + payload=json.dumps({"number": 16}), ) parsed_response = json.loads(response) print(f"[Caller] Nice, the answer was {parsed_response['result']}") @@ -183,7 +185,7 @@ async def perform_quantum_hypergeometric_series(room: rtc.Room): response = await room.local_participant.perform_rpc( destination_identity="math-genius", method="quantum-hypergeometric-series", - payload=json.dumps({"number": 42}) + payload=json.dumps({"number": 42}), ) parsed_response = json.loads(response) print(f"[Caller] genius says {parsed_response['result']}!") @@ -204,7 +206,7 @@ async def perform_divide(room: rtc.Room): response = await room.local_participant.perform_rpc( destination_identity="math-genius", method="divide", - payload=json.dumps({"dividend": 10, "divisor": 0}) + payload=json.dumps({"dividend": 10, "divisor": 0}), ) parsed_response = json.loads(response) print(f"[Caller] The result is {parsed_response['result']}") @@ -226,7 +228,7 @@ async def perform_long_calculation(room: rtc.Room): destination_identity="math-genius", method="long-calculation", payload=json.dumps({}), - response_timeout=10 + response_timeout=10, ) parsed_response = json.loads(response) print(f"[Caller] Result: {parsed_response['result']}") diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index b42021db..4ed8c0b1 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -65,6 +65,7 @@ class PublishTranscriptionError(Exception): def __init__(self, message: str) -> None: self.message = message + class Participant(ABC): def __init__(self, owned_info: proto_participant.OwnedParticipant) -> None: self._info = owned_info.info @@ -391,6 +392,7 @@ async def _handle_rpc_method_invocation( else: try: if asyncio.iscoroutinefunction(handler): + async def run_handler(): try: return await handler( @@ -401,11 +403,15 @@ async def run_handler(): raise try: - response_payload = await asyncio.wait_for(run_handler(), timeout=response_timeout) + response_payload = await asyncio.wait_for( + run_handler(), timeout=response_timeout + ) except asyncio.TimeoutError: raise RpcError._built_in(RpcError.ErrorCode.RESPONSE_TIMEOUT) except asyncio.CancelledError: - raise RpcError._built_in(RpcError.ErrorCode.RECIPIENT_DISCONNECTED) + raise RpcError._built_in( + RpcError.ErrorCode.RECIPIENT_DISCONNECTED + ) else: response_payload = handler( request_id, caller_identity, payload, response_timeout @@ -601,7 +607,3 @@ def track_publications(self) -> Mapping[str, RemoteTrackPublication]: def __repr__(self) -> str: return f"rtc.RemoteParticipant(sid={self.sid}, identity={self.identity}, name={self.name})" - - - - diff --git a/livekit-rtc/livekit/rtc/room.py b/livekit-rtc/livekit/rtc/room.py index 442753bd..59111d2d 100644 --- a/livekit-rtc/livekit/rtc/room.py +++ b/livekit-rtc/livekit/rtc/room.py @@ -400,7 +400,7 @@ async def disconnect(self) -> None: """Disconnects from the room.""" if not self.isconnected(): return - + if self._rpc_invocation_tasks: for task in self._rpc_invocation_tasks: task.cancel() @@ -736,8 +736,3 @@ def __repr__(self) -> str: sid = self._first_sid_future.result() return f"rtc.Room(sid={sid}, name={self.name}, metadata={self.metadata}, connection_state={self._connection_state})" - - - - - From 4a62dece47d5024747e7a6f401d7b004b3b0cc71 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 28 Oct 2024 12:32:20 -0700 Subject: [PATCH 38/53] float --- livekit-rtc/livekit/rtc/participant.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 4ed8c0b1..264d71a4 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -118,7 +118,7 @@ def __init__( self._room_queue = room_queue self._track_publications: dict[str, LocalTrackPublication] = {} # type: ignore self._rpc_handlers: Dict[ - str, Callable[[str, str, str, int], Union[Awaitable[str], str]] + str, Callable[[str, str, str, float], Union[Awaitable[str], str]] ] = {} @property @@ -291,7 +291,7 @@ async def perform_rpc( def register_rpc_method( self, method: str, - handler: Callable[[str, str, str, int], Union[Awaitable[str], str]], + handler: Callable[[str, str, str, float], Union[Awaitable[str], str]], ) -> None: """ Establishes the participant as a receiver for calls of the specified RPC method. From 69ef4f9a5327bfd1efcbff71e33bf627262350d4 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 28 Oct 2024 12:33:09 -0700 Subject: [PATCH 39/53] none --- livekit-rtc/livekit/rtc/room.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/livekit-rtc/livekit/rtc/room.py b/livekit-rtc/livekit/rtc/room.py index 59111d2d..5550c815 100644 --- a/livekit-rtc/livekit/rtc/room.py +++ b/livekit-rtc/livekit/rtc/room.py @@ -444,6 +444,9 @@ async def _listen_task(self) -> None: await self._room_queue.join() def _on_rpc_method_invocation(self, rpc_invocation: RpcMethodInvocationEvent): + if self._local_participant is None: + return + if ( rpc_invocation.local_participant_handle == self._local_participant._ffi_handle.handle From c4a4b50987a92dc4c63daa1928d9d4aeb2c12968 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 28 Oct 2024 12:35:25 -0700 Subject: [PATCH 40/53] dec types --- livekit-rtc/livekit/rtc/participant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 264d71a4..1cf530a9 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -352,7 +352,7 @@ async def greet_handler(request_id: str, caller_identity: str, payload: str, res `register_rpc_method` for more details """ - def decorator(handler: Callable[[str, str, str, int], Awaitable[str]]): + def decorator(handler: Callable[[str, str, str, float], Union[Awaitable[str], str]]): self.register_rpc_method(method, handler) return handler From a6a6ce61ffdb335f6473c507209b0c9a3ca25c3a Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 28 Oct 2024 12:39:06 -0700 Subject: [PATCH 41/53] fixes --- livekit-rtc/livekit/rtc/participant.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 1cf530a9..fd70d482 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -352,7 +352,9 @@ async def greet_handler(request_id: str, caller_identity: str, payload: str, res `register_rpc_method` for more details """ - def decorator(handler: Callable[[str, str, str, float], Union[Awaitable[str], str]]): + def decorator( + handler: Callable[[str, str, str, float], Union[Awaitable[str], str]], + ): self.register_rpc_method(method, handler) return handler @@ -392,10 +394,11 @@ async def _handle_rpc_method_invocation( else: try: if asyncio.iscoroutinefunction(handler): + async_handler = handler # type: Callable[[str, str, str, float], Awaitable[str]] async def run_handler(): try: - return await handler( + return await async_handler( request_id, caller_identity, payload, response_timeout ) except asyncio.CancelledError: @@ -413,7 +416,8 @@ async def run_handler(): RpcError.ErrorCode.RECIPIENT_DISCONNECTED ) else: - response_payload = handler( + sync_handler = handler # type: Callable[[str, str, str, float], str] + response_payload = sync_handler( request_id, caller_identity, payload, response_timeout ) except RpcError as error: From fe07bd4ea25d1edeb16315c2e111504e19e52c12 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 28 Oct 2024 12:55:39 -0700 Subject: [PATCH 42/53] version --- livekit-rtc/livekit/rtc/rpc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/livekit-rtc/livekit/rtc/rpc.py b/livekit-rtc/livekit/rtc/rpc.py index 11a7c88e..e4cfe24b 100644 --- a/livekit-rtc/livekit/rtc/rpc.py +++ b/livekit-rtc/livekit/rtc/rpc.py @@ -39,6 +39,7 @@ class ErrorCode(IntEnum): RECIPIENT_NOT_FOUND = 1401 REQUEST_PAYLOAD_TOO_LARGE = 1402 UNSUPPORTED_SERVER = 1403 + UNSUPPORTED_VERSION = 1404 ErrorMessage: ClassVar[Dict[ErrorCode, str]] = { ErrorCode.APPLICATION_ERROR: "Application error in method handler", @@ -51,6 +52,7 @@ class ErrorCode(IntEnum): ErrorCode.RECIPIENT_NOT_FOUND: "Recipient not found", ErrorCode.REQUEST_PAYLOAD_TOO_LARGE: "Request payload too large", ErrorCode.UNSUPPORTED_SERVER: "RPC not supported by server", + ErrorCode.UNSUPPORTED_VERSION: "Unsupported RPC version", } def __init__( From 8a421479bdd986f3d761dd8631cf67d31caf4496 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 28 Oct 2024 13:09:31 -0700 Subject: [PATCH 43/53] params --- examples/rpc.py | 39 ++++++++---------------- livekit-rtc/livekit/rtc/participant.py | 42 +++++++++++--------------- livekit-rtc/livekit/rtc/rpc.py | 16 ++++++++++ 3 files changed, 47 insertions(+), 50 deletions(-) diff --git a/examples/rpc.py b/examples/rpc.py index dd17c54b..f47122b9 100644 --- a/examples/rpc.py +++ b/examples/rpc.py @@ -3,8 +3,7 @@ import json import asyncio from dotenv import load_dotenv -import time - +from livekit.rtc.rpc import RpcHandlerParams load_dotenv(dotenv_path=".env.local", override=False) LIVEKIT_API_KEY = os.getenv("LIVEKIT_API_KEY") LIVEKIT_API_SECRET = os.getenv("LIVEKIT_API_SECRET") @@ -91,26 +90,20 @@ async def main(): def register_receiver_methods(greeters_room: rtc.Room, math_genius_room: rtc.Room): @greeters_room.local_participant.rpc_method("arrival") async def arrival_method( - request_id: str, - caller_identity: str, - payload: str, - response_timeout: float, + params: RpcHandlerParams, ): - print(f'[Greeter] Oh {caller_identity} arrived and said "{payload}"') + print(f'[Greeter] Oh {params.caller_identity} arrived and said "{params.payload}"') await asyncio.sleep(2) return "Welcome and have a wonderful day!" @math_genius_room.local_participant.rpc_method("square-root") async def square_root_method( - request_id: str, - caller_identity: str, - payload: str, - response_timeout: float, + params: RpcHandlerParams, ): - json_data = json.loads(payload) + json_data = json.loads(params.payload) number = json_data["number"] print( - f"[Math Genius] I guess {caller_identity} wants the square root of {number}. I've only got {response_timeout} seconds to respond but I think I can pull it off." + f"[Math Genius] I guess {params.caller_identity} wants the square root of {number}. I've only got {params.response_timeout} seconds to respond but I think I can pull it off." ) print("[Math Genius] *doing math*…") @@ -121,17 +114,14 @@ async def square_root_method( return json.dumps({"result": result}) @math_genius_room.local_participant.rpc_method("divide") - def divide_method( - request_id: str, - caller_identity: str, - payload: str, - response_timeout: float, + async def divide_method( + params: RpcHandlerParams, ): - json_data = json.loads(payload) + json_data = json.loads(params.payload) dividend = json_data["dividend"] divisor = json_data["divisor"] print( - f"[Math Genius] {caller_identity} wants to divide {dividend} by {divisor}." + f"[Math Genius] {params.caller_identity} wants to divide {dividend} by {divisor}." ) result = dividend / divisor @@ -139,14 +129,11 @@ def divide_method( @math_genius_room.local_participant.rpc_method("long-calculation") async def long_calculation_method( - request_id: str, - caller_identity: str, - payload: str, - response_timeout: float, + params: RpcHandlerParams, ): - print(f"[Math Genius] Starting a very long calculation for {caller_identity}") + print(f"[Math Genius] Starting a very long calculation for {params.caller_identity}") print( - f"[Math Genius] This will take 30 seconds even though you're only giving me {response_timeout} seconds" + f"[Math Genius] This will take 30 seconds even though you're only giving me {params.response_timeout} seconds" ) await asyncio.sleep(30) return json.dumps({"result": "Calculation complete!"}) diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index fd70d482..b1b7f577 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -40,6 +40,7 @@ from .log import logger import asyncio +from .rpc import RpcHandlerParams class PublishTrackError(Exception): def __init__(self, message: str) -> None: @@ -118,7 +119,7 @@ def __init__( self._room_queue = room_queue self._track_publications: dict[str, LocalTrackPublication] = {} # type: ignore self._rpc_handlers: Dict[ - str, Callable[[str, str, str, float], Union[Awaitable[str], str]] + str, Callable[[RpcHandlerParams], Union[Awaitable[str], str]] ] = {} @property @@ -291,7 +292,7 @@ async def perform_rpc( def register_rpc_method( self, method: str, - handler: Callable[[str, str, str, float], Union[Awaitable[str], str]], + handler: Callable[[RpcHandlerParams], Union[Awaitable[str], str]], ) -> None: """ Establishes the participant as a receiver for calls of the specified RPC method. @@ -308,20 +309,15 @@ def register_rpc_method( RpcError: On failure. Details in `message`. Example: - async def greet_handler(request_id: str, caller_identity: str, payload: str, response_timeout: float) -> str: - print(f"Received greeting from {caller_identity}: {payload}") - return f"Hello, {caller_identity}!" + async def greet_handler(params: RpcHandlerParams) -> str: + print(f"Received greeting from {params.caller_identity}: {params.payload}") + return f"Hello, {params.caller_identity}!" await room.local_participant.register_rpc_method('greet', greet_handler) - The handler receives the following parameters: - - `request_id`: A unique identifier for this RPC request - - `caller_identity`: The identity of the RemoteParticipant who initiated the RPC call - - `payload`: The data sent by the caller (as a string) - - `response_timeout`: The maximum time available to return a response - The handler should return a string or a coroutine that resolves to a string. - If unable to respond within `response_timeout`, the request will result in an error on the caller's side. + + If unable to respond within `response_timeout`, the caller will hang up and receive an error on their side. You may raise errors of type `RpcError` with a string `message` in the handler, and they will be received on the caller's side with the message intact. @@ -344,16 +340,16 @@ def rpc_method(self, method: str): Example: @local_participant.rpc_method("greet") - async def greet_handler(request_id: str, caller_identity: str, payload: str, response_timeout: float) -> str: - print(f"Received greeting from {caller_identity}: {payload}") - return f"Hello, {caller_identity}!" + async def greet_handler(params: RpcHandlerParams) -> str: + print(f"Received greeting from {params.caller_identity}: {params.payload}") + return f"Hello, {params.caller_identity}!" See Also: `register_rpc_method` for more details """ def decorator( - handler: Callable[[str, str, str, float], Union[Awaitable[str], str]], + handler: Callable[[RpcHandlerParams], Union[Awaitable[str], str]], ): self.register_rpc_method(method, handler) return handler @@ -386,6 +382,8 @@ async def _handle_rpc_method_invocation( ) -> None: response_error: Optional[RpcError] = None response_payload: Optional[str] = None + + params = RpcHandlerParams(request_id, caller_identity, payload, response_timeout) handler = self._rpc_handlers.get(method) @@ -394,13 +392,11 @@ async def _handle_rpc_method_invocation( else: try: if asyncio.iscoroutinefunction(handler): - async_handler = handler # type: Callable[[str, str, str, float], Awaitable[str]] + async_handler = handler # type: Callable[[RpcHandlerParams], Awaitable[str]] async def run_handler(): try: - return await async_handler( - request_id, caller_identity, payload, response_timeout - ) + return await async_handler(params) except asyncio.CancelledError: # This will be caught by the outer try-except if it's due to timeout raise @@ -416,10 +412,8 @@ async def run_handler(): RpcError.ErrorCode.RECIPIENT_DISCONNECTED ) else: - sync_handler = handler # type: Callable[[str, str, str, float], str] - response_payload = sync_handler( - request_id, caller_identity, payload, response_timeout - ) + sync_handler = handler # type: Callable[[RpcHandlerParams], str] + response_payload = sync_handler(params) except RpcError as error: response_error = error except Exception as error: diff --git a/livekit-rtc/livekit/rtc/rpc.py b/livekit-rtc/livekit/rtc/rpc.py index e4cfe24b..26e884ab 100644 --- a/livekit-rtc/livekit/rtc/rpc.py +++ b/livekit-rtc/livekit/rtc/rpc.py @@ -15,6 +15,22 @@ from typing import Optional, Dict, Union, ClassVar from enum import IntEnum from ._proto import rpc_pb2 as proto_rpc +from dataclasses import dataclass + +@dataclass +class RpcHandlerParams: + """Parameters passed to method handler for incoming RPC invocations + + Attributes: + request_id (str): The unique request ID. Will match at both sides of the call, useful for debugging or logging. + caller_identity (str): The unique participant identity of the caller. + payload (str): The payload of the request. User-definable format, typically JSON. + response_timeout (float): The maximum time the caller will wait for a response. + """ + request_id: str + caller_identity: str + payload: str + response_timeout: float class RpcError(Exception): From b0f575aa9cca9b181a5d94396f34063f9002432f Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 28 Oct 2024 13:11:29 -0700 Subject: [PATCH 44/53] data --- examples/rpc.py | 27 ++++++++++++---------- livekit-rtc/livekit/rtc/participant.py | 31 ++++++++++++++------------ livekit-rtc/livekit/rtc/rpc.py | 8 ++++--- 3 files changed, 37 insertions(+), 29 deletions(-) diff --git a/examples/rpc.py b/examples/rpc.py index f47122b9..18bb9357 100644 --- a/examples/rpc.py +++ b/examples/rpc.py @@ -3,7 +3,8 @@ import json import asyncio from dotenv import load_dotenv -from livekit.rtc.rpc import RpcHandlerParams +from livekit.rtc.rpc import RpcInvocationData + load_dotenv(dotenv_path=".env.local", override=False) LIVEKIT_API_KEY = os.getenv("LIVEKIT_API_KEY") LIVEKIT_API_SECRET = os.getenv("LIVEKIT_API_SECRET") @@ -90,20 +91,20 @@ async def main(): def register_receiver_methods(greeters_room: rtc.Room, math_genius_room: rtc.Room): @greeters_room.local_participant.rpc_method("arrival") async def arrival_method( - params: RpcHandlerParams, + data: RpcInvocationData, ): - print(f'[Greeter] Oh {params.caller_identity} arrived and said "{params.payload}"') + print(f'[Greeter] Oh {data.caller_identity} arrived and said "{data.payload}"') await asyncio.sleep(2) return "Welcome and have a wonderful day!" @math_genius_room.local_participant.rpc_method("square-root") async def square_root_method( - params: RpcHandlerParams, + data: RpcInvocationData, ): - json_data = json.loads(params.payload) + json_data = json.loads(data.payload) number = json_data["number"] print( - f"[Math Genius] I guess {params.caller_identity} wants the square root of {number}. I've only got {params.response_timeout} seconds to respond but I think I can pull it off." + f"[Math Genius] I guess {data.caller_identity} wants the square root of {number}. I've only got {data.response_timeout} seconds to respond but I think I can pull it off." ) print("[Math Genius] *doing math*…") @@ -115,13 +116,13 @@ async def square_root_method( @math_genius_room.local_participant.rpc_method("divide") async def divide_method( - params: RpcHandlerParams, + data: RpcInvocationData, ): - json_data = json.loads(params.payload) + json_data = json.loads(data.payload) dividend = json_data["dividend"] divisor = json_data["divisor"] print( - f"[Math Genius] {params.caller_identity} wants to divide {dividend} by {divisor}." + f"[Math Genius] {data.caller_identity} wants to divide {dividend} by {divisor}." ) result = dividend / divisor @@ -129,11 +130,13 @@ async def divide_method( @math_genius_room.local_participant.rpc_method("long-calculation") async def long_calculation_method( - params: RpcHandlerParams, + data: RpcInvocationData, ): - print(f"[Math Genius] Starting a very long calculation for {params.caller_identity}") print( - f"[Math Genius] This will take 30 seconds even though you're only giving me {params.response_timeout} seconds" + f"[Math Genius] Starting a very long calculation for {data.caller_identity}" + ) + print( + f"[Math Genius] This will take 30 seconds even though you're only giving me {data.response_timeout} seconds" ) await asyncio.sleep(30) return json.dumps({"result": "Calculation complete!"}) diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index b1b7f577..9cf33726 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -40,7 +40,8 @@ from .log import logger import asyncio -from .rpc import RpcHandlerParams +from .rpc import RpcInvocationData + class PublishTrackError(Exception): def __init__(self, message: str) -> None: @@ -119,7 +120,7 @@ def __init__( self._room_queue = room_queue self._track_publications: dict[str, LocalTrackPublication] = {} # type: ignore self._rpc_handlers: Dict[ - str, Callable[[RpcHandlerParams], Union[Awaitable[str], str]] + str, Callable[[RpcInvocationData], Union[Awaitable[str], str]] ] = {} @property @@ -292,7 +293,7 @@ async def perform_rpc( def register_rpc_method( self, method: str, - handler: Callable[[RpcHandlerParams], Union[Awaitable[str], str]], + handler: Callable[[RpcInvocationData], Union[Awaitable[str], str]], ) -> None: """ Establishes the participant as a receiver for calls of the specified RPC method. @@ -309,14 +310,14 @@ def register_rpc_method( RpcError: On failure. Details in `message`. Example: - async def greet_handler(params: RpcHandlerParams) -> str: - print(f"Received greeting from {params.caller_identity}: {params.payload}") - return f"Hello, {params.caller_identity}!" + async def greet_handler(data: RpcInvocationData) -> str: + print(f"Received greeting from {data.caller_identity}: {data.payload}") + return f"Hello, {data.caller_identity}!" await room.local_participant.register_rpc_method('greet', greet_handler) The handler should return a string or a coroutine that resolves to a string. - + If unable to respond within `response_timeout`, the caller will hang up and receive an error on their side. You may raise errors of type `RpcError` with a string `message` in the handler, @@ -340,8 +341,8 @@ def rpc_method(self, method: str): Example: @local_participant.rpc_method("greet") - async def greet_handler(params: RpcHandlerParams) -> str: - print(f"Received greeting from {params.caller_identity}: {params.payload}") + async def greet_handler(data: RpcInvocationData) -> str: + print(f"Received greeting from {data.caller_identity}: {data.payload}") return f"Hello, {params.caller_identity}!" See Also: @@ -349,7 +350,7 @@ async def greet_handler(params: RpcHandlerParams) -> str: """ def decorator( - handler: Callable[[RpcHandlerParams], Union[Awaitable[str], str]], + handler: Callable[[RpcInvocationData], Union[Awaitable[str], str]], ): self.register_rpc_method(method, handler) return handler @@ -382,8 +383,10 @@ async def _handle_rpc_method_invocation( ) -> None: response_error: Optional[RpcError] = None response_payload: Optional[str] = None - - params = RpcHandlerParams(request_id, caller_identity, payload, response_timeout) + + params = RpcInvocationData( + request_id, caller_identity, payload, response_timeout + ) handler = self._rpc_handlers.get(method) @@ -392,7 +395,7 @@ async def _handle_rpc_method_invocation( else: try: if asyncio.iscoroutinefunction(handler): - async_handler = handler # type: Callable[[RpcHandlerParams], Awaitable[str]] + async_handler = handler # type: Callable[[RpcInvocationData], Awaitable[str]] async def run_handler(): try: @@ -412,7 +415,7 @@ async def run_handler(): RpcError.ErrorCode.RECIPIENT_DISCONNECTED ) else: - sync_handler = handler # type: Callable[[RpcHandlerParams], str] + sync_handler = handler # type: Callable[[RpcInvocationData], str] response_payload = sync_handler(params) except RpcError as error: response_error = error diff --git a/livekit-rtc/livekit/rtc/rpc.py b/livekit-rtc/livekit/rtc/rpc.py index 26e884ab..771826a9 100644 --- a/livekit-rtc/livekit/rtc/rpc.py +++ b/livekit-rtc/livekit/rtc/rpc.py @@ -17,16 +17,18 @@ from ._proto import rpc_pb2 as proto_rpc from dataclasses import dataclass + @dataclass -class RpcHandlerParams: - """Parameters passed to method handler for incoming RPC invocations - +class RpcInvocationData: + """Data passed to method handler for incoming RPC invocations + Attributes: request_id (str): The unique request ID. Will match at both sides of the call, useful for debugging or logging. caller_identity (str): The unique participant identity of the caller. payload (str): The payload of the request. User-definable format, typically JSON. response_timeout (float): The maximum time the caller will wait for a response. """ + request_id: str caller_identity: str payload: str From efd778464b6a926010ae9842de0d8a4c888cf30b Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 28 Oct 2024 14:00:54 -0700 Subject: [PATCH 45/53] cast --- livekit-rtc/livekit/rtc/participant.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 9cf33726..9362a066 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -15,7 +15,7 @@ from __future__ import annotations import ctypes -from typing import List, Union, Callable, Dict, Awaitable, Optional, Mapping +from typing import List, Union, Callable, Dict, Awaitable, Optional, Mapping, cast from abc import abstractmethod, ABC from ._ffi_client import FfiClient, FfiHandle @@ -395,7 +395,7 @@ async def _handle_rpc_method_invocation( else: try: if asyncio.iscoroutinefunction(handler): - async_handler = handler # type: Callable[[RpcInvocationData], Awaitable[str]] + async_handler = cast(Callable[[RpcInvocationData], Awaitable[str]], handler) async def run_handler(): try: @@ -415,7 +415,7 @@ async def run_handler(): RpcError.ErrorCode.RECIPIENT_DISCONNECTED ) else: - sync_handler = handler # type: Callable[[RpcInvocationData], str] + sync_handler = cast(Callable[[RpcInvocationData], str], handler) response_payload = sync_handler(params) except RpcError as error: response_error = error From 460a292ad29ba57e05991e62abe7e9ea453c9464 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 28 Oct 2024 14:53:51 -0700 Subject: [PATCH 46/53] fmt --- livekit-rtc/livekit/rtc/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/livekit-rtc/livekit/rtc/__init__.py b/livekit-rtc/livekit/rtc/__init__.py index 718f8d10..13b8ed7b 100644 --- a/livekit-rtc/livekit/rtc/__init__.py +++ b/livekit-rtc/livekit/rtc/__init__.py @@ -134,6 +134,7 @@ "AudioResampler", "AudioResamplerQuality", "RpcError", + "RpcInvocationData", "EventEmitter", "combine_audio_frames", "__version__", From b13435b16e50285ebe5eeaf4872268aa67612094 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 28 Oct 2024 14:54:04 -0700 Subject: [PATCH 47/53] ex --- livekit-rtc/livekit/rtc/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/livekit-rtc/livekit/rtc/__init__.py b/livekit-rtc/livekit/rtc/__init__.py index 13b8ed7b..61c2ae51 100644 --- a/livekit-rtc/livekit/rtc/__init__.py +++ b/livekit-rtc/livekit/rtc/__init__.py @@ -72,7 +72,7 @@ from .video_stream import VideoFrameEvent, VideoStream from .audio_resampler import AudioResampler, AudioResamplerQuality from .utils import combine_audio_frames -from .rpc import RpcError +from .rpc import RpcError, RpcInvocationData __all__ = [ "ConnectionQuality", From 84814117c43c6dd760724847079a73f1dad62b3a Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Wed, 30 Oct 2024 10:18:42 -0700 Subject: [PATCH 48/53] clean up --- livekit-rtc/livekit/rtc/room.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/livekit-rtc/livekit/rtc/room.py b/livekit-rtc/livekit/rtc/room.py index 5550c815..e35d2bbc 100644 --- a/livekit-rtc/livekit/rtc/room.py +++ b/livekit-rtc/livekit/rtc/room.py @@ -401,10 +401,7 @@ async def disconnect(self) -> None: if not self.isconnected(): return - if self._rpc_invocation_tasks: - for task in self._rpc_invocation_tasks: - task.cancel() - await asyncio.gather(*self._rpc_invocation_tasks, return_exceptions=True) + await self._drain_rpc_invocation_tasks() req = proto_ffi.FfiRequest() req.disconnect.room_handle = self._ffi_handle.handle # type: ignore @@ -443,6 +440,9 @@ async def _listen_task(self) -> None: self._room_queue.put_nowait(event) await self._room_queue.join() + # Clean up any pending RPC invocation tasks + await self._drain_rpc_invocation_tasks() + def _on_rpc_method_invocation(self, rpc_invocation: RpcMethodInvocationEvent): if self._local_participant is None: return @@ -710,6 +710,12 @@ def _on_room_event(self, event: proto_room.RoomEvent): elif which == "reconnected": self.emit("reconnected") + async def _drain_rpc_invocation_tasks(self) -> None: + if self._rpc_invocation_tasks: + for task in self._rpc_invocation_tasks: + task.cancel() + await asyncio.gather(*self._rpc_invocation_tasks, return_exceptions=True) + def _retrieve_remote_participant( self, identity: str ) -> Optional[RemoteParticipant]: From 2c3ba7373455c8a9ef59a2d25649dcb70443d8bd Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Wed, 30 Oct 2024 10:23:29 -0700 Subject: [PATCH 49/53] docs --- livekit-rtc/livekit/rtc/participant.py | 4 +-- livekit-rtc/livekit/rtc/rpc.py | 39 ++++++++++++++++++-------- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 9362a066..de7ba249 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -286,7 +286,7 @@ async def perform_rpc( FfiClient.instance.queue.unsubscribe(queue) if cb.perform_rpc.HasField("error"): - raise RpcError.from_proto(cb.perform_rpc.error) + raise RpcError._from_proto(cb.perform_rpc.error) return cb.perform_rpc.payload @@ -431,7 +431,7 @@ async def run_handler(): rpc_method_invocation_response=RpcMethodInvocationResponseRequest( local_participant_handle=self._ffi_handle.handle, invocation_id=invocation_id, - error=response_error.to_proto() if response_error else None, + error=response_error._to_proto() if response_error else None, payload=response_payload, ) ) diff --git a/livekit-rtc/livekit/rtc/rpc.py b/livekit-rtc/livekit/rtc/rpc.py index 771826a9..e7f4c98b 100644 --- a/livekit-rtc/livekit/rtc/rpc.py +++ b/livekit-rtc/livekit/rtc/rpc.py @@ -41,8 +41,8 @@ class RpcError(Exception): Instances of this type, when thrown in a method handler, will have their `message` serialized and sent across the wire. The caller will receive an equivalent error on the other side. - - Build-in types are included but developers may use any string, with a max length of 256 bytes. + + Built-in errors are included (codes 1001-1999) but developers may use the code, message, and data fields to create their own errors. """ class ErrorCode(IntEnum): @@ -83,27 +83,42 @@ def __init__( Creates an error object with the given code and message, plus an optional data payload. If thrown in an RPC method handler, the error will be sent back to the caller. - - Error codes 1001-1999 are reserved for built-in errors (see RpcError.ErrorCode for their meanings). + + Args: + code (int): Your error code (Error codes 1001-1999 are reserved for built-in errors) + message (str): A readable error message. + data (Optional[str]): Optional additional data associated with the error (JSON recommended) """ super().__init__(message) - self.code = code - self.message = message - self.data = data + self._code = code + self._message = message + self._data = data + + @property + def code(self) -> int: + """Error code value. Codes 1001-1999 are reserved for built-in errors (see RpcError.ErrorCode for their meanings).""" + return self._code + + @property + def message(self) -> str: + """A readable error message.""" + return self._message + + @property + def data(self) -> Optional[str]: + """Optional additional data associated with the error (JSON recommended).""" + return self._data @classmethod - def from_proto(cls, proto: proto_rpc.RpcError) -> "RpcError": + def _from_proto(cls, proto: proto_rpc.RpcError) -> "RpcError": return cls(proto.code, proto.message, proto.data) - def to_proto(self) -> proto_rpc.RpcError: + def _to_proto(self) -> proto_rpc.RpcError: return proto_rpc.RpcError(code=self.code, message=self.message, data=self.data) @classmethod def _built_in( cls, code: "RpcError.ErrorCode", data: Optional[str] = None ) -> "RpcError": - """ - Creates an error object from the ErrorCode, with an auto-populated message. - """ message = cls.ErrorMessage[code] return cls(code, message, data) From 6bf474922d40204c1fc561b9f6f9ad8b0af18397 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Wed, 30 Oct 2024 10:35:05 -0700 Subject: [PATCH 50/53] decorator --- README.md | 2 +- examples/rpc.py | 8 +-- livekit-rtc/livekit/rtc/participant.py | 81 +++++++++++--------------- 3 files changed, 39 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index 78ef902f..baf7bda2 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ This feature is especially powerful when used with [Agents](https://docs.livekit The participant who implements the method and will receive its calls must first register support: ```python -@room.local_participant.rpc_method("greet") +@room.local_participant.register_rpc_method("greet") async def handle_greet(request_id: str, caller_identity: str, payload: str, response_timeout: float): print(f"Received greeting from {caller_identity}: {payload}") return f"Hello, {caller_identity}!" diff --git a/examples/rpc.py b/examples/rpc.py index 18bb9357..ac1ce337 100644 --- a/examples/rpc.py +++ b/examples/rpc.py @@ -89,7 +89,7 @@ async def main(): def register_receiver_methods(greeters_room: rtc.Room, math_genius_room: rtc.Room): - @greeters_room.local_participant.rpc_method("arrival") + @greeters_room.local_participant.register_rpc_method("arrival") async def arrival_method( data: RpcInvocationData, ): @@ -97,7 +97,7 @@ async def arrival_method( await asyncio.sleep(2) return "Welcome and have a wonderful day!" - @math_genius_room.local_participant.rpc_method("square-root") + @math_genius_room.local_participant.register_rpc_method("square-root") async def square_root_method( data: RpcInvocationData, ): @@ -114,7 +114,7 @@ async def square_root_method( print(f"[Math Genius] Aha! It's {result}") return json.dumps({"result": result}) - @math_genius_room.local_participant.rpc_method("divide") + @math_genius_room.local_participant.register_rpc_method("divide") async def divide_method( data: RpcInvocationData, ): @@ -128,7 +128,7 @@ async def divide_method( result = dividend / divisor return json.dumps({"result": result}) - @math_genius_room.local_participant.rpc_method("long-calculation") + @math_genius_room.local_participant.register_rpc_method("long-calculation") async def long_calculation_method( data: RpcInvocationData, ): diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index de7ba249..8a6aeb13 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -292,70 +292,57 @@ async def perform_rpc( def register_rpc_method( self, - method: str, - handler: Callable[[RpcInvocationData], Union[Awaitable[str], str]], - ) -> None: + method_name: str, + handler: Optional[Callable[[RpcInvocationData], Union[Awaitable[str], str]]] = None, + ) -> Union[None, Callable]: """ Establishes the participant as a receiver for calls of the specified RPC method. - Will overwrite any existing callback for the same method. + Can be used either as a decorator or a regular method. + + The handler will recieve one argument of type `RpcInvocationData` and should return a string response which will be forwarded back to the caller. + + The handler may be synchronous or asynchronous. + + If unable to respond within `response_timeout`, the caller will hang up and receive an error on their side. + + You may raise errors of type `RpcError` in the handler, and they will be forwarded to the caller. + + Other errors raised in your handler will be caught and forwarded to the caller as "1500 Application Error". Args: - method (str): The name of the indicated RPC method - handler (Callable): Will be invoked when an RPC request for this method is received + method_name (str): The name of the indicated RPC method. + handler (Optional[Callable]): Handler to be invoked whenever an RPC request for this method is received. Omit this argument to use the decorator syntax. Returns: - None - - Raises: - RpcError: On failure. Details in `message`. + None (when used as a decorator it returns the decorator function) Example: + # As a decorator: + @room.local_participant.register_rpc_method("greet") async def greet_handler(data: RpcInvocationData) -> str: print(f"Received greeting from {data.caller_identity}: {data.payload}") return f"Hello, {data.caller_identity}!" - - await room.local_participant.register_rpc_method('greet', greet_handler) - - The handler should return a string or a coroutine that resolves to a string. - - If unable to respond within `response_timeout`, the caller will hang up and receive an error on their side. - - You may raise errors of type `RpcError` with a string `message` in the handler, - and they will be received on the caller's side with the message intact. - Other errors raised in your handler will not be transmitted as-is, and will instead arrive to the caller as `1500` ("Application Error"). - """ - self._rpc_handlers[method] = handler - - req = proto_ffi.FfiRequest() - req.register_rpc_method.local_participant_handle = self._ffi_handle.handle - req.register_rpc_method.method = method - - FfiClient.instance.request(req) - - def rpc_method(self, method: str): - """ - Decorator form of `register_rpc_method` - - Args: - method (str): The name of the indicated RPC method - - Example: - @local_participant.rpc_method("greet") + + # As a regular method: async def greet_handler(data: RpcInvocationData) -> str: print(f"Received greeting from {data.caller_identity}: {data.payload}") - return f"Hello, {params.caller_identity}!" + return f"Hello, {data.caller_identity}!" - See Also: - `register_rpc_method` for more details + room.local_participant.register_rpc_method('greet', greet_handler) """ - def decorator( - handler: Callable[[RpcInvocationData], Union[Awaitable[str], str]], - ): - self.register_rpc_method(method, handler) - return handler + def register(handler_func): + self._rpc_handlers[method_name] = handler_func + req = proto_ffi.FfiRequest() + req.register_rpc_method.local_participant_handle = self._ffi_handle.handle + req.register_rpc_method.method = method_name + FfiClient.instance.request(req) - return decorator + if handler is not None: + register(handler) + else: + # Called as a decorator + return register def unregister_rpc_method(self, method: str) -> None: """ From c56be2f25c2dd41b0fd2831c90d8f69af8c4b655 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Wed, 30 Oct 2024 10:35:27 -0700 Subject: [PATCH 51/53] fmt --- livekit-rtc/livekit/rtc/participant.py | 16 ++++++++++------ livekit-rtc/livekit/rtc/rpc.py | 6 +++--- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 8a6aeb13..6894efcb 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -293,20 +293,22 @@ async def perform_rpc( def register_rpc_method( self, method_name: str, - handler: Optional[Callable[[RpcInvocationData], Union[Awaitable[str], str]]] = None, + handler: Optional[ + Callable[[RpcInvocationData], Union[Awaitable[str], str]] + ] = None, ) -> Union[None, Callable]: """ Establishes the participant as a receiver for calls of the specified RPC method. Can be used either as a decorator or a regular method. - + The handler will recieve one argument of type `RpcInvocationData` and should return a string response which will be forwarded back to the caller. - + The handler may be synchronous or asynchronous. If unable to respond within `response_timeout`, the caller will hang up and receive an error on their side. You may raise errors of type `RpcError` in the handler, and they will be forwarded to the caller. - + Other errors raised in your handler will be caught and forwarded to the caller as "1500 Application Error". Args: @@ -322,7 +324,7 @@ def register_rpc_method( async def greet_handler(data: RpcInvocationData) -> str: print(f"Received greeting from {data.caller_identity}: {data.payload}") return f"Hello, {data.caller_identity}!" - + # As a regular method: async def greet_handler(data: RpcInvocationData) -> str: print(f"Received greeting from {data.caller_identity}: {data.payload}") @@ -382,7 +384,9 @@ async def _handle_rpc_method_invocation( else: try: if asyncio.iscoroutinefunction(handler): - async_handler = cast(Callable[[RpcInvocationData], Awaitable[str]], handler) + async_handler = cast( + Callable[[RpcInvocationData], Awaitable[str]], handler + ) async def run_handler(): try: diff --git a/livekit-rtc/livekit/rtc/rpc.py b/livekit-rtc/livekit/rtc/rpc.py index e7f4c98b..10e4d6d8 100644 --- a/livekit-rtc/livekit/rtc/rpc.py +++ b/livekit-rtc/livekit/rtc/rpc.py @@ -41,7 +41,7 @@ class RpcError(Exception): Instances of this type, when thrown in a method handler, will have their `message` serialized and sent across the wire. The caller will receive an equivalent error on the other side. - + Built-in errors are included (codes 1001-1999) but developers may use the code, message, and data fields to create their own errors. """ @@ -83,7 +83,7 @@ def __init__( Creates an error object with the given code and message, plus an optional data payload. If thrown in an RPC method handler, the error will be sent back to the caller. - + Args: code (int): Your error code (Error codes 1001-1999 are reserved for built-in errors) message (str): A readable error message. @@ -97,7 +97,7 @@ def __init__( @property def code(self) -> int: """Error code value. Codes 1001-1999 are reserved for built-in errors (see RpcError.ErrorCode for their meanings).""" - return self._code + return self._code @property def message(self) -> str: From c3937749a9f196169c6d4f1e92f8084dc144276e Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Wed, 30 Oct 2024 10:38:28 -0700 Subject: [PATCH 52/53] readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index baf7bda2..37887ee2 100644 --- a/README.md +++ b/README.md @@ -141,9 +141,9 @@ The participant who implements the method and will receive its calls must first ```python @room.local_participant.register_rpc_method("greet") -async def handle_greet(request_id: str, caller_identity: str, payload: str, response_timeout: float): - print(f"Received greeting from {caller_identity}: {payload}") - return f"Hello, {caller_identity}!" +async def handle_greet(data: RpcInvocationData): + print(f"Received greeting from {data.caller_identity}: {data.payload}") + return f"Hello, {data.caller_identity}!" ``` In addition to the payload, your handler will also receive `response_timeout`, which informs you the maximum time available to return a response. If you are unable to respond in time, the call will result in an error on the caller's side. From 5d4b964ddef997bfa3e8f54443e4c26590a854b6 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Wed, 30 Oct 2024 13:23:58 -0700 Subject: [PATCH 53/53] return --- livekit-rtc/livekit/rtc/participant.py | 1 + 1 file changed, 1 insertion(+) diff --git a/livekit-rtc/livekit/rtc/participant.py b/livekit-rtc/livekit/rtc/participant.py index 6894efcb..779e0212 100644 --- a/livekit-rtc/livekit/rtc/participant.py +++ b/livekit-rtc/livekit/rtc/participant.py @@ -342,6 +342,7 @@ def register(handler_func): if handler is not None: register(handler) + return None else: # Called as a decorator return register