From 4eacb5d6af2ae405c99cd1bc0f6a665c02efbc16 Mon Sep 17 00:00:00 2001 From: Denys Smirnov Date: Tue, 9 Apr 2024 17:09:15 +0300 Subject: [PATCH] Add SIP services. Support SIP DTMF in RTC. --- livekit-api/livekit/api/sip_service.py | 90 ++++ livekit-protocol/generate_proto.sh | 5 +- livekit-protocol/livekit/protocol/agent.py | 6 +- livekit-protocol/livekit/protocol/agent.pyi | 38 +- .../livekit/protocol/analytics.py | 6 +- .../livekit/protocol/analytics.pyi | 24 +- livekit-protocol/livekit/protocol/egress.py | 62 +-- livekit-protocol/livekit/protocol/egress.pyi | 76 ++-- livekit-protocol/livekit/protocol/ingress.py | 6 +- livekit-protocol/livekit/protocol/ingress.pyi | 34 +- livekit-protocol/livekit/protocol/models.py | 34 +- livekit-protocol/livekit/protocol/models.pyi | 84 ++-- livekit-protocol/livekit/protocol/room.py | 10 +- livekit-protocol/livekit/protocol/room.pyi | 36 +- livekit-protocol/livekit/protocol/sip.py | 61 +++ livekit-protocol/livekit/protocol/sip.pyi | 156 +++++++ livekit-protocol/livekit/protocol/webhook.py | 6 +- livekit-protocol/livekit/protocol/webhook.pyi | 2 +- .../livekit/rtc/_proto/audio_frame_pb2.py | 6 +- .../livekit/rtc/_proto/audio_frame_pb2.pyi | 129 +++--- livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py | 6 +- livekit-rtc/livekit/rtc/_proto/e2ee_pb2.pyi | 119 +++--- livekit-rtc/livekit/rtc/_proto/ffi_pb2.py | 6 +- livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi | 69 +-- livekit-rtc/livekit/rtc/_proto/handle_pb2.py | 6 +- livekit-rtc/livekit/rtc/_proto/handle_pb2.pyi | 12 +- .../livekit/rtc/_proto/participant_pb2.py | 6 +- .../livekit/rtc/_proto/participant_pb2.pyi | 18 +- livekit-rtc/livekit/rtc/_proto/room_pb2.py | 144 ++++--- livekit-rtc/livekit/rtc/_proto/room_pb2.pyi | 404 ++++++++++-------- livekit-rtc/livekit/rtc/_proto/stats_pb2.py | 10 +- livekit-rtc/livekit/rtc/_proto/stats_pb2.pyi | 201 ++++----- livekit-rtc/livekit/rtc/_proto/track_pb2.py | 6 +- livekit-rtc/livekit/rtc/_proto/track_pb2.pyi | 59 +-- .../livekit/rtc/_proto/video_frame_pb2.py | 6 +- .../livekit/rtc/_proto/video_frame_pb2.pyi | 118 ++--- livekit-rtc/livekit/rtc/room.py | 90 ++-- livekit-rtc/rust-sdks | 2 +- 38 files changed, 1293 insertions(+), 860 deletions(-) create mode 100644 livekit-api/livekit/api/sip_service.py create mode 100644 livekit-protocol/livekit/protocol/sip.py create mode 100644 livekit-protocol/livekit/protocol/sip.pyi diff --git a/livekit-api/livekit/api/sip_service.py b/livekit-api/livekit/api/sip_service.py new file mode 100644 index 00000000..d64e1e09 --- /dev/null +++ b/livekit-api/livekit/api/sip_service.py @@ -0,0 +1,90 @@ +import aiohttp +from livekit.protocol import sip as proto_sip +from ._service import Service +from .access_token import VideoGrants + +SVC = "SIP" + + +class SipService(Service): + def __init__( + self, session: aiohttp.ClientSession, url: str, api_key: str, api_secret: str + ): + super().__init__(session, url, api_key, api_secret) + + async def create_sip_trunk( + self, create: proto_sip.CreateSipTrunkRequest + ) -> proto_sip.SipTrunkInfo: + return await self._client.request( + SVC, + "CreateSIPTrunk", + create, + self._auth_header(VideoGrants()), + proto_sip.SipTrunkInfo, + ) + + async def list_sip_trunk( + self, list: proto_sip.ListSipTrunkRequest + ) -> proto_sip.ListSipTrunkResponse: + return await self._client.request( + SVC, + "ListSIPTrunk", + list, + self._auth_header(VideoGrants()), + proto_sip.ListSipTrunkResponse, + ) + + async def delete_sip_trunk( + self, delete: proto_sip.DeleteSipTrunkRequest + ) -> proto_sip.SipTrunkInfo: + return await self._client.request( + SVC, + "DeleteSIPTrunk", + delete, + self._auth_header(VideoGrants()), + proto_sip.SipTrunkInfo, + ) + + async def create_sip_dispatch_rule( + self, create: proto_sip.CreateSipDispatchRuleRequest + ) -> proto_sip.SipDispatchRuleInfo: + return await self._client.request( + SVC, + "CreateSIPDispatchRule", + create, + self._auth_header(VideoGrants()), + proto_sip.SipDispatchRuleInfo, + ) + + async def list_sip_dispatch_rule( + self, list: proto_sip.ListSipDispatchRuleRequest + ) -> proto_sip.ListSipDispatchRuleResponse: + return await self._client.request( + SVC, + "ListSIPDispatchRule", + list, + self._auth_header(VideoGrants()), + proto_sip.ListSipDispatchRuleResponse, + ) + + async def delete_sip_dispatch_rule( + self, delete: proto_sip.DeleteSipDispatchRuleRequest + ) -> proto_sip.SipDispatchRuleInfo: + return await self._client.request( + SVC, + "DeleteSIPDispatchRule", + delete, + self._auth_header(VideoGrants()), + proto_sip.SipDispatchRuleInfo, + ) + + async def create_sip_participant( + self, create: proto_sip.CreateSipParticipantRequest + ) -> proto_sip.SipParticipantInfo: + return await self._client.request( + SVC, + "CreateSIPParticipant", + create, + self._auth_header(VideoGrants()), + proto_sip.SipParticipantInfo, + ) diff --git a/livekit-protocol/generate_proto.sh b/livekit-protocol/generate_proto.sh index 6455c2d3..692ec7a5 100755 --- a/livekit-protocol/generate_proto.sh +++ b/livekit-protocol/generate_proto.sh @@ -31,6 +31,7 @@ protoc \ $API_PROTOCOL/livekit_ingress.proto \ $API_PROTOCOL/livekit_models.proto \ $API_PROTOCOL/livekit_agent.proto \ + $API_PROTOCOL/livekit_sip.proto \ $API_PROTOCOL/livekit_analytics.proto @@ -59,7 +60,9 @@ mv "$API_OUT_PYTHON/livekit_agent_pb2.py" "$API_OUT_PYTHON/agent.py" mv "$API_OUT_PYTHON/livekit_agent_pb2.pyi" "$API_OUT_PYTHON/agent.pyi" mv "$API_OUT_PYTHON/livekit_analytics_pb2.py" "$API_OUT_PYTHON/analytics.py" mv "$API_OUT_PYTHON/livekit_analytics_pb2.pyi" "$API_OUT_PYTHON/analytics.pyi" +mv "$API_OUT_PYTHON/livekit_sip_pb2.py" "$API_OUT_PYTHON/sip.py" +mv "$API_OUT_PYTHON/livekit_sip_pb2.pyi" "$API_OUT_PYTHON/sip.pyi" -perl -i -pe 's|^(import (livekit_egress_pb2\|livekit_room_pb2\|livekit_webhook_pb2\|livekit_ingress_pb2\|livekit_models_pb2\|livekit_agent_pb2\|livekit_analytics_pb2))|from . $1|g' "$API_OUT_PYTHON"/*.py "$API_OUT_PYTHON"/*.pyi +perl -i -pe 's|^(import (livekit_egress_pb2\|livekit_room_pb2\|livekit_webhook_pb2\|livekit_ingress_pb2\|livekit_models_pb2\|livekit_agent_pb2\|livekit_analytics_pb2\|livekit_sip_pb2))|from . $1|g' "$API_OUT_PYTHON"/*.py "$API_OUT_PYTHON"/*.pyi perl -i -pe 's|livekit_(\w+)_pb2|${1}|g' "$API_OUT_PYTHON"/*.py "$API_OUT_PYTHON"/*.pyi diff --git a/livekit-protocol/livekit/protocol/agent.py b/livekit-protocol/livekit/protocol/agent.py index b83ff034..5f8bf8ab 100644 --- a/livekit-protocol/livekit/protocol/agent.py +++ b/livekit-protocol/livekit/protocol/agent.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: livekit_agent.proto -# 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 @@ -21,8 +20,9 @@ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'agent', _globals) 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' + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' _globals['_JOBTYPE']._serialized_start=2206 _globals['_JOBTYPE']._serialized_end=2246 _globals['_WORKERSTATUS']._serialized_start=2248 diff --git a/livekit-protocol/livekit/protocol/agent.pyi b/livekit-protocol/livekit/protocol/agent.pyi index 502f695b..004ce082 100644 --- a/livekit-protocol/livekit/protocol/agent.pyi +++ b/livekit-protocol/livekit/protocol/agent.pyi @@ -7,17 +7,17 @@ from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Opti DESCRIPTOR: _descriptor.FileDescriptor class JobType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] JT_ROOM: _ClassVar[JobType] JT_PUBLISHER: _ClassVar[JobType] class WorkerStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] WS_AVAILABLE: _ClassVar[WorkerStatus] WS_FULL: _ClassVar[WorkerStatus] class JobStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] JS_UNKNOWN: _ClassVar[JobStatus] JS_SUCCESS: _ClassVar[JobStatus] JS_FAILED: _ClassVar[JobStatus] @@ -30,7 +30,7 @@ JS_SUCCESS: JobStatus JS_FAILED: JobStatus class WorkerInfo(_message.Message): - __slots__ = ("id", "namespace", "version", "name", "type", "allowed_permissions") + __slots__ = ["id", "namespace", "version", "name", "type", "allowed_permissions"] ID_FIELD_NUMBER: _ClassVar[int] NAMESPACE_FIELD_NUMBER: _ClassVar[int] VERSION_FIELD_NUMBER: _ClassVar[int] @@ -46,7 +46,7 @@ class WorkerInfo(_message.Message): def __init__(self, id: _Optional[str] = ..., namespace: _Optional[str] = ..., version: _Optional[str] = ..., name: _Optional[str] = ..., type: _Optional[_Union[JobType, str]] = ..., allowed_permissions: _Optional[_Union[_models.ParticipantPermission, _Mapping]] = ...) -> None: ... class AgentInfo(_message.Message): - __slots__ = ("id", "name", "version") + __slots__ = ["id", "name", "version"] ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] VERSION_FIELD_NUMBER: _ClassVar[int] @@ -56,7 +56,7 @@ class AgentInfo(_message.Message): def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., version: _Optional[str] = ...) -> None: ... class Job(_message.Message): - __slots__ = ("id", "type", "room", "participant", "namespace") + __slots__ = ["id", "type", "room", "participant", "namespace"] ID_FIELD_NUMBER: _ClassVar[int] TYPE_FIELD_NUMBER: _ClassVar[int] ROOM_FIELD_NUMBER: _ClassVar[int] @@ -70,7 +70,7 @@ class Job(_message.Message): def __init__(self, id: _Optional[str] = ..., type: _Optional[_Union[JobType, str]] = ..., room: _Optional[_Union[_models.Room, _Mapping]] = ..., participant: _Optional[_Union[_models.ParticipantInfo, _Mapping]] = ..., namespace: _Optional[str] = ...) -> None: ... class WorkerMessage(_message.Message): - __slots__ = ("register", "availability", "update_worker", "update_job", "ping", "simulate_job", "migrate_job") + __slots__ = ["register", "availability", "update_worker", "update_job", "ping", "simulate_job", "migrate_job"] REGISTER_FIELD_NUMBER: _ClassVar[int] AVAILABILITY_FIELD_NUMBER: _ClassVar[int] UPDATE_WORKER_FIELD_NUMBER: _ClassVar[int] @@ -88,7 +88,7 @@ class WorkerMessage(_message.Message): def __init__(self, register: _Optional[_Union[RegisterWorkerRequest, _Mapping]] = ..., availability: _Optional[_Union[AvailabilityResponse, _Mapping]] = ..., update_worker: _Optional[_Union[UpdateWorkerStatus, _Mapping]] = ..., update_job: _Optional[_Union[UpdateJobStatus, _Mapping]] = ..., ping: _Optional[_Union[WorkerPing, _Mapping]] = ..., simulate_job: _Optional[_Union[SimulateJobRequest, _Mapping]] = ..., migrate_job: _Optional[_Union[MigrateJobRequest, _Mapping]] = ...) -> None: ... class ServerMessage(_message.Message): - __slots__ = ("register", "availability", "assignment", "pong") + __slots__ = ["register", "availability", "assignment", "pong"] REGISTER_FIELD_NUMBER: _ClassVar[int] AVAILABILITY_FIELD_NUMBER: _ClassVar[int] ASSIGNMENT_FIELD_NUMBER: _ClassVar[int] @@ -100,7 +100,7 @@ class ServerMessage(_message.Message): def __init__(self, register: _Optional[_Union[RegisterWorkerResponse, _Mapping]] = ..., availability: _Optional[_Union[AvailabilityRequest, _Mapping]] = ..., assignment: _Optional[_Union[JobAssignment, _Mapping]] = ..., pong: _Optional[_Union[WorkerPong, _Mapping]] = ...) -> None: ... class SimulateJobRequest(_message.Message): - __slots__ = ("type", "room", "participant") + __slots__ = ["type", "room", "participant"] TYPE_FIELD_NUMBER: _ClassVar[int] ROOM_FIELD_NUMBER: _ClassVar[int] PARTICIPANT_FIELD_NUMBER: _ClassVar[int] @@ -110,13 +110,13 @@ class SimulateJobRequest(_message.Message): def __init__(self, type: _Optional[_Union[JobType, str]] = ..., room: _Optional[_Union[_models.Room, _Mapping]] = ..., participant: _Optional[_Union[_models.ParticipantInfo, _Mapping]] = ...) -> None: ... class WorkerPing(_message.Message): - __slots__ = ("timestamp",) + __slots__ = ["timestamp"] TIMESTAMP_FIELD_NUMBER: _ClassVar[int] timestamp: int def __init__(self, timestamp: _Optional[int] = ...) -> None: ... class WorkerPong(_message.Message): - __slots__ = ("last_timestamp", "timestamp") + __slots__ = ["last_timestamp", "timestamp"] LAST_TIMESTAMP_FIELD_NUMBER: _ClassVar[int] TIMESTAMP_FIELD_NUMBER: _ClassVar[int] last_timestamp: int @@ -124,7 +124,7 @@ class WorkerPong(_message.Message): def __init__(self, last_timestamp: _Optional[int] = ..., timestamp: _Optional[int] = ...) -> None: ... class RegisterWorkerRequest(_message.Message): - __slots__ = ("type", "version", "name", "ping_interval", "namespace", "allowed_permissions") + __slots__ = ["type", "version", "name", "ping_interval", "namespace", "allowed_permissions"] TYPE_FIELD_NUMBER: _ClassVar[int] VERSION_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] @@ -140,7 +140,7 @@ class RegisterWorkerRequest(_message.Message): def __init__(self, type: _Optional[_Union[JobType, str]] = ..., version: _Optional[str] = ..., name: _Optional[str] = ..., ping_interval: _Optional[int] = ..., namespace: _Optional[str] = ..., allowed_permissions: _Optional[_Union[_models.ParticipantPermission, _Mapping]] = ...) -> None: ... class RegisterWorkerResponse(_message.Message): - __slots__ = ("worker_id", "server_info") + __slots__ = ["worker_id", "server_info"] WORKER_ID_FIELD_NUMBER: _ClassVar[int] SERVER_INFO_FIELD_NUMBER: _ClassVar[int] worker_id: str @@ -148,13 +148,13 @@ class RegisterWorkerResponse(_message.Message): def __init__(self, worker_id: _Optional[str] = ..., server_info: _Optional[_Union[_models.ServerInfo, _Mapping]] = ...) -> None: ... class MigrateJobRequest(_message.Message): - __slots__ = ("job_id",) + __slots__ = ["job_id"] JOB_ID_FIELD_NUMBER: _ClassVar[int] job_id: str def __init__(self, job_id: _Optional[str] = ...) -> None: ... class AvailabilityRequest(_message.Message): - __slots__ = ("job", "resuming") + __slots__ = ["job", "resuming"] JOB_FIELD_NUMBER: _ClassVar[int] RESUMING_FIELD_NUMBER: _ClassVar[int] job: Job @@ -162,7 +162,7 @@ class AvailabilityRequest(_message.Message): def __init__(self, job: _Optional[_Union[Job, _Mapping]] = ..., resuming: bool = ...) -> None: ... class AvailabilityResponse(_message.Message): - __slots__ = ("job_id", "available", "supports_resume", "participant_name", "participant_identity", "participant_metadata") + __slots__ = ["job_id", "available", "supports_resume", "participant_name", "participant_identity", "participant_metadata"] JOB_ID_FIELD_NUMBER: _ClassVar[int] AVAILABLE_FIELD_NUMBER: _ClassVar[int] SUPPORTS_RESUME_FIELD_NUMBER: _ClassVar[int] @@ -178,7 +178,7 @@ class AvailabilityResponse(_message.Message): def __init__(self, job_id: _Optional[str] = ..., available: bool = ..., supports_resume: bool = ..., participant_name: _Optional[str] = ..., participant_identity: _Optional[str] = ..., participant_metadata: _Optional[str] = ...) -> None: ... class UpdateJobStatus(_message.Message): - __slots__ = ("job_id", "status", "error", "metadata", "load") + __slots__ = ["job_id", "status", "error", "metadata", "load"] JOB_ID_FIELD_NUMBER: _ClassVar[int] STATUS_FIELD_NUMBER: _ClassVar[int] ERROR_FIELD_NUMBER: _ClassVar[int] @@ -192,7 +192,7 @@ class UpdateJobStatus(_message.Message): def __init__(self, job_id: _Optional[str] = ..., status: _Optional[_Union[JobStatus, str]] = ..., error: _Optional[str] = ..., metadata: _Optional[str] = ..., load: _Optional[float] = ...) -> None: ... class UpdateWorkerStatus(_message.Message): - __slots__ = ("status", "metadata", "load") + __slots__ = ["status", "metadata", "load"] STATUS_FIELD_NUMBER: _ClassVar[int] METADATA_FIELD_NUMBER: _ClassVar[int] LOAD_FIELD_NUMBER: _ClassVar[int] @@ -202,7 +202,7 @@ class UpdateWorkerStatus(_message.Message): def __init__(self, status: _Optional[_Union[WorkerStatus, str]] = ..., metadata: _Optional[str] = ..., load: _Optional[float] = ...) -> None: ... class JobAssignment(_message.Message): - __slots__ = ("job", "url", "token") + __slots__ = ["job", "url", "token"] JOB_FIELD_NUMBER: _ClassVar[int] URL_FIELD_NUMBER: _ClassVar[int] TOKEN_FIELD_NUMBER: _ClassVar[int] diff --git a/livekit-protocol/livekit/protocol/analytics.py b/livekit-protocol/livekit/protocol/analytics.py index 5ddf3370..e0a75c0f 100644 --- a/livekit-protocol/livekit/protocol/analytics.py +++ b/livekit-protocol/livekit/protocol/analytics.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: livekit_analytics.proto -# 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 @@ -25,8 +24,9 @@ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'analytics', _globals) 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' + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' _globals['_STREAMTYPE']._serialized_start=2613 _globals['_STREAMTYPE']._serialized_end=2655 _globals['_ANALYTICSEVENTTYPE']._serialized_start=2658 diff --git a/livekit-protocol/livekit/protocol/analytics.pyi b/livekit-protocol/livekit/protocol/analytics.pyi index 75457397..5c3ba64a 100644 --- a/livekit-protocol/livekit/protocol/analytics.pyi +++ b/livekit-protocol/livekit/protocol/analytics.pyi @@ -12,12 +12,12 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map DESCRIPTOR: _descriptor.FileDescriptor class StreamType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] UPSTREAM: _ClassVar[StreamType] DOWNSTREAM: _ClassVar[StreamType] class AnalyticsEventType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] ROOM_CREATED: _ClassVar[AnalyticsEventType] ROOM_ENDED: _ClassVar[AnalyticsEventType] PARTICIPANT_JOINED: _ClassVar[AnalyticsEventType] @@ -78,7 +78,7 @@ INGRESS_ENDED: AnalyticsEventType INGRESS_UPDATED: AnalyticsEventType class AnalyticsVideoLayer(_message.Message): - __slots__ = ("layer", "packets", "bytes", "frames") + __slots__ = ["layer", "packets", "bytes", "frames"] LAYER_FIELD_NUMBER: _ClassVar[int] PACKETS_FIELD_NUMBER: _ClassVar[int] BYTES_FIELD_NUMBER: _ClassVar[int] @@ -90,7 +90,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"] SSRC_FIELD_NUMBER: _ClassVar[int] PRIMARY_PACKETS_FIELD_NUMBER: _ClassVar[int] PRIMARY_BYTES_FIELD_NUMBER: _ClassVar[int] @@ -128,7 +128,7 @@ class AnalyticsStream(_message.Message): 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__ = ("analytics_key", "kind", "time_stamp", "node", "room_id", "room_name", "participant_id", "track_id", "score", "streams", "mime", "min_score", "median_score") + __slots__ = ["analytics_key", "kind", "time_stamp", "node", "room_id", "room_name", "participant_id", "track_id", "score", "streams", "mime", "min_score", "median_score"] ANALYTICS_KEY_FIELD_NUMBER: _ClassVar[int] KIND_FIELD_NUMBER: _ClassVar[int] TIME_STAMP_FIELD_NUMBER: _ClassVar[int] @@ -158,13 +158,13 @@ class AnalyticsStat(_message.Message): def __init__(self, analytics_key: _Optional[str] = ..., kind: _Optional[_Union[StreamType, str]] = ..., time_stamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., node: _Optional[str] = ..., room_id: _Optional[str] = ..., room_name: _Optional[str] = ..., participant_id: _Optional[str] = ..., track_id: _Optional[str] = ..., score: _Optional[float] = ..., streams: _Optional[_Iterable[_Union[AnalyticsStream, _Mapping]]] = ..., mime: _Optional[str] = ..., min_score: _Optional[float] = ..., median_score: _Optional[float] = ...) -> None: ... class AnalyticsStats(_message.Message): - __slots__ = ("stats",) + __slots__ = ["stats"] STATS_FIELD_NUMBER: _ClassVar[int] stats: _containers.RepeatedCompositeFieldContainer[AnalyticsStat] def __init__(self, stats: _Optional[_Iterable[_Union[AnalyticsStat, _Mapping]]] = ...) -> None: ... class AnalyticsClientMeta(_message.Message): - __slots__ = ("region", "node", "client_addr", "client_connect_time", "connection_type", "reconnect_reason", "geo_hash", "country", "isp_asn") + __slots__ = ["region", "node", "client_addr", "client_connect_time", "connection_type", "reconnect_reason", "geo_hash", "country", "isp_asn"] REGION_FIELD_NUMBER: _ClassVar[int] NODE_FIELD_NUMBER: _ClassVar[int] CLIENT_ADDR_FIELD_NUMBER: _ClassVar[int] @@ -186,7 +186,7 @@ class AnalyticsClientMeta(_message.Message): def __init__(self, region: _Optional[str] = ..., node: _Optional[str] = ..., client_addr: _Optional[str] = ..., client_connect_time: _Optional[int] = ..., connection_type: _Optional[str] = ..., reconnect_reason: _Optional[_Union[_models.ReconnectReason, str]] = ..., geo_hash: _Optional[str] = ..., country: _Optional[str] = ..., isp_asn: _Optional[int] = ...) -> None: ... class AnalyticsEvent(_message.Message): - __slots__ = ("type", "timestamp", "room_id", "room", "participant_id", "participant", "track_id", "track", "analytics_key", "client_info", "client_meta", "egress_id", "ingress_id", "max_subscribed_video_quality", "publisher", "mime", "egress", "ingress", "error", "rtp_stats", "video_layer") + __slots__ = ["type", "timestamp", "room_id", "room", "participant_id", "participant", "track_id", "track", "analytics_key", "client_info", "client_meta", "egress_id", "ingress_id", "max_subscribed_video_quality", "publisher", "mime", "egress", "ingress", "error", "rtp_stats", "video_layer"] TYPE_FIELD_NUMBER: _ClassVar[int] TIMESTAMP_FIELD_NUMBER: _ClassVar[int] ROOM_ID_FIELD_NUMBER: _ClassVar[int] @@ -232,13 +232,13 @@ class AnalyticsEvent(_message.Message): def __init__(self, type: _Optional[_Union[AnalyticsEventType, str]] = ..., timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., room_id: _Optional[str] = ..., room: _Optional[_Union[_models.Room, _Mapping]] = ..., participant_id: _Optional[str] = ..., participant: _Optional[_Union[_models.ParticipantInfo, _Mapping]] = ..., track_id: _Optional[str] = ..., track: _Optional[_Union[_models.TrackInfo, _Mapping]] = ..., analytics_key: _Optional[str] = ..., client_info: _Optional[_Union[_models.ClientInfo, _Mapping]] = ..., client_meta: _Optional[_Union[AnalyticsClientMeta, _Mapping]] = ..., egress_id: _Optional[str] = ..., ingress_id: _Optional[str] = ..., max_subscribed_video_quality: _Optional[_Union[_models.VideoQuality, str]] = ..., publisher: _Optional[_Union[_models.ParticipantInfo, _Mapping]] = ..., mime: _Optional[str] = ..., egress: _Optional[_Union[_egress.EgressInfo, _Mapping]] = ..., ingress: _Optional[_Union[_ingress.IngressInfo, _Mapping]] = ..., error: _Optional[str] = ..., rtp_stats: _Optional[_Union[_models.RTPStats, _Mapping]] = ..., video_layer: _Optional[int] = ...) -> None: ... class AnalyticsEvents(_message.Message): - __slots__ = ("events",) + __slots__ = ["events"] EVENTS_FIELD_NUMBER: _ClassVar[int] events: _containers.RepeatedCompositeFieldContainer[AnalyticsEvent] def __init__(self, events: _Optional[_Iterable[_Union[AnalyticsEvent, _Mapping]]] = ...) -> None: ... class AnalyticsRoomParticipant(_message.Message): - __slots__ = ("id", "identity", "name", "state", "joined_at") + __slots__ = ["id", "identity", "name", "state", "joined_at"] ID_FIELD_NUMBER: _ClassVar[int] IDENTITY_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] @@ -252,7 +252,7 @@ class AnalyticsRoomParticipant(_message.Message): def __init__(self, id: _Optional[str] = ..., identity: _Optional[str] = ..., name: _Optional[str] = ..., state: _Optional[_Union[_models.ParticipantInfo.State, str]] = ..., joined_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... class AnalyticsRoom(_message.Message): - __slots__ = ("id", "name", "project_id", "created_at", "participants") + __slots__ = ["id", "name", "project_id", "created_at", "participants"] ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] PROJECT_ID_FIELD_NUMBER: _ClassVar[int] @@ -266,7 +266,7 @@ class AnalyticsRoom(_message.Message): def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., project_id: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., participants: _Optional[_Iterable[_Union[AnalyticsRoomParticipant, _Mapping]]] = ...) -> None: ... class AnalyticsNodeRooms(_message.Message): - __slots__ = ("node_id", "sequence_number", "timestamp", "rooms") + __slots__ = ["node_id", "sequence_number", "timestamp", "rooms"] NODE_ID_FIELD_NUMBER: _ClassVar[int] SEQUENCE_NUMBER_FIELD_NUMBER: _ClassVar[int] TIMESTAMP_FIELD_NUMBER: _ClassVar[int] diff --git a/livekit-protocol/livekit/protocol/egress.py b/livekit-protocol/livekit/protocol/egress.py index 478fedb8..ea532d7c 100644 --- a/livekit-protocol/livekit/protocol/egress.py +++ b/livekit-protocol/livekit/protocol/egress.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: livekit_egress.proto -# 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 @@ -21,36 +20,37 @@ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'egress', _globals) 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']._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']._serialized_options = b'\030\001' - _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']._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']._serialized_options = b'\030\001' - _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']._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']._serialized_options = b'\030\001' - _globals['_TRACKCOMPOSITEEGRESSREQUEST'].fields_by_name['segments']._options = None - _globals['_TRACKCOMPOSITEEGRESSREQUEST'].fields_by_name['segments']._serialized_options = b'\030\001' - _globals['_S3UPLOAD_METADATAENTRY']._options = None - _globals['_S3UPLOAD_METADATAENTRY']._serialized_options = b'8\001' - _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']._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']._serialized_options = b'\030\001' - _globals['_STREAMINFOLIST']._options = None - _globals['_STREAMINFOLIST']._serialized_options = b'\030\001' + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' + _ROOMCOMPOSITEEGRESSREQUEST.fields_by_name['file']._options = None + _ROOMCOMPOSITEEGRESSREQUEST.fields_by_name['file']._serialized_options = b'\030\001' + _ROOMCOMPOSITEEGRESSREQUEST.fields_by_name['stream']._options = None + _ROOMCOMPOSITEEGRESSREQUEST.fields_by_name['stream']._serialized_options = b'\030\001' + _ROOMCOMPOSITEEGRESSREQUEST.fields_by_name['segments']._options = None + _ROOMCOMPOSITEEGRESSREQUEST.fields_by_name['segments']._serialized_options = b'\030\001' + _WEBEGRESSREQUEST.fields_by_name['file']._options = None + _WEBEGRESSREQUEST.fields_by_name['file']._serialized_options = b'\030\001' + _WEBEGRESSREQUEST.fields_by_name['stream']._options = None + _WEBEGRESSREQUEST.fields_by_name['stream']._serialized_options = b'\030\001' + _WEBEGRESSREQUEST.fields_by_name['segments']._options = None + _WEBEGRESSREQUEST.fields_by_name['segments']._serialized_options = b'\030\001' + _TRACKCOMPOSITEEGRESSREQUEST.fields_by_name['file']._options = None + _TRACKCOMPOSITEEGRESSREQUEST.fields_by_name['file']._serialized_options = b'\030\001' + _TRACKCOMPOSITEEGRESSREQUEST.fields_by_name['stream']._options = None + _TRACKCOMPOSITEEGRESSREQUEST.fields_by_name['stream']._serialized_options = b'\030\001' + _TRACKCOMPOSITEEGRESSREQUEST.fields_by_name['segments']._options = None + _TRACKCOMPOSITEEGRESSREQUEST.fields_by_name['segments']._serialized_options = b'\030\001' + _S3UPLOAD_METADATAENTRY._options = None + _S3UPLOAD_METADATAENTRY._serialized_options = b'8\001' + _EGRESSINFO.fields_by_name['stream']._options = None + _EGRESSINFO.fields_by_name['stream']._serialized_options = b'\030\001' + _EGRESSINFO.fields_by_name['file']._options = None + _EGRESSINFO.fields_by_name['file']._serialized_options = b'\030\001' + _EGRESSINFO.fields_by_name['segments']._options = None + _EGRESSINFO.fields_by_name['segments']._serialized_options = b'\030\001' + _STREAMINFOLIST._options = None + _STREAMINFOLIST._serialized_options = b'\030\001' _globals['_ENCODEDFILETYPE']._serialized_start=6845 _globals['_ENCODEDFILETYPE']._serialized_end=6902 _globals['_SEGMENTEDFILEPROTOCOL']._serialized_start=6904 diff --git a/livekit-protocol/livekit/protocol/egress.pyi b/livekit-protocol/livekit/protocol/egress.pyi index f55f67ed..f6769011 100644 --- a/livekit-protocol/livekit/protocol/egress.pyi +++ b/livekit-protocol/livekit/protocol/egress.pyi @@ -8,33 +8,33 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map DESCRIPTOR: _descriptor.FileDescriptor class EncodedFileType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] DEFAULT_FILETYPE: _ClassVar[EncodedFileType] MP4: _ClassVar[EncodedFileType] OGG: _ClassVar[EncodedFileType] class SegmentedFileProtocol(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] DEFAULT_SEGMENTED_FILE_PROTOCOL: _ClassVar[SegmentedFileProtocol] HLS_PROTOCOL: _ClassVar[SegmentedFileProtocol] class SegmentedFileSuffix(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] INDEX: _ClassVar[SegmentedFileSuffix] TIMESTAMP: _ClassVar[SegmentedFileSuffix] class ImageFileSuffix(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] IMAGE_SUFFIX_INDEX: _ClassVar[ImageFileSuffix] IMAGE_SUFFIX_TIMESTAMP: _ClassVar[ImageFileSuffix] class StreamProtocol(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] DEFAULT_PROTOCOL: _ClassVar[StreamProtocol] RTMP: _ClassVar[StreamProtocol] class EncodingOptionsPreset(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] H264_720P_30: _ClassVar[EncodingOptionsPreset] H264_720P_60: _ClassVar[EncodingOptionsPreset] H264_1080P_30: _ClassVar[EncodingOptionsPreset] @@ -45,7 +45,7 @@ class EncodingOptionsPreset(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): PORTRAIT_H264_1080P_60: _ClassVar[EncodingOptionsPreset] class EgressStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] EGRESS_STARTING: _ClassVar[EgressStatus] EGRESS_ACTIVE: _ClassVar[EgressStatus] EGRESS_ENDING: _ClassVar[EgressStatus] @@ -81,7 +81,7 @@ EGRESS_ABORTED: EgressStatus EGRESS_LIMIT_REACHED: EgressStatus class RoomCompositeEgressRequest(_message.Message): - __slots__ = ("room_name", "layout", "audio_only", "video_only", "custom_base_url", "file", "stream", "segments", "preset", "advanced", "file_outputs", "stream_outputs", "segment_outputs", "image_outputs") + __slots__ = ["room_name", "layout", "audio_only", "video_only", "custom_base_url", "file", "stream", "segments", "preset", "advanced", "file_outputs", "stream_outputs", "segment_outputs", "image_outputs"] ROOM_NAME_FIELD_NUMBER: _ClassVar[int] LAYOUT_FIELD_NUMBER: _ClassVar[int] AUDIO_ONLY_FIELD_NUMBER: _ClassVar[int] @@ -113,7 +113,7 @@ class RoomCompositeEgressRequest(_message.Message): def __init__(self, room_name: _Optional[str] = ..., layout: _Optional[str] = ..., audio_only: bool = ..., video_only: bool = ..., custom_base_url: _Optional[str] = ..., file: _Optional[_Union[EncodedFileOutput, _Mapping]] = ..., stream: _Optional[_Union[StreamOutput, _Mapping]] = ..., segments: _Optional[_Union[SegmentedFileOutput, _Mapping]] = ..., preset: _Optional[_Union[EncodingOptionsPreset, str]] = ..., advanced: _Optional[_Union[EncodingOptions, _Mapping]] = ..., file_outputs: _Optional[_Iterable[_Union[EncodedFileOutput, _Mapping]]] = ..., stream_outputs: _Optional[_Iterable[_Union[StreamOutput, _Mapping]]] = ..., segment_outputs: _Optional[_Iterable[_Union[SegmentedFileOutput, _Mapping]]] = ..., image_outputs: _Optional[_Iterable[_Union[ImageOutput, _Mapping]]] = ...) -> None: ... class WebEgressRequest(_message.Message): - __slots__ = ("url", "audio_only", "video_only", "await_start_signal", "file", "stream", "segments", "preset", "advanced", "file_outputs", "stream_outputs", "segment_outputs", "image_outputs") + __slots__ = ["url", "audio_only", "video_only", "await_start_signal", "file", "stream", "segments", "preset", "advanced", "file_outputs", "stream_outputs", "segment_outputs", "image_outputs"] URL_FIELD_NUMBER: _ClassVar[int] AUDIO_ONLY_FIELD_NUMBER: _ClassVar[int] VIDEO_ONLY_FIELD_NUMBER: _ClassVar[int] @@ -143,7 +143,7 @@ class WebEgressRequest(_message.Message): def __init__(self, url: _Optional[str] = ..., audio_only: bool = ..., video_only: bool = ..., await_start_signal: bool = ..., file: _Optional[_Union[EncodedFileOutput, _Mapping]] = ..., stream: _Optional[_Union[StreamOutput, _Mapping]] = ..., segments: _Optional[_Union[SegmentedFileOutput, _Mapping]] = ..., preset: _Optional[_Union[EncodingOptionsPreset, str]] = ..., advanced: _Optional[_Union[EncodingOptions, _Mapping]] = ..., file_outputs: _Optional[_Iterable[_Union[EncodedFileOutput, _Mapping]]] = ..., stream_outputs: _Optional[_Iterable[_Union[StreamOutput, _Mapping]]] = ..., segment_outputs: _Optional[_Iterable[_Union[SegmentedFileOutput, _Mapping]]] = ..., image_outputs: _Optional[_Iterable[_Union[ImageOutput, _Mapping]]] = ...) -> None: ... class ParticipantEgressRequest(_message.Message): - __slots__ = ("room_name", "identity", "screen_share", "preset", "advanced", "file_outputs", "stream_outputs", "segment_outputs", "image_outputs") + __slots__ = ["room_name", "identity", "screen_share", "preset", "advanced", "file_outputs", "stream_outputs", "segment_outputs", "image_outputs"] ROOM_NAME_FIELD_NUMBER: _ClassVar[int] IDENTITY_FIELD_NUMBER: _ClassVar[int] SCREEN_SHARE_FIELD_NUMBER: _ClassVar[int] @@ -165,7 +165,7 @@ class ParticipantEgressRequest(_message.Message): def __init__(self, room_name: _Optional[str] = ..., identity: _Optional[str] = ..., screen_share: bool = ..., preset: _Optional[_Union[EncodingOptionsPreset, str]] = ..., advanced: _Optional[_Union[EncodingOptions, _Mapping]] = ..., file_outputs: _Optional[_Iterable[_Union[EncodedFileOutput, _Mapping]]] = ..., stream_outputs: _Optional[_Iterable[_Union[StreamOutput, _Mapping]]] = ..., segment_outputs: _Optional[_Iterable[_Union[SegmentedFileOutput, _Mapping]]] = ..., image_outputs: _Optional[_Iterable[_Union[ImageOutput, _Mapping]]] = ...) -> None: ... class TrackCompositeEgressRequest(_message.Message): - __slots__ = ("room_name", "audio_track_id", "video_track_id", "file", "stream", "segments", "preset", "advanced", "file_outputs", "stream_outputs", "segment_outputs", "image_outputs") + __slots__ = ["room_name", "audio_track_id", "video_track_id", "file", "stream", "segments", "preset", "advanced", "file_outputs", "stream_outputs", "segment_outputs", "image_outputs"] ROOM_NAME_FIELD_NUMBER: _ClassVar[int] AUDIO_TRACK_ID_FIELD_NUMBER: _ClassVar[int] VIDEO_TRACK_ID_FIELD_NUMBER: _ClassVar[int] @@ -193,7 +193,7 @@ class TrackCompositeEgressRequest(_message.Message): def __init__(self, room_name: _Optional[str] = ..., audio_track_id: _Optional[str] = ..., video_track_id: _Optional[str] = ..., file: _Optional[_Union[EncodedFileOutput, _Mapping]] = ..., stream: _Optional[_Union[StreamOutput, _Mapping]] = ..., segments: _Optional[_Union[SegmentedFileOutput, _Mapping]] = ..., preset: _Optional[_Union[EncodingOptionsPreset, str]] = ..., advanced: _Optional[_Union[EncodingOptions, _Mapping]] = ..., file_outputs: _Optional[_Iterable[_Union[EncodedFileOutput, _Mapping]]] = ..., stream_outputs: _Optional[_Iterable[_Union[StreamOutput, _Mapping]]] = ..., segment_outputs: _Optional[_Iterable[_Union[SegmentedFileOutput, _Mapping]]] = ..., image_outputs: _Optional[_Iterable[_Union[ImageOutput, _Mapping]]] = ...) -> None: ... class TrackEgressRequest(_message.Message): - __slots__ = ("room_name", "track_id", "file", "websocket_url") + __slots__ = ["room_name", "track_id", "file", "websocket_url"] ROOM_NAME_FIELD_NUMBER: _ClassVar[int] TRACK_ID_FIELD_NUMBER: _ClassVar[int] FILE_FIELD_NUMBER: _ClassVar[int] @@ -205,7 +205,7 @@ class TrackEgressRequest(_message.Message): def __init__(self, room_name: _Optional[str] = ..., track_id: _Optional[str] = ..., file: _Optional[_Union[DirectFileOutput, _Mapping]] = ..., websocket_url: _Optional[str] = ...) -> None: ... class EncodedFileOutput(_message.Message): - __slots__ = ("file_type", "filepath", "disable_manifest", "s3", "gcp", "azure", "aliOSS") + __slots__ = ["file_type", "filepath", "disable_manifest", "s3", "gcp", "azure", "aliOSS"] FILE_TYPE_FIELD_NUMBER: _ClassVar[int] FILEPATH_FIELD_NUMBER: _ClassVar[int] DISABLE_MANIFEST_FIELD_NUMBER: _ClassVar[int] @@ -223,7 +223,7 @@ class EncodedFileOutput(_message.Message): def __init__(self, file_type: _Optional[_Union[EncodedFileType, str]] = ..., filepath: _Optional[str] = ..., disable_manifest: bool = ..., s3: _Optional[_Union[S3Upload, _Mapping]] = ..., gcp: _Optional[_Union[GCPUpload, _Mapping]] = ..., azure: _Optional[_Union[AzureBlobUpload, _Mapping]] = ..., aliOSS: _Optional[_Union[AliOSSUpload, _Mapping]] = ...) -> None: ... class SegmentedFileOutput(_message.Message): - __slots__ = ("protocol", "filename_prefix", "playlist_name", "live_playlist_name", "segment_duration", "filename_suffix", "disable_manifest", "s3", "gcp", "azure", "aliOSS") + __slots__ = ["protocol", "filename_prefix", "playlist_name", "live_playlist_name", "segment_duration", "filename_suffix", "disable_manifest", "s3", "gcp", "azure", "aliOSS"] PROTOCOL_FIELD_NUMBER: _ClassVar[int] FILENAME_PREFIX_FIELD_NUMBER: _ClassVar[int] PLAYLIST_NAME_FIELD_NUMBER: _ClassVar[int] @@ -249,7 +249,7 @@ class SegmentedFileOutput(_message.Message): def __init__(self, protocol: _Optional[_Union[SegmentedFileProtocol, str]] = ..., filename_prefix: _Optional[str] = ..., playlist_name: _Optional[str] = ..., live_playlist_name: _Optional[str] = ..., segment_duration: _Optional[int] = ..., filename_suffix: _Optional[_Union[SegmentedFileSuffix, str]] = ..., disable_manifest: bool = ..., s3: _Optional[_Union[S3Upload, _Mapping]] = ..., gcp: _Optional[_Union[GCPUpload, _Mapping]] = ..., azure: _Optional[_Union[AzureBlobUpload, _Mapping]] = ..., aliOSS: _Optional[_Union[AliOSSUpload, _Mapping]] = ...) -> None: ... class DirectFileOutput(_message.Message): - __slots__ = ("filepath", "disable_manifest", "s3", "gcp", "azure", "aliOSS") + __slots__ = ["filepath", "disable_manifest", "s3", "gcp", "azure", "aliOSS"] FILEPATH_FIELD_NUMBER: _ClassVar[int] DISABLE_MANIFEST_FIELD_NUMBER: _ClassVar[int] S3_FIELD_NUMBER: _ClassVar[int] @@ -265,7 +265,7 @@ class DirectFileOutput(_message.Message): def __init__(self, filepath: _Optional[str] = ..., disable_manifest: bool = ..., s3: _Optional[_Union[S3Upload, _Mapping]] = ..., gcp: _Optional[_Union[GCPUpload, _Mapping]] = ..., azure: _Optional[_Union[AzureBlobUpload, _Mapping]] = ..., aliOSS: _Optional[_Union[AliOSSUpload, _Mapping]] = ...) -> None: ... class ImageOutput(_message.Message): - __slots__ = ("capture_interval", "width", "height", "filename_prefix", "filename_suffix", "image_codec", "disable_manifest", "s3", "gcp", "azure", "aliOSS") + __slots__ = ["capture_interval", "width", "height", "filename_prefix", "filename_suffix", "image_codec", "disable_manifest", "s3", "gcp", "azure", "aliOSS"] CAPTURE_INTERVAL_FIELD_NUMBER: _ClassVar[int] WIDTH_FIELD_NUMBER: _ClassVar[int] HEIGHT_FIELD_NUMBER: _ClassVar[int] @@ -291,9 +291,9 @@ class ImageOutput(_message.Message): def __init__(self, capture_interval: _Optional[int] = ..., width: _Optional[int] = ..., height: _Optional[int] = ..., filename_prefix: _Optional[str] = ..., filename_suffix: _Optional[_Union[ImageFileSuffix, str]] = ..., image_codec: _Optional[_Union[_models.ImageCodec, str]] = ..., disable_manifest: bool = ..., s3: _Optional[_Union[S3Upload, _Mapping]] = ..., gcp: _Optional[_Union[GCPUpload, _Mapping]] = ..., azure: _Optional[_Union[AzureBlobUpload, _Mapping]] = ..., aliOSS: _Optional[_Union[AliOSSUpload, _Mapping]] = ...) -> None: ... class S3Upload(_message.Message): - __slots__ = ("access_key", "secret", "region", "endpoint", "bucket", "force_path_style", "metadata", "tagging", "content_disposition", "proxy") + __slots__ = ["access_key", "secret", "region", "endpoint", "bucket", "force_path_style", "metadata", "tagging", "content_disposition", "proxy"] class MetadataEntry(_message.Message): - __slots__ = ("key", "value") + __slots__ = ["key", "value"] KEY_FIELD_NUMBER: _ClassVar[int] VALUE_FIELD_NUMBER: _ClassVar[int] key: str @@ -322,7 +322,7 @@ class S3Upload(_message.Message): def __init__(self, access_key: _Optional[str] = ..., secret: _Optional[str] = ..., region: _Optional[str] = ..., endpoint: _Optional[str] = ..., bucket: _Optional[str] = ..., force_path_style: bool = ..., metadata: _Optional[_Mapping[str, str]] = ..., tagging: _Optional[str] = ..., content_disposition: _Optional[str] = ..., proxy: _Optional[_Union[ProxyConfig, _Mapping]] = ...) -> None: ... class GCPUpload(_message.Message): - __slots__ = ("credentials", "bucket", "proxy") + __slots__ = ["credentials", "bucket", "proxy"] CREDENTIALS_FIELD_NUMBER: _ClassVar[int] BUCKET_FIELD_NUMBER: _ClassVar[int] PROXY_FIELD_NUMBER: _ClassVar[int] @@ -332,7 +332,7 @@ class GCPUpload(_message.Message): def __init__(self, credentials: _Optional[str] = ..., bucket: _Optional[str] = ..., proxy: _Optional[_Union[ProxyConfig, _Mapping]] = ...) -> None: ... class AzureBlobUpload(_message.Message): - __slots__ = ("account_name", "account_key", "container_name") + __slots__ = ["account_name", "account_key", "container_name"] ACCOUNT_NAME_FIELD_NUMBER: _ClassVar[int] ACCOUNT_KEY_FIELD_NUMBER: _ClassVar[int] CONTAINER_NAME_FIELD_NUMBER: _ClassVar[int] @@ -342,7 +342,7 @@ class AzureBlobUpload(_message.Message): def __init__(self, account_name: _Optional[str] = ..., account_key: _Optional[str] = ..., container_name: _Optional[str] = ...) -> None: ... class AliOSSUpload(_message.Message): - __slots__ = ("access_key", "secret", "region", "endpoint", "bucket") + __slots__ = ["access_key", "secret", "region", "endpoint", "bucket"] ACCESS_KEY_FIELD_NUMBER: _ClassVar[int] SECRET_FIELD_NUMBER: _ClassVar[int] REGION_FIELD_NUMBER: _ClassVar[int] @@ -356,7 +356,7 @@ class AliOSSUpload(_message.Message): def __init__(self, access_key: _Optional[str] = ..., secret: _Optional[str] = ..., region: _Optional[str] = ..., endpoint: _Optional[str] = ..., bucket: _Optional[str] = ...) -> None: ... class ProxyConfig(_message.Message): - __slots__ = ("url", "username", "password") + __slots__ = ["url", "username", "password"] URL_FIELD_NUMBER: _ClassVar[int] USERNAME_FIELD_NUMBER: _ClassVar[int] PASSWORD_FIELD_NUMBER: _ClassVar[int] @@ -366,7 +366,7 @@ class ProxyConfig(_message.Message): def __init__(self, url: _Optional[str] = ..., username: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ... class StreamOutput(_message.Message): - __slots__ = ("protocol", "urls") + __slots__ = ["protocol", "urls"] PROTOCOL_FIELD_NUMBER: _ClassVar[int] URLS_FIELD_NUMBER: _ClassVar[int] protocol: StreamProtocol @@ -374,7 +374,7 @@ class StreamOutput(_message.Message): def __init__(self, protocol: _Optional[_Union[StreamProtocol, str]] = ..., urls: _Optional[_Iterable[str]] = ...) -> None: ... class EncodingOptions(_message.Message): - __slots__ = ("width", "height", "depth", "framerate", "audio_codec", "audio_bitrate", "audio_quality", "audio_frequency", "video_codec", "video_bitrate", "video_quality", "key_frame_interval") + __slots__ = ["width", "height", "depth", "framerate", "audio_codec", "audio_bitrate", "audio_quality", "audio_frequency", "video_codec", "video_bitrate", "video_quality", "key_frame_interval"] WIDTH_FIELD_NUMBER: _ClassVar[int] HEIGHT_FIELD_NUMBER: _ClassVar[int] DEPTH_FIELD_NUMBER: _ClassVar[int] @@ -402,7 +402,7 @@ class EncodingOptions(_message.Message): def __init__(self, width: _Optional[int] = ..., height: _Optional[int] = ..., depth: _Optional[int] = ..., framerate: _Optional[int] = ..., audio_codec: _Optional[_Union[_models.AudioCodec, str]] = ..., audio_bitrate: _Optional[int] = ..., audio_quality: _Optional[int] = ..., audio_frequency: _Optional[int] = ..., video_codec: _Optional[_Union[_models.VideoCodec, str]] = ..., video_bitrate: _Optional[int] = ..., video_quality: _Optional[int] = ..., key_frame_interval: _Optional[float] = ...) -> None: ... class UpdateLayoutRequest(_message.Message): - __slots__ = ("egress_id", "layout") + __slots__ = ["egress_id", "layout"] EGRESS_ID_FIELD_NUMBER: _ClassVar[int] LAYOUT_FIELD_NUMBER: _ClassVar[int] egress_id: str @@ -410,7 +410,7 @@ class UpdateLayoutRequest(_message.Message): def __init__(self, egress_id: _Optional[str] = ..., layout: _Optional[str] = ...) -> None: ... class UpdateStreamRequest(_message.Message): - __slots__ = ("egress_id", "add_output_urls", "remove_output_urls") + __slots__ = ["egress_id", "add_output_urls", "remove_output_urls"] EGRESS_ID_FIELD_NUMBER: _ClassVar[int] ADD_OUTPUT_URLS_FIELD_NUMBER: _ClassVar[int] REMOVE_OUTPUT_URLS_FIELD_NUMBER: _ClassVar[int] @@ -420,7 +420,7 @@ class UpdateStreamRequest(_message.Message): def __init__(self, egress_id: _Optional[str] = ..., add_output_urls: _Optional[_Iterable[str]] = ..., remove_output_urls: _Optional[_Iterable[str]] = ...) -> None: ... class ListEgressRequest(_message.Message): - __slots__ = ("room_name", "egress_id", "active") + __slots__ = ["room_name", "egress_id", "active"] ROOM_NAME_FIELD_NUMBER: _ClassVar[int] EGRESS_ID_FIELD_NUMBER: _ClassVar[int] ACTIVE_FIELD_NUMBER: _ClassVar[int] @@ -430,19 +430,19 @@ class ListEgressRequest(_message.Message): def __init__(self, room_name: _Optional[str] = ..., egress_id: _Optional[str] = ..., active: bool = ...) -> None: ... class ListEgressResponse(_message.Message): - __slots__ = ("items",) + __slots__ = ["items"] ITEMS_FIELD_NUMBER: _ClassVar[int] items: _containers.RepeatedCompositeFieldContainer[EgressInfo] def __init__(self, items: _Optional[_Iterable[_Union[EgressInfo, _Mapping]]] = ...) -> None: ... class StopEgressRequest(_message.Message): - __slots__ = ("egress_id",) + __slots__ = ["egress_id"] EGRESS_ID_FIELD_NUMBER: _ClassVar[int] egress_id: str def __init__(self, egress_id: _Optional[str] = ...) -> None: ... class EgressInfo(_message.Message): - __slots__ = ("egress_id", "room_id", "room_name", "status", "started_at", "ended_at", "updated_at", "details", "error", "room_composite", "web", "participant", "track_composite", "track", "stream", "file", "segments", "stream_results", "file_results", "segment_results", "image_results") + __slots__ = ["egress_id", "room_id", "room_name", "status", "started_at", "ended_at", "updated_at", "details", "error", "room_composite", "web", "participant", "track_composite", "track", "stream", "file", "segments", "stream_results", "file_results", "segment_results", "image_results"] EGRESS_ID_FIELD_NUMBER: _ClassVar[int] ROOM_ID_FIELD_NUMBER: _ClassVar[int] ROOM_NAME_FIELD_NUMBER: _ClassVar[int] @@ -488,15 +488,15 @@ class EgressInfo(_message.Message): def __init__(self, egress_id: _Optional[str] = ..., room_id: _Optional[str] = ..., room_name: _Optional[str] = ..., status: _Optional[_Union[EgressStatus, str]] = ..., started_at: _Optional[int] = ..., ended_at: _Optional[int] = ..., updated_at: _Optional[int] = ..., details: _Optional[str] = ..., error: _Optional[str] = ..., room_composite: _Optional[_Union[RoomCompositeEgressRequest, _Mapping]] = ..., web: _Optional[_Union[WebEgressRequest, _Mapping]] = ..., participant: _Optional[_Union[ParticipantEgressRequest, _Mapping]] = ..., track_composite: _Optional[_Union[TrackCompositeEgressRequest, _Mapping]] = ..., track: _Optional[_Union[TrackEgressRequest, _Mapping]] = ..., stream: _Optional[_Union[StreamInfoList, _Mapping]] = ..., file: _Optional[_Union[FileInfo, _Mapping]] = ..., segments: _Optional[_Union[SegmentsInfo, _Mapping]] = ..., stream_results: _Optional[_Iterable[_Union[StreamInfo, _Mapping]]] = ..., file_results: _Optional[_Iterable[_Union[FileInfo, _Mapping]]] = ..., segment_results: _Optional[_Iterable[_Union[SegmentsInfo, _Mapping]]] = ..., image_results: _Optional[_Iterable[_Union[ImagesInfo, _Mapping]]] = ...) -> None: ... class StreamInfoList(_message.Message): - __slots__ = ("info",) + __slots__ = ["info"] INFO_FIELD_NUMBER: _ClassVar[int] info: _containers.RepeatedCompositeFieldContainer[StreamInfo] def __init__(self, info: _Optional[_Iterable[_Union[StreamInfo, _Mapping]]] = ...) -> None: ... class StreamInfo(_message.Message): - __slots__ = ("url", "started_at", "ended_at", "duration", "status", "error") + __slots__ = ["url", "started_at", "ended_at", "duration", "status", "error"] class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] ACTIVE: _ClassVar[StreamInfo.Status] FINISHED: _ClassVar[StreamInfo.Status] FAILED: _ClassVar[StreamInfo.Status] @@ -518,7 +518,7 @@ class StreamInfo(_message.Message): def __init__(self, url: _Optional[str] = ..., started_at: _Optional[int] = ..., ended_at: _Optional[int] = ..., duration: _Optional[int] = ..., status: _Optional[_Union[StreamInfo.Status, str]] = ..., error: _Optional[str] = ...) -> None: ... class FileInfo(_message.Message): - __slots__ = ("filename", "started_at", "ended_at", "duration", "size", "location") + __slots__ = ["filename", "started_at", "ended_at", "duration", "size", "location"] FILENAME_FIELD_NUMBER: _ClassVar[int] STARTED_AT_FIELD_NUMBER: _ClassVar[int] ENDED_AT_FIELD_NUMBER: _ClassVar[int] @@ -534,7 +534,7 @@ class FileInfo(_message.Message): def __init__(self, filename: _Optional[str] = ..., started_at: _Optional[int] = ..., ended_at: _Optional[int] = ..., duration: _Optional[int] = ..., size: _Optional[int] = ..., location: _Optional[str] = ...) -> None: ... class SegmentsInfo(_message.Message): - __slots__ = ("playlist_name", "live_playlist_name", "duration", "size", "playlist_location", "live_playlist_location", "segment_count", "started_at", "ended_at") + __slots__ = ["playlist_name", "live_playlist_name", "duration", "size", "playlist_location", "live_playlist_location", "segment_count", "started_at", "ended_at"] PLAYLIST_NAME_FIELD_NUMBER: _ClassVar[int] LIVE_PLAYLIST_NAME_FIELD_NUMBER: _ClassVar[int] DURATION_FIELD_NUMBER: _ClassVar[int] @@ -556,7 +556,7 @@ class SegmentsInfo(_message.Message): def __init__(self, playlist_name: _Optional[str] = ..., live_playlist_name: _Optional[str] = ..., duration: _Optional[int] = ..., size: _Optional[int] = ..., playlist_location: _Optional[str] = ..., live_playlist_location: _Optional[str] = ..., segment_count: _Optional[int] = ..., started_at: _Optional[int] = ..., ended_at: _Optional[int] = ...) -> None: ... class ImagesInfo(_message.Message): - __slots__ = ("image_count", "started_at", "ended_at") + __slots__ = ["image_count", "started_at", "ended_at"] IMAGE_COUNT_FIELD_NUMBER: _ClassVar[int] STARTED_AT_FIELD_NUMBER: _ClassVar[int] ENDED_AT_FIELD_NUMBER: _ClassVar[int] @@ -566,7 +566,7 @@ class ImagesInfo(_message.Message): def __init__(self, image_count: _Optional[int] = ..., started_at: _Optional[int] = ..., ended_at: _Optional[int] = ...) -> None: ... class AutoParticipantEgress(_message.Message): - __slots__ = ("preset", "advanced", "file_outputs", "segment_outputs") + __slots__ = ["preset", "advanced", "file_outputs", "segment_outputs"] PRESET_FIELD_NUMBER: _ClassVar[int] ADVANCED_FIELD_NUMBER: _ClassVar[int] FILE_OUTPUTS_FIELD_NUMBER: _ClassVar[int] @@ -578,7 +578,7 @@ class AutoParticipantEgress(_message.Message): def __init__(self, preset: _Optional[_Union[EncodingOptionsPreset, str]] = ..., advanced: _Optional[_Union[EncodingOptions, _Mapping]] = ..., file_outputs: _Optional[_Iterable[_Union[EncodedFileOutput, _Mapping]]] = ..., segment_outputs: _Optional[_Iterable[_Union[SegmentedFileOutput, _Mapping]]] = ...) -> None: ... class AutoTrackEgress(_message.Message): - __slots__ = ("filepath", "disable_manifest", "s3", "gcp", "azure") + __slots__ = ["filepath", "disable_manifest", "s3", "gcp", "azure"] FILEPATH_FIELD_NUMBER: _ClassVar[int] DISABLE_MANIFEST_FIELD_NUMBER: _ClassVar[int] S3_FIELD_NUMBER: _ClassVar[int] diff --git a/livekit-protocol/livekit/protocol/ingress.py b/livekit-protocol/livekit/protocol/ingress.py index 67683bca..3776bc51 100644 --- a/livekit-protocol/livekit/protocol/ingress.py +++ b/livekit-protocol/livekit/protocol/ingress.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: livekit_ingress.proto -# 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 @@ -21,8 +20,9 @@ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ingress', _globals) 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' + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' _globals['_INGRESSINPUT']._serialized_start=2542 _globals['_INGRESSINPUT']._serialized_end=2603 _globals['_INGRESSAUDIOENCODINGPRESET']._serialized_start=2605 diff --git a/livekit-protocol/livekit/protocol/ingress.pyi b/livekit-protocol/livekit/protocol/ingress.pyi index 6489be54..c7d12cf1 100644 --- a/livekit-protocol/livekit/protocol/ingress.pyi +++ b/livekit-protocol/livekit/protocol/ingress.pyi @@ -8,18 +8,18 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map DESCRIPTOR: _descriptor.FileDescriptor class IngressInput(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] RTMP_INPUT: _ClassVar[IngressInput] WHIP_INPUT: _ClassVar[IngressInput] URL_INPUT: _ClassVar[IngressInput] class IngressAudioEncodingPreset(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] OPUS_STEREO_96KBPS: _ClassVar[IngressAudioEncodingPreset] OPUS_MONO_64KBS: _ClassVar[IngressAudioEncodingPreset] class IngressVideoEncodingPreset(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] H264_720P_30FPS_3_LAYERS: _ClassVar[IngressVideoEncodingPreset] H264_1080P_30FPS_3_LAYERS: _ClassVar[IngressVideoEncodingPreset] H264_540P_25FPS_2_LAYERS: _ClassVar[IngressVideoEncodingPreset] @@ -47,7 +47,7 @@ H264_720P_30FPS_1_LAYER_HIGH_MOTION: IngressVideoEncodingPreset H264_1080P_30FPS_1_LAYER_HIGH_MOTION: IngressVideoEncodingPreset class CreateIngressRequest(_message.Message): - __slots__ = ("input_type", "url", "name", "room_name", "participant_identity", "participant_name", "participant_metadata", "bypass_transcoding", "audio", "video") + __slots__ = ["input_type", "url", "name", "room_name", "participant_identity", "participant_name", "participant_metadata", "bypass_transcoding", "audio", "video"] INPUT_TYPE_FIELD_NUMBER: _ClassVar[int] URL_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] @@ -71,7 +71,7 @@ class CreateIngressRequest(_message.Message): def __init__(self, input_type: _Optional[_Union[IngressInput, str]] = ..., url: _Optional[str] = ..., name: _Optional[str] = ..., room_name: _Optional[str] = ..., participant_identity: _Optional[str] = ..., participant_name: _Optional[str] = ..., participant_metadata: _Optional[str] = ..., bypass_transcoding: bool = ..., audio: _Optional[_Union[IngressAudioOptions, _Mapping]] = ..., video: _Optional[_Union[IngressVideoOptions, _Mapping]] = ...) -> None: ... class IngressAudioOptions(_message.Message): - __slots__ = ("name", "source", "preset", "options") + __slots__ = ["name", "source", "preset", "options"] NAME_FIELD_NUMBER: _ClassVar[int] SOURCE_FIELD_NUMBER: _ClassVar[int] PRESET_FIELD_NUMBER: _ClassVar[int] @@ -83,7 +83,7 @@ class IngressAudioOptions(_message.Message): def __init__(self, name: _Optional[str] = ..., source: _Optional[_Union[_models.TrackSource, str]] = ..., preset: _Optional[_Union[IngressAudioEncodingPreset, str]] = ..., options: _Optional[_Union[IngressAudioEncodingOptions, _Mapping]] = ...) -> None: ... class IngressVideoOptions(_message.Message): - __slots__ = ("name", "source", "preset", "options") + __slots__ = ["name", "source", "preset", "options"] NAME_FIELD_NUMBER: _ClassVar[int] SOURCE_FIELD_NUMBER: _ClassVar[int] PRESET_FIELD_NUMBER: _ClassVar[int] @@ -95,7 +95,7 @@ class IngressVideoOptions(_message.Message): def __init__(self, name: _Optional[str] = ..., source: _Optional[_Union[_models.TrackSource, str]] = ..., preset: _Optional[_Union[IngressVideoEncodingPreset, str]] = ..., options: _Optional[_Union[IngressVideoEncodingOptions, _Mapping]] = ...) -> None: ... class IngressAudioEncodingOptions(_message.Message): - __slots__ = ("audio_codec", "bitrate", "disable_dtx", "channels") + __slots__ = ["audio_codec", "bitrate", "disable_dtx", "channels"] AUDIO_CODEC_FIELD_NUMBER: _ClassVar[int] BITRATE_FIELD_NUMBER: _ClassVar[int] DISABLE_DTX_FIELD_NUMBER: _ClassVar[int] @@ -107,7 +107,7 @@ class IngressAudioEncodingOptions(_message.Message): def __init__(self, audio_codec: _Optional[_Union[_models.AudioCodec, str]] = ..., bitrate: _Optional[int] = ..., disable_dtx: bool = ..., channels: _Optional[int] = ...) -> None: ... class IngressVideoEncodingOptions(_message.Message): - __slots__ = ("video_codec", "frame_rate", "layers") + __slots__ = ["video_codec", "frame_rate", "layers"] VIDEO_CODEC_FIELD_NUMBER: _ClassVar[int] FRAME_RATE_FIELD_NUMBER: _ClassVar[int] LAYERS_FIELD_NUMBER: _ClassVar[int] @@ -117,7 +117,7 @@ class IngressVideoEncodingOptions(_message.Message): def __init__(self, video_codec: _Optional[_Union[_models.VideoCodec, str]] = ..., frame_rate: _Optional[float] = ..., layers: _Optional[_Iterable[_Union[_models.VideoLayer, _Mapping]]] = ...) -> None: ... class IngressInfo(_message.Message): - __slots__ = ("ingress_id", "name", "stream_key", "url", "input_type", "bypass_transcoding", "audio", "video", "room_name", "participant_identity", "participant_name", "participant_metadata", "reusable", "state") + __slots__ = ["ingress_id", "name", "stream_key", "url", "input_type", "bypass_transcoding", "audio", "video", "room_name", "participant_identity", "participant_name", "participant_metadata", "reusable", "state"] INGRESS_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] STREAM_KEY_FIELD_NUMBER: _ClassVar[int] @@ -149,9 +149,9 @@ class IngressInfo(_message.Message): def __init__(self, ingress_id: _Optional[str] = ..., name: _Optional[str] = ..., stream_key: _Optional[str] = ..., url: _Optional[str] = ..., input_type: _Optional[_Union[IngressInput, str]] = ..., bypass_transcoding: bool = ..., audio: _Optional[_Union[IngressAudioOptions, _Mapping]] = ..., video: _Optional[_Union[IngressVideoOptions, _Mapping]] = ..., room_name: _Optional[str] = ..., participant_identity: _Optional[str] = ..., participant_name: _Optional[str] = ..., participant_metadata: _Optional[str] = ..., reusable: bool = ..., state: _Optional[_Union[IngressState, _Mapping]] = ...) -> None: ... class IngressState(_message.Message): - __slots__ = ("status", "error", "video", "audio", "room_id", "started_at", "ended_at", "resource_id", "tracks") + __slots__ = ["status", "error", "video", "audio", "room_id", "started_at", "ended_at", "resource_id", "tracks"] class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] ENDPOINT_INACTIVE: _ClassVar[IngressState.Status] ENDPOINT_BUFFERING: _ClassVar[IngressState.Status] ENDPOINT_PUBLISHING: _ClassVar[IngressState.Status] @@ -183,7 +183,7 @@ class IngressState(_message.Message): def __init__(self, status: _Optional[_Union[IngressState.Status, str]] = ..., error: _Optional[str] = ..., video: _Optional[_Union[InputVideoState, _Mapping]] = ..., audio: _Optional[_Union[InputAudioState, _Mapping]] = ..., room_id: _Optional[str] = ..., started_at: _Optional[int] = ..., ended_at: _Optional[int] = ..., resource_id: _Optional[str] = ..., tracks: _Optional[_Iterable[_Union[_models.TrackInfo, _Mapping]]] = ...) -> None: ... class InputVideoState(_message.Message): - __slots__ = ("mime_type", "average_bitrate", "width", "height", "framerate") + __slots__ = ["mime_type", "average_bitrate", "width", "height", "framerate"] MIME_TYPE_FIELD_NUMBER: _ClassVar[int] AVERAGE_BITRATE_FIELD_NUMBER: _ClassVar[int] WIDTH_FIELD_NUMBER: _ClassVar[int] @@ -197,7 +197,7 @@ class InputVideoState(_message.Message): def __init__(self, mime_type: _Optional[str] = ..., average_bitrate: _Optional[int] = ..., width: _Optional[int] = ..., height: _Optional[int] = ..., framerate: _Optional[float] = ...) -> None: ... class InputAudioState(_message.Message): - __slots__ = ("mime_type", "average_bitrate", "channels", "sample_rate") + __slots__ = ["mime_type", "average_bitrate", "channels", "sample_rate"] MIME_TYPE_FIELD_NUMBER: _ClassVar[int] AVERAGE_BITRATE_FIELD_NUMBER: _ClassVar[int] CHANNELS_FIELD_NUMBER: _ClassVar[int] @@ -209,7 +209,7 @@ class InputAudioState(_message.Message): def __init__(self, mime_type: _Optional[str] = ..., average_bitrate: _Optional[int] = ..., channels: _Optional[int] = ..., sample_rate: _Optional[int] = ...) -> None: ... class UpdateIngressRequest(_message.Message): - __slots__ = ("ingress_id", "name", "room_name", "participant_identity", "participant_name", "participant_metadata", "bypass_transcoding", "audio", "video") + __slots__ = ["ingress_id", "name", "room_name", "participant_identity", "participant_name", "participant_metadata", "bypass_transcoding", "audio", "video"] INGRESS_ID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] ROOM_NAME_FIELD_NUMBER: _ClassVar[int] @@ -231,7 +231,7 @@ class UpdateIngressRequest(_message.Message): def __init__(self, ingress_id: _Optional[str] = ..., name: _Optional[str] = ..., room_name: _Optional[str] = ..., participant_identity: _Optional[str] = ..., participant_name: _Optional[str] = ..., participant_metadata: _Optional[str] = ..., bypass_transcoding: bool = ..., audio: _Optional[_Union[IngressAudioOptions, _Mapping]] = ..., video: _Optional[_Union[IngressVideoOptions, _Mapping]] = ...) -> None: ... class ListIngressRequest(_message.Message): - __slots__ = ("room_name", "ingress_id") + __slots__ = ["room_name", "ingress_id"] ROOM_NAME_FIELD_NUMBER: _ClassVar[int] INGRESS_ID_FIELD_NUMBER: _ClassVar[int] room_name: str @@ -239,13 +239,13 @@ class ListIngressRequest(_message.Message): def __init__(self, room_name: _Optional[str] = ..., ingress_id: _Optional[str] = ...) -> None: ... class ListIngressResponse(_message.Message): - __slots__ = ("items",) + __slots__ = ["items"] ITEMS_FIELD_NUMBER: _ClassVar[int] items: _containers.RepeatedCompositeFieldContainer[IngressInfo] def __init__(self, items: _Optional[_Iterable[_Union[IngressInfo, _Mapping]]] = ...) -> None: ... class DeleteIngressRequest(_message.Message): - __slots__ = ("ingress_id",) + __slots__ = ["ingress_id"] INGRESS_ID_FIELD_NUMBER: _ClassVar[int] ingress_id: str def __init__(self, ingress_id: _Optional[str] = ...) -> None: ... diff --git a/livekit-protocol/livekit/protocol/models.py b/livekit-protocol/livekit/protocol/models.py index 875c42ad..2ee67393 100644 --- a/livekit-protocol/livekit/protocol/models.py +++ b/livekit-protocol/livekit/protocol/models.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: livekit_models.proto -# 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 @@ -21,22 +20,23 @@ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'models', _globals) 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['_DATAPACKET'].fields_by_name['kind']._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']._serialized_options = b'\030\001' - _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']._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']._serialized_options = b'\030\001' - _globals['_USERPACKET'].fields_by_name['destination_identities']._options = None - _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' + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' + _DATAPACKET.fields_by_name['kind']._options = None + _DATAPACKET.fields_by_name['kind']._serialized_options = b'\030\001' + _DATAPACKET.fields_by_name['speaker']._options = None + _DATAPACKET.fields_by_name['speaker']._serialized_options = b'\030\001' + _USERPACKET.fields_by_name['participant_sid']._options = None + _USERPACKET.fields_by_name['participant_sid']._serialized_options = b'\030\001' + _USERPACKET.fields_by_name['participant_identity']._options = None + _USERPACKET.fields_by_name['participant_identity']._serialized_options = b'\030\001' + _USERPACKET.fields_by_name['destination_sids']._options = None + _USERPACKET.fields_by_name['destination_sids']._serialized_options = b'\030\001' + _USERPACKET.fields_by_name['destination_identities']._options = None + _USERPACKET.fields_by_name['destination_identities']._serialized_options = b'\030\001' + _RTPSTATS_GAPHISTOGRAMENTRY._options = None + _RTPSTATS_GAPHISTOGRAMENTRY._serialized_options = b'8\001' _globals['_AUDIOCODEC']._serialized_start=5245 _globals['_AUDIOCODEC']._serialized_end=5292 _globals['_VIDEOCODEC']._serialized_start=5294 diff --git a/livekit-protocol/livekit/protocol/models.pyi b/livekit-protocol/livekit/protocol/models.pyi index 4f204d20..bfe8a4ea 100644 --- a/livekit-protocol/livekit/protocol/models.pyi +++ b/livekit-protocol/livekit/protocol/models.pyi @@ -8,13 +8,13 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map DESCRIPTOR: _descriptor.FileDescriptor class AudioCodec(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] DEFAULT_AC: _ClassVar[AudioCodec] OPUS: _ClassVar[AudioCodec] AAC: _ClassVar[AudioCodec] class VideoCodec(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] DEFAULT_VC: _ClassVar[VideoCodec] H264_BASELINE: _ClassVar[VideoCodec] H264_MAIN: _ClassVar[VideoCodec] @@ -22,18 +22,18 @@ class VideoCodec(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): VP8: _ClassVar[VideoCodec] class ImageCodec(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] IC_DEFAULT: _ClassVar[ImageCodec] IC_JPEG: _ClassVar[ImageCodec] class TrackType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] AUDIO: _ClassVar[TrackType] VIDEO: _ClassVar[TrackType] DATA: _ClassVar[TrackType] class TrackSource(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] UNKNOWN: _ClassVar[TrackSource] CAMERA: _ClassVar[TrackSource] MICROPHONE: _ClassVar[TrackSource] @@ -41,27 +41,27 @@ class TrackSource(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): SCREEN_SHARE_AUDIO: _ClassVar[TrackSource] class VideoQuality(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] LOW: _ClassVar[VideoQuality] MEDIUM: _ClassVar[VideoQuality] HIGH: _ClassVar[VideoQuality] OFF: _ClassVar[VideoQuality] class ConnectionQuality(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] POOR: _ClassVar[ConnectionQuality] GOOD: _ClassVar[ConnectionQuality] EXCELLENT: _ClassVar[ConnectionQuality] LOST: _ClassVar[ConnectionQuality] class ClientConfigSetting(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] UNSET: _ClassVar[ClientConfigSetting] DISABLED: _ClassVar[ClientConfigSetting] ENABLED: _ClassVar[ClientConfigSetting] class DisconnectReason(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] UNKNOWN_REASON: _ClassVar[DisconnectReason] CLIENT_INITIATED: _ClassVar[DisconnectReason] DUPLICATE_IDENTITY: _ClassVar[DisconnectReason] @@ -74,7 +74,7 @@ class DisconnectReason(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): SIGNAL_CLOSE: _ClassVar[DisconnectReason] class ReconnectReason(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] RR_UNKNOWN: _ClassVar[ReconnectReason] RR_SIGNAL_DISCONNECTED: _ClassVar[ReconnectReason] RR_PUBLISHER_FAILED: _ClassVar[ReconnectReason] @@ -82,13 +82,13 @@ class ReconnectReason(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): RR_SWITCH_CANDIDATE: _ClassVar[ReconnectReason] class SubscriptionError(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] SE_UNKNOWN: _ClassVar[SubscriptionError] SE_CODEC_UNSUPPORTED: _ClassVar[SubscriptionError] SE_TRACK_NOTFOUND: _ClassVar[SubscriptionError] class AudioTrackFeature(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] TF_STEREO: _ClassVar[AudioTrackFeature] TF_NO_DTX: _ClassVar[AudioTrackFeature] TF_AUTO_GAIN_CONTROL: _ClassVar[AudioTrackFeature] @@ -150,7 +150,7 @@ TF_NOISE_SUPPRESSION: AudioTrackFeature TF_ENHANCED_NOISE_CANCELLATION: AudioTrackFeature class Room(_message.Message): - __slots__ = ("sid", "name", "empty_timeout", "departure_timeout", "max_participants", "creation_time", "turn_password", "enabled_codecs", "metadata", "num_participants", "num_publishers", "active_recording", "version") + __slots__ = ["sid", "name", "empty_timeout", "departure_timeout", "max_participants", "creation_time", "turn_password", "enabled_codecs", "metadata", "num_participants", "num_publishers", "active_recording", "version"] SID_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] EMPTY_TIMEOUT_FIELD_NUMBER: _ClassVar[int] @@ -180,7 +180,7 @@ class Room(_message.Message): def __init__(self, sid: _Optional[str] = ..., name: _Optional[str] = ..., empty_timeout: _Optional[int] = ..., departure_timeout: _Optional[int] = ..., max_participants: _Optional[int] = ..., creation_time: _Optional[int] = ..., turn_password: _Optional[str] = ..., enabled_codecs: _Optional[_Iterable[_Union[Codec, _Mapping]]] = ..., metadata: _Optional[str] = ..., num_participants: _Optional[int] = ..., num_publishers: _Optional[int] = ..., active_recording: bool = ..., version: _Optional[_Union[TimedVersion, _Mapping]] = ...) -> None: ... class Codec(_message.Message): - __slots__ = ("mime", "fmtp_line") + __slots__ = ["mime", "fmtp_line"] MIME_FIELD_NUMBER: _ClassVar[int] FMTP_LINE_FIELD_NUMBER: _ClassVar[int] mime: str @@ -188,7 +188,7 @@ class Codec(_message.Message): def __init__(self, mime: _Optional[str] = ..., fmtp_line: _Optional[str] = ...) -> None: ... class PlayoutDelay(_message.Message): - __slots__ = ("enabled", "min", "max") + __slots__ = ["enabled", "min", "max"] ENABLED_FIELD_NUMBER: _ClassVar[int] MIN_FIELD_NUMBER: _ClassVar[int] MAX_FIELD_NUMBER: _ClassVar[int] @@ -198,7 +198,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_FIELD_NUMBER: _ClassVar[int] CAN_PUBLISH_FIELD_NUMBER: _ClassVar[int] CAN_PUBLISH_DATA_FIELD_NUMBER: _ClassVar[int] @@ -218,9 +218,9 @@ class ParticipantPermission(_message.Message): 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") + __slots__ = ["sid", "identity", "state", "tracks", "metadata", "joined_at", "name", "version", "permission", "region", "is_publisher", "kind"] class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] JOINING: _ClassVar[ParticipantInfo.State] JOINED: _ClassVar[ParticipantInfo.State] ACTIVE: _ClassVar[ParticipantInfo.State] @@ -230,7 +230,7 @@ class ParticipantInfo(_message.Message): ACTIVE: ParticipantInfo.State DISCONNECTED: ParticipantInfo.State class Kind(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] STANDARD: _ClassVar[ParticipantInfo.Kind] INGRESS: _ClassVar[ParticipantInfo.Kind] EGRESS: _ClassVar[ParticipantInfo.Kind] @@ -268,9 +268,9 @@ class ParticipantInfo(_message.Message): def __init__(self, sid: _Optional[str] = ..., identity: _Optional[str] = ..., state: _Optional[_Union[ParticipantInfo.State, str]] = ..., tracks: _Optional[_Iterable[_Union[TrackInfo, _Mapping]]] = ..., metadata: _Optional[str] = ..., joined_at: _Optional[int] = ..., name: _Optional[str] = ..., version: _Optional[int] = ..., permission: _Optional[_Union[ParticipantPermission, _Mapping]] = ..., region: _Optional[str] = ..., is_publisher: bool = ..., kind: _Optional[_Union[ParticipantInfo.Kind, str]] = ...) -> None: ... class Encryption(_message.Message): - __slots__ = () + __slots__ = [] class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] NONE: _ClassVar[Encryption.Type] GCM: _ClassVar[Encryption.Type] CUSTOM: _ClassVar[Encryption.Type] @@ -280,7 +280,7 @@ class Encryption(_message.Message): def __init__(self) -> None: ... class SimulcastCodecInfo(_message.Message): - __slots__ = ("mime_type", "mid", "cid", "layers") + __slots__ = ["mime_type", "mid", "cid", "layers"] MIME_TYPE_FIELD_NUMBER: _ClassVar[int] MID_FIELD_NUMBER: _ClassVar[int] CID_FIELD_NUMBER: _ClassVar[int] @@ -292,7 +292,7 @@ class SimulcastCodecInfo(_message.Message): def __init__(self, mime_type: _Optional[str] = ..., mid: _Optional[str] = ..., cid: _Optional[str] = ..., layers: _Optional[_Iterable[_Union[VideoLayer, _Mapping]]] = ...) -> None: ... class TrackInfo(_message.Message): - __slots__ = ("sid", "type", "name", "muted", "width", "height", "simulcast", "disable_dtx", "source", "layers", "mime_type", "mid", "codecs", "stereo", "disable_red", "encryption", "stream", "version") + __slots__ = ["sid", "type", "name", "muted", "width", "height", "simulcast", "disable_dtx", "source", "layers", "mime_type", "mid", "codecs", "stereo", "disable_red", "encryption", "stream", "version"] SID_FIELD_NUMBER: _ClassVar[int] TYPE_FIELD_NUMBER: _ClassVar[int] NAME_FIELD_NUMBER: _ClassVar[int] @@ -332,7 +332,7 @@ class TrackInfo(_message.Message): def __init__(self, sid: _Optional[str] = ..., type: _Optional[_Union[TrackType, str]] = ..., name: _Optional[str] = ..., muted: bool = ..., width: _Optional[int] = ..., height: _Optional[int] = ..., simulcast: bool = ..., disable_dtx: bool = ..., source: _Optional[_Union[TrackSource, str]] = ..., layers: _Optional[_Iterable[_Union[VideoLayer, _Mapping]]] = ..., mime_type: _Optional[str] = ..., mid: _Optional[str] = ..., codecs: _Optional[_Iterable[_Union[SimulcastCodecInfo, _Mapping]]] = ..., stereo: bool = ..., disable_red: bool = ..., encryption: _Optional[_Union[Encryption.Type, str]] = ..., stream: _Optional[str] = ..., version: _Optional[_Union[TimedVersion, _Mapping]] = ...) -> None: ... class VideoLayer(_message.Message): - __slots__ = ("quality", "width", "height", "bitrate", "ssrc") + __slots__ = ["quality", "width", "height", "bitrate", "ssrc"] QUALITY_FIELD_NUMBER: _ClassVar[int] WIDTH_FIELD_NUMBER: _ClassVar[int] HEIGHT_FIELD_NUMBER: _ClassVar[int] @@ -346,9 +346,9 @@ 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") + __slots__ = ["kind", "participant_identity", "destination_identities", "user", "speaker", "sip_dtmf"] class Kind(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] RELIABLE: _ClassVar[DataPacket.Kind] LOSSY: _ClassVar[DataPacket.Kind] RELIABLE: DataPacket.Kind @@ -368,13 +368,13 @@ class DataPacket(_message.Message): 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]] = ...) -> None: ... class ActiveSpeakerUpdate(_message.Message): - __slots__ = ("speakers",) + __slots__ = ["speakers"] SPEAKERS_FIELD_NUMBER: _ClassVar[int] speakers: _containers.RepeatedCompositeFieldContainer[SpeakerInfo] def __init__(self, speakers: _Optional[_Iterable[_Union[SpeakerInfo, _Mapping]]] = ...) -> None: ... class SpeakerInfo(_message.Message): - __slots__ = ("sid", "level", "active") + __slots__ = ["sid", "level", "active"] SID_FIELD_NUMBER: _ClassVar[int] LEVEL_FIELD_NUMBER: _ClassVar[int] ACTIVE_FIELD_NUMBER: _ClassVar[int] @@ -384,7 +384,7 @@ class SpeakerInfo(_message.Message): def __init__(self, sid: _Optional[str] = ..., level: _Optional[float] = ..., active: bool = ...) -> None: ... class UserPacket(_message.Message): - __slots__ = ("participant_sid", "participant_identity", "payload", "destination_sids", "destination_identities", "topic") + __slots__ = ["participant_sid", "participant_identity", "payload", "destination_sids", "destination_identities", "topic"] PARTICIPANT_SID_FIELD_NUMBER: _ClassVar[int] PARTICIPANT_IDENTITY_FIELD_NUMBER: _ClassVar[int] PAYLOAD_FIELD_NUMBER: _ClassVar[int] @@ -400,7 +400,7 @@ class UserPacket(_message.Message): def __init__(self, participant_sid: _Optional[str] = ..., participant_identity: _Optional[str] = ..., payload: _Optional[bytes] = ..., destination_sids: _Optional[_Iterable[str]] = ..., destination_identities: _Optional[_Iterable[str]] = ..., topic: _Optional[str] = ...) -> None: ... class SipDTMF(_message.Message): - __slots__ = ("code", "digit") + __slots__ = ["code", "digit"] CODE_FIELD_NUMBER: _ClassVar[int] DIGIT_FIELD_NUMBER: _ClassVar[int] code: int @@ -408,7 +408,7 @@ class SipDTMF(_message.Message): def __init__(self, code: _Optional[int] = ..., digit: _Optional[str] = ...) -> None: ... class ParticipantTracks(_message.Message): - __slots__ = ("participant_sid", "track_sids") + __slots__ = ["participant_sid", "track_sids"] PARTICIPANT_SID_FIELD_NUMBER: _ClassVar[int] TRACK_SIDS_FIELD_NUMBER: _ClassVar[int] participant_sid: str @@ -416,9 +416,9 @@ class ParticipantTracks(_message.Message): def __init__(self, participant_sid: _Optional[str] = ..., track_sids: _Optional[_Iterable[str]] = ...) -> None: ... class ServerInfo(_message.Message): - __slots__ = ("edition", "version", "protocol", "region", "node_id", "debug_info", "agent_protocol") + __slots__ = ["edition", "version", "protocol", "region", "node_id", "debug_info", "agent_protocol"] class Edition(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] Standard: _ClassVar[ServerInfo.Edition] Cloud: _ClassVar[ServerInfo.Edition] Standard: ServerInfo.Edition @@ -440,9 +440,9 @@ 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"] class SDK(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () + __slots__ = [] UNKNOWN: _ClassVar[ClientInfo.SDK] JS: _ClassVar[ClientInfo.SDK] SWIFT: _ClassVar[ClientInfo.SDK] @@ -488,7 +488,7 @@ class ClientInfo(_message.Message): 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") + __slots__ = ["video", "screen", "resume_connection", "disabled_codecs", "force_relay"] VIDEO_FIELD_NUMBER: _ClassVar[int] SCREEN_FIELD_NUMBER: _ClassVar[int] RESUME_CONNECTION_FIELD_NUMBER: _ClassVar[int] @@ -502,13 +502,13 @@ class ClientConfiguration(_message.Message): def __init__(self, video: _Optional[_Union[VideoConfiguration, _Mapping]] = ..., screen: _Optional[_Union[VideoConfiguration, _Mapping]] = ..., resume_connection: _Optional[_Union[ClientConfigSetting, str]] = ..., disabled_codecs: _Optional[_Union[DisabledCodecs, _Mapping]] = ..., force_relay: _Optional[_Union[ClientConfigSetting, str]] = ...) -> None: ... class VideoConfiguration(_message.Message): - __slots__ = ("hardware_encoder",) + __slots__ = ["hardware_encoder"] HARDWARE_ENCODER_FIELD_NUMBER: _ClassVar[int] hardware_encoder: ClientConfigSetting def __init__(self, hardware_encoder: _Optional[_Union[ClientConfigSetting, str]] = ...) -> None: ... class DisabledCodecs(_message.Message): - __slots__ = ("codecs", "publish") + __slots__ = ["codecs", "publish"] CODECS_FIELD_NUMBER: _ClassVar[int] PUBLISH_FIELD_NUMBER: _ClassVar[int] codecs: _containers.RepeatedCompositeFieldContainer[Codec] @@ -516,7 +516,7 @@ class DisabledCodecs(_message.Message): def __init__(self, codecs: _Optional[_Iterable[_Union[Codec, _Mapping]]] = ..., publish: _Optional[_Iterable[_Union[Codec, _Mapping]]] = ...) -> None: ... class RTPDrift(_message.Message): - __slots__ = ("start_time", "end_time", "duration", "start_timestamp", "end_timestamp", "rtp_clock_ticks", "drift_samples", "drift_ms", "clock_rate") + __slots__ = ["start_time", "end_time", "duration", "start_timestamp", "end_timestamp", "rtp_clock_ticks", "drift_samples", "drift_ms", "clock_rate"] START_TIME_FIELD_NUMBER: _ClassVar[int] END_TIME_FIELD_NUMBER: _ClassVar[int] DURATION_FIELD_NUMBER: _ClassVar[int] @@ -538,9 +538,9 @@ 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", "report_drift", "rebased_report_drift"] class GapHistogramEntry(_message.Message): - __slots__ = ("key", "value") + __slots__ = ["key", "value"] KEY_FIELD_NUMBER: _ClassVar[int] VALUE_FIELD_NUMBER: _ClassVar[int] key: int @@ -637,7 +637,7 @@ class RTPStats(_message.Message): 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 TimedVersion(_message.Message): - __slots__ = ("unix_micro", "ticks") + __slots__ = ["unix_micro", "ticks"] UNIX_MICRO_FIELD_NUMBER: _ClassVar[int] TICKS_FIELD_NUMBER: _ClassVar[int] unix_micro: int diff --git a/livekit-protocol/livekit/protocol/room.py b/livekit-protocol/livekit/protocol/room.py index 496f2717..716a1c99 100644 --- a/livekit-protocol/livekit/protocol/room.py +++ b/livekit-protocol/livekit/protocol/room.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: livekit_room.proto -# 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 @@ -22,10 +21,11 @@ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'room', _globals) 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['_SENDDATAREQUEST'].fields_by_name['destination_sids']._options = None - _globals['_SENDDATAREQUEST'].fields_by_name['destination_sids']._serialized_options = b'\030\001' + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' + _SENDDATAREQUEST.fields_by_name['destination_sids']._options = None + _SENDDATAREQUEST.fields_by_name['destination_sids']._serialized_options = b'\030\001' _globals['_CREATEROOMREQUEST']._serialized_start=76 _globals['_CREATEROOMREQUEST']._serialized_end=333 _globals['_ROOMEGRESS']._serialized_start=336 diff --git a/livekit-protocol/livekit/protocol/room.pyi b/livekit-protocol/livekit/protocol/room.pyi index b38a4554..511ebd90 100644 --- a/livekit-protocol/livekit/protocol/room.pyi +++ b/livekit-protocol/livekit/protocol/room.pyi @@ -8,7 +8,7 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map DESCRIPTOR: _descriptor.FileDescriptor class CreateRoomRequest(_message.Message): - __slots__ = ("name", "empty_timeout", "departure_timeout", "max_participants", "node_id", "metadata", "egress", "min_playout_delay", "max_playout_delay", "sync_streams") + __slots__ = ["name", "empty_timeout", "departure_timeout", "max_participants", "node_id", "metadata", "egress", "min_playout_delay", "max_playout_delay", "sync_streams"] NAME_FIELD_NUMBER: _ClassVar[int] EMPTY_TIMEOUT_FIELD_NUMBER: _ClassVar[int] DEPARTURE_TIMEOUT_FIELD_NUMBER: _ClassVar[int] @@ -32,7 +32,7 @@ class CreateRoomRequest(_message.Message): def __init__(self, name: _Optional[str] = ..., empty_timeout: _Optional[int] = ..., departure_timeout: _Optional[int] = ..., max_participants: _Optional[int] = ..., node_id: _Optional[str] = ..., metadata: _Optional[str] = ..., egress: _Optional[_Union[RoomEgress, _Mapping]] = ..., min_playout_delay: _Optional[int] = ..., max_playout_delay: _Optional[int] = ..., sync_streams: bool = ...) -> None: ... class RoomEgress(_message.Message): - __slots__ = ("room", "participant", "tracks") + __slots__ = ["room", "participant", "tracks"] ROOM_FIELD_NUMBER: _ClassVar[int] PARTICIPANT_FIELD_NUMBER: _ClassVar[int] TRACKS_FIELD_NUMBER: _ClassVar[int] @@ -42,41 +42,41 @@ class RoomEgress(_message.Message): def __init__(self, room: _Optional[_Union[_egress.RoomCompositeEgressRequest, _Mapping]] = ..., participant: _Optional[_Union[_egress.AutoParticipantEgress, _Mapping]] = ..., tracks: _Optional[_Union[_egress.AutoTrackEgress, _Mapping]] = ...) -> None: ... class ListRoomsRequest(_message.Message): - __slots__ = ("names",) + __slots__ = ["names"] NAMES_FIELD_NUMBER: _ClassVar[int] names: _containers.RepeatedScalarFieldContainer[str] def __init__(self, names: _Optional[_Iterable[str]] = ...) -> None: ... class ListRoomsResponse(_message.Message): - __slots__ = ("rooms",) + __slots__ = ["rooms"] ROOMS_FIELD_NUMBER: _ClassVar[int] rooms: _containers.RepeatedCompositeFieldContainer[_models.Room] def __init__(self, rooms: _Optional[_Iterable[_Union[_models.Room, _Mapping]]] = ...) -> None: ... class DeleteRoomRequest(_message.Message): - __slots__ = ("room",) + __slots__ = ["room"] ROOM_FIELD_NUMBER: _ClassVar[int] room: str def __init__(self, room: _Optional[str] = ...) -> None: ... class DeleteRoomResponse(_message.Message): - __slots__ = () + __slots__ = [] def __init__(self) -> None: ... class ListParticipantsRequest(_message.Message): - __slots__ = ("room",) + __slots__ = ["room"] ROOM_FIELD_NUMBER: _ClassVar[int] room: str def __init__(self, room: _Optional[str] = ...) -> None: ... class ListParticipantsResponse(_message.Message): - __slots__ = ("participants",) + __slots__ = ["participants"] PARTICIPANTS_FIELD_NUMBER: _ClassVar[int] participants: _containers.RepeatedCompositeFieldContainer[_models.ParticipantInfo] def __init__(self, participants: _Optional[_Iterable[_Union[_models.ParticipantInfo, _Mapping]]] = ...) -> None: ... class RoomParticipantIdentity(_message.Message): - __slots__ = ("room", "identity") + __slots__ = ["room", "identity"] ROOM_FIELD_NUMBER: _ClassVar[int] IDENTITY_FIELD_NUMBER: _ClassVar[int] room: str @@ -84,11 +84,11 @@ class RoomParticipantIdentity(_message.Message): def __init__(self, room: _Optional[str] = ..., identity: _Optional[str] = ...) -> None: ... class RemoveParticipantResponse(_message.Message): - __slots__ = () + __slots__ = [] def __init__(self) -> None: ... class MuteRoomTrackRequest(_message.Message): - __slots__ = ("room", "identity", "track_sid", "muted") + __slots__ = ["room", "identity", "track_sid", "muted"] ROOM_FIELD_NUMBER: _ClassVar[int] IDENTITY_FIELD_NUMBER: _ClassVar[int] TRACK_SID_FIELD_NUMBER: _ClassVar[int] @@ -100,13 +100,13 @@ class MuteRoomTrackRequest(_message.Message): def __init__(self, room: _Optional[str] = ..., identity: _Optional[str] = ..., track_sid: _Optional[str] = ..., muted: bool = ...) -> None: ... class MuteRoomTrackResponse(_message.Message): - __slots__ = ("track",) + __slots__ = ["track"] TRACK_FIELD_NUMBER: _ClassVar[int] track: _models.TrackInfo def __init__(self, track: _Optional[_Union[_models.TrackInfo, _Mapping]] = ...) -> None: ... class UpdateParticipantRequest(_message.Message): - __slots__ = ("room", "identity", "metadata", "permission", "name") + __slots__ = ["room", "identity", "metadata", "permission", "name"] ROOM_FIELD_NUMBER: _ClassVar[int] IDENTITY_FIELD_NUMBER: _ClassVar[int] METADATA_FIELD_NUMBER: _ClassVar[int] @@ -120,7 +120,7 @@ class UpdateParticipantRequest(_message.Message): def __init__(self, room: _Optional[str] = ..., identity: _Optional[str] = ..., metadata: _Optional[str] = ..., permission: _Optional[_Union[_models.ParticipantPermission, _Mapping]] = ..., name: _Optional[str] = ...) -> None: ... class UpdateSubscriptionsRequest(_message.Message): - __slots__ = ("room", "identity", "track_sids", "subscribe", "participant_tracks") + __slots__ = ["room", "identity", "track_sids", "subscribe", "participant_tracks"] ROOM_FIELD_NUMBER: _ClassVar[int] IDENTITY_FIELD_NUMBER: _ClassVar[int] TRACK_SIDS_FIELD_NUMBER: _ClassVar[int] @@ -134,11 +134,11 @@ class UpdateSubscriptionsRequest(_message.Message): def __init__(self, room: _Optional[str] = ..., identity: _Optional[str] = ..., track_sids: _Optional[_Iterable[str]] = ..., subscribe: bool = ..., participant_tracks: _Optional[_Iterable[_Union[_models.ParticipantTracks, _Mapping]]] = ...) -> None: ... class UpdateSubscriptionsResponse(_message.Message): - __slots__ = () + __slots__ = [] def __init__(self) -> None: ... class SendDataRequest(_message.Message): - __slots__ = ("room", "data", "kind", "destination_sids", "destination_identities", "topic") + __slots__ = ["room", "data", "kind", "destination_sids", "destination_identities", "topic"] ROOM_FIELD_NUMBER: _ClassVar[int] DATA_FIELD_NUMBER: _ClassVar[int] KIND_FIELD_NUMBER: _ClassVar[int] @@ -154,11 +154,11 @@ class SendDataRequest(_message.Message): def __init__(self, room: _Optional[str] = ..., data: _Optional[bytes] = ..., kind: _Optional[_Union[_models.DataPacket.Kind, str]] = ..., destination_sids: _Optional[_Iterable[str]] = ..., destination_identities: _Optional[_Iterable[str]] = ..., topic: _Optional[str] = ...) -> None: ... class SendDataResponse(_message.Message): - __slots__ = () + __slots__ = [] def __init__(self) -> None: ... class UpdateRoomMetadataRequest(_message.Message): - __slots__ = ("room", "metadata") + __slots__ = ["room", "metadata"] ROOM_FIELD_NUMBER: _ClassVar[int] METADATA_FIELD_NUMBER: _ClassVar[int] room: str diff --git a/livekit-protocol/livekit/protocol/sip.py b/livekit-protocol/livekit/protocol/sip.py new file mode 100644 index 00000000..11390a77 --- /dev/null +++ b/livekit-protocol/livekit/protocol/sip.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: livekit_sip.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +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 +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11livekit_sip.proto\x12\x07livekit\"\x8b\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\"\x98\x02\n\x0cSIPTrunkInfo\x12\x14\n\x0csip_trunk_id\x18\x01 \x01(\t\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\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\"\x15\n\x13ListSIPTrunkRequest\"<\n\x14ListSIPTrunkResponse\x12$\n\x05items\x18\x01 \x03(\x0b\x32\x15.livekit.SIPTrunkInfo\"-\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\"t\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\"\x89\x01\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\"\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\"\x9e\x01\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\x0c\n\x04\x64tmf\x18\x05 \x01(\t\x12\x15\n\rplay_ringtone\x18\x06 \x01(\x08\"]\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(\t2\xdd\x04\n\x03SIP\x12G\n\x0e\x43reateSIPTrunk\x12\x1e.livekit.CreateSIPTrunkRequest\x1a\x15.livekit.SIPTrunkInfo\x12K\n\x0cListSIPTrunk\x12\x1c.livekit.ListSIPTrunkRequest\x1a\x1d.livekit.ListSIPTrunkResponse\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) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sip', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'Z#github.com/livekit/protocol/livekit\252\002\rLiveKit.Proto\352\002\016LiveKit::Proto' + _CREATESIPTRUNKREQUEST.fields_by_name['inbound_numbers_regex']._options = None + _CREATESIPTRUNKREQUEST.fields_by_name['inbound_numbers_regex']._serialized_options = b'\030\001' + _SIPTRUNKINFO.fields_by_name['inbound_numbers_regex']._options = None + _SIPTRUNKINFO.fields_by_name['inbound_numbers_regex']._serialized_options = b'\030\001' + _globals['_CREATESIPTRUNKREQUEST']._serialized_start=31 + _globals['_CREATESIPTRUNKREQUEST']._serialized_end=298 + _globals['_SIPTRUNKINFO']._serialized_start=301 + _globals['_SIPTRUNKINFO']._serialized_end=581 + _globals['_LISTSIPTRUNKREQUEST']._serialized_start=583 + _globals['_LISTSIPTRUNKREQUEST']._serialized_end=604 + _globals['_LISTSIPTRUNKRESPONSE']._serialized_start=606 + _globals['_LISTSIPTRUNKRESPONSE']._serialized_end=666 + _globals['_DELETESIPTRUNKREQUEST']._serialized_start=668 + _globals['_DELETESIPTRUNKREQUEST']._serialized_end=713 + _globals['_SIPDISPATCHRULEDIRECT']._serialized_start=715 + _globals['_SIPDISPATCHRULEDIRECT']._serialized_end=770 + _globals['_SIPDISPATCHRULEINDIVIDUAL']._serialized_start=772 + _globals['_SIPDISPATCHRULEINDIVIDUAL']._serialized_end=833 + _globals['_SIPDISPATCHRULE']._serialized_start=836 + _globals['_SIPDISPATCHRULE']._serialized_end=997 + _globals['_CREATESIPDISPATCHRULEREQUEST']._serialized_start=999 + _globals['_CREATESIPDISPATCHRULEREQUEST']._serialized_end=1115 + _globals['_SIPDISPATCHRULEINFO']._serialized_start=1118 + _globals['_SIPDISPATCHRULEINFO']._serialized_end=1255 + _globals['_LISTSIPDISPATCHRULEREQUEST']._serialized_start=1257 + _globals['_LISTSIPDISPATCHRULEREQUEST']._serialized_end=1285 + _globals['_LISTSIPDISPATCHRULERESPONSE']._serialized_start=1287 + _globals['_LISTSIPDISPATCHRULERESPONSE']._serialized_end=1361 + _globals['_DELETESIPDISPATCHRULEREQUEST']._serialized_start=1363 + _globals['_DELETESIPDISPATCHRULEREQUEST']._serialized_end=1423 + _globals['_CREATESIPPARTICIPANTREQUEST']._serialized_start=1426 + _globals['_CREATESIPPARTICIPANTREQUEST']._serialized_end=1584 + _globals['_SIPPARTICIPANTINFO']._serialized_start=1586 + _globals['_SIPPARTICIPANTINFO']._serialized_end=1679 + _globals['_SIP']._serialized_start=1682 + _globals['_SIP']._serialized_end=2287 +# @@protoc_insertion_point(module_scope) diff --git a/livekit-protocol/livekit/protocol/sip.pyi b/livekit-protocol/livekit/protocol/sip.pyi new file mode 100644 index 00000000..d61c74ab --- /dev/null +++ b/livekit-protocol/livekit/protocol/sip.pyi @@ -0,0 +1,156 @@ +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CreateSIPTrunkRequest(_message.Message): + __slots__ = ["inbound_addresses", "outbound_address", "outbound_number", "inbound_numbers_regex", "inbound_numbers", "inbound_username", "inbound_password", "outbound_username", "outbound_password"] + INBOUND_ADDRESSES_FIELD_NUMBER: _ClassVar[int] + OUTBOUND_ADDRESS_FIELD_NUMBER: _ClassVar[int] + OUTBOUND_NUMBER_FIELD_NUMBER: _ClassVar[int] + INBOUND_NUMBERS_REGEX_FIELD_NUMBER: _ClassVar[int] + INBOUND_NUMBERS_FIELD_NUMBER: _ClassVar[int] + INBOUND_USERNAME_FIELD_NUMBER: _ClassVar[int] + INBOUND_PASSWORD_FIELD_NUMBER: _ClassVar[int] + OUTBOUND_USERNAME_FIELD_NUMBER: _ClassVar[int] + OUTBOUND_PASSWORD_FIELD_NUMBER: _ClassVar[int] + inbound_addresses: _containers.RepeatedScalarFieldContainer[str] + outbound_address: str + outbound_number: str + inbound_numbers_regex: _containers.RepeatedScalarFieldContainer[str] + inbound_numbers: _containers.RepeatedScalarFieldContainer[str] + inbound_username: str + inbound_password: str + outbound_username: str + outbound_password: str + def __init__(self, inbound_addresses: _Optional[_Iterable[str]] = ..., outbound_address: _Optional[str] = ..., outbound_number: _Optional[str] = ..., inbound_numbers_regex: _Optional[_Iterable[str]] = ..., inbound_numbers: _Optional[_Iterable[str]] = ..., inbound_username: _Optional[str] = ..., inbound_password: _Optional[str] = ..., outbound_username: _Optional[str] = ..., outbound_password: _Optional[str] = ...) -> None: ... + +class SIPTrunkInfo(_message.Message): + __slots__ = ["sip_trunk_id", "inbound_addresses", "outbound_address", "outbound_number", "inbound_numbers_regex", "inbound_numbers", "inbound_username", "inbound_password", "outbound_username", "outbound_password"] + SIP_TRUNK_ID_FIELD_NUMBER: _ClassVar[int] + INBOUND_ADDRESSES_FIELD_NUMBER: _ClassVar[int] + OUTBOUND_ADDRESS_FIELD_NUMBER: _ClassVar[int] + OUTBOUND_NUMBER_FIELD_NUMBER: _ClassVar[int] + INBOUND_NUMBERS_REGEX_FIELD_NUMBER: _ClassVar[int] + INBOUND_NUMBERS_FIELD_NUMBER: _ClassVar[int] + INBOUND_USERNAME_FIELD_NUMBER: _ClassVar[int] + INBOUND_PASSWORD_FIELD_NUMBER: _ClassVar[int] + OUTBOUND_USERNAME_FIELD_NUMBER: _ClassVar[int] + OUTBOUND_PASSWORD_FIELD_NUMBER: _ClassVar[int] + sip_trunk_id: str + inbound_addresses: _containers.RepeatedScalarFieldContainer[str] + outbound_address: str + outbound_number: str + inbound_numbers_regex: _containers.RepeatedScalarFieldContainer[str] + inbound_numbers: _containers.RepeatedScalarFieldContainer[str] + inbound_username: str + inbound_password: str + outbound_username: str + outbound_password: str + def __init__(self, sip_trunk_id: _Optional[str] = ..., inbound_addresses: _Optional[_Iterable[str]] = ..., outbound_address: _Optional[str] = ..., outbound_number: _Optional[str] = ..., inbound_numbers_regex: _Optional[_Iterable[str]] = ..., inbound_numbers: _Optional[_Iterable[str]] = ..., inbound_username: _Optional[str] = ..., inbound_password: _Optional[str] = ..., outbound_username: _Optional[str] = ..., outbound_password: _Optional[str] = ...) -> None: ... + +class ListSIPTrunkRequest(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class ListSIPTrunkResponse(_message.Message): + __slots__ = ["items"] + ITEMS_FIELD_NUMBER: _ClassVar[int] + items: _containers.RepeatedCompositeFieldContainer[SIPTrunkInfo] + def __init__(self, items: _Optional[_Iterable[_Union[SIPTrunkInfo, _Mapping]]] = ...) -> None: ... + +class DeleteSIPTrunkRequest(_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 SIPDispatchRuleDirect(_message.Message): + __slots__ = ["room_name", "pin"] + ROOM_NAME_FIELD_NUMBER: _ClassVar[int] + PIN_FIELD_NUMBER: _ClassVar[int] + room_name: str + pin: str + def __init__(self, room_name: _Optional[str] = ..., pin: _Optional[str] = ...) -> None: ... + +class SIPDispatchRuleIndividual(_message.Message): + __slots__ = ["room_prefix", "pin"] + ROOM_PREFIX_FIELD_NUMBER: _ClassVar[int] + PIN_FIELD_NUMBER: _ClassVar[int] + room_prefix: str + pin: str + def __init__(self, room_prefix: _Optional[str] = ..., pin: _Optional[str] = ...) -> None: ... + +class SIPDispatchRule(_message.Message): + __slots__ = ["dispatch_rule_direct", "dispatch_rule_individual"] + DISPATCH_RULE_DIRECT_FIELD_NUMBER: _ClassVar[int] + DISPATCH_RULE_INDIVIDUAL_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: ... + +class CreateSIPDispatchRuleRequest(_message.Message): + __slots__ = ["rule", "trunk_ids", "hide_phone_number"] + RULE_FIELD_NUMBER: _ClassVar[int] + TRUNK_IDS_FIELD_NUMBER: _ClassVar[int] + HIDE_PHONE_NUMBER_FIELD_NUMBER: _ClassVar[int] + rule: SIPDispatchRule + trunk_ids: _containers.RepeatedScalarFieldContainer[str] + hide_phone_number: bool + def __init__(self, rule: _Optional[_Union[SIPDispatchRule, _Mapping]] = ..., trunk_ids: _Optional[_Iterable[str]] = ..., hide_phone_number: bool = ...) -> None: ... + +class SIPDispatchRuleInfo(_message.Message): + __slots__ = ["sip_dispatch_rule_id", "rule", "trunk_ids", "hide_phone_number"] + SIP_DISPATCH_RULE_ID_FIELD_NUMBER: _ClassVar[int] + RULE_FIELD_NUMBER: _ClassVar[int] + TRUNK_IDS_FIELD_NUMBER: _ClassVar[int] + HIDE_PHONE_NUMBER_FIELD_NUMBER: _ClassVar[int] + sip_dispatch_rule_id: str + rule: SIPDispatchRule + trunk_ids: _containers.RepeatedScalarFieldContainer[str] + hide_phone_number: bool + def __init__(self, sip_dispatch_rule_id: _Optional[str] = ..., rule: _Optional[_Union[SIPDispatchRule, _Mapping]] = ..., trunk_ids: _Optional[_Iterable[str]] = ..., hide_phone_number: bool = ...) -> None: ... + +class ListSIPDispatchRuleRequest(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class ListSIPDispatchRuleResponse(_message.Message): + __slots__ = ["items"] + ITEMS_FIELD_NUMBER: _ClassVar[int] + items: _containers.RepeatedCompositeFieldContainer[SIPDispatchRuleInfo] + def __init__(self, items: _Optional[_Iterable[_Union[SIPDispatchRuleInfo, _Mapping]]] = ...) -> None: ... + +class DeleteSIPDispatchRuleRequest(_message.Message): + __slots__ = ["sip_dispatch_rule_id"] + SIP_DISPATCH_RULE_ID_FIELD_NUMBER: _ClassVar[int] + sip_dispatch_rule_id: str + def __init__(self, sip_dispatch_rule_id: _Optional[str] = ...) -> None: ... + +class CreateSIPParticipantRequest(_message.Message): + __slots__ = ["sip_trunk_id", "sip_call_to", "room_name", "participant_identity", "dtmf", "play_ringtone"] + SIP_TRUNK_ID_FIELD_NUMBER: _ClassVar[int] + SIP_CALL_TO_FIELD_NUMBER: _ClassVar[int] + ROOM_NAME_FIELD_NUMBER: _ClassVar[int] + PARTICIPANT_IDENTITY_FIELD_NUMBER: _ClassVar[int] + DTMF_FIELD_NUMBER: _ClassVar[int] + PLAY_RINGTONE_FIELD_NUMBER: _ClassVar[int] + sip_trunk_id: str + sip_call_to: str + room_name: str + participant_identity: str + dtmf: str + play_ringtone: bool + def __init__(self, sip_trunk_id: _Optional[str] = ..., sip_call_to: _Optional[str] = ..., room_name: _Optional[str] = ..., participant_identity: _Optional[str] = ..., dtmf: _Optional[str] = ..., play_ringtone: bool = ...) -> None: ... + +class SIPParticipantInfo(_message.Message): + __slots__ = ["participant_id", "participant_identity", "room_name"] + PARTICIPANT_ID_FIELD_NUMBER: _ClassVar[int] + PARTICIPANT_IDENTITY_FIELD_NUMBER: _ClassVar[int] + ROOM_NAME_FIELD_NUMBER: _ClassVar[int] + participant_id: str + participant_identity: str + room_name: str + def __init__(self, participant_id: _Optional[str] = ..., participant_identity: _Optional[str] = ..., room_name: _Optional[str] = ...) -> None: ... diff --git a/livekit-protocol/livekit/protocol/webhook.py b/livekit-protocol/livekit/protocol/webhook.py index 7c9f12c4..61b9e22b 100644 --- a/livekit-protocol/livekit/protocol/webhook.py +++ b/livekit-protocol/livekit/protocol/webhook.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: livekit_webhook.proto -# 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 @@ -23,8 +22,9 @@ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'webhook', _globals) 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' + + DESCRIPTOR._options = None + 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 # @@protoc_insertion_point(module_scope) diff --git a/livekit-protocol/livekit/protocol/webhook.pyi b/livekit-protocol/livekit/protocol/webhook.pyi index 443a24dc..4a538e78 100644 --- a/livekit-protocol/livekit/protocol/webhook.pyi +++ b/livekit-protocol/livekit/protocol/webhook.pyi @@ -8,7 +8,7 @@ from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Opti DESCRIPTOR: _descriptor.FileDescriptor class WebhookEvent(_message.Message): - __slots__ = ("event", "room", "participant", "egress_info", "ingress_info", "track", "id", "created_at", "num_dropped") + __slots__ = ["event", "room", "participant", "egress_info", "ingress_info", "track", "id", "created_at", "num_dropped"] EVENT_FIELD_NUMBER: _ClassVar[int] ROOM_FIELD_NUMBER: _ClassVar[int] PARTICIPANT_FIELD_NUMBER: _ClassVar[int] diff --git a/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py b/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py index 1cfad140..7a3e6261 100644 --- a/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: audio_frame.proto -# Protobuf Python Version: 4.25.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -21,8 +20,9 @@ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'audio_frame_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\rLiveKit.Proto' _globals['_AUDIOSTREAMTYPE']._serialized_start=2141 _globals['_AUDIOSTREAMTYPE']._serialized_end=2206 _globals['_AUDIOSOURCETYPE']._serialized_start=2208 diff --git a/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.pyi index a5097d6b..d25cc776 100644 --- a/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.pyi +++ b/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.pyi @@ -15,6 +15,7 @@ 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.internal.enum_type_wrapper @@ -61,7 +62,7 @@ class AudioSourceType(_AudioSourceType, metaclass=_AudioSourceTypeEnumTypeWrappe AUDIO_SOURCE_NATIVE: AudioSourceType.ValueType # 0 global___AudioSourceType = AudioSourceType -@typing_extensions.final +@typing.final class NewAudioStreamRequest(google.protobuf.message.Message): """Create a new AudioStream AudioStream is used to receive audio frames from a track @@ -79,11 +80,11 @@ class NewAudioStreamRequest(google.protobuf.message.Message): track_handle: builtins.int = ..., type: global___AudioStreamType.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["track_handle", b"track_handle", "type", b"type"]) -> None: ... + def ClearField(self, field_name: typing.Literal["track_handle", b"track_handle", "type", b"type"]) -> None: ... global___NewAudioStreamRequest = NewAudioStreamRequest -@typing_extensions.final +@typing.final class NewAudioStreamResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -95,12 +96,12 @@ class NewAudioStreamResponse(google.protobuf.message.Message): *, stream: global___OwnedAudioStream | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["stream", b"stream"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["stream", b"stream"]) -> None: ... + def HasField(self, field_name: typing.Literal["stream", b"stream"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["stream", b"stream"]) -> None: ... global___NewAudioStreamResponse = NewAudioStreamResponse -@typing_extensions.final +@typing.final class NewAudioSourceRequest(google.protobuf.message.Message): """Create a new AudioSource""" @@ -111,10 +112,10 @@ class NewAudioSourceRequest(google.protobuf.message.Message): SAMPLE_RATE_FIELD_NUMBER: builtins.int NUM_CHANNELS_FIELD_NUMBER: builtins.int type: global___AudioSourceType.ValueType - @property - def options(self) -> global___AudioSourceOptions: ... sample_rate: builtins.int num_channels: builtins.int + @property + def options(self) -> global___AudioSourceOptions: ... def __init__( self, *, @@ -123,13 +124,13 @@ class NewAudioSourceRequest(google.protobuf.message.Message): sample_rate: builtins.int = ..., num_channels: builtins.int = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_options", b"_options", "options", b"options"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_options", b"_options", "num_channels", b"num_channels", "options", b"options", "sample_rate", b"sample_rate", "type", b"type"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["_options", b"_options"]) -> typing_extensions.Literal["options"] | None: ... + def HasField(self, field_name: typing.Literal["_options", b"_options", "options", b"options"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_options", b"_options", "num_channels", b"num_channels", "options", b"options", "sample_rate", b"sample_rate", "type", b"type"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_options", b"_options"]) -> typing.Literal["options"] | None: ... global___NewAudioSourceRequest = NewAudioSourceRequest -@typing_extensions.final +@typing.final class NewAudioSourceResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -141,12 +142,12 @@ class NewAudioSourceResponse(google.protobuf.message.Message): *, source: global___OwnedAudioSource | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["source", b"source"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["source", b"source"]) -> None: ... + def HasField(self, field_name: typing.Literal["source", b"source"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["source", b"source"]) -> None: ... global___NewAudioSourceResponse = NewAudioSourceResponse -@typing_extensions.final +@typing.final class CaptureAudioFrameRequest(google.protobuf.message.Message): """Push a frame to an AudioSource The data provided must be available as long as the client receive the callback. @@ -165,12 +166,12 @@ class CaptureAudioFrameRequest(google.protobuf.message.Message): source_handle: builtins.int = ..., buffer: global___AudioFrameBufferInfo | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["buffer", b"buffer"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["buffer", b"buffer", "source_handle", b"source_handle"]) -> None: ... + def HasField(self, field_name: typing.Literal["buffer", b"buffer"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["buffer", b"buffer", "source_handle", b"source_handle"]) -> None: ... global___CaptureAudioFrameRequest = CaptureAudioFrameRequest -@typing_extensions.final +@typing.final class CaptureAudioFrameResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -181,11 +182,11 @@ class CaptureAudioFrameResponse(google.protobuf.message.Message): *, async_id: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... global___CaptureAudioFrameResponse = CaptureAudioFrameResponse -@typing_extensions.final +@typing.final class CaptureAudioFrameCallback(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -199,13 +200,13 @@ class CaptureAudioFrameCallback(google.protobuf.message.Message): async_id: builtins.int = ..., error: builtins.str | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_error", b"_error", "error", b"error"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_error", b"_error", "async_id", b"async_id", "error", b"error"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["_error", b"_error"]) -> typing_extensions.Literal["error"] | 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___CaptureAudioFrameCallback = CaptureAudioFrameCallback -@typing_extensions.final +@typing.final class NewAudioResamplerRequest(google.protobuf.message.Message): """Create a new AudioResampler""" @@ -217,7 +218,7 @@ class NewAudioResamplerRequest(google.protobuf.message.Message): global___NewAudioResamplerRequest = NewAudioResamplerRequest -@typing_extensions.final +@typing.final class NewAudioResamplerResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -229,12 +230,12 @@ class NewAudioResamplerResponse(google.protobuf.message.Message): *, resampler: global___OwnedAudioResampler | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["resampler", b"resampler"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["resampler", b"resampler"]) -> None: ... + def HasField(self, field_name: typing.Literal["resampler", b"resampler"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["resampler", b"resampler"]) -> None: ... global___NewAudioResamplerResponse = NewAudioResamplerResponse -@typing_extensions.final +@typing.final class RemixAndResampleRequest(google.protobuf.message.Message): """Remix and resample an audio frame""" @@ -245,10 +246,10 @@ class RemixAndResampleRequest(google.protobuf.message.Message): NUM_CHANNELS_FIELD_NUMBER: builtins.int SAMPLE_RATE_FIELD_NUMBER: builtins.int resampler_handle: builtins.int - @property - def buffer(self) -> global___AudioFrameBufferInfo: ... num_channels: builtins.int sample_rate: builtins.int + @property + def buffer(self) -> global___AudioFrameBufferInfo: ... def __init__( self, *, @@ -257,12 +258,12 @@ class RemixAndResampleRequest(google.protobuf.message.Message): num_channels: builtins.int = ..., sample_rate: builtins.int = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["buffer", b"buffer"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["buffer", b"buffer", "num_channels", b"num_channels", "resampler_handle", b"resampler_handle", "sample_rate", b"sample_rate"]) -> None: ... + def HasField(self, field_name: typing.Literal["buffer", b"buffer"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["buffer", b"buffer", "num_channels", b"num_channels", "resampler_handle", b"resampler_handle", "sample_rate", b"sample_rate"]) -> None: ... global___RemixAndResampleRequest = RemixAndResampleRequest -@typing_extensions.final +@typing.final class RemixAndResampleResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -274,12 +275,12 @@ class RemixAndResampleResponse(google.protobuf.message.Message): *, buffer: global___OwnedAudioFrameBuffer | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["buffer", b"buffer"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["buffer", b"buffer"]) -> None: ... + def HasField(self, field_name: typing.Literal["buffer", b"buffer"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["buffer", b"buffer"]) -> None: ... global___RemixAndResampleResponse = RemixAndResampleResponse -@typing_extensions.final +@typing.final class AudioFrameBufferInfo(google.protobuf.message.Message): """ AudioFrame buffer @@ -304,11 +305,11 @@ class AudioFrameBufferInfo(google.protobuf.message.Message): sample_rate: builtins.int = ..., samples_per_channel: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["data_ptr", b"data_ptr", "num_channels", b"num_channels", "sample_rate", b"sample_rate", "samples_per_channel", b"samples_per_channel"]) -> None: ... + def ClearField(self, field_name: typing.Literal["data_ptr", b"data_ptr", "num_channels", b"num_channels", "sample_rate", b"sample_rate", "samples_per_channel", b"samples_per_channel"]) -> None: ... global___AudioFrameBufferInfo = AudioFrameBufferInfo -@typing_extensions.final +@typing.final class OwnedAudioFrameBuffer(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -324,12 +325,12 @@ class OwnedAudioFrameBuffer(google.protobuf.message.Message): handle: handle_pb2.FfiOwnedHandle | None = ..., info: global___AudioFrameBufferInfo | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> None: ... + def HasField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> None: ... global___OwnedAudioFrameBuffer = OwnedAudioFrameBuffer -@typing_extensions.final +@typing.final class AudioStreamInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -340,11 +341,11 @@ class AudioStreamInfo(google.protobuf.message.Message): *, type: global___AudioStreamType.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["type", b"type"]) -> None: ... + def ClearField(self, field_name: typing.Literal["type", b"type"]) -> None: ... global___AudioStreamInfo = AudioStreamInfo -@typing_extensions.final +@typing.final class OwnedAudioStream(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -360,12 +361,12 @@ class OwnedAudioStream(google.protobuf.message.Message): handle: handle_pb2.FfiOwnedHandle | None = ..., info: global___AudioStreamInfo | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> None: ... + def HasField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> None: ... global___OwnedAudioStream = OwnedAudioStream -@typing_extensions.final +@typing.final class AudioStreamEvent(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -384,13 +385,13 @@ class AudioStreamEvent(google.protobuf.message.Message): frame_received: global___AudioFrameReceived | None = ..., eos: global___AudioStreamEOS | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["eos", b"eos", "frame_received", b"frame_received", "message", b"message"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["eos", b"eos", "frame_received", b"frame_received", "message", b"message", "stream_handle", b"stream_handle"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["message", b"message"]) -> typing_extensions.Literal["frame_received", "eos"] | None: ... + def HasField(self, field_name: typing.Literal["eos", b"eos", "frame_received", b"frame_received", "message", b"message"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["eos", b"eos", "frame_received", b"frame_received", "message", b"message", "stream_handle", b"stream_handle"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["message", b"message"]) -> typing.Literal["frame_received", "eos"] | None: ... global___AudioStreamEvent = AudioStreamEvent -@typing_extensions.final +@typing.final class AudioFrameReceived(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -402,12 +403,12 @@ class AudioFrameReceived(google.protobuf.message.Message): *, frame: global___OwnedAudioFrameBuffer | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["frame", b"frame"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["frame", b"frame"]) -> None: ... + def HasField(self, field_name: typing.Literal["frame", b"frame"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["frame", b"frame"]) -> None: ... global___AudioFrameReceived = AudioFrameReceived -@typing_extensions.final +@typing.final class AudioStreamEOS(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -417,7 +418,7 @@ class AudioStreamEOS(google.protobuf.message.Message): global___AudioStreamEOS = AudioStreamEOS -@typing_extensions.final +@typing.final class AudioSourceOptions(google.protobuf.message.Message): """ AudioSource @@ -438,11 +439,11 @@ class AudioSourceOptions(google.protobuf.message.Message): noise_suppression: builtins.bool = ..., auto_gain_control: builtins.bool = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["auto_gain_control", b"auto_gain_control", "echo_cancellation", b"echo_cancellation", "noise_suppression", b"noise_suppression"]) -> None: ... + def ClearField(self, field_name: typing.Literal["auto_gain_control", b"auto_gain_control", "echo_cancellation", b"echo_cancellation", "noise_suppression", b"noise_suppression"]) -> None: ... global___AudioSourceOptions = AudioSourceOptions -@typing_extensions.final +@typing.final class AudioSourceInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -453,11 +454,11 @@ class AudioSourceInfo(google.protobuf.message.Message): *, type: global___AudioSourceType.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["type", b"type"]) -> None: ... + def ClearField(self, field_name: typing.Literal["type", b"type"]) -> None: ... global___AudioSourceInfo = AudioSourceInfo -@typing_extensions.final +@typing.final class OwnedAudioSource(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -473,12 +474,12 @@ class OwnedAudioSource(google.protobuf.message.Message): handle: handle_pb2.FfiOwnedHandle | None = ..., info: global___AudioSourceInfo | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> None: ... + def HasField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> None: ... global___OwnedAudioSource = OwnedAudioSource -@typing_extensions.final +@typing.final class AudioResamplerInfo(google.protobuf.message.Message): """ AudioResampler @@ -492,7 +493,7 @@ class AudioResamplerInfo(google.protobuf.message.Message): global___AudioResamplerInfo = AudioResamplerInfo -@typing_extensions.final +@typing.final class OwnedAudioResampler(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -508,7 +509,7 @@ class OwnedAudioResampler(google.protobuf.message.Message): handle: handle_pb2.FfiOwnedHandle | None = ..., info: global___AudioResamplerInfo | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> None: ... + def HasField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> None: ... global___OwnedAudioResampler = OwnedAudioResampler diff --git a/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py b/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py index 18ed35f4..093b68ba 100644 --- a/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: e2ee.proto -# Protobuf Python Version: 4.25.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -20,8 +19,9 @@ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'e2ee_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\rLiveKit.Proto' _globals['_ENCRYPTIONTYPE']._serialized_start=2937 _globals['_ENCRYPTIONTYPE']._serialized_end=2984 _globals['_ENCRYPTIONSTATE']._serialized_start=2987 diff --git a/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.pyi index a34cf52d..cdba2c8f 100644 --- a/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.pyi +++ b/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.pyi @@ -15,6 +15,7 @@ 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 collections.abc import google.protobuf.descriptor @@ -74,7 +75,7 @@ KEY_RATCHETED: EncryptionState.ValueType # 5 INTERNAL_ERROR: EncryptionState.ValueType # 6 global___EncryptionState = EncryptionState -@typing_extensions.final +@typing.final class FrameCryptor(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -94,11 +95,11 @@ class FrameCryptor(google.protobuf.message.Message): key_index: builtins.int = ..., enabled: builtins.bool = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["enabled", b"enabled", "key_index", b"key_index", "participant_identity", b"participant_identity", "track_sid", b"track_sid"]) -> None: ... + def ClearField(self, field_name: typing.Literal["enabled", b"enabled", "key_index", b"key_index", "participant_identity", b"participant_identity", "track_sid", b"track_sid"]) -> None: ... global___FrameCryptor = FrameCryptor -@typing_extensions.final +@typing.final class KeyProviderOptions(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -120,13 +121,13 @@ class KeyProviderOptions(google.protobuf.message.Message): ratchet_salt: builtins.bytes = ..., failure_tolerance: builtins.int = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_shared_key", b"_shared_key", "shared_key", b"shared_key"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_shared_key", b"_shared_key", "failure_tolerance", b"failure_tolerance", "ratchet_salt", b"ratchet_salt", "ratchet_window_size", b"ratchet_window_size", "shared_key", b"shared_key"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["_shared_key", b"_shared_key"]) -> typing_extensions.Literal["shared_key"] | None: ... + def HasField(self, field_name: typing.Literal["_shared_key", b"_shared_key", "shared_key", b"shared_key"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_shared_key", b"_shared_key", "failure_tolerance", b"failure_tolerance", "ratchet_salt", b"ratchet_salt", "ratchet_window_size", b"ratchet_window_size", "shared_key", b"shared_key"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_shared_key", b"_shared_key"]) -> typing.Literal["shared_key"] | None: ... global___KeyProviderOptions = KeyProviderOptions -@typing_extensions.final +@typing.final class E2eeOptions(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -141,12 +142,12 @@ class E2eeOptions(google.protobuf.message.Message): encryption_type: global___EncryptionType.ValueType = ..., key_provider_options: global___KeyProviderOptions | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["key_provider_options", b"key_provider_options"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["encryption_type", b"encryption_type", "key_provider_options", b"key_provider_options"]) -> None: ... + def HasField(self, field_name: typing.Literal["key_provider_options", b"key_provider_options"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["encryption_type", b"encryption_type", "key_provider_options", b"key_provider_options"]) -> None: ... global___E2eeOptions = E2eeOptions -@typing_extensions.final +@typing.final class E2eeManagerSetEnabledRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -157,11 +158,11 @@ class E2eeManagerSetEnabledRequest(google.protobuf.message.Message): *, enabled: builtins.bool = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["enabled", b"enabled"]) -> None: ... + def ClearField(self, field_name: typing.Literal["enabled", b"enabled"]) -> None: ... global___E2eeManagerSetEnabledRequest = E2eeManagerSetEnabledRequest -@typing_extensions.final +@typing.final class E2eeManagerSetEnabledResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -171,7 +172,7 @@ class E2eeManagerSetEnabledResponse(google.protobuf.message.Message): global___E2eeManagerSetEnabledResponse = E2eeManagerSetEnabledResponse -@typing_extensions.final +@typing.final class E2eeManagerGetFrameCryptorsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -181,7 +182,7 @@ class E2eeManagerGetFrameCryptorsRequest(google.protobuf.message.Message): global___E2eeManagerGetFrameCryptorsRequest = E2eeManagerGetFrameCryptorsRequest -@typing_extensions.final +@typing.final class E2eeManagerGetFrameCryptorsResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -193,11 +194,11 @@ class E2eeManagerGetFrameCryptorsResponse(google.protobuf.message.Message): *, frame_cryptors: collections.abc.Iterable[global___FrameCryptor] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["frame_cryptors", b"frame_cryptors"]) -> None: ... + def ClearField(self, field_name: typing.Literal["frame_cryptors", b"frame_cryptors"]) -> None: ... global___E2eeManagerGetFrameCryptorsResponse = E2eeManagerGetFrameCryptorsResponse -@typing_extensions.final +@typing.final class FrameCryptorSetEnabledRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -214,11 +215,11 @@ class FrameCryptorSetEnabledRequest(google.protobuf.message.Message): track_sid: builtins.str = ..., enabled: builtins.bool = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["enabled", b"enabled", "participant_identity", b"participant_identity", "track_sid", b"track_sid"]) -> None: ... + def ClearField(self, field_name: typing.Literal["enabled", b"enabled", "participant_identity", b"participant_identity", "track_sid", b"track_sid"]) -> None: ... global___FrameCryptorSetEnabledRequest = FrameCryptorSetEnabledRequest -@typing_extensions.final +@typing.final class FrameCryptorSetEnabledResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -228,7 +229,7 @@ class FrameCryptorSetEnabledResponse(google.protobuf.message.Message): global___FrameCryptorSetEnabledResponse = FrameCryptorSetEnabledResponse -@typing_extensions.final +@typing.final class FrameCryptorSetKeyIndexRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -245,11 +246,11 @@ class FrameCryptorSetKeyIndexRequest(google.protobuf.message.Message): track_sid: builtins.str = ..., key_index: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["key_index", b"key_index", "participant_identity", b"participant_identity", "track_sid", b"track_sid"]) -> None: ... + def ClearField(self, field_name: typing.Literal["key_index", b"key_index", "participant_identity", b"participant_identity", "track_sid", b"track_sid"]) -> None: ... global___FrameCryptorSetKeyIndexRequest = FrameCryptorSetKeyIndexRequest -@typing_extensions.final +@typing.final class FrameCryptorSetKeyIndexResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -259,7 +260,7 @@ class FrameCryptorSetKeyIndexResponse(google.protobuf.message.Message): global___FrameCryptorSetKeyIndexResponse = FrameCryptorSetKeyIndexResponse -@typing_extensions.final +@typing.final class SetSharedKeyRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -273,11 +274,11 @@ class SetSharedKeyRequest(google.protobuf.message.Message): shared_key: builtins.bytes = ..., key_index: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["key_index", b"key_index", "shared_key", b"shared_key"]) -> None: ... + def ClearField(self, field_name: typing.Literal["key_index", b"key_index", "shared_key", b"shared_key"]) -> None: ... global___SetSharedKeyRequest = SetSharedKeyRequest -@typing_extensions.final +@typing.final class SetSharedKeyResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -287,7 +288,7 @@ class SetSharedKeyResponse(google.protobuf.message.Message): global___SetSharedKeyResponse = SetSharedKeyResponse -@typing_extensions.final +@typing.final class RatchetSharedKeyRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -298,11 +299,11 @@ class RatchetSharedKeyRequest(google.protobuf.message.Message): *, key_index: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["key_index", b"key_index"]) -> None: ... + def ClearField(self, field_name: typing.Literal["key_index", b"key_index"]) -> None: ... global___RatchetSharedKeyRequest = RatchetSharedKeyRequest -@typing_extensions.final +@typing.final class RatchetSharedKeyResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -313,13 +314,13 @@ class RatchetSharedKeyResponse(google.protobuf.message.Message): *, new_key: builtins.bytes | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_new_key", b"_new_key", "new_key", b"new_key"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_new_key", b"_new_key", "new_key", b"new_key"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["_new_key", b"_new_key"]) -> typing_extensions.Literal["new_key"] | None: ... + def HasField(self, field_name: typing.Literal["_new_key", b"_new_key", "new_key", b"new_key"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_new_key", b"_new_key", "new_key", b"new_key"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_new_key", b"_new_key"]) -> typing.Literal["new_key"] | None: ... global___RatchetSharedKeyResponse = RatchetSharedKeyResponse -@typing_extensions.final +@typing.final class GetSharedKeyRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -330,11 +331,11 @@ class GetSharedKeyRequest(google.protobuf.message.Message): *, key_index: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["key_index", b"key_index"]) -> None: ... + def ClearField(self, field_name: typing.Literal["key_index", b"key_index"]) -> None: ... global___GetSharedKeyRequest = GetSharedKeyRequest -@typing_extensions.final +@typing.final class GetSharedKeyResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -345,13 +346,13 @@ class GetSharedKeyResponse(google.protobuf.message.Message): *, key: builtins.bytes | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_key", b"_key", "key", b"key"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_key", b"_key", "key", b"key"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["_key", b"_key"]) -> typing_extensions.Literal["key"] | None: ... + def HasField(self, field_name: typing.Literal["_key", b"_key", "key", b"key"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_key", b"_key", "key", b"key"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_key", b"_key"]) -> typing.Literal["key"] | None: ... global___GetSharedKeyResponse = GetSharedKeyResponse -@typing_extensions.final +@typing.final class SetKeyRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -368,11 +369,11 @@ class SetKeyRequest(google.protobuf.message.Message): key: builtins.bytes = ..., key_index: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "key_index", b"key_index", "participant_identity", b"participant_identity"]) -> None: ... + def ClearField(self, field_name: typing.Literal["key", b"key", "key_index", b"key_index", "participant_identity", b"participant_identity"]) -> None: ... global___SetKeyRequest = SetKeyRequest -@typing_extensions.final +@typing.final class SetKeyResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -382,7 +383,7 @@ class SetKeyResponse(google.protobuf.message.Message): global___SetKeyResponse = SetKeyResponse -@typing_extensions.final +@typing.final class RatchetKeyRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -396,11 +397,11 @@ class RatchetKeyRequest(google.protobuf.message.Message): participant_identity: builtins.str = ..., key_index: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["key_index", b"key_index", "participant_identity", b"participant_identity"]) -> None: ... + def ClearField(self, field_name: typing.Literal["key_index", b"key_index", "participant_identity", b"participant_identity"]) -> None: ... global___RatchetKeyRequest = RatchetKeyRequest -@typing_extensions.final +@typing.final class RatchetKeyResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -411,13 +412,13 @@ class RatchetKeyResponse(google.protobuf.message.Message): *, new_key: builtins.bytes | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_new_key", b"_new_key", "new_key", b"new_key"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_new_key", b"_new_key", "new_key", b"new_key"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["_new_key", b"_new_key"]) -> typing_extensions.Literal["new_key"] | None: ... + def HasField(self, field_name: typing.Literal["_new_key", b"_new_key", "new_key", b"new_key"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_new_key", b"_new_key", "new_key", b"new_key"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_new_key", b"_new_key"]) -> typing.Literal["new_key"] | None: ... global___RatchetKeyResponse = RatchetKeyResponse -@typing_extensions.final +@typing.final class GetKeyRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -431,11 +432,11 @@ class GetKeyRequest(google.protobuf.message.Message): participant_identity: builtins.str = ..., key_index: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["key_index", b"key_index", "participant_identity", b"participant_identity"]) -> None: ... + def ClearField(self, field_name: typing.Literal["key_index", b"key_index", "participant_identity", b"participant_identity"]) -> None: ... global___GetKeyRequest = GetKeyRequest -@typing_extensions.final +@typing.final class GetKeyResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -446,13 +447,13 @@ class GetKeyResponse(google.protobuf.message.Message): *, key: builtins.bytes | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_key", b"_key", "key", b"key"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_key", b"_key", "key", b"key"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["_key", b"_key"]) -> typing_extensions.Literal["key"] | None: ... + def HasField(self, field_name: typing.Literal["_key", b"_key", "key", b"key"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_key", b"_key", "key", b"key"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_key", b"_key"]) -> typing.Literal["key"] | None: ... global___GetKeyResponse = GetKeyResponse -@typing_extensions.final +@typing.final class E2eeRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -503,13 +504,13 @@ class E2eeRequest(google.protobuf.message.Message): ratchet_key: global___RatchetKeyRequest | None = ..., get_key: global___GetKeyRequest | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["cryptor_set_enabled", b"cryptor_set_enabled", "cryptor_set_key_index", b"cryptor_set_key_index", "get_key", b"get_key", "get_shared_key", b"get_shared_key", "manager_get_frame_cryptors", b"manager_get_frame_cryptors", "manager_set_enabled", b"manager_set_enabled", "message", b"message", "ratchet_key", b"ratchet_key", "ratchet_shared_key", b"ratchet_shared_key", "set_key", b"set_key", "set_shared_key", b"set_shared_key"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["cryptor_set_enabled", b"cryptor_set_enabled", "cryptor_set_key_index", b"cryptor_set_key_index", "get_key", b"get_key", "get_shared_key", b"get_shared_key", "manager_get_frame_cryptors", b"manager_get_frame_cryptors", "manager_set_enabled", b"manager_set_enabled", "message", b"message", "ratchet_key", b"ratchet_key", "ratchet_shared_key", b"ratchet_shared_key", "room_handle", b"room_handle", "set_key", b"set_key", "set_shared_key", b"set_shared_key"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["message", b"message"]) -> typing_extensions.Literal["manager_set_enabled", "manager_get_frame_cryptors", "cryptor_set_enabled", "cryptor_set_key_index", "set_shared_key", "ratchet_shared_key", "get_shared_key", "set_key", "ratchet_key", "get_key"] | None: ... + def HasField(self, field_name: typing.Literal["cryptor_set_enabled", b"cryptor_set_enabled", "cryptor_set_key_index", b"cryptor_set_key_index", "get_key", b"get_key", "get_shared_key", b"get_shared_key", "manager_get_frame_cryptors", b"manager_get_frame_cryptors", "manager_set_enabled", b"manager_set_enabled", "message", b"message", "ratchet_key", b"ratchet_key", "ratchet_shared_key", b"ratchet_shared_key", "set_key", b"set_key", "set_shared_key", b"set_shared_key"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["cryptor_set_enabled", b"cryptor_set_enabled", "cryptor_set_key_index", b"cryptor_set_key_index", "get_key", b"get_key", "get_shared_key", b"get_shared_key", "manager_get_frame_cryptors", b"manager_get_frame_cryptors", "manager_set_enabled", b"manager_set_enabled", "message", b"message", "ratchet_key", b"ratchet_key", "ratchet_shared_key", b"ratchet_shared_key", "room_handle", b"room_handle", "set_key", b"set_key", "set_shared_key", b"set_shared_key"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["message", b"message"]) -> typing.Literal["manager_set_enabled", "manager_get_frame_cryptors", "cryptor_set_enabled", "cryptor_set_key_index", "set_shared_key", "ratchet_shared_key", "get_shared_key", "set_key", "ratchet_key", "get_key"] | None: ... global___E2eeRequest = E2eeRequest -@typing_extensions.final +@typing.final class E2eeResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -557,8 +558,8 @@ class E2eeResponse(google.protobuf.message.Message): ratchet_key: global___RatchetKeyResponse | None = ..., get_key: global___GetKeyResponse | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["cryptor_set_enabled", b"cryptor_set_enabled", "cryptor_set_key_index", b"cryptor_set_key_index", "get_key", b"get_key", "get_shared_key", b"get_shared_key", "manager_get_frame_cryptors", b"manager_get_frame_cryptors", "manager_set_enabled", b"manager_set_enabled", "message", b"message", "ratchet_key", b"ratchet_key", "ratchet_shared_key", b"ratchet_shared_key", "set_key", b"set_key", "set_shared_key", b"set_shared_key"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["cryptor_set_enabled", b"cryptor_set_enabled", "cryptor_set_key_index", b"cryptor_set_key_index", "get_key", b"get_key", "get_shared_key", b"get_shared_key", "manager_get_frame_cryptors", b"manager_get_frame_cryptors", "manager_set_enabled", b"manager_set_enabled", "message", b"message", "ratchet_key", b"ratchet_key", "ratchet_shared_key", b"ratchet_shared_key", "set_key", b"set_key", "set_shared_key", b"set_shared_key"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["message", b"message"]) -> typing_extensions.Literal["manager_set_enabled", "manager_get_frame_cryptors", "cryptor_set_enabled", "cryptor_set_key_index", "set_shared_key", "ratchet_shared_key", "get_shared_key", "set_key", "ratchet_key", "get_key"] | None: ... + def HasField(self, field_name: typing.Literal["cryptor_set_enabled", b"cryptor_set_enabled", "cryptor_set_key_index", b"cryptor_set_key_index", "get_key", b"get_key", "get_shared_key", b"get_shared_key", "manager_get_frame_cryptors", b"manager_get_frame_cryptors", "manager_set_enabled", b"manager_set_enabled", "message", b"message", "ratchet_key", b"ratchet_key", "ratchet_shared_key", b"ratchet_shared_key", "set_key", b"set_key", "set_shared_key", b"set_shared_key"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["cryptor_set_enabled", b"cryptor_set_enabled", "cryptor_set_key_index", b"cryptor_set_key_index", "get_key", b"get_key", "get_shared_key", b"get_shared_key", "manager_get_frame_cryptors", b"manager_get_frame_cryptors", "manager_set_enabled", b"manager_set_enabled", "message", b"message", "ratchet_key", b"ratchet_key", "ratchet_shared_key", b"ratchet_shared_key", "set_key", b"set_key", "set_shared_key", b"set_shared_key"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["message", b"message"]) -> typing.Literal["manager_set_enabled", "manager_get_frame_cryptors", "cryptor_set_enabled", "cryptor_set_key_index", "set_shared_key", "ratchet_shared_key", "get_shared_key", "set_key", "ratchet_key", "get_key"] | None: ... global___E2eeResponse = E2eeResponse diff --git a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py index d7fa774f..d8430fec 100644 --- a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: ffi.proto -# Protobuf Python Version: 4.25.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -25,8 +24,9 @@ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ffi_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\rLiveKit.Proto' _globals['_LOGLEVEL']._serialized_start=4515 _globals['_LOGLEVEL']._serialized_end=4598 _globals['_FFIREQUEST']._serialized_start=104 diff --git a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi index 4936bc71..cc33e82c 100644 --- a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi +++ b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi @@ -15,6 +15,7 @@ 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 . import audio_frame_pb2 import builtins import collections.abc @@ -57,7 +58,7 @@ LOG_DEBUG: LogLevel.ValueType # 3 LOG_TRACE: LogLevel.ValueType # 4 global___LogLevel = LogLevel -@typing_extensions.final +@typing.final class FfiRequest(google.protobuf.message.Message): """**How is the livekit-ffi working: We refer as the ffi server the Rust server that is running the LiveKit client implementation, and we @@ -119,6 +120,7 @@ class FfiRequest(google.protobuf.message.Message): @property def connect(self) -> room_pb2.ConnectRequest: """Room""" + @property def disconnect(self) -> room_pb2.DisconnectRequest: ... @property @@ -138,6 +140,7 @@ class FfiRequest(google.protobuf.message.Message): @property def create_video_track(self) -> track_pb2.CreateVideoTrackRequest: """Track""" + @property def create_audio_track(self) -> track_pb2.CreateAudioTrackRequest: ... @property @@ -145,6 +148,7 @@ class FfiRequest(google.protobuf.message.Message): @property def new_video_stream(self) -> video_frame_pb2.NewVideoStreamRequest: """Video""" + @property def new_video_source(self) -> video_frame_pb2.NewVideoSourceRequest: ... @property @@ -154,6 +158,7 @@ class FfiRequest(google.protobuf.message.Message): @property def new_audio_stream(self) -> audio_frame_pb2.NewAudioStreamRequest: """Audio""" + @property def new_audio_source(self) -> audio_frame_pb2.NewAudioSourceRequest: ... @property @@ -191,13 +196,13 @@ class FfiRequest(google.protobuf.message.Message): remix_and_resample: audio_frame_pb2.RemixAndResampleRequest | None = ..., e2ee: e2ee_pb2.E2eeRequest | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["capture_audio_frame", b"capture_audio_frame", "capture_video_frame", b"capture_video_frame", "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", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "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_video_source", b"new_video_source", "new_video_stream", b"new_video_stream", "publish_data", b"publish_data", "publish_track", b"publish_track", "remix_and_resample", b"remix_and_resample", "set_subscribed", b"set_subscribed", "unpublish_track", b"unpublish_track", "update_local_metadata", b"update_local_metadata", "update_local_name", b"update_local_name", "video_convert", b"video_convert"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["capture_audio_frame", b"capture_audio_frame", "capture_video_frame", b"capture_video_frame", "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", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "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_video_source", b"new_video_source", "new_video_stream", b"new_video_stream", "publish_data", b"publish_data", "publish_track", b"publish_track", "remix_and_resample", b"remix_and_resample", "set_subscribed", b"set_subscribed", "unpublish_track", b"unpublish_track", "update_local_metadata", b"update_local_metadata", "update_local_name", b"update_local_name", "video_convert", b"video_convert"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["message", b"message"]) -> typing_extensions.Literal["dispose", "connect", "disconnect", "publish_track", "unpublish_track", "publish_data", "set_subscribed", "update_local_metadata", "update_local_name", "get_session_stats", "create_video_track", "create_audio_track", "get_stats", "new_video_stream", "new_video_source", "capture_video_frame", "video_convert", "new_audio_stream", "new_audio_source", "capture_audio_frame", "new_audio_resampler", "remix_and_resample", "e2ee"] | None: ... + def HasField(self, field_name: typing.Literal["capture_audio_frame", b"capture_audio_frame", "capture_video_frame", b"capture_video_frame", "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", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "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_video_source", b"new_video_source", "new_video_stream", b"new_video_stream", "publish_data", b"publish_data", "publish_track", b"publish_track", "remix_and_resample", b"remix_and_resample", "set_subscribed", b"set_subscribed", "unpublish_track", b"unpublish_track", "update_local_metadata", b"update_local_metadata", "update_local_name", b"update_local_name", "video_convert", b"video_convert"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["capture_audio_frame", b"capture_audio_frame", "capture_video_frame", b"capture_video_frame", "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", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "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_video_source", b"new_video_source", "new_video_stream", b"new_video_stream", "publish_data", b"publish_data", "publish_track", b"publish_track", "remix_and_resample", b"remix_and_resample", "set_subscribed", b"set_subscribed", "unpublish_track", b"unpublish_track", "update_local_metadata", b"update_local_metadata", "update_local_name", b"update_local_name", "video_convert", b"video_convert"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["message", b"message"]) -> typing.Literal["dispose", "connect", "disconnect", "publish_track", "unpublish_track", "publish_data", "set_subscribed", "update_local_metadata", "update_local_name", "get_session_stats", "create_video_track", "create_audio_track", "get_stats", "new_video_stream", "new_video_source", "capture_video_frame", "video_convert", "new_audio_stream", "new_audio_source", "capture_audio_frame", "new_audio_resampler", "remix_and_resample", "e2ee"] | None: ... global___FfiRequest = FfiRequest -@typing_extensions.final +@typing.final class FfiResponse(google.protobuf.message.Message): """This is the output of livekit_ffi_request function.""" @@ -231,6 +236,7 @@ class FfiResponse(google.protobuf.message.Message): @property def connect(self) -> room_pb2.ConnectResponse: """Room""" + @property def disconnect(self) -> room_pb2.DisconnectResponse: ... @property @@ -250,6 +256,7 @@ class FfiResponse(google.protobuf.message.Message): @property def create_video_track(self) -> track_pb2.CreateVideoTrackResponse: """Track""" + @property def create_audio_track(self) -> track_pb2.CreateAudioTrackResponse: ... @property @@ -257,6 +264,7 @@ class FfiResponse(google.protobuf.message.Message): @property def new_video_stream(self) -> video_frame_pb2.NewVideoStreamResponse: """Video""" + @property def new_video_source(self) -> video_frame_pb2.NewVideoSourceResponse: ... @property @@ -266,6 +274,7 @@ class FfiResponse(google.protobuf.message.Message): @property def new_audio_stream(self) -> audio_frame_pb2.NewAudioStreamResponse: """Audio""" + @property def new_audio_source(self) -> audio_frame_pb2.NewAudioSourceResponse: ... @property @@ -303,13 +312,13 @@ class FfiResponse(google.protobuf.message.Message): remix_and_resample: audio_frame_pb2.RemixAndResampleResponse | None = ..., e2ee: e2ee_pb2.E2eeResponse | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["capture_audio_frame", b"capture_audio_frame", "capture_video_frame", b"capture_video_frame", "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", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "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_video_source", b"new_video_source", "new_video_stream", b"new_video_stream", "publish_data", b"publish_data", "publish_track", b"publish_track", "remix_and_resample", b"remix_and_resample", "set_subscribed", b"set_subscribed", "unpublish_track", b"unpublish_track", "update_local_metadata", b"update_local_metadata", "update_local_name", b"update_local_name", "video_convert", b"video_convert"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["capture_audio_frame", b"capture_audio_frame", "capture_video_frame", b"capture_video_frame", "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", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "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_video_source", b"new_video_source", "new_video_stream", b"new_video_stream", "publish_data", b"publish_data", "publish_track", b"publish_track", "remix_and_resample", b"remix_and_resample", "set_subscribed", b"set_subscribed", "unpublish_track", b"unpublish_track", "update_local_metadata", b"update_local_metadata", "update_local_name", b"update_local_name", "video_convert", b"video_convert"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["message", b"message"]) -> typing_extensions.Literal["dispose", "connect", "disconnect", "publish_track", "unpublish_track", "publish_data", "set_subscribed", "update_local_metadata", "update_local_name", "get_session_stats", "create_video_track", "create_audio_track", "get_stats", "new_video_stream", "new_video_source", "capture_video_frame", "video_convert", "new_audio_stream", "new_audio_source", "capture_audio_frame", "new_audio_resampler", "remix_and_resample", "e2ee"] | None: ... + def HasField(self, field_name: typing.Literal["capture_audio_frame", b"capture_audio_frame", "capture_video_frame", b"capture_video_frame", "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", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "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_video_source", b"new_video_source", "new_video_stream", b"new_video_stream", "publish_data", b"publish_data", "publish_track", b"publish_track", "remix_and_resample", b"remix_and_resample", "set_subscribed", b"set_subscribed", "unpublish_track", b"unpublish_track", "update_local_metadata", b"update_local_metadata", "update_local_name", b"update_local_name", "video_convert", b"video_convert"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["capture_audio_frame", b"capture_audio_frame", "capture_video_frame", b"capture_video_frame", "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", "get_session_stats", b"get_session_stats", "get_stats", b"get_stats", "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_video_source", b"new_video_source", "new_video_stream", b"new_video_stream", "publish_data", b"publish_data", "publish_track", b"publish_track", "remix_and_resample", b"remix_and_resample", "set_subscribed", b"set_subscribed", "unpublish_track", b"unpublish_track", "update_local_metadata", b"update_local_metadata", "update_local_name", b"update_local_name", "video_convert", b"video_convert"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["message", b"message"]) -> typing.Literal["dispose", "connect", "disconnect", "publish_track", "unpublish_track", "publish_data", "set_subscribed", "update_local_metadata", "update_local_name", "get_session_stats", "create_video_track", "create_audio_track", "get_stats", "new_video_stream", "new_video_source", "capture_video_frame", "video_convert", "new_audio_stream", "new_audio_source", "capture_audio_frame", "new_audio_resampler", "remix_and_resample", "e2ee"] | None: ... global___FfiResponse = FfiResponse -@typing_extensions.final +@typing.final class FfiEvent(google.protobuf.message.Message): """To minimize complexity, participant events are not included in the protocol. It is easily deducible from the room events and it turned out that is is easier to implement @@ -390,13 +399,13 @@ class FfiEvent(google.protobuf.message.Message): get_session_stats: room_pb2.GetSessionStatsCallback | None = ..., panic: global___Panic | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.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_track", b"publish_track", "room_event", b"room_event", "track_event", b"track_event", "unpublish_track", b"unpublish_track", "update_local_metadata", b"update_local_metadata", "update_local_name", b"update_local_name", "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", "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_track", b"publish_track", "room_event", b"room_event", "track_event", b"track_event", "unpublish_track", b"unpublish_track", "update_local_metadata", b"update_local_metadata", "update_local_name", b"update_local_name", "video_stream_event", b"video_stream_event"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["message", b"message"]) -> typing_extensions.Literal["room_event", "track_event", "video_stream_event", "audio_stream_event", "connect", "disconnect", "dispose", "publish_track", "unpublish_track", "publish_data", "capture_audio_frame", "update_local_metadata", "update_local_name", "get_stats", "logs", "get_session_stats", "panic"] | 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_track", b"publish_track", "room_event", b"room_event", "track_event", b"track_event", "unpublish_track", b"unpublish_track", "update_local_metadata", b"update_local_metadata", "update_local_name", b"update_local_name", "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_track", b"publish_track", "room_event", b"room_event", "track_event", b"track_event", "unpublish_track", b"unpublish_track", "update_local_metadata", b"update_local_metadata", "update_local_name", b"update_local_name", "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", "capture_audio_frame", "update_local_metadata", "update_local_name", "get_stats", "logs", "get_session_stats", "panic"] | None: ... global___FfiEvent = FfiEvent -@typing_extensions.final +@typing.final class DisposeRequest(google.protobuf.message.Message): """Stop all rooms synchronously (Do we need async here?). e.g: This is used for the Unity Editor after each assemblies reload. @@ -409,11 +418,11 @@ class DisposeRequest(google.protobuf.message.Message): def __init__( self, ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["async", b"async"]) -> None: ... + def ClearField(self, field_name: typing.Literal["async", b"async"]) -> None: ... global___DisposeRequest = DisposeRequest -@typing_extensions.final +@typing.final class DisposeResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -425,13 +434,13 @@ class DisposeResponse(google.protobuf.message.Message): *, async_id: builtins.int | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_async_id", b"_async_id", "async_id", b"async_id"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_async_id", b"_async_id", "async_id", b"async_id"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["_async_id", b"_async_id"]) -> typing_extensions.Literal["async_id"] | None: ... + def HasField(self, field_name: typing.Literal["_async_id", b"_async_id", "async_id", b"async_id"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_async_id", b"_async_id", "async_id", b"async_id"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_async_id", b"_async_id"]) -> typing.Literal["async_id"] | None: ... global___DisposeResponse = DisposeResponse -@typing_extensions.final +@typing.final class DisposeCallback(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -442,11 +451,11 @@ class DisposeCallback(google.protobuf.message.Message): *, async_id: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... global___DisposeCallback = DisposeCallback -@typing_extensions.final +@typing.final class LogRecord(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -473,18 +482,18 @@ class LogRecord(google.protobuf.message.Message): line: builtins.int | None = ..., message: builtins.str = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_file", b"_file", "_line", b"_line", "_module_path", b"_module_path", "file", b"file", "line", b"line", "module_path", b"module_path"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_file", b"_file", "_line", b"_line", "_module_path", b"_module_path", "file", b"file", "level", b"level", "line", b"line", "message", b"message", "module_path", b"module_path", "target", b"target"]) -> None: ... + def HasField(self, field_name: typing.Literal["_file", b"_file", "_line", b"_line", "_module_path", b"_module_path", "file", b"file", "line", b"line", "module_path", b"module_path"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_file", b"_file", "_line", b"_line", "_module_path", b"_module_path", "file", b"file", "level", b"level", "line", b"line", "message", b"message", "module_path", b"module_path", "target", b"target"]) -> None: ... @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_file", b"_file"]) -> typing_extensions.Literal["file"] | None: ... + def WhichOneof(self, oneof_group: typing.Literal["_file", b"_file"]) -> typing.Literal["file"] | None: ... @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_line", b"_line"]) -> typing_extensions.Literal["line"] | None: ... + def WhichOneof(self, oneof_group: typing.Literal["_line", b"_line"]) -> typing.Literal["line"] | None: ... @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_module_path", b"_module_path"]) -> typing_extensions.Literal["module_path"] | None: ... + def WhichOneof(self, oneof_group: typing.Literal["_module_path", b"_module_path"]) -> typing.Literal["module_path"] | None: ... global___LogRecord = LogRecord -@typing_extensions.final +@typing.final class LogBatch(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -496,11 +505,11 @@ class LogBatch(google.protobuf.message.Message): *, records: collections.abc.Iterable[global___LogRecord] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["records", b"records"]) -> None: ... + def ClearField(self, field_name: typing.Literal["records", b"records"]) -> None: ... global___LogBatch = LogBatch -@typing_extensions.final +@typing.final class Panic(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -511,6 +520,6 @@ class Panic(google.protobuf.message.Message): *, message: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["message", b"message"]) -> None: ... + def ClearField(self, field_name: typing.Literal["message", b"message"]) -> None: ... global___Panic = Panic diff --git a/livekit-rtc/livekit/rtc/_proto/handle_pb2.py b/livekit-rtc/livekit/rtc/_proto/handle_pb2.py index 280ad670..c6b9f84c 100644 --- a/livekit-rtc/livekit/rtc/_proto/handle_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/handle_pb2.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: handle.proto -# Protobuf Python Version: 4.25.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -20,8 +19,9 @@ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'handle_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\rLiveKit.Proto' _globals['_FFIOWNEDHANDLE']._serialized_start=31 _globals['_FFIOWNEDHANDLE']._serialized_end=59 # @@protoc_insertion_point(module_scope) diff --git a/livekit-rtc/livekit/rtc/_proto/handle_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/handle_pb2.pyi index 5b525ca9..26236d5d 100644 --- a/livekit-rtc/livekit/rtc/_proto/handle_pb2.pyi +++ b/livekit-rtc/livekit/rtc/_proto/handle_pb2.pyi @@ -15,19 +15,15 @@ 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 sys - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions +import typing DESCRIPTOR: google.protobuf.descriptor.FileDescriptor -@typing_extensions.final +@typing.final class FfiOwnedHandle(google.protobuf.message.Message): """# Safety The foreign language is responsable for disposing handles @@ -49,6 +45,6 @@ class FfiOwnedHandle(google.protobuf.message.Message): *, id: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["id", b"id"]) -> None: ... + def ClearField(self, field_name: typing.Literal["id", b"id"]) -> None: ... global___FfiOwnedHandle = FfiOwnedHandle diff --git a/livekit-rtc/livekit/rtc/_proto/participant_pb2.py b/livekit-rtc/livekit/rtc/_proto/participant_pb2.py index 64730995..bb3a6af1 100644 --- a/livekit-rtc/livekit/rtc/_proto/participant_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/participant_pb2.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: participant.proto -# Protobuf Python Version: 4.25.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -21,8 +20,9 @@ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'participant_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\rLiveKit.Proto' _globals['_PARTICIPANTINFO']._serialized_start=50 _globals['_PARTICIPANTINFO']._serialized_end=130 _globals['_OWNEDPARTICIPANT']._serialized_start=132 diff --git a/livekit-rtc/livekit/rtc/_proto/participant_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/participant_pb2.pyi index 0b30d59e..364d0070 100644 --- a/livekit-rtc/livekit/rtc/_proto/participant_pb2.pyi +++ b/livekit-rtc/livekit/rtc/_proto/participant_pb2.pyi @@ -15,20 +15,16 @@ 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 from . import handle_pb2 -import sys - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions +import typing DESCRIPTOR: google.protobuf.descriptor.FileDescriptor -@typing_extensions.final +@typing.final class ParticipantInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -48,11 +44,11 @@ class ParticipantInfo(google.protobuf.message.Message): identity: builtins.str = ..., metadata: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["identity", b"identity", "metadata", b"metadata", "name", b"name", "sid", b"sid"]) -> None: ... + def ClearField(self, field_name: typing.Literal["identity", b"identity", "metadata", b"metadata", "name", b"name", "sid", b"sid"]) -> None: ... global___ParticipantInfo = ParticipantInfo -@typing_extensions.final +@typing.final class OwnedParticipant(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -68,7 +64,7 @@ class OwnedParticipant(google.protobuf.message.Message): handle: handle_pb2.FfiOwnedHandle | None = ..., info: global___ParticipantInfo | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> None: ... + def HasField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> None: ... global___OwnedParticipant = OwnedParticipant diff --git a/livekit-rtc/livekit/rtc/_proto/room_pb2.py b/livekit-rtc/livekit/rtc/_proto/room_pb2.py index 67eeefb2..57630868 100644 --- a/livekit-rtc/livekit/rtc/_proto/room_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/room_pb2.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: room.proto -# Protobuf Python Version: 4.25.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -20,24 +19,29 @@ from . import stats_pb2 as stats__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\nroom.proto\x12\rlivekit.proto\x1a\ne2ee.proto\x1a\x0chandle.proto\x1a\x11participant.proto\x1a\x0btrack.proto\x1a\x11video_frame.proto\x1a\x0bstats.proto\"Y\n\x0e\x43onnectRequest\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t\x12+\n\x07options\x18\x03 \x01(\x0b\x32\x1a.livekit.proto.RoomOptions\"#\n\x0f\x43onnectResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"\xfd\x02\n\x0f\x43onnectCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\x12\x12\n\x05\x65rror\x18\x02 \x01(\tH\x00\x88\x01\x01\x12&\n\x04room\x18\x03 \x01(\x0b\x32\x18.livekit.proto.OwnedRoom\x12:\n\x11local_participant\x18\x04 \x01(\x0b\x32\x1f.livekit.proto.OwnedParticipant\x12J\n\x0cparticipants\x18\x05 \x03(\x0b\x32\x34.livekit.proto.ConnectCallback.ParticipantWithTracks\x1a\x89\x01\n\x15ParticipantWithTracks\x12\x34\n\x0bparticipant\x18\x01 \x01(\x0b\x32\x1f.livekit.proto.OwnedParticipant\x12:\n\x0cpublications\x18\x02 \x03(\x0b\x32$.livekit.proto.OwnedTrackPublicationB\x08\n\x06_error\"(\n\x11\x44isconnectRequest\x12\x13\n\x0broom_handle\x18\x01 \x01(\x04\"&\n\x12\x44isconnectResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"&\n\x12\x44isconnectCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"\x82\x01\n\x13PublishTrackRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x14\n\x0ctrack_handle\x18\x02 \x01(\x04\x12\x33\n\x07options\x18\x03 \x01(\x0b\x32\".livekit.proto.TrackPublishOptions\"(\n\x14PublishTrackResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"\x81\x01\n\x14PublishTrackCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\x12\x12\n\x05\x65rror\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x39\n\x0bpublication\x18\x03 \x01(\x0b\x32$.livekit.proto.OwnedTrackPublicationB\x08\n\x06_error\"g\n\x15UnpublishTrackRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x11\n\ttrack_sid\x18\x02 \x01(\t\x12\x19\n\x11stop_on_unpublish\x18\x03 \x01(\x08\"*\n\x16UnpublishTrackResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"H\n\x16UnpublishTrackCallback\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\"\xbf\x01\n\x12PublishDataRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x10\n\x08\x64\x61ta_ptr\x18\x02 \x01(\x04\x12\x10\n\x08\x64\x61ta_len\x18\x03 \x01(\x04\x12+\n\x04kind\x18\x04 \x01(\x0e\x32\x1d.livekit.proto.DataPacketKind\x12\x18\n\x10\x64\x65stination_sids\x18\x05 \x03(\t\x12\x12\n\x05topic\x18\x06 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_topic\"\'\n\x13PublishDataResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"E\n\x13PublishDataCallback\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\"P\n\x1aUpdateLocalMetadataRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x10\n\x08metadata\x18\x02 \x01(\t\"/\n\x1bUpdateLocalMetadataResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"/\n\x1bUpdateLocalMetadataCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"H\n\x16UpdateLocalNameRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x0c\n\x04name\x18\x02 \x01(\t\"+\n\x17UpdateLocalNameResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"+\n\x17UpdateLocalNameCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"E\n\x14SetSubscribedRequest\x12\x11\n\tsubscribe\x18\x01 \x01(\x08\x12\x1a\n\x12publication_handle\x18\x02 \x01(\x04\"\x17\n\x15SetSubscribedResponse\"-\n\x16GetSessionStatsRequest\x12\x13\n\x0broom_handle\x18\x01 \x01(\x04\"+\n\x17GetSessionStatsResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"\xae\x01\n\x17GetSessionStatsCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\x12\x12\n\x05\x65rror\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x30\n\x0fpublisher_stats\x18\x03 \x03(\x0b\x32\x17.livekit.proto.RtcStats\x12\x31\n\x10subscriber_stats\x18\x04 \x03(\x0b\x32\x17.livekit.proto.RtcStatsB\x08\n\x06_error\";\n\rVideoEncoding\x12\x13\n\x0bmax_bitrate\x18\x01 \x01(\x04\x12\x15\n\rmax_framerate\x18\x02 \x01(\x01\"$\n\rAudioEncoding\x12\x13\n\x0bmax_bitrate\x18\x01 \x01(\x04\"\x8a\x02\n\x13TrackPublishOptions\x12\x34\n\x0evideo_encoding\x18\x01 \x01(\x0b\x32\x1c.livekit.proto.VideoEncoding\x12\x34\n\x0e\x61udio_encoding\x18\x02 \x01(\x0b\x32\x1c.livekit.proto.AudioEncoding\x12.\n\x0bvideo_codec\x18\x03 \x01(\x0e\x32\x19.livekit.proto.VideoCodec\x12\x0b\n\x03\x64tx\x18\x04 \x01(\x08\x12\x0b\n\x03red\x18\x05 \x01(\x08\x12\x11\n\tsimulcast\x18\x06 \x01(\x08\x12*\n\x06source\x18\x07 \x01(\x0e\x32\x1a.livekit.proto.TrackSource\"=\n\tIceServer\x12\x0c\n\x04urls\x18\x01 \x03(\t\x12\x10\n\x08username\x18\x02 \x01(\t\x12\x10\n\x08password\x18\x03 \x01(\t\"\x84\x02\n\tRtcConfig\x12@\n\x12ice_transport_type\x18\x01 \x01(\x0e\x32\x1f.livekit.proto.IceTransportTypeH\x00\x88\x01\x01\x12P\n\x1a\x63ontinual_gathering_policy\x18\x02 \x01(\x0e\x32\'.livekit.proto.ContinualGatheringPolicyH\x01\x88\x01\x01\x12-\n\x0bice_servers\x18\x03 \x03(\x0b\x32\x18.livekit.proto.IceServerB\x15\n\x13_ice_transport_typeB\x1d\n\x1b_continual_gathering_policy\"\xe0\x01\n\x0bRoomOptions\x12\x16\n\x0e\x61uto_subscribe\x18\x01 \x01(\x08\x12\x17\n\x0f\x61\x64\x61ptive_stream\x18\x02 \x01(\x08\x12\x10\n\x08\x64ynacast\x18\x03 \x01(\x08\x12-\n\x04\x65\x32\x65\x65\x18\x04 \x01(\x0b\x32\x1a.livekit.proto.E2eeOptionsH\x00\x88\x01\x01\x12\x31\n\nrtc_config\x18\x05 \x01(\x0b\x32\x18.livekit.proto.RtcConfigH\x01\x88\x01\x01\x12\x14\n\x0cjoin_retries\x18\x06 \x01(\rB\x07\n\x05_e2eeB\r\n\x0b_rtc_config\"0\n\nBufferInfo\x12\x10\n\x08\x64\x61ta_ptr\x18\x01 \x01(\x04\x12\x10\n\x08\x64\x61ta_len\x18\x02 \x01(\x04\"e\n\x0bOwnedBuffer\x12-\n\x06handle\x18\x01 \x01(\x0b\x32\x1d.livekit.proto.FfiOwnedHandle\x12\'\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x19.livekit.proto.BufferInfo\"\xf3\x0b\n\tRoomEvent\x12\x13\n\x0broom_handle\x18\x01 \x01(\x04\x12\x44\n\x15participant_connected\x18\x02 \x01(\x0b\x32#.livekit.proto.ParticipantConnectedH\x00\x12J\n\x18participant_disconnected\x18\x03 \x01(\x0b\x32&.livekit.proto.ParticipantDisconnectedH\x00\x12\x43\n\x15local_track_published\x18\x04 \x01(\x0b\x32\".livekit.proto.LocalTrackPublishedH\x00\x12G\n\x17local_track_unpublished\x18\x05 \x01(\x0b\x32$.livekit.proto.LocalTrackUnpublishedH\x00\x12\x38\n\x0ftrack_published\x18\x06 \x01(\x0b\x32\x1d.livekit.proto.TrackPublishedH\x00\x12<\n\x11track_unpublished\x18\x07 \x01(\x0b\x32\x1f.livekit.proto.TrackUnpublishedH\x00\x12:\n\x10track_subscribed\x18\x08 \x01(\x0b\x32\x1e.livekit.proto.TrackSubscribedH\x00\x12>\n\x12track_unsubscribed\x18\t \x01(\x0b\x32 .livekit.proto.TrackUnsubscribedH\x00\x12K\n\x19track_subscription_failed\x18\n \x01(\x0b\x32&.livekit.proto.TrackSubscriptionFailedH\x00\x12\x30\n\x0btrack_muted\x18\x0b \x01(\x0b\x32\x19.livekit.proto.TrackMutedH\x00\x12\x34\n\rtrack_unmuted\x18\x0c \x01(\x0b\x32\x1b.livekit.proto.TrackUnmutedH\x00\x12G\n\x17\x61\x63tive_speakers_changed\x18\r \x01(\x0b\x32$.livekit.proto.ActiveSpeakersChangedH\x00\x12\x43\n\x15room_metadata_changed\x18\x0e \x01(\x0b\x32\".livekit.proto.RoomMetadataChangedH\x00\x12Q\n\x1cparticipant_metadata_changed\x18\x0f \x01(\x0b\x32).livekit.proto.ParticipantMetadataChangedH\x00\x12I\n\x18participant_name_changed\x18\x10 \x01(\x0b\x32%.livekit.proto.ParticipantNameChangedH\x00\x12M\n\x1a\x63onnection_quality_changed\x18\x11 \x01(\x0b\x32\'.livekit.proto.ConnectionQualityChangedH\x00\x12\x34\n\rdata_received\x18\x12 \x01(\x0b\x32\x1b.livekit.proto.DataReceivedH\x00\x12I\n\x18\x63onnection_state_changed\x18\x13 \x01(\x0b\x32%.livekit.proto.ConnectionStateChangedH\x00\x12\x33\n\x0c\x64isconnected\x18\x15 \x01(\x0b\x32\x1b.livekit.proto.DisconnectedH\x00\x12\x33\n\x0creconnecting\x18\x16 \x01(\x0b\x32\x1b.livekit.proto.ReconnectingH\x00\x12\x31\n\x0breconnected\x18\x17 \x01(\x0b\x32\x1a.livekit.proto.ReconnectedH\x00\x12=\n\x12\x65\x32\x65\x65_state_changed\x18\x18 \x01(\x0b\x32\x1f.livekit.proto.E2eeStateChangedH\x00\x12%\n\x03\x65os\x18\x19 \x01(\x0b\x32\x16.livekit.proto.RoomEOSH\x00\x42\t\n\x07message\"7\n\x08RoomInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08metadata\x18\x03 \x01(\t\"a\n\tOwnedRoom\x12-\n\x06handle\x18\x01 \x01(\x0b\x32\x1d.livekit.proto.FfiOwnedHandle\x12%\n\x04info\x18\x02 \x01(\x0b\x32\x17.livekit.proto.RoomInfo\"E\n\x14ParticipantConnected\x12-\n\x04info\x18\x01 \x01(\x0b\x32\x1f.livekit.proto.OwnedParticipant\"2\n\x17ParticipantDisconnected\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\"(\n\x13LocalTrackPublished\x12\x11\n\ttrack_sid\x18\x01 \x01(\t\"0\n\x15LocalTrackUnpublished\x12\x17\n\x0fpublication_sid\x18\x01 \x01(\t\"d\n\x0eTrackPublished\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x39\n\x0bpublication\x18\x02 \x01(\x0b\x32$.livekit.proto.OwnedTrackPublication\"D\n\x10TrackUnpublished\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x17\n\x0fpublication_sid\x18\x02 \x01(\t\"T\n\x0fTrackSubscribed\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12(\n\x05track\x18\x02 \x01(\x0b\x32\x19.livekit.proto.OwnedTrack\"?\n\x11TrackUnsubscribed\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x11\n\ttrack_sid\x18\x02 \x01(\t\"T\n\x17TrackSubscriptionFailed\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x11\n\ttrack_sid\x18\x02 \x01(\t\x12\r\n\x05\x65rror\x18\x03 \x01(\t\"8\n\nTrackMuted\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x11\n\ttrack_sid\x18\x02 \x01(\t\":\n\x0cTrackUnmuted\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x11\n\ttrack_sid\x18\x02 \x01(\t\"Z\n\x10\x45\x32\x65\x65StateChanged\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12-\n\x05state\x18\x02 \x01(\x0e\x32\x1e.livekit.proto.EncryptionState\"1\n\x15\x41\x63tiveSpeakersChanged\x12\x18\n\x10participant_sids\x18\x01 \x03(\t\"\'\n\x13RoomMetadataChanged\x12\x10\n\x08metadata\x18\x01 \x01(\t\"G\n\x1aParticipantMetadataChanged\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x10\n\x08metadata\x18\x02 \x01(\t\"?\n\x16ParticipantNameChanged\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"f\n\x18\x43onnectionQualityChanged\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x31\n\x07quality\x18\x02 \x01(\x0e\x32 .livekit.proto.ConnectionQuality\"\xb5\x01\n\x0c\x44\x61taReceived\x12(\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x1a.livekit.proto.OwnedBuffer\x12\x1c\n\x0fparticipant_sid\x18\x02 \x01(\tH\x00\x88\x01\x01\x12+\n\x04kind\x18\x03 \x01(\x0e\x32\x1d.livekit.proto.DataPacketKind\x12\x12\n\x05topic\x18\x04 \x01(\tH\x01\x88\x01\x01\x42\x12\n\x10_participant_sidB\x08\n\x06_topic\"G\n\x16\x43onnectionStateChanged\x12-\n\x05state\x18\x01 \x01(\x0e\x32\x1e.livekit.proto.ConnectionState\"\x0b\n\tConnected\"\x0e\n\x0c\x44isconnected\"\x0e\n\x0cReconnecting\"\r\n\x0bReconnected\"\t\n\x07RoomEOS*P\n\x10IceTransportType\x12\x13\n\x0fTRANSPORT_RELAY\x10\x00\x12\x14\n\x10TRANSPORT_NOHOST\x10\x01\x12\x11\n\rTRANSPORT_ALL\x10\x02*C\n\x18\x43ontinualGatheringPolicy\x12\x0f\n\x0bGATHER_ONCE\x10\x00\x12\x16\n\x12GATHER_CONTINUALLY\x10\x01*`\n\x11\x43onnectionQuality\x12\x10\n\x0cQUALITY_POOR\x10\x00\x12\x10\n\x0cQUALITY_GOOD\x10\x01\x12\x15\n\x11QUALITY_EXCELLENT\x10\x02\x12\x10\n\x0cQUALITY_LOST\x10\x03*S\n\x0f\x43onnectionState\x12\x15\n\x11\x43ONN_DISCONNECTED\x10\x00\x12\x12\n\x0e\x43ONN_CONNECTED\x10\x01\x12\x15\n\x11\x43ONN_RECONNECTING\x10\x02*3\n\x0e\x44\x61taPacketKind\x12\x0e\n\nKIND_LOSSY\x10\x00\x12\x11\n\rKIND_RELIABLE\x10\x01\x42\x10\xaa\x02\rLiveKit.Protob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\nroom.proto\x12\rlivekit.proto\x1a\ne2ee.proto\x1a\x0chandle.proto\x1a\x11participant.proto\x1a\x0btrack.proto\x1a\x11video_frame.proto\x1a\x0bstats.proto\"Y\n\x0e\x43onnectRequest\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t\x12+\n\x07options\x18\x03 \x01(\x0b\x32\x1a.livekit.proto.RoomOptions\"#\n\x0f\x43onnectResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"\xfd\x02\n\x0f\x43onnectCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\x12\x12\n\x05\x65rror\x18\x02 \x01(\tH\x00\x88\x01\x01\x12&\n\x04room\x18\x03 \x01(\x0b\x32\x18.livekit.proto.OwnedRoom\x12:\n\x11local_participant\x18\x04 \x01(\x0b\x32\x1f.livekit.proto.OwnedParticipant\x12J\n\x0cparticipants\x18\x05 \x03(\x0b\x32\x34.livekit.proto.ConnectCallback.ParticipantWithTracks\x1a\x89\x01\n\x15ParticipantWithTracks\x12\x34\n\x0bparticipant\x18\x01 \x01(\x0b\x32\x1f.livekit.proto.OwnedParticipant\x12:\n\x0cpublications\x18\x02 \x03(\x0b\x32$.livekit.proto.OwnedTrackPublicationB\x08\n\x06_error\"(\n\x11\x44isconnectRequest\x12\x13\n\x0broom_handle\x18\x01 \x01(\x04\"&\n\x12\x44isconnectResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"&\n\x12\x44isconnectCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"\x82\x01\n\x13PublishTrackRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x14\n\x0ctrack_handle\x18\x02 \x01(\x04\x12\x33\n\x07options\x18\x03 \x01(\x0b\x32\".livekit.proto.TrackPublishOptions\"(\n\x14PublishTrackResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"\x81\x01\n\x14PublishTrackCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\x12\x12\n\x05\x65rror\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x39\n\x0bpublication\x18\x03 \x01(\x0b\x32$.livekit.proto.OwnedTrackPublicationB\x08\n\x06_error\"g\n\x15UnpublishTrackRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x11\n\ttrack_sid\x18\x02 \x01(\t\x12\x19\n\x11stop_on_unpublish\x18\x03 \x01(\x08\"*\n\x16UnpublishTrackResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"H\n\x16UnpublishTrackCallback\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\"\xbf\x01\n\x12PublishDataRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x10\n\x08\x64\x61ta_ptr\x18\x02 \x01(\x04\x12\x10\n\x08\x64\x61ta_len\x18\x03 \x01(\x04\x12+\n\x04kind\x18\x04 \x01(\x0e\x32\x1d.livekit.proto.DataPacketKind\x12\x18\n\x10\x64\x65stination_sids\x18\x05 \x03(\t\x12\x12\n\x05topic\x18\x06 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_topic\"\'\n\x13PublishDataResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"E\n\x13PublishDataCallback\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\"P\n\x1aUpdateLocalMetadataRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x10\n\x08metadata\x18\x02 \x01(\t\"/\n\x1bUpdateLocalMetadataResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"/\n\x1bUpdateLocalMetadataCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"H\n\x16UpdateLocalNameRequest\x12 \n\x18local_participant_handle\x18\x01 \x01(\x04\x12\x0c\n\x04name\x18\x02 \x01(\t\"+\n\x17UpdateLocalNameResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"+\n\x17UpdateLocalNameCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"E\n\x14SetSubscribedRequest\x12\x11\n\tsubscribe\x18\x01 \x01(\x08\x12\x1a\n\x12publication_handle\x18\x02 \x01(\x04\"\x17\n\x15SetSubscribedResponse\"-\n\x16GetSessionStatsRequest\x12\x13\n\x0broom_handle\x18\x01 \x01(\x04\"+\n\x17GetSessionStatsResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"\xae\x01\n\x17GetSessionStatsCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\x12\x12\n\x05\x65rror\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x30\n\x0fpublisher_stats\x18\x03 \x03(\x0b\x32\x17.livekit.proto.RtcStats\x12\x31\n\x10subscriber_stats\x18\x04 \x03(\x0b\x32\x17.livekit.proto.RtcStatsB\x08\n\x06_error\";\n\rVideoEncoding\x12\x13\n\x0bmax_bitrate\x18\x01 \x01(\x04\x12\x15\n\rmax_framerate\x18\x02 \x01(\x01\"$\n\rAudioEncoding\x12\x13\n\x0bmax_bitrate\x18\x01 \x01(\x04\"\x8a\x02\n\x13TrackPublishOptions\x12\x34\n\x0evideo_encoding\x18\x01 \x01(\x0b\x32\x1c.livekit.proto.VideoEncoding\x12\x34\n\x0e\x61udio_encoding\x18\x02 \x01(\x0b\x32\x1c.livekit.proto.AudioEncoding\x12.\n\x0bvideo_codec\x18\x03 \x01(\x0e\x32\x19.livekit.proto.VideoCodec\x12\x0b\n\x03\x64tx\x18\x04 \x01(\x08\x12\x0b\n\x03red\x18\x05 \x01(\x08\x12\x11\n\tsimulcast\x18\x06 \x01(\x08\x12*\n\x06source\x18\x07 \x01(\x0e\x32\x1a.livekit.proto.TrackSource\"=\n\tIceServer\x12\x0c\n\x04urls\x18\x01 \x03(\t\x12\x10\n\x08username\x18\x02 \x01(\t\x12\x10\n\x08password\x18\x03 \x01(\t\"\x84\x02\n\tRtcConfig\x12@\n\x12ice_transport_type\x18\x01 \x01(\x0e\x32\x1f.livekit.proto.IceTransportTypeH\x00\x88\x01\x01\x12P\n\x1a\x63ontinual_gathering_policy\x18\x02 \x01(\x0e\x32\'.livekit.proto.ContinualGatheringPolicyH\x01\x88\x01\x01\x12-\n\x0bice_servers\x18\x03 \x03(\x0b\x32\x18.livekit.proto.IceServerB\x15\n\x13_ice_transport_typeB\x1d\n\x1b_continual_gathering_policy\"\xe0\x01\n\x0bRoomOptions\x12\x16\n\x0e\x61uto_subscribe\x18\x01 \x01(\x08\x12\x17\n\x0f\x61\x64\x61ptive_stream\x18\x02 \x01(\x08\x12\x10\n\x08\x64ynacast\x18\x03 \x01(\x08\x12-\n\x04\x65\x32\x65\x65\x18\x04 \x01(\x0b\x32\x1a.livekit.proto.E2eeOptionsH\x00\x88\x01\x01\x12\x31\n\nrtc_config\x18\x05 \x01(\x0b\x32\x18.livekit.proto.RtcConfigH\x01\x88\x01\x01\x12\x14\n\x0cjoin_retries\x18\x06 \x01(\rB\x07\n\x05_e2eeB\r\n\x0b_rtc_config\"0\n\nBufferInfo\x12\x10\n\x08\x64\x61ta_ptr\x18\x01 \x01(\x04\x12\x10\n\x08\x64\x61ta_len\x18\x02 \x01(\x04\"e\n\x0bOwnedBuffer\x12-\n\x06handle\x18\x01 \x01(\x0b\x32\x1d.livekit.proto.FfiOwnedHandle\x12\'\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x19.livekit.proto.BufferInfo\"\xba\x0c\n\tRoomEvent\x12\x13\n\x0broom_handle\x18\x01 \x01(\x04\x12\x44\n\x15participant_connected\x18\x02 \x01(\x0b\x32#.livekit.proto.ParticipantConnectedH\x00\x12J\n\x18participant_disconnected\x18\x03 \x01(\x0b\x32&.livekit.proto.ParticipantDisconnectedH\x00\x12\x43\n\x15local_track_published\x18\x04 \x01(\x0b\x32\".livekit.proto.LocalTrackPublishedH\x00\x12G\n\x17local_track_unpublished\x18\x05 \x01(\x0b\x32$.livekit.proto.LocalTrackUnpublishedH\x00\x12\x38\n\x0ftrack_published\x18\x06 \x01(\x0b\x32\x1d.livekit.proto.TrackPublishedH\x00\x12<\n\x11track_unpublished\x18\x07 \x01(\x0b\x32\x1f.livekit.proto.TrackUnpublishedH\x00\x12:\n\x10track_subscribed\x18\x08 \x01(\x0b\x32\x1e.livekit.proto.TrackSubscribedH\x00\x12>\n\x12track_unsubscribed\x18\t \x01(\x0b\x32 .livekit.proto.TrackUnsubscribedH\x00\x12K\n\x19track_subscription_failed\x18\n \x01(\x0b\x32&.livekit.proto.TrackSubscriptionFailedH\x00\x12\x30\n\x0btrack_muted\x18\x0b \x01(\x0b\x32\x19.livekit.proto.TrackMutedH\x00\x12\x34\n\rtrack_unmuted\x18\x0c \x01(\x0b\x32\x1b.livekit.proto.TrackUnmutedH\x00\x12G\n\x17\x61\x63tive_speakers_changed\x18\r \x01(\x0b\x32$.livekit.proto.ActiveSpeakersChangedH\x00\x12\x43\n\x15room_metadata_changed\x18\x0e \x01(\x0b\x32\".livekit.proto.RoomMetadataChangedH\x00\x12Q\n\x1cparticipant_metadata_changed\x18\x0f \x01(\x0b\x32).livekit.proto.ParticipantMetadataChangedH\x00\x12I\n\x18participant_name_changed\x18\x10 \x01(\x0b\x32%.livekit.proto.ParticipantNameChangedH\x00\x12M\n\x1a\x63onnection_quality_changed\x18\x11 \x01(\x0b\x32\'.livekit.proto.ConnectionQualityChangedH\x00\x12\x38\n\rdata_received\x18\x12 \x01(\x0b\x32\x1b.livekit.proto.DataReceivedB\x02\x18\x01H\x00\x12I\n\x18\x63onnection_state_changed\x18\x13 \x01(\x0b\x32%.livekit.proto.ConnectionStateChangedH\x00\x12\x33\n\x0c\x64isconnected\x18\x15 \x01(\x0b\x32\x1b.livekit.proto.DisconnectedH\x00\x12\x33\n\x0creconnecting\x18\x16 \x01(\x0b\x32\x1b.livekit.proto.ReconnectingH\x00\x12\x31\n\x0breconnected\x18\x17 \x01(\x0b\x32\x1a.livekit.proto.ReconnectedH\x00\x12=\n\x12\x65\x32\x65\x65_state_changed\x18\x18 \x01(\x0b\x32\x1f.livekit.proto.E2eeStateChangedH\x00\x12%\n\x03\x65os\x18\x19 \x01(\x0b\x32\x16.livekit.proto.RoomEOSH\x00\x12\x41\n\x14\x64\x61ta_packet_received\x18\x1a \x01(\x0b\x32!.livekit.proto.DataPacketReceivedH\x00\x42\t\n\x07message\"7\n\x08RoomInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08metadata\x18\x03 \x01(\t\"a\n\tOwnedRoom\x12-\n\x06handle\x18\x01 \x01(\x0b\x32\x1d.livekit.proto.FfiOwnedHandle\x12%\n\x04info\x18\x02 \x01(\x0b\x32\x17.livekit.proto.RoomInfo\"E\n\x14ParticipantConnected\x12-\n\x04info\x18\x01 \x01(\x0b\x32\x1f.livekit.proto.OwnedParticipant\"2\n\x17ParticipantDisconnected\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\"(\n\x13LocalTrackPublished\x12\x11\n\ttrack_sid\x18\x01 \x01(\t\"0\n\x15LocalTrackUnpublished\x12\x17\n\x0fpublication_sid\x18\x01 \x01(\t\"d\n\x0eTrackPublished\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x39\n\x0bpublication\x18\x02 \x01(\x0b\x32$.livekit.proto.OwnedTrackPublication\"D\n\x10TrackUnpublished\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x17\n\x0fpublication_sid\x18\x02 \x01(\t\"T\n\x0fTrackSubscribed\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12(\n\x05track\x18\x02 \x01(\x0b\x32\x19.livekit.proto.OwnedTrack\"?\n\x11TrackUnsubscribed\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x11\n\ttrack_sid\x18\x02 \x01(\t\"T\n\x17TrackSubscriptionFailed\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x11\n\ttrack_sid\x18\x02 \x01(\t\x12\r\n\x05\x65rror\x18\x03 \x01(\t\"8\n\nTrackMuted\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x11\n\ttrack_sid\x18\x02 \x01(\t\":\n\x0cTrackUnmuted\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x11\n\ttrack_sid\x18\x02 \x01(\t\"Z\n\x10\x45\x32\x65\x65StateChanged\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12-\n\x05state\x18\x02 \x01(\x0e\x32\x1e.livekit.proto.EncryptionState\"1\n\x15\x41\x63tiveSpeakersChanged\x12\x18\n\x10participant_sids\x18\x01 \x03(\t\"\'\n\x13RoomMetadataChanged\x12\x10\n\x08metadata\x18\x01 \x01(\t\"G\n\x1aParticipantMetadataChanged\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x10\n\x08metadata\x18\x02 \x01(\t\"?\n\x16ParticipantNameChanged\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"f\n\x18\x43onnectionQualityChanged\x12\x17\n\x0fparticipant_sid\x18\x01 \x01(\t\x12\x31\n\x07quality\x18\x02 \x01(\x0e\x32 .livekit.proto.ConnectionQuality\"\x0e\n\x0c\x44\x61taReceived\"T\n\nUserPacket\x12(\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x1a.livekit.proto.OwnedBuffer\x12\x12\n\x05topic\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_topic\"5\n\x07SipDTMF\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x12\n\x05\x64igit\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_digit\"\xf5\x01\n\x12\x44\x61taPacketReceived\x12+\n\x04kind\x18\x01 \x01(\x0e\x32\x1d.livekit.proto.DataPacketKind\x12\x1c\n\x14participant_identity\x18\x02 \x01(\t\x12 \n\x0fparticipant_sid\x18\x03 \x01(\tB\x02\x18\x01H\x01\x88\x01\x01\x12)\n\x04user\x18\x04 \x01(\x0b\x32\x19.livekit.proto.UserPacketH\x00\x12*\n\x08sip_dtmf\x18\x05 \x01(\x0b\x32\x16.livekit.proto.SipDTMFH\x00\x42\x07\n\x05valueB\x12\n\x10_participant_sid\"G\n\x16\x43onnectionStateChanged\x12-\n\x05state\x18\x01 \x01(\x0e\x32\x1e.livekit.proto.ConnectionState\"\x0b\n\tConnected\"\x0e\n\x0c\x44isconnected\"\x0e\n\x0cReconnecting\"\r\n\x0bReconnected\"\t\n\x07RoomEOS*P\n\x10IceTransportType\x12\x13\n\x0fTRANSPORT_RELAY\x10\x00\x12\x14\n\x10TRANSPORT_NOHOST\x10\x01\x12\x11\n\rTRANSPORT_ALL\x10\x02*C\n\x18\x43ontinualGatheringPolicy\x12\x0f\n\x0bGATHER_ONCE\x10\x00\x12\x16\n\x12GATHER_CONTINUALLY\x10\x01*`\n\x11\x43onnectionQuality\x12\x10\n\x0cQUALITY_POOR\x10\x00\x12\x10\n\x0cQUALITY_GOOD\x10\x01\x12\x15\n\x11QUALITY_EXCELLENT\x10\x02\x12\x10\n\x0cQUALITY_LOST\x10\x03*S\n\x0f\x43onnectionState\x12\x15\n\x11\x43ONN_DISCONNECTED\x10\x00\x12\x12\n\x0e\x43ONN_CONNECTED\x10\x01\x12\x15\n\x11\x43ONN_RECONNECTING\x10\x02*3\n\x0e\x44\x61taPacketKind\x12\x0e\n\nKIND_LOSSY\x10\x00\x12\x11\n\rKIND_RELIABLE\x10\x01\x42\x10\xaa\x02\rLiveKit.Protob\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'room_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' - _globals['_ICETRANSPORTTYPE']._serialized_start=6550 - _globals['_ICETRANSPORTTYPE']._serialized_end=6630 - _globals['_CONTINUALGATHERINGPOLICY']._serialized_start=6632 - _globals['_CONTINUALGATHERINGPOLICY']._serialized_end=6699 - _globals['_CONNECTIONQUALITY']._serialized_start=6701 - _globals['_CONNECTIONQUALITY']._serialized_end=6797 - _globals['_CONNECTIONSTATE']._serialized_start=6799 - _globals['_CONNECTIONSTATE']._serialized_end=6882 - _globals['_DATAPACKETKIND']._serialized_start=6884 - _globals['_DATAPACKETKIND']._serialized_end=6935 + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\rLiveKit.Proto' + _ROOMEVENT.fields_by_name['data_received']._options = None + _ROOMEVENT.fields_by_name['data_received']._serialized_options = b'\030\001' + _DATAPACKETRECEIVED.fields_by_name['participant_sid']._options = None + _DATAPACKETRECEIVED.fields_by_name['participant_sid']._serialized_options = b'\030\001' + _globals['_ICETRANSPORTTYPE']._serialized_start=6842 + _globals['_ICETRANSPORTTYPE']._serialized_end=6922 + _globals['_CONTINUALGATHERINGPOLICY']._serialized_start=6924 + _globals['_CONTINUALGATHERINGPOLICY']._serialized_end=6991 + _globals['_CONNECTIONQUALITY']._serialized_start=6993 + _globals['_CONNECTIONQUALITY']._serialized_end=7089 + _globals['_CONNECTIONSTATE']._serialized_start=7091 + _globals['_CONNECTIONSTATE']._serialized_end=7174 + _globals['_DATAPACKETKIND']._serialized_start=7176 + _globals['_DATAPACKETKIND']._serialized_end=7227 _globals['_CONNECTREQUEST']._serialized_start=119 _globals['_CONNECTREQUEST']._serialized_end=208 _globals['_CONNECTRESPONSE']._serialized_start=210 @@ -109,57 +113,63 @@ _globals['_OWNEDBUFFER']._serialized_start=3269 _globals['_OWNEDBUFFER']._serialized_end=3370 _globals['_ROOMEVENT']._serialized_start=3373 - _globals['_ROOMEVENT']._serialized_end=4896 - _globals['_ROOMINFO']._serialized_start=4898 - _globals['_ROOMINFO']._serialized_end=4953 - _globals['_OWNEDROOM']._serialized_start=4955 - _globals['_OWNEDROOM']._serialized_end=5052 - _globals['_PARTICIPANTCONNECTED']._serialized_start=5054 - _globals['_PARTICIPANTCONNECTED']._serialized_end=5123 - _globals['_PARTICIPANTDISCONNECTED']._serialized_start=5125 - _globals['_PARTICIPANTDISCONNECTED']._serialized_end=5175 - _globals['_LOCALTRACKPUBLISHED']._serialized_start=5177 - _globals['_LOCALTRACKPUBLISHED']._serialized_end=5217 - _globals['_LOCALTRACKUNPUBLISHED']._serialized_start=5219 - _globals['_LOCALTRACKUNPUBLISHED']._serialized_end=5267 - _globals['_TRACKPUBLISHED']._serialized_start=5269 - _globals['_TRACKPUBLISHED']._serialized_end=5369 - _globals['_TRACKUNPUBLISHED']._serialized_start=5371 - _globals['_TRACKUNPUBLISHED']._serialized_end=5439 - _globals['_TRACKSUBSCRIBED']._serialized_start=5441 - _globals['_TRACKSUBSCRIBED']._serialized_end=5525 - _globals['_TRACKUNSUBSCRIBED']._serialized_start=5527 - _globals['_TRACKUNSUBSCRIBED']._serialized_end=5590 - _globals['_TRACKSUBSCRIPTIONFAILED']._serialized_start=5592 - _globals['_TRACKSUBSCRIPTIONFAILED']._serialized_end=5676 - _globals['_TRACKMUTED']._serialized_start=5678 - _globals['_TRACKMUTED']._serialized_end=5734 - _globals['_TRACKUNMUTED']._serialized_start=5736 - _globals['_TRACKUNMUTED']._serialized_end=5794 - _globals['_E2EESTATECHANGED']._serialized_start=5796 - _globals['_E2EESTATECHANGED']._serialized_end=5886 - _globals['_ACTIVESPEAKERSCHANGED']._serialized_start=5888 - _globals['_ACTIVESPEAKERSCHANGED']._serialized_end=5937 - _globals['_ROOMMETADATACHANGED']._serialized_start=5939 - _globals['_ROOMMETADATACHANGED']._serialized_end=5978 - _globals['_PARTICIPANTMETADATACHANGED']._serialized_start=5980 - _globals['_PARTICIPANTMETADATACHANGED']._serialized_end=6051 - _globals['_PARTICIPANTNAMECHANGED']._serialized_start=6053 - _globals['_PARTICIPANTNAMECHANGED']._serialized_end=6116 - _globals['_CONNECTIONQUALITYCHANGED']._serialized_start=6118 - _globals['_CONNECTIONQUALITYCHANGED']._serialized_end=6220 - _globals['_DATARECEIVED']._serialized_start=6223 - _globals['_DATARECEIVED']._serialized_end=6404 - _globals['_CONNECTIONSTATECHANGED']._serialized_start=6406 - _globals['_CONNECTIONSTATECHANGED']._serialized_end=6477 - _globals['_CONNECTED']._serialized_start=6479 - _globals['_CONNECTED']._serialized_end=6490 - _globals['_DISCONNECTED']._serialized_start=6492 - _globals['_DISCONNECTED']._serialized_end=6506 - _globals['_RECONNECTING']._serialized_start=6508 - _globals['_RECONNECTING']._serialized_end=6522 - _globals['_RECONNECTED']._serialized_start=6524 - _globals['_RECONNECTED']._serialized_end=6537 - _globals['_ROOMEOS']._serialized_start=6539 - _globals['_ROOMEOS']._serialized_end=6548 + _globals['_ROOMEVENT']._serialized_end=4967 + _globals['_ROOMINFO']._serialized_start=4969 + _globals['_ROOMINFO']._serialized_end=5024 + _globals['_OWNEDROOM']._serialized_start=5026 + _globals['_OWNEDROOM']._serialized_end=5123 + _globals['_PARTICIPANTCONNECTED']._serialized_start=5125 + _globals['_PARTICIPANTCONNECTED']._serialized_end=5194 + _globals['_PARTICIPANTDISCONNECTED']._serialized_start=5196 + _globals['_PARTICIPANTDISCONNECTED']._serialized_end=5246 + _globals['_LOCALTRACKPUBLISHED']._serialized_start=5248 + _globals['_LOCALTRACKPUBLISHED']._serialized_end=5288 + _globals['_LOCALTRACKUNPUBLISHED']._serialized_start=5290 + _globals['_LOCALTRACKUNPUBLISHED']._serialized_end=5338 + _globals['_TRACKPUBLISHED']._serialized_start=5340 + _globals['_TRACKPUBLISHED']._serialized_end=5440 + _globals['_TRACKUNPUBLISHED']._serialized_start=5442 + _globals['_TRACKUNPUBLISHED']._serialized_end=5510 + _globals['_TRACKSUBSCRIBED']._serialized_start=5512 + _globals['_TRACKSUBSCRIBED']._serialized_end=5596 + _globals['_TRACKUNSUBSCRIBED']._serialized_start=5598 + _globals['_TRACKUNSUBSCRIBED']._serialized_end=5661 + _globals['_TRACKSUBSCRIPTIONFAILED']._serialized_start=5663 + _globals['_TRACKSUBSCRIPTIONFAILED']._serialized_end=5747 + _globals['_TRACKMUTED']._serialized_start=5749 + _globals['_TRACKMUTED']._serialized_end=5805 + _globals['_TRACKUNMUTED']._serialized_start=5807 + _globals['_TRACKUNMUTED']._serialized_end=5865 + _globals['_E2EESTATECHANGED']._serialized_start=5867 + _globals['_E2EESTATECHANGED']._serialized_end=5957 + _globals['_ACTIVESPEAKERSCHANGED']._serialized_start=5959 + _globals['_ACTIVESPEAKERSCHANGED']._serialized_end=6008 + _globals['_ROOMMETADATACHANGED']._serialized_start=6010 + _globals['_ROOMMETADATACHANGED']._serialized_end=6049 + _globals['_PARTICIPANTMETADATACHANGED']._serialized_start=6051 + _globals['_PARTICIPANTMETADATACHANGED']._serialized_end=6122 + _globals['_PARTICIPANTNAMECHANGED']._serialized_start=6124 + _globals['_PARTICIPANTNAMECHANGED']._serialized_end=6187 + _globals['_CONNECTIONQUALITYCHANGED']._serialized_start=6189 + _globals['_CONNECTIONQUALITYCHANGED']._serialized_end=6291 + _globals['_DATARECEIVED']._serialized_start=6293 + _globals['_DATARECEIVED']._serialized_end=6307 + _globals['_USERPACKET']._serialized_start=6309 + _globals['_USERPACKET']._serialized_end=6393 + _globals['_SIPDTMF']._serialized_start=6395 + _globals['_SIPDTMF']._serialized_end=6448 + _globals['_DATAPACKETRECEIVED']._serialized_start=6451 + _globals['_DATAPACKETRECEIVED']._serialized_end=6696 + _globals['_CONNECTIONSTATECHANGED']._serialized_start=6698 + _globals['_CONNECTIONSTATECHANGED']._serialized_end=6769 + _globals['_CONNECTED']._serialized_start=6771 + _globals['_CONNECTED']._serialized_end=6782 + _globals['_DISCONNECTED']._serialized_start=6784 + _globals['_DISCONNECTED']._serialized_end=6798 + _globals['_RECONNECTING']._serialized_start=6800 + _globals['_RECONNECTING']._serialized_end=6814 + _globals['_RECONNECTED']._serialized_start=6816 + _globals['_RECONNECTED']._serialized_end=6829 + _globals['_ROOMEOS']._serialized_start=6831 + _globals['_ROOMEOS']._serialized_end=6840 # @@protoc_insertion_point(module_scope) diff --git a/livekit-rtc/livekit/rtc/_proto/room_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/room_pb2.pyi index feb6a41a..b61d986d 100644 --- a/livekit-rtc/livekit/rtc/_proto/room_pb2.pyi +++ b/livekit-rtc/livekit/rtc/_proto/room_pb2.pyi @@ -15,6 +15,7 @@ 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 collections.abc from . import e2ee_pb2 @@ -123,7 +124,7 @@ KIND_LOSSY: DataPacketKind.ValueType # 0 KIND_RELIABLE: DataPacketKind.ValueType # 1 global___DataPacketKind = DataPacketKind -@typing_extensions.final +@typing.final class ConnectRequest(google.protobuf.message.Message): """Connect to a new LiveKit room""" @@ -143,12 +144,12 @@ class ConnectRequest(google.protobuf.message.Message): token: builtins.str = ..., options: global___RoomOptions | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["options", b"options"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["options", b"options", "token", b"token", "url", b"url"]) -> None: ... + def HasField(self, field_name: typing.Literal["options", b"options"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["options", b"options", "token", b"token", "url", b"url"]) -> None: ... global___ConnectRequest = ConnectRequest -@typing_extensions.final +@typing.final class ConnectResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -159,15 +160,15 @@ class ConnectResponse(google.protobuf.message.Message): *, async_id: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... global___ConnectResponse = ConnectResponse -@typing_extensions.final +@typing.final class ConnectCallback(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - @typing_extensions.final + @typing.final class ParticipantWithTracks(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -180,14 +181,15 @@ class ConnectCallback(google.protobuf.message.Message): """TrackInfo are not needed here, if we're subscribed to a track, the FfiServer will send a TrackSubscribed event """ + def __init__( self, *, participant: participant_pb2.OwnedParticipant | None = ..., publications: collections.abc.Iterable[track_pb2.OwnedTrackPublication] | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["participant", b"participant"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["participant", b"participant", "publications", b"publications"]) -> None: ... + def HasField(self, field_name: typing.Literal["participant", b"participant"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["participant", b"participant", "publications", b"publications"]) -> None: ... ASYNC_ID_FIELD_NUMBER: builtins.int ERROR_FIELD_NUMBER: builtins.int @@ -211,13 +213,13 @@ class ConnectCallback(google.protobuf.message.Message): local_participant: participant_pb2.OwnedParticipant | None = ..., participants: collections.abc.Iterable[global___ConnectCallback.ParticipantWithTracks] | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_error", b"_error", "error", b"error", "local_participant", b"local_participant", "room", b"room"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_error", b"_error", "async_id", b"async_id", "error", b"error", "local_participant", b"local_participant", "participants", b"participants", "room", b"room"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["_error", b"_error"]) -> typing_extensions.Literal["error"] | None: ... + def HasField(self, field_name: typing.Literal["_error", b"_error", "error", b"error", "local_participant", b"local_participant", "room", b"room"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_error", b"_error", "async_id", b"async_id", "error", b"error", "local_participant", b"local_participant", "participants", b"participants", "room", b"room"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_error", b"_error"]) -> typing.Literal["error"] | None: ... global___ConnectCallback = ConnectCallback -@typing_extensions.final +@typing.final class DisconnectRequest(google.protobuf.message.Message): """Disconnect from the a room""" @@ -230,11 +232,11 @@ class DisconnectRequest(google.protobuf.message.Message): *, room_handle: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["room_handle", b"room_handle"]) -> None: ... + def ClearField(self, field_name: typing.Literal["room_handle", b"room_handle"]) -> None: ... global___DisconnectRequest = DisconnectRequest -@typing_extensions.final +@typing.final class DisconnectResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -245,11 +247,11 @@ class DisconnectResponse(google.protobuf.message.Message): *, async_id: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... global___DisconnectResponse = DisconnectResponse -@typing_extensions.final +@typing.final class DisconnectCallback(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -260,11 +262,11 @@ class DisconnectCallback(google.protobuf.message.Message): *, async_id: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... global___DisconnectCallback = DisconnectCallback -@typing_extensions.final +@typing.final class PublishTrackRequest(google.protobuf.message.Message): """Publish a track to the room""" @@ -284,12 +286,12 @@ class PublishTrackRequest(google.protobuf.message.Message): track_handle: builtins.int = ..., options: global___TrackPublishOptions | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["options", b"options"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["local_participant_handle", b"local_participant_handle", "options", b"options", "track_handle", b"track_handle"]) -> None: ... + def HasField(self, field_name: typing.Literal["options", b"options"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["local_participant_handle", b"local_participant_handle", "options", b"options", "track_handle", b"track_handle"]) -> None: ... global___PublishTrackRequest = PublishTrackRequest -@typing_extensions.final +@typing.final class PublishTrackResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -300,11 +302,11 @@ class PublishTrackResponse(google.protobuf.message.Message): *, async_id: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... global___PublishTrackResponse = PublishTrackResponse -@typing_extensions.final +@typing.final class PublishTrackCallback(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -322,13 +324,13 @@ class PublishTrackCallback(google.protobuf.message.Message): error: builtins.str | None = ..., publication: track_pb2.OwnedTrackPublication | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_error", b"_error", "error", b"error", "publication", b"publication"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_error", b"_error", "async_id", b"async_id", "error", b"error", "publication", b"publication"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["_error", b"_error"]) -> typing_extensions.Literal["error"] | None: ... + def HasField(self, field_name: typing.Literal["_error", b"_error", "error", b"error", "publication", b"publication"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_error", b"_error", "async_id", b"async_id", "error", b"error", "publication", b"publication"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_error", b"_error"]) -> typing.Literal["error"] | None: ... global___PublishTrackCallback = PublishTrackCallback -@typing_extensions.final +@typing.final class UnpublishTrackRequest(google.protobuf.message.Message): """Unpublish a track from the room""" @@ -347,11 +349,11 @@ class UnpublishTrackRequest(google.protobuf.message.Message): track_sid: builtins.str = ..., stop_on_unpublish: builtins.bool = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["local_participant_handle", b"local_participant_handle", "stop_on_unpublish", b"stop_on_unpublish", "track_sid", b"track_sid"]) -> None: ... + def ClearField(self, field_name: typing.Literal["local_participant_handle", b"local_participant_handle", "stop_on_unpublish", b"stop_on_unpublish", "track_sid", b"track_sid"]) -> None: ... global___UnpublishTrackRequest = UnpublishTrackRequest -@typing_extensions.final +@typing.final class UnpublishTrackResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -362,11 +364,11 @@ class UnpublishTrackResponse(google.protobuf.message.Message): *, async_id: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... global___UnpublishTrackResponse = UnpublishTrackResponse -@typing_extensions.final +@typing.final class UnpublishTrackCallback(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -380,13 +382,13 @@ class UnpublishTrackCallback(google.protobuf.message.Message): async_id: builtins.int = ..., error: builtins.str | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_error", b"_error", "error", b"error"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_error", b"_error", "async_id", b"async_id", "error", b"error"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["_error", b"_error"]) -> typing_extensions.Literal["error"] | 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___UnpublishTrackCallback = UnpublishTrackCallback -@typing_extensions.final +@typing.final class PublishDataRequest(google.protobuf.message.Message): """Publish data to other participants""" @@ -402,10 +404,11 @@ class PublishDataRequest(google.protobuf.message.Message): data_ptr: builtins.int data_len: builtins.int kind: global___DataPacketKind.ValueType + topic: builtins.str @property def destination_sids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: """destination""" - topic: builtins.str + def __init__( self, *, @@ -416,13 +419,13 @@ class PublishDataRequest(google.protobuf.message.Message): destination_sids: collections.abc.Iterable[builtins.str] | None = ..., topic: builtins.str | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_topic", b"_topic", "topic", b"topic"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_topic", b"_topic", "data_len", b"data_len", "data_ptr", b"data_ptr", "destination_sids", b"destination_sids", "kind", b"kind", "local_participant_handle", b"local_participant_handle", "topic", b"topic"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["_topic", b"_topic"]) -> typing_extensions.Literal["topic"] | None: ... + def HasField(self, field_name: typing.Literal["_topic", b"_topic", "topic", b"topic"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_topic", b"_topic", "data_len", b"data_len", "data_ptr", b"data_ptr", "destination_sids", b"destination_sids", "kind", b"kind", "local_participant_handle", b"local_participant_handle", "topic", b"topic"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_topic", b"_topic"]) -> typing.Literal["topic"] | None: ... global___PublishDataRequest = PublishDataRequest -@typing_extensions.final +@typing.final class PublishDataResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -433,11 +436,11 @@ class PublishDataResponse(google.protobuf.message.Message): *, async_id: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... global___PublishDataResponse = PublishDataResponse -@typing_extensions.final +@typing.final class PublishDataCallback(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -451,13 +454,13 @@ class PublishDataCallback(google.protobuf.message.Message): async_id: builtins.int = ..., error: builtins.str | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_error", b"_error", "error", b"error"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_error", b"_error", "async_id", b"async_id", "error", b"error"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["_error", b"_error"]) -> typing_extensions.Literal["error"] | 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___PublishDataCallback = PublishDataCallback -@typing_extensions.final +@typing.final class UpdateLocalMetadataRequest(google.protobuf.message.Message): """Change the local participant's metadata""" @@ -473,11 +476,11 @@ class UpdateLocalMetadataRequest(google.protobuf.message.Message): local_participant_handle: builtins.int = ..., metadata: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["local_participant_handle", b"local_participant_handle", "metadata", b"metadata"]) -> None: ... + def ClearField(self, field_name: typing.Literal["local_participant_handle", b"local_participant_handle", "metadata", b"metadata"]) -> None: ... global___UpdateLocalMetadataRequest = UpdateLocalMetadataRequest -@typing_extensions.final +@typing.final class UpdateLocalMetadataResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -488,11 +491,11 @@ class UpdateLocalMetadataResponse(google.protobuf.message.Message): *, async_id: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... global___UpdateLocalMetadataResponse = UpdateLocalMetadataResponse -@typing_extensions.final +@typing.final class UpdateLocalMetadataCallback(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -503,11 +506,11 @@ class UpdateLocalMetadataCallback(google.protobuf.message.Message): *, async_id: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... global___UpdateLocalMetadataCallback = UpdateLocalMetadataCallback -@typing_extensions.final +@typing.final class UpdateLocalNameRequest(google.protobuf.message.Message): """Change the local participant's name""" @@ -523,11 +526,11 @@ class UpdateLocalNameRequest(google.protobuf.message.Message): local_participant_handle: builtins.int = ..., name: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["local_participant_handle", b"local_participant_handle", "name", b"name"]) -> None: ... + def ClearField(self, field_name: typing.Literal["local_participant_handle", b"local_participant_handle", "name", b"name"]) -> None: ... global___UpdateLocalNameRequest = UpdateLocalNameRequest -@typing_extensions.final +@typing.final class UpdateLocalNameResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -538,11 +541,11 @@ class UpdateLocalNameResponse(google.protobuf.message.Message): *, async_id: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... global___UpdateLocalNameResponse = UpdateLocalNameResponse -@typing_extensions.final +@typing.final class UpdateLocalNameCallback(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -553,11 +556,11 @@ class UpdateLocalNameCallback(google.protobuf.message.Message): *, async_id: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... global___UpdateLocalNameCallback = UpdateLocalNameCallback -@typing_extensions.final +@typing.final class SetSubscribedRequest(google.protobuf.message.Message): """Change the "desire" to subs2ribe to a track""" @@ -573,11 +576,11 @@ class SetSubscribedRequest(google.protobuf.message.Message): subscribe: builtins.bool = ..., publication_handle: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["publication_handle", b"publication_handle", "subscribe", b"subscribe"]) -> None: ... + def ClearField(self, field_name: typing.Literal["publication_handle", b"publication_handle", "subscribe", b"subscribe"]) -> None: ... global___SetSubscribedRequest = SetSubscribedRequest -@typing_extensions.final +@typing.final class SetSubscribedResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -587,7 +590,7 @@ class SetSubscribedResponse(google.protobuf.message.Message): global___SetSubscribedResponse = SetSubscribedResponse -@typing_extensions.final +@typing.final class GetSessionStatsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -598,11 +601,11 @@ class GetSessionStatsRequest(google.protobuf.message.Message): *, room_handle: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["room_handle", b"room_handle"]) -> None: ... + def ClearField(self, field_name: typing.Literal["room_handle", b"room_handle"]) -> None: ... global___GetSessionStatsRequest = GetSessionStatsRequest -@typing_extensions.final +@typing.final class GetSessionStatsResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -613,11 +616,11 @@ class GetSessionStatsResponse(google.protobuf.message.Message): *, async_id: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... global___GetSessionStatsResponse = GetSessionStatsResponse -@typing_extensions.final +@typing.final class GetSessionStatsCallback(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -639,13 +642,13 @@ class GetSessionStatsCallback(google.protobuf.message.Message): publisher_stats: collections.abc.Iterable[stats_pb2.RtcStats] | None = ..., subscriber_stats: collections.abc.Iterable[stats_pb2.RtcStats] | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_error", b"_error", "error", b"error"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_error", b"_error", "async_id", b"async_id", "error", b"error", "publisher_stats", b"publisher_stats", "subscriber_stats", b"subscriber_stats"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["_error", b"_error"]) -> typing_extensions.Literal["error"] | 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", "publisher_stats", b"publisher_stats", "subscriber_stats", b"subscriber_stats"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_error", b"_error"]) -> typing.Literal["error"] | None: ... global___GetSessionStatsCallback = GetSessionStatsCallback -@typing_extensions.final +@typing.final class VideoEncoding(google.protobuf.message.Message): """ Options @@ -663,11 +666,11 @@ class VideoEncoding(google.protobuf.message.Message): max_bitrate: builtins.int = ..., max_framerate: builtins.float = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["max_bitrate", b"max_bitrate", "max_framerate", b"max_framerate"]) -> None: ... + def ClearField(self, field_name: typing.Literal["max_bitrate", b"max_bitrate", "max_framerate", b"max_framerate"]) -> None: ... global___VideoEncoding = VideoEncoding -@typing_extensions.final +@typing.final class AudioEncoding(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -678,11 +681,11 @@ class AudioEncoding(google.protobuf.message.Message): *, max_bitrate: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["max_bitrate", b"max_bitrate"]) -> None: ... + def ClearField(self, field_name: typing.Literal["max_bitrate", b"max_bitrate"]) -> None: ... global___AudioEncoding = AudioEncoding -@typing_extensions.final +@typing.final class TrackPublishOptions(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -693,16 +696,17 @@ class TrackPublishOptions(google.protobuf.message.Message): RED_FIELD_NUMBER: builtins.int SIMULCAST_FIELD_NUMBER: builtins.int SOURCE_FIELD_NUMBER: builtins.int - @property - def video_encoding(self) -> global___VideoEncoding: - """encodings are optional""" - @property - def audio_encoding(self) -> global___AudioEncoding: ... video_codec: video_frame_pb2.VideoCodec.ValueType dtx: builtins.bool red: builtins.bool simulcast: builtins.bool source: track_pb2.TrackSource.ValueType + @property + def video_encoding(self) -> global___VideoEncoding: + """encodings are optional""" + + @property + def audio_encoding(self) -> global___AudioEncoding: ... def __init__( self, *, @@ -714,22 +718,22 @@ class TrackPublishOptions(google.protobuf.message.Message): simulcast: builtins.bool = ..., source: track_pb2.TrackSource.ValueType = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["audio_encoding", b"audio_encoding", "video_encoding", b"video_encoding"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["audio_encoding", b"audio_encoding", "dtx", b"dtx", "red", b"red", "simulcast", b"simulcast", "source", b"source", "video_codec", b"video_codec", "video_encoding", b"video_encoding"]) -> None: ... + def HasField(self, field_name: typing.Literal["audio_encoding", b"audio_encoding", "video_encoding", b"video_encoding"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["audio_encoding", b"audio_encoding", "dtx", b"dtx", "red", b"red", "simulcast", b"simulcast", "source", b"source", "video_codec", b"video_codec", "video_encoding", b"video_encoding"]) -> None: ... global___TrackPublishOptions = TrackPublishOptions -@typing_extensions.final +@typing.final class IceServer(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor URLS_FIELD_NUMBER: builtins.int USERNAME_FIELD_NUMBER: builtins.int PASSWORD_FIELD_NUMBER: builtins.int - @property - def urls(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... username: builtins.str password: builtins.str + @property + def urls(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... def __init__( self, *, @@ -737,11 +741,11 @@ class IceServer(google.protobuf.message.Message): username: builtins.str = ..., password: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["password", b"password", "urls", b"urls", "username", b"username"]) -> None: ... + def ClearField(self, field_name: typing.Literal["password", b"password", "urls", b"urls", "username", b"username"]) -> None: ... global___IceServer = IceServer -@typing_extensions.final +@typing.final class RtcConfig(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -753,6 +757,7 @@ class RtcConfig(google.protobuf.message.Message): @property def ice_servers(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___IceServer]: """empty fallback to default""" + def __init__( self, *, @@ -760,16 +765,16 @@ class RtcConfig(google.protobuf.message.Message): continual_gathering_policy: global___ContinualGatheringPolicy.ValueType | None = ..., ice_servers: collections.abc.Iterable[global___IceServer] | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_continual_gathering_policy", b"_continual_gathering_policy", "_ice_transport_type", b"_ice_transport_type", "continual_gathering_policy", b"continual_gathering_policy", "ice_transport_type", b"ice_transport_type"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_continual_gathering_policy", b"_continual_gathering_policy", "_ice_transport_type", b"_ice_transport_type", "continual_gathering_policy", b"continual_gathering_policy", "ice_servers", b"ice_servers", "ice_transport_type", b"ice_transport_type"]) -> None: ... + def HasField(self, field_name: typing.Literal["_continual_gathering_policy", b"_continual_gathering_policy", "_ice_transport_type", b"_ice_transport_type", "continual_gathering_policy", b"continual_gathering_policy", "ice_transport_type", b"ice_transport_type"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_continual_gathering_policy", b"_continual_gathering_policy", "_ice_transport_type", b"_ice_transport_type", "continual_gathering_policy", b"continual_gathering_policy", "ice_servers", b"ice_servers", "ice_transport_type", b"ice_transport_type"]) -> None: ... @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_continual_gathering_policy", b"_continual_gathering_policy"]) -> typing_extensions.Literal["continual_gathering_policy"] | None: ... + def WhichOneof(self, oneof_group: typing.Literal["_continual_gathering_policy", b"_continual_gathering_policy"]) -> typing.Literal["continual_gathering_policy"] | None: ... @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_ice_transport_type", b"_ice_transport_type"]) -> typing_extensions.Literal["ice_transport_type"] | None: ... + def WhichOneof(self, oneof_group: typing.Literal["_ice_transport_type", b"_ice_transport_type"]) -> typing.Literal["ice_transport_type"] | None: ... global___RtcConfig = RtcConfig -@typing_extensions.final +@typing.final class RoomOptions(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -782,12 +787,13 @@ class RoomOptions(google.protobuf.message.Message): auto_subscribe: builtins.bool adaptive_stream: builtins.bool dynacast: builtins.bool + join_retries: builtins.int @property def e2ee(self) -> e2ee_pb2.E2eeOptions: ... @property def rtc_config(self) -> global___RtcConfig: """allow to setup a custom RtcConfiguration""" - join_retries: builtins.int + def __init__( self, *, @@ -798,16 +804,16 @@ class RoomOptions(google.protobuf.message.Message): rtc_config: global___RtcConfig | None = ..., join_retries: builtins.int = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_e2ee", b"_e2ee", "_rtc_config", b"_rtc_config", "e2ee", b"e2ee", "rtc_config", b"rtc_config"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_e2ee", b"_e2ee", "_rtc_config", b"_rtc_config", "adaptive_stream", b"adaptive_stream", "auto_subscribe", b"auto_subscribe", "dynacast", b"dynacast", "e2ee", b"e2ee", "join_retries", b"join_retries", "rtc_config", b"rtc_config"]) -> None: ... + def HasField(self, field_name: typing.Literal["_e2ee", b"_e2ee", "_rtc_config", b"_rtc_config", "e2ee", b"e2ee", "rtc_config", b"rtc_config"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_e2ee", b"_e2ee", "_rtc_config", b"_rtc_config", "adaptive_stream", b"adaptive_stream", "auto_subscribe", b"auto_subscribe", "dynacast", b"dynacast", "e2ee", b"e2ee", "join_retries", b"join_retries", "rtc_config", b"rtc_config"]) -> None: ... @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_e2ee", b"_e2ee"]) -> typing_extensions.Literal["e2ee"] | None: ... + def WhichOneof(self, oneof_group: typing.Literal["_e2ee", b"_e2ee"]) -> typing.Literal["e2ee"] | None: ... @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_rtc_config", b"_rtc_config"]) -> typing_extensions.Literal["rtc_config"] | None: ... + def WhichOneof(self, oneof_group: typing.Literal["_rtc_config", b"_rtc_config"]) -> typing.Literal["rtc_config"] | None: ... global___RoomOptions = RoomOptions -@typing_extensions.final +@typing.final class BufferInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -821,11 +827,11 @@ class BufferInfo(google.protobuf.message.Message): data_ptr: builtins.int = ..., data_len: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["data_len", b"data_len", "data_ptr", b"data_ptr"]) -> None: ... + def ClearField(self, field_name: typing.Literal["data_len", b"data_len", "data_ptr", b"data_ptr"]) -> None: ... global___BufferInfo = BufferInfo -@typing_extensions.final +@typing.final class OwnedBuffer(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -841,12 +847,12 @@ class OwnedBuffer(google.protobuf.message.Message): handle: handle_pb2.FfiOwnedHandle | None = ..., data: global___BufferInfo | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["data", b"data", "handle", b"handle"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["data", b"data", "handle", b"handle"]) -> None: ... + def HasField(self, field_name: typing.Literal["data", b"data", "handle", b"handle"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["data", b"data", "handle", b"handle"]) -> None: ... global___OwnedBuffer = OwnedBuffer -@typing_extensions.final +@typing.final class RoomEvent(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -874,6 +880,7 @@ class RoomEvent(google.protobuf.message.Message): RECONNECTED_FIELD_NUMBER: builtins.int E2EE_STATE_CHANGED_FIELD_NUMBER: builtins.int EOS_FIELD_NUMBER: builtins.int + DATA_PACKET_RECEIVED_FIELD_NUMBER: builtins.int room_handle: builtins.int @property def participant_connected(self) -> global___ParticipantConnected: ... @@ -914,6 +921,7 @@ class RoomEvent(google.protobuf.message.Message): @property def disconnected(self) -> global___Disconnected: """Connected connected = 20;""" + @property def reconnecting(self) -> global___Reconnecting: ... @property @@ -923,6 +931,9 @@ class RoomEvent(google.protobuf.message.Message): @property def eos(self) -> global___RoomEOS: """The stream of room events has ended""" + + @property + def data_packet_received(self) -> global___DataPacketReceived: ... def __init__( self, *, @@ -950,14 +961,15 @@ class RoomEvent(google.protobuf.message.Message): reconnected: global___Reconnected | None = ..., e2ee_state_changed: global___E2eeStateChanged | None = ..., eos: global___RoomEOS | None = ..., + data_packet_received: global___DataPacketReceived | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["active_speakers_changed", b"active_speakers_changed", "connection_quality_changed", b"connection_quality_changed", "connection_state_changed", b"connection_state_changed", "data_received", b"data_received", "disconnected", b"disconnected", "e2ee_state_changed", b"e2ee_state_changed", "eos", b"eos", "local_track_published", b"local_track_published", "local_track_unpublished", b"local_track_unpublished", "message", b"message", "participant_connected", b"participant_connected", "participant_disconnected", b"participant_disconnected", "participant_metadata_changed", b"participant_metadata_changed", "participant_name_changed", b"participant_name_changed", "reconnected", b"reconnected", "reconnecting", b"reconnecting", "room_metadata_changed", b"room_metadata_changed", "track_muted", b"track_muted", "track_published", b"track_published", "track_subscribed", b"track_subscribed", "track_subscription_failed", b"track_subscription_failed", "track_unmuted", b"track_unmuted", "track_unpublished", b"track_unpublished", "track_unsubscribed", b"track_unsubscribed"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["active_speakers_changed", b"active_speakers_changed", "connection_quality_changed", b"connection_quality_changed", "connection_state_changed", b"connection_state_changed", "data_received", b"data_received", "disconnected", b"disconnected", "e2ee_state_changed", b"e2ee_state_changed", "eos", b"eos", "local_track_published", b"local_track_published", "local_track_unpublished", b"local_track_unpublished", "message", b"message", "participant_connected", b"participant_connected", "participant_disconnected", b"participant_disconnected", "participant_metadata_changed", b"participant_metadata_changed", "participant_name_changed", b"participant_name_changed", "reconnected", b"reconnected", "reconnecting", b"reconnecting", "room_handle", b"room_handle", "room_metadata_changed", b"room_metadata_changed", "track_muted", b"track_muted", "track_published", b"track_published", "track_subscribed", b"track_subscribed", "track_subscription_failed", b"track_subscription_failed", "track_unmuted", b"track_unmuted", "track_unpublished", b"track_unpublished", "track_unsubscribed", b"track_unsubscribed"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["message", b"message"]) -> typing_extensions.Literal["participant_connected", "participant_disconnected", "local_track_published", "local_track_unpublished", "track_published", "track_unpublished", "track_subscribed", "track_unsubscribed", "track_subscription_failed", "track_muted", "track_unmuted", "active_speakers_changed", "room_metadata_changed", "participant_metadata_changed", "participant_name_changed", "connection_quality_changed", "data_received", "connection_state_changed", "disconnected", "reconnecting", "reconnected", "e2ee_state_changed", "eos"] | None: ... + def HasField(self, field_name: typing.Literal["active_speakers_changed", b"active_speakers_changed", "connection_quality_changed", b"connection_quality_changed", "connection_state_changed", b"connection_state_changed", "data_packet_received", b"data_packet_received", "data_received", b"data_received", "disconnected", b"disconnected", "e2ee_state_changed", b"e2ee_state_changed", "eos", b"eos", "local_track_published", b"local_track_published", "local_track_unpublished", b"local_track_unpublished", "message", b"message", "participant_connected", b"participant_connected", "participant_disconnected", b"participant_disconnected", "participant_metadata_changed", b"participant_metadata_changed", "participant_name_changed", b"participant_name_changed", "reconnected", b"reconnected", "reconnecting", b"reconnecting", "room_metadata_changed", b"room_metadata_changed", "track_muted", b"track_muted", "track_published", b"track_published", "track_subscribed", b"track_subscribed", "track_subscription_failed", b"track_subscription_failed", "track_unmuted", b"track_unmuted", "track_unpublished", b"track_unpublished", "track_unsubscribed", b"track_unsubscribed"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["active_speakers_changed", b"active_speakers_changed", "connection_quality_changed", b"connection_quality_changed", "connection_state_changed", b"connection_state_changed", "data_packet_received", b"data_packet_received", "data_received", b"data_received", "disconnected", b"disconnected", "e2ee_state_changed", b"e2ee_state_changed", "eos", b"eos", "local_track_published", b"local_track_published", "local_track_unpublished", b"local_track_unpublished", "message", b"message", "participant_connected", b"participant_connected", "participant_disconnected", b"participant_disconnected", "participant_metadata_changed", b"participant_metadata_changed", "participant_name_changed", b"participant_name_changed", "reconnected", b"reconnected", "reconnecting", b"reconnecting", "room_handle", b"room_handle", "room_metadata_changed", b"room_metadata_changed", "track_muted", b"track_muted", "track_published", b"track_published", "track_subscribed", b"track_subscribed", "track_subscription_failed", b"track_subscription_failed", "track_unmuted", b"track_unmuted", "track_unpublished", b"track_unpublished", "track_unsubscribed", b"track_unsubscribed"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["message", b"message"]) -> typing.Literal["participant_connected", "participant_disconnected", "local_track_published", "local_track_unpublished", "track_published", "track_unpublished", "track_subscribed", "track_unsubscribed", "track_subscription_failed", "track_muted", "track_unmuted", "active_speakers_changed", "room_metadata_changed", "participant_metadata_changed", "participant_name_changed", "connection_quality_changed", "data_received", "connection_state_changed", "disconnected", "reconnecting", "reconnected", "e2ee_state_changed", "eos", "data_packet_received"] | None: ... global___RoomEvent = RoomEvent -@typing_extensions.final +@typing.final class RoomInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -974,11 +986,11 @@ class RoomInfo(google.protobuf.message.Message): name: builtins.str = ..., metadata: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["metadata", b"metadata", "name", b"name", "sid", b"sid"]) -> None: ... + def ClearField(self, field_name: typing.Literal["metadata", b"metadata", "name", b"name", "sid", b"sid"]) -> None: ... global___RoomInfo = RoomInfo -@typing_extensions.final +@typing.final class OwnedRoom(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -994,12 +1006,12 @@ class OwnedRoom(google.protobuf.message.Message): handle: handle_pb2.FfiOwnedHandle | None = ..., info: global___RoomInfo | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> None: ... + def HasField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> None: ... global___OwnedRoom = OwnedRoom -@typing_extensions.final +@typing.final class ParticipantConnected(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1011,12 +1023,12 @@ class ParticipantConnected(google.protobuf.message.Message): *, info: participant_pb2.OwnedParticipant | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["info", b"info"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["info", b"info"]) -> None: ... + def HasField(self, field_name: typing.Literal["info", b"info"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["info", b"info"]) -> None: ... global___ParticipantConnected = ParticipantConnected -@typing_extensions.final +@typing.final class ParticipantDisconnected(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1027,11 +1039,11 @@ class ParticipantDisconnected(google.protobuf.message.Message): *, participant_sid: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["participant_sid", b"participant_sid"]) -> None: ... + def ClearField(self, field_name: typing.Literal["participant_sid", b"participant_sid"]) -> None: ... global___ParticipantDisconnected = ParticipantDisconnected -@typing_extensions.final +@typing.final class LocalTrackPublished(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1045,11 +1057,11 @@ class LocalTrackPublished(google.protobuf.message.Message): *, track_sid: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["track_sid", b"track_sid"]) -> None: ... + def ClearField(self, field_name: typing.Literal["track_sid", b"track_sid"]) -> None: ... global___LocalTrackPublished = LocalTrackPublished -@typing_extensions.final +@typing.final class LocalTrackUnpublished(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1060,11 +1072,11 @@ class LocalTrackUnpublished(google.protobuf.message.Message): *, publication_sid: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["publication_sid", b"publication_sid"]) -> None: ... + def ClearField(self, field_name: typing.Literal["publication_sid", b"publication_sid"]) -> None: ... global___LocalTrackUnpublished = LocalTrackUnpublished -@typing_extensions.final +@typing.final class TrackPublished(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1079,12 +1091,12 @@ class TrackPublished(google.protobuf.message.Message): participant_sid: builtins.str = ..., publication: track_pb2.OwnedTrackPublication | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["publication", b"publication"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["participant_sid", b"participant_sid", "publication", b"publication"]) -> None: ... + def HasField(self, field_name: typing.Literal["publication", b"publication"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["participant_sid", b"participant_sid", "publication", b"publication"]) -> None: ... global___TrackPublished = TrackPublished -@typing_extensions.final +@typing.final class TrackUnpublished(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1098,11 +1110,11 @@ class TrackUnpublished(google.protobuf.message.Message): participant_sid: builtins.str = ..., publication_sid: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["participant_sid", b"participant_sid", "publication_sid", b"publication_sid"]) -> None: ... + def ClearField(self, field_name: typing.Literal["participant_sid", b"participant_sid", "publication_sid", b"publication_sid"]) -> None: ... global___TrackUnpublished = TrackUnpublished -@typing_extensions.final +@typing.final class TrackSubscribed(google.protobuf.message.Message): """Publication isn't needed for subscription events on the FFI The FFI will retrieve the publication using the Track sid @@ -1121,12 +1133,12 @@ class TrackSubscribed(google.protobuf.message.Message): participant_sid: builtins.str = ..., track: track_pb2.OwnedTrack | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["track", b"track"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["participant_sid", b"participant_sid", "track", b"track"]) -> None: ... + def HasField(self, field_name: typing.Literal["track", b"track"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["participant_sid", b"participant_sid", "track", b"track"]) -> None: ... global___TrackSubscribed = TrackSubscribed -@typing_extensions.final +@typing.final class TrackUnsubscribed(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1141,11 +1153,11 @@ class TrackUnsubscribed(google.protobuf.message.Message): participant_sid: builtins.str = ..., track_sid: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["participant_sid", b"participant_sid", "track_sid", b"track_sid"]) -> None: ... + def ClearField(self, field_name: typing.Literal["participant_sid", b"participant_sid", "track_sid", b"track_sid"]) -> None: ... global___TrackUnsubscribed = TrackUnsubscribed -@typing_extensions.final +@typing.final class TrackSubscriptionFailed(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1162,11 +1174,11 @@ class TrackSubscriptionFailed(google.protobuf.message.Message): track_sid: builtins.str = ..., error: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["error", b"error", "participant_sid", b"participant_sid", "track_sid", b"track_sid"]) -> None: ... + def ClearField(self, field_name: typing.Literal["error", b"error", "participant_sid", b"participant_sid", "track_sid", b"track_sid"]) -> None: ... global___TrackSubscriptionFailed = TrackSubscriptionFailed -@typing_extensions.final +@typing.final class TrackMuted(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1180,11 +1192,11 @@ class TrackMuted(google.protobuf.message.Message): participant_sid: builtins.str = ..., track_sid: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["participant_sid", b"participant_sid", "track_sid", b"track_sid"]) -> None: ... + def ClearField(self, field_name: typing.Literal["participant_sid", b"participant_sid", "track_sid", b"track_sid"]) -> None: ... global___TrackMuted = TrackMuted -@typing_extensions.final +@typing.final class TrackUnmuted(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1198,11 +1210,11 @@ class TrackUnmuted(google.protobuf.message.Message): participant_sid: builtins.str = ..., track_sid: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["participant_sid", b"participant_sid", "track_sid", b"track_sid"]) -> None: ... + def ClearField(self, field_name: typing.Literal["participant_sid", b"participant_sid", "track_sid", b"track_sid"]) -> None: ... global___TrackUnmuted = TrackUnmuted -@typing_extensions.final +@typing.final class E2eeStateChanged(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1217,11 +1229,11 @@ class E2eeStateChanged(google.protobuf.message.Message): participant_sid: builtins.str = ..., state: e2ee_pb2.EncryptionState.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["participant_sid", b"participant_sid", "state", b"state"]) -> None: ... + def ClearField(self, field_name: typing.Literal["participant_sid", b"participant_sid", "state", b"state"]) -> None: ... global___E2eeStateChanged = E2eeStateChanged -@typing_extensions.final +@typing.final class ActiveSpeakersChanged(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1233,11 +1245,11 @@ class ActiveSpeakersChanged(google.protobuf.message.Message): *, participant_sids: collections.abc.Iterable[builtins.str] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["participant_sids", b"participant_sids"]) -> None: ... + def ClearField(self, field_name: typing.Literal["participant_sids", b"participant_sids"]) -> None: ... global___ActiveSpeakersChanged = ActiveSpeakersChanged -@typing_extensions.final +@typing.final class RoomMetadataChanged(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1248,11 +1260,11 @@ class RoomMetadataChanged(google.protobuf.message.Message): *, metadata: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["metadata", b"metadata"]) -> None: ... + def ClearField(self, field_name: typing.Literal["metadata", b"metadata"]) -> None: ... global___RoomMetadataChanged = RoomMetadataChanged -@typing_extensions.final +@typing.final class ParticipantMetadataChanged(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1266,11 +1278,11 @@ class ParticipantMetadataChanged(google.protobuf.message.Message): participant_sid: builtins.str = ..., metadata: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["metadata", b"metadata", "participant_sid", b"participant_sid"]) -> None: ... + def ClearField(self, field_name: typing.Literal["metadata", b"metadata", "participant_sid", b"participant_sid"]) -> None: ... global___ParticipantMetadataChanged = ParticipantMetadataChanged -@typing_extensions.final +@typing.final class ParticipantNameChanged(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1284,11 +1296,11 @@ class ParticipantNameChanged(google.protobuf.message.Message): participant_sid: builtins.str = ..., name: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["name", b"name", "participant_sid", b"participant_sid"]) -> None: ... + def ClearField(self, field_name: typing.Literal["name", b"name", "participant_sid", b"participant_sid"]) -> None: ... global___ParticipantNameChanged = ParticipantNameChanged -@typing_extensions.final +@typing.final class ConnectionQualityChanged(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1302,42 +1314,100 @@ class ConnectionQualityChanged(google.protobuf.message.Message): participant_sid: builtins.str = ..., quality: global___ConnectionQuality.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["participant_sid", b"participant_sid", "quality", b"quality"]) -> None: ... + def ClearField(self, field_name: typing.Literal["participant_sid", b"participant_sid", "quality", b"quality"]) -> None: ... global___ConnectionQualityChanged = ConnectionQualityChanged -@typing_extensions.final +@typing.final class DataReceived(google.protobuf.message.Message): + """deprecated, use DataPacketReceived""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___DataReceived = DataReceived + +@typing.final +class UserPacket(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor DATA_FIELD_NUMBER: builtins.int - PARTICIPANT_SID_FIELD_NUMBER: builtins.int - KIND_FIELD_NUMBER: builtins.int TOPIC_FIELD_NUMBER: builtins.int + topic: builtins.str @property def data(self) -> global___OwnedBuffer: ... + def __init__( + self, + *, + data: global___OwnedBuffer | None = ..., + topic: builtins.str | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["_topic", b"_topic", "data", b"data", "topic", b"topic"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_topic", b"_topic", "data", b"data", "topic", b"topic"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_topic", b"_topic"]) -> typing.Literal["topic"] | None: ... + +global___UserPacket = UserPacket + +@typing.final +class SipDTMF(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CODE_FIELD_NUMBER: builtins.int + DIGIT_FIELD_NUMBER: builtins.int + code: builtins.int + digit: builtins.str + def __init__( + self, + *, + code: builtins.int = ..., + digit: builtins.str | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["_digit", b"_digit", "digit", b"digit"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_digit", b"_digit", "code", b"code", "digit", b"digit"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_digit", b"_digit"]) -> typing.Literal["digit"] | None: ... + +global___SipDTMF = SipDTMF + +@typing.final +class DataPacketReceived(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KIND_FIELD_NUMBER: builtins.int + PARTICIPANT_IDENTITY_FIELD_NUMBER: builtins.int + PARTICIPANT_SID_FIELD_NUMBER: builtins.int + USER_FIELD_NUMBER: builtins.int + SIP_DTMF_FIELD_NUMBER: builtins.int + kind: global___DataPacketKind.ValueType + participant_identity: builtins.str + """Can be empty if the data is sent a server SDK""" participant_sid: builtins.str """Can be empty if the data is sent a server SDK""" - kind: global___DataPacketKind.ValueType - topic: builtins.str + @property + def user(self) -> global___UserPacket: ... + @property + def sip_dtmf(self) -> global___SipDTMF: ... def __init__( self, *, - data: global___OwnedBuffer | None = ..., - participant_sid: builtins.str | None = ..., kind: global___DataPacketKind.ValueType = ..., - topic: builtins.str | None = ..., + participant_identity: builtins.str = ..., + participant_sid: builtins.str | None = ..., + user: global___UserPacket | None = ..., + sip_dtmf: global___SipDTMF | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_participant_sid", b"_participant_sid", "_topic", b"_topic", "data", b"data", "participant_sid", b"participant_sid", "topic", b"topic"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_participant_sid", b"_participant_sid", "_topic", b"_topic", "data", b"data", "kind", b"kind", "participant_sid", b"participant_sid", "topic", b"topic"]) -> None: ... + def HasField(self, field_name: typing.Literal["_participant_sid", b"_participant_sid", "participant_sid", b"participant_sid", "sip_dtmf", b"sip_dtmf", "user", b"user", "value", b"value"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_participant_sid", b"_participant_sid", "kind", b"kind", "participant_identity", b"participant_identity", "participant_sid", b"participant_sid", "sip_dtmf", b"sip_dtmf", "user", b"user", "value", b"value"]) -> None: ... @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_participant_sid", b"_participant_sid"]) -> typing_extensions.Literal["participant_sid"] | None: ... + def WhichOneof(self, oneof_group: typing.Literal["_participant_sid", b"_participant_sid"]) -> typing.Literal["participant_sid"] | None: ... @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_topic", b"_topic"]) -> typing_extensions.Literal["topic"] | None: ... + def WhichOneof(self, oneof_group: typing.Literal["value", b"value"]) -> typing.Literal["user", "sip_dtmf"] | None: ... -global___DataReceived = DataReceived +global___DataPacketReceived = DataPacketReceived -@typing_extensions.final +@typing.final class ConnectionStateChanged(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1348,11 +1418,11 @@ class ConnectionStateChanged(google.protobuf.message.Message): *, state: global___ConnectionState.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["state", b"state"]) -> None: ... + def ClearField(self, field_name: typing.Literal["state", b"state"]) -> None: ... global___ConnectionStateChanged = ConnectionStateChanged -@typing_extensions.final +@typing.final class Connected(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1362,7 +1432,7 @@ class Connected(google.protobuf.message.Message): global___Connected = Connected -@typing_extensions.final +@typing.final class Disconnected(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1372,7 +1442,7 @@ class Disconnected(google.protobuf.message.Message): global___Disconnected = Disconnected -@typing_extensions.final +@typing.final class Reconnecting(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1382,7 +1452,7 @@ class Reconnecting(google.protobuf.message.Message): global___Reconnecting = Reconnecting -@typing_extensions.final +@typing.final class Reconnected(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1392,7 +1462,7 @@ class Reconnected(google.protobuf.message.Message): global___Reconnected = Reconnected -@typing_extensions.final +@typing.final class RoomEOS(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor diff --git a/livekit-rtc/livekit/rtc/_proto/stats_pb2.py b/livekit-rtc/livekit/rtc/_proto/stats_pb2.py index 59ed5781..7dfdf765 100644 --- a/livekit-rtc/livekit/rtc/_proto/stats_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/stats_pb2.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: stats.proto -# Protobuf Python Version: 4.25.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -20,10 +19,11 @@ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'stats_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' - _globals['_OUTBOUNDRTPSTREAMSTATS_QUALITYLIMITATIONDURATIONSENTRY']._options = None - _globals['_OUTBOUNDRTPSTREAMSTATS_QUALITYLIMITATIONDURATIONSENTRY']._serialized_options = b'8\001' + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\rLiveKit.Proto' + _OUTBOUNDRTPSTREAMSTATS_QUALITYLIMITATIONDURATIONSENTRY._options = None + _OUTBOUNDRTPSTREAMSTATS_QUALITYLIMITATIONDURATIONSENTRY._serialized_options = b'8\001' _globals['_DATACHANNELSTATE']._serialized_start=9217 _globals['_DATACHANNELSTATE']._serialized_end=9298 _globals['_QUALITYLIMITATIONREASON']._serialized_start=9300 diff --git a/livekit-rtc/livekit/rtc/_proto/stats_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/stats_pb2.pyi index 82b8ef4b..53f10dcb 100644 --- a/livekit-rtc/livekit/rtc/_proto/stats_pb2.pyi +++ b/livekit-rtc/livekit/rtc/_proto/stats_pb2.pyi @@ -15,6 +15,7 @@ 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 collections.abc import google.protobuf.descriptor @@ -223,11 +224,11 @@ CANDIDATE_PASSIVE: IceTcpCandidateType.ValueType # 1 CANDIDATE_SO: IceTcpCandidateType.ValueType # 2 global___IceTcpCandidateType = IceTcpCandidateType -@typing_extensions.final +@typing.final class RtcStats(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - @typing_extensions.final + @typing.final class Codec(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -243,10 +244,10 @@ class RtcStats(google.protobuf.message.Message): rtc: global___RtcStatsData | None = ..., codec: global___CodecStats | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["codec", b"codec", "rtc", b"rtc"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["codec", b"codec", "rtc", b"rtc"]) -> None: ... + def HasField(self, field_name: typing.Literal["codec", b"codec", "rtc", b"rtc"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["codec", b"codec", "rtc", b"rtc"]) -> None: ... - @typing_extensions.final + @typing.final class InboundRtp(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -270,10 +271,10 @@ class RtcStats(google.protobuf.message.Message): received: global___ReceivedRtpStreamStats | None = ..., inbound: global___InboundRtpStreamStats | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["inbound", b"inbound", "received", b"received", "rtc", b"rtc", "stream", b"stream"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["inbound", b"inbound", "received", b"received", "rtc", b"rtc", "stream", b"stream"]) -> None: ... + def HasField(self, field_name: typing.Literal["inbound", b"inbound", "received", b"received", "rtc", b"rtc", "stream", b"stream"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["inbound", b"inbound", "received", b"received", "rtc", b"rtc", "stream", b"stream"]) -> None: ... - @typing_extensions.final + @typing.final class OutboundRtp(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -297,10 +298,10 @@ class RtcStats(google.protobuf.message.Message): sent: global___SentRtpStreamStats | None = ..., outbound: global___OutboundRtpStreamStats | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["outbound", b"outbound", "rtc", b"rtc", "sent", b"sent", "stream", b"stream"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["outbound", b"outbound", "rtc", b"rtc", "sent", b"sent", "stream", b"stream"]) -> None: ... + def HasField(self, field_name: typing.Literal["outbound", b"outbound", "rtc", b"rtc", "sent", b"sent", "stream", b"stream"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["outbound", b"outbound", "rtc", b"rtc", "sent", b"sent", "stream", b"stream"]) -> None: ... - @typing_extensions.final + @typing.final class RemoteInboundRtp(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -324,10 +325,10 @@ class RtcStats(google.protobuf.message.Message): received: global___ReceivedRtpStreamStats | None = ..., remote_inbound: global___RemoteInboundRtpStreamStats | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["received", b"received", "remote_inbound", b"remote_inbound", "rtc", b"rtc", "stream", b"stream"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["received", b"received", "remote_inbound", b"remote_inbound", "rtc", b"rtc", "stream", b"stream"]) -> None: ... + def HasField(self, field_name: typing.Literal["received", b"received", "remote_inbound", b"remote_inbound", "rtc", b"rtc", "stream", b"stream"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["received", b"received", "remote_inbound", b"remote_inbound", "rtc", b"rtc", "stream", b"stream"]) -> None: ... - @typing_extensions.final + @typing.final class RemoteOutboundRtp(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -351,10 +352,10 @@ class RtcStats(google.protobuf.message.Message): sent: global___SentRtpStreamStats | None = ..., remote_outbound: global___RemoteOutboundRtpStreamStats | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["remote_outbound", b"remote_outbound", "rtc", b"rtc", "sent", b"sent", "stream", b"stream"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["remote_outbound", b"remote_outbound", "rtc", b"rtc", "sent", b"sent", "stream", b"stream"]) -> None: ... + def HasField(self, field_name: typing.Literal["remote_outbound", b"remote_outbound", "rtc", b"rtc", "sent", b"sent", "stream", b"stream"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["remote_outbound", b"remote_outbound", "rtc", b"rtc", "sent", b"sent", "stream", b"stream"]) -> None: ... - @typing_extensions.final + @typing.final class MediaSource(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -378,10 +379,10 @@ class RtcStats(google.protobuf.message.Message): audio: global___AudioSourceStats | None = ..., video: global___VideoSourceStats | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["audio", b"audio", "rtc", b"rtc", "source", b"source", "video", b"video"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["audio", b"audio", "rtc", b"rtc", "source", b"source", "video", b"video"]) -> None: ... + def HasField(self, field_name: typing.Literal["audio", b"audio", "rtc", b"rtc", "source", b"source", "video", b"video"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["audio", b"audio", "rtc", b"rtc", "source", b"source", "video", b"video"]) -> None: ... - @typing_extensions.final + @typing.final class MediaPlayout(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -397,10 +398,10 @@ class RtcStats(google.protobuf.message.Message): rtc: global___RtcStatsData | None = ..., audio_playout: global___AudioPlayoutStats | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["audio_playout", b"audio_playout", "rtc", b"rtc"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["audio_playout", b"audio_playout", "rtc", b"rtc"]) -> None: ... + def HasField(self, field_name: typing.Literal["audio_playout", b"audio_playout", "rtc", b"rtc"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["audio_playout", b"audio_playout", "rtc", b"rtc"]) -> None: ... - @typing_extensions.final + @typing.final class PeerConnection(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -416,10 +417,10 @@ class RtcStats(google.protobuf.message.Message): rtc: global___RtcStatsData | None = ..., pc: global___PeerConnectionStats | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["pc", b"pc", "rtc", b"rtc"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["pc", b"pc", "rtc", b"rtc"]) -> None: ... + def HasField(self, field_name: typing.Literal["pc", b"pc", "rtc", b"rtc"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["pc", b"pc", "rtc", b"rtc"]) -> None: ... - @typing_extensions.final + @typing.final class DataChannel(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -435,10 +436,10 @@ class RtcStats(google.protobuf.message.Message): rtc: global___RtcStatsData | None = ..., dc: global___DataChannelStats | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["dc", b"dc", "rtc", b"rtc"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["dc", b"dc", "rtc", b"rtc"]) -> None: ... + def HasField(self, field_name: typing.Literal["dc", b"dc", "rtc", b"rtc"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["dc", b"dc", "rtc", b"rtc"]) -> None: ... - @typing_extensions.final + @typing.final class Transport(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -454,10 +455,10 @@ class RtcStats(google.protobuf.message.Message): rtc: global___RtcStatsData | None = ..., transport: global___TransportStats | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["rtc", b"rtc", "transport", b"transport"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["rtc", b"rtc", "transport", b"transport"]) -> None: ... + def HasField(self, field_name: typing.Literal["rtc", b"rtc", "transport", b"transport"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["rtc", b"rtc", "transport", b"transport"]) -> None: ... - @typing_extensions.final + @typing.final class CandidatePair(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -473,10 +474,10 @@ class RtcStats(google.protobuf.message.Message): rtc: global___RtcStatsData | None = ..., candidate_pair: global___CandidatePairStats | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["candidate_pair", b"candidate_pair", "rtc", b"rtc"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["candidate_pair", b"candidate_pair", "rtc", b"rtc"]) -> None: ... + def HasField(self, field_name: typing.Literal["candidate_pair", b"candidate_pair", "rtc", b"rtc"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["candidate_pair", b"candidate_pair", "rtc", b"rtc"]) -> None: ... - @typing_extensions.final + @typing.final class LocalCandidate(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -492,10 +493,10 @@ class RtcStats(google.protobuf.message.Message): rtc: global___RtcStatsData | None = ..., candidate: global___IceCandidateStats | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["candidate", b"candidate", "rtc", b"rtc"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["candidate", b"candidate", "rtc", b"rtc"]) -> None: ... + def HasField(self, field_name: typing.Literal["candidate", b"candidate", "rtc", b"rtc"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["candidate", b"candidate", "rtc", b"rtc"]) -> None: ... - @typing_extensions.final + @typing.final class RemoteCandidate(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -511,10 +512,10 @@ class RtcStats(google.protobuf.message.Message): rtc: global___RtcStatsData | None = ..., candidate: global___IceCandidateStats | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["candidate", b"candidate", "rtc", b"rtc"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["candidate", b"candidate", "rtc", b"rtc"]) -> None: ... + def HasField(self, field_name: typing.Literal["candidate", b"candidate", "rtc", b"rtc"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["candidate", b"candidate", "rtc", b"rtc"]) -> None: ... - @typing_extensions.final + @typing.final class Certificate(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -530,10 +531,10 @@ class RtcStats(google.protobuf.message.Message): rtc: global___RtcStatsData | None = ..., certificate: global___CertificateStats | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["certificate", b"certificate", "rtc", b"rtc"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["certificate", b"certificate", "rtc", b"rtc"]) -> None: ... + def HasField(self, field_name: typing.Literal["certificate", b"certificate", "rtc", b"rtc"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["certificate", b"certificate", "rtc", b"rtc"]) -> None: ... - @typing_extensions.final + @typing.final class Track(google.protobuf.message.Message): """Deprecated""" @@ -607,13 +608,13 @@ class RtcStats(google.protobuf.message.Message): certificate: global___RtcStats.Certificate | None = ..., track: global___RtcStats.Track | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["candidate_pair", b"candidate_pair", "certificate", b"certificate", "codec", b"codec", "data_channel", b"data_channel", "inbound_rtp", b"inbound_rtp", "local_candidate", b"local_candidate", "media_playout", b"media_playout", "media_source", b"media_source", "outbound_rtp", b"outbound_rtp", "peer_connection", b"peer_connection", "remote_candidate", b"remote_candidate", "remote_inbound_rtp", b"remote_inbound_rtp", "remote_outbound_rtp", b"remote_outbound_rtp", "stats", b"stats", "track", b"track", "transport", b"transport"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["candidate_pair", b"candidate_pair", "certificate", b"certificate", "codec", b"codec", "data_channel", b"data_channel", "inbound_rtp", b"inbound_rtp", "local_candidate", b"local_candidate", "media_playout", b"media_playout", "media_source", b"media_source", "outbound_rtp", b"outbound_rtp", "peer_connection", b"peer_connection", "remote_candidate", b"remote_candidate", "remote_inbound_rtp", b"remote_inbound_rtp", "remote_outbound_rtp", b"remote_outbound_rtp", "stats", b"stats", "track", b"track", "transport", b"transport"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["stats", b"stats"]) -> typing_extensions.Literal["codec", "inbound_rtp", "outbound_rtp", "remote_inbound_rtp", "remote_outbound_rtp", "media_source", "media_playout", "peer_connection", "data_channel", "transport", "candidate_pair", "local_candidate", "remote_candidate", "certificate", "track"] | None: ... + def HasField(self, field_name: typing.Literal["candidate_pair", b"candidate_pair", "certificate", b"certificate", "codec", b"codec", "data_channel", b"data_channel", "inbound_rtp", b"inbound_rtp", "local_candidate", b"local_candidate", "media_playout", b"media_playout", "media_source", b"media_source", "outbound_rtp", b"outbound_rtp", "peer_connection", b"peer_connection", "remote_candidate", b"remote_candidate", "remote_inbound_rtp", b"remote_inbound_rtp", "remote_outbound_rtp", b"remote_outbound_rtp", "stats", b"stats", "track", b"track", "transport", b"transport"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["candidate_pair", b"candidate_pair", "certificate", b"certificate", "codec", b"codec", "data_channel", b"data_channel", "inbound_rtp", b"inbound_rtp", "local_candidate", b"local_candidate", "media_playout", b"media_playout", "media_source", b"media_source", "outbound_rtp", b"outbound_rtp", "peer_connection", b"peer_connection", "remote_candidate", b"remote_candidate", "remote_inbound_rtp", b"remote_inbound_rtp", "remote_outbound_rtp", b"remote_outbound_rtp", "stats", b"stats", "track", b"track", "transport", b"transport"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["stats", b"stats"]) -> typing.Literal["codec", "inbound_rtp", "outbound_rtp", "remote_inbound_rtp", "remote_outbound_rtp", "media_source", "media_playout", "peer_connection", "data_channel", "transport", "candidate_pair", "local_candidate", "remote_candidate", "certificate", "track"] | None: ... global___RtcStats = RtcStats -@typing_extensions.final +@typing.final class RtcStatsData(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -627,11 +628,11 @@ class RtcStatsData(google.protobuf.message.Message): id: builtins.str = ..., timestamp: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["id", b"id", "timestamp", b"timestamp"]) -> None: ... + def ClearField(self, field_name: typing.Literal["id", b"id", "timestamp", b"timestamp"]) -> None: ... global___RtcStatsData = RtcStatsData -@typing_extensions.final +@typing.final class CodecStats(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -657,11 +658,11 @@ class CodecStats(google.protobuf.message.Message): channels: builtins.int = ..., sdp_fmtp_line: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["channels", b"channels", "clock_rate", b"clock_rate", "mime_type", b"mime_type", "payload_type", b"payload_type", "sdp_fmtp_line", b"sdp_fmtp_line", "transport_id", b"transport_id"]) -> None: ... + def ClearField(self, field_name: typing.Literal["channels", b"channels", "clock_rate", b"clock_rate", "mime_type", b"mime_type", "payload_type", b"payload_type", "sdp_fmtp_line", b"sdp_fmtp_line", "transport_id", b"transport_id"]) -> None: ... global___CodecStats = CodecStats -@typing_extensions.final +@typing.final class RtpStreamStats(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -681,11 +682,11 @@ class RtpStreamStats(google.protobuf.message.Message): transport_id: builtins.str = ..., codec_id: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["codec_id", b"codec_id", "kind", b"kind", "ssrc", b"ssrc", "transport_id", b"transport_id"]) -> None: ... + def ClearField(self, field_name: typing.Literal["codec_id", b"codec_id", "kind", b"kind", "ssrc", b"ssrc", "transport_id", b"transport_id"]) -> None: ... global___RtpStreamStats = RtpStreamStats -@typing_extensions.final +@typing.final class ReceivedRtpStreamStats(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -702,11 +703,11 @@ class ReceivedRtpStreamStats(google.protobuf.message.Message): packets_lost: builtins.int = ..., jitter: builtins.float = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["jitter", b"jitter", "packets_lost", b"packets_lost", "packets_received", b"packets_received"]) -> None: ... + def ClearField(self, field_name: typing.Literal["jitter", b"jitter", "packets_lost", b"packets_lost", "packets_received", b"packets_received"]) -> None: ... global___ReceivedRtpStreamStats = ReceivedRtpStreamStats -@typing_extensions.final +@typing.final class InboundRtpStreamStats(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -873,11 +874,11 @@ class InboundRtpStreamStats(google.protobuf.message.Message): rtx_ssrc: builtins.int = ..., fec_ssrc: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["audio_level", b"audio_level", "bytes_received", b"bytes_received", "concealed_samples", b"concealed_samples", "concealment_events", b"concealment_events", "decoder_implementation", b"decoder_implementation", "estimated_playout_timestamp", b"estimated_playout_timestamp", "fec_bytes_received", b"fec_bytes_received", "fec_packets_discarded", b"fec_packets_discarded", "fec_packets_received", b"fec_packets_received", "fec_ssrc", b"fec_ssrc", "fir_count", b"fir_count", "frame_height", b"frame_height", "frame_width", b"frame_width", "frames_assembled_from_multiple_packets", b"frames_assembled_from_multiple_packets", "frames_decoded", b"frames_decoded", "frames_dropped", b"frames_dropped", "frames_per_second", b"frames_per_second", "frames_received", b"frames_received", "frames_rendered", b"frames_rendered", "freeze_count", b"freeze_count", "header_bytes_received", b"header_bytes_received", "inserted_samples_for_deceleration", b"inserted_samples_for_deceleration", "jitter_buffer_delay", b"jitter_buffer_delay", "jitter_buffer_emitted_count", b"jitter_buffer_emitted_count", "jitter_buffer_minimum_delay", b"jitter_buffer_minimum_delay", "jitter_buffer_target_delay", b"jitter_buffer_target_delay", "key_frames_decoded", b"key_frames_decoded", "last_packet_received_timestamp", b"last_packet_received_timestamp", "mid", b"mid", "nack_count", b"nack_count", "packets_discarded", b"packets_discarded", "pause_count", b"pause_count", "playout_id", b"playout_id", "pli_count", b"pli_count", "power_efficient_decoder", b"power_efficient_decoder", "qp_sum", b"qp_sum", "remote_id", b"remote_id", "removed_samples_for_acceleration", b"removed_samples_for_acceleration", "retransmitted_bytes_received", b"retransmitted_bytes_received", "retransmitted_packets_received", b"retransmitted_packets_received", "rtx_ssrc", b"rtx_ssrc", "silent_concealed_samples", b"silent_concealed_samples", "total_assembly_time", b"total_assembly_time", "total_audio_energy", b"total_audio_energy", "total_decode_time", b"total_decode_time", "total_freeze_duration", b"total_freeze_duration", "total_inter_frame_delay", b"total_inter_frame_delay", "total_pause_duration", b"total_pause_duration", "total_processing_delay", b"total_processing_delay", "total_samples_duration", b"total_samples_duration", "total_samples_received", b"total_samples_received", "total_squared_inter_frame_delay", b"total_squared_inter_frame_delay", "track_identifier", b"track_identifier"]) -> None: ... + def ClearField(self, field_name: typing.Literal["audio_level", b"audio_level", "bytes_received", b"bytes_received", "concealed_samples", b"concealed_samples", "concealment_events", b"concealment_events", "decoder_implementation", b"decoder_implementation", "estimated_playout_timestamp", b"estimated_playout_timestamp", "fec_bytes_received", b"fec_bytes_received", "fec_packets_discarded", b"fec_packets_discarded", "fec_packets_received", b"fec_packets_received", "fec_ssrc", b"fec_ssrc", "fir_count", b"fir_count", "frame_height", b"frame_height", "frame_width", b"frame_width", "frames_assembled_from_multiple_packets", b"frames_assembled_from_multiple_packets", "frames_decoded", b"frames_decoded", "frames_dropped", b"frames_dropped", "frames_per_second", b"frames_per_second", "frames_received", b"frames_received", "frames_rendered", b"frames_rendered", "freeze_count", b"freeze_count", "header_bytes_received", b"header_bytes_received", "inserted_samples_for_deceleration", b"inserted_samples_for_deceleration", "jitter_buffer_delay", b"jitter_buffer_delay", "jitter_buffer_emitted_count", b"jitter_buffer_emitted_count", "jitter_buffer_minimum_delay", b"jitter_buffer_minimum_delay", "jitter_buffer_target_delay", b"jitter_buffer_target_delay", "key_frames_decoded", b"key_frames_decoded", "last_packet_received_timestamp", b"last_packet_received_timestamp", "mid", b"mid", "nack_count", b"nack_count", "packets_discarded", b"packets_discarded", "pause_count", b"pause_count", "playout_id", b"playout_id", "pli_count", b"pli_count", "power_efficient_decoder", b"power_efficient_decoder", "qp_sum", b"qp_sum", "remote_id", b"remote_id", "removed_samples_for_acceleration", b"removed_samples_for_acceleration", "retransmitted_bytes_received", b"retransmitted_bytes_received", "retransmitted_packets_received", b"retransmitted_packets_received", "rtx_ssrc", b"rtx_ssrc", "silent_concealed_samples", b"silent_concealed_samples", "total_assembly_time", b"total_assembly_time", "total_audio_energy", b"total_audio_energy", "total_decode_time", b"total_decode_time", "total_freeze_duration", b"total_freeze_duration", "total_inter_frame_delay", b"total_inter_frame_delay", "total_pause_duration", b"total_pause_duration", "total_processing_delay", b"total_processing_delay", "total_samples_duration", b"total_samples_duration", "total_samples_received", b"total_samples_received", "total_squared_inter_frame_delay", b"total_squared_inter_frame_delay", "track_identifier", b"track_identifier"]) -> None: ... global___InboundRtpStreamStats = InboundRtpStreamStats -@typing_extensions.final +@typing.final class SentRtpStreamStats(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -891,15 +892,15 @@ class SentRtpStreamStats(google.protobuf.message.Message): packets_sent: builtins.int = ..., bytes_sent: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["bytes_sent", b"bytes_sent", "packets_sent", b"packets_sent"]) -> None: ... + def ClearField(self, field_name: typing.Literal["bytes_sent", b"bytes_sent", "packets_sent", b"packets_sent"]) -> None: ... global___SentRtpStreamStats = SentRtpStreamStats -@typing_extensions.final +@typing.final class OutboundRtpStreamStats(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - @typing_extensions.final + @typing.final class QualityLimitationDurationsEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -913,7 +914,7 @@ class OutboundRtpStreamStats(google.protobuf.message.Message): key: builtins.str = ..., value: builtins.float = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ... + def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ... MID_FIELD_NUMBER: builtins.int MEDIA_SOURCE_ID_FIELD_NUMBER: builtins.int @@ -966,8 +967,6 @@ class OutboundRtpStreamStats(google.protobuf.message.Message): total_encode_time: builtins.float total_packet_send_delay: builtins.float quality_limitation_reason: global___QualityLimitationReason.ValueType - @property - def quality_limitation_durations(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.float]: ... quality_limitation_resolution_changes: builtins.int nack_count: builtins.int fir_count: builtins.int @@ -976,6 +975,8 @@ class OutboundRtpStreamStats(google.protobuf.message.Message): power_efficient_encoder: builtins.bool active: builtins.bool scalibility_mode: builtins.str + @property + def quality_limitation_durations(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.float]: ... def __init__( self, *, @@ -1010,11 +1011,11 @@ class OutboundRtpStreamStats(google.protobuf.message.Message): active: builtins.bool = ..., scalibility_mode: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["active", b"active", "encoder_implementation", b"encoder_implementation", "fir_count", b"fir_count", "frame_height", b"frame_height", "frame_width", b"frame_width", "frames_encoded", b"frames_encoded", "frames_per_second", b"frames_per_second", "frames_sent", b"frames_sent", "header_bytes_sent", b"header_bytes_sent", "huge_frames_sent", b"huge_frames_sent", "key_frames_encoded", b"key_frames_encoded", "media_source_id", b"media_source_id", "mid", b"mid", "nack_count", b"nack_count", "pli_count", b"pli_count", "power_efficient_encoder", b"power_efficient_encoder", "qp_sum", b"qp_sum", "quality_limitation_durations", b"quality_limitation_durations", "quality_limitation_reason", b"quality_limitation_reason", "quality_limitation_resolution_changes", b"quality_limitation_resolution_changes", "remote_id", b"remote_id", "retransmitted_bytes_sent", b"retransmitted_bytes_sent", "retransmitted_packets_sent", b"retransmitted_packets_sent", "rid", b"rid", "rtx_ssrc", b"rtx_ssrc", "scalibility_mode", b"scalibility_mode", "target_bitrate", b"target_bitrate", "total_encode_time", b"total_encode_time", "total_encoded_bytes_target", b"total_encoded_bytes_target", "total_packet_send_delay", b"total_packet_send_delay"]) -> None: ... + def ClearField(self, field_name: typing.Literal["active", b"active", "encoder_implementation", b"encoder_implementation", "fir_count", b"fir_count", "frame_height", b"frame_height", "frame_width", b"frame_width", "frames_encoded", b"frames_encoded", "frames_per_second", b"frames_per_second", "frames_sent", b"frames_sent", "header_bytes_sent", b"header_bytes_sent", "huge_frames_sent", b"huge_frames_sent", "key_frames_encoded", b"key_frames_encoded", "media_source_id", b"media_source_id", "mid", b"mid", "nack_count", b"nack_count", "pli_count", b"pli_count", "power_efficient_encoder", b"power_efficient_encoder", "qp_sum", b"qp_sum", "quality_limitation_durations", b"quality_limitation_durations", "quality_limitation_reason", b"quality_limitation_reason", "quality_limitation_resolution_changes", b"quality_limitation_resolution_changes", "remote_id", b"remote_id", "retransmitted_bytes_sent", b"retransmitted_bytes_sent", "retransmitted_packets_sent", b"retransmitted_packets_sent", "rid", b"rid", "rtx_ssrc", b"rtx_ssrc", "scalibility_mode", b"scalibility_mode", "target_bitrate", b"target_bitrate", "total_encode_time", b"total_encode_time", "total_encoded_bytes_target", b"total_encoded_bytes_target", "total_packet_send_delay", b"total_packet_send_delay"]) -> None: ... global___OutboundRtpStreamStats = OutboundRtpStreamStats -@typing_extensions.final +@typing.final class RemoteInboundRtpStreamStats(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1037,11 +1038,11 @@ class RemoteInboundRtpStreamStats(google.protobuf.message.Message): fraction_lost: builtins.float = ..., round_trip_time_measurements: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["fraction_lost", b"fraction_lost", "local_id", b"local_id", "round_trip_time", b"round_trip_time", "round_trip_time_measurements", b"round_trip_time_measurements", "total_round_trip_time", b"total_round_trip_time"]) -> None: ... + def ClearField(self, field_name: typing.Literal["fraction_lost", b"fraction_lost", "local_id", b"local_id", "round_trip_time", b"round_trip_time", "round_trip_time_measurements", b"round_trip_time_measurements", "total_round_trip_time", b"total_round_trip_time"]) -> None: ... global___RemoteInboundRtpStreamStats = RemoteInboundRtpStreamStats -@typing_extensions.final +@typing.final class RemoteOutboundRtpStreamStats(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1067,11 +1068,11 @@ class RemoteOutboundRtpStreamStats(google.protobuf.message.Message): total_round_trip_time: builtins.float = ..., round_trip_time_measurements: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["local_id", b"local_id", "remote_timestamp", b"remote_timestamp", "reports_sent", b"reports_sent", "round_trip_time", b"round_trip_time", "round_trip_time_measurements", b"round_trip_time_measurements", "total_round_trip_time", b"total_round_trip_time"]) -> None: ... + def ClearField(self, field_name: typing.Literal["local_id", b"local_id", "remote_timestamp", b"remote_timestamp", "reports_sent", b"reports_sent", "round_trip_time", b"round_trip_time", "round_trip_time_measurements", b"round_trip_time_measurements", "total_round_trip_time", b"total_round_trip_time"]) -> None: ... global___RemoteOutboundRtpStreamStats = RemoteOutboundRtpStreamStats -@typing_extensions.final +@typing.final class MediaSourceStats(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1085,11 +1086,11 @@ class MediaSourceStats(google.protobuf.message.Message): track_identifier: builtins.str = ..., kind: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["kind", b"kind", "track_identifier", b"track_identifier"]) -> None: ... + def ClearField(self, field_name: typing.Literal["kind", b"kind", "track_identifier", b"track_identifier"]) -> None: ... global___MediaSourceStats = MediaSourceStats -@typing_extensions.final +@typing.final class AudioSourceStats(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1124,11 +1125,11 @@ class AudioSourceStats(google.protobuf.message.Message): total_capture_delay: builtins.float = ..., total_samples_captured: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["audio_level", b"audio_level", "dropped_samples_duration", b"dropped_samples_duration", "dropped_samples_events", b"dropped_samples_events", "echo_return_loss", b"echo_return_loss", "echo_return_loss_enhancement", b"echo_return_loss_enhancement", "total_audio_energy", b"total_audio_energy", "total_capture_delay", b"total_capture_delay", "total_samples_captured", b"total_samples_captured", "total_samples_duration", b"total_samples_duration"]) -> None: ... + def ClearField(self, field_name: typing.Literal["audio_level", b"audio_level", "dropped_samples_duration", b"dropped_samples_duration", "dropped_samples_events", b"dropped_samples_events", "echo_return_loss", b"echo_return_loss", "echo_return_loss_enhancement", b"echo_return_loss_enhancement", "total_audio_energy", b"total_audio_energy", "total_capture_delay", b"total_capture_delay", "total_samples_captured", b"total_samples_captured", "total_samples_duration", b"total_samples_duration"]) -> None: ... global___AudioSourceStats = AudioSourceStats -@typing_extensions.final +@typing.final class VideoSourceStats(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1148,11 +1149,11 @@ class VideoSourceStats(google.protobuf.message.Message): frames: builtins.int = ..., frames_per_second: builtins.float = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["frames", b"frames", "frames_per_second", b"frames_per_second", "height", b"height", "width", b"width"]) -> None: ... + def ClearField(self, field_name: typing.Literal["frames", b"frames", "frames_per_second", b"frames_per_second", "height", b"height", "width", b"width"]) -> None: ... global___VideoSourceStats = VideoSourceStats -@typing_extensions.final +@typing.final class AudioPlayoutStats(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1178,11 +1179,11 @@ class AudioPlayoutStats(google.protobuf.message.Message): total_playout_delay: builtins.float = ..., total_samples_count: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["kind", b"kind", "synthesized_samples_duration", b"synthesized_samples_duration", "synthesized_samples_events", b"synthesized_samples_events", "total_playout_delay", b"total_playout_delay", "total_samples_count", b"total_samples_count", "total_samples_duration", b"total_samples_duration"]) -> None: ... + def ClearField(self, field_name: typing.Literal["kind", b"kind", "synthesized_samples_duration", b"synthesized_samples_duration", "synthesized_samples_events", b"synthesized_samples_events", "total_playout_delay", b"total_playout_delay", "total_samples_count", b"total_samples_count", "total_samples_duration", b"total_samples_duration"]) -> None: ... global___AudioPlayoutStats = AudioPlayoutStats -@typing_extensions.final +@typing.final class PeerConnectionStats(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1196,11 +1197,11 @@ class PeerConnectionStats(google.protobuf.message.Message): data_channels_opened: builtins.int = ..., data_channels_closed: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["data_channels_closed", b"data_channels_closed", "data_channels_opened", b"data_channels_opened"]) -> None: ... + def ClearField(self, field_name: typing.Literal["data_channels_closed", b"data_channels_closed", "data_channels_opened", b"data_channels_opened"]) -> None: ... global___PeerConnectionStats = PeerConnectionStats -@typing_extensions.final +@typing.final class DataChannelStats(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1232,13 +1233,13 @@ class DataChannelStats(google.protobuf.message.Message): messages_received: builtins.int = ..., bytes_received: builtins.int = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_state", b"_state", "state", b"state"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_state", b"_state", "bytes_received", b"bytes_received", "bytes_sent", b"bytes_sent", "data_channel_identifier", b"data_channel_identifier", "label", b"label", "messages_received", b"messages_received", "messages_sent", b"messages_sent", "protocol", b"protocol", "state", b"state"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["_state", b"_state"]) -> typing_extensions.Literal["state"] | None: ... + def HasField(self, field_name: typing.Literal["_state", b"_state", "state", b"state"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_state", b"_state", "bytes_received", b"bytes_received", "bytes_sent", b"bytes_sent", "data_channel_identifier", b"data_channel_identifier", "label", b"label", "messages_received", b"messages_received", "messages_sent", b"messages_sent", "protocol", b"protocol", "state", b"state"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_state", b"_state"]) -> typing.Literal["state"] | None: ... global___DataChannelStats = DataChannelStats -@typing_extensions.final +@typing.final class TransportStats(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1294,16 +1295,16 @@ class TransportStats(google.protobuf.message.Message): srtp_cipher: builtins.str = ..., selected_candidate_pair_changes: builtins.int = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_dtls_state", b"_dtls_state", "_ice_state", b"_ice_state", "dtls_state", b"dtls_state", "ice_state", b"ice_state"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_dtls_state", b"_dtls_state", "_ice_state", b"_ice_state", "bytes_received", b"bytes_received", "bytes_sent", b"bytes_sent", "dtls_cipher", b"dtls_cipher", "dtls_role", b"dtls_role", "dtls_state", b"dtls_state", "ice_local_username_fragment", b"ice_local_username_fragment", "ice_role", b"ice_role", "ice_state", b"ice_state", "local_certificate_id", b"local_certificate_id", "packets_received", b"packets_received", "packets_sent", b"packets_sent", "remote_certificate_id", b"remote_certificate_id", "selected_candidate_pair_changes", b"selected_candidate_pair_changes", "selected_candidate_pair_id", b"selected_candidate_pair_id", "srtp_cipher", b"srtp_cipher", "tls_version", b"tls_version"]) -> None: ... + def HasField(self, field_name: typing.Literal["_dtls_state", b"_dtls_state", "_ice_state", b"_ice_state", "dtls_state", b"dtls_state", "ice_state", b"ice_state"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_dtls_state", b"_dtls_state", "_ice_state", b"_ice_state", "bytes_received", b"bytes_received", "bytes_sent", b"bytes_sent", "dtls_cipher", b"dtls_cipher", "dtls_role", b"dtls_role", "dtls_state", b"dtls_state", "ice_local_username_fragment", b"ice_local_username_fragment", "ice_role", b"ice_role", "ice_state", b"ice_state", "local_certificate_id", b"local_certificate_id", "packets_received", b"packets_received", "packets_sent", b"packets_sent", "remote_certificate_id", b"remote_certificate_id", "selected_candidate_pair_changes", b"selected_candidate_pair_changes", "selected_candidate_pair_id", b"selected_candidate_pair_id", "srtp_cipher", b"srtp_cipher", "tls_version", b"tls_version"]) -> None: ... @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_dtls_state", b"_dtls_state"]) -> typing_extensions.Literal["dtls_state"] | None: ... + def WhichOneof(self, oneof_group: typing.Literal["_dtls_state", b"_dtls_state"]) -> typing.Literal["dtls_state"] | None: ... @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_ice_state", b"_ice_state"]) -> typing_extensions.Literal["ice_state"] | None: ... + def WhichOneof(self, oneof_group: typing.Literal["_ice_state", b"_ice_state"]) -> typing.Literal["ice_state"] | None: ... global___TransportStats = TransportStats -@typing_extensions.final +@typing.final class CandidatePairStats(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1377,13 +1378,13 @@ class CandidatePairStats(google.protobuf.message.Message): packets_discarded_on_send: builtins.int = ..., bytes_discarded_on_send: builtins.int = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_state", b"_state", "state", b"state"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_state", b"_state", "available_incoming_bitrate", b"available_incoming_bitrate", "available_outgoing_bitrate", b"available_outgoing_bitrate", "bytes_discarded_on_send", b"bytes_discarded_on_send", "bytes_received", b"bytes_received", "bytes_sent", b"bytes_sent", "consent_requests_sent", b"consent_requests_sent", "current_round_trip_time", b"current_round_trip_time", "last_packet_received_timestamp", b"last_packet_received_timestamp", "last_packet_sent_timestamp", b"last_packet_sent_timestamp", "local_candidate_id", b"local_candidate_id", "nominated", b"nominated", "packets_discarded_on_send", b"packets_discarded_on_send", "packets_received", b"packets_received", "packets_sent", b"packets_sent", "remote_candidate_id", b"remote_candidate_id", "requests_received", b"requests_received", "requests_sent", b"requests_sent", "responses_received", b"responses_received", "responses_sent", b"responses_sent", "state", b"state", "total_round_trip_time", b"total_round_trip_time", "transport_id", b"transport_id"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["_state", b"_state"]) -> typing_extensions.Literal["state"] | None: ... + def HasField(self, field_name: typing.Literal["_state", b"_state", "state", b"state"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_state", b"_state", "available_incoming_bitrate", b"available_incoming_bitrate", "available_outgoing_bitrate", b"available_outgoing_bitrate", "bytes_discarded_on_send", b"bytes_discarded_on_send", "bytes_received", b"bytes_received", "bytes_sent", b"bytes_sent", "consent_requests_sent", b"consent_requests_sent", "current_round_trip_time", b"current_round_trip_time", "last_packet_received_timestamp", b"last_packet_received_timestamp", "last_packet_sent_timestamp", b"last_packet_sent_timestamp", "local_candidate_id", b"local_candidate_id", "nominated", b"nominated", "packets_discarded_on_send", b"packets_discarded_on_send", "packets_received", b"packets_received", "packets_sent", b"packets_sent", "remote_candidate_id", b"remote_candidate_id", "requests_received", b"requests_received", "requests_sent", b"requests_sent", "responses_received", b"responses_received", "responses_sent", b"responses_sent", "state", b"state", "total_round_trip_time", b"total_round_trip_time", "transport_id", b"transport_id"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_state", b"_state"]) -> typing.Literal["state"] | None: ... global___CandidatePairStats = CandidatePairStats -@typing_extensions.final +@typing.final class IceCandidateStats(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1430,18 +1431,18 @@ class IceCandidateStats(google.protobuf.message.Message): username_fragment: builtins.str = ..., tcp_type: global___IceTcpCandidateType.ValueType | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_candidate_type", b"_candidate_type", "_relay_protocol", b"_relay_protocol", "_tcp_type", b"_tcp_type", "candidate_type", b"candidate_type", "relay_protocol", b"relay_protocol", "tcp_type", b"tcp_type"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_candidate_type", b"_candidate_type", "_relay_protocol", b"_relay_protocol", "_tcp_type", b"_tcp_type", "address", b"address", "candidate_type", b"candidate_type", "foundation", b"foundation", "port", b"port", "priority", b"priority", "protocol", b"protocol", "related_address", b"related_address", "related_port", b"related_port", "relay_protocol", b"relay_protocol", "tcp_type", b"tcp_type", "transport_id", b"transport_id", "url", b"url", "username_fragment", b"username_fragment"]) -> None: ... + def HasField(self, field_name: typing.Literal["_candidate_type", b"_candidate_type", "_relay_protocol", b"_relay_protocol", "_tcp_type", b"_tcp_type", "candidate_type", b"candidate_type", "relay_protocol", b"relay_protocol", "tcp_type", b"tcp_type"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_candidate_type", b"_candidate_type", "_relay_protocol", b"_relay_protocol", "_tcp_type", b"_tcp_type", "address", b"address", "candidate_type", b"candidate_type", "foundation", b"foundation", "port", b"port", "priority", b"priority", "protocol", b"protocol", "related_address", b"related_address", "related_port", b"related_port", "relay_protocol", b"relay_protocol", "tcp_type", b"tcp_type", "transport_id", b"transport_id", "url", b"url", "username_fragment", b"username_fragment"]) -> None: ... @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_candidate_type", b"_candidate_type"]) -> typing_extensions.Literal["candidate_type"] | None: ... + def WhichOneof(self, oneof_group: typing.Literal["_candidate_type", b"_candidate_type"]) -> typing.Literal["candidate_type"] | None: ... @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_relay_protocol", b"_relay_protocol"]) -> typing_extensions.Literal["relay_protocol"] | None: ... + def WhichOneof(self, oneof_group: typing.Literal["_relay_protocol", b"_relay_protocol"]) -> typing.Literal["relay_protocol"] | None: ... @typing.overload - def WhichOneof(self, oneof_group: typing_extensions.Literal["_tcp_type", b"_tcp_type"]) -> typing_extensions.Literal["tcp_type"] | None: ... + def WhichOneof(self, oneof_group: typing.Literal["_tcp_type", b"_tcp_type"]) -> typing.Literal["tcp_type"] | None: ... global___IceCandidateStats = IceCandidateStats -@typing_extensions.final +@typing.final class CertificateStats(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1461,6 +1462,6 @@ class CertificateStats(google.protobuf.message.Message): base64_certificate: builtins.str = ..., issuer_certificate_id: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["base64_certificate", b"base64_certificate", "fingerprint", b"fingerprint", "fingerprint_algorithm", b"fingerprint_algorithm", "issuer_certificate_id", b"issuer_certificate_id"]) -> None: ... + def ClearField(self, field_name: typing.Literal["base64_certificate", b"base64_certificate", "fingerprint", b"fingerprint", "fingerprint_algorithm", b"fingerprint_algorithm", "issuer_certificate_id", b"issuer_certificate_id"]) -> None: ... global___CertificateStats = CertificateStats diff --git a/livekit-rtc/livekit/rtc/_proto/track_pb2.py b/livekit-rtc/livekit/rtc/_proto/track_pb2.py index 061b430f..39a25ebf 100644 --- a/livekit-rtc/livekit/rtc/_proto/track_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/track_pb2.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: track.proto -# Protobuf Python Version: 4.25.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -23,8 +22,9 @@ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'track_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\rLiveKit.Proto' _globals['_TRACKKIND']._serialized_start=1218 _globals['_TRACKKIND']._serialized_end=1279 _globals['_TRACKSOURCE']._serialized_start=1282 diff --git a/livekit-rtc/livekit/rtc/_proto/track_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/track_pb2.pyi index 2a687298..8d775066 100644 --- a/livekit-rtc/livekit/rtc/_proto/track_pb2.pyi +++ b/livekit-rtc/livekit/rtc/_proto/track_pb2.pyi @@ -15,6 +15,7 @@ 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 collections.abc from . import e2ee_pb2 @@ -89,7 +90,7 @@ STATE_ACTIVE: StreamState.ValueType # 1 STATE_PAUSED: StreamState.ValueType # 2 global___StreamState = StreamState -@typing_extensions.final +@typing.final class CreateVideoTrackRequest(google.protobuf.message.Message): """Create a new VideoTrack from a VideoSource""" @@ -105,11 +106,11 @@ class CreateVideoTrackRequest(google.protobuf.message.Message): name: builtins.str = ..., source_handle: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["name", b"name", "source_handle", b"source_handle"]) -> None: ... + def ClearField(self, field_name: typing.Literal["name", b"name", "source_handle", b"source_handle"]) -> None: ... global___CreateVideoTrackRequest = CreateVideoTrackRequest -@typing_extensions.final +@typing.final class CreateVideoTrackResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -121,12 +122,12 @@ class CreateVideoTrackResponse(google.protobuf.message.Message): *, track: global___OwnedTrack | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["track", b"track"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["track", b"track"]) -> None: ... + def HasField(self, field_name: typing.Literal["track", b"track"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["track", b"track"]) -> None: ... global___CreateVideoTrackResponse = CreateVideoTrackResponse -@typing_extensions.final +@typing.final class CreateAudioTrackRequest(google.protobuf.message.Message): """Create a new AudioTrack from a AudioSource""" @@ -142,11 +143,11 @@ class CreateAudioTrackRequest(google.protobuf.message.Message): name: builtins.str = ..., source_handle: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["name", b"name", "source_handle", b"source_handle"]) -> None: ... + def ClearField(self, field_name: typing.Literal["name", b"name", "source_handle", b"source_handle"]) -> None: ... global___CreateAudioTrackRequest = CreateAudioTrackRequest -@typing_extensions.final +@typing.final class CreateAudioTrackResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -158,12 +159,12 @@ class CreateAudioTrackResponse(google.protobuf.message.Message): *, track: global___OwnedTrack | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["track", b"track"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["track", b"track"]) -> None: ... + def HasField(self, field_name: typing.Literal["track", b"track"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["track", b"track"]) -> None: ... global___CreateAudioTrackResponse = CreateAudioTrackResponse -@typing_extensions.final +@typing.final class GetStatsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -174,11 +175,11 @@ class GetStatsRequest(google.protobuf.message.Message): *, track_handle: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["track_handle", b"track_handle"]) -> None: ... + def ClearField(self, field_name: typing.Literal["track_handle", b"track_handle"]) -> None: ... global___GetStatsRequest = GetStatsRequest -@typing_extensions.final +@typing.final class GetStatsResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -189,11 +190,11 @@ class GetStatsResponse(google.protobuf.message.Message): *, async_id: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + def ClearField(self, field_name: typing.Literal["async_id", b"async_id"]) -> None: ... global___GetStatsResponse = GetStatsResponse -@typing_extensions.final +@typing.final class GetStatsCallback(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -211,13 +212,13 @@ class GetStatsCallback(google.protobuf.message.Message): error: builtins.str | None = ..., stats: collections.abc.Iterable[stats_pb2.RtcStats] | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_error", b"_error", "error", b"error"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_error", b"_error", "async_id", b"async_id", "error", b"error", "stats", b"stats"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["_error", b"_error"]) -> typing_extensions.Literal["error"] | 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", "stats", b"stats"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_error", b"_error"]) -> typing.Literal["error"] | None: ... global___GetStatsCallback = GetStatsCallback -@typing_extensions.final +@typing.final class TrackEvent(google.protobuf.message.Message): """ Track @@ -231,7 +232,7 @@ class TrackEvent(google.protobuf.message.Message): global___TrackEvent = TrackEvent -@typing_extensions.final +@typing.final class TrackPublicationInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -272,11 +273,11 @@ class TrackPublicationInfo(google.protobuf.message.Message): remote: builtins.bool = ..., encryption_type: e2ee_pb2.EncryptionType.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["encryption_type", b"encryption_type", "height", b"height", "kind", b"kind", "mime_type", b"mime_type", "muted", b"muted", "name", b"name", "remote", b"remote", "sid", b"sid", "simulcasted", b"simulcasted", "source", b"source", "width", b"width"]) -> None: ... + def ClearField(self, field_name: typing.Literal["encryption_type", b"encryption_type", "height", b"height", "kind", b"kind", "mime_type", b"mime_type", "muted", b"muted", "name", b"name", "remote", b"remote", "sid", b"sid", "simulcasted", b"simulcasted", "source", b"source", "width", b"width"]) -> None: ... global___TrackPublicationInfo = TrackPublicationInfo -@typing_extensions.final +@typing.final class OwnedTrackPublication(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -292,12 +293,12 @@ class OwnedTrackPublication(google.protobuf.message.Message): handle: handle_pb2.FfiOwnedHandle | None = ..., info: global___TrackPublicationInfo | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> None: ... + def HasField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> None: ... global___OwnedTrackPublication = OwnedTrackPublication -@typing_extensions.final +@typing.final class TrackInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -323,11 +324,11 @@ class TrackInfo(google.protobuf.message.Message): muted: builtins.bool = ..., remote: builtins.bool = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["kind", b"kind", "muted", b"muted", "name", b"name", "remote", b"remote", "sid", b"sid", "stream_state", b"stream_state"]) -> None: ... + def ClearField(self, field_name: typing.Literal["kind", b"kind", "muted", b"muted", "name", b"name", "remote", b"remote", "sid", b"sid", "stream_state", b"stream_state"]) -> None: ... global___TrackInfo = TrackInfo -@typing_extensions.final +@typing.final class OwnedTrack(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -343,7 +344,7 @@ class OwnedTrack(google.protobuf.message.Message): handle: handle_pb2.FfiOwnedHandle | None = ..., info: global___TrackInfo | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> None: ... + def HasField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> None: ... global___OwnedTrack = OwnedTrack diff --git a/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py b/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py index 7acb92a9..33c10b27 100644 --- a/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py +++ b/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: video_frame.proto -# Protobuf Python Version: 4.25.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -21,8 +20,9 @@ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'video_frame_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\252\002\rLiveKit.Proto' + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\rLiveKit.Proto' _globals['_VIDEOCODEC']._serialized_start=2132 _globals['_VIDEOCODEC']._serialized_end=2181 _globals['_VIDEOROTATION']._serialized_start=2183 diff --git a/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.pyi index 393bb975..40cddda9 100644 --- a/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.pyi +++ b/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.pyi @@ -15,6 +15,7 @@ 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 collections.abc import google.protobuf.descriptor @@ -136,7 +137,7 @@ class VideoSourceType(_VideoSourceType, metaclass=_VideoSourceTypeEnumTypeWrappe VIDEO_SOURCE_NATIVE: VideoSourceType.ValueType # 0 global___VideoSourceType = VideoSourceType -@typing_extensions.final +@typing.final class NewVideoStreamRequest(google.protobuf.message.Message): """Create a new VideoStream VideoStream is used to receive video frames from a track @@ -162,13 +163,13 @@ class NewVideoStreamRequest(google.protobuf.message.Message): format: global___VideoBufferType.ValueType | None = ..., normalize_stride: builtins.bool = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_format", b"_format", "format", b"format"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_format", b"_format", "format", b"format", "normalize_stride", b"normalize_stride", "track_handle", b"track_handle", "type", b"type"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["_format", b"_format"]) -> typing_extensions.Literal["format"] | None: ... + def HasField(self, field_name: typing.Literal["_format", b"_format", "format", b"format"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_format", b"_format", "format", b"format", "normalize_stride", b"normalize_stride", "track_handle", b"track_handle", "type", b"type"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_format", b"_format"]) -> typing.Literal["format"] | None: ... global___NewVideoStreamRequest = NewVideoStreamRequest -@typing_extensions.final +@typing.final class NewVideoStreamResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -180,12 +181,12 @@ class NewVideoStreamResponse(google.protobuf.message.Message): *, stream: global___OwnedVideoStream | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["stream", b"stream"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["stream", b"stream"]) -> None: ... + def HasField(self, field_name: typing.Literal["stream", b"stream"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["stream", b"stream"]) -> None: ... global___NewVideoStreamResponse = NewVideoStreamResponse -@typing_extensions.final +@typing.final class NewVideoSourceRequest(google.protobuf.message.Message): """Create a new VideoSource VideoSource is used to send video frame to a track @@ -201,18 +202,19 @@ class NewVideoSourceRequest(google.protobuf.message.Message): """Used to determine which encodings to use + simulcast layers Most of the time it corresponds to the source resolution """ + def __init__( self, *, type: global___VideoSourceType.ValueType = ..., resolution: global___VideoSourceResolution | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["resolution", b"resolution"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["resolution", b"resolution", "type", b"type"]) -> None: ... + def HasField(self, field_name: typing.Literal["resolution", b"resolution"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["resolution", b"resolution", "type", b"type"]) -> None: ... global___NewVideoSourceRequest = NewVideoSourceRequest -@typing_extensions.final +@typing.final class NewVideoSourceResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -224,12 +226,12 @@ class NewVideoSourceResponse(google.protobuf.message.Message): *, source: global___OwnedVideoSource | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["source", b"source"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["source", b"source"]) -> None: ... + def HasField(self, field_name: typing.Literal["source", b"source"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["source", b"source"]) -> None: ... global___NewVideoSourceResponse = NewVideoSourceResponse -@typing_extensions.final +@typing.final class CaptureVideoFrameRequest(google.protobuf.message.Message): """Push a frame to a VideoSource""" @@ -240,11 +242,11 @@ class CaptureVideoFrameRequest(google.protobuf.message.Message): TIMESTAMP_US_FIELD_NUMBER: builtins.int ROTATION_FIELD_NUMBER: builtins.int source_handle: builtins.int - @property - def buffer(self) -> global___VideoBufferInfo: ... timestamp_us: builtins.int """In microseconds""" rotation: global___VideoRotation.ValueType + @property + def buffer(self) -> global___VideoBufferInfo: ... def __init__( self, *, @@ -253,12 +255,12 @@ class CaptureVideoFrameRequest(google.protobuf.message.Message): timestamp_us: builtins.int = ..., rotation: global___VideoRotation.ValueType = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["buffer", b"buffer"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["buffer", b"buffer", "rotation", b"rotation", "source_handle", b"source_handle", "timestamp_us", b"timestamp_us"]) -> None: ... + def HasField(self, field_name: typing.Literal["buffer", b"buffer"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["buffer", b"buffer", "rotation", b"rotation", "source_handle", b"source_handle", "timestamp_us", b"timestamp_us"]) -> None: ... global___CaptureVideoFrameRequest = CaptureVideoFrameRequest -@typing_extensions.final +@typing.final class CaptureVideoFrameResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -268,7 +270,7 @@ class CaptureVideoFrameResponse(google.protobuf.message.Message): global___CaptureVideoFrameResponse = CaptureVideoFrameResponse -@typing_extensions.final +@typing.final class VideoConvertRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -276,9 +278,9 @@ class VideoConvertRequest(google.protobuf.message.Message): BUFFER_FIELD_NUMBER: builtins.int DST_TYPE_FIELD_NUMBER: builtins.int flip_y: builtins.bool + dst_type: global___VideoBufferType.ValueType @property def buffer(self) -> global___VideoBufferInfo: ... - dst_type: global___VideoBufferType.ValueType def __init__( self, *, @@ -286,12 +288,12 @@ class VideoConvertRequest(google.protobuf.message.Message): buffer: global___VideoBufferInfo | None = ..., dst_type: global___VideoBufferType.ValueType = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["buffer", b"buffer"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["buffer", b"buffer", "dst_type", b"dst_type", "flip_y", b"flip_y"]) -> None: ... + def HasField(self, field_name: typing.Literal["buffer", b"buffer"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["buffer", b"buffer", "dst_type", b"dst_type", "flip_y", b"flip_y"]) -> None: ... global___VideoConvertRequest = VideoConvertRequest -@typing_extensions.final +@typing.final class VideoConvertResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -306,13 +308,13 @@ class VideoConvertResponse(google.protobuf.message.Message): error: builtins.str | None = ..., buffer: global___OwnedVideoBuffer | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["_error", b"_error", "buffer", b"buffer", "error", b"error"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["_error", b"_error", "buffer", b"buffer", "error", b"error"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["_error", b"_error"]) -> typing_extensions.Literal["error"] | None: ... + def HasField(self, field_name: typing.Literal["_error", b"_error", "buffer", b"buffer", "error", b"error"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["_error", b"_error", "buffer", b"buffer", "error", b"error"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["_error", b"_error"]) -> typing.Literal["error"] | None: ... global___VideoConvertResponse = VideoConvertResponse -@typing_extensions.final +@typing.final class VideoResolution(google.protobuf.message.Message): """ VideoFrame buffers @@ -333,15 +335,15 @@ class VideoResolution(google.protobuf.message.Message): height: builtins.int = ..., frame_rate: builtins.float = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["frame_rate", b"frame_rate", "height", b"height", "width", b"width"]) -> None: ... + def ClearField(self, field_name: typing.Literal["frame_rate", b"frame_rate", "height", b"height", "width", b"width"]) -> None: ... global___VideoResolution = VideoResolution -@typing_extensions.final +@typing.final class VideoBufferInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - @typing_extensions.final + @typing.final class ComponentInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -358,7 +360,7 @@ class VideoBufferInfo(google.protobuf.message.Message): stride: builtins.int = ..., size: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["data_ptr", b"data_ptr", "size", b"size", "stride", b"stride"]) -> None: ... + def ClearField(self, field_name: typing.Literal["data_ptr", b"data_ptr", "size", b"size", "stride", b"stride"]) -> None: ... TYPE_FIELD_NUMBER: builtins.int WIDTH_FIELD_NUMBER: builtins.int @@ -384,11 +386,11 @@ class VideoBufferInfo(google.protobuf.message.Message): stride: builtins.int = ..., components: collections.abc.Iterable[global___VideoBufferInfo.ComponentInfo] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["components", b"components", "data_ptr", b"data_ptr", "height", b"height", "stride", b"stride", "type", b"type", "width", b"width"]) -> None: ... + def ClearField(self, field_name: typing.Literal["components", b"components", "data_ptr", b"data_ptr", "height", b"height", "stride", b"stride", "type", b"type", "width", b"width"]) -> None: ... global___VideoBufferInfo = VideoBufferInfo -@typing_extensions.final +@typing.final class OwnedVideoBuffer(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -404,12 +406,12 @@ class OwnedVideoBuffer(google.protobuf.message.Message): handle: handle_pb2.FfiOwnedHandle | None = ..., info: global___VideoBufferInfo | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> None: ... + def HasField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> None: ... global___OwnedVideoBuffer = OwnedVideoBuffer -@typing_extensions.final +@typing.final class VideoStreamInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -420,11 +422,11 @@ class VideoStreamInfo(google.protobuf.message.Message): *, type: global___VideoStreamType.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["type", b"type"]) -> None: ... + def ClearField(self, field_name: typing.Literal["type", b"type"]) -> None: ... global___VideoStreamInfo = VideoStreamInfo -@typing_extensions.final +@typing.final class OwnedVideoStream(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -440,12 +442,12 @@ class OwnedVideoStream(google.protobuf.message.Message): handle: handle_pb2.FfiOwnedHandle | None = ..., info: global___VideoStreamInfo | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> None: ... + def HasField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> None: ... global___OwnedVideoStream = OwnedVideoStream -@typing_extensions.final +@typing.final class VideoStreamEvent(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -464,24 +466,24 @@ class VideoStreamEvent(google.protobuf.message.Message): frame_received: global___VideoFrameReceived | None = ..., eos: global___VideoStreamEOS | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["eos", b"eos", "frame_received", b"frame_received", "message", b"message"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["eos", b"eos", "frame_received", b"frame_received", "message", b"message", "stream_handle", b"stream_handle"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["message", b"message"]) -> typing_extensions.Literal["frame_received", "eos"] | None: ... + def HasField(self, field_name: typing.Literal["eos", b"eos", "frame_received", b"frame_received", "message", b"message"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["eos", b"eos", "frame_received", b"frame_received", "message", b"message", "stream_handle", b"stream_handle"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["message", b"message"]) -> typing.Literal["frame_received", "eos"] | None: ... global___VideoStreamEvent = VideoStreamEvent -@typing_extensions.final +@typing.final class VideoFrameReceived(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor BUFFER_FIELD_NUMBER: builtins.int TIMESTAMP_US_FIELD_NUMBER: builtins.int ROTATION_FIELD_NUMBER: builtins.int - @property - def buffer(self) -> global___OwnedVideoBuffer: ... timestamp_us: builtins.int """In microseconds""" rotation: global___VideoRotation.ValueType + @property + def buffer(self) -> global___OwnedVideoBuffer: ... def __init__( self, *, @@ -489,12 +491,12 @@ class VideoFrameReceived(google.protobuf.message.Message): timestamp_us: builtins.int = ..., rotation: global___VideoRotation.ValueType = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["buffer", b"buffer"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["buffer", b"buffer", "rotation", b"rotation", "timestamp_us", b"timestamp_us"]) -> None: ... + def HasField(self, field_name: typing.Literal["buffer", b"buffer"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["buffer", b"buffer", "rotation", b"rotation", "timestamp_us", b"timestamp_us"]) -> None: ... global___VideoFrameReceived = VideoFrameReceived -@typing_extensions.final +@typing.final class VideoStreamEOS(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -504,7 +506,7 @@ class VideoStreamEOS(google.protobuf.message.Message): global___VideoStreamEOS = VideoStreamEOS -@typing_extensions.final +@typing.final class VideoSourceResolution(google.protobuf.message.Message): """ VideoSource @@ -522,11 +524,11 @@ class VideoSourceResolution(google.protobuf.message.Message): width: builtins.int = ..., height: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["height", b"height", "width", b"width"]) -> None: ... + def ClearField(self, field_name: typing.Literal["height", b"height", "width", b"width"]) -> None: ... global___VideoSourceResolution = VideoSourceResolution -@typing_extensions.final +@typing.final class VideoSourceInfo(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -537,11 +539,11 @@ class VideoSourceInfo(google.protobuf.message.Message): *, type: global___VideoSourceType.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["type", b"type"]) -> None: ... + def ClearField(self, field_name: typing.Literal["type", b"type"]) -> None: ... global___VideoSourceInfo = VideoSourceInfo -@typing_extensions.final +@typing.final class OwnedVideoSource(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -557,7 +559,7 @@ class OwnedVideoSource(google.protobuf.message.Message): handle: handle_pb2.FfiOwnedHandle | None = ..., info: global___VideoSourceInfo | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["handle", b"handle", "info", b"info"]) -> None: ... + def HasField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["handle", b"handle", "info", b"info"]) -> None: ... global___OwnedVideoSource = OwnedVideoSource diff --git a/livekit-rtc/livekit/rtc/room.py b/livekit-rtc/livekit/rtc/room.py index cda92c17..f472407d 100644 --- a/livekit-rtc/livekit/rtc/room.py +++ b/livekit-rtc/livekit/rtc/room.py @@ -49,6 +49,7 @@ "participant_name_changed", "connection_quality_changed", "data_received", + "sip_dtmf_received", "e2ee_state_changed", "connection_state_changed", "connected", @@ -86,6 +87,13 @@ class DataPacket: ) topic: Optional[str] = None +@dataclass +class SipDTMF: + code: int + digit: str + participant: Optional[RemoteParticipant] = ( + None # None when the data has been sent by a server SDK + ) class ConnectError(Exception): def __init__(self, message: str): @@ -102,6 +110,7 @@ def __init__(self, loop: Optional[asyncio.AbstractEventLoop] = None) -> None: self._info = proto_room.RoomInfo() self.participants: Dict[str, RemoteParticipant] = {} + self.participants_by_identity: Dict[str, RemoteParticipant] = {} self.connection_state = ConnectionState.CONN_DISCONNECTED def __del__(self) -> None: @@ -256,6 +265,7 @@ def _on_room_event(self, event: proto_room.RoomEvent): elif which == "participant_disconnected": sid = event.participant_disconnected.participant_sid rparticipant = self.participants.pop(sid) + self.participants_by_identity.pop(rparticipant.identity) self.emit("participant_disconnected", rparticipant) elif which == "local_track_published": sid = event.local_track_published.track_sid @@ -368,28 +378,40 @@ def _on_room_event(self, event: proto_room.RoomEvent): participant, event.connection_quality_changed.quality, ) - elif which == "data_received": - owned_buffer_info = event.data_received.data - buffer_info = owned_buffer_info.data - native_data = ctypes.cast( - buffer_info.data_ptr, - ctypes.POINTER(ctypes.c_byte * buffer_info.data_len), - ).contents - - data = bytes(native_data) - FfiHandle(owned_buffer_info.handle.id) - rparticipant = None - if event.data_received.participant_sid: - rparticipant = self.participants[event.data_received.participant_sid] - self.emit( - "data_received", - DataPacket( - data=data, - kind=event.data_received.kind, - participant=rparticipant, - topic=event.data_received.topic, - ), - ) + elif which == "data_packet_received": + packet = event.data_packet_received + which_val = packet.WhichOneof("value") + if which_val == "user": + owned_buffer_info = packet.user.data + buffer_info = owned_buffer_info.data + native_data = ctypes.cast( + buffer_info.data_ptr, + ctypes.POINTER(ctypes.c_byte * buffer_info.data_len), + ).contents + + data = bytes(native_data) + FfiHandle(owned_buffer_info.handle.id) + rparticipant = self._retrieve_remote_participant(packet.participant_sid, packet.participant_identity) + self.emit( + "data_received", + DataPacket( + data=data, + kind=packet.kind, + participant=rparticipant, + topic=packet.user.topic, + ), + ) + elif which_val == "sip_dtmf": + rparticipant = self._retrieve_remote_participant(packet.participant_sid, packet.participant_identity) + self.emit( + "sip_dtmf_received", + SipDTMF( + code=packet.sip_dtmf.code, + digit=packet.sip_dtmf.digit, + participant=rparticipant, + ), + ) + elif which == "e2ee_state_changed": sid = event.e2ee_state_changed.participant_sid e2ee_state = event.e2ee_state_changed.state @@ -407,20 +429,34 @@ def _on_room_event(self, event: proto_room.RoomEvent): elif which == "reconnected": self.emit("reconnected") - def _retrieve_participant(self, sid: str) -> Participant: - """Retrieve a participant by sid, returns the LocalParticipant - if sid matches""" - if sid == self.local_participant.sid: + def _retrieve_remote_participant(self, sid: str, identity: str) -> RemoteParticipant: + """Retrieve a remote participant by sid or identity""" + participant = None + if identity: + participant = self.participants_by_identity[identity] + if not identity and sid: + participant = self.participants[sid] + return participant + + def _retrieve_participant(self, sid: str, identity: str) -> Participant: + """Retrieve a participant by sid or identity, + returns the LocalParticipant if sid or identity matches""" + if identity and identity == self.local_participant.identity: + return self.local_participant + if sid and sid == self.local_participant.sid: return self.local_participant else: - return self.participants[sid] + return self._retrieve_remote_participant(sid, identity) def _create_remote_participant( self, owned_info: proto_participant.OwnedParticipant ) -> RemoteParticipant: if owned_info.info.sid in self.participants: raise Exception("participant already exists") + if owned_info.info.identity in self.participants_by_identity: + raise Exception("participant already exists") participant = RemoteParticipant(owned_info) self.participants[participant.sid] = participant + self.participants_by_identity[participant.identity] = participant return participant diff --git a/livekit-rtc/rust-sdks b/livekit-rtc/rust-sdks index 2e6055a6..5ea87803 160000 --- a/livekit-rtc/rust-sdks +++ b/livekit-rtc/rust-sdks @@ -1 +1 @@ -Subproject commit 2e6055a6f6736d05c7e3304e434097da2f13d633 +Subproject commit 5ea87803214af8f7bb457ecf126a29975922a249