diff --git a/livekit-protocol/generate_proto.sh b/livekit-protocol/generate_proto.sh index 72b83961..ba10fbc6 100755 --- a/livekit-protocol/generate_proto.sh +++ b/livekit-protocol/generate_proto.sh @@ -33,6 +33,28 @@ protoc \ touch -a "$API_OUT_PYTHON/__init__.py" -for f in "$API_OUT_PYTHON"/*.py "$API_OUT_PYTHON"/*.pyi; do - perl -i -pe 's|^(import (livekit_egress_pb2\|livekit_room_pb2\|livekit_webhook_pb2\|livekit_ingress_pb2\|livekit_models_pb2\|livekit_agent_pb2))|from . $1|g' "$f" -done + +# Patch the proto stubs + +# 1. rename the files +# 2. change the imports to relative imports +# 3. add __init__.py to the directory +# 4. remove livekit_ prefix +# 5. remove _pb2 suffix + +mv "$API_OUT_PYTHON/livekit_egress_pb2.py" "$API_OUT_PYTHON/egress.py" +mv "$API_OUT_PYTHON/livekit_egress_pb2.pyi" "$API_OUT_PYTHON/egress.pyi" +mv "$API_OUT_PYTHON/livekit_room_pb2.py" "$API_OUT_PYTHON/room.py" +mv "$API_OUT_PYTHON/livekit_room_pb2.pyi" "$API_OUT_PYTHON/room.pyi" +mv "$API_OUT_PYTHON/livekit_webhook_pb2.py" "$API_OUT_PYTHON/webhook.py" +mv "$API_OUT_PYTHON/livekit_webhook_pb2.pyi" "$API_OUT_PYTHON/webhook.pyi" +mv "$API_OUT_PYTHON/livekit_ingress_pb2.py" "$API_OUT_PYTHON/ingress.py" +mv "$API_OUT_PYTHON/livekit_ingress_pb2.pyi" "$API_OUT_PYTHON/ingress.pyi" +mv "$API_OUT_PYTHON/livekit_models_pb2.py" "$API_OUT_PYTHON/models.py" +mv "$API_OUT_PYTHON/livekit_models_pb2.pyi" "$API_OUT_PYTHON/models.pyi" +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" + +perl -i -pe 's|^(import (livekit_egress_pb2\|livekit_room_pb2\|livekit_webhook_pb2\|livekit_ingress_pb2\|livekit_models_pb2\|livekit_agent_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/__init__.py b/livekit-protocol/livekit/protocol/__init__.py index 974f25c0..2615b86b 100644 --- a/livekit-protocol/livekit/protocol/__init__.py +++ b/livekit-protocol/livekit/protocol/__init__.py @@ -1,9 +1,8 @@ -from . import livekit_agent_pb2 as agent -from . import livekit_egress_pb2 as egress -from . import livekit_ingress_pb2 as ingress -from . import livekit_models_pb2 as models -from . import livekit_room_pb2 as room -from . import livekit_webhook_pb2 as webhook - +from . import agent +from . import egress +from . import ingress +from . import models +from . import room +from . import webhook from .version import __version__ diff --git a/livekit-protocol/livekit/protocol/livekit_agent_pb2.py b/livekit-protocol/livekit/protocol/agent.py similarity index 97% rename from livekit-protocol/livekit/protocol/livekit_agent_pb2.py rename to livekit-protocol/livekit/protocol/agent.py index e1642361..87a27d17 100644 --- a/livekit-protocol/livekit/protocol/livekit_agent_pb2.py +++ b/livekit-protocol/livekit/protocol/agent.py @@ -11,14 +11,14 @@ _sym_db = _symbol_database.Default() -from . import livekit_models_pb2 as livekit__models__pb2 +from . import models as _models_ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13livekit_agent.proto\x12\x07livekit\x1a\x14livekit_models.proto\"6\n\tAgentInfo\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\"\x92\x01\n\x03Job\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1e\n\x04type\x18\x02 \x01(\x0e\x32\x10.livekit.JobType\x12\x1b\n\x04room\x18\x03 \x01(\x0b\x32\r.livekit.Room\x12\x32\n\x0bparticipant\x18\x04 \x01(\x0b\x32\x18.livekit.ParticipantInfoH\x00\x88\x01\x01\x42\x0e\n\x0c_participant\"\xe4\x01\n\rWorkerMessage\x12\x32\n\x08register\x18\x01 \x01(\x0b\x32\x1e.livekit.RegisterWorkerRequestH\x00\x12\x35\n\x0c\x61vailability\x18\x02 \x01(\x0b\x32\x1d.livekit.AvailabilityResponseH\x00\x12-\n\x06status\x18\x03 \x01(\x0b\x32\x1b.livekit.UpdateWorkerStatusH\x00\x12.\n\njob_update\x18\x04 \x01(\x0b\x32\x18.livekit.JobStatusUpdateH\x00\x42\t\n\x07message\"\xb3\x01\n\rServerMessage\x12\x33\n\x08register\x18\x01 \x01(\x0b\x32\x1f.livekit.RegisterWorkerResponseH\x00\x12\x34\n\x0c\x61vailability\x18\x02 \x01(\x0b\x32\x1c.livekit.AvailabilityRequestH\x00\x12,\n\nassignment\x18\x03 \x01(\x0b\x32\x16.livekit.JobAssignmentH\x00\x42\t\n\x07message\"i\n\x15RegisterWorkerRequest\x12\x1e\n\x04type\x18\x01 \x01(\x0e\x32\x10.livekit.JobType\x12\x11\n\tworker_id\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\"C\n\x16RegisterWorkerResponse\x12\x11\n\tworker_id\x18\x01 \x01(\t\x12\x16\n\x0eserver_version\x18\x02 \x01(\t\"0\n\x13\x41vailabilityRequest\x12\x19\n\x03job\x18\x01 \x01(\x0b\x32\x0c.livekit.Job\"9\n\x14\x41vailabilityResponse\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\x11\n\tavailable\x18\x02 \x01(\x08\"g\n\x0fJobStatusUpdate\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\"\n\x06status\x18\x02 \x01(\x0e\x32\x12.livekit.JobStatus\x12\r\n\x05\x65rror\x18\x03 \x01(\t\x12\x11\n\tuser_data\x18\x04 \x01(\t\"*\n\rJobAssignment\x12\x19\n\x03job\x18\x01 \x01(\x0b\x32\x0c.livekit.Job\";\n\x12UpdateWorkerStatus\x12%\n\x06status\x18\x01 \x01(\x0e\x32\x15.livekit.WorkerStatus*(\n\x07JobType\x12\x0b\n\x07JT_ROOM\x10\x00\x12\x10\n\x0cJT_PUBLISHER\x10\x01*-\n\x0cWorkerStatus\x12\x10\n\x0cWS_AVAILABLE\x10\x00\x12\x0b\n\x07WS_FULL\x10\x01*:\n\tJobStatus\x12\x0e\n\nJS_UNKNOWN\x10\x00\x12\x0e\n\nJS_SUCCESS\x10\x01\x12\r\n\tJS_FAILED\x10\x02\x42\x46Z#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'livekit_agent_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'agent', _globals) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None diff --git a/livekit-protocol/livekit/protocol/livekit_agent_pb2.pyi b/livekit-protocol/livekit/protocol/agent.pyi similarity index 97% rename from livekit-protocol/livekit/protocol/livekit_agent_pb2.pyi rename to livekit-protocol/livekit/protocol/agent.pyi index 68ba150f..eda112f7 100644 --- a/livekit-protocol/livekit/protocol/livekit_agent_pb2.pyi +++ b/livekit-protocol/livekit/protocol/agent.pyi @@ -19,7 +19,7 @@ import builtins import google.protobuf.descriptor import google.protobuf.internal.enum_type_wrapper import google.protobuf.message -from . import livekit_models_pb2 +from . import models import sys import typing @@ -109,16 +109,16 @@ class Job(google.protobuf.message.Message): id: builtins.str type: global___JobType.ValueType @property - def room(self) -> livekit_models_pb2.Room: ... + def room(self) -> models.Room: ... @property - def participant(self) -> livekit_models_pb2.ParticipantInfo: ... + def participant(self) -> models.ParticipantInfo: ... def __init__( self, *, id: builtins.str = ..., type: global___JobType.ValueType = ..., - room: livekit_models_pb2.Room | None = ..., - participant: livekit_models_pb2.ParticipantInfo | None = ..., + room: models.Room | None = ..., + participant: models.ParticipantInfo | None = ..., ) -> None: ... def HasField(self, field_name: typing_extensions.Literal["_participant", b"_participant", "participant", b"participant", "room", b"room"]) -> builtins.bool: ... def ClearField(self, field_name: typing_extensions.Literal["_participant", b"_participant", "id", b"id", "participant", b"participant", "room", b"room", "type", b"type"]) -> None: ... diff --git a/livekit-protocol/livekit/protocol/livekit_egress_pb2.py b/livekit-protocol/livekit/protocol/egress.py similarity index 99% rename from livekit-protocol/livekit/protocol/livekit_egress_pb2.py rename to livekit-protocol/livekit/protocol/egress.py index 9554f299..17513758 100644 --- a/livekit-protocol/livekit/protocol/livekit_egress_pb2.py +++ b/livekit-protocol/livekit/protocol/egress.py @@ -11,14 +11,14 @@ _sym_db = _symbol_database.Default() -from . import livekit_models_pb2 as livekit__models__pb2 +from . import models as _models_ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14livekit_egress.proto\x12\x07livekit\x1a\x14livekit_models.proto\"\xcd\x04\n\x1aRoomCompositeEgressRequest\x12\x11\n\troom_name\x18\x01 \x01(\t\x12\x0e\n\x06layout\x18\x02 \x01(\t\x12\x12\n\naudio_only\x18\x03 \x01(\x08\x12\x12\n\nvideo_only\x18\x04 \x01(\x08\x12\x17\n\x0f\x63ustom_base_url\x18\x05 \x01(\t\x12.\n\x04\x66ile\x18\x06 \x01(\x0b\x32\x1a.livekit.EncodedFileOutputB\x02\x18\x01H\x00\x12+\n\x06stream\x18\x07 \x01(\x0b\x32\x15.livekit.StreamOutputB\x02\x18\x01H\x00\x12\x34\n\x08segments\x18\n \x01(\x0b\x32\x1c.livekit.SegmentedFileOutputB\x02\x18\x01H\x00\x12\x30\n\x06preset\x18\x08 \x01(\x0e\x32\x1e.livekit.EncodingOptionsPresetH\x01\x12,\n\x08\x61\x64vanced\x18\t \x01(\x0b\x32\x18.livekit.EncodingOptionsH\x01\x12\x30\n\x0c\x66ile_outputs\x18\x0b \x03(\x0b\x32\x1a.livekit.EncodedFileOutput\x12-\n\x0estream_outputs\x18\x0c \x03(\x0b\x32\x15.livekit.StreamOutput\x12\x35\n\x0fsegment_outputs\x18\r \x03(\x0b\x32\x1c.livekit.SegmentedFileOutput\x12+\n\rimage_outputs\x18\x0e \x03(\x0b\x32\x14.livekit.ImageOutputB\x08\n\x06outputB\t\n\x07options\"\xb0\x04\n\x10WebEgressRequest\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x12\n\naudio_only\x18\x02 \x01(\x08\x12\x12\n\nvideo_only\x18\x03 \x01(\x08\x12\x1a\n\x12\x61wait_start_signal\x18\x0c \x01(\x08\x12.\n\x04\x66ile\x18\x04 \x01(\x0b\x32\x1a.livekit.EncodedFileOutputB\x02\x18\x01H\x00\x12+\n\x06stream\x18\x05 \x01(\x0b\x32\x15.livekit.StreamOutputB\x02\x18\x01H\x00\x12\x34\n\x08segments\x18\x06 \x01(\x0b\x32\x1c.livekit.SegmentedFileOutputB\x02\x18\x01H\x00\x12\x30\n\x06preset\x18\x07 \x01(\x0e\x32\x1e.livekit.EncodingOptionsPresetH\x01\x12,\n\x08\x61\x64vanced\x18\x08 \x01(\x0b\x32\x18.livekit.EncodingOptionsH\x01\x12\x30\n\x0c\x66ile_outputs\x18\t \x03(\x0b\x32\x1a.livekit.EncodedFileOutput\x12-\n\x0estream_outputs\x18\n \x03(\x0b\x32\x15.livekit.StreamOutput\x12\x35\n\x0fsegment_outputs\x18\x0b \x03(\x0b\x32\x1c.livekit.SegmentedFileOutput\x12+\n\rimage_outputs\x18\r \x03(\x0b\x32\x14.livekit.ImageOutputB\x08\n\x06outputB\t\n\x07options\"\x85\x03\n\x18ParticipantEgressRequest\x12\x11\n\troom_name\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x14\n\x0cscreen_share\x18\x03 \x01(\x08\x12\x30\n\x06preset\x18\x04 \x01(\x0e\x32\x1e.livekit.EncodingOptionsPresetH\x00\x12,\n\x08\x61\x64vanced\x18\x05 \x01(\x0b\x32\x18.livekit.EncodingOptionsH\x00\x12\x30\n\x0c\x66ile_outputs\x18\x06 \x03(\x0b\x32\x1a.livekit.EncodedFileOutput\x12-\n\x0estream_outputs\x18\x07 \x03(\x0b\x32\x15.livekit.StreamOutput\x12\x35\n\x0fsegment_outputs\x18\x08 \x03(\x0b\x32\x1c.livekit.SegmentedFileOutput\x12+\n\rimage_outputs\x18\t \x03(\x0b\x32\x14.livekit.ImageOutputB\t\n\x07options\"\xad\x04\n\x1bTrackCompositeEgressRequest\x12\x11\n\troom_name\x18\x01 \x01(\t\x12\x16\n\x0e\x61udio_track_id\x18\x02 \x01(\t\x12\x16\n\x0evideo_track_id\x18\x03 \x01(\t\x12.\n\x04\x66ile\x18\x04 \x01(\x0b\x32\x1a.livekit.EncodedFileOutputB\x02\x18\x01H\x00\x12+\n\x06stream\x18\x05 \x01(\x0b\x32\x15.livekit.StreamOutputB\x02\x18\x01H\x00\x12\x34\n\x08segments\x18\x08 \x01(\x0b\x32\x1c.livekit.SegmentedFileOutputB\x02\x18\x01H\x00\x12\x30\n\x06preset\x18\x06 \x01(\x0e\x32\x1e.livekit.EncodingOptionsPresetH\x01\x12,\n\x08\x61\x64vanced\x18\x07 \x01(\x0b\x32\x18.livekit.EncodingOptionsH\x01\x12\x30\n\x0c\x66ile_outputs\x18\x0b \x03(\x0b\x32\x1a.livekit.EncodedFileOutput\x12-\n\x0estream_outputs\x18\x0c \x03(\x0b\x32\x15.livekit.StreamOutput\x12\x35\n\x0fsegment_outputs\x18\r \x03(\x0b\x32\x1c.livekit.SegmentedFileOutput\x12+\n\rimage_outputs\x18\x0e \x03(\x0b\x32\x14.livekit.ImageOutputB\x08\n\x06outputB\t\n\x07options\"\x87\x01\n\x12TrackEgressRequest\x12\x11\n\troom_name\x18\x01 \x01(\t\x12\x10\n\x08track_id\x18\x02 \x01(\t\x12)\n\x04\x66ile\x18\x03 \x01(\x0b\x32\x19.livekit.DirectFileOutputH\x00\x12\x17\n\rwebsocket_url\x18\x04 \x01(\tH\x00\x42\x08\n\x06output\"\x8e\x02\n\x11\x45ncodedFileOutput\x12+\n\tfile_type\x18\x01 \x01(\x0e\x32\x18.livekit.EncodedFileType\x12\x10\n\x08\x66ilepath\x18\x02 \x01(\t\x12\x18\n\x10\x64isable_manifest\x18\x06 \x01(\x08\x12\x1f\n\x02s3\x18\x03 \x01(\x0b\x32\x11.livekit.S3UploadH\x00\x12!\n\x03gcp\x18\x04 \x01(\x0b\x32\x12.livekit.GCPUploadH\x00\x12)\n\x05\x61zure\x18\x05 \x01(\x0b\x32\x18.livekit.AzureBlobUploadH\x00\x12\'\n\x06\x61liOSS\x18\x07 \x01(\x0b\x32\x15.livekit.AliOSSUploadH\x00\x42\x08\n\x06output\"\xa0\x03\n\x13SegmentedFileOutput\x12\x30\n\x08protocol\x18\x01 \x01(\x0e\x32\x1e.livekit.SegmentedFileProtocol\x12\x17\n\x0f\x66ilename_prefix\x18\x02 \x01(\t\x12\x15\n\rplaylist_name\x18\x03 \x01(\t\x12\x1a\n\x12live_playlist_name\x18\x0b \x01(\t\x12\x18\n\x10segment_duration\x18\x04 \x01(\r\x12\x35\n\x0f\x66ilename_suffix\x18\n \x01(\x0e\x32\x1c.livekit.SegmentedFileSuffix\x12\x18\n\x10\x64isable_manifest\x18\x08 \x01(\x08\x12\x1f\n\x02s3\x18\x05 \x01(\x0b\x32\x11.livekit.S3UploadH\x00\x12!\n\x03gcp\x18\x06 \x01(\x0b\x32\x12.livekit.GCPUploadH\x00\x12)\n\x05\x61zure\x18\x07 \x01(\x0b\x32\x18.livekit.AzureBlobUploadH\x00\x12\'\n\x06\x61liOSS\x18\t \x01(\x0b\x32\x15.livekit.AliOSSUploadH\x00\x42\x08\n\x06output\"\xe0\x01\n\x10\x44irectFileOutput\x12\x10\n\x08\x66ilepath\x18\x01 \x01(\t\x12\x18\n\x10\x64isable_manifest\x18\x05 \x01(\x08\x12\x1f\n\x02s3\x18\x02 \x01(\x0b\x32\x11.livekit.S3UploadH\x00\x12!\n\x03gcp\x18\x03 \x01(\x0b\x32\x12.livekit.GCPUploadH\x00\x12)\n\x05\x61zure\x18\x04 \x01(\x0b\x32\x18.livekit.AzureBlobUploadH\x00\x12\'\n\x06\x61liOSS\x18\x06 \x01(\x0b\x32\x15.livekit.AliOSSUploadH\x00\x42\x08\n\x06output\"\xf8\x02\n\x0bImageOutput\x12\x18\n\x10\x63\x61pture_interval\x18\x01 \x01(\r\x12\r\n\x05width\x18\x02 \x01(\x05\x12\x0e\n\x06height\x18\x03 \x01(\x05\x12\x17\n\x0f\x66ilename_prefix\x18\x04 \x01(\t\x12\x31\n\x0f\x66ilename_suffix\x18\x05 \x01(\x0e\x32\x18.livekit.ImageFileSuffix\x12(\n\x0bimage_codec\x18\x06 \x01(\x0e\x32\x13.livekit.ImageCodec\x12\x18\n\x10\x64isable_manifest\x18\x07 \x01(\x08\x12\x1f\n\x02s3\x18\x08 \x01(\x0b\x32\x11.livekit.S3UploadH\x00\x12!\n\x03gcp\x18\t \x01(\x0b\x32\x12.livekit.GCPUploadH\x00\x12)\n\x05\x61zure\x18\n \x01(\x0b\x32\x18.livekit.AzureBlobUploadH\x00\x12\'\n\x06\x61liOSS\x18\x0b \x01(\x0b\x32\x15.livekit.AliOSSUploadH\x00\x42\x08\n\x06output\"\xef\x01\n\x08S3Upload\x12\x12\n\naccess_key\x18\x01 \x01(\t\x12\x0e\n\x06secret\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x03 \x01(\t\x12\x10\n\x08\x65ndpoint\x18\x04 \x01(\t\x12\x0e\n\x06\x62ucket\x18\x05 \x01(\t\x12\x18\n\x10\x66orce_path_style\x18\x06 \x01(\x08\x12\x31\n\x08metadata\x18\x07 \x03(\x0b\x32\x1f.livekit.S3Upload.MetadataEntry\x12\x0f\n\x07tagging\x18\x08 \x01(\t\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"0\n\tGCPUpload\x12\x13\n\x0b\x63redentials\x18\x01 \x01(\t\x12\x0e\n\x06\x62ucket\x18\x02 \x01(\t\"T\n\x0f\x41zureBlobUpload\x12\x14\n\x0c\x61\x63\x63ount_name\x18\x01 \x01(\t\x12\x13\n\x0b\x61\x63\x63ount_key\x18\x02 \x01(\t\x12\x16\n\x0e\x63ontainer_name\x18\x03 \x01(\t\"d\n\x0c\x41liOSSUpload\x12\x12\n\naccess_key\x18\x01 \x01(\t\x12\x0e\n\x06secret\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x03 \x01(\t\x12\x10\n\x08\x65ndpoint\x18\x04 \x01(\t\x12\x0e\n\x06\x62ucket\x18\x05 \x01(\t\"G\n\x0cStreamOutput\x12)\n\x08protocol\x18\x01 \x01(\x0e\x32\x17.livekit.StreamProtocol\x12\x0c\n\x04urls\x18\x02 \x03(\t\"\xb7\x02\n\x0f\x45ncodingOptions\x12\r\n\x05width\x18\x01 \x01(\x05\x12\x0e\n\x06height\x18\x02 \x01(\x05\x12\r\n\x05\x64\x65pth\x18\x03 \x01(\x05\x12\x11\n\tframerate\x18\x04 \x01(\x05\x12(\n\x0b\x61udio_codec\x18\x05 \x01(\x0e\x32\x13.livekit.AudioCodec\x12\x15\n\raudio_bitrate\x18\x06 \x01(\x05\x12\x15\n\raudio_quality\x18\x0b \x01(\x05\x12\x17\n\x0f\x61udio_frequency\x18\x07 \x01(\x05\x12(\n\x0bvideo_codec\x18\x08 \x01(\x0e\x32\x13.livekit.VideoCodec\x12\x15\n\rvideo_bitrate\x18\t \x01(\x05\x12\x15\n\rvideo_quality\x18\x0c \x01(\x05\x12\x1a\n\x12key_frame_interval\x18\n \x01(\x01\"8\n\x13UpdateLayoutRequest\x12\x11\n\tegress_id\x18\x01 \x01(\t\x12\x0e\n\x06layout\x18\x02 \x01(\t\"]\n\x13UpdateStreamRequest\x12\x11\n\tegress_id\x18\x01 \x01(\t\x12\x17\n\x0f\x61\x64\x64_output_urls\x18\x02 \x03(\t\x12\x1a\n\x12remove_output_urls\x18\x03 \x03(\t\"I\n\x11ListEgressRequest\x12\x11\n\troom_name\x18\x01 \x01(\t\x12\x11\n\tegress_id\x18\x02 \x01(\t\x12\x0e\n\x06\x61\x63tive\x18\x03 \x01(\x08\"8\n\x12ListEgressResponse\x12\"\n\x05items\x18\x01 \x03(\x0b\x32\x13.livekit.EgressInfo\"&\n\x11StopEgressRequest\x12\x11\n\tegress_id\x18\x01 \x01(\t\"\x91\x06\n\nEgressInfo\x12\x11\n\tegress_id\x18\x01 \x01(\t\x12\x0f\n\x07room_id\x18\x02 \x01(\t\x12\x11\n\troom_name\x18\r \x01(\t\x12%\n\x06status\x18\x03 \x01(\x0e\x32\x15.livekit.EgressStatus\x12\x12\n\nstarted_at\x18\n \x01(\x03\x12\x10\n\x08\x65nded_at\x18\x0b \x01(\x03\x12\x12\n\nupdated_at\x18\x12 \x01(\x03\x12\r\n\x05\x65rror\x18\t \x01(\t\x12=\n\x0eroom_composite\x18\x04 \x01(\x0b\x32#.livekit.RoomCompositeEgressRequestH\x00\x12(\n\x03web\x18\x0e \x01(\x0b\x32\x19.livekit.WebEgressRequestH\x00\x12\x38\n\x0bparticipant\x18\x13 \x01(\x0b\x32!.livekit.ParticipantEgressRequestH\x00\x12?\n\x0ftrack_composite\x18\x05 \x01(\x0b\x32$.livekit.TrackCompositeEgressRequestH\x00\x12,\n\x05track\x18\x06 \x01(\x0b\x32\x1b.livekit.TrackEgressRequestH\x00\x12-\n\x06stream\x18\x07 \x01(\x0b\x32\x17.livekit.StreamInfoListB\x02\x18\x01H\x01\x12%\n\x04\x66ile\x18\x08 \x01(\x0b\x32\x11.livekit.FileInfoB\x02\x18\x01H\x01\x12-\n\x08segments\x18\x0c \x01(\x0b\x32\x15.livekit.SegmentsInfoB\x02\x18\x01H\x01\x12+\n\x0estream_results\x18\x0f \x03(\x0b\x32\x13.livekit.StreamInfo\x12\'\n\x0c\x66ile_results\x18\x10 \x03(\x0b\x32\x11.livekit.FileInfo\x12.\n\x0fsegment_results\x18\x11 \x03(\x0b\x32\x15.livekit.SegmentsInfo\x12*\n\rimage_results\x18\x14 \x03(\x0b\x32\x13.livekit.ImagesInfoB\t\n\x07requestB\x08\n\x06result\"7\n\x0eStreamInfoList\x12!\n\x04info\x18\x01 \x03(\x0b\x32\x13.livekit.StreamInfo:\x02\x18\x01\"\xbc\x01\n\nStreamInfo\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x12\n\nstarted_at\x18\x02 \x01(\x03\x12\x10\n\x08\x65nded_at\x18\x03 \x01(\x03\x12\x10\n\x08\x64uration\x18\x04 \x01(\x03\x12*\n\x06status\x18\x05 \x01(\x0e\x32\x1a.livekit.StreamInfo.Status\x12\r\n\x05\x65rror\x18\x06 \x01(\t\".\n\x06Status\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\x0c\n\x08\x46INISHED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\"t\n\x08\x46ileInfo\x12\x10\n\x08\x66ilename\x18\x01 \x01(\t\x12\x12\n\nstarted_at\x18\x02 \x01(\x03\x12\x10\n\x08\x65nded_at\x18\x03 \x01(\x03\x12\x10\n\x08\x64uration\x18\x06 \x01(\x03\x12\x0c\n\x04size\x18\x04 \x01(\x03\x12\x10\n\x08location\x18\x05 \x01(\t\"\xd9\x01\n\x0cSegmentsInfo\x12\x15\n\rplaylist_name\x18\x01 \x01(\t\x12\x1a\n\x12live_playlist_name\x18\x08 \x01(\t\x12\x10\n\x08\x64uration\x18\x02 \x01(\x03\x12\x0c\n\x04size\x18\x03 \x01(\x03\x12\x19\n\x11playlist_location\x18\x04 \x01(\t\x12\x1e\n\x16live_playlist_location\x18\t \x01(\t\x12\x15\n\rsegment_count\x18\x05 \x01(\x03\x12\x12\n\nstarted_at\x18\x06 \x01(\x03\x12\x10\n\x08\x65nded_at\x18\x07 \x01(\x03\"G\n\nImagesInfo\x12\x13\n\x0bimage_count\x18\x01 \x01(\x03\x12\x12\n\nstarted_at\x18\x02 \x01(\x03\x12\x10\n\x08\x65nded_at\x18\x03 \x01(\x03\"\xeb\x01\n\x15\x41utoParticipantEgress\x12\x30\n\x06preset\x18\x01 \x01(\x0e\x32\x1e.livekit.EncodingOptionsPresetH\x00\x12,\n\x08\x61\x64vanced\x18\x02 \x01(\x0b\x32\x18.livekit.EncodingOptionsH\x00\x12\x30\n\x0c\x66ile_outputs\x18\x03 \x03(\x0b\x32\x1a.livekit.EncodedFileOutput\x12\x35\n\x0fsegment_outputs\x18\x04 \x03(\x0b\x32\x1c.livekit.SegmentedFileOutputB\t\n\x07options\"\xb6\x01\n\x0f\x41utoTrackEgress\x12\x10\n\x08\x66ilepath\x18\x01 \x01(\t\x12\x18\n\x10\x64isable_manifest\x18\x05 \x01(\x08\x12\x1f\n\x02s3\x18\x02 \x01(\x0b\x32\x11.livekit.S3UploadH\x00\x12!\n\x03gcp\x18\x03 \x01(\x0b\x32\x12.livekit.GCPUploadH\x00\x12)\n\x05\x61zure\x18\x04 \x01(\x0b\x32\x18.livekit.AzureBlobUploadH\x00\x42\x08\n\x06output*9\n\x0f\x45ncodedFileType\x12\x14\n\x10\x44\x45\x46\x41ULT_FILETYPE\x10\x00\x12\x07\n\x03MP4\x10\x01\x12\x07\n\x03OGG\x10\x02*N\n\x15SegmentedFileProtocol\x12#\n\x1f\x44\x45\x46\x41ULT_SEGMENTED_FILE_PROTOCOL\x10\x00\x12\x10\n\x0cHLS_PROTOCOL\x10\x01*/\n\x13SegmentedFileSuffix\x12\t\n\x05INDEX\x10\x00\x12\r\n\tTIMESTAMP\x10\x01*E\n\x0fImageFileSuffix\x12\x16\n\x12IMAGE_SUFFIX_INDEX\x10\x00\x12\x1a\n\x16IMAGE_SUFFIX_TIMESTAMP\x10\x01*0\n\x0eStreamProtocol\x12\x14\n\x10\x44\x45\x46\x41ULT_PROTOCOL\x10\x00\x12\x08\n\x04RTMP\x10\x01*\xcf\x01\n\x15\x45ncodingOptionsPreset\x12\x10\n\x0cH264_720P_30\x10\x00\x12\x10\n\x0cH264_720P_60\x10\x01\x12\x11\n\rH264_1080P_30\x10\x02\x12\x11\n\rH264_1080P_60\x10\x03\x12\x19\n\x15PORTRAIT_H264_720P_30\x10\x04\x12\x19\n\x15PORTRAIT_H264_720P_60\x10\x05\x12\x1a\n\x16PORTRAIT_H264_1080P_30\x10\x06\x12\x1a\n\x16PORTRAIT_H264_1080P_60\x10\x07*\x9f\x01\n\x0c\x45gressStatus\x12\x13\n\x0f\x45GRESS_STARTING\x10\x00\x12\x11\n\rEGRESS_ACTIVE\x10\x01\x12\x11\n\rEGRESS_ENDING\x10\x02\x12\x13\n\x0f\x45GRESS_COMPLETE\x10\x03\x12\x11\n\rEGRESS_FAILED\x10\x04\x12\x12\n\x0e\x45GRESS_ABORTED\x10\x05\x12\x18\n\x14\x45GRESS_LIMIT_REACHED\x10\x06\x32\x9c\x05\n\x06\x45gress\x12T\n\x18StartRoomCompositeEgress\x12#.livekit.RoomCompositeEgressRequest\x1a\x13.livekit.EgressInfo\x12@\n\x0eStartWebEgress\x12\x19.livekit.WebEgressRequest\x1a\x13.livekit.EgressInfo\x12P\n\x16StartParticipantEgress\x12!.livekit.ParticipantEgressRequest\x1a\x13.livekit.EgressInfo\x12V\n\x19StartTrackCompositeEgress\x12$.livekit.TrackCompositeEgressRequest\x1a\x13.livekit.EgressInfo\x12\x44\n\x10StartTrackEgress\x12\x1b.livekit.TrackEgressRequest\x1a\x13.livekit.EgressInfo\x12\x41\n\x0cUpdateLayout\x12\x1c.livekit.UpdateLayoutRequest\x1a\x13.livekit.EgressInfo\x12\x41\n\x0cUpdateStream\x12\x1c.livekit.UpdateStreamRequest\x1a\x13.livekit.EgressInfo\x12\x45\n\nListEgress\x12\x1a.livekit.ListEgressRequest\x1a\x1b.livekit.ListEgressResponse\x12=\n\nStopEgress\x12\x1a.livekit.StopEgressRequest\x1a\x13.livekit.EgressInfoBFZ#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'livekit_egress_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'egress', _globals) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None diff --git a/livekit-protocol/livekit/protocol/livekit_egress_pb2.pyi b/livekit-protocol/livekit/protocol/egress.pyi similarity index 99% rename from livekit-protocol/livekit/protocol/livekit_egress_pb2.pyi rename to livekit-protocol/livekit/protocol/egress.pyi index 7ccd5a7e..8652e5a8 100644 --- a/livekit-protocol/livekit/protocol/livekit_egress_pb2.pyi +++ b/livekit-protocol/livekit/protocol/egress.pyi @@ -21,7 +21,7 @@ import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.internal.enum_type_wrapper import google.protobuf.message -from . import livekit_models_pb2 +from . import models import sys import typing @@ -640,7 +640,7 @@ class ImageOutput(google.protobuf.message.Message): """(optional)""" filename_suffix: global___ImageFileSuffix.ValueType """(optional, default INDEX)""" - image_codec: livekit_models_pb2.ImageCodec.ValueType + image_codec: models.ImageCodec.ValueType """(optional)""" disable_manifest: builtins.bool """disable upload of manifest file (default false)""" @@ -660,7 +660,7 @@ class ImageOutput(google.protobuf.message.Message): height: builtins.int = ..., filename_prefix: builtins.str = ..., filename_suffix: global___ImageFileSuffix.ValueType = ..., - image_codec: livekit_models_pb2.ImageCodec.ValueType = ..., + image_codec: models.ImageCodec.ValueType = ..., disable_manifest: builtins.bool = ..., s3: global___S3Upload | None = ..., gcp: global___GCPUpload | None = ..., @@ -837,7 +837,7 @@ class EncodingOptions(google.protobuf.message.Message): """(default 24)""" framerate: builtins.int """(default 30)""" - audio_codec: livekit_models_pb2.AudioCodec.ValueType + audio_codec: models.AudioCodec.ValueType """(default OPUS)""" audio_bitrate: builtins.int """(default 128)""" @@ -845,7 +845,7 @@ class EncodingOptions(google.protobuf.message.Message): """quality setting on audio encoder""" audio_frequency: builtins.int """(default 44100)""" - video_codec: livekit_models_pb2.VideoCodec.ValueType + video_codec: models.VideoCodec.ValueType """(default H264_MAIN)""" video_bitrate: builtins.int """(default 4500)""" @@ -860,11 +860,11 @@ class EncodingOptions(google.protobuf.message.Message): height: builtins.int = ..., depth: builtins.int = ..., framerate: builtins.int = ..., - audio_codec: livekit_models_pb2.AudioCodec.ValueType = ..., + audio_codec: models.AudioCodec.ValueType = ..., audio_bitrate: builtins.int = ..., audio_quality: builtins.int = ..., audio_frequency: builtins.int = ..., - video_codec: livekit_models_pb2.VideoCodec.ValueType = ..., + video_codec: models.VideoCodec.ValueType = ..., video_bitrate: builtins.int = ..., video_quality: builtins.int = ..., key_frame_interval: builtins.float = ..., @@ -1082,7 +1082,7 @@ class StreamInfo(google.protobuf.message.Message): ValueType = typing.NewType("ValueType", builtins.int) V: typing_extensions.TypeAlias = ValueType - class _StatusEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[StreamInfo._Status.ValueType], builtins.type): # noqa: F821 + class _StatusEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[StreamInfo._Status.ValueType], builtins.type): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor ACTIVE: StreamInfo._Status.ValueType # 0 FINISHED: StreamInfo._Status.ValueType # 1 diff --git a/livekit-protocol/livekit/protocol/livekit_ingress_pb2.py b/livekit-protocol/livekit/protocol/ingress.py similarity index 98% rename from livekit-protocol/livekit/protocol/livekit_ingress_pb2.py rename to livekit-protocol/livekit/protocol/ingress.py index e44c6cfb..094d63b7 100644 --- a/livekit-protocol/livekit/protocol/livekit_ingress_pb2.py +++ b/livekit-protocol/livekit/protocol/ingress.py @@ -11,14 +11,14 @@ _sym_db = _symbol_database.Default() -from . import livekit_models_pb2 as livekit__models__pb2 +from . import models as _models_ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15livekit_ingress.proto\x12\x07livekit\x1a\x14livekit_models.proto\"\x9d\x02\n\x14\x43reateIngressRequest\x12)\n\ninput_type\x18\x01 \x01(\x0e\x32\x15.livekit.IngressInput\x12\x0b\n\x03url\x18\t \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x11\n\troom_name\x18\x03 \x01(\t\x12\x1c\n\x14participant_identity\x18\x04 \x01(\t\x12\x18\n\x10participant_name\x18\x05 \x01(\t\x12\x1a\n\x12\x62ypass_transcoding\x18\x08 \x01(\x08\x12+\n\x05\x61udio\x18\x06 \x01(\x0b\x32\x1c.livekit.IngressAudioOptions\x12+\n\x05video\x18\x07 \x01(\x0b\x32\x1c.livekit.IngressVideoOptions\"\xcd\x01\n\x13IngressAudioOptions\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x06source\x18\x02 \x01(\x0e\x32\x14.livekit.TrackSource\x12\x35\n\x06preset\x18\x03 \x01(\x0e\x32#.livekit.IngressAudioEncodingPresetH\x00\x12\x37\n\x07options\x18\x04 \x01(\x0b\x32$.livekit.IngressAudioEncodingOptionsH\x00\x42\x12\n\x10\x65ncoding_options\"\xcd\x01\n\x13IngressVideoOptions\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x06source\x18\x02 \x01(\x0e\x32\x14.livekit.TrackSource\x12\x35\n\x06preset\x18\x03 \x01(\x0e\x32#.livekit.IngressVideoEncodingPresetH\x00\x12\x37\n\x07options\x18\x04 \x01(\x0b\x32$.livekit.IngressVideoEncodingOptionsH\x00\x42\x12\n\x10\x65ncoding_options\"\x7f\n\x1bIngressAudioEncodingOptions\x12(\n\x0b\x61udio_codec\x18\x01 \x01(\x0e\x32\x13.livekit.AudioCodec\x12\x0f\n\x07\x62itrate\x18\x02 \x01(\r\x12\x13\n\x0b\x64isable_dtx\x18\x03 \x01(\x08\x12\x10\n\x08\x63hannels\x18\x04 \x01(\r\"\x80\x01\n\x1bIngressVideoEncodingOptions\x12(\n\x0bvideo_codec\x18\x01 \x01(\x0e\x32\x13.livekit.VideoCodec\x12\x12\n\nframe_rate\x18\x02 \x01(\x01\x12#\n\x06layers\x18\x03 \x03(\x0b\x32\x13.livekit.VideoLayer\"\xf4\x02\n\x0bIngressInfo\x12\x12\n\ningress_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x12\n\nstream_key\x18\x03 \x01(\t\x12\x0b\n\x03url\x18\x04 \x01(\t\x12)\n\ninput_type\x18\x05 \x01(\x0e\x32\x15.livekit.IngressInput\x12\x1a\n\x12\x62ypass_transcoding\x18\r \x01(\x08\x12+\n\x05\x61udio\x18\x06 \x01(\x0b\x32\x1c.livekit.IngressAudioOptions\x12+\n\x05video\x18\x07 \x01(\x0b\x32\x1c.livekit.IngressVideoOptions\x12\x11\n\troom_name\x18\x08 \x01(\t\x12\x1c\n\x14participant_identity\x18\t \x01(\t\x12\x18\n\x10participant_name\x18\n \x01(\t\x12\x10\n\x08reusable\x18\x0b \x01(\x08\x12$\n\x05state\x18\x0c \x01(\x0b\x32\x15.livekit.IngressState\"\x8a\x03\n\x0cIngressState\x12,\n\x06status\x18\x01 \x01(\x0e\x32\x1c.livekit.IngressState.Status\x12\r\n\x05\x65rror\x18\x02 \x01(\t\x12\'\n\x05video\x18\x03 \x01(\x0b\x32\x18.livekit.InputVideoState\x12\'\n\x05\x61udio\x18\x04 \x01(\x0b\x32\x18.livekit.InputAudioState\x12\x0f\n\x07room_id\x18\x05 \x01(\t\x12\x12\n\nstarted_at\x18\x07 \x01(\x03\x12\x10\n\x08\x65nded_at\x18\x08 \x01(\x03\x12\x13\n\x0bresource_id\x18\t \x01(\t\x12\"\n\x06tracks\x18\x06 \x03(\x0b\x32\x12.livekit.TrackInfo\"{\n\x06Status\x12\x15\n\x11\x45NDPOINT_INACTIVE\x10\x00\x12\x16\n\x12\x45NDPOINT_BUFFERING\x10\x01\x12\x17\n\x13\x45NDPOINT_PUBLISHING\x10\x02\x12\x12\n\x0e\x45NDPOINT_ERROR\x10\x03\x12\x15\n\x11\x45NDPOINT_COMPLETE\x10\x04\"o\n\x0fInputVideoState\x12\x11\n\tmime_type\x18\x01 \x01(\t\x12\x17\n\x0f\x61verage_bitrate\x18\x02 \x01(\r\x12\r\n\x05width\x18\x03 \x01(\r\x12\x0e\n\x06height\x18\x04 \x01(\r\x12\x11\n\tframerate\x18\x05 \x01(\x01\"d\n\x0fInputAudioState\x12\x11\n\tmime_type\x18\x01 \x01(\t\x12\x17\n\x0f\x61verage_bitrate\x18\x02 \x01(\r\x12\x10\n\x08\x63hannels\x18\x03 \x01(\r\x12\x13\n\x0bsample_rate\x18\x04 \x01(\r\"\x95\x02\n\x14UpdateIngressRequest\x12\x12\n\ningress_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x11\n\troom_name\x18\x03 \x01(\t\x12\x1c\n\x14participant_identity\x18\x04 \x01(\t\x12\x18\n\x10participant_name\x18\x05 \x01(\t\x12\x1f\n\x12\x62ypass_transcoding\x18\x08 \x01(\x08H\x00\x88\x01\x01\x12+\n\x05\x61udio\x18\x06 \x01(\x0b\x32\x1c.livekit.IngressAudioOptions\x12+\n\x05video\x18\x07 \x01(\x0b\x32\x1c.livekit.IngressVideoOptionsB\x15\n\x13_bypass_transcoding\";\n\x12ListIngressRequest\x12\x11\n\troom_name\x18\x01 \x01(\t\x12\x12\n\ningress_id\x18\x02 \x01(\t\":\n\x13ListIngressResponse\x12#\n\x05items\x18\x01 \x03(\x0b\x32\x14.livekit.IngressInfo\"*\n\x14\x44\x65leteIngressRequest\x12\x12\n\ningress_id\x18\x01 \x01(\t*=\n\x0cIngressInput\x12\x0e\n\nRTMP_INPUT\x10\x00\x12\x0e\n\nWHIP_INPUT\x10\x01\x12\r\n\tURL_INPUT\x10\x02*I\n\x1aIngressAudioEncodingPreset\x12\x16\n\x12OPUS_STEREO_96KBPS\x10\x00\x12\x13\n\x0fOPUS_MONO_64KBS\x10\x01*\x84\x03\n\x1aIngressVideoEncodingPreset\x12\x1c\n\x18H264_720P_30FPS_3_LAYERS\x10\x00\x12\x1d\n\x19H264_1080P_30FPS_3_LAYERS\x10\x01\x12\x1c\n\x18H264_540P_25FPS_2_LAYERS\x10\x02\x12\x1b\n\x17H264_720P_30FPS_1_LAYER\x10\x03\x12\x1c\n\x18H264_1080P_30FPS_1_LAYER\x10\x04\x12(\n$H264_720P_30FPS_3_LAYERS_HIGH_MOTION\x10\x05\x12)\n%H264_1080P_30FPS_3_LAYERS_HIGH_MOTION\x10\x06\x12(\n$H264_540P_25FPS_2_LAYERS_HIGH_MOTION\x10\x07\x12\'\n#H264_720P_30FPS_1_LAYER_HIGH_MOTION\x10\x08\x12(\n$H264_1080P_30FPS_1_LAYER_HIGH_MOTION\x10\t2\xa5\x02\n\x07Ingress\x12\x44\n\rCreateIngress\x12\x1d.livekit.CreateIngressRequest\x1a\x14.livekit.IngressInfo\x12\x44\n\rUpdateIngress\x12\x1d.livekit.UpdateIngressRequest\x1a\x14.livekit.IngressInfo\x12H\n\x0bListIngress\x12\x1b.livekit.ListIngressRequest\x1a\x1c.livekit.ListIngressResponse\x12\x44\n\rDeleteIngress\x12\x1d.livekit.DeleteIngressRequest\x1a\x14.livekit.IngressInfoBFZ#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'livekit_ingress_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ingress', _globals) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None diff --git a/livekit-protocol/livekit/protocol/livekit_ingress_pb2.pyi b/livekit-protocol/livekit/protocol/ingress.pyi similarity index 96% rename from livekit-protocol/livekit/protocol/livekit_ingress_pb2.pyi rename to livekit-protocol/livekit/protocol/ingress.pyi index 4867b22f..314e1b73 100644 --- a/livekit-protocol/livekit/protocol/livekit_ingress_pb2.pyi +++ b/livekit-protocol/livekit/protocol/ingress.pyi @@ -21,7 +21,7 @@ import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.internal.enum_type_wrapper import google.protobuf.message -from . import livekit_models_pb2 +from . import models import sys import typing @@ -178,7 +178,7 @@ class IngressAudioOptions(google.protobuf.message.Message): PRESET_FIELD_NUMBER: builtins.int OPTIONS_FIELD_NUMBER: builtins.int name: builtins.str - source: livekit_models_pb2.TrackSource.ValueType + source: models.TrackSource.ValueType preset: global___IngressAudioEncodingPreset.ValueType @property def options(self) -> global___IngressAudioEncodingOptions: ... @@ -186,7 +186,7 @@ class IngressAudioOptions(google.protobuf.message.Message): self, *, name: builtins.str = ..., - source: livekit_models_pb2.TrackSource.ValueType = ..., + source: models.TrackSource.ValueType = ..., preset: global___IngressAudioEncodingPreset.ValueType = ..., options: global___IngressAudioEncodingOptions | None = ..., ) -> None: ... @@ -205,7 +205,7 @@ class IngressVideoOptions(google.protobuf.message.Message): PRESET_FIELD_NUMBER: builtins.int OPTIONS_FIELD_NUMBER: builtins.int name: builtins.str - source: livekit_models_pb2.TrackSource.ValueType + source: models.TrackSource.ValueType preset: global___IngressVideoEncodingPreset.ValueType @property def options(self) -> global___IngressVideoEncodingOptions: ... @@ -213,7 +213,7 @@ class IngressVideoOptions(google.protobuf.message.Message): self, *, name: builtins.str = ..., - source: livekit_models_pb2.TrackSource.ValueType = ..., + source: models.TrackSource.ValueType = ..., preset: global___IngressVideoEncodingPreset.ValueType = ..., options: global___IngressVideoEncodingOptions | None = ..., ) -> None: ... @@ -231,7 +231,7 @@ class IngressAudioEncodingOptions(google.protobuf.message.Message): BITRATE_FIELD_NUMBER: builtins.int DISABLE_DTX_FIELD_NUMBER: builtins.int CHANNELS_FIELD_NUMBER: builtins.int - audio_codec: livekit_models_pb2.AudioCodec.ValueType + audio_codec: models.AudioCodec.ValueType """desired audio codec to publish to room""" bitrate: builtins.int disable_dtx: builtins.bool @@ -239,7 +239,7 @@ class IngressAudioEncodingOptions(google.protobuf.message.Message): def __init__( self, *, - audio_codec: livekit_models_pb2.AudioCodec.ValueType = ..., + audio_codec: models.AudioCodec.ValueType = ..., bitrate: builtins.int = ..., disable_dtx: builtins.bool = ..., channels: builtins.int = ..., @@ -255,18 +255,18 @@ class IngressVideoEncodingOptions(google.protobuf.message.Message): VIDEO_CODEC_FIELD_NUMBER: builtins.int FRAME_RATE_FIELD_NUMBER: builtins.int LAYERS_FIELD_NUMBER: builtins.int - video_codec: livekit_models_pb2.VideoCodec.ValueType + video_codec: models.VideoCodec.ValueType """desired codec to publish to room""" frame_rate: builtins.float @property - def layers(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[livekit_models_pb2.VideoLayer]: + def layers(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[models.VideoLayer]: """simulcast layers to publish, when empty, should usually be set to layers at 1/2 and 1/4 of the dimensions""" def __init__( self, *, - video_codec: livekit_models_pb2.VideoCodec.ValueType = ..., + video_codec: models.VideoCodec.ValueType = ..., frame_rate: builtins.float = ..., - layers: collections.abc.Iterable[livekit_models_pb2.VideoLayer] | None = ..., + layers: collections.abc.Iterable[models.VideoLayer] | None = ..., ) -> None: ... def ClearField(self, field_name: typing_extensions.Literal["frame_rate", b"frame_rate", "layers", b"layers", "video_codec", b"video_codec"]) -> None: ... @@ -341,7 +341,7 @@ class IngressState(google.protobuf.message.Message): ValueType = typing.NewType("ValueType", builtins.int) V: typing_extensions.TypeAlias = ValueType - class _StatusEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[IngressState._Status.ValueType], builtins.type): # noqa: F821 + class _StatusEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[IngressState._Status.ValueType], builtins.type): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor ENDPOINT_INACTIVE: IngressState._Status.ValueType # 0 ENDPOINT_BUFFERING: IngressState._Status.ValueType # 1 @@ -378,7 +378,7 @@ class IngressState(google.protobuf.message.Message): ended_at: builtins.int resource_id: builtins.str @property - def tracks(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[livekit_models_pb2.TrackInfo]: ... + def tracks(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[models.TrackInfo]: ... def __init__( self, *, @@ -390,7 +390,7 @@ class IngressState(google.protobuf.message.Message): started_at: builtins.int = ..., ended_at: builtins.int = ..., resource_id: builtins.str = ..., - tracks: collections.abc.Iterable[livekit_models_pb2.TrackInfo] | None = ..., + tracks: collections.abc.Iterable[models.TrackInfo] | None = ..., ) -> None: ... def HasField(self, field_name: typing_extensions.Literal["audio", b"audio", "video", b"video"]) -> builtins.bool: ... def ClearField(self, field_name: typing_extensions.Literal["audio", b"audio", "ended_at", b"ended_at", "error", b"error", "resource_id", b"resource_id", "room_id", b"room_id", "started_at", b"started_at", "status", b"status", "tracks", b"tracks", "video", b"video"]) -> None: ... diff --git a/livekit-protocol/livekit/protocol/livekit_models_pb2.py b/livekit-protocol/livekit/protocol/models.py similarity index 99% rename from livekit-protocol/livekit/protocol/livekit_models_pb2.py rename to livekit-protocol/livekit/protocol/models.py index 5f200a14..eb586070 100644 --- a/livekit-protocol/livekit/protocol/livekit_models_pb2.py +++ b/livekit-protocol/livekit/protocol/models.py @@ -18,7 +18,7 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'livekit_models_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'models', _globals) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None diff --git a/livekit-protocol/livekit/protocol/livekit_models_pb2.pyi b/livekit-protocol/livekit/protocol/models.pyi similarity index 99% rename from livekit-protocol/livekit/protocol/livekit_models_pb2.pyi rename to livekit-protocol/livekit/protocol/models.pyi index 2e5bcb1d..6ddc9f5f 100644 --- a/livekit-protocol/livekit/protocol/livekit_models_pb2.pyi +++ b/livekit-protocol/livekit/protocol/models.pyi @@ -379,7 +379,7 @@ class ParticipantInfo(google.protobuf.message.Message): ValueType = typing.NewType("ValueType", builtins.int) V: typing_extensions.TypeAlias = ValueType - class _StateEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ParticipantInfo._State.ValueType], builtins.type): # noqa: F821 + class _StateEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ParticipantInfo._State.ValueType], builtins.type): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor JOINING: ParticipantInfo._State.ValueType # 0 """websocket' connected, but not offered yet""" @@ -456,7 +456,7 @@ class Encryption(google.protobuf.message.Message): ValueType = typing.NewType("ValueType", builtins.int) V: typing_extensions.TypeAlias = ValueType - class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Encryption._Type.ValueType], builtins.type): # noqa: F821 + class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Encryption._Type.ValueType], builtins.type): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor NONE: Encryption._Type.ValueType # 0 GCM: Encryption._Type.ValueType # 1 @@ -613,7 +613,7 @@ class DataPacket(google.protobuf.message.Message): ValueType = typing.NewType("ValueType", builtins.int) V: typing_extensions.TypeAlias = ValueType - class _KindEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[DataPacket._Kind.ValueType], builtins.type): # noqa: F821 + class _KindEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[DataPacket._Kind.ValueType], builtins.type): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor RELIABLE: DataPacket._Kind.ValueType # 0 LOSSY: DataPacket._Kind.ValueType # 1 @@ -751,7 +751,7 @@ class ServerInfo(google.protobuf.message.Message): ValueType = typing.NewType("ValueType", builtins.int) V: typing_extensions.TypeAlias = ValueType - class _EditionEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ServerInfo._Edition.ValueType], builtins.type): # noqa: F821 + class _EditionEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ServerInfo._Edition.ValueType], builtins.type): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor Standard: ServerInfo._Edition.ValueType # 0 Cloud: ServerInfo._Edition.ValueType # 1 @@ -797,7 +797,7 @@ class ClientInfo(google.protobuf.message.Message): ValueType = typing.NewType("ValueType", builtins.int) V: typing_extensions.TypeAlias = ValueType - class _SDKEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ClientInfo._SDK.ValueType], builtins.type): # noqa: F821 + class _SDKEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ClientInfo._SDK.ValueType], builtins.type): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor UNKNOWN: ClientInfo._SDK.ValueType # 0 JS: ClientInfo._SDK.ValueType # 1 diff --git a/livekit-protocol/livekit/protocol/livekit_room_pb2.py b/livekit-protocol/livekit/protocol/room.py similarity index 97% rename from livekit-protocol/livekit/protocol/livekit_room_pb2.py rename to livekit-protocol/livekit/protocol/room.py index f47fa6a9..553dd505 100644 --- a/livekit-protocol/livekit/protocol/livekit_room_pb2.py +++ b/livekit-protocol/livekit/protocol/room.py @@ -11,15 +11,15 @@ _sym_db = _symbol_database.Default() -from . import livekit_models_pb2 as livekit__models__pb2 -from . import livekit_egress_pb2 as livekit__egress__pb2 +from . import models as _models_ +from . import egress as _egress_ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12livekit_room.proto\x12\x07livekit\x1a\x14livekit_models.proto\x1a\x14livekit_egress.proto\"\xe6\x01\n\x11\x43reateRoomRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rempty_timeout\x18\x02 \x01(\r\x12\x18\n\x10max_participants\x18\x03 \x01(\r\x12\x0f\n\x07node_id\x18\x04 \x01(\t\x12\x10\n\x08metadata\x18\x05 \x01(\t\x12#\n\x06\x65gress\x18\x06 \x01(\x0b\x32\x13.livekit.RoomEgress\x12\x19\n\x11min_playout_delay\x18\x07 \x01(\r\x12\x19\n\x11max_playout_delay\x18\x08 \x01(\r\x12\x14\n\x0csync_streams\x18\t \x01(\x08\"\x9e\x01\n\nRoomEgress\x12\x31\n\x04room\x18\x01 \x01(\x0b\x32#.livekit.RoomCompositeEgressRequest\x12\x33\n\x0bparticipant\x18\x03 \x01(\x0b\x32\x1e.livekit.AutoParticipantEgress\x12(\n\x06tracks\x18\x02 \x01(\x0b\x32\x18.livekit.AutoTrackEgress\"!\n\x10ListRoomsRequest\x12\r\n\x05names\x18\x01 \x03(\t\"1\n\x11ListRoomsResponse\x12\x1c\n\x05rooms\x18\x01 \x03(\x0b\x32\r.livekit.Room\"!\n\x11\x44\x65leteRoomRequest\x12\x0c\n\x04room\x18\x01 \x01(\t\"\x14\n\x12\x44\x65leteRoomResponse\"\'\n\x17ListParticipantsRequest\x12\x0c\n\x04room\x18\x01 \x01(\t\"J\n\x18ListParticipantsResponse\x12.\n\x0cparticipants\x18\x01 \x03(\x0b\x32\x18.livekit.ParticipantInfo\"9\n\x17RoomParticipantIdentity\x12\x0c\n\x04room\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\"\x1b\n\x19RemoveParticipantResponse\"X\n\x14MuteRoomTrackRequest\x12\x0c\n\x04room\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x11\n\ttrack_sid\x18\x03 \x01(\t\x12\r\n\x05muted\x18\x04 \x01(\x08\":\n\x15MuteRoomTrackResponse\x12!\n\x05track\x18\x01 \x01(\x0b\x32\x12.livekit.TrackInfo\"\x8e\x01\n\x18UpdateParticipantRequest\x12\x0c\n\x04room\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x10\n\x08metadata\x18\x03 \x01(\t\x12\x32\n\npermission\x18\x04 \x01(\x0b\x32\x1e.livekit.ParticipantPermission\x12\x0c\n\x04name\x18\x05 \x01(\t\"\x9b\x01\n\x1aUpdateSubscriptionsRequest\x12\x0c\n\x04room\x18\x01 \x01(\t\x12\x10\n\x08identity\x18\x02 \x01(\t\x12\x12\n\ntrack_sids\x18\x03 \x03(\t\x12\x11\n\tsubscribe\x18\x04 \x01(\x08\x12\x36\n\x12participant_tracks\x18\x05 \x03(\x0b\x32\x1a.livekit.ParticipantTracks\"\x1d\n\x1bUpdateSubscriptionsResponse\"\xb1\x01\n\x0fSendDataRequest\x12\x0c\n\x04room\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12&\n\x04kind\x18\x03 \x01(\x0e\x32\x18.livekit.DataPacket.Kind\x12\x1c\n\x10\x64\x65stination_sids\x18\x04 \x03(\tB\x02\x18\x01\x12\x1e\n\x16\x64\x65stination_identities\x18\x06 \x03(\t\x12\x12\n\x05topic\x18\x05 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_topic\"\x12\n\x10SendDataResponse\";\n\x19UpdateRoomMetadataRequest\x12\x0c\n\x04room\x18\x01 \x01(\t\x12\x10\n\x08metadata\x18\x02 \x01(\t2\xe6\x06\n\x0bRoomService\x12\x37\n\nCreateRoom\x12\x1a.livekit.CreateRoomRequest\x1a\r.livekit.Room\x12\x42\n\tListRooms\x12\x19.livekit.ListRoomsRequest\x1a\x1a.livekit.ListRoomsResponse\x12\x45\n\nDeleteRoom\x12\x1a.livekit.DeleteRoomRequest\x1a\x1b.livekit.DeleteRoomResponse\x12W\n\x10ListParticipants\x12 .livekit.ListParticipantsRequest\x1a!.livekit.ListParticipantsResponse\x12L\n\x0eGetParticipant\x12 .livekit.RoomParticipantIdentity\x1a\x18.livekit.ParticipantInfo\x12Y\n\x11RemoveParticipant\x12 .livekit.RoomParticipantIdentity\x1a\".livekit.RemoveParticipantResponse\x12S\n\x12MutePublishedTrack\x12\x1d.livekit.MuteRoomTrackRequest\x1a\x1e.livekit.MuteRoomTrackResponse\x12P\n\x11UpdateParticipant\x12!.livekit.UpdateParticipantRequest\x1a\x18.livekit.ParticipantInfo\x12`\n\x13UpdateSubscriptions\x12#.livekit.UpdateSubscriptionsRequest\x1a$.livekit.UpdateSubscriptionsResponse\x12?\n\x08SendData\x12\x18.livekit.SendDataRequest\x1a\x19.livekit.SendDataResponse\x12G\n\x12UpdateRoomMetadata\x12\".livekit.UpdateRoomMetadataRequest\x1a\r.livekit.RoomBFZ#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'livekit_room_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'room', _globals) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None diff --git a/livekit-protocol/livekit/protocol/livekit_room_pb2.pyi b/livekit-protocol/livekit/protocol/room.pyi similarity index 91% rename from livekit-protocol/livekit/protocol/livekit_room_pb2.pyi rename to livekit-protocol/livekit/protocol/room.pyi index 794e3c96..94e56906 100644 --- a/livekit-protocol/livekit/protocol/livekit_room_pb2.pyi +++ b/livekit-protocol/livekit/protocol/room.pyi @@ -20,8 +20,8 @@ import collections.abc import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.message -from . import livekit_egress_pb2 -from . import livekit_models_pb2 +from . import egress +from . import models import sys if sys.version_info >= (3, 8): @@ -90,17 +90,17 @@ class RoomEgress(google.protobuf.message.Message): PARTICIPANT_FIELD_NUMBER: builtins.int TRACKS_FIELD_NUMBER: builtins.int @property - def room(self) -> livekit_egress_pb2.RoomCompositeEgressRequest: ... + def room(self) -> egress.RoomCompositeEgressRequest: ... @property - def participant(self) -> livekit_egress_pb2.AutoParticipantEgress: ... + def participant(self) -> egress.AutoParticipantEgress: ... @property - def tracks(self) -> livekit_egress_pb2.AutoTrackEgress: ... + def tracks(self) -> egress.AutoTrackEgress: ... def __init__( self, *, - room: livekit_egress_pb2.RoomCompositeEgressRequest | None = ..., - participant: livekit_egress_pb2.AutoParticipantEgress | None = ..., - tracks: livekit_egress_pb2.AutoTrackEgress | None = ..., + room: egress.RoomCompositeEgressRequest | None = ..., + participant: egress.AutoParticipantEgress | None = ..., + tracks: egress.AutoTrackEgress | None = ..., ) -> None: ... def HasField(self, field_name: typing_extensions.Literal["participant", b"participant", "room", b"room", "tracks", b"tracks"]) -> builtins.bool: ... def ClearField(self, field_name: typing_extensions.Literal["participant", b"participant", "room", b"room", "tracks", b"tracks"]) -> None: ... @@ -130,11 +130,11 @@ class ListRoomsResponse(google.protobuf.message.Message): ROOMS_FIELD_NUMBER: builtins.int @property - def rooms(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[livekit_models_pb2.Room]: ... + def rooms(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[models.Room]: ... def __init__( self, *, - rooms: collections.abc.Iterable[livekit_models_pb2.Room] | None = ..., + rooms: collections.abc.Iterable[models.Room] | None = ..., ) -> None: ... def ClearField(self, field_name: typing_extensions.Literal["rooms", b"rooms"]) -> None: ... @@ -188,11 +188,11 @@ class ListParticipantsResponse(google.protobuf.message.Message): PARTICIPANTS_FIELD_NUMBER: builtins.int @property - def participants(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[livekit_models_pb2.ParticipantInfo]: ... + def participants(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[models.ParticipantInfo]: ... def __init__( self, *, - participants: collections.abc.Iterable[livekit_models_pb2.ParticipantInfo] | None = ..., + participants: collections.abc.Iterable[models.ParticipantInfo] | None = ..., ) -> None: ... def ClearField(self, field_name: typing_extensions.Literal["participants", b"participants"]) -> None: ... @@ -261,11 +261,11 @@ class MuteRoomTrackResponse(google.protobuf.message.Message): TRACK_FIELD_NUMBER: builtins.int @property - def track(self) -> livekit_models_pb2.TrackInfo: ... + def track(self) -> models.TrackInfo: ... def __init__( self, *, - track: livekit_models_pb2.TrackInfo | None = ..., + track: models.TrackInfo | 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: ... @@ -286,7 +286,7 @@ class UpdateParticipantRequest(google.protobuf.message.Message): metadata: builtins.str """metadata to update. skipping updates if left empty""" @property - def permission(self) -> livekit_models_pb2.ParticipantPermission: + def permission(self) -> models.ParticipantPermission: """set to update the participant's permissions""" name: builtins.str """display name to update""" @@ -296,7 +296,7 @@ class UpdateParticipantRequest(google.protobuf.message.Message): room: builtins.str = ..., identity: builtins.str = ..., metadata: builtins.str = ..., - permission: livekit_models_pb2.ParticipantPermission | None = ..., + permission: models.ParticipantPermission | None = ..., name: builtins.str = ..., ) -> None: ... def HasField(self, field_name: typing_extensions.Literal["permission", b"permission"]) -> builtins.bool: ... @@ -321,7 +321,7 @@ class UpdateSubscriptionsRequest(google.protobuf.message.Message): subscribe: builtins.bool """set to true to subscribe, false to unsubscribe from tracks""" @property - def participant_tracks(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[livekit_models_pb2.ParticipantTracks]: + def participant_tracks(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[models.ParticipantTracks]: """list of participants and their tracks""" def __init__( self, @@ -330,7 +330,7 @@ class UpdateSubscriptionsRequest(google.protobuf.message.Message): identity: builtins.str = ..., track_sids: collections.abc.Iterable[builtins.str] | None = ..., subscribe: builtins.bool = ..., - participant_tracks: collections.abc.Iterable[livekit_models_pb2.ParticipantTracks] | None = ..., + participant_tracks: collections.abc.Iterable[models.ParticipantTracks] | None = ..., ) -> None: ... def ClearField(self, field_name: typing_extensions.Literal["identity", b"identity", "participant_tracks", b"participant_tracks", "room", b"room", "subscribe", b"subscribe", "track_sids", b"track_sids"]) -> None: ... @@ -360,7 +360,7 @@ class SendDataRequest(google.protobuf.message.Message): TOPIC_FIELD_NUMBER: builtins.int room: builtins.str data: builtins.bytes - kind: livekit_models_pb2.DataPacket.Kind.ValueType + kind: models.DataPacket.Kind.ValueType @property def destination_sids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: """mark deprecated""" @@ -373,7 +373,7 @@ class SendDataRequest(google.protobuf.message.Message): *, room: builtins.str = ..., data: builtins.bytes = ..., - kind: livekit_models_pb2.DataPacket.Kind.ValueType = ..., + kind: models.DataPacket.Kind.ValueType = ..., destination_sids: collections.abc.Iterable[builtins.str] | None = ..., destination_identities: collections.abc.Iterable[builtins.str] | None = ..., topic: builtins.str | None = ..., diff --git a/livekit-protocol/livekit/protocol/livekit_webhook_pb2.py b/livekit-protocol/livekit/protocol/webhook.py similarity index 86% rename from livekit-protocol/livekit/protocol/livekit_webhook_pb2.py rename to livekit-protocol/livekit/protocol/webhook.py index 789448dc..61b9e22b 100644 --- a/livekit-protocol/livekit/protocol/livekit_webhook_pb2.py +++ b/livekit-protocol/livekit/protocol/webhook.py @@ -11,16 +11,16 @@ _sym_db = _symbol_database.Default() -from . import livekit_models_pb2 as livekit__models__pb2 -from . import livekit_egress_pb2 as livekit__egress__pb2 -from . import livekit_ingress_pb2 as livekit__ingress__pb2 +from . import models as _models_ +from . import egress as _egress_ +from . import ingress as _ingress_ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15livekit_webhook.proto\x12\x07livekit\x1a\x14livekit_models.proto\x1a\x14livekit_egress.proto\x1a\x15livekit_ingress.proto\"\x97\x02\n\x0cWebhookEvent\x12\r\n\x05\x65vent\x18\x01 \x01(\t\x12\x1b\n\x04room\x18\x02 \x01(\x0b\x32\r.livekit.Room\x12-\n\x0bparticipant\x18\x03 \x01(\x0b\x32\x18.livekit.ParticipantInfo\x12(\n\x0b\x65gress_info\x18\t \x01(\x0b\x32\x13.livekit.EgressInfo\x12*\n\x0cingress_info\x18\n \x01(\x0b\x32\x14.livekit.IngressInfo\x12!\n\x05track\x18\x08 \x01(\x0b\x32\x12.livekit.TrackInfo\x12\n\n\x02id\x18\x06 \x01(\t\x12\x12\n\ncreated_at\x18\x07 \x01(\x03\x12\x13\n\x0bnum_dropped\x18\x0b \x01(\x05\x42\x46Z#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'livekit_webhook_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'webhook', _globals) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None diff --git a/livekit-protocol/livekit/protocol/livekit_webhook_pb2.pyi b/livekit-protocol/livekit/protocol/webhook.pyi similarity index 79% rename from livekit-protocol/livekit/protocol/livekit_webhook_pb2.pyi rename to livekit-protocol/livekit/protocol/webhook.pyi index 72584e2a..2d62d609 100644 --- a/livekit-protocol/livekit/protocol/livekit_webhook_pb2.pyi +++ b/livekit-protocol/livekit/protocol/webhook.pyi @@ -18,9 +18,9 @@ limitations under the License. import builtins import google.protobuf.descriptor import google.protobuf.message -from . import livekit_egress_pb2 -from . import livekit_ingress_pb2 -from . import livekit_models_pb2 +from . import egress +from . import ingress +from . import models import sys if sys.version_info >= (3, 8): @@ -49,18 +49,18 @@ class WebhookEvent(google.protobuf.message.Message): ingress_started, ingress_ended """ @property - def room(self) -> livekit_models_pb2.Room: ... + def room(self) -> models.Room: ... @property - def participant(self) -> livekit_models_pb2.ParticipantInfo: + def participant(self) -> models.ParticipantInfo: """set when event is participant_* or track_*""" @property - def egress_info(self) -> livekit_egress_pb2.EgressInfo: + def egress_info(self) -> egress.EgressInfo: """set when event is egress_*""" @property - def ingress_info(self) -> livekit_ingress_pb2.IngressInfo: + def ingress_info(self) -> ingress.IngressInfo: """set when event is ingress_*""" @property - def track(self) -> livekit_models_pb2.TrackInfo: + def track(self) -> models.TrackInfo: """set when event is track_*""" id: builtins.str """unique event uuid""" @@ -71,11 +71,11 @@ class WebhookEvent(google.protobuf.message.Message): self, *, event: builtins.str = ..., - room: livekit_models_pb2.Room | None = ..., - participant: livekit_models_pb2.ParticipantInfo | None = ..., - egress_info: livekit_egress_pb2.EgressInfo | None = ..., - ingress_info: livekit_ingress_pb2.IngressInfo | None = ..., - track: livekit_models_pb2.TrackInfo | None = ..., + room: models.Room | None = ..., + participant: models.ParticipantInfo | None = ..., + egress_info: egress.EgressInfo | None = ..., + ingress_info: ingress.IngressInfo | None = ..., + track: models.TrackInfo | None = ..., id: builtins.str = ..., created_at: builtins.int = ..., num_dropped: builtins.int = ..., diff --git a/livekit-protocol/livekit/requirements.txt b/livekit-protocol/livekit/requirements.txt new file mode 100644 index 00000000..50318762 --- /dev/null +++ b/livekit-protocol/livekit/requirements.txt @@ -0,0 +1 @@ +PyGObject==3.46.0 diff --git a/livekit-rtc/generate_proto.sh b/livekit-rtc/generate_proto.sh new file mode 100755 index 00000000..1c4d0f03 --- /dev/null +++ b/livekit-rtc/generate_proto.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# Copyright 2023 LiveKit, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# This script requires protobuf-compiler and https://github.com/nipunn1313/mypy-protobuf + +FFI_PROTOCOL=./rust-sdks/livekit-ffi/protocol +FFI_OUT_PYTHON=./livekit/rtc/_proto + +# ffi + +protoc \ + -I=$FFI_PROTOCOL \ + --python_out=$FFI_OUT_PYTHON \ + --mypy_out=$FFI_OUT_PYTHON \ + $FFI_PROTOCOL/audio_frame.proto \ + $FFI_PROTOCOL/ffi.proto \ + $FFI_PROTOCOL/handle.proto \ + $FFI_PROTOCOL/participant.proto \ + $FFI_PROTOCOL/room.proto \ + $FFI_PROTOCOL/track.proto \ + $FFI_PROTOCOL/video_frame.proto \ + $FFI_PROTOCOL/e2ee.proto \ + $FFI_PROTOCOL/stats.proto + +touch -a "$FFI_OUT_PYTHON/__init__.py" + +for f in "$FFI_OUT_PYTHON"/*.py "$FFI_OUT_PYTHON"/*.pyi; do + perl -i -pe 's|^(import (audio_frame_pb2\|ffi_pb2\|handle_pb2\|participant_pb2\|room_pb2\|track_pb2\|video_frame_pb2\|e2ee_pb2\|stats_pb2))|from . $1|g' "$f" +done diff --git a/livekit-rtc/livekit/rtc/_proto/__init__.py b/livekit-rtc/livekit/rtc/_proto/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py b/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py new file mode 100644 index 00000000..d630ed8e --- /dev/null +++ b/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.py @@ -0,0 +1,80 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: audio_frame.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() + + +from . import handle_pb2 as handle__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11\x61udio_frame.proto\x12\rlivekit.proto\x1a\x0chandle.proto\"a\n\x17\x41llocAudioBufferRequest\x12\x13\n\x0bsample_rate\x18\x01 \x01(\r\x12\x14\n\x0cnum_channels\x18\x02 \x01(\r\x12\x1b\n\x13samples_per_channel\x18\x03 \x01(\r\"P\n\x18\x41llocAudioBufferResponse\x12\x34\n\x06\x62uffer\x18\x01 \x01(\x0b\x32$.livekit.proto.OwnedAudioFrameBuffer\"[\n\x15NewAudioStreamRequest\x12\x14\n\x0ctrack_handle\x18\x01 \x01(\x04\x12,\n\x04type\x18\x02 \x01(\x0e\x32\x1e.livekit.proto.AudioStreamType\"I\n\x16NewAudioStreamResponse\x12/\n\x06stream\x18\x01 \x01(\x0b\x32\x1f.livekit.proto.OwnedAudioStream\"\xb5\x01\n\x15NewAudioSourceRequest\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.livekit.proto.AudioSourceType\x12\x37\n\x07options\x18\x02 \x01(\x0b\x32!.livekit.proto.AudioSourceOptionsH\x00\x88\x01\x01\x12\x13\n\x0bsample_rate\x18\x03 \x01(\r\x12\x14\n\x0cnum_channels\x18\x04 \x01(\rB\n\n\x08_options\"I\n\x16NewAudioSourceResponse\x12/\n\x06source\x18\x01 \x01(\x0b\x32\x1f.livekit.proto.OwnedAudioSource\"f\n\x18\x43\x61ptureAudioFrameRequest\x12\x15\n\rsource_handle\x18\x01 \x01(\x04\x12\x33\n\x06\x62uffer\x18\x02 \x01(\x0b\x32#.livekit.proto.AudioFrameBufferInfo\"-\n\x19\x43\x61ptureAudioFrameResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"K\n\x19\x43\x61ptureAudioFrameCallback\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\"\x1a\n\x18NewAudioResamplerRequest\"R\n\x19NewAudioResamplerResponse\x12\x35\n\tresampler\x18\x01 \x01(\x0b\x32\".livekit.proto.OwnedAudioResampler\"\x93\x01\n\x17RemixAndResampleRequest\x12\x18\n\x10resampler_handle\x18\x01 \x01(\x04\x12\x33\n\x06\x62uffer\x18\x02 \x01(\x0b\x32#.livekit.proto.AudioFrameBufferInfo\x12\x14\n\x0cnum_channels\x18\x03 \x01(\r\x12\x13\n\x0bsample_rate\x18\x04 \x01(\r\"P\n\x18RemixAndResampleResponse\x12\x34\n\x06\x62uffer\x18\x01 \x01(\x0b\x32$.livekit.proto.OwnedAudioFrameBuffer\"p\n\x14\x41udioFrameBufferInfo\x12\x10\n\x08\x64\x61ta_ptr\x18\x01 \x01(\x04\x12\x14\n\x0cnum_channels\x18\x02 \x01(\r\x12\x13\n\x0bsample_rate\x18\x03 \x01(\r\x12\x1b\n\x13samples_per_channel\x18\x04 \x01(\r\"y\n\x15OwnedAudioFrameBuffer\x12-\n\x06handle\x18\x01 \x01(\x0b\x32\x1d.livekit.proto.FfiOwnedHandle\x12\x31\n\x04info\x18\x02 \x01(\x0b\x32#.livekit.proto.AudioFrameBufferInfo\"?\n\x0f\x41udioStreamInfo\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.livekit.proto.AudioStreamType\"o\n\x10OwnedAudioStream\x12-\n\x06handle\x18\x01 \x01(\x0b\x32\x1d.livekit.proto.FfiOwnedHandle\x12,\n\x04info\x18\x02 \x01(\x0b\x32\x1e.livekit.proto.AudioStreamInfo\"\x9f\x01\n\x10\x41udioStreamEvent\x12\x15\n\rstream_handle\x18\x01 \x01(\x04\x12;\n\x0e\x66rame_received\x18\x02 \x01(\x0b\x32!.livekit.proto.AudioFrameReceivedH\x00\x12,\n\x03\x65os\x18\x03 \x01(\x0b\x32\x1d.livekit.proto.AudioStreamEOSH\x00\x42\t\n\x07message\"I\n\x12\x41udioFrameReceived\x12\x33\n\x05\x66rame\x18\x01 \x01(\x0b\x32$.livekit.proto.OwnedAudioFrameBuffer\"\x10\n\x0e\x41udioStreamEOS\"e\n\x12\x41udioSourceOptions\x12\x19\n\x11\x65\x63ho_cancellation\x18\x01 \x01(\x08\x12\x19\n\x11noise_suppression\x18\x02 \x01(\x08\x12\x19\n\x11\x61uto_gain_control\x18\x03 \x01(\x08\"?\n\x0f\x41udioSourceInfo\x12,\n\x04type\x18\x02 \x01(\x0e\x32\x1e.livekit.proto.AudioSourceType\"o\n\x10OwnedAudioSource\x12-\n\x06handle\x18\x01 \x01(\x0b\x32\x1d.livekit.proto.FfiOwnedHandle\x12,\n\x04info\x18\x02 \x01(\x0b\x32\x1e.livekit.proto.AudioSourceInfo\"\x14\n\x12\x41udioResamplerInfo\"u\n\x13OwnedAudioResampler\x12-\n\x06handle\x18\x01 \x01(\x0b\x32\x1d.livekit.proto.FfiOwnedHandle\x12/\n\x04info\x18\x02 \x01(\x0b\x32!.livekit.proto.AudioResamplerInfo*A\n\x0f\x41udioStreamType\x12\x17\n\x13\x41UDIO_STREAM_NATIVE\x10\x00\x12\x15\n\x11\x41UDIO_STREAM_HTML\x10\x01**\n\x0f\x41udioSourceType\x12\x17\n\x13\x41UDIO_SOURCE_NATIVE\x10\x00\x42\x10\xaa\x02\rLiveKit.Protob\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'audio_frame_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\rLiveKit.Proto' + _globals['_AUDIOSTREAMTYPE']._serialized_start=2322 + _globals['_AUDIOSTREAMTYPE']._serialized_end=2387 + _globals['_AUDIOSOURCETYPE']._serialized_start=2389 + _globals['_AUDIOSOURCETYPE']._serialized_end=2431 + _globals['_ALLOCAUDIOBUFFERREQUEST']._serialized_start=50 + _globals['_ALLOCAUDIOBUFFERREQUEST']._serialized_end=147 + _globals['_ALLOCAUDIOBUFFERRESPONSE']._serialized_start=149 + _globals['_ALLOCAUDIOBUFFERRESPONSE']._serialized_end=229 + _globals['_NEWAUDIOSTREAMREQUEST']._serialized_start=231 + _globals['_NEWAUDIOSTREAMREQUEST']._serialized_end=322 + _globals['_NEWAUDIOSTREAMRESPONSE']._serialized_start=324 + _globals['_NEWAUDIOSTREAMRESPONSE']._serialized_end=397 + _globals['_NEWAUDIOSOURCEREQUEST']._serialized_start=400 + _globals['_NEWAUDIOSOURCEREQUEST']._serialized_end=581 + _globals['_NEWAUDIOSOURCERESPONSE']._serialized_start=583 + _globals['_NEWAUDIOSOURCERESPONSE']._serialized_end=656 + _globals['_CAPTUREAUDIOFRAMEREQUEST']._serialized_start=658 + _globals['_CAPTUREAUDIOFRAMEREQUEST']._serialized_end=760 + _globals['_CAPTUREAUDIOFRAMERESPONSE']._serialized_start=762 + _globals['_CAPTUREAUDIOFRAMERESPONSE']._serialized_end=807 + _globals['_CAPTUREAUDIOFRAMECALLBACK']._serialized_start=809 + _globals['_CAPTUREAUDIOFRAMECALLBACK']._serialized_end=884 + _globals['_NEWAUDIORESAMPLERREQUEST']._serialized_start=886 + _globals['_NEWAUDIORESAMPLERREQUEST']._serialized_end=912 + _globals['_NEWAUDIORESAMPLERRESPONSE']._serialized_start=914 + _globals['_NEWAUDIORESAMPLERRESPONSE']._serialized_end=996 + _globals['_REMIXANDRESAMPLEREQUEST']._serialized_start=999 + _globals['_REMIXANDRESAMPLEREQUEST']._serialized_end=1146 + _globals['_REMIXANDRESAMPLERESPONSE']._serialized_start=1148 + _globals['_REMIXANDRESAMPLERESPONSE']._serialized_end=1228 + _globals['_AUDIOFRAMEBUFFERINFO']._serialized_start=1230 + _globals['_AUDIOFRAMEBUFFERINFO']._serialized_end=1342 + _globals['_OWNEDAUDIOFRAMEBUFFER']._serialized_start=1344 + _globals['_OWNEDAUDIOFRAMEBUFFER']._serialized_end=1465 + _globals['_AUDIOSTREAMINFO']._serialized_start=1467 + _globals['_AUDIOSTREAMINFO']._serialized_end=1530 + _globals['_OWNEDAUDIOSTREAM']._serialized_start=1532 + _globals['_OWNEDAUDIOSTREAM']._serialized_end=1643 + _globals['_AUDIOSTREAMEVENT']._serialized_start=1646 + _globals['_AUDIOSTREAMEVENT']._serialized_end=1805 + _globals['_AUDIOFRAMERECEIVED']._serialized_start=1807 + _globals['_AUDIOFRAMERECEIVED']._serialized_end=1880 + _globals['_AUDIOSTREAMEOS']._serialized_start=1882 + _globals['_AUDIOSTREAMEOS']._serialized_end=1898 + _globals['_AUDIOSOURCEOPTIONS']._serialized_start=1900 + _globals['_AUDIOSOURCEOPTIONS']._serialized_end=2001 + _globals['_AUDIOSOURCEINFO']._serialized_start=2003 + _globals['_AUDIOSOURCEINFO']._serialized_end=2066 + _globals['_OWNEDAUDIOSOURCE']._serialized_start=2068 + _globals['_OWNEDAUDIOSOURCE']._serialized_end=2179 + _globals['_AUDIORESAMPLERINFO']._serialized_start=2181 + _globals['_AUDIORESAMPLERINFO']._serialized_end=2201 + _globals['_OWNEDAUDIORESAMPLER']._serialized_start=2203 + _globals['_OWNEDAUDIORESAMPLER']._serialized_end=2320 +# @@protoc_insertion_point(module_scope) diff --git a/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.pyi new file mode 100644 index 00000000..af67c211 --- /dev/null +++ b/livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.pyi @@ -0,0 +1,557 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +Copyright 2023 LiveKit, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" +import builtins +import google.protobuf.descriptor +import google.protobuf.internal.enum_type_wrapper +import google.protobuf.message +from . import handle_pb2 +import sys +import typing + +if sys.version_info >= (3, 10): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +class _AudioStreamType: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _AudioStreamTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_AudioStreamType.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + AUDIO_STREAM_NATIVE: _AudioStreamType.ValueType # 0 + AUDIO_STREAM_HTML: _AudioStreamType.ValueType # 1 + +class AudioStreamType(_AudioStreamType, metaclass=_AudioStreamTypeEnumTypeWrapper): + """ + AudioStream + """ + +AUDIO_STREAM_NATIVE: AudioStreamType.ValueType # 0 +AUDIO_STREAM_HTML: AudioStreamType.ValueType # 1 +global___AudioStreamType = AudioStreamType + +class _AudioSourceType: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _AudioSourceTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_AudioSourceType.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + AUDIO_SOURCE_NATIVE: _AudioSourceType.ValueType # 0 + +class AudioSourceType(_AudioSourceType, metaclass=_AudioSourceTypeEnumTypeWrapper): ... + +AUDIO_SOURCE_NATIVE: AudioSourceType.ValueType # 0 +global___AudioSourceType = AudioSourceType + +@typing_extensions.final +class AllocAudioBufferRequest(google.protobuf.message.Message): + """Allocate a new AudioFrameBuffer + This is not necessary required because the data structure is fairly simple + But keep the API consistent with VideoFrame + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SAMPLE_RATE_FIELD_NUMBER: builtins.int + NUM_CHANNELS_FIELD_NUMBER: builtins.int + SAMPLES_PER_CHANNEL_FIELD_NUMBER: builtins.int + sample_rate: builtins.int + num_channels: builtins.int + samples_per_channel: builtins.int + def __init__( + self, + *, + sample_rate: builtins.int = ..., + num_channels: builtins.int = ..., + samples_per_channel: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["num_channels", b"num_channels", "sample_rate", b"sample_rate", "samples_per_channel", b"samples_per_channel"]) -> None: ... + +global___AllocAudioBufferRequest = AllocAudioBufferRequest + +@typing_extensions.final +class AllocAudioBufferResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + BUFFER_FIELD_NUMBER: builtins.int + @property + def buffer(self) -> global___OwnedAudioFrameBuffer: ... + def __init__( + self, + *, + 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: ... + +global___AllocAudioBufferResponse = AllocAudioBufferResponse + +@typing_extensions.final +class NewAudioStreamRequest(google.protobuf.message.Message): + """Create a new AudioStream + AudioStream is used to receive audio frames from a track + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TRACK_HANDLE_FIELD_NUMBER: builtins.int + TYPE_FIELD_NUMBER: builtins.int + track_handle: builtins.int + type: global___AudioStreamType.ValueType + def __init__( + self, + *, + 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: ... + +global___NewAudioStreamRequest = NewAudioStreamRequest + +@typing_extensions.final +class NewAudioStreamResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + STREAM_FIELD_NUMBER: builtins.int + @property + def stream(self) -> global___OwnedAudioStream: ... + def __init__( + self, + *, + 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: ... + +global___NewAudioStreamResponse = NewAudioStreamResponse + +@typing_extensions.final +class NewAudioSourceRequest(google.protobuf.message.Message): + """Create a new AudioSource""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TYPE_FIELD_NUMBER: builtins.int + OPTIONS_FIELD_NUMBER: builtins.int + 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 + def __init__( + self, + *, + type: global___AudioSourceType.ValueType = ..., + options: global___AudioSourceOptions | None = ..., + 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: ... + +global___NewAudioSourceRequest = NewAudioSourceRequest + +@typing_extensions.final +class NewAudioSourceResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SOURCE_FIELD_NUMBER: builtins.int + @property + def source(self) -> global___OwnedAudioSource: ... + def __init__( + self, + *, + 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: ... + +global___NewAudioSourceResponse = NewAudioSourceResponse + +@typing_extensions.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. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SOURCE_HANDLE_FIELD_NUMBER: builtins.int + BUFFER_FIELD_NUMBER: builtins.int + source_handle: builtins.int + @property + def buffer(self) -> global___AudioFrameBufferInfo: ... + def __init__( + self, + *, + 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: ... + +global___CaptureAudioFrameRequest = CaptureAudioFrameRequest + +@typing_extensions.final +class CaptureAudioFrameResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + async_id: builtins.int + def __init__( + self, + *, + async_id: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + +global___CaptureAudioFrameResponse = CaptureAudioFrameResponse + +@typing_extensions.final +class CaptureAudioFrameCallback(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + ERROR_FIELD_NUMBER: builtins.int + async_id: builtins.int + error: builtins.str + def __init__( + self, + *, + async_id: builtins.int = ..., + error: builtins.str | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_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: ... + +global___CaptureAudioFrameCallback = CaptureAudioFrameCallback + +@typing_extensions.final +class NewAudioResamplerRequest(google.protobuf.message.Message): + """Create a new AudioResampler""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___NewAudioResamplerRequest = NewAudioResamplerRequest + +@typing_extensions.final +class NewAudioResamplerResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RESAMPLER_FIELD_NUMBER: builtins.int + @property + def resampler(self) -> global___OwnedAudioResampler: ... + def __init__( + self, + *, + 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: ... + +global___NewAudioResamplerResponse = NewAudioResamplerResponse + +@typing_extensions.final +class RemixAndResampleRequest(google.protobuf.message.Message): + """Remix and resample an audio frame""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RESAMPLER_HANDLE_FIELD_NUMBER: builtins.int + BUFFER_FIELD_NUMBER: builtins.int + 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 + def __init__( + self, + *, + resampler_handle: builtins.int = ..., + buffer: global___AudioFrameBufferInfo | None = ..., + 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: ... + +global___RemixAndResampleRequest = RemixAndResampleRequest + +@typing_extensions.final +class RemixAndResampleResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + BUFFER_FIELD_NUMBER: builtins.int + @property + def buffer(self) -> global___OwnedAudioFrameBuffer: ... + def __init__( + self, + *, + 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: ... + +global___RemixAndResampleResponse = RemixAndResampleResponse + +@typing_extensions.final +class AudioFrameBufferInfo(google.protobuf.message.Message): + """ + AudioFrame buffer + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + DATA_PTR_FIELD_NUMBER: builtins.int + NUM_CHANNELS_FIELD_NUMBER: builtins.int + SAMPLE_RATE_FIELD_NUMBER: builtins.int + SAMPLES_PER_CHANNEL_FIELD_NUMBER: builtins.int + data_ptr: builtins.int + """*const i16""" + num_channels: builtins.int + sample_rate: builtins.int + samples_per_channel: builtins.int + def __init__( + self, + *, + data_ptr: builtins.int = ..., + num_channels: builtins.int = ..., + 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: ... + +global___AudioFrameBufferInfo = AudioFrameBufferInfo + +@typing_extensions.final +class OwnedAudioFrameBuffer(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + HANDLE_FIELD_NUMBER: builtins.int + INFO_FIELD_NUMBER: builtins.int + @property + def handle(self) -> handle_pb2.FfiOwnedHandle: ... + @property + def info(self) -> global___AudioFrameBufferInfo: ... + def __init__( + self, + *, + 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: ... + +global___OwnedAudioFrameBuffer = OwnedAudioFrameBuffer + +@typing_extensions.final +class AudioStreamInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TYPE_FIELD_NUMBER: builtins.int + type: global___AudioStreamType.ValueType + def __init__( + self, + *, + type: global___AudioStreamType.ValueType = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["type", b"type"]) -> None: ... + +global___AudioStreamInfo = AudioStreamInfo + +@typing_extensions.final +class OwnedAudioStream(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + HANDLE_FIELD_NUMBER: builtins.int + INFO_FIELD_NUMBER: builtins.int + @property + def handle(self) -> handle_pb2.FfiOwnedHandle: ... + @property + def info(self) -> global___AudioStreamInfo: ... + def __init__( + self, + *, + 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: ... + +global___OwnedAudioStream = OwnedAudioStream + +@typing_extensions.final +class AudioStreamEvent(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + STREAM_HANDLE_FIELD_NUMBER: builtins.int + FRAME_RECEIVED_FIELD_NUMBER: builtins.int + EOS_FIELD_NUMBER: builtins.int + stream_handle: builtins.int + @property + def frame_received(self) -> global___AudioFrameReceived: ... + @property + def eos(self) -> global___AudioStreamEOS: ... + def __init__( + self, + *, + stream_handle: builtins.int = ..., + 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: ... + +global___AudioStreamEvent = AudioStreamEvent + +@typing_extensions.final +class AudioFrameReceived(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + FRAME_FIELD_NUMBER: builtins.int + @property + def frame(self) -> global___OwnedAudioFrameBuffer: ... + def __init__( + self, + *, + 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: ... + +global___AudioFrameReceived = AudioFrameReceived + +@typing_extensions.final +class AudioStreamEOS(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___AudioStreamEOS = AudioStreamEOS + +@typing_extensions.final +class AudioSourceOptions(google.protobuf.message.Message): + """ + AudioSource + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ECHO_CANCELLATION_FIELD_NUMBER: builtins.int + NOISE_SUPPRESSION_FIELD_NUMBER: builtins.int + AUTO_GAIN_CONTROL_FIELD_NUMBER: builtins.int + echo_cancellation: builtins.bool + noise_suppression: builtins.bool + auto_gain_control: builtins.bool + def __init__( + self, + *, + echo_cancellation: builtins.bool = ..., + 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: ... + +global___AudioSourceOptions = AudioSourceOptions + +@typing_extensions.final +class AudioSourceInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TYPE_FIELD_NUMBER: builtins.int + type: global___AudioSourceType.ValueType + def __init__( + self, + *, + type: global___AudioSourceType.ValueType = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["type", b"type"]) -> None: ... + +global___AudioSourceInfo = AudioSourceInfo + +@typing_extensions.final +class OwnedAudioSource(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + HANDLE_FIELD_NUMBER: builtins.int + INFO_FIELD_NUMBER: builtins.int + @property + def handle(self) -> handle_pb2.FfiOwnedHandle: ... + @property + def info(self) -> global___AudioSourceInfo: ... + def __init__( + self, + *, + 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: ... + +global___OwnedAudioSource = OwnedAudioSource + +@typing_extensions.final +class AudioResamplerInfo(google.protobuf.message.Message): + """ + AudioResampler + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___AudioResamplerInfo = AudioResamplerInfo + +@typing_extensions.final +class OwnedAudioResampler(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + HANDLE_FIELD_NUMBER: builtins.int + INFO_FIELD_NUMBER: builtins.int + @property + def handle(self) -> handle_pb2.FfiOwnedHandle: ... + @property + def info(self) -> global___AudioResamplerInfo: ... + def __init__( + self, + *, + 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: ... + +global___OwnedAudioResampler = OwnedAudioResampler diff --git a/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py b/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py new file mode 100644 index 00000000..093b68ba --- /dev/null +++ b/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.py @@ -0,0 +1,79 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: e2ee.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\ne2ee.proto\x12\rlivekit.proto\"c\n\x0c\x46rameCryptor\x12\x1c\n\x14participant_identity\x18\x01 \x01(\t\x12\x11\n\ttrack_sid\x18\x02 \x01(\t\x12\x11\n\tkey_index\x18\x03 \x01(\x05\x12\x0f\n\x07\x65nabled\x18\x04 \x01(\x08\"\x8a\x01\n\x12KeyProviderOptions\x12\x17\n\nshared_key\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x1b\n\x13ratchet_window_size\x18\x02 \x01(\x05\x12\x14\n\x0cratchet_salt\x18\x03 \x01(\x0c\x12\x19\n\x11\x66\x61ilure_tolerance\x18\x04 \x01(\x05\x42\r\n\x0b_shared_key\"\x86\x01\n\x0b\x45\x32\x65\x65Options\x12\x36\n\x0f\x65ncryption_type\x18\x01 \x01(\x0e\x32\x1d.livekit.proto.EncryptionType\x12?\n\x14key_provider_options\x18\x02 \x01(\x0b\x32!.livekit.proto.KeyProviderOptions\"/\n\x1c\x45\x32\x65\x65ManagerSetEnabledRequest\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x1f\n\x1d\x45\x32\x65\x65ManagerSetEnabledResponse\"$\n\"E2eeManagerGetFrameCryptorsRequest\"Z\n#E2eeManagerGetFrameCryptorsResponse\x12\x33\n\x0e\x66rame_cryptors\x18\x01 \x03(\x0b\x32\x1b.livekit.proto.FrameCryptor\"a\n\x1d\x46rameCryptorSetEnabledRequest\x12\x1c\n\x14participant_identity\x18\x01 \x01(\t\x12\x11\n\ttrack_sid\x18\x02 \x01(\t\x12\x0f\n\x07\x65nabled\x18\x03 \x01(\x08\" \n\x1e\x46rameCryptorSetEnabledResponse\"d\n\x1e\x46rameCryptorSetKeyIndexRequest\x12\x1c\n\x14participant_identity\x18\x01 \x01(\t\x12\x11\n\ttrack_sid\x18\x02 \x01(\t\x12\x11\n\tkey_index\x18\x03 \x01(\x05\"!\n\x1f\x46rameCryptorSetKeyIndexResponse\"<\n\x13SetSharedKeyRequest\x12\x12\n\nshared_key\x18\x01 \x01(\x0c\x12\x11\n\tkey_index\x18\x02 \x01(\x05\"\x16\n\x14SetSharedKeyResponse\",\n\x17RatchetSharedKeyRequest\x12\x11\n\tkey_index\x18\x01 \x01(\x05\"<\n\x18RatchetSharedKeyResponse\x12\x14\n\x07new_key\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x42\n\n\x08_new_key\"(\n\x13GetSharedKeyRequest\x12\x11\n\tkey_index\x18\x01 \x01(\x05\"0\n\x14GetSharedKeyResponse\x12\x10\n\x03key\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x42\x06\n\x04_key\"M\n\rSetKeyRequest\x12\x1c\n\x14participant_identity\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\x0c\x12\x11\n\tkey_index\x18\x03 \x01(\x05\"\x10\n\x0eSetKeyResponse\"D\n\x11RatchetKeyRequest\x12\x1c\n\x14participant_identity\x18\x01 \x01(\t\x12\x11\n\tkey_index\x18\x02 \x01(\x05\"6\n\x12RatchetKeyResponse\x12\x14\n\x07new_key\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x42\n\n\x08_new_key\"@\n\rGetKeyRequest\x12\x1c\n\x14participant_identity\x18\x01 \x01(\t\x12\x11\n\tkey_index\x18\x02 \x01(\x05\"*\n\x0eGetKeyResponse\x12\x10\n\x03key\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x42\x06\n\x04_key\"\xcc\x05\n\x0b\x45\x32\x65\x65Request\x12\x13\n\x0broom_handle\x18\x01 \x01(\x04\x12J\n\x13manager_set_enabled\x18\x02 \x01(\x0b\x32+.livekit.proto.E2eeManagerSetEnabledRequestH\x00\x12W\n\x1amanager_get_frame_cryptors\x18\x03 \x01(\x0b\x32\x31.livekit.proto.E2eeManagerGetFrameCryptorsRequestH\x00\x12K\n\x13\x63ryptor_set_enabled\x18\x04 \x01(\x0b\x32,.livekit.proto.FrameCryptorSetEnabledRequestH\x00\x12N\n\x15\x63ryptor_set_key_index\x18\x05 \x01(\x0b\x32-.livekit.proto.FrameCryptorSetKeyIndexRequestH\x00\x12<\n\x0eset_shared_key\x18\x06 \x01(\x0b\x32\".livekit.proto.SetSharedKeyRequestH\x00\x12\x44\n\x12ratchet_shared_key\x18\x07 \x01(\x0b\x32&.livekit.proto.RatchetSharedKeyRequestH\x00\x12<\n\x0eget_shared_key\x18\x08 \x01(\x0b\x32\".livekit.proto.GetSharedKeyRequestH\x00\x12/\n\x07set_key\x18\t \x01(\x0b\x32\x1c.livekit.proto.SetKeyRequestH\x00\x12\x37\n\x0bratchet_key\x18\n \x01(\x0b\x32 .livekit.proto.RatchetKeyRequestH\x00\x12/\n\x07get_key\x18\x0b \x01(\x0b\x32\x1c.livekit.proto.GetKeyRequestH\x00\x42\t\n\x07message\"\xc2\x05\n\x0c\x45\x32\x65\x65Response\x12K\n\x13manager_set_enabled\x18\x01 \x01(\x0b\x32,.livekit.proto.E2eeManagerSetEnabledResponseH\x00\x12X\n\x1amanager_get_frame_cryptors\x18\x02 \x01(\x0b\x32\x32.livekit.proto.E2eeManagerGetFrameCryptorsResponseH\x00\x12L\n\x13\x63ryptor_set_enabled\x18\x03 \x01(\x0b\x32-.livekit.proto.FrameCryptorSetEnabledResponseH\x00\x12O\n\x15\x63ryptor_set_key_index\x18\x04 \x01(\x0b\x32..livekit.proto.FrameCryptorSetKeyIndexResponseH\x00\x12=\n\x0eset_shared_key\x18\x05 \x01(\x0b\x32#.livekit.proto.SetSharedKeyResponseH\x00\x12\x45\n\x12ratchet_shared_key\x18\x06 \x01(\x0b\x32\'.livekit.proto.RatchetSharedKeyResponseH\x00\x12=\n\x0eget_shared_key\x18\x07 \x01(\x0b\x32#.livekit.proto.GetSharedKeyResponseH\x00\x12\x30\n\x07set_key\x18\x08 \x01(\x0b\x32\x1d.livekit.proto.SetKeyResponseH\x00\x12\x38\n\x0bratchet_key\x18\t \x01(\x0b\x32!.livekit.proto.RatchetKeyResponseH\x00\x12\x30\n\x07get_key\x18\n \x01(\x0b\x32\x1d.livekit.proto.GetKeyResponseH\x00\x42\t\n\x07message*/\n\x0e\x45ncryptionType\x12\x08\n\x04NONE\x10\x00\x12\x07\n\x03GCM\x10\x01\x12\n\n\x06\x43USTOM\x10\x02*\x88\x01\n\x0f\x45ncryptionState\x12\x07\n\x03NEW\x10\x00\x12\x06\n\x02OK\x10\x01\x12\x15\n\x11\x45NCRYPTION_FAILED\x10\x02\x12\x15\n\x11\x44\x45\x43RYPTION_FAILED\x10\x03\x12\x0f\n\x0bMISSING_KEY\x10\x04\x12\x11\n\rKEY_RATCHETED\x10\x05\x12\x12\n\x0eINTERNAL_ERROR\x10\x06\x42\x10\xaa\x02\rLiveKit.Protob\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'e2ee_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + 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 + _globals['_ENCRYPTIONSTATE']._serialized_end=3123 + _globals['_FRAMECRYPTOR']._serialized_start=29 + _globals['_FRAMECRYPTOR']._serialized_end=128 + _globals['_KEYPROVIDEROPTIONS']._serialized_start=131 + _globals['_KEYPROVIDEROPTIONS']._serialized_end=269 + _globals['_E2EEOPTIONS']._serialized_start=272 + _globals['_E2EEOPTIONS']._serialized_end=406 + _globals['_E2EEMANAGERSETENABLEDREQUEST']._serialized_start=408 + _globals['_E2EEMANAGERSETENABLEDREQUEST']._serialized_end=455 + _globals['_E2EEMANAGERSETENABLEDRESPONSE']._serialized_start=457 + _globals['_E2EEMANAGERSETENABLEDRESPONSE']._serialized_end=488 + _globals['_E2EEMANAGERGETFRAMECRYPTORSREQUEST']._serialized_start=490 + _globals['_E2EEMANAGERGETFRAMECRYPTORSREQUEST']._serialized_end=526 + _globals['_E2EEMANAGERGETFRAMECRYPTORSRESPONSE']._serialized_start=528 + _globals['_E2EEMANAGERGETFRAMECRYPTORSRESPONSE']._serialized_end=618 + _globals['_FRAMECRYPTORSETENABLEDREQUEST']._serialized_start=620 + _globals['_FRAMECRYPTORSETENABLEDREQUEST']._serialized_end=717 + _globals['_FRAMECRYPTORSETENABLEDRESPONSE']._serialized_start=719 + _globals['_FRAMECRYPTORSETENABLEDRESPONSE']._serialized_end=751 + _globals['_FRAMECRYPTORSETKEYINDEXREQUEST']._serialized_start=753 + _globals['_FRAMECRYPTORSETKEYINDEXREQUEST']._serialized_end=853 + _globals['_FRAMECRYPTORSETKEYINDEXRESPONSE']._serialized_start=855 + _globals['_FRAMECRYPTORSETKEYINDEXRESPONSE']._serialized_end=888 + _globals['_SETSHAREDKEYREQUEST']._serialized_start=890 + _globals['_SETSHAREDKEYREQUEST']._serialized_end=950 + _globals['_SETSHAREDKEYRESPONSE']._serialized_start=952 + _globals['_SETSHAREDKEYRESPONSE']._serialized_end=974 + _globals['_RATCHETSHAREDKEYREQUEST']._serialized_start=976 + _globals['_RATCHETSHAREDKEYREQUEST']._serialized_end=1020 + _globals['_RATCHETSHAREDKEYRESPONSE']._serialized_start=1022 + _globals['_RATCHETSHAREDKEYRESPONSE']._serialized_end=1082 + _globals['_GETSHAREDKEYREQUEST']._serialized_start=1084 + _globals['_GETSHAREDKEYREQUEST']._serialized_end=1124 + _globals['_GETSHAREDKEYRESPONSE']._serialized_start=1126 + _globals['_GETSHAREDKEYRESPONSE']._serialized_end=1174 + _globals['_SETKEYREQUEST']._serialized_start=1176 + _globals['_SETKEYREQUEST']._serialized_end=1253 + _globals['_SETKEYRESPONSE']._serialized_start=1255 + _globals['_SETKEYRESPONSE']._serialized_end=1271 + _globals['_RATCHETKEYREQUEST']._serialized_start=1273 + _globals['_RATCHETKEYREQUEST']._serialized_end=1341 + _globals['_RATCHETKEYRESPONSE']._serialized_start=1343 + _globals['_RATCHETKEYRESPONSE']._serialized_end=1397 + _globals['_GETKEYREQUEST']._serialized_start=1399 + _globals['_GETKEYREQUEST']._serialized_end=1463 + _globals['_GETKEYRESPONSE']._serialized_start=1465 + _globals['_GETKEYRESPONSE']._serialized_end=1507 + _globals['_E2EEREQUEST']._serialized_start=1510 + _globals['_E2EEREQUEST']._serialized_end=2226 + _globals['_E2EERESPONSE']._serialized_start=2229 + _globals['_E2EERESPONSE']._serialized_end=2935 +# @@protoc_insertion_point(module_scope) diff --git a/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.pyi new file mode 100644 index 00000000..a34cf52d --- /dev/null +++ b/livekit-rtc/livekit/rtc/_proto/e2ee_pb2.pyi @@ -0,0 +1,564 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +Copyright 2023 LiveKit, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" +import builtins +import collections.abc +import google.protobuf.descriptor +import google.protobuf.internal.containers +import google.protobuf.internal.enum_type_wrapper +import google.protobuf.message +import sys +import typing + +if sys.version_info >= (3, 10): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +class _EncryptionType: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _EncryptionTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_EncryptionType.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + NONE: _EncryptionType.ValueType # 0 + GCM: _EncryptionType.ValueType # 1 + CUSTOM: _EncryptionType.ValueType # 2 + +class EncryptionType(_EncryptionType, metaclass=_EncryptionTypeEnumTypeWrapper): + """TODO(theomonnom): Should FrameCryptor be stateful on the client side and have their own handle?""" + +NONE: EncryptionType.ValueType # 0 +GCM: EncryptionType.ValueType # 1 +CUSTOM: EncryptionType.ValueType # 2 +global___EncryptionType = EncryptionType + +class _EncryptionState: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _EncryptionStateEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_EncryptionState.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + NEW: _EncryptionState.ValueType # 0 + OK: _EncryptionState.ValueType # 1 + ENCRYPTION_FAILED: _EncryptionState.ValueType # 2 + DECRYPTION_FAILED: _EncryptionState.ValueType # 3 + MISSING_KEY: _EncryptionState.ValueType # 4 + KEY_RATCHETED: _EncryptionState.ValueType # 5 + INTERNAL_ERROR: _EncryptionState.ValueType # 6 + +class EncryptionState(_EncryptionState, metaclass=_EncryptionStateEnumTypeWrapper): ... + +NEW: EncryptionState.ValueType # 0 +OK: EncryptionState.ValueType # 1 +ENCRYPTION_FAILED: EncryptionState.ValueType # 2 +DECRYPTION_FAILED: EncryptionState.ValueType # 3 +MISSING_KEY: EncryptionState.ValueType # 4 +KEY_RATCHETED: EncryptionState.ValueType # 5 +INTERNAL_ERROR: EncryptionState.ValueType # 6 +global___EncryptionState = EncryptionState + +@typing_extensions.final +class FrameCryptor(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PARTICIPANT_IDENTITY_FIELD_NUMBER: builtins.int + TRACK_SID_FIELD_NUMBER: builtins.int + KEY_INDEX_FIELD_NUMBER: builtins.int + ENABLED_FIELD_NUMBER: builtins.int + participant_identity: builtins.str + track_sid: builtins.str + key_index: builtins.int + enabled: builtins.bool + def __init__( + self, + *, + participant_identity: builtins.str = ..., + track_sid: builtins.str = ..., + 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: ... + +global___FrameCryptor = FrameCryptor + +@typing_extensions.final +class KeyProviderOptions(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SHARED_KEY_FIELD_NUMBER: builtins.int + RATCHET_WINDOW_SIZE_FIELD_NUMBER: builtins.int + RATCHET_SALT_FIELD_NUMBER: builtins.int + FAILURE_TOLERANCE_FIELD_NUMBER: builtins.int + shared_key: builtins.bytes + """Only specify if you want to use a shared_key""" + ratchet_window_size: builtins.int + ratchet_salt: builtins.bytes + failure_tolerance: builtins.int + """-1 = no tolerence""" + def __init__( + self, + *, + shared_key: builtins.bytes | None = ..., + ratchet_window_size: builtins.int = ..., + 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: ... + +global___KeyProviderOptions = KeyProviderOptions + +@typing_extensions.final +class E2eeOptions(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ENCRYPTION_TYPE_FIELD_NUMBER: builtins.int + KEY_PROVIDER_OPTIONS_FIELD_NUMBER: builtins.int + encryption_type: global___EncryptionType.ValueType + @property + def key_provider_options(self) -> global___KeyProviderOptions: ... + def __init__( + self, + *, + 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: ... + +global___E2eeOptions = E2eeOptions + +@typing_extensions.final +class E2eeManagerSetEnabledRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ENABLED_FIELD_NUMBER: builtins.int + enabled: builtins.bool + def __init__( + self, + *, + enabled: builtins.bool = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["enabled", b"enabled"]) -> None: ... + +global___E2eeManagerSetEnabledRequest = E2eeManagerSetEnabledRequest + +@typing_extensions.final +class E2eeManagerSetEnabledResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___E2eeManagerSetEnabledResponse = E2eeManagerSetEnabledResponse + +@typing_extensions.final +class E2eeManagerGetFrameCryptorsRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___E2eeManagerGetFrameCryptorsRequest = E2eeManagerGetFrameCryptorsRequest + +@typing_extensions.final +class E2eeManagerGetFrameCryptorsResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + FRAME_CRYPTORS_FIELD_NUMBER: builtins.int + @property + def frame_cryptors(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___FrameCryptor]: ... + def __init__( + self, + *, + frame_cryptors: collections.abc.Iterable[global___FrameCryptor] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["frame_cryptors", b"frame_cryptors"]) -> None: ... + +global___E2eeManagerGetFrameCryptorsResponse = E2eeManagerGetFrameCryptorsResponse + +@typing_extensions.final +class FrameCryptorSetEnabledRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PARTICIPANT_IDENTITY_FIELD_NUMBER: builtins.int + TRACK_SID_FIELD_NUMBER: builtins.int + ENABLED_FIELD_NUMBER: builtins.int + participant_identity: builtins.str + track_sid: builtins.str + enabled: builtins.bool + def __init__( + self, + *, + participant_identity: builtins.str = ..., + 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: ... + +global___FrameCryptorSetEnabledRequest = FrameCryptorSetEnabledRequest + +@typing_extensions.final +class FrameCryptorSetEnabledResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___FrameCryptorSetEnabledResponse = FrameCryptorSetEnabledResponse + +@typing_extensions.final +class FrameCryptorSetKeyIndexRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PARTICIPANT_IDENTITY_FIELD_NUMBER: builtins.int + TRACK_SID_FIELD_NUMBER: builtins.int + KEY_INDEX_FIELD_NUMBER: builtins.int + participant_identity: builtins.str + track_sid: builtins.str + key_index: builtins.int + def __init__( + self, + *, + participant_identity: builtins.str = ..., + 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: ... + +global___FrameCryptorSetKeyIndexRequest = FrameCryptorSetKeyIndexRequest + +@typing_extensions.final +class FrameCryptorSetKeyIndexResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___FrameCryptorSetKeyIndexResponse = FrameCryptorSetKeyIndexResponse + +@typing_extensions.final +class SetSharedKeyRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SHARED_KEY_FIELD_NUMBER: builtins.int + KEY_INDEX_FIELD_NUMBER: builtins.int + shared_key: builtins.bytes + key_index: builtins.int + def __init__( + self, + *, + 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: ... + +global___SetSharedKeyRequest = SetSharedKeyRequest + +@typing_extensions.final +class SetSharedKeyResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___SetSharedKeyResponse = SetSharedKeyResponse + +@typing_extensions.final +class RatchetSharedKeyRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_INDEX_FIELD_NUMBER: builtins.int + key_index: builtins.int + def __init__( + self, + *, + key_index: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["key_index", b"key_index"]) -> None: ... + +global___RatchetSharedKeyRequest = RatchetSharedKeyRequest + +@typing_extensions.final +class RatchetSharedKeyResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NEW_KEY_FIELD_NUMBER: builtins.int + new_key: builtins.bytes + def __init__( + self, + *, + 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: ... + +global___RatchetSharedKeyResponse = RatchetSharedKeyResponse + +@typing_extensions.final +class GetSharedKeyRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_INDEX_FIELD_NUMBER: builtins.int + key_index: builtins.int + def __init__( + self, + *, + key_index: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["key_index", b"key_index"]) -> None: ... + +global___GetSharedKeyRequest = GetSharedKeyRequest + +@typing_extensions.final +class GetSharedKeyResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + key: builtins.bytes + def __init__( + self, + *, + 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: ... + +global___GetSharedKeyResponse = GetSharedKeyResponse + +@typing_extensions.final +class SetKeyRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PARTICIPANT_IDENTITY_FIELD_NUMBER: builtins.int + KEY_FIELD_NUMBER: builtins.int + KEY_INDEX_FIELD_NUMBER: builtins.int + participant_identity: builtins.str + key: builtins.bytes + key_index: builtins.int + def __init__( + self, + *, + participant_identity: builtins.str = ..., + 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: ... + +global___SetKeyRequest = SetKeyRequest + +@typing_extensions.final +class SetKeyResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___SetKeyResponse = SetKeyResponse + +@typing_extensions.final +class RatchetKeyRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PARTICIPANT_IDENTITY_FIELD_NUMBER: builtins.int + KEY_INDEX_FIELD_NUMBER: builtins.int + participant_identity: builtins.str + key_index: builtins.int + def __init__( + self, + *, + 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: ... + +global___RatchetKeyRequest = RatchetKeyRequest + +@typing_extensions.final +class RatchetKeyResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NEW_KEY_FIELD_NUMBER: builtins.int + new_key: builtins.bytes + def __init__( + self, + *, + 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: ... + +global___RatchetKeyResponse = RatchetKeyResponse + +@typing_extensions.final +class GetKeyRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PARTICIPANT_IDENTITY_FIELD_NUMBER: builtins.int + KEY_INDEX_FIELD_NUMBER: builtins.int + participant_identity: builtins.str + key_index: builtins.int + def __init__( + self, + *, + 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: ... + +global___GetKeyRequest = GetKeyRequest + +@typing_extensions.final +class GetKeyResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + key: builtins.bytes + def __init__( + self, + *, + 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: ... + +global___GetKeyResponse = GetKeyResponse + +@typing_extensions.final +class E2eeRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ROOM_HANDLE_FIELD_NUMBER: builtins.int + MANAGER_SET_ENABLED_FIELD_NUMBER: builtins.int + MANAGER_GET_FRAME_CRYPTORS_FIELD_NUMBER: builtins.int + CRYPTOR_SET_ENABLED_FIELD_NUMBER: builtins.int + CRYPTOR_SET_KEY_INDEX_FIELD_NUMBER: builtins.int + SET_SHARED_KEY_FIELD_NUMBER: builtins.int + RATCHET_SHARED_KEY_FIELD_NUMBER: builtins.int + GET_SHARED_KEY_FIELD_NUMBER: builtins.int + SET_KEY_FIELD_NUMBER: builtins.int + RATCHET_KEY_FIELD_NUMBER: builtins.int + GET_KEY_FIELD_NUMBER: builtins.int + room_handle: builtins.int + @property + def manager_set_enabled(self) -> global___E2eeManagerSetEnabledRequest: ... + @property + def manager_get_frame_cryptors(self) -> global___E2eeManagerGetFrameCryptorsRequest: ... + @property + def cryptor_set_enabled(self) -> global___FrameCryptorSetEnabledRequest: ... + @property + def cryptor_set_key_index(self) -> global___FrameCryptorSetKeyIndexRequest: ... + @property + def set_shared_key(self) -> global___SetSharedKeyRequest: ... + @property + def ratchet_shared_key(self) -> global___RatchetSharedKeyRequest: ... + @property + def get_shared_key(self) -> global___GetSharedKeyRequest: ... + @property + def set_key(self) -> global___SetKeyRequest: ... + @property + def ratchet_key(self) -> global___RatchetKeyRequest: ... + @property + def get_key(self) -> global___GetKeyRequest: ... + def __init__( + self, + *, + room_handle: builtins.int = ..., + manager_set_enabled: global___E2eeManagerSetEnabledRequest | None = ..., + manager_get_frame_cryptors: global___E2eeManagerGetFrameCryptorsRequest | None = ..., + cryptor_set_enabled: global___FrameCryptorSetEnabledRequest | None = ..., + cryptor_set_key_index: global___FrameCryptorSetKeyIndexRequest | None = ..., + set_shared_key: global___SetSharedKeyRequest | None = ..., + ratchet_shared_key: global___RatchetSharedKeyRequest | None = ..., + get_shared_key: global___GetSharedKeyRequest | None = ..., + set_key: global___SetKeyRequest | None = ..., + 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: ... + +global___E2eeRequest = E2eeRequest + +@typing_extensions.final +class E2eeResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + MANAGER_SET_ENABLED_FIELD_NUMBER: builtins.int + MANAGER_GET_FRAME_CRYPTORS_FIELD_NUMBER: builtins.int + CRYPTOR_SET_ENABLED_FIELD_NUMBER: builtins.int + CRYPTOR_SET_KEY_INDEX_FIELD_NUMBER: builtins.int + SET_SHARED_KEY_FIELD_NUMBER: builtins.int + RATCHET_SHARED_KEY_FIELD_NUMBER: builtins.int + GET_SHARED_KEY_FIELD_NUMBER: builtins.int + SET_KEY_FIELD_NUMBER: builtins.int + RATCHET_KEY_FIELD_NUMBER: builtins.int + GET_KEY_FIELD_NUMBER: builtins.int + @property + def manager_set_enabled(self) -> global___E2eeManagerSetEnabledResponse: ... + @property + def manager_get_frame_cryptors(self) -> global___E2eeManagerGetFrameCryptorsResponse: ... + @property + def cryptor_set_enabled(self) -> global___FrameCryptorSetEnabledResponse: ... + @property + def cryptor_set_key_index(self) -> global___FrameCryptorSetKeyIndexResponse: ... + @property + def set_shared_key(self) -> global___SetSharedKeyResponse: ... + @property + def ratchet_shared_key(self) -> global___RatchetSharedKeyResponse: ... + @property + def get_shared_key(self) -> global___GetSharedKeyResponse: ... + @property + def set_key(self) -> global___SetKeyResponse: ... + @property + def ratchet_key(self) -> global___RatchetKeyResponse: ... + @property + def get_key(self) -> global___GetKeyResponse: ... + def __init__( + self, + *, + manager_set_enabled: global___E2eeManagerSetEnabledResponse | None = ..., + manager_get_frame_cryptors: global___E2eeManagerGetFrameCryptorsResponse | None = ..., + cryptor_set_enabled: global___FrameCryptorSetEnabledResponse | None = ..., + cryptor_set_key_index: global___FrameCryptorSetKeyIndexResponse | None = ..., + set_shared_key: global___SetSharedKeyResponse | None = ..., + ratchet_shared_key: global___RatchetSharedKeyResponse | None = ..., + get_shared_key: global___GetSharedKeyResponse | None = ..., + set_key: global___SetKeyResponse | None = ..., + 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: ... + +global___E2eeResponse = E2eeResponse diff --git a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py new file mode 100644 index 00000000..022b771c --- /dev/null +++ b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ffi.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() + + +from . import e2ee_pb2 as e2ee__pb2 +from . import track_pb2 as track__pb2 +from . import room_pb2 as room__pb2 +from . import video_frame_pb2 as video__frame__pb2 +from . import audio_frame_pb2 as audio__frame__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tffi.proto\x12\rlivekit.proto\x1a\ne2ee.proto\x1a\x0btrack.proto\x1a\nroom.proto\x1a\x11video_frame.proto\x1a\x11\x61udio_frame.proto\"\xf4\x0c\n\nFfiRequest\x12\x36\n\ninitialize\x18\x01 \x01(\x0b\x32 .livekit.proto.InitializeRequestH\x00\x12\x30\n\x07\x64ispose\x18\x02 \x01(\x0b\x32\x1d.livekit.proto.DisposeRequestH\x00\x12\x30\n\x07\x63onnect\x18\x03 \x01(\x0b\x32\x1d.livekit.proto.ConnectRequestH\x00\x12\x36\n\ndisconnect\x18\x04 \x01(\x0b\x32 .livekit.proto.DisconnectRequestH\x00\x12;\n\rpublish_track\x18\x05 \x01(\x0b\x32\".livekit.proto.PublishTrackRequestH\x00\x12?\n\x0funpublish_track\x18\x06 \x01(\x0b\x32$.livekit.proto.UnpublishTrackRequestH\x00\x12\x39\n\x0cpublish_data\x18\x07 \x01(\x0b\x32!.livekit.proto.PublishDataRequestH\x00\x12=\n\x0eset_subscribed\x18\x08 \x01(\x0b\x32#.livekit.proto.SetSubscribedRequestH\x00\x12J\n\x15update_local_metadata\x18\t \x01(\x0b\x32).livekit.proto.UpdateLocalMetadataRequestH\x00\x12\x42\n\x11update_local_name\x18\n \x01(\x0b\x32%.livekit.proto.UpdateLocalNameRequestH\x00\x12\x44\n\x12\x63reate_video_track\x18\x0b \x01(\x0b\x32&.livekit.proto.CreateVideoTrackRequestH\x00\x12\x44\n\x12\x63reate_audio_track\x18\x0c \x01(\x0b\x32&.livekit.proto.CreateAudioTrackRequestH\x00\x12\x33\n\tget_stats\x18\r \x01(\x0b\x32\x1e.livekit.proto.GetStatsRequestH\x00\x12\x44\n\x12\x61lloc_video_buffer\x18\x0e \x01(\x0b\x32&.livekit.proto.AllocVideoBufferRequestH\x00\x12@\n\x10new_video_stream\x18\x0f \x01(\x0b\x32$.livekit.proto.NewVideoStreamRequestH\x00\x12@\n\x10new_video_source\x18\x10 \x01(\x0b\x32$.livekit.proto.NewVideoSourceRequestH\x00\x12\x46\n\x13\x63\x61pture_video_frame\x18\x11 \x01(\x0b\x32\'.livekit.proto.CaptureVideoFrameRequestH\x00\x12/\n\x07to_i420\x18\x12 \x01(\x0b\x32\x1c.livekit.proto.ToI420RequestH\x00\x12/\n\x07to_argb\x18\x13 \x01(\x0b\x32\x1c.livekit.proto.ToArgbRequestH\x00\x12\x44\n\x12\x61lloc_audio_buffer\x18\x14 \x01(\x0b\x32&.livekit.proto.AllocAudioBufferRequestH\x00\x12@\n\x10new_audio_stream\x18\x15 \x01(\x0b\x32$.livekit.proto.NewAudioStreamRequestH\x00\x12@\n\x10new_audio_source\x18\x16 \x01(\x0b\x32$.livekit.proto.NewAudioSourceRequestH\x00\x12\x46\n\x13\x63\x61pture_audio_frame\x18\x17 \x01(\x0b\x32\'.livekit.proto.CaptureAudioFrameRequestH\x00\x12\x46\n\x13new_audio_resampler\x18\x18 \x01(\x0b\x32\'.livekit.proto.NewAudioResamplerRequestH\x00\x12\x44\n\x12remix_and_resample\x18\x19 \x01(\x0b\x32&.livekit.proto.RemixAndResampleRequestH\x00\x12*\n\x04\x65\x32\x65\x65\x18\x1a \x01(\x0b\x32\x1a.livekit.proto.E2eeRequestH\x00\x42\t\n\x07message\"\x8f\r\n\x0b\x46\x66iResponse\x12\x37\n\ninitialize\x18\x01 \x01(\x0b\x32!.livekit.proto.InitializeResponseH\x00\x12\x31\n\x07\x64ispose\x18\x02 \x01(\x0b\x32\x1e.livekit.proto.DisposeResponseH\x00\x12\x31\n\x07\x63onnect\x18\x03 \x01(\x0b\x32\x1e.livekit.proto.ConnectResponseH\x00\x12\x37\n\ndisconnect\x18\x04 \x01(\x0b\x32!.livekit.proto.DisconnectResponseH\x00\x12<\n\rpublish_track\x18\x05 \x01(\x0b\x32#.livekit.proto.PublishTrackResponseH\x00\x12@\n\x0funpublish_track\x18\x06 \x01(\x0b\x32%.livekit.proto.UnpublishTrackResponseH\x00\x12:\n\x0cpublish_data\x18\x07 \x01(\x0b\x32\".livekit.proto.PublishDataResponseH\x00\x12>\n\x0eset_subscribed\x18\x08 \x01(\x0b\x32$.livekit.proto.SetSubscribedResponseH\x00\x12K\n\x15update_local_metadata\x18\t \x01(\x0b\x32*.livekit.proto.UpdateLocalMetadataResponseH\x00\x12\x43\n\x11update_local_name\x18\n \x01(\x0b\x32&.livekit.proto.UpdateLocalNameResponseH\x00\x12\x45\n\x12\x63reate_video_track\x18\x0b \x01(\x0b\x32\'.livekit.proto.CreateVideoTrackResponseH\x00\x12\x45\n\x12\x63reate_audio_track\x18\x0c \x01(\x0b\x32\'.livekit.proto.CreateAudioTrackResponseH\x00\x12\x34\n\tget_stats\x18\r \x01(\x0b\x32\x1f.livekit.proto.GetStatsResponseH\x00\x12\x45\n\x12\x61lloc_video_buffer\x18\x0e \x01(\x0b\x32\'.livekit.proto.AllocVideoBufferResponseH\x00\x12\x41\n\x10new_video_stream\x18\x0f \x01(\x0b\x32%.livekit.proto.NewVideoStreamResponseH\x00\x12\x41\n\x10new_video_source\x18\x10 \x01(\x0b\x32%.livekit.proto.NewVideoSourceResponseH\x00\x12G\n\x13\x63\x61pture_video_frame\x18\x11 \x01(\x0b\x32(.livekit.proto.CaptureVideoFrameResponseH\x00\x12\x30\n\x07to_i420\x18\x12 \x01(\x0b\x32\x1d.livekit.proto.ToI420ResponseH\x00\x12\x30\n\x07to_argb\x18\x13 \x01(\x0b\x32\x1d.livekit.proto.ToArgbResponseH\x00\x12\x45\n\x12\x61lloc_audio_buffer\x18\x14 \x01(\x0b\x32\'.livekit.proto.AllocAudioBufferResponseH\x00\x12\x41\n\x10new_audio_stream\x18\x15 \x01(\x0b\x32%.livekit.proto.NewAudioStreamResponseH\x00\x12\x41\n\x10new_audio_source\x18\x16 \x01(\x0b\x32%.livekit.proto.NewAudioSourceResponseH\x00\x12G\n\x13\x63\x61pture_audio_frame\x18\x17 \x01(\x0b\x32(.livekit.proto.CaptureAudioFrameResponseH\x00\x12G\n\x13new_audio_resampler\x18\x18 \x01(\x0b\x32(.livekit.proto.NewAudioResamplerResponseH\x00\x12\x45\n\x12remix_and_resample\x18\x19 \x01(\x0b\x32\'.livekit.proto.RemixAndResampleResponseH\x00\x12+\n\x04\x65\x32\x65\x65\x18\x1a \x01(\x0b\x32\x1b.livekit.proto.E2eeResponseH\x00\x42\t\n\x07message\"\xe1\x06\n\x08\x46\x66iEvent\x12.\n\nroom_event\x18\x01 \x01(\x0b\x32\x18.livekit.proto.RoomEventH\x00\x12\x30\n\x0btrack_event\x18\x02 \x01(\x0b\x32\x19.livekit.proto.TrackEventH\x00\x12=\n\x12video_stream_event\x18\x03 \x01(\x0b\x32\x1f.livekit.proto.VideoStreamEventH\x00\x12=\n\x12\x61udio_stream_event\x18\x04 \x01(\x0b\x32\x1f.livekit.proto.AudioStreamEventH\x00\x12\x31\n\x07\x63onnect\x18\x05 \x01(\x0b\x32\x1e.livekit.proto.ConnectCallbackH\x00\x12\x37\n\ndisconnect\x18\x06 \x01(\x0b\x32!.livekit.proto.DisconnectCallbackH\x00\x12\x31\n\x07\x64ispose\x18\x07 \x01(\x0b\x32\x1e.livekit.proto.DisposeCallbackH\x00\x12<\n\rpublish_track\x18\x08 \x01(\x0b\x32#.livekit.proto.PublishTrackCallbackH\x00\x12@\n\x0funpublish_track\x18\t \x01(\x0b\x32%.livekit.proto.UnpublishTrackCallbackH\x00\x12:\n\x0cpublish_data\x18\n \x01(\x0b\x32\".livekit.proto.PublishDataCallbackH\x00\x12G\n\x13\x63\x61pture_audio_frame\x18\x0b \x01(\x0b\x32(.livekit.proto.CaptureAudioFrameCallbackH\x00\x12K\n\x15update_local_metadata\x18\x0c \x01(\x0b\x32*.livekit.proto.UpdateLocalMetadataCallbackH\x00\x12\x43\n\x11update_local_name\x18\r \x01(\x0b\x32&.livekit.proto.UpdateLocalNameCallbackH\x00\x12\x34\n\tget_stats\x18\x0e \x01(\x0b\x32\x1f.livekit.proto.GetStatsCallbackH\x00\x42\t\n\x07message\"/\n\x11InitializeRequest\x12\x1a\n\x12\x65vent_callback_ptr\x18\x01 \x01(\x04\"\x14\n\x12InitializeResponse\"\x1f\n\x0e\x44isposeRequest\x12\r\n\x05\x61sync\x18\x01 \x01(\x08\"5\n\x0f\x44isposeResponse\x12\x15\n\x08\x61sync_id\x18\x01 \x01(\x04H\x00\x88\x01\x01\x42\x0b\n\t_async_id\"#\n\x0f\x44isposeCallback\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\x42\x10\xaa\x02\rLiveKit.Protob\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ffi_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\rLiveKit.Proto' + _globals['_FFIREQUEST']._serialized_start=104 + _globals['_FFIREQUEST']._serialized_end=1756 + _globals['_FFIRESPONSE']._serialized_start=1759 + _globals['_FFIRESPONSE']._serialized_end=3438 + _globals['_FFIEVENT']._serialized_start=3441 + _globals['_FFIEVENT']._serialized_end=4306 + _globals['_INITIALIZEREQUEST']._serialized_start=4308 + _globals['_INITIALIZEREQUEST']._serialized_end=4355 + _globals['_INITIALIZERESPONSE']._serialized_start=4357 + _globals['_INITIALIZERESPONSE']._serialized_end=4377 + _globals['_DISPOSEREQUEST']._serialized_start=4379 + _globals['_DISPOSEREQUEST']._serialized_end=4410 + _globals['_DISPOSERESPONSE']._serialized_start=4412 + _globals['_DISPOSERESPONSE']._serialized_end=4465 + _globals['_DISPOSECALLBACK']._serialized_start=4467 + _globals['_DISPOSECALLBACK']._serialized_end=4502 +# @@protoc_insertion_point(module_scope) diff --git a/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi new file mode 100644 index 00000000..7477fc2c --- /dev/null +++ b/livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyi @@ -0,0 +1,463 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +Copyright 2023 LiveKit, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" +from . import audio_frame_pb2 +import builtins +from . import e2ee_pb2 +import google.protobuf.descriptor +import google.protobuf.message +from . import room_pb2 +import sys +from . import track_pb2 +from . import video_frame_pb2 + +if sys.version_info >= (3, 8): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing_extensions.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 + refer as the ffi client the foreign language that commumicates with the ffi server. (e.g Python SDK, Unity SDK, etc...) + + We expose the Rust client implementation of livekit using the protocol defined here. + Everything starts with a FfiRequest, which is a oneof message that contains all the possible + requests that can be made to the ffi server. + The server will then respond with a FfiResponse, which is also a oneof message that contains + all the possible responses. + The first request sent to the server must be an InitializeRequest, which contains the a pointer + to the callback function that will be used to send events and async responses to the ffi client. + (e.g participant joined, track published, etc...) + + **Useful things know when collaborating on the protocol:** + Everything is subject to discussion and change :-) + + - The ffi client implementation must never forget to correctly dispose all the owned handles + that it receives from the server. + + Therefore, the ffi client is easier to implement if there is less handles to manage. + + - We are mainly using FfiHandle on info messages (e.g: RoomInfo, TrackInfo, etc...) + For this reason, info are only sent once, at creation (We're not using them for updates, we can infer them from + events on the client implementation). + e.g: set speaking to true when we receive a ActiveSpeakerChanged event. + + This is the input of livekit_ffi_request function + We always expect a response (FFIResponse, even if it's empty) + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + INITIALIZE_FIELD_NUMBER: builtins.int + DISPOSE_FIELD_NUMBER: builtins.int + CONNECT_FIELD_NUMBER: builtins.int + DISCONNECT_FIELD_NUMBER: builtins.int + PUBLISH_TRACK_FIELD_NUMBER: builtins.int + UNPUBLISH_TRACK_FIELD_NUMBER: builtins.int + PUBLISH_DATA_FIELD_NUMBER: builtins.int + SET_SUBSCRIBED_FIELD_NUMBER: builtins.int + UPDATE_LOCAL_METADATA_FIELD_NUMBER: builtins.int + UPDATE_LOCAL_NAME_FIELD_NUMBER: builtins.int + CREATE_VIDEO_TRACK_FIELD_NUMBER: builtins.int + CREATE_AUDIO_TRACK_FIELD_NUMBER: builtins.int + GET_STATS_FIELD_NUMBER: builtins.int + ALLOC_VIDEO_BUFFER_FIELD_NUMBER: builtins.int + NEW_VIDEO_STREAM_FIELD_NUMBER: builtins.int + NEW_VIDEO_SOURCE_FIELD_NUMBER: builtins.int + CAPTURE_VIDEO_FRAME_FIELD_NUMBER: builtins.int + TO_I420_FIELD_NUMBER: builtins.int + TO_ARGB_FIELD_NUMBER: builtins.int + ALLOC_AUDIO_BUFFER_FIELD_NUMBER: builtins.int + NEW_AUDIO_STREAM_FIELD_NUMBER: builtins.int + NEW_AUDIO_SOURCE_FIELD_NUMBER: builtins.int + CAPTURE_AUDIO_FRAME_FIELD_NUMBER: builtins.int + NEW_AUDIO_RESAMPLER_FIELD_NUMBER: builtins.int + REMIX_AND_RESAMPLE_FIELD_NUMBER: builtins.int + E2EE_FIELD_NUMBER: builtins.int + @property + def initialize(self) -> global___InitializeRequest: ... + @property + def dispose(self) -> global___DisposeRequest: ... + @property + def connect(self) -> room_pb2.ConnectRequest: + """Room""" + @property + def disconnect(self) -> room_pb2.DisconnectRequest: ... + @property + def publish_track(self) -> room_pb2.PublishTrackRequest: ... + @property + def unpublish_track(self) -> room_pb2.UnpublishTrackRequest: ... + @property + def publish_data(self) -> room_pb2.PublishDataRequest: ... + @property + def set_subscribed(self) -> room_pb2.SetSubscribedRequest: ... + @property + def update_local_metadata(self) -> room_pb2.UpdateLocalMetadataRequest: ... + @property + def update_local_name(self) -> room_pb2.UpdateLocalNameRequest: ... + @property + def create_video_track(self) -> track_pb2.CreateVideoTrackRequest: + """Track""" + @property + def create_audio_track(self) -> track_pb2.CreateAudioTrackRequest: ... + @property + def get_stats(self) -> track_pb2.GetStatsRequest: ... + @property + def alloc_video_buffer(self) -> video_frame_pb2.AllocVideoBufferRequest: + """Video""" + @property + def new_video_stream(self) -> video_frame_pb2.NewVideoStreamRequest: ... + @property + def new_video_source(self) -> video_frame_pb2.NewVideoSourceRequest: ... + @property + def capture_video_frame(self) -> video_frame_pb2.CaptureVideoFrameRequest: ... + @property + def to_i420(self) -> video_frame_pb2.ToI420Request: ... + @property + def to_argb(self) -> video_frame_pb2.ToArgbRequest: ... + @property + def alloc_audio_buffer(self) -> audio_frame_pb2.AllocAudioBufferRequest: + """Audio""" + @property + def new_audio_stream(self) -> audio_frame_pb2.NewAudioStreamRequest: ... + @property + def new_audio_source(self) -> audio_frame_pb2.NewAudioSourceRequest: ... + @property + def capture_audio_frame(self) -> audio_frame_pb2.CaptureAudioFrameRequest: ... + @property + def new_audio_resampler(self) -> audio_frame_pb2.NewAudioResamplerRequest: ... + @property + def remix_and_resample(self) -> audio_frame_pb2.RemixAndResampleRequest: ... + @property + def e2ee(self) -> e2ee_pb2.E2eeRequest: ... + def __init__( + self, + *, + initialize: global___InitializeRequest | None = ..., + dispose: global___DisposeRequest | None = ..., + connect: room_pb2.ConnectRequest | None = ..., + disconnect: room_pb2.DisconnectRequest | None = ..., + publish_track: room_pb2.PublishTrackRequest | None = ..., + unpublish_track: room_pb2.UnpublishTrackRequest | None = ..., + publish_data: room_pb2.PublishDataRequest | None = ..., + set_subscribed: room_pb2.SetSubscribedRequest | None = ..., + update_local_metadata: room_pb2.UpdateLocalMetadataRequest | None = ..., + update_local_name: room_pb2.UpdateLocalNameRequest | None = ..., + create_video_track: track_pb2.CreateVideoTrackRequest | None = ..., + create_audio_track: track_pb2.CreateAudioTrackRequest | None = ..., + get_stats: track_pb2.GetStatsRequest | None = ..., + alloc_video_buffer: video_frame_pb2.AllocVideoBufferRequest | None = ..., + new_video_stream: video_frame_pb2.NewVideoStreamRequest | None = ..., + new_video_source: video_frame_pb2.NewVideoSourceRequest | None = ..., + capture_video_frame: video_frame_pb2.CaptureVideoFrameRequest | None = ..., + to_i420: video_frame_pb2.ToI420Request | None = ..., + to_argb: video_frame_pb2.ToArgbRequest | None = ..., + alloc_audio_buffer: audio_frame_pb2.AllocAudioBufferRequest | None = ..., + new_audio_stream: audio_frame_pb2.NewAudioStreamRequest | None = ..., + new_audio_source: audio_frame_pb2.NewAudioSourceRequest | None = ..., + capture_audio_frame: audio_frame_pb2.CaptureAudioFrameRequest | None = ..., + new_audio_resampler: audio_frame_pb2.NewAudioResamplerRequest | None = ..., + remix_and_resample: audio_frame_pb2.RemixAndResampleRequest | None = ..., + e2ee: e2ee_pb2.E2eeRequest | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["alloc_audio_buffer", b"alloc_audio_buffer", "alloc_video_buffer", b"alloc_video_buffer", "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_stats", b"get_stats", "initialize", b"initialize", "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", "to_argb", b"to_argb", "to_i420", b"to_i420", "unpublish_track", b"unpublish_track", "update_local_metadata", b"update_local_metadata", "update_local_name", b"update_local_name"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["alloc_audio_buffer", b"alloc_audio_buffer", "alloc_video_buffer", b"alloc_video_buffer", "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_stats", b"get_stats", "initialize", b"initialize", "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", "to_argb", b"to_argb", "to_i420", b"to_i420", "unpublish_track", b"unpublish_track", "update_local_metadata", b"update_local_metadata", "update_local_name", b"update_local_name"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["message", b"message"]) -> typing_extensions.Literal["initialize", "dispose", "connect", "disconnect", "publish_track", "unpublish_track", "publish_data", "set_subscribed", "update_local_metadata", "update_local_name", "create_video_track", "create_audio_track", "get_stats", "alloc_video_buffer", "new_video_stream", "new_video_source", "capture_video_frame", "to_i420", "to_argb", "alloc_audio_buffer", "new_audio_stream", "new_audio_source", "capture_audio_frame", "new_audio_resampler", "remix_and_resample", "e2ee"] | None: ... + +global___FfiRequest = FfiRequest + +@typing_extensions.final +class FfiResponse(google.protobuf.message.Message): + """This is the output of livekit_ffi_request function.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + INITIALIZE_FIELD_NUMBER: builtins.int + DISPOSE_FIELD_NUMBER: builtins.int + CONNECT_FIELD_NUMBER: builtins.int + DISCONNECT_FIELD_NUMBER: builtins.int + PUBLISH_TRACK_FIELD_NUMBER: builtins.int + UNPUBLISH_TRACK_FIELD_NUMBER: builtins.int + PUBLISH_DATA_FIELD_NUMBER: builtins.int + SET_SUBSCRIBED_FIELD_NUMBER: builtins.int + UPDATE_LOCAL_METADATA_FIELD_NUMBER: builtins.int + UPDATE_LOCAL_NAME_FIELD_NUMBER: builtins.int + CREATE_VIDEO_TRACK_FIELD_NUMBER: builtins.int + CREATE_AUDIO_TRACK_FIELD_NUMBER: builtins.int + GET_STATS_FIELD_NUMBER: builtins.int + ALLOC_VIDEO_BUFFER_FIELD_NUMBER: builtins.int + NEW_VIDEO_STREAM_FIELD_NUMBER: builtins.int + NEW_VIDEO_SOURCE_FIELD_NUMBER: builtins.int + CAPTURE_VIDEO_FRAME_FIELD_NUMBER: builtins.int + TO_I420_FIELD_NUMBER: builtins.int + TO_ARGB_FIELD_NUMBER: builtins.int + ALLOC_AUDIO_BUFFER_FIELD_NUMBER: builtins.int + NEW_AUDIO_STREAM_FIELD_NUMBER: builtins.int + NEW_AUDIO_SOURCE_FIELD_NUMBER: builtins.int + CAPTURE_AUDIO_FRAME_FIELD_NUMBER: builtins.int + NEW_AUDIO_RESAMPLER_FIELD_NUMBER: builtins.int + REMIX_AND_RESAMPLE_FIELD_NUMBER: builtins.int + E2EE_FIELD_NUMBER: builtins.int + @property + def initialize(self) -> global___InitializeResponse: ... + @property + def dispose(self) -> global___DisposeResponse: ... + @property + def connect(self) -> room_pb2.ConnectResponse: + """Room""" + @property + def disconnect(self) -> room_pb2.DisconnectResponse: ... + @property + def publish_track(self) -> room_pb2.PublishTrackResponse: ... + @property + def unpublish_track(self) -> room_pb2.UnpublishTrackResponse: ... + @property + def publish_data(self) -> room_pb2.PublishDataResponse: ... + @property + def set_subscribed(self) -> room_pb2.SetSubscribedResponse: ... + @property + def update_local_metadata(self) -> room_pb2.UpdateLocalMetadataResponse: ... + @property + def update_local_name(self) -> room_pb2.UpdateLocalNameResponse: ... + @property + def create_video_track(self) -> track_pb2.CreateVideoTrackResponse: + """Track""" + @property + def create_audio_track(self) -> track_pb2.CreateAudioTrackResponse: ... + @property + def get_stats(self) -> track_pb2.GetStatsResponse: ... + @property + def alloc_video_buffer(self) -> video_frame_pb2.AllocVideoBufferResponse: + """Video""" + @property + def new_video_stream(self) -> video_frame_pb2.NewVideoStreamResponse: ... + @property + def new_video_source(self) -> video_frame_pb2.NewVideoSourceResponse: ... + @property + def capture_video_frame(self) -> video_frame_pb2.CaptureVideoFrameResponse: ... + @property + def to_i420(self) -> video_frame_pb2.ToI420Response: ... + @property + def to_argb(self) -> video_frame_pb2.ToArgbResponse: ... + @property + def alloc_audio_buffer(self) -> audio_frame_pb2.AllocAudioBufferResponse: + """Audio""" + @property + def new_audio_stream(self) -> audio_frame_pb2.NewAudioStreamResponse: ... + @property + def new_audio_source(self) -> audio_frame_pb2.NewAudioSourceResponse: ... + @property + def capture_audio_frame(self) -> audio_frame_pb2.CaptureAudioFrameResponse: ... + @property + def new_audio_resampler(self) -> audio_frame_pb2.NewAudioResamplerResponse: ... + @property + def remix_and_resample(self) -> audio_frame_pb2.RemixAndResampleResponse: ... + @property + def e2ee(self) -> e2ee_pb2.E2eeResponse: ... + def __init__( + self, + *, + initialize: global___InitializeResponse | None = ..., + dispose: global___DisposeResponse | None = ..., + connect: room_pb2.ConnectResponse | None = ..., + disconnect: room_pb2.DisconnectResponse | None = ..., + publish_track: room_pb2.PublishTrackResponse | None = ..., + unpublish_track: room_pb2.UnpublishTrackResponse | None = ..., + publish_data: room_pb2.PublishDataResponse | None = ..., + set_subscribed: room_pb2.SetSubscribedResponse | None = ..., + update_local_metadata: room_pb2.UpdateLocalMetadataResponse | None = ..., + update_local_name: room_pb2.UpdateLocalNameResponse | None = ..., + create_video_track: track_pb2.CreateVideoTrackResponse | None = ..., + create_audio_track: track_pb2.CreateAudioTrackResponse | None = ..., + get_stats: track_pb2.GetStatsResponse | None = ..., + alloc_video_buffer: video_frame_pb2.AllocVideoBufferResponse | None = ..., + new_video_stream: video_frame_pb2.NewVideoStreamResponse | None = ..., + new_video_source: video_frame_pb2.NewVideoSourceResponse | None = ..., + capture_video_frame: video_frame_pb2.CaptureVideoFrameResponse | None = ..., + to_i420: video_frame_pb2.ToI420Response | None = ..., + to_argb: video_frame_pb2.ToArgbResponse | None = ..., + alloc_audio_buffer: audio_frame_pb2.AllocAudioBufferResponse | None = ..., + new_audio_stream: audio_frame_pb2.NewAudioStreamResponse | None = ..., + new_audio_source: audio_frame_pb2.NewAudioSourceResponse | None = ..., + capture_audio_frame: audio_frame_pb2.CaptureAudioFrameResponse | None = ..., + new_audio_resampler: audio_frame_pb2.NewAudioResamplerResponse | None = ..., + remix_and_resample: audio_frame_pb2.RemixAndResampleResponse | None = ..., + e2ee: e2ee_pb2.E2eeResponse | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["alloc_audio_buffer", b"alloc_audio_buffer", "alloc_video_buffer", b"alloc_video_buffer", "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_stats", b"get_stats", "initialize", b"initialize", "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", "to_argb", b"to_argb", "to_i420", b"to_i420", "unpublish_track", b"unpublish_track", "update_local_metadata", b"update_local_metadata", "update_local_name", b"update_local_name"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["alloc_audio_buffer", b"alloc_audio_buffer", "alloc_video_buffer", b"alloc_video_buffer", "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_stats", b"get_stats", "initialize", b"initialize", "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", "to_argb", b"to_argb", "to_i420", b"to_i420", "unpublish_track", b"unpublish_track", "update_local_metadata", b"update_local_metadata", "update_local_name", b"update_local_name"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["message", b"message"]) -> typing_extensions.Literal["initialize", "dispose", "connect", "disconnect", "publish_track", "unpublish_track", "publish_data", "set_subscribed", "update_local_metadata", "update_local_name", "create_video_track", "create_audio_track", "get_stats", "alloc_video_buffer", "new_video_stream", "new_video_source", "capture_video_frame", "to_i420", "to_argb", "alloc_audio_buffer", "new_audio_stream", "new_audio_source", "capture_audio_frame", "new_audio_resampler", "remix_and_resample", "e2ee"] | None: ... + +global___FfiResponse = FfiResponse + +@typing_extensions.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 + on the ffi client side. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ROOM_EVENT_FIELD_NUMBER: builtins.int + TRACK_EVENT_FIELD_NUMBER: builtins.int + VIDEO_STREAM_EVENT_FIELD_NUMBER: builtins.int + AUDIO_STREAM_EVENT_FIELD_NUMBER: builtins.int + CONNECT_FIELD_NUMBER: builtins.int + DISCONNECT_FIELD_NUMBER: builtins.int + DISPOSE_FIELD_NUMBER: builtins.int + PUBLISH_TRACK_FIELD_NUMBER: builtins.int + UNPUBLISH_TRACK_FIELD_NUMBER: builtins.int + PUBLISH_DATA_FIELD_NUMBER: builtins.int + CAPTURE_AUDIO_FRAME_FIELD_NUMBER: builtins.int + UPDATE_LOCAL_METADATA_FIELD_NUMBER: builtins.int + UPDATE_LOCAL_NAME_FIELD_NUMBER: builtins.int + GET_STATS_FIELD_NUMBER: builtins.int + @property + def room_event(self) -> room_pb2.RoomEvent: ... + @property + def track_event(self) -> track_pb2.TrackEvent: ... + @property + def video_stream_event(self) -> video_frame_pb2.VideoStreamEvent: ... + @property + def audio_stream_event(self) -> audio_frame_pb2.AudioStreamEvent: ... + @property + def connect(self) -> room_pb2.ConnectCallback: ... + @property + def disconnect(self) -> room_pb2.DisconnectCallback: ... + @property + def dispose(self) -> global___DisposeCallback: ... + @property + def publish_track(self) -> room_pb2.PublishTrackCallback: ... + @property + def unpublish_track(self) -> room_pb2.UnpublishTrackCallback: ... + @property + def publish_data(self) -> room_pb2.PublishDataCallback: ... + @property + def capture_audio_frame(self) -> audio_frame_pb2.CaptureAudioFrameCallback: ... + @property + def update_local_metadata(self) -> room_pb2.UpdateLocalMetadataCallback: ... + @property + def update_local_name(self) -> room_pb2.UpdateLocalNameCallback: ... + @property + def get_stats(self) -> track_pb2.GetStatsCallback: ... + def __init__( + self, + *, + room_event: room_pb2.RoomEvent | None = ..., + track_event: track_pb2.TrackEvent | None = ..., + video_stream_event: video_frame_pb2.VideoStreamEvent | None = ..., + audio_stream_event: audio_frame_pb2.AudioStreamEvent | None = ..., + connect: room_pb2.ConnectCallback | None = ..., + disconnect: room_pb2.DisconnectCallback | None = ..., + dispose: global___DisposeCallback | None = ..., + publish_track: room_pb2.PublishTrackCallback | None = ..., + unpublish_track: room_pb2.UnpublishTrackCallback | None = ..., + publish_data: room_pb2.PublishDataCallback | None = ..., + capture_audio_frame: audio_frame_pb2.CaptureAudioFrameCallback | None = ..., + update_local_metadata: room_pb2.UpdateLocalMetadataCallback | None = ..., + update_local_name: room_pb2.UpdateLocalNameCallback | None = ..., + get_stats: track_pb2.GetStatsCallback | 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_stats", b"get_stats", "message", b"message", "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_stats", b"get_stats", "message", b"message", "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"] | None: ... + +global___FfiEvent = FfiEvent + +@typing_extensions.final +class InitializeRequest(google.protobuf.message.Message): + """Setup the callback where the foreign language can receive events + and responses to asynchronous requests + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + EVENT_CALLBACK_PTR_FIELD_NUMBER: builtins.int + event_callback_ptr: builtins.int + def __init__( + self, + *, + event_callback_ptr: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["event_callback_ptr", b"event_callback_ptr"]) -> None: ... + +global___InitializeRequest = InitializeRequest + +@typing_extensions.final +class InitializeResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___InitializeResponse = InitializeResponse + +@typing_extensions.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. + TODO(theomonnom): Implement a debug mode where we can find all leaked handles? + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_FIELD_NUMBER: builtins.int + def __init__( + self, + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["async", b"async"]) -> None: ... + +global___DisposeRequest = DisposeRequest + +@typing_extensions.final +class DisposeResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + async_id: builtins.int + """None if sync""" + def __init__( + self, + *, + 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: ... + +global___DisposeResponse = DisposeResponse + +@typing_extensions.final +class DisposeCallback(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + async_id: builtins.int + def __init__( + self, + *, + async_id: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + +global___DisposeCallback = DisposeCallback diff --git a/livekit-rtc/livekit/rtc/_proto/handle_pb2.py b/livekit-rtc/livekit/rtc/_proto/handle_pb2.py new file mode 100644 index 00000000..c6b9f84c --- /dev/null +++ b/livekit-rtc/livekit/rtc/_proto/handle_pb2.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: handle.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\x0chandle.proto\x12\rlivekit.proto\"\x1c\n\x0e\x46\x66iOwnedHandle\x12\n\n\x02id\x18\x01 \x01(\x04\x42\x10\xaa\x02\rLiveKit.Protob\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'handle_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + 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 new file mode 100644 index 00000000..5b525ca9 --- /dev/null +++ b/livekit-rtc/livekit/rtc/_proto/handle_pb2.pyi @@ -0,0 +1,54 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +Copyright 2023 LiveKit, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" +import builtins +import google.protobuf.descriptor +import google.protobuf.message +import sys + +if sys.version_info >= (3, 8): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing_extensions.final +class FfiOwnedHandle(google.protobuf.message.Message): + """# Safety + The foreign language is responsable for disposing handles + Forgetting to dispose the handle may lead to memory leaks + + Dropping a handle doesn't necessarily mean that the object is destroyed if it is still used + on the FfiServer (Atomic reference counting) + + When refering to a handle without owning it, we just use a uint32 without this message. + (the variable name is suffixed with "_handle") + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ID_FIELD_NUMBER: builtins.int + id: builtins.int + def __init__( + self, + *, + id: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.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 new file mode 100644 index 00000000..bb3a6af1 --- /dev/null +++ b/livekit-rtc/livekit/rtc/_proto/participant_pb2.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: participant.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() + + +from . import handle_pb2 as handle__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11participant.proto\x12\rlivekit.proto\x1a\x0chandle.proto\"P\n\x0fParticipantInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08identity\x18\x03 \x01(\t\x12\x10\n\x08metadata\x18\x04 \x01(\t\"o\n\x10OwnedParticipant\x12-\n\x06handle\x18\x01 \x01(\x0b\x32\x1d.livekit.proto.FfiOwnedHandle\x12,\n\x04info\x18\x02 \x01(\x0b\x32\x1e.livekit.proto.ParticipantInfoB\x10\xaa\x02\rLiveKit.Protob\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'participant_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + 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 + _globals['_OWNEDPARTICIPANT']._serialized_end=243 +# @@protoc_insertion_point(module_scope) diff --git a/livekit-rtc/livekit/rtc/_proto/participant_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/participant_pb2.pyi new file mode 100644 index 00000000..0b30d59e --- /dev/null +++ b/livekit-rtc/livekit/rtc/_proto/participant_pb2.pyi @@ -0,0 +1,74 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +Copyright 2023 LiveKit, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" +import builtins +import google.protobuf.descriptor +import google.protobuf.message +from . import handle_pb2 +import sys + +if sys.version_info >= (3, 8): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing_extensions.final +class ParticipantInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SID_FIELD_NUMBER: builtins.int + NAME_FIELD_NUMBER: builtins.int + IDENTITY_FIELD_NUMBER: builtins.int + METADATA_FIELD_NUMBER: builtins.int + sid: builtins.str + name: builtins.str + identity: builtins.str + metadata: builtins.str + def __init__( + self, + *, + sid: builtins.str = ..., + name: builtins.str = ..., + 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: ... + +global___ParticipantInfo = ParticipantInfo + +@typing_extensions.final +class OwnedParticipant(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + HANDLE_FIELD_NUMBER: builtins.int + INFO_FIELD_NUMBER: builtins.int + @property + def handle(self) -> handle_pb2.FfiOwnedHandle: ... + @property + def info(self) -> global___ParticipantInfo: ... + def __init__( + self, + *, + 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: ... + +global___OwnedParticipant = OwnedParticipant diff --git a/livekit-rtc/livekit/rtc/_proto/room_pb2.py b/livekit-rtc/livekit/rtc/_proto/room_pb2.py new file mode 100644 index 00000000..b974b273 --- /dev/null +++ b/livekit-rtc/livekit/rtc/_proto/room_pb2.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: room.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() + + +from . import e2ee_pb2 as e2ee__pb2 +from . import handle_pb2 as handle__pb2 +from . import participant_pb2 as participant__pb2 +from . import track_pb2 as track__pb2 +from . import video_frame_pb2 as video__frame__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\"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\"\xa1\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\"\'\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\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\"\xca\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\x42\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\"\x97\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.DataPacketKindB\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\n\x11\x43onnectionQuality\x12\x10\n\x0cQUALITY_POOR\x10\x00\x12\x10\n\x0cQUALITY_GOOD\x10\x01\x12\x15\n\x11QUALITY_EXCELLENT\x10\x02*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: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\rLiveKit.Proto' + _globals['_ICETRANSPORTTYPE']._serialized_start=6186 + _globals['_ICETRANSPORTTYPE']._serialized_end=6266 + _globals['_CONTINUALGATHERINGPOLICY']._serialized_start=6268 + _globals['_CONTINUALGATHERINGPOLICY']._serialized_end=6335 + _globals['_CONNECTIONQUALITY']._serialized_start=6337 + _globals['_CONNECTIONQUALITY']._serialized_end=6415 + _globals['_CONNECTIONSTATE']._serialized_start=6417 + _globals['_CONNECTIONSTATE']._serialized_end=6500 + _globals['_DATAPACKETKIND']._serialized_start=6502 + _globals['_DATAPACKETKIND']._serialized_end=6553 + _globals['_CONNECTREQUEST']._serialized_start=106 + _globals['_CONNECTREQUEST']._serialized_end=195 + _globals['_CONNECTRESPONSE']._serialized_start=197 + _globals['_CONNECTRESPONSE']._serialized_end=232 + _globals['_CONNECTCALLBACK']._serialized_start=235 + _globals['_CONNECTCALLBACK']._serialized_end=616 + _globals['_CONNECTCALLBACK_PARTICIPANTWITHTRACKS']._serialized_start=469 + _globals['_CONNECTCALLBACK_PARTICIPANTWITHTRACKS']._serialized_end=606 + _globals['_DISCONNECTREQUEST']._serialized_start=618 + _globals['_DISCONNECTREQUEST']._serialized_end=658 + _globals['_DISCONNECTRESPONSE']._serialized_start=660 + _globals['_DISCONNECTRESPONSE']._serialized_end=698 + _globals['_DISCONNECTCALLBACK']._serialized_start=700 + _globals['_DISCONNECTCALLBACK']._serialized_end=738 + _globals['_PUBLISHTRACKREQUEST']._serialized_start=741 + _globals['_PUBLISHTRACKREQUEST']._serialized_end=871 + _globals['_PUBLISHTRACKRESPONSE']._serialized_start=873 + _globals['_PUBLISHTRACKRESPONSE']._serialized_end=913 + _globals['_PUBLISHTRACKCALLBACK']._serialized_start=916 + _globals['_PUBLISHTRACKCALLBACK']._serialized_end=1045 + _globals['_UNPUBLISHTRACKREQUEST']._serialized_start=1047 + _globals['_UNPUBLISHTRACKREQUEST']._serialized_end=1150 + _globals['_UNPUBLISHTRACKRESPONSE']._serialized_start=1152 + _globals['_UNPUBLISHTRACKRESPONSE']._serialized_end=1194 + _globals['_UNPUBLISHTRACKCALLBACK']._serialized_start=1196 + _globals['_UNPUBLISHTRACKCALLBACK']._serialized_end=1268 + _globals['_PUBLISHDATAREQUEST']._serialized_start=1271 + _globals['_PUBLISHDATAREQUEST']._serialized_end=1432 + _globals['_PUBLISHDATARESPONSE']._serialized_start=1434 + _globals['_PUBLISHDATARESPONSE']._serialized_end=1473 + _globals['_PUBLISHDATACALLBACK']._serialized_start=1475 + _globals['_PUBLISHDATACALLBACK']._serialized_end=1544 + _globals['_UPDATELOCALMETADATAREQUEST']._serialized_start=1546 + _globals['_UPDATELOCALMETADATAREQUEST']._serialized_end=1626 + _globals['_UPDATELOCALMETADATARESPONSE']._serialized_start=1628 + _globals['_UPDATELOCALMETADATARESPONSE']._serialized_end=1675 + _globals['_UPDATELOCALMETADATACALLBACK']._serialized_start=1677 + _globals['_UPDATELOCALMETADATACALLBACK']._serialized_end=1724 + _globals['_UPDATELOCALNAMEREQUEST']._serialized_start=1726 + _globals['_UPDATELOCALNAMEREQUEST']._serialized_end=1798 + _globals['_UPDATELOCALNAMERESPONSE']._serialized_start=1800 + _globals['_UPDATELOCALNAMERESPONSE']._serialized_end=1843 + _globals['_UPDATELOCALNAMECALLBACK']._serialized_start=1845 + _globals['_UPDATELOCALNAMECALLBACK']._serialized_end=1888 + _globals['_SETSUBSCRIBEDREQUEST']._serialized_start=1890 + _globals['_SETSUBSCRIBEDREQUEST']._serialized_end=1959 + _globals['_SETSUBSCRIBEDRESPONSE']._serialized_start=1961 + _globals['_SETSUBSCRIBEDRESPONSE']._serialized_end=1984 + _globals['_VIDEOENCODING']._serialized_start=1986 + _globals['_VIDEOENCODING']._serialized_end=2045 + _globals['_AUDIOENCODING']._serialized_start=2047 + _globals['_AUDIOENCODING']._serialized_end=2083 + _globals['_TRACKPUBLISHOPTIONS']._serialized_start=2086 + _globals['_TRACKPUBLISHOPTIONS']._serialized_end=2352 + _globals['_ICESERVER']._serialized_start=2354 + _globals['_ICESERVER']._serialized_end=2415 + _globals['_RTCCONFIG']._serialized_start=2418 + _globals['_RTCCONFIG']._serialized_end=2678 + _globals['_ROOMOPTIONS']._serialized_start=2681 + _globals['_ROOMOPTIONS']._serialized_end=2883 + _globals['_BUFFERINFO']._serialized_start=2885 + _globals['_BUFFERINFO']._serialized_end=2933 + _globals['_OWNEDBUFFER']._serialized_start=2935 + _globals['_OWNEDBUFFER']._serialized_end=3036 + _globals['_ROOMEVENT']._serialized_start=3039 + _globals['_ROOMEVENT']._serialized_end=4562 + _globals['_ROOMINFO']._serialized_start=4564 + _globals['_ROOMINFO']._serialized_end=4619 + _globals['_OWNEDROOM']._serialized_start=4621 + _globals['_OWNEDROOM']._serialized_end=4718 + _globals['_PARTICIPANTCONNECTED']._serialized_start=4720 + _globals['_PARTICIPANTCONNECTED']._serialized_end=4789 + _globals['_PARTICIPANTDISCONNECTED']._serialized_start=4791 + _globals['_PARTICIPANTDISCONNECTED']._serialized_end=4841 + _globals['_LOCALTRACKPUBLISHED']._serialized_start=4843 + _globals['_LOCALTRACKPUBLISHED']._serialized_end=4883 + _globals['_LOCALTRACKUNPUBLISHED']._serialized_start=4885 + _globals['_LOCALTRACKUNPUBLISHED']._serialized_end=4933 + _globals['_TRACKPUBLISHED']._serialized_start=4935 + _globals['_TRACKPUBLISHED']._serialized_end=5035 + _globals['_TRACKUNPUBLISHED']._serialized_start=5037 + _globals['_TRACKUNPUBLISHED']._serialized_end=5105 + _globals['_TRACKSUBSCRIBED']._serialized_start=5107 + _globals['_TRACKSUBSCRIBED']._serialized_end=5191 + _globals['_TRACKUNSUBSCRIBED']._serialized_start=5193 + _globals['_TRACKUNSUBSCRIBED']._serialized_end=5256 + _globals['_TRACKSUBSCRIPTIONFAILED']._serialized_start=5258 + _globals['_TRACKSUBSCRIPTIONFAILED']._serialized_end=5342 + _globals['_TRACKMUTED']._serialized_start=5344 + _globals['_TRACKMUTED']._serialized_end=5400 + _globals['_TRACKUNMUTED']._serialized_start=5402 + _globals['_TRACKUNMUTED']._serialized_end=5460 + _globals['_E2EESTATECHANGED']._serialized_start=5462 + _globals['_E2EESTATECHANGED']._serialized_end=5552 + _globals['_ACTIVESPEAKERSCHANGED']._serialized_start=5554 + _globals['_ACTIVESPEAKERSCHANGED']._serialized_end=5603 + _globals['_ROOMMETADATACHANGED']._serialized_start=5605 + _globals['_ROOMMETADATACHANGED']._serialized_end=5644 + _globals['_PARTICIPANTMETADATACHANGED']._serialized_start=5646 + _globals['_PARTICIPANTMETADATACHANGED']._serialized_end=5717 + _globals['_PARTICIPANTNAMECHANGED']._serialized_start=5719 + _globals['_PARTICIPANTNAMECHANGED']._serialized_end=5782 + _globals['_CONNECTIONQUALITYCHANGED']._serialized_start=5784 + _globals['_CONNECTIONQUALITYCHANGED']._serialized_end=5886 + _globals['_DATARECEIVED']._serialized_start=5889 + _globals['_DATARECEIVED']._serialized_end=6040 + _globals['_CONNECTIONSTATECHANGED']._serialized_start=6042 + _globals['_CONNECTIONSTATECHANGED']._serialized_end=6113 + _globals['_CONNECTED']._serialized_start=6115 + _globals['_CONNECTED']._serialized_end=6126 + _globals['_DISCONNECTED']._serialized_start=6128 + _globals['_DISCONNECTED']._serialized_end=6142 + _globals['_RECONNECTING']._serialized_start=6144 + _globals['_RECONNECTING']._serialized_end=6158 + _globals['_RECONNECTED']._serialized_start=6160 + _globals['_RECONNECTED']._serialized_end=6173 + _globals['_ROOMEOS']._serialized_start=6175 + _globals['_ROOMEOS']._serialized_end=6184 +# @@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 new file mode 100644 index 00000000..f7777fb0 --- /dev/null +++ b/livekit-rtc/livekit/rtc/_proto/room_pb2.pyi @@ -0,0 +1,1328 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +Copyright 2023 LiveKit, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" +import builtins +import collections.abc +from . import e2ee_pb2 +import google.protobuf.descriptor +import google.protobuf.internal.containers +import google.protobuf.internal.enum_type_wrapper +import google.protobuf.message +from . import handle_pb2 +from . import participant_pb2 +import sys +from . import track_pb2 +import typing +from . import video_frame_pb2 + +if sys.version_info >= (3, 10): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +class _IceTransportType: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _IceTransportTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_IceTransportType.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + TRANSPORT_RELAY: _IceTransportType.ValueType # 0 + TRANSPORT_NOHOST: _IceTransportType.ValueType # 1 + TRANSPORT_ALL: _IceTransportType.ValueType # 2 + +class IceTransportType(_IceTransportType, metaclass=_IceTransportTypeEnumTypeWrapper): ... + +TRANSPORT_RELAY: IceTransportType.ValueType # 0 +TRANSPORT_NOHOST: IceTransportType.ValueType # 1 +TRANSPORT_ALL: IceTransportType.ValueType # 2 +global___IceTransportType = IceTransportType + +class _ContinualGatheringPolicy: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _ContinualGatheringPolicyEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_ContinualGatheringPolicy.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + GATHER_ONCE: _ContinualGatheringPolicy.ValueType # 0 + GATHER_CONTINUALLY: _ContinualGatheringPolicy.ValueType # 1 + +class ContinualGatheringPolicy(_ContinualGatheringPolicy, metaclass=_ContinualGatheringPolicyEnumTypeWrapper): ... + +GATHER_ONCE: ContinualGatheringPolicy.ValueType # 0 +GATHER_CONTINUALLY: ContinualGatheringPolicy.ValueType # 1 +global___ContinualGatheringPolicy = ContinualGatheringPolicy + +class _ConnectionQuality: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _ConnectionQualityEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_ConnectionQuality.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + QUALITY_POOR: _ConnectionQuality.ValueType # 0 + QUALITY_GOOD: _ConnectionQuality.ValueType # 1 + QUALITY_EXCELLENT: _ConnectionQuality.ValueType # 2 + +class ConnectionQuality(_ConnectionQuality, metaclass=_ConnectionQualityEnumTypeWrapper): + """ + Room + """ + +QUALITY_POOR: ConnectionQuality.ValueType # 0 +QUALITY_GOOD: ConnectionQuality.ValueType # 1 +QUALITY_EXCELLENT: ConnectionQuality.ValueType # 2 +global___ConnectionQuality = ConnectionQuality + +class _ConnectionState: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _ConnectionStateEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_ConnectionState.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + CONN_DISCONNECTED: _ConnectionState.ValueType # 0 + CONN_CONNECTED: _ConnectionState.ValueType # 1 + CONN_RECONNECTING: _ConnectionState.ValueType # 2 + +class ConnectionState(_ConnectionState, metaclass=_ConnectionStateEnumTypeWrapper): ... + +CONN_DISCONNECTED: ConnectionState.ValueType # 0 +CONN_CONNECTED: ConnectionState.ValueType # 1 +CONN_RECONNECTING: ConnectionState.ValueType # 2 +global___ConnectionState = ConnectionState + +class _DataPacketKind: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _DataPacketKindEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_DataPacketKind.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + KIND_LOSSY: _DataPacketKind.ValueType # 0 + KIND_RELIABLE: _DataPacketKind.ValueType # 1 + +class DataPacketKind(_DataPacketKind, metaclass=_DataPacketKindEnumTypeWrapper): ... + +KIND_LOSSY: DataPacketKind.ValueType # 0 +KIND_RELIABLE: DataPacketKind.ValueType # 1 +global___DataPacketKind = DataPacketKind + +@typing_extensions.final +class ConnectRequest(google.protobuf.message.Message): + """Connect to a new LiveKit room""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + URL_FIELD_NUMBER: builtins.int + TOKEN_FIELD_NUMBER: builtins.int + OPTIONS_FIELD_NUMBER: builtins.int + url: builtins.str + token: builtins.str + @property + def options(self) -> global___RoomOptions: ... + def __init__( + self, + *, + url: builtins.str = ..., + 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: ... + +global___ConnectRequest = ConnectRequest + +@typing_extensions.final +class ConnectResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + async_id: builtins.int + def __init__( + self, + *, + async_id: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + +global___ConnectResponse = ConnectResponse + +@typing_extensions.final +class ConnectCallback(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing_extensions.final + class ParticipantWithTracks(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PARTICIPANT_FIELD_NUMBER: builtins.int + PUBLICATIONS_FIELD_NUMBER: builtins.int + @property + def participant(self) -> participant_pb2.OwnedParticipant: ... + @property + def publications(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[track_pb2.OwnedTrackPublication]: + """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: ... + + ASYNC_ID_FIELD_NUMBER: builtins.int + ERROR_FIELD_NUMBER: builtins.int + ROOM_FIELD_NUMBER: builtins.int + LOCAL_PARTICIPANT_FIELD_NUMBER: builtins.int + PARTICIPANTS_FIELD_NUMBER: builtins.int + async_id: builtins.int + error: builtins.str + @property + def room(self) -> global___OwnedRoom: ... + @property + def local_participant(self) -> participant_pb2.OwnedParticipant: ... + @property + def participants(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ConnectCallback.ParticipantWithTracks]: ... + def __init__( + self, + *, + async_id: builtins.int = ..., + error: builtins.str | None = ..., + room: global___OwnedRoom | None = ..., + 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: ... + +global___ConnectCallback = ConnectCallback + +@typing_extensions.final +class DisconnectRequest(google.protobuf.message.Message): + """Disconnect from the a room""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ROOM_HANDLE_FIELD_NUMBER: builtins.int + room_handle: builtins.int + def __init__( + self, + *, + room_handle: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["room_handle", b"room_handle"]) -> None: ... + +global___DisconnectRequest = DisconnectRequest + +@typing_extensions.final +class DisconnectResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + async_id: builtins.int + def __init__( + self, + *, + async_id: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + +global___DisconnectResponse = DisconnectResponse + +@typing_extensions.final +class DisconnectCallback(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + async_id: builtins.int + def __init__( + self, + *, + async_id: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + +global___DisconnectCallback = DisconnectCallback + +@typing_extensions.final +class PublishTrackRequest(google.protobuf.message.Message): + """Publish a track to the room""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + LOCAL_PARTICIPANT_HANDLE_FIELD_NUMBER: builtins.int + TRACK_HANDLE_FIELD_NUMBER: builtins.int + OPTIONS_FIELD_NUMBER: builtins.int + local_participant_handle: builtins.int + track_handle: builtins.int + @property + def options(self) -> global___TrackPublishOptions: ... + def __init__( + self, + *, + local_participant_handle: builtins.int = ..., + 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: ... + +global___PublishTrackRequest = PublishTrackRequest + +@typing_extensions.final +class PublishTrackResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + async_id: builtins.int + def __init__( + self, + *, + async_id: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + +global___PublishTrackResponse = PublishTrackResponse + +@typing_extensions.final +class PublishTrackCallback(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + ERROR_FIELD_NUMBER: builtins.int + PUBLICATION_FIELD_NUMBER: builtins.int + async_id: builtins.int + error: builtins.str + @property + def publication(self) -> track_pb2.OwnedTrackPublication: ... + def __init__( + self, + *, + async_id: builtins.int = ..., + 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: ... + +global___PublishTrackCallback = PublishTrackCallback + +@typing_extensions.final +class UnpublishTrackRequest(google.protobuf.message.Message): + """Unpublish a track from the room""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + LOCAL_PARTICIPANT_HANDLE_FIELD_NUMBER: builtins.int + TRACK_SID_FIELD_NUMBER: builtins.int + STOP_ON_UNPUBLISH_FIELD_NUMBER: builtins.int + local_participant_handle: builtins.int + track_sid: builtins.str + stop_on_unpublish: builtins.bool + def __init__( + self, + *, + local_participant_handle: builtins.int = ..., + 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: ... + +global___UnpublishTrackRequest = UnpublishTrackRequest + +@typing_extensions.final +class UnpublishTrackResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + async_id: builtins.int + def __init__( + self, + *, + async_id: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + +global___UnpublishTrackResponse = UnpublishTrackResponse + +@typing_extensions.final +class UnpublishTrackCallback(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + ERROR_FIELD_NUMBER: builtins.int + async_id: builtins.int + error: builtins.str + def __init__( + self, + *, + async_id: builtins.int = ..., + error: builtins.str | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_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: ... + +global___UnpublishTrackCallback = UnpublishTrackCallback + +@typing_extensions.final +class PublishDataRequest(google.protobuf.message.Message): + """Publish data to other participants""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + LOCAL_PARTICIPANT_HANDLE_FIELD_NUMBER: builtins.int + DATA_PTR_FIELD_NUMBER: builtins.int + DATA_LEN_FIELD_NUMBER: builtins.int + KIND_FIELD_NUMBER: builtins.int + DESTINATION_SIDS_FIELD_NUMBER: builtins.int + local_participant_handle: builtins.int + data_ptr: builtins.int + data_len: builtins.int + kind: global___DataPacketKind.ValueType + @property + def destination_sids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """destination""" + def __init__( + self, + *, + local_participant_handle: builtins.int = ..., + data_ptr: builtins.int = ..., + data_len: builtins.int = ..., + kind: global___DataPacketKind.ValueType = ..., + destination_sids: collections.abc.Iterable[builtins.str] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["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"]) -> None: ... + +global___PublishDataRequest = PublishDataRequest + +@typing_extensions.final +class PublishDataResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + async_id: builtins.int + def __init__( + self, + *, + async_id: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + +global___PublishDataResponse = PublishDataResponse + +@typing_extensions.final +class PublishDataCallback(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + ERROR_FIELD_NUMBER: builtins.int + async_id: builtins.int + error: builtins.str + def __init__( + self, + *, + async_id: builtins.int = ..., + error: builtins.str | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_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: ... + +global___PublishDataCallback = PublishDataCallback + +@typing_extensions.final +class UpdateLocalMetadataRequest(google.protobuf.message.Message): + """Change the local participant's metadata""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + LOCAL_PARTICIPANT_HANDLE_FIELD_NUMBER: builtins.int + METADATA_FIELD_NUMBER: builtins.int + local_participant_handle: builtins.int + metadata: builtins.str + def __init__( + self, + *, + 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: ... + +global___UpdateLocalMetadataRequest = UpdateLocalMetadataRequest + +@typing_extensions.final +class UpdateLocalMetadataResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + async_id: builtins.int + def __init__( + self, + *, + async_id: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + +global___UpdateLocalMetadataResponse = UpdateLocalMetadataResponse + +@typing_extensions.final +class UpdateLocalMetadataCallback(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + async_id: builtins.int + def __init__( + self, + *, + async_id: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + +global___UpdateLocalMetadataCallback = UpdateLocalMetadataCallback + +@typing_extensions.final +class UpdateLocalNameRequest(google.protobuf.message.Message): + """Change the local participant's name""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + LOCAL_PARTICIPANT_HANDLE_FIELD_NUMBER: builtins.int + NAME_FIELD_NUMBER: builtins.int + local_participant_handle: builtins.int + name: builtins.str + def __init__( + self, + *, + 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: ... + +global___UpdateLocalNameRequest = UpdateLocalNameRequest + +@typing_extensions.final +class UpdateLocalNameResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + async_id: builtins.int + def __init__( + self, + *, + async_id: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + +global___UpdateLocalNameResponse = UpdateLocalNameResponse + +@typing_extensions.final +class UpdateLocalNameCallback(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + async_id: builtins.int + def __init__( + self, + *, + async_id: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + +global___UpdateLocalNameCallback = UpdateLocalNameCallback + +@typing_extensions.final +class SetSubscribedRequest(google.protobuf.message.Message): + """Change the "desire" to subs2ribe to a track""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SUBSCRIBE_FIELD_NUMBER: builtins.int + PUBLICATION_HANDLE_FIELD_NUMBER: builtins.int + subscribe: builtins.bool + publication_handle: builtins.int + def __init__( + self, + *, + 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: ... + +global___SetSubscribedRequest = SetSubscribedRequest + +@typing_extensions.final +class SetSubscribedResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___SetSubscribedResponse = SetSubscribedResponse + +@typing_extensions.final +class VideoEncoding(google.protobuf.message.Message): + """ + Options + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + MAX_BITRATE_FIELD_NUMBER: builtins.int + MAX_FRAMERATE_FIELD_NUMBER: builtins.int + max_bitrate: builtins.int + max_framerate: builtins.float + def __init__( + self, + *, + 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: ... + +global___VideoEncoding = VideoEncoding + +@typing_extensions.final +class AudioEncoding(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + MAX_BITRATE_FIELD_NUMBER: builtins.int + max_bitrate: builtins.int + def __init__( + self, + *, + max_bitrate: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["max_bitrate", b"max_bitrate"]) -> None: ... + +global___AudioEncoding = AudioEncoding + +@typing_extensions.final +class TrackPublishOptions(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + VIDEO_ENCODING_FIELD_NUMBER: builtins.int + AUDIO_ENCODING_FIELD_NUMBER: builtins.int + VIDEO_CODEC_FIELD_NUMBER: builtins.int + DTX_FIELD_NUMBER: builtins.int + 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 + def __init__( + self, + *, + video_encoding: global___VideoEncoding | None = ..., + audio_encoding: global___AudioEncoding | None = ..., + video_codec: video_frame_pb2.VideoCodec.ValueType = ..., + dtx: builtins.bool = ..., + red: builtins.bool = ..., + 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: ... + +global___TrackPublishOptions = TrackPublishOptions + +@typing_extensions.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 + def __init__( + self, + *, + urls: collections.abc.Iterable[builtins.str] | None = ..., + 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: ... + +global___IceServer = IceServer + +@typing_extensions.final +class RtcConfig(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ICE_TRANSPORT_TYPE_FIELD_NUMBER: builtins.int + CONTINUAL_GATHERING_POLICY_FIELD_NUMBER: builtins.int + ICE_SERVERS_FIELD_NUMBER: builtins.int + ice_transport_type: global___IceTransportType.ValueType + continual_gathering_policy: global___ContinualGatheringPolicy.ValueType + @property + def ice_servers(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___IceServer]: + """empty fallback to default""" + def __init__( + self, + *, + ice_transport_type: global___IceTransportType.ValueType | None = ..., + 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: ... + @typing.overload + def WhichOneof(self, oneof_group: typing_extensions.Literal["_continual_gathering_policy", b"_continual_gathering_policy"]) -> typing_extensions.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: ... + +global___RtcConfig = RtcConfig + +@typing_extensions.final +class RoomOptions(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + AUTO_SUBSCRIBE_FIELD_NUMBER: builtins.int + ADAPTIVE_STREAM_FIELD_NUMBER: builtins.int + DYNACAST_FIELD_NUMBER: builtins.int + E2EE_FIELD_NUMBER: builtins.int + RTC_CONFIG_FIELD_NUMBER: builtins.int + auto_subscribe: builtins.bool + adaptive_stream: builtins.bool + dynacast: builtins.bool + @property + def e2ee(self) -> e2ee_pb2.E2eeOptions: ... + @property + def rtc_config(self) -> global___RtcConfig: + """allow to setup a custom RtcConfiguration""" + def __init__( + self, + *, + auto_subscribe: builtins.bool = ..., + adaptive_stream: builtins.bool = ..., + dynacast: builtins.bool = ..., + e2ee: e2ee_pb2.E2eeOptions | None = ..., + rtc_config: global___RtcConfig | None = ..., + ) -> 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", "rtc_config", b"rtc_config"]) -> None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing_extensions.Literal["_e2ee", b"_e2ee"]) -> typing_extensions.Literal["e2ee"] | None: ... + @typing.overload + def WhichOneof(self, oneof_group: typing_extensions.Literal["_rtc_config", b"_rtc_config"]) -> typing_extensions.Literal["rtc_config"] | None: ... + +global___RoomOptions = RoomOptions + +@typing_extensions.final +class BufferInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + DATA_PTR_FIELD_NUMBER: builtins.int + DATA_LEN_FIELD_NUMBER: builtins.int + data_ptr: builtins.int + data_len: builtins.int + def __init__( + self, + *, + 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: ... + +global___BufferInfo = BufferInfo + +@typing_extensions.final +class OwnedBuffer(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + HANDLE_FIELD_NUMBER: builtins.int + DATA_FIELD_NUMBER: builtins.int + @property + def handle(self) -> handle_pb2.FfiOwnedHandle: ... + @property + def data(self) -> global___BufferInfo: ... + def __init__( + self, + *, + 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: ... + +global___OwnedBuffer = OwnedBuffer + +@typing_extensions.final +class RoomEvent(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ROOM_HANDLE_FIELD_NUMBER: builtins.int + PARTICIPANT_CONNECTED_FIELD_NUMBER: builtins.int + PARTICIPANT_DISCONNECTED_FIELD_NUMBER: builtins.int + LOCAL_TRACK_PUBLISHED_FIELD_NUMBER: builtins.int + LOCAL_TRACK_UNPUBLISHED_FIELD_NUMBER: builtins.int + TRACK_PUBLISHED_FIELD_NUMBER: builtins.int + TRACK_UNPUBLISHED_FIELD_NUMBER: builtins.int + TRACK_SUBSCRIBED_FIELD_NUMBER: builtins.int + TRACK_UNSUBSCRIBED_FIELD_NUMBER: builtins.int + TRACK_SUBSCRIPTION_FAILED_FIELD_NUMBER: builtins.int + TRACK_MUTED_FIELD_NUMBER: builtins.int + TRACK_UNMUTED_FIELD_NUMBER: builtins.int + ACTIVE_SPEAKERS_CHANGED_FIELD_NUMBER: builtins.int + ROOM_METADATA_CHANGED_FIELD_NUMBER: builtins.int + PARTICIPANT_METADATA_CHANGED_FIELD_NUMBER: builtins.int + PARTICIPANT_NAME_CHANGED_FIELD_NUMBER: builtins.int + CONNECTION_QUALITY_CHANGED_FIELD_NUMBER: builtins.int + DATA_RECEIVED_FIELD_NUMBER: builtins.int + CONNECTION_STATE_CHANGED_FIELD_NUMBER: builtins.int + DISCONNECTED_FIELD_NUMBER: builtins.int + RECONNECTING_FIELD_NUMBER: builtins.int + RECONNECTED_FIELD_NUMBER: builtins.int + E2EE_STATE_CHANGED_FIELD_NUMBER: builtins.int + EOS_FIELD_NUMBER: builtins.int + room_handle: builtins.int + @property + def participant_connected(self) -> global___ParticipantConnected: ... + @property + def participant_disconnected(self) -> global___ParticipantDisconnected: ... + @property + def local_track_published(self) -> global___LocalTrackPublished: ... + @property + def local_track_unpublished(self) -> global___LocalTrackUnpublished: ... + @property + def track_published(self) -> global___TrackPublished: ... + @property + def track_unpublished(self) -> global___TrackUnpublished: ... + @property + def track_subscribed(self) -> global___TrackSubscribed: ... + @property + def track_unsubscribed(self) -> global___TrackUnsubscribed: ... + @property + def track_subscription_failed(self) -> global___TrackSubscriptionFailed: ... + @property + def track_muted(self) -> global___TrackMuted: ... + @property + def track_unmuted(self) -> global___TrackUnmuted: ... + @property + def active_speakers_changed(self) -> global___ActiveSpeakersChanged: ... + @property + def room_metadata_changed(self) -> global___RoomMetadataChanged: ... + @property + def participant_metadata_changed(self) -> global___ParticipantMetadataChanged: ... + @property + def participant_name_changed(self) -> global___ParticipantNameChanged: ... + @property + def connection_quality_changed(self) -> global___ConnectionQualityChanged: ... + @property + def data_received(self) -> global___DataReceived: ... + @property + def connection_state_changed(self) -> global___ConnectionStateChanged: ... + @property + def disconnected(self) -> global___Disconnected: + """Connected connected = 20;""" + @property + def reconnecting(self) -> global___Reconnecting: ... + @property + def reconnected(self) -> global___Reconnected: ... + @property + def e2ee_state_changed(self) -> global___E2eeStateChanged: ... + @property + def eos(self) -> global___RoomEOS: + """The stream of room events has ended""" + def __init__( + self, + *, + room_handle: builtins.int = ..., + participant_connected: global___ParticipantConnected | None = ..., + participant_disconnected: global___ParticipantDisconnected | None = ..., + local_track_published: global___LocalTrackPublished | None = ..., + local_track_unpublished: global___LocalTrackUnpublished | None = ..., + track_published: global___TrackPublished | None = ..., + track_unpublished: global___TrackUnpublished | None = ..., + track_subscribed: global___TrackSubscribed | None = ..., + track_unsubscribed: global___TrackUnsubscribed | None = ..., + track_subscription_failed: global___TrackSubscriptionFailed | None = ..., + track_muted: global___TrackMuted | None = ..., + track_unmuted: global___TrackUnmuted | None = ..., + active_speakers_changed: global___ActiveSpeakersChanged | None = ..., + room_metadata_changed: global___RoomMetadataChanged | None = ..., + participant_metadata_changed: global___ParticipantMetadataChanged | None = ..., + participant_name_changed: global___ParticipantNameChanged | None = ..., + connection_quality_changed: global___ConnectionQualityChanged | None = ..., + data_received: global___DataReceived | None = ..., + connection_state_changed: global___ConnectionStateChanged | None = ..., + disconnected: global___Disconnected | None = ..., + reconnecting: global___Reconnecting | None = ..., + reconnected: global___Reconnected | None = ..., + e2ee_state_changed: global___E2eeStateChanged | None = ..., + eos: global___RoomEOS | 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: ... + +global___RoomEvent = RoomEvent + +@typing_extensions.final +class RoomInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SID_FIELD_NUMBER: builtins.int + NAME_FIELD_NUMBER: builtins.int + METADATA_FIELD_NUMBER: builtins.int + sid: builtins.str + name: builtins.str + metadata: builtins.str + def __init__( + self, + *, + sid: builtins.str = ..., + 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: ... + +global___RoomInfo = RoomInfo + +@typing_extensions.final +class OwnedRoom(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + HANDLE_FIELD_NUMBER: builtins.int + INFO_FIELD_NUMBER: builtins.int + @property + def handle(self) -> handle_pb2.FfiOwnedHandle: ... + @property + def info(self) -> global___RoomInfo: ... + def __init__( + self, + *, + 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: ... + +global___OwnedRoom = OwnedRoom + +@typing_extensions.final +class ParticipantConnected(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + INFO_FIELD_NUMBER: builtins.int + @property + def info(self) -> participant_pb2.OwnedParticipant: ... + def __init__( + self, + *, + 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: ... + +global___ParticipantConnected = ParticipantConnected + +@typing_extensions.final +class ParticipantDisconnected(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PARTICIPANT_SID_FIELD_NUMBER: builtins.int + participant_sid: builtins.str + def __init__( + self, + *, + participant_sid: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["participant_sid", b"participant_sid"]) -> None: ... + +global___ParticipantDisconnected = ParticipantDisconnected + +@typing_extensions.final +class LocalTrackPublished(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TRACK_SID_FIELD_NUMBER: builtins.int + track_sid: builtins.str + """The TrackPublicationInfo comes from the PublishTrack response + and the FfiClient musts wait for it before firing this event + """ + def __init__( + self, + *, + track_sid: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["track_sid", b"track_sid"]) -> None: ... + +global___LocalTrackPublished = LocalTrackPublished + +@typing_extensions.final +class LocalTrackUnpublished(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PUBLICATION_SID_FIELD_NUMBER: builtins.int + publication_sid: builtins.str + def __init__( + self, + *, + publication_sid: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["publication_sid", b"publication_sid"]) -> None: ... + +global___LocalTrackUnpublished = LocalTrackUnpublished + +@typing_extensions.final +class TrackPublished(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PARTICIPANT_SID_FIELD_NUMBER: builtins.int + PUBLICATION_FIELD_NUMBER: builtins.int + participant_sid: builtins.str + @property + def publication(self) -> track_pb2.OwnedTrackPublication: ... + def __init__( + self, + *, + 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: ... + +global___TrackPublished = TrackPublished + +@typing_extensions.final +class TrackUnpublished(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PARTICIPANT_SID_FIELD_NUMBER: builtins.int + PUBLICATION_SID_FIELD_NUMBER: builtins.int + participant_sid: builtins.str + publication_sid: builtins.str + def __init__( + self, + *, + 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: ... + +global___TrackUnpublished = TrackUnpublished + +@typing_extensions.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 + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PARTICIPANT_SID_FIELD_NUMBER: builtins.int + TRACK_FIELD_NUMBER: builtins.int + participant_sid: builtins.str + @property + def track(self) -> track_pb2.OwnedTrack: ... + def __init__( + self, + *, + 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: ... + +global___TrackSubscribed = TrackSubscribed + +@typing_extensions.final +class TrackUnsubscribed(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PARTICIPANT_SID_FIELD_NUMBER: builtins.int + TRACK_SID_FIELD_NUMBER: builtins.int + participant_sid: builtins.str + """The FFI language can dispose/remove the VideoSink here""" + track_sid: builtins.str + def __init__( + self, + *, + 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: ... + +global___TrackUnsubscribed = TrackUnsubscribed + +@typing_extensions.final +class TrackSubscriptionFailed(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PARTICIPANT_SID_FIELD_NUMBER: builtins.int + TRACK_SID_FIELD_NUMBER: builtins.int + ERROR_FIELD_NUMBER: builtins.int + participant_sid: builtins.str + track_sid: builtins.str + error: builtins.str + def __init__( + self, + *, + participant_sid: builtins.str = ..., + 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: ... + +global___TrackSubscriptionFailed = TrackSubscriptionFailed + +@typing_extensions.final +class TrackMuted(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PARTICIPANT_SID_FIELD_NUMBER: builtins.int + TRACK_SID_FIELD_NUMBER: builtins.int + participant_sid: builtins.str + track_sid: builtins.str + def __init__( + self, + *, + 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: ... + +global___TrackMuted = TrackMuted + +@typing_extensions.final +class TrackUnmuted(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PARTICIPANT_SID_FIELD_NUMBER: builtins.int + TRACK_SID_FIELD_NUMBER: builtins.int + participant_sid: builtins.str + track_sid: builtins.str + def __init__( + self, + *, + 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: ... + +global___TrackUnmuted = TrackUnmuted + +@typing_extensions.final +class E2eeStateChanged(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PARTICIPANT_SID_FIELD_NUMBER: builtins.int + STATE_FIELD_NUMBER: builtins.int + participant_sid: builtins.str + """Using sid instead of identity for ffi communication""" + state: e2ee_pb2.EncryptionState.ValueType + def __init__( + self, + *, + 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: ... + +global___E2eeStateChanged = E2eeStateChanged + +@typing_extensions.final +class ActiveSpeakersChanged(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PARTICIPANT_SIDS_FIELD_NUMBER: builtins.int + @property + def participant_sids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... + def __init__( + self, + *, + participant_sids: collections.abc.Iterable[builtins.str] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["participant_sids", b"participant_sids"]) -> None: ... + +global___ActiveSpeakersChanged = ActiveSpeakersChanged + +@typing_extensions.final +class RoomMetadataChanged(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + METADATA_FIELD_NUMBER: builtins.int + metadata: builtins.str + def __init__( + self, + *, + metadata: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["metadata", b"metadata"]) -> None: ... + +global___RoomMetadataChanged = RoomMetadataChanged + +@typing_extensions.final +class ParticipantMetadataChanged(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PARTICIPANT_SID_FIELD_NUMBER: builtins.int + METADATA_FIELD_NUMBER: builtins.int + participant_sid: builtins.str + metadata: builtins.str + def __init__( + self, + *, + 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: ... + +global___ParticipantMetadataChanged = ParticipantMetadataChanged + +@typing_extensions.final +class ParticipantNameChanged(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PARTICIPANT_SID_FIELD_NUMBER: builtins.int + NAME_FIELD_NUMBER: builtins.int + participant_sid: builtins.str + name: builtins.str + def __init__( + self, + *, + 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: ... + +global___ParticipantNameChanged = ParticipantNameChanged + +@typing_extensions.final +class ConnectionQualityChanged(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PARTICIPANT_SID_FIELD_NUMBER: builtins.int + QUALITY_FIELD_NUMBER: builtins.int + participant_sid: builtins.str + quality: global___ConnectionQuality.ValueType + def __init__( + self, + *, + 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: ... + +global___ConnectionQualityChanged = ConnectionQualityChanged + +@typing_extensions.final +class DataReceived(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 + @property + def data(self) -> global___OwnedBuffer: ... + participant_sid: builtins.str + """Can be empty if the data is sent a server SDK""" + kind: global___DataPacketKind.ValueType + def __init__( + self, + *, + data: global___OwnedBuffer | None = ..., + participant_sid: builtins.str | None = ..., + kind: global___DataPacketKind.ValueType = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["_participant_sid", b"_participant_sid", "data", b"data", "participant_sid", b"participant_sid"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["_participant_sid", b"_participant_sid", "data", b"data", "kind", b"kind", "participant_sid", b"participant_sid"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["_participant_sid", b"_participant_sid"]) -> typing_extensions.Literal["participant_sid"] | None: ... + +global___DataReceived = DataReceived + +@typing_extensions.final +class ConnectionStateChanged(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + STATE_FIELD_NUMBER: builtins.int + state: global___ConnectionState.ValueType + def __init__( + self, + *, + state: global___ConnectionState.ValueType = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["state", b"state"]) -> None: ... + +global___ConnectionStateChanged = ConnectionStateChanged + +@typing_extensions.final +class Connected(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___Connected = Connected + +@typing_extensions.final +class Disconnected(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___Disconnected = Disconnected + +@typing_extensions.final +class Reconnecting(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___Reconnecting = Reconnecting + +@typing_extensions.final +class Reconnected(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___Reconnected = Reconnected + +@typing_extensions.final +class RoomEOS(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___RoomEOS = RoomEOS diff --git a/livekit-rtc/livekit/rtc/_proto/stats_pb2.py b/livekit-rtc/livekit/rtc/_proto/stats_pb2.py new file mode 100644 index 00000000..7dfdf765 --- /dev/null +++ b/livekit-rtc/livekit/rtc/_proto/stats_pb2.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: stats.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\x0bstats.proto\x12\rlivekit.proto\"\xd9\x17\n\x08RtcStats\x12.\n\x05\x63odec\x18\x03 \x01(\x0b\x32\x1d.livekit.proto.RtcStats.CodecH\x00\x12\x39\n\x0binbound_rtp\x18\x04 \x01(\x0b\x32\".livekit.proto.RtcStats.InboundRtpH\x00\x12;\n\x0coutbound_rtp\x18\x05 \x01(\x0b\x32#.livekit.proto.RtcStats.OutboundRtpH\x00\x12\x46\n\x12remote_inbound_rtp\x18\x06 \x01(\x0b\x32(.livekit.proto.RtcStats.RemoteInboundRtpH\x00\x12H\n\x13remote_outbound_rtp\x18\x07 \x01(\x0b\x32).livekit.proto.RtcStats.RemoteOutboundRtpH\x00\x12;\n\x0cmedia_source\x18\x08 \x01(\x0b\x32#.livekit.proto.RtcStats.MediaSourceH\x00\x12=\n\rmedia_playout\x18\t \x01(\x0b\x32$.livekit.proto.RtcStats.MediaPlayoutH\x00\x12\x41\n\x0fpeer_connection\x18\n \x01(\x0b\x32&.livekit.proto.RtcStats.PeerConnectionH\x00\x12;\n\x0c\x64\x61ta_channel\x18\x0b \x01(\x0b\x32#.livekit.proto.RtcStats.DataChannelH\x00\x12\x36\n\ttransport\x18\x0c \x01(\x0b\x32!.livekit.proto.RtcStats.TransportH\x00\x12?\n\x0e\x63\x61ndidate_pair\x18\r \x01(\x0b\x32%.livekit.proto.RtcStats.CandidatePairH\x00\x12\x41\n\x0flocal_candidate\x18\x0e \x01(\x0b\x32&.livekit.proto.RtcStats.LocalCandidateH\x00\x12\x43\n\x10remote_candidate\x18\x0f \x01(\x0b\x32\'.livekit.proto.RtcStats.RemoteCandidateH\x00\x12:\n\x0b\x63\x65rtificate\x18\x10 \x01(\x0b\x32#.livekit.proto.RtcStats.CertificateH\x00\x12.\n\x05track\x18\x11 \x01(\x0b\x32\x1d.livekit.proto.RtcStats.TrackH\x00\x1a[\n\x05\x43odec\x12(\n\x03rtc\x18\x01 \x01(\x0b\x32\x1b.livekit.proto.RtcStatsData\x12(\n\x05\x63odec\x18\x02 \x01(\x0b\x32\x19.livekit.proto.CodecStats\x1a\xd5\x01\n\nInboundRtp\x12(\n\x03rtc\x18\x01 \x01(\x0b\x32\x1b.livekit.proto.RtcStatsData\x12-\n\x06stream\x18\x02 \x01(\x0b\x32\x1d.livekit.proto.RtpStreamStats\x12\x37\n\x08received\x18\x03 \x01(\x0b\x32%.livekit.proto.ReceivedRtpStreamStats\x12\x35\n\x07inbound\x18\x04 \x01(\x0b\x32$.livekit.proto.InboundRtpStreamStats\x1a\xd0\x01\n\x0bOutboundRtp\x12(\n\x03rtc\x18\x01 \x01(\x0b\x32\x1b.livekit.proto.RtcStatsData\x12-\n\x06stream\x18\x02 \x01(\x0b\x32\x1d.livekit.proto.RtpStreamStats\x12/\n\x04sent\x18\x03 \x01(\x0b\x32!.livekit.proto.SentRtpStreamStats\x12\x37\n\x08outbound\x18\x04 \x01(\x0b\x32%.livekit.proto.OutboundRtpStreamStats\x1a\xe8\x01\n\x10RemoteInboundRtp\x12(\n\x03rtc\x18\x01 \x01(\x0b\x32\x1b.livekit.proto.RtcStatsData\x12-\n\x06stream\x18\x02 \x01(\x0b\x32\x1d.livekit.proto.RtpStreamStats\x12\x37\n\x08received\x18\x03 \x01(\x0b\x32%.livekit.proto.ReceivedRtpStreamStats\x12\x42\n\x0eremote_inbound\x18\x04 \x01(\x0b\x32*.livekit.proto.RemoteInboundRtpStreamStats\x1a\xe3\x01\n\x11RemoteOutboundRtp\x12(\n\x03rtc\x18\x01 \x01(\x0b\x32\x1b.livekit.proto.RtcStatsData\x12-\n\x06stream\x18\x02 \x01(\x0b\x32\x1d.livekit.proto.RtpStreamStats\x12/\n\x04sent\x18\x03 \x01(\x0b\x32!.livekit.proto.SentRtpStreamStats\x12\x44\n\x0fremote_outbound\x18\x04 \x01(\x0b\x32+.livekit.proto.RemoteOutboundRtpStreamStats\x1a\xc8\x01\n\x0bMediaSource\x12(\n\x03rtc\x18\x01 \x01(\x0b\x32\x1b.livekit.proto.RtcStatsData\x12/\n\x06source\x18\x02 \x01(\x0b\x32\x1f.livekit.proto.MediaSourceStats\x12.\n\x05\x61udio\x18\x03 \x01(\x0b\x32\x1f.livekit.proto.AudioSourceStats\x12.\n\x05video\x18\x04 \x01(\x0b\x32\x1f.livekit.proto.VideoSourceStats\x1aq\n\x0cMediaPlayout\x12(\n\x03rtc\x18\x01 \x01(\x0b\x32\x1b.livekit.proto.RtcStatsData\x12\x37\n\raudio_playout\x18\x02 \x01(\x0b\x32 .livekit.proto.AudioPlayoutStats\x1aj\n\x0ePeerConnection\x12(\n\x03rtc\x18\x01 \x01(\x0b\x32\x1b.livekit.proto.RtcStatsData\x12.\n\x02pc\x18\x02 \x01(\x0b\x32\".livekit.proto.PeerConnectionStats\x1a\x64\n\x0b\x44\x61taChannel\x12(\n\x03rtc\x18\x01 \x01(\x0b\x32\x1b.livekit.proto.RtcStatsData\x12+\n\x02\x64\x63\x18\x02 \x01(\x0b\x32\x1f.livekit.proto.DataChannelStats\x1ag\n\tTransport\x12(\n\x03rtc\x18\x01 \x01(\x0b\x32\x1b.livekit.proto.RtcStatsData\x12\x30\n\ttransport\x18\x02 \x01(\x0b\x32\x1d.livekit.proto.TransportStats\x1at\n\rCandidatePair\x12(\n\x03rtc\x18\x01 \x01(\x0b\x32\x1b.livekit.proto.RtcStatsData\x12\x39\n\x0e\x63\x61ndidate_pair\x18\x02 \x01(\x0b\x32!.livekit.proto.CandidatePairStats\x1ao\n\x0eLocalCandidate\x12(\n\x03rtc\x18\x01 \x01(\x0b\x32\x1b.livekit.proto.RtcStatsData\x12\x33\n\tcandidate\x18\x02 \x01(\x0b\x32 .livekit.proto.IceCandidateStats\x1ap\n\x0fRemoteCandidate\x12(\n\x03rtc\x18\x01 \x01(\x0b\x32\x1b.livekit.proto.RtcStatsData\x12\x33\n\tcandidate\x18\x02 \x01(\x0b\x32 .livekit.proto.IceCandidateStats\x1am\n\x0b\x43\x65rtificate\x12(\n\x03rtc\x18\x01 \x01(\x0b\x32\x1b.livekit.proto.RtcStatsData\x12\x34\n\x0b\x63\x65rtificate\x18\x02 \x01(\x0b\x32\x1f.livekit.proto.CertificateStats\x1a\x07\n\x05TrackB\x07\n\x05stats\"-\n\x0cRtcStatsData\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\ttimestamp\x18\x02 \x01(\x03\"\x88\x01\n\nCodecStats\x12\x14\n\x0cpayload_type\x18\x01 \x01(\r\x12\x14\n\x0ctransport_id\x18\x02 \x01(\t\x12\x11\n\tmime_type\x18\x03 \x01(\t\x12\x12\n\nclock_rate\x18\x04 \x01(\r\x12\x10\n\x08\x63hannels\x18\x05 \x01(\r\x12\x15\n\rsdp_fmtp_line\x18\x06 \x01(\t\"T\n\x0eRtpStreamStats\x12\x0c\n\x04ssrc\x18\x01 \x01(\r\x12\x0c\n\x04kind\x18\x02 \x01(\t\x12\x14\n\x0ctransport_id\x18\x03 \x01(\t\x12\x10\n\x08\x63odec_id\x18\x04 \x01(\t\"X\n\x16ReceivedRtpStreamStats\x12\x18\n\x10packets_received\x18\x01 \x01(\x04\x12\x14\n\x0cpackets_lost\x18\x02 \x01(\x03\x12\x0e\n\x06jitter\x18\x03 \x01(\x01\"\x82\x0c\n\x15InboundRtpStreamStats\x12\x18\n\x10track_identifier\x18\x01 \x01(\t\x12\x0b\n\x03mid\x18\x02 \x01(\t\x12\x11\n\tremote_id\x18\x03 \x01(\t\x12\x16\n\x0e\x66rames_decoded\x18\x04 \x01(\r\x12\x1a\n\x12key_frames_decoded\x18\x05 \x01(\r\x12\x17\n\x0f\x66rames_rendered\x18\x06 \x01(\r\x12\x16\n\x0e\x66rames_dropped\x18\x07 \x01(\r\x12\x13\n\x0b\x66rame_width\x18\x08 \x01(\r\x12\x14\n\x0c\x66rame_height\x18\t \x01(\r\x12\x19\n\x11\x66rames_per_second\x18\n \x01(\x01\x12\x0e\n\x06qp_sum\x18\x0b \x01(\x04\x12\x19\n\x11total_decode_time\x18\x0c \x01(\x01\x12\x1f\n\x17total_inter_frame_delay\x18\r \x01(\x01\x12\'\n\x1ftotal_squared_inter_frame_delay\x18\x0e \x01(\x01\x12\x13\n\x0bpause_count\x18\x0f \x01(\r\x12\x1c\n\x14total_pause_duration\x18\x10 \x01(\x01\x12\x14\n\x0c\x66reeze_count\x18\x11 \x01(\r\x12\x1d\n\x15total_freeze_duration\x18\x12 \x01(\x01\x12&\n\x1elast_packet_received_timestamp\x18\x13 \x01(\x01\x12\x1d\n\x15header_bytes_received\x18\x14 \x01(\x04\x12\x19\n\x11packets_discarded\x18\x15 \x01(\x04\x12\x1a\n\x12\x66\x65\x63_bytes_received\x18\x16 \x01(\x04\x12\x1c\n\x14\x66\x65\x63_packets_received\x18\x17 \x01(\x04\x12\x1d\n\x15\x66\x65\x63_packets_discarded\x18\x18 \x01(\x04\x12\x16\n\x0e\x62ytes_received\x18\x19 \x01(\x04\x12\x12\n\nnack_count\x18\x1a \x01(\r\x12\x11\n\tfir_count\x18\x1b \x01(\r\x12\x11\n\tpli_count\x18\x1c \x01(\r\x12\x1e\n\x16total_processing_delay\x18\x1d \x01(\x01\x12#\n\x1b\x65stimated_playout_timestamp\x18\x1e \x01(\x01\x12\x1b\n\x13jitter_buffer_delay\x18\x1f \x01(\x01\x12\"\n\x1ajitter_buffer_target_delay\x18 \x01(\x01\x12#\n\x1bjitter_buffer_emitted_count\x18! \x01(\x04\x12#\n\x1bjitter_buffer_minimum_delay\x18\" \x01(\x01\x12\x1e\n\x16total_samples_received\x18# \x01(\x04\x12\x19\n\x11\x63oncealed_samples\x18$ \x01(\x04\x12 \n\x18silent_concealed_samples\x18% \x01(\x04\x12\x1a\n\x12\x63oncealment_events\x18& \x01(\x04\x12)\n!inserted_samples_for_deceleration\x18\' \x01(\x04\x12(\n removed_samples_for_acceleration\x18( \x01(\x04\x12\x13\n\x0b\x61udio_level\x18) \x01(\x01\x12\x1a\n\x12total_audio_energy\x18* \x01(\x01\x12\x1e\n\x16total_samples_duration\x18+ \x01(\x01\x12\x17\n\x0f\x66rames_received\x18, \x01(\x04\x12\x1e\n\x16\x64\x65\x63oder_implementation\x18- \x01(\t\x12\x12\n\nplayout_id\x18. \x01(\t\x12\x1f\n\x17power_efficient_decoder\x18/ \x01(\x08\x12.\n&frames_assembled_from_multiple_packets\x18\x30 \x01(\x04\x12\x1b\n\x13total_assembly_time\x18\x31 \x01(\x01\x12&\n\x1eretransmitted_packets_received\x18\x32 \x01(\x04\x12$\n\x1cretransmitted_bytes_received\x18\x33 \x01(\x04\x12\x10\n\x08rtx_ssrc\x18\x34 \x01(\r\x12\x10\n\x08\x66\x65\x63_ssrc\x18\x35 \x01(\r\">\n\x12SentRtpStreamStats\x12\x14\n\x0cpackets_sent\x18\x01 \x01(\x04\x12\x12\n\nbytes_sent\x18\x02 \x01(\x04\"\xd1\x07\n\x16OutboundRtpStreamStats\x12\x0b\n\x03mid\x18\x01 \x01(\t\x12\x17\n\x0fmedia_source_id\x18\x02 \x01(\t\x12\x11\n\tremote_id\x18\x03 \x01(\t\x12\x0b\n\x03rid\x18\x04 \x01(\t\x12\x19\n\x11header_bytes_sent\x18\x05 \x01(\x04\x12\"\n\x1aretransmitted_packets_sent\x18\x06 \x01(\x04\x12 \n\x18retransmitted_bytes_sent\x18\x07 \x01(\x04\x12\x10\n\x08rtx_ssrc\x18\x08 \x01(\r\x12\x16\n\x0etarget_bitrate\x18\t \x01(\x01\x12\"\n\x1atotal_encoded_bytes_target\x18\n \x01(\x04\x12\x13\n\x0b\x66rame_width\x18\x0b \x01(\r\x12\x14\n\x0c\x66rame_height\x18\x0c \x01(\r\x12\x19\n\x11\x66rames_per_second\x18\r \x01(\x01\x12\x13\n\x0b\x66rames_sent\x18\x0e \x01(\r\x12\x18\n\x10huge_frames_sent\x18\x0f \x01(\r\x12\x16\n\x0e\x66rames_encoded\x18\x10 \x01(\r\x12\x1a\n\x12key_frames_encoded\x18\x11 \x01(\r\x12\x0e\n\x06qp_sum\x18\x12 \x01(\x04\x12\x19\n\x11total_encode_time\x18\x13 \x01(\x01\x12\x1f\n\x17total_packet_send_delay\x18\x14 \x01(\x01\x12I\n\x19quality_limitation_reason\x18\x15 \x01(\x0e\x32&.livekit.proto.QualityLimitationReason\x12k\n\x1cquality_limitation_durations\x18\x16 \x03(\x0b\x32\x45.livekit.proto.OutboundRtpStreamStats.QualityLimitationDurationsEntry\x12-\n%quality_limitation_resolution_changes\x18\x17 \x01(\r\x12\x12\n\nnack_count\x18\x18 \x01(\r\x12\x11\n\tfir_count\x18\x19 \x01(\r\x12\x11\n\tpli_count\x18\x1a \x01(\r\x12\x1e\n\x16\x65ncoder_implementation\x18\x1b \x01(\t\x12\x1f\n\x17power_efficient_encoder\x18\x1c \x01(\x08\x12\x0e\n\x06\x61\x63tive\x18\x1d \x01(\x08\x12\x18\n\x10scalibility_mode\x18\x1e \x01(\t\x1a\x41\n\x1fQualityLimitationDurationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\"\xa4\x01\n\x1bRemoteInboundRtpStreamStats\x12\x10\n\x08local_id\x18\x01 \x01(\t\x12\x17\n\x0fround_trip_time\x18\x02 \x01(\x01\x12\x1d\n\x15total_round_trip_time\x18\x03 \x01(\x01\x12\x15\n\rfraction_lost\x18\x04 \x01(\x01\x12$\n\x1cround_trip_time_measurements\x18\x05 \x01(\x04\"\xbe\x01\n\x1cRemoteOutboundRtpStreamStats\x12\x10\n\x08local_id\x18\x01 \x01(\t\x12\x18\n\x10remote_timestamp\x18\x02 \x01(\x01\x12\x14\n\x0creports_sent\x18\x03 \x01(\x04\x12\x17\n\x0fround_trip_time\x18\x04 \x01(\x01\x12\x1d\n\x15total_round_trip_time\x18\x05 \x01(\x01\x12$\n\x1cround_trip_time_measurements\x18\x06 \x01(\x04\":\n\x10MediaSourceStats\x12\x18\n\x10track_identifier\x18\x01 \x01(\t\x12\x0c\n\x04kind\x18\x02 \x01(\t\"\xa2\x02\n\x10\x41udioSourceStats\x12\x13\n\x0b\x61udio_level\x18\x01 \x01(\x01\x12\x1a\n\x12total_audio_energy\x18\x02 \x01(\x01\x12\x1e\n\x16total_samples_duration\x18\x03 \x01(\x01\x12\x18\n\x10\x65\x63ho_return_loss\x18\x04 \x01(\x01\x12$\n\x1c\x65\x63ho_return_loss_enhancement\x18\x05 \x01(\x01\x12 \n\x18\x64ropped_samples_duration\x18\x06 \x01(\x01\x12\x1e\n\x16\x64ropped_samples_events\x18\x07 \x01(\r\x12\x1b\n\x13total_capture_delay\x18\x08 \x01(\x01\x12\x1e\n\x16total_samples_captured\x18\t \x01(\x04\"\\\n\x10VideoSourceStats\x12\r\n\x05width\x18\x01 \x01(\r\x12\x0e\n\x06height\x18\x02 \x01(\r\x12\x0e\n\x06\x66rames\x18\x03 \x01(\r\x12\x19\n\x11\x66rames_per_second\x18\x04 \x01(\x01\"\xc5\x01\n\x11\x41udioPlayoutStats\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12$\n\x1csynthesized_samples_duration\x18\x02 \x01(\x01\x12\"\n\x1asynthesized_samples_events\x18\x03 \x01(\r\x12\x1e\n\x16total_samples_duration\x18\x04 \x01(\x01\x12\x1b\n\x13total_playout_delay\x18\x05 \x01(\x01\x12\x1b\n\x13total_samples_count\x18\x06 \x01(\x04\"Q\n\x13PeerConnectionStats\x12\x1c\n\x14\x64\x61ta_channels_opened\x18\x01 \x01(\r\x12\x1c\n\x14\x64\x61ta_channels_closed\x18\x02 \x01(\r\"\xf1\x01\n\x10\x44\x61taChannelStats\x12\r\n\x05label\x18\x01 \x01(\t\x12\x10\n\x08protocol\x18\x02 \x01(\t\x12\x1f\n\x17\x64\x61ta_channel_identifier\x18\x03 \x01(\x05\x12\x33\n\x05state\x18\x04 \x01(\x0e\x32\x1f.livekit.proto.DataChannelStateH\x00\x88\x01\x01\x12\x15\n\rmessages_sent\x18\x05 \x01(\r\x12\x12\n\nbytes_sent\x18\x06 \x01(\x04\x12\x19\n\x11messages_received\x18\x07 \x01(\r\x12\x16\n\x0e\x62ytes_received\x18\x08 \x01(\x04\x42\x08\n\x06_state\"\xc3\x04\n\x0eTransportStats\x12\x14\n\x0cpackets_sent\x18\x01 \x01(\x04\x12\x18\n\x10packets_received\x18\x02 \x01(\x04\x12\x12\n\nbytes_sent\x18\x03 \x01(\x04\x12\x16\n\x0e\x62ytes_received\x18\x04 \x01(\x04\x12(\n\x08ice_role\x18\x05 \x01(\x0e\x32\x16.livekit.proto.IceRole\x12#\n\x1bice_local_username_fragment\x18\x06 \x01(\t\x12:\n\ndtls_state\x18\x07 \x01(\x0e\x32!.livekit.proto.DtlsTransportStateH\x00\x88\x01\x01\x12\x38\n\tice_state\x18\x08 \x01(\x0e\x32 .livekit.proto.IceTransportStateH\x01\x88\x01\x01\x12\"\n\x1aselected_candidate_pair_id\x18\t \x01(\t\x12\x1c\n\x14local_certificate_id\x18\n \x01(\t\x12\x1d\n\x15remote_certificate_id\x18\x0b \x01(\t\x12\x13\n\x0btls_version\x18\x0c \x01(\t\x12\x13\n\x0b\x64tls_cipher\x18\r \x01(\t\x12*\n\tdtls_role\x18\x0e \x01(\x0e\x32\x17.livekit.proto.DtlsRole\x12\x13\n\x0bsrtp_cipher\x18\x0f \x01(\t\x12\'\n\x1fselected_candidate_pair_changes\x18\x10 \x01(\rB\r\n\x0b_dtls_stateB\x0c\n\n_ice_state\"\xb3\x05\n\x12\x43\x61ndidatePairStats\x12\x14\n\x0ctransport_id\x18\x01 \x01(\t\x12\x1a\n\x12local_candidate_id\x18\x02 \x01(\t\x12\x1b\n\x13remote_candidate_id\x18\x03 \x01(\t\x12\x38\n\x05state\x18\x04 \x01(\x0e\x32$.livekit.proto.IceCandidatePairStateH\x00\x88\x01\x01\x12\x11\n\tnominated\x18\x05 \x01(\x08\x12\x14\n\x0cpackets_sent\x18\x06 \x01(\x04\x12\x18\n\x10packets_received\x18\x07 \x01(\x04\x12\x12\n\nbytes_sent\x18\x08 \x01(\x04\x12\x16\n\x0e\x62ytes_received\x18\t \x01(\x04\x12\"\n\x1alast_packet_sent_timestamp\x18\n \x01(\x01\x12&\n\x1elast_packet_received_timestamp\x18\x0b \x01(\x01\x12\x1d\n\x15total_round_trip_time\x18\x0c \x01(\x01\x12\x1f\n\x17\x63urrent_round_trip_time\x18\r \x01(\x01\x12\"\n\x1a\x61vailable_outgoing_bitrate\x18\x0e \x01(\x01\x12\"\n\x1a\x61vailable_incoming_bitrate\x18\x0f \x01(\x01\x12\x19\n\x11requests_received\x18\x10 \x01(\x04\x12\x15\n\rrequests_sent\x18\x11 \x01(\x04\x12\x1a\n\x12responses_received\x18\x12 \x01(\x04\x12\x16\n\x0eresponses_sent\x18\x13 \x01(\x04\x12\x1d\n\x15\x63onsent_requests_sent\x18\x14 \x01(\x04\x12!\n\x19packets_discarded_on_send\x18\x15 \x01(\r\x12\x1f\n\x17\x62ytes_discarded_on_send\x18\x16 \x01(\x04\x42\x08\n\x06_state\"\xcb\x03\n\x11IceCandidateStats\x12\x14\n\x0ctransport_id\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\x05\x12\x10\n\x08protocol\x18\x04 \x01(\t\x12<\n\x0e\x63\x61ndidate_type\x18\x05 \x01(\x0e\x32\x1f.livekit.proto.IceCandidateTypeH\x00\x88\x01\x01\x12\x10\n\x08priority\x18\x06 \x01(\x05\x12\x0b\n\x03url\x18\x07 \x01(\t\x12\x46\n\x0erelay_protocol\x18\x08 \x01(\x0e\x32).livekit.proto.IceServerTransportProtocolH\x01\x88\x01\x01\x12\x12\n\nfoundation\x18\t \x01(\t\x12\x17\n\x0frelated_address\x18\n \x01(\t\x12\x14\n\x0crelated_port\x18\x0b \x01(\x05\x12\x19\n\x11username_fragment\x18\x0c \x01(\t\x12\x39\n\x08tcp_type\x18\r \x01(\x0e\x32\".livekit.proto.IceTcpCandidateTypeH\x02\x88\x01\x01\x42\x11\n\x0f_candidate_typeB\x11\n\x0f_relay_protocolB\x0b\n\t_tcp_type\"\x81\x01\n\x10\x43\x65rtificateStats\x12\x13\n\x0b\x66ingerprint\x18\x01 \x01(\t\x12\x1d\n\x15\x66ingerprint_algorithm\x18\x02 \x01(\t\x12\x1a\n\x12\x62\x61se64_certificate\x18\x03 \x01(\t\x12\x1d\n\x15issuer_certificate_id\x18\x04 \x01(\t*Q\n\x10\x44\x61taChannelState\x12\x11\n\rDC_CONNECTING\x10\x00\x12\x0b\n\x07\x44\x43_OPEN\x10\x01\x12\x0e\n\nDC_CLOSING\x10\x02\x12\r\n\tDC_CLOSED\x10\x03*r\n\x17QualityLimitationReason\x12\x13\n\x0fLIMITATION_NONE\x10\x00\x12\x12\n\x0eLIMITATION_CPU\x10\x01\x12\x18\n\x14LIMITATION_BANDWIDTH\x10\x02\x12\x14\n\x10LIMITATION_OTHER\x10\x03*C\n\x07IceRole\x12\x0f\n\x0bICE_UNKNOWN\x10\x00\x12\x13\n\x0fICE_CONTROLLING\x10\x01\x12\x12\n\x0eICE_CONTROLLED\x10\x02*\x9f\x01\n\x12\x44tlsTransportState\x12\x16\n\x12\x44TLS_TRANSPORT_NEW\x10\x00\x12\x1d\n\x19\x44TLS_TRANSPORT_CONNECTING\x10\x01\x12\x1c\n\x18\x44TLS_TRANSPORT_CONNECTED\x10\x02\x12\x19\n\x15\x44TLS_TRANSPORT_CLOSED\x10\x03\x12\x19\n\x15\x44TLS_TRANSPORT_FAILED\x10\x04*\xd4\x01\n\x11IceTransportState\x12\x15\n\x11ICE_TRANSPORT_NEW\x10\x00\x12\x1a\n\x16ICE_TRANSPORT_CHECKING\x10\x01\x12\x1b\n\x17ICE_TRANSPORT_CONNECTED\x10\x02\x12\x1b\n\x17ICE_TRANSPORT_COMPLETED\x10\x03\x12\x1e\n\x1aICE_TRANSPORT_DISCONNECTED\x10\x04\x12\x18\n\x14ICE_TRANSPORT_FAILED\x10\x05\x12\x18\n\x14ICE_TRANSPORT_CLOSED\x10\x06*>\n\x08\x44tlsRole\x12\x0f\n\x0b\x44TLS_CLIENT\x10\x00\x12\x0f\n\x0b\x44TLS_SERVER\x10\x01\x12\x10\n\x0c\x44TLS_UNKNOWN\x10\x02*u\n\x15IceCandidatePairState\x12\x0f\n\x0bPAIR_FROZEN\x10\x00\x12\x10\n\x0cPAIR_WAITING\x10\x01\x12\x14\n\x10PAIR_IN_PROGRESS\x10\x02\x12\x0f\n\x0bPAIR_FAILED\x10\x03\x12\x12\n\x0ePAIR_SUCCEEDED\x10\x04*=\n\x10IceCandidateType\x12\x08\n\x04HOST\x10\x00\x12\t\n\x05SRFLX\x10\x01\x12\t\n\x05PRFLX\x10\x02\x12\t\n\x05RELAY\x10\x03*U\n\x1aIceServerTransportProtocol\x12\x11\n\rTRANSPORT_UDP\x10\x00\x12\x11\n\rTRANSPORT_TCP\x10\x01\x12\x11\n\rTRANSPORT_TLS\x10\x02*T\n\x13IceTcpCandidateType\x12\x14\n\x10\x43\x41NDIDATE_ACTIVE\x10\x00\x12\x15\n\x11\x43\x41NDIDATE_PASSIVE\x10\x01\x12\x10\n\x0c\x43\x41NDIDATE_SO\x10\x02\x42\x10\xaa\x02\rLiveKit.Protob\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'stats_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + 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 + _globals['_QUALITYLIMITATIONREASON']._serialized_end=9414 + _globals['_ICEROLE']._serialized_start=9416 + _globals['_ICEROLE']._serialized_end=9483 + _globals['_DTLSTRANSPORTSTATE']._serialized_start=9486 + _globals['_DTLSTRANSPORTSTATE']._serialized_end=9645 + _globals['_ICETRANSPORTSTATE']._serialized_start=9648 + _globals['_ICETRANSPORTSTATE']._serialized_end=9860 + _globals['_DTLSROLE']._serialized_start=9862 + _globals['_DTLSROLE']._serialized_end=9924 + _globals['_ICECANDIDATEPAIRSTATE']._serialized_start=9926 + _globals['_ICECANDIDATEPAIRSTATE']._serialized_end=10043 + _globals['_ICECANDIDATETYPE']._serialized_start=10045 + _globals['_ICECANDIDATETYPE']._serialized_end=10106 + _globals['_ICESERVERTRANSPORTPROTOCOL']._serialized_start=10108 + _globals['_ICESERVERTRANSPORTPROTOCOL']._serialized_end=10193 + _globals['_ICETCPCANDIDATETYPE']._serialized_start=10195 + _globals['_ICETCPCANDIDATETYPE']._serialized_end=10279 + _globals['_RTCSTATS']._serialized_start=31 + _globals['_RTCSTATS']._serialized_end=3064 + _globals['_RTCSTATS_CODEC']._serialized_start=974 + _globals['_RTCSTATS_CODEC']._serialized_end=1065 + _globals['_RTCSTATS_INBOUNDRTP']._serialized_start=1068 + _globals['_RTCSTATS_INBOUNDRTP']._serialized_end=1281 + _globals['_RTCSTATS_OUTBOUNDRTP']._serialized_start=1284 + _globals['_RTCSTATS_OUTBOUNDRTP']._serialized_end=1492 + _globals['_RTCSTATS_REMOTEINBOUNDRTP']._serialized_start=1495 + _globals['_RTCSTATS_REMOTEINBOUNDRTP']._serialized_end=1727 + _globals['_RTCSTATS_REMOTEOUTBOUNDRTP']._serialized_start=1730 + _globals['_RTCSTATS_REMOTEOUTBOUNDRTP']._serialized_end=1957 + _globals['_RTCSTATS_MEDIASOURCE']._serialized_start=1960 + _globals['_RTCSTATS_MEDIASOURCE']._serialized_end=2160 + _globals['_RTCSTATS_MEDIAPLAYOUT']._serialized_start=2162 + _globals['_RTCSTATS_MEDIAPLAYOUT']._serialized_end=2275 + _globals['_RTCSTATS_PEERCONNECTION']._serialized_start=2277 + _globals['_RTCSTATS_PEERCONNECTION']._serialized_end=2383 + _globals['_RTCSTATS_DATACHANNEL']._serialized_start=2385 + _globals['_RTCSTATS_DATACHANNEL']._serialized_end=2485 + _globals['_RTCSTATS_TRANSPORT']._serialized_start=2487 + _globals['_RTCSTATS_TRANSPORT']._serialized_end=2590 + _globals['_RTCSTATS_CANDIDATEPAIR']._serialized_start=2592 + _globals['_RTCSTATS_CANDIDATEPAIR']._serialized_end=2708 + _globals['_RTCSTATS_LOCALCANDIDATE']._serialized_start=2710 + _globals['_RTCSTATS_LOCALCANDIDATE']._serialized_end=2821 + _globals['_RTCSTATS_REMOTECANDIDATE']._serialized_start=2823 + _globals['_RTCSTATS_REMOTECANDIDATE']._serialized_end=2935 + _globals['_RTCSTATS_CERTIFICATE']._serialized_start=2937 + _globals['_RTCSTATS_CERTIFICATE']._serialized_end=3046 + _globals['_RTCSTATS_TRACK']._serialized_start=3048 + _globals['_RTCSTATS_TRACK']._serialized_end=3055 + _globals['_RTCSTATSDATA']._serialized_start=3066 + _globals['_RTCSTATSDATA']._serialized_end=3111 + _globals['_CODECSTATS']._serialized_start=3114 + _globals['_CODECSTATS']._serialized_end=3250 + _globals['_RTPSTREAMSTATS']._serialized_start=3252 + _globals['_RTPSTREAMSTATS']._serialized_end=3336 + _globals['_RECEIVEDRTPSTREAMSTATS']._serialized_start=3338 + _globals['_RECEIVEDRTPSTREAMSTATS']._serialized_end=3426 + _globals['_INBOUNDRTPSTREAMSTATS']._serialized_start=3429 + _globals['_INBOUNDRTPSTREAMSTATS']._serialized_end=4967 + _globals['_SENTRTPSTREAMSTATS']._serialized_start=4969 + _globals['_SENTRTPSTREAMSTATS']._serialized_end=5031 + _globals['_OUTBOUNDRTPSTREAMSTATS']._serialized_start=5034 + _globals['_OUTBOUNDRTPSTREAMSTATS']._serialized_end=6011 + _globals['_OUTBOUNDRTPSTREAMSTATS_QUALITYLIMITATIONDURATIONSENTRY']._serialized_start=5946 + _globals['_OUTBOUNDRTPSTREAMSTATS_QUALITYLIMITATIONDURATIONSENTRY']._serialized_end=6011 + _globals['_REMOTEINBOUNDRTPSTREAMSTATS']._serialized_start=6014 + _globals['_REMOTEINBOUNDRTPSTREAMSTATS']._serialized_end=6178 + _globals['_REMOTEOUTBOUNDRTPSTREAMSTATS']._serialized_start=6181 + _globals['_REMOTEOUTBOUNDRTPSTREAMSTATS']._serialized_end=6371 + _globals['_MEDIASOURCESTATS']._serialized_start=6373 + _globals['_MEDIASOURCESTATS']._serialized_end=6431 + _globals['_AUDIOSOURCESTATS']._serialized_start=6434 + _globals['_AUDIOSOURCESTATS']._serialized_end=6724 + _globals['_VIDEOSOURCESTATS']._serialized_start=6726 + _globals['_VIDEOSOURCESTATS']._serialized_end=6818 + _globals['_AUDIOPLAYOUTSTATS']._serialized_start=6821 + _globals['_AUDIOPLAYOUTSTATS']._serialized_end=7018 + _globals['_PEERCONNECTIONSTATS']._serialized_start=7020 + _globals['_PEERCONNECTIONSTATS']._serialized_end=7101 + _globals['_DATACHANNELSTATS']._serialized_start=7104 + _globals['_DATACHANNELSTATS']._serialized_end=7345 + _globals['_TRANSPORTSTATS']._serialized_start=7348 + _globals['_TRANSPORTSTATS']._serialized_end=7927 + _globals['_CANDIDATEPAIRSTATS']._serialized_start=7930 + _globals['_CANDIDATEPAIRSTATS']._serialized_end=8621 + _globals['_ICECANDIDATESTATS']._serialized_start=8624 + _globals['_ICECANDIDATESTATS']._serialized_end=9083 + _globals['_CERTIFICATESTATS']._serialized_start=9086 + _globals['_CERTIFICATESTATS']._serialized_end=9215 +# @@protoc_insertion_point(module_scope) diff --git a/livekit-rtc/livekit/rtc/_proto/stats_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/stats_pb2.pyi new file mode 100644 index 00000000..82b8ef4b --- /dev/null +++ b/livekit-rtc/livekit/rtc/_proto/stats_pb2.pyi @@ -0,0 +1,1466 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +Copyright 2023 LiveKit, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" +import builtins +import collections.abc +import google.protobuf.descriptor +import google.protobuf.internal.containers +import google.protobuf.internal.enum_type_wrapper +import google.protobuf.message +import sys +import typing + +if sys.version_info >= (3, 10): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +class _DataChannelState: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _DataChannelStateEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_DataChannelState.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + DC_CONNECTING: _DataChannelState.ValueType # 0 + DC_OPEN: _DataChannelState.ValueType # 1 + DC_CLOSING: _DataChannelState.ValueType # 2 + DC_CLOSED: _DataChannelState.ValueType # 3 + +class DataChannelState(_DataChannelState, metaclass=_DataChannelStateEnumTypeWrapper): ... + +DC_CONNECTING: DataChannelState.ValueType # 0 +DC_OPEN: DataChannelState.ValueType # 1 +DC_CLOSING: DataChannelState.ValueType # 2 +DC_CLOSED: DataChannelState.ValueType # 3 +global___DataChannelState = DataChannelState + +class _QualityLimitationReason: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _QualityLimitationReasonEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_QualityLimitationReason.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + LIMITATION_NONE: _QualityLimitationReason.ValueType # 0 + LIMITATION_CPU: _QualityLimitationReason.ValueType # 1 + LIMITATION_BANDWIDTH: _QualityLimitationReason.ValueType # 2 + LIMITATION_OTHER: _QualityLimitationReason.ValueType # 3 + +class QualityLimitationReason(_QualityLimitationReason, metaclass=_QualityLimitationReasonEnumTypeWrapper): ... + +LIMITATION_NONE: QualityLimitationReason.ValueType # 0 +LIMITATION_CPU: QualityLimitationReason.ValueType # 1 +LIMITATION_BANDWIDTH: QualityLimitationReason.ValueType # 2 +LIMITATION_OTHER: QualityLimitationReason.ValueType # 3 +global___QualityLimitationReason = QualityLimitationReason + +class _IceRole: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _IceRoleEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_IceRole.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + ICE_UNKNOWN: _IceRole.ValueType # 0 + ICE_CONTROLLING: _IceRole.ValueType # 1 + ICE_CONTROLLED: _IceRole.ValueType # 2 + +class IceRole(_IceRole, metaclass=_IceRoleEnumTypeWrapper): ... + +ICE_UNKNOWN: IceRole.ValueType # 0 +ICE_CONTROLLING: IceRole.ValueType # 1 +ICE_CONTROLLED: IceRole.ValueType # 2 +global___IceRole = IceRole + +class _DtlsTransportState: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _DtlsTransportStateEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_DtlsTransportState.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + DTLS_TRANSPORT_NEW: _DtlsTransportState.ValueType # 0 + DTLS_TRANSPORT_CONNECTING: _DtlsTransportState.ValueType # 1 + DTLS_TRANSPORT_CONNECTED: _DtlsTransportState.ValueType # 2 + DTLS_TRANSPORT_CLOSED: _DtlsTransportState.ValueType # 3 + DTLS_TRANSPORT_FAILED: _DtlsTransportState.ValueType # 4 + +class DtlsTransportState(_DtlsTransportState, metaclass=_DtlsTransportStateEnumTypeWrapper): ... + +DTLS_TRANSPORT_NEW: DtlsTransportState.ValueType # 0 +DTLS_TRANSPORT_CONNECTING: DtlsTransportState.ValueType # 1 +DTLS_TRANSPORT_CONNECTED: DtlsTransportState.ValueType # 2 +DTLS_TRANSPORT_CLOSED: DtlsTransportState.ValueType # 3 +DTLS_TRANSPORT_FAILED: DtlsTransportState.ValueType # 4 +global___DtlsTransportState = DtlsTransportState + +class _IceTransportState: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _IceTransportStateEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_IceTransportState.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + ICE_TRANSPORT_NEW: _IceTransportState.ValueType # 0 + ICE_TRANSPORT_CHECKING: _IceTransportState.ValueType # 1 + ICE_TRANSPORT_CONNECTED: _IceTransportState.ValueType # 2 + ICE_TRANSPORT_COMPLETED: _IceTransportState.ValueType # 3 + ICE_TRANSPORT_DISCONNECTED: _IceTransportState.ValueType # 4 + ICE_TRANSPORT_FAILED: _IceTransportState.ValueType # 5 + ICE_TRANSPORT_CLOSED: _IceTransportState.ValueType # 6 + +class IceTransportState(_IceTransportState, metaclass=_IceTransportStateEnumTypeWrapper): ... + +ICE_TRANSPORT_NEW: IceTransportState.ValueType # 0 +ICE_TRANSPORT_CHECKING: IceTransportState.ValueType # 1 +ICE_TRANSPORT_CONNECTED: IceTransportState.ValueType # 2 +ICE_TRANSPORT_COMPLETED: IceTransportState.ValueType # 3 +ICE_TRANSPORT_DISCONNECTED: IceTransportState.ValueType # 4 +ICE_TRANSPORT_FAILED: IceTransportState.ValueType # 5 +ICE_TRANSPORT_CLOSED: IceTransportState.ValueType # 6 +global___IceTransportState = IceTransportState + +class _DtlsRole: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _DtlsRoleEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_DtlsRole.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + DTLS_CLIENT: _DtlsRole.ValueType # 0 + DTLS_SERVER: _DtlsRole.ValueType # 1 + DTLS_UNKNOWN: _DtlsRole.ValueType # 2 + +class DtlsRole(_DtlsRole, metaclass=_DtlsRoleEnumTypeWrapper): ... + +DTLS_CLIENT: DtlsRole.ValueType # 0 +DTLS_SERVER: DtlsRole.ValueType # 1 +DTLS_UNKNOWN: DtlsRole.ValueType # 2 +global___DtlsRole = DtlsRole + +class _IceCandidatePairState: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _IceCandidatePairStateEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_IceCandidatePairState.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + PAIR_FROZEN: _IceCandidatePairState.ValueType # 0 + PAIR_WAITING: _IceCandidatePairState.ValueType # 1 + PAIR_IN_PROGRESS: _IceCandidatePairState.ValueType # 2 + PAIR_FAILED: _IceCandidatePairState.ValueType # 3 + PAIR_SUCCEEDED: _IceCandidatePairState.ValueType # 4 + +class IceCandidatePairState(_IceCandidatePairState, metaclass=_IceCandidatePairStateEnumTypeWrapper): ... + +PAIR_FROZEN: IceCandidatePairState.ValueType # 0 +PAIR_WAITING: IceCandidatePairState.ValueType # 1 +PAIR_IN_PROGRESS: IceCandidatePairState.ValueType # 2 +PAIR_FAILED: IceCandidatePairState.ValueType # 3 +PAIR_SUCCEEDED: IceCandidatePairState.ValueType # 4 +global___IceCandidatePairState = IceCandidatePairState + +class _IceCandidateType: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _IceCandidateTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_IceCandidateType.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + HOST: _IceCandidateType.ValueType # 0 + SRFLX: _IceCandidateType.ValueType # 1 + PRFLX: _IceCandidateType.ValueType # 2 + RELAY: _IceCandidateType.ValueType # 3 + +class IceCandidateType(_IceCandidateType, metaclass=_IceCandidateTypeEnumTypeWrapper): ... + +HOST: IceCandidateType.ValueType # 0 +SRFLX: IceCandidateType.ValueType # 1 +PRFLX: IceCandidateType.ValueType # 2 +RELAY: IceCandidateType.ValueType # 3 +global___IceCandidateType = IceCandidateType + +class _IceServerTransportProtocol: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _IceServerTransportProtocolEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_IceServerTransportProtocol.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + TRANSPORT_UDP: _IceServerTransportProtocol.ValueType # 0 + TRANSPORT_TCP: _IceServerTransportProtocol.ValueType # 1 + TRANSPORT_TLS: _IceServerTransportProtocol.ValueType # 2 + +class IceServerTransportProtocol(_IceServerTransportProtocol, metaclass=_IceServerTransportProtocolEnumTypeWrapper): ... + +TRANSPORT_UDP: IceServerTransportProtocol.ValueType # 0 +TRANSPORT_TCP: IceServerTransportProtocol.ValueType # 1 +TRANSPORT_TLS: IceServerTransportProtocol.ValueType # 2 +global___IceServerTransportProtocol = IceServerTransportProtocol + +class _IceTcpCandidateType: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _IceTcpCandidateTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_IceTcpCandidateType.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + CANDIDATE_ACTIVE: _IceTcpCandidateType.ValueType # 0 + CANDIDATE_PASSIVE: _IceTcpCandidateType.ValueType # 1 + CANDIDATE_SO: _IceTcpCandidateType.ValueType # 2 + +class IceTcpCandidateType(_IceTcpCandidateType, metaclass=_IceTcpCandidateTypeEnumTypeWrapper): ... + +CANDIDATE_ACTIVE: IceTcpCandidateType.ValueType # 0 +CANDIDATE_PASSIVE: IceTcpCandidateType.ValueType # 1 +CANDIDATE_SO: IceTcpCandidateType.ValueType # 2 +global___IceTcpCandidateType = IceTcpCandidateType + +@typing_extensions.final +class RtcStats(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing_extensions.final + class Codec(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RTC_FIELD_NUMBER: builtins.int + CODEC_FIELD_NUMBER: builtins.int + @property + def rtc(self) -> global___RtcStatsData: ... + @property + def codec(self) -> global___CodecStats: ... + def __init__( + self, + *, + 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: ... + + @typing_extensions.final + class InboundRtp(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RTC_FIELD_NUMBER: builtins.int + STREAM_FIELD_NUMBER: builtins.int + RECEIVED_FIELD_NUMBER: builtins.int + INBOUND_FIELD_NUMBER: builtins.int + @property + def rtc(self) -> global___RtcStatsData: ... + @property + def stream(self) -> global___RtpStreamStats: ... + @property + def received(self) -> global___ReceivedRtpStreamStats: ... + @property + def inbound(self) -> global___InboundRtpStreamStats: ... + def __init__( + self, + *, + rtc: global___RtcStatsData | None = ..., + stream: global___RtpStreamStats | None = ..., + 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: ... + + @typing_extensions.final + class OutboundRtp(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RTC_FIELD_NUMBER: builtins.int + STREAM_FIELD_NUMBER: builtins.int + SENT_FIELD_NUMBER: builtins.int + OUTBOUND_FIELD_NUMBER: builtins.int + @property + def rtc(self) -> global___RtcStatsData: ... + @property + def stream(self) -> global___RtpStreamStats: ... + @property + def sent(self) -> global___SentRtpStreamStats: ... + @property + def outbound(self) -> global___OutboundRtpStreamStats: ... + def __init__( + self, + *, + rtc: global___RtcStatsData | None = ..., + stream: global___RtpStreamStats | None = ..., + 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: ... + + @typing_extensions.final + class RemoteInboundRtp(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RTC_FIELD_NUMBER: builtins.int + STREAM_FIELD_NUMBER: builtins.int + RECEIVED_FIELD_NUMBER: builtins.int + REMOTE_INBOUND_FIELD_NUMBER: builtins.int + @property + def rtc(self) -> global___RtcStatsData: ... + @property + def stream(self) -> global___RtpStreamStats: ... + @property + def received(self) -> global___ReceivedRtpStreamStats: ... + @property + def remote_inbound(self) -> global___RemoteInboundRtpStreamStats: ... + def __init__( + self, + *, + rtc: global___RtcStatsData | None = ..., + stream: global___RtpStreamStats | None = ..., + 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: ... + + @typing_extensions.final + class RemoteOutboundRtp(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RTC_FIELD_NUMBER: builtins.int + STREAM_FIELD_NUMBER: builtins.int + SENT_FIELD_NUMBER: builtins.int + REMOTE_OUTBOUND_FIELD_NUMBER: builtins.int + @property + def rtc(self) -> global___RtcStatsData: ... + @property + def stream(self) -> global___RtpStreamStats: ... + @property + def sent(self) -> global___SentRtpStreamStats: ... + @property + def remote_outbound(self) -> global___RemoteOutboundRtpStreamStats: ... + def __init__( + self, + *, + rtc: global___RtcStatsData | None = ..., + stream: global___RtpStreamStats | None = ..., + 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: ... + + @typing_extensions.final + class MediaSource(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RTC_FIELD_NUMBER: builtins.int + SOURCE_FIELD_NUMBER: builtins.int + AUDIO_FIELD_NUMBER: builtins.int + VIDEO_FIELD_NUMBER: builtins.int + @property + def rtc(self) -> global___RtcStatsData: ... + @property + def source(self) -> global___MediaSourceStats: ... + @property + def audio(self) -> global___AudioSourceStats: ... + @property + def video(self) -> global___VideoSourceStats: ... + def __init__( + self, + *, + rtc: global___RtcStatsData | None = ..., + source: global___MediaSourceStats | None = ..., + 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: ... + + @typing_extensions.final + class MediaPlayout(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RTC_FIELD_NUMBER: builtins.int + AUDIO_PLAYOUT_FIELD_NUMBER: builtins.int + @property + def rtc(self) -> global___RtcStatsData: ... + @property + def audio_playout(self) -> global___AudioPlayoutStats: ... + def __init__( + self, + *, + 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: ... + + @typing_extensions.final + class PeerConnection(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RTC_FIELD_NUMBER: builtins.int + PC_FIELD_NUMBER: builtins.int + @property + def rtc(self) -> global___RtcStatsData: ... + @property + def pc(self) -> global___PeerConnectionStats: ... + def __init__( + self, + *, + 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: ... + + @typing_extensions.final + class DataChannel(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RTC_FIELD_NUMBER: builtins.int + DC_FIELD_NUMBER: builtins.int + @property + def rtc(self) -> global___RtcStatsData: ... + @property + def dc(self) -> global___DataChannelStats: ... + def __init__( + self, + *, + 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: ... + + @typing_extensions.final + class Transport(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RTC_FIELD_NUMBER: builtins.int + TRANSPORT_FIELD_NUMBER: builtins.int + @property + def rtc(self) -> global___RtcStatsData: ... + @property + def transport(self) -> global___TransportStats: ... + def __init__( + self, + *, + 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: ... + + @typing_extensions.final + class CandidatePair(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RTC_FIELD_NUMBER: builtins.int + CANDIDATE_PAIR_FIELD_NUMBER: builtins.int + @property + def rtc(self) -> global___RtcStatsData: ... + @property + def candidate_pair(self) -> global___CandidatePairStats: ... + def __init__( + self, + *, + 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: ... + + @typing_extensions.final + class LocalCandidate(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RTC_FIELD_NUMBER: builtins.int + CANDIDATE_FIELD_NUMBER: builtins.int + @property + def rtc(self) -> global___RtcStatsData: ... + @property + def candidate(self) -> global___IceCandidateStats: ... + def __init__( + self, + *, + 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: ... + + @typing_extensions.final + class RemoteCandidate(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RTC_FIELD_NUMBER: builtins.int + CANDIDATE_FIELD_NUMBER: builtins.int + @property + def rtc(self) -> global___RtcStatsData: ... + @property + def candidate(self) -> global___IceCandidateStats: ... + def __init__( + self, + *, + 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: ... + + @typing_extensions.final + class Certificate(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RTC_FIELD_NUMBER: builtins.int + CERTIFICATE_FIELD_NUMBER: builtins.int + @property + def rtc(self) -> global___RtcStatsData: ... + @property + def certificate(self) -> global___CertificateStats: ... + def __init__( + self, + *, + 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: ... + + @typing_extensions.final + class Track(google.protobuf.message.Message): + """Deprecated""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + + CODEC_FIELD_NUMBER: builtins.int + INBOUND_RTP_FIELD_NUMBER: builtins.int + OUTBOUND_RTP_FIELD_NUMBER: builtins.int + REMOTE_INBOUND_RTP_FIELD_NUMBER: builtins.int + REMOTE_OUTBOUND_RTP_FIELD_NUMBER: builtins.int + MEDIA_SOURCE_FIELD_NUMBER: builtins.int + MEDIA_PLAYOUT_FIELD_NUMBER: builtins.int + PEER_CONNECTION_FIELD_NUMBER: builtins.int + DATA_CHANNEL_FIELD_NUMBER: builtins.int + TRANSPORT_FIELD_NUMBER: builtins.int + CANDIDATE_PAIR_FIELD_NUMBER: builtins.int + LOCAL_CANDIDATE_FIELD_NUMBER: builtins.int + REMOTE_CANDIDATE_FIELD_NUMBER: builtins.int + CERTIFICATE_FIELD_NUMBER: builtins.int + TRACK_FIELD_NUMBER: builtins.int + @property + def codec(self) -> global___RtcStats.Codec: ... + @property + def inbound_rtp(self) -> global___RtcStats.InboundRtp: ... + @property + def outbound_rtp(self) -> global___RtcStats.OutboundRtp: ... + @property + def remote_inbound_rtp(self) -> global___RtcStats.RemoteInboundRtp: ... + @property + def remote_outbound_rtp(self) -> global___RtcStats.RemoteOutboundRtp: ... + @property + def media_source(self) -> global___RtcStats.MediaSource: ... + @property + def media_playout(self) -> global___RtcStats.MediaPlayout: ... + @property + def peer_connection(self) -> global___RtcStats.PeerConnection: ... + @property + def data_channel(self) -> global___RtcStats.DataChannel: ... + @property + def transport(self) -> global___RtcStats.Transport: ... + @property + def candidate_pair(self) -> global___RtcStats.CandidatePair: ... + @property + def local_candidate(self) -> global___RtcStats.LocalCandidate: ... + @property + def remote_candidate(self) -> global___RtcStats.RemoteCandidate: ... + @property + def certificate(self) -> global___RtcStats.Certificate: ... + @property + def track(self) -> global___RtcStats.Track: ... + def __init__( + self, + *, + codec: global___RtcStats.Codec | None = ..., + inbound_rtp: global___RtcStats.InboundRtp | None = ..., + outbound_rtp: global___RtcStats.OutboundRtp | None = ..., + remote_inbound_rtp: global___RtcStats.RemoteInboundRtp | None = ..., + remote_outbound_rtp: global___RtcStats.RemoteOutboundRtp | None = ..., + media_source: global___RtcStats.MediaSource | None = ..., + media_playout: global___RtcStats.MediaPlayout | None = ..., + peer_connection: global___RtcStats.PeerConnection | None = ..., + data_channel: global___RtcStats.DataChannel | None = ..., + transport: global___RtcStats.Transport | None = ..., + candidate_pair: global___RtcStats.CandidatePair | None = ..., + local_candidate: global___RtcStats.LocalCandidate | None = ..., + remote_candidate: global___RtcStats.RemoteCandidate | None = ..., + 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: ... + +global___RtcStats = RtcStats + +@typing_extensions.final +class RtcStatsData(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ID_FIELD_NUMBER: builtins.int + TIMESTAMP_FIELD_NUMBER: builtins.int + id: builtins.str + timestamp: builtins.int + def __init__( + self, + *, + id: builtins.str = ..., + timestamp: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["id", b"id", "timestamp", b"timestamp"]) -> None: ... + +global___RtcStatsData = RtcStatsData + +@typing_extensions.final +class CodecStats(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PAYLOAD_TYPE_FIELD_NUMBER: builtins.int + TRANSPORT_ID_FIELD_NUMBER: builtins.int + MIME_TYPE_FIELD_NUMBER: builtins.int + CLOCK_RATE_FIELD_NUMBER: builtins.int + CHANNELS_FIELD_NUMBER: builtins.int + SDP_FMTP_LINE_FIELD_NUMBER: builtins.int + payload_type: builtins.int + transport_id: builtins.str + mime_type: builtins.str + clock_rate: builtins.int + channels: builtins.int + sdp_fmtp_line: builtins.str + def __init__( + self, + *, + payload_type: builtins.int = ..., + transport_id: builtins.str = ..., + mime_type: builtins.str = ..., + clock_rate: builtins.int = ..., + 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: ... + +global___CodecStats = CodecStats + +@typing_extensions.final +class RtpStreamStats(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SSRC_FIELD_NUMBER: builtins.int + KIND_FIELD_NUMBER: builtins.int + TRANSPORT_ID_FIELD_NUMBER: builtins.int + CODEC_ID_FIELD_NUMBER: builtins.int + ssrc: builtins.int + kind: builtins.str + transport_id: builtins.str + codec_id: builtins.str + def __init__( + self, + *, + ssrc: builtins.int = ..., + kind: builtins.str = ..., + 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: ... + +global___RtpStreamStats = RtpStreamStats + +@typing_extensions.final +class ReceivedRtpStreamStats(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PACKETS_RECEIVED_FIELD_NUMBER: builtins.int + PACKETS_LOST_FIELD_NUMBER: builtins.int + JITTER_FIELD_NUMBER: builtins.int + packets_received: builtins.int + packets_lost: builtins.int + jitter: builtins.float + def __init__( + self, + *, + packets_received: builtins.int = ..., + 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: ... + +global___ReceivedRtpStreamStats = ReceivedRtpStreamStats + +@typing_extensions.final +class InboundRtpStreamStats(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TRACK_IDENTIFIER_FIELD_NUMBER: builtins.int + MID_FIELD_NUMBER: builtins.int + REMOTE_ID_FIELD_NUMBER: builtins.int + FRAMES_DECODED_FIELD_NUMBER: builtins.int + KEY_FRAMES_DECODED_FIELD_NUMBER: builtins.int + FRAMES_RENDERED_FIELD_NUMBER: builtins.int + FRAMES_DROPPED_FIELD_NUMBER: builtins.int + FRAME_WIDTH_FIELD_NUMBER: builtins.int + FRAME_HEIGHT_FIELD_NUMBER: builtins.int + FRAMES_PER_SECOND_FIELD_NUMBER: builtins.int + QP_SUM_FIELD_NUMBER: builtins.int + TOTAL_DECODE_TIME_FIELD_NUMBER: builtins.int + TOTAL_INTER_FRAME_DELAY_FIELD_NUMBER: builtins.int + TOTAL_SQUARED_INTER_FRAME_DELAY_FIELD_NUMBER: builtins.int + PAUSE_COUNT_FIELD_NUMBER: builtins.int + TOTAL_PAUSE_DURATION_FIELD_NUMBER: builtins.int + FREEZE_COUNT_FIELD_NUMBER: builtins.int + TOTAL_FREEZE_DURATION_FIELD_NUMBER: builtins.int + LAST_PACKET_RECEIVED_TIMESTAMP_FIELD_NUMBER: builtins.int + HEADER_BYTES_RECEIVED_FIELD_NUMBER: builtins.int + PACKETS_DISCARDED_FIELD_NUMBER: builtins.int + FEC_BYTES_RECEIVED_FIELD_NUMBER: builtins.int + FEC_PACKETS_RECEIVED_FIELD_NUMBER: builtins.int + FEC_PACKETS_DISCARDED_FIELD_NUMBER: builtins.int + BYTES_RECEIVED_FIELD_NUMBER: builtins.int + NACK_COUNT_FIELD_NUMBER: builtins.int + FIR_COUNT_FIELD_NUMBER: builtins.int + PLI_COUNT_FIELD_NUMBER: builtins.int + TOTAL_PROCESSING_DELAY_FIELD_NUMBER: builtins.int + ESTIMATED_PLAYOUT_TIMESTAMP_FIELD_NUMBER: builtins.int + JITTER_BUFFER_DELAY_FIELD_NUMBER: builtins.int + JITTER_BUFFER_TARGET_DELAY_FIELD_NUMBER: builtins.int + JITTER_BUFFER_EMITTED_COUNT_FIELD_NUMBER: builtins.int + JITTER_BUFFER_MINIMUM_DELAY_FIELD_NUMBER: builtins.int + TOTAL_SAMPLES_RECEIVED_FIELD_NUMBER: builtins.int + CONCEALED_SAMPLES_FIELD_NUMBER: builtins.int + SILENT_CONCEALED_SAMPLES_FIELD_NUMBER: builtins.int + CONCEALMENT_EVENTS_FIELD_NUMBER: builtins.int + INSERTED_SAMPLES_FOR_DECELERATION_FIELD_NUMBER: builtins.int + REMOVED_SAMPLES_FOR_ACCELERATION_FIELD_NUMBER: builtins.int + AUDIO_LEVEL_FIELD_NUMBER: builtins.int + TOTAL_AUDIO_ENERGY_FIELD_NUMBER: builtins.int + TOTAL_SAMPLES_DURATION_FIELD_NUMBER: builtins.int + FRAMES_RECEIVED_FIELD_NUMBER: builtins.int + DECODER_IMPLEMENTATION_FIELD_NUMBER: builtins.int + PLAYOUT_ID_FIELD_NUMBER: builtins.int + POWER_EFFICIENT_DECODER_FIELD_NUMBER: builtins.int + FRAMES_ASSEMBLED_FROM_MULTIPLE_PACKETS_FIELD_NUMBER: builtins.int + TOTAL_ASSEMBLY_TIME_FIELD_NUMBER: builtins.int + RETRANSMITTED_PACKETS_RECEIVED_FIELD_NUMBER: builtins.int + RETRANSMITTED_BYTES_RECEIVED_FIELD_NUMBER: builtins.int + RTX_SSRC_FIELD_NUMBER: builtins.int + FEC_SSRC_FIELD_NUMBER: builtins.int + track_identifier: builtins.str + mid: builtins.str + remote_id: builtins.str + frames_decoded: builtins.int + key_frames_decoded: builtins.int + frames_rendered: builtins.int + frames_dropped: builtins.int + frame_width: builtins.int + frame_height: builtins.int + frames_per_second: builtins.float + qp_sum: builtins.int + total_decode_time: builtins.float + total_inter_frame_delay: builtins.float + total_squared_inter_frame_delay: builtins.float + pause_count: builtins.int + total_pause_duration: builtins.float + freeze_count: builtins.int + total_freeze_duration: builtins.float + last_packet_received_timestamp: builtins.float + header_bytes_received: builtins.int + packets_discarded: builtins.int + fec_bytes_received: builtins.int + fec_packets_received: builtins.int + fec_packets_discarded: builtins.int + bytes_received: builtins.int + nack_count: builtins.int + fir_count: builtins.int + pli_count: builtins.int + total_processing_delay: builtins.float + estimated_playout_timestamp: builtins.float + jitter_buffer_delay: builtins.float + jitter_buffer_target_delay: builtins.float + jitter_buffer_emitted_count: builtins.int + jitter_buffer_minimum_delay: builtins.float + total_samples_received: builtins.int + concealed_samples: builtins.int + silent_concealed_samples: builtins.int + concealment_events: builtins.int + inserted_samples_for_deceleration: builtins.int + removed_samples_for_acceleration: builtins.int + audio_level: builtins.float + total_audio_energy: builtins.float + total_samples_duration: builtins.float + frames_received: builtins.int + decoder_implementation: builtins.str + playout_id: builtins.str + power_efficient_decoder: builtins.bool + frames_assembled_from_multiple_packets: builtins.int + total_assembly_time: builtins.float + retransmitted_packets_received: builtins.int + retransmitted_bytes_received: builtins.int + rtx_ssrc: builtins.int + fec_ssrc: builtins.int + def __init__( + self, + *, + track_identifier: builtins.str = ..., + mid: builtins.str = ..., + remote_id: builtins.str = ..., + frames_decoded: builtins.int = ..., + key_frames_decoded: builtins.int = ..., + frames_rendered: builtins.int = ..., + frames_dropped: builtins.int = ..., + frame_width: builtins.int = ..., + frame_height: builtins.int = ..., + frames_per_second: builtins.float = ..., + qp_sum: builtins.int = ..., + total_decode_time: builtins.float = ..., + total_inter_frame_delay: builtins.float = ..., + total_squared_inter_frame_delay: builtins.float = ..., + pause_count: builtins.int = ..., + total_pause_duration: builtins.float = ..., + freeze_count: builtins.int = ..., + total_freeze_duration: builtins.float = ..., + last_packet_received_timestamp: builtins.float = ..., + header_bytes_received: builtins.int = ..., + packets_discarded: builtins.int = ..., + fec_bytes_received: builtins.int = ..., + fec_packets_received: builtins.int = ..., + fec_packets_discarded: builtins.int = ..., + bytes_received: builtins.int = ..., + nack_count: builtins.int = ..., + fir_count: builtins.int = ..., + pli_count: builtins.int = ..., + total_processing_delay: builtins.float = ..., + estimated_playout_timestamp: builtins.float = ..., + jitter_buffer_delay: builtins.float = ..., + jitter_buffer_target_delay: builtins.float = ..., + jitter_buffer_emitted_count: builtins.int = ..., + jitter_buffer_minimum_delay: builtins.float = ..., + total_samples_received: builtins.int = ..., + concealed_samples: builtins.int = ..., + silent_concealed_samples: builtins.int = ..., + concealment_events: builtins.int = ..., + inserted_samples_for_deceleration: builtins.int = ..., + removed_samples_for_acceleration: builtins.int = ..., + audio_level: builtins.float = ..., + total_audio_energy: builtins.float = ..., + total_samples_duration: builtins.float = ..., + frames_received: builtins.int = ..., + decoder_implementation: builtins.str = ..., + playout_id: builtins.str = ..., + power_efficient_decoder: builtins.bool = ..., + frames_assembled_from_multiple_packets: builtins.int = ..., + total_assembly_time: builtins.float = ..., + retransmitted_packets_received: builtins.int = ..., + retransmitted_bytes_received: builtins.int = ..., + 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: ... + +global___InboundRtpStreamStats = InboundRtpStreamStats + +@typing_extensions.final +class SentRtpStreamStats(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PACKETS_SENT_FIELD_NUMBER: builtins.int + BYTES_SENT_FIELD_NUMBER: builtins.int + packets_sent: builtins.int + bytes_sent: builtins.int + def __init__( + self, + *, + 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: ... + +global___SentRtpStreamStats = SentRtpStreamStats + +@typing_extensions.final +class OutboundRtpStreamStats(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + @typing_extensions.final + class QualityLimitationDurationsEntry(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KEY_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + key: builtins.str + value: builtins.float + def __init__( + self, + *, + key: builtins.str = ..., + value: builtins.float = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ... + + MID_FIELD_NUMBER: builtins.int + MEDIA_SOURCE_ID_FIELD_NUMBER: builtins.int + REMOTE_ID_FIELD_NUMBER: builtins.int + RID_FIELD_NUMBER: builtins.int + HEADER_BYTES_SENT_FIELD_NUMBER: builtins.int + RETRANSMITTED_PACKETS_SENT_FIELD_NUMBER: builtins.int + RETRANSMITTED_BYTES_SENT_FIELD_NUMBER: builtins.int + RTX_SSRC_FIELD_NUMBER: builtins.int + TARGET_BITRATE_FIELD_NUMBER: builtins.int + TOTAL_ENCODED_BYTES_TARGET_FIELD_NUMBER: builtins.int + FRAME_WIDTH_FIELD_NUMBER: builtins.int + FRAME_HEIGHT_FIELD_NUMBER: builtins.int + FRAMES_PER_SECOND_FIELD_NUMBER: builtins.int + FRAMES_SENT_FIELD_NUMBER: builtins.int + HUGE_FRAMES_SENT_FIELD_NUMBER: builtins.int + FRAMES_ENCODED_FIELD_NUMBER: builtins.int + KEY_FRAMES_ENCODED_FIELD_NUMBER: builtins.int + QP_SUM_FIELD_NUMBER: builtins.int + TOTAL_ENCODE_TIME_FIELD_NUMBER: builtins.int + TOTAL_PACKET_SEND_DELAY_FIELD_NUMBER: builtins.int + QUALITY_LIMITATION_REASON_FIELD_NUMBER: builtins.int + QUALITY_LIMITATION_DURATIONS_FIELD_NUMBER: builtins.int + QUALITY_LIMITATION_RESOLUTION_CHANGES_FIELD_NUMBER: builtins.int + NACK_COUNT_FIELD_NUMBER: builtins.int + FIR_COUNT_FIELD_NUMBER: builtins.int + PLI_COUNT_FIELD_NUMBER: builtins.int + ENCODER_IMPLEMENTATION_FIELD_NUMBER: builtins.int + POWER_EFFICIENT_ENCODER_FIELD_NUMBER: builtins.int + ACTIVE_FIELD_NUMBER: builtins.int + SCALIBILITY_MODE_FIELD_NUMBER: builtins.int + mid: builtins.str + media_source_id: builtins.str + remote_id: builtins.str + rid: builtins.str + header_bytes_sent: builtins.int + retransmitted_packets_sent: builtins.int + retransmitted_bytes_sent: builtins.int + rtx_ssrc: builtins.int + target_bitrate: builtins.float + total_encoded_bytes_target: builtins.int + frame_width: builtins.int + frame_height: builtins.int + frames_per_second: builtins.float + frames_sent: builtins.int + huge_frames_sent: builtins.int + frames_encoded: builtins.int + key_frames_encoded: builtins.int + qp_sum: builtins.int + 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 + pli_count: builtins.int + encoder_implementation: builtins.str + power_efficient_encoder: builtins.bool + active: builtins.bool + scalibility_mode: builtins.str + def __init__( + self, + *, + mid: builtins.str = ..., + media_source_id: builtins.str = ..., + remote_id: builtins.str = ..., + rid: builtins.str = ..., + header_bytes_sent: builtins.int = ..., + retransmitted_packets_sent: builtins.int = ..., + retransmitted_bytes_sent: builtins.int = ..., + rtx_ssrc: builtins.int = ..., + target_bitrate: builtins.float = ..., + total_encoded_bytes_target: builtins.int = ..., + frame_width: builtins.int = ..., + frame_height: builtins.int = ..., + frames_per_second: builtins.float = ..., + frames_sent: builtins.int = ..., + huge_frames_sent: builtins.int = ..., + frames_encoded: builtins.int = ..., + key_frames_encoded: builtins.int = ..., + qp_sum: builtins.int = ..., + total_encode_time: builtins.float = ..., + total_packet_send_delay: builtins.float = ..., + quality_limitation_reason: global___QualityLimitationReason.ValueType = ..., + quality_limitation_durations: collections.abc.Mapping[builtins.str, builtins.float] | None = ..., + quality_limitation_resolution_changes: builtins.int = ..., + nack_count: builtins.int = ..., + fir_count: builtins.int = ..., + pli_count: builtins.int = ..., + encoder_implementation: builtins.str = ..., + power_efficient_encoder: builtins.bool = ..., + 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: ... + +global___OutboundRtpStreamStats = OutboundRtpStreamStats + +@typing_extensions.final +class RemoteInboundRtpStreamStats(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + LOCAL_ID_FIELD_NUMBER: builtins.int + ROUND_TRIP_TIME_FIELD_NUMBER: builtins.int + TOTAL_ROUND_TRIP_TIME_FIELD_NUMBER: builtins.int + FRACTION_LOST_FIELD_NUMBER: builtins.int + ROUND_TRIP_TIME_MEASUREMENTS_FIELD_NUMBER: builtins.int + local_id: builtins.str + round_trip_time: builtins.float + total_round_trip_time: builtins.float + fraction_lost: builtins.float + round_trip_time_measurements: builtins.int + def __init__( + self, + *, + local_id: builtins.str = ..., + round_trip_time: builtins.float = ..., + total_round_trip_time: builtins.float = ..., + 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: ... + +global___RemoteInboundRtpStreamStats = RemoteInboundRtpStreamStats + +@typing_extensions.final +class RemoteOutboundRtpStreamStats(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + LOCAL_ID_FIELD_NUMBER: builtins.int + REMOTE_TIMESTAMP_FIELD_NUMBER: builtins.int + REPORTS_SENT_FIELD_NUMBER: builtins.int + ROUND_TRIP_TIME_FIELD_NUMBER: builtins.int + TOTAL_ROUND_TRIP_TIME_FIELD_NUMBER: builtins.int + ROUND_TRIP_TIME_MEASUREMENTS_FIELD_NUMBER: builtins.int + local_id: builtins.str + remote_timestamp: builtins.float + reports_sent: builtins.int + round_trip_time: builtins.float + total_round_trip_time: builtins.float + round_trip_time_measurements: builtins.int + def __init__( + self, + *, + local_id: builtins.str = ..., + remote_timestamp: builtins.float = ..., + reports_sent: builtins.int = ..., + round_trip_time: builtins.float = ..., + 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: ... + +global___RemoteOutboundRtpStreamStats = RemoteOutboundRtpStreamStats + +@typing_extensions.final +class MediaSourceStats(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TRACK_IDENTIFIER_FIELD_NUMBER: builtins.int + KIND_FIELD_NUMBER: builtins.int + track_identifier: builtins.str + kind: builtins.str + def __init__( + self, + *, + 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: ... + +global___MediaSourceStats = MediaSourceStats + +@typing_extensions.final +class AudioSourceStats(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + AUDIO_LEVEL_FIELD_NUMBER: builtins.int + TOTAL_AUDIO_ENERGY_FIELD_NUMBER: builtins.int + TOTAL_SAMPLES_DURATION_FIELD_NUMBER: builtins.int + ECHO_RETURN_LOSS_FIELD_NUMBER: builtins.int + ECHO_RETURN_LOSS_ENHANCEMENT_FIELD_NUMBER: builtins.int + DROPPED_SAMPLES_DURATION_FIELD_NUMBER: builtins.int + DROPPED_SAMPLES_EVENTS_FIELD_NUMBER: builtins.int + TOTAL_CAPTURE_DELAY_FIELD_NUMBER: builtins.int + TOTAL_SAMPLES_CAPTURED_FIELD_NUMBER: builtins.int + audio_level: builtins.float + total_audio_energy: builtins.float + total_samples_duration: builtins.float + echo_return_loss: builtins.float + echo_return_loss_enhancement: builtins.float + dropped_samples_duration: builtins.float + dropped_samples_events: builtins.int + total_capture_delay: builtins.float + total_samples_captured: builtins.int + def __init__( + self, + *, + audio_level: builtins.float = ..., + total_audio_energy: builtins.float = ..., + total_samples_duration: builtins.float = ..., + echo_return_loss: builtins.float = ..., + echo_return_loss_enhancement: builtins.float = ..., + dropped_samples_duration: builtins.float = ..., + dropped_samples_events: builtins.int = ..., + 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: ... + +global___AudioSourceStats = AudioSourceStats + +@typing_extensions.final +class VideoSourceStats(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + WIDTH_FIELD_NUMBER: builtins.int + HEIGHT_FIELD_NUMBER: builtins.int + FRAMES_FIELD_NUMBER: builtins.int + FRAMES_PER_SECOND_FIELD_NUMBER: builtins.int + width: builtins.int + height: builtins.int + frames: builtins.int + frames_per_second: builtins.float + def __init__( + self, + *, + width: builtins.int = ..., + height: builtins.int = ..., + 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: ... + +global___VideoSourceStats = VideoSourceStats + +@typing_extensions.final +class AudioPlayoutStats(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + KIND_FIELD_NUMBER: builtins.int + SYNTHESIZED_SAMPLES_DURATION_FIELD_NUMBER: builtins.int + SYNTHESIZED_SAMPLES_EVENTS_FIELD_NUMBER: builtins.int + TOTAL_SAMPLES_DURATION_FIELD_NUMBER: builtins.int + TOTAL_PLAYOUT_DELAY_FIELD_NUMBER: builtins.int + TOTAL_SAMPLES_COUNT_FIELD_NUMBER: builtins.int + kind: builtins.str + synthesized_samples_duration: builtins.float + synthesized_samples_events: builtins.int + total_samples_duration: builtins.float + total_playout_delay: builtins.float + total_samples_count: builtins.int + def __init__( + self, + *, + kind: builtins.str = ..., + synthesized_samples_duration: builtins.float = ..., + synthesized_samples_events: builtins.int = ..., + total_samples_duration: builtins.float = ..., + 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: ... + +global___AudioPlayoutStats = AudioPlayoutStats + +@typing_extensions.final +class PeerConnectionStats(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + DATA_CHANNELS_OPENED_FIELD_NUMBER: builtins.int + DATA_CHANNELS_CLOSED_FIELD_NUMBER: builtins.int + data_channels_opened: builtins.int + data_channels_closed: builtins.int + def __init__( + self, + *, + 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: ... + +global___PeerConnectionStats = PeerConnectionStats + +@typing_extensions.final +class DataChannelStats(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + LABEL_FIELD_NUMBER: builtins.int + PROTOCOL_FIELD_NUMBER: builtins.int + DATA_CHANNEL_IDENTIFIER_FIELD_NUMBER: builtins.int + STATE_FIELD_NUMBER: builtins.int + MESSAGES_SENT_FIELD_NUMBER: builtins.int + BYTES_SENT_FIELD_NUMBER: builtins.int + MESSAGES_RECEIVED_FIELD_NUMBER: builtins.int + BYTES_RECEIVED_FIELD_NUMBER: builtins.int + label: builtins.str + protocol: builtins.str + data_channel_identifier: builtins.int + state: global___DataChannelState.ValueType + messages_sent: builtins.int + bytes_sent: builtins.int + messages_received: builtins.int + bytes_received: builtins.int + def __init__( + self, + *, + label: builtins.str = ..., + protocol: builtins.str = ..., + data_channel_identifier: builtins.int = ..., + state: global___DataChannelState.ValueType | None = ..., + messages_sent: builtins.int = ..., + bytes_sent: builtins.int = ..., + 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: ... + +global___DataChannelStats = DataChannelStats + +@typing_extensions.final +class TransportStats(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PACKETS_SENT_FIELD_NUMBER: builtins.int + PACKETS_RECEIVED_FIELD_NUMBER: builtins.int + BYTES_SENT_FIELD_NUMBER: builtins.int + BYTES_RECEIVED_FIELD_NUMBER: builtins.int + ICE_ROLE_FIELD_NUMBER: builtins.int + ICE_LOCAL_USERNAME_FRAGMENT_FIELD_NUMBER: builtins.int + DTLS_STATE_FIELD_NUMBER: builtins.int + ICE_STATE_FIELD_NUMBER: builtins.int + SELECTED_CANDIDATE_PAIR_ID_FIELD_NUMBER: builtins.int + LOCAL_CERTIFICATE_ID_FIELD_NUMBER: builtins.int + REMOTE_CERTIFICATE_ID_FIELD_NUMBER: builtins.int + TLS_VERSION_FIELD_NUMBER: builtins.int + DTLS_CIPHER_FIELD_NUMBER: builtins.int + DTLS_ROLE_FIELD_NUMBER: builtins.int + SRTP_CIPHER_FIELD_NUMBER: builtins.int + SELECTED_CANDIDATE_PAIR_CHANGES_FIELD_NUMBER: builtins.int + packets_sent: builtins.int + packets_received: builtins.int + bytes_sent: builtins.int + bytes_received: builtins.int + ice_role: global___IceRole.ValueType + ice_local_username_fragment: builtins.str + dtls_state: global___DtlsTransportState.ValueType + ice_state: global___IceTransportState.ValueType + selected_candidate_pair_id: builtins.str + local_certificate_id: builtins.str + remote_certificate_id: builtins.str + tls_version: builtins.str + dtls_cipher: builtins.str + dtls_role: global___DtlsRole.ValueType + srtp_cipher: builtins.str + selected_candidate_pair_changes: builtins.int + def __init__( + self, + *, + packets_sent: builtins.int = ..., + packets_received: builtins.int = ..., + bytes_sent: builtins.int = ..., + bytes_received: builtins.int = ..., + ice_role: global___IceRole.ValueType = ..., + ice_local_username_fragment: builtins.str = ..., + dtls_state: global___DtlsTransportState.ValueType | None = ..., + ice_state: global___IceTransportState.ValueType | None = ..., + selected_candidate_pair_id: builtins.str = ..., + local_certificate_id: builtins.str = ..., + remote_certificate_id: builtins.str = ..., + tls_version: builtins.str = ..., + dtls_cipher: builtins.str = ..., + dtls_role: global___DtlsRole.ValueType = ..., + 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: ... + @typing.overload + def WhichOneof(self, oneof_group: typing_extensions.Literal["_dtls_state", b"_dtls_state"]) -> typing_extensions.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: ... + +global___TransportStats = TransportStats + +@typing_extensions.final +class CandidatePairStats(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TRANSPORT_ID_FIELD_NUMBER: builtins.int + LOCAL_CANDIDATE_ID_FIELD_NUMBER: builtins.int + REMOTE_CANDIDATE_ID_FIELD_NUMBER: builtins.int + STATE_FIELD_NUMBER: builtins.int + NOMINATED_FIELD_NUMBER: builtins.int + PACKETS_SENT_FIELD_NUMBER: builtins.int + PACKETS_RECEIVED_FIELD_NUMBER: builtins.int + BYTES_SENT_FIELD_NUMBER: builtins.int + BYTES_RECEIVED_FIELD_NUMBER: builtins.int + LAST_PACKET_SENT_TIMESTAMP_FIELD_NUMBER: builtins.int + LAST_PACKET_RECEIVED_TIMESTAMP_FIELD_NUMBER: builtins.int + TOTAL_ROUND_TRIP_TIME_FIELD_NUMBER: builtins.int + CURRENT_ROUND_TRIP_TIME_FIELD_NUMBER: builtins.int + AVAILABLE_OUTGOING_BITRATE_FIELD_NUMBER: builtins.int + AVAILABLE_INCOMING_BITRATE_FIELD_NUMBER: builtins.int + REQUESTS_RECEIVED_FIELD_NUMBER: builtins.int + REQUESTS_SENT_FIELD_NUMBER: builtins.int + RESPONSES_RECEIVED_FIELD_NUMBER: builtins.int + RESPONSES_SENT_FIELD_NUMBER: builtins.int + CONSENT_REQUESTS_SENT_FIELD_NUMBER: builtins.int + PACKETS_DISCARDED_ON_SEND_FIELD_NUMBER: builtins.int + BYTES_DISCARDED_ON_SEND_FIELD_NUMBER: builtins.int + transport_id: builtins.str + local_candidate_id: builtins.str + remote_candidate_id: builtins.str + state: global___IceCandidatePairState.ValueType + nominated: builtins.bool + packets_sent: builtins.int + packets_received: builtins.int + bytes_sent: builtins.int + bytes_received: builtins.int + last_packet_sent_timestamp: builtins.float + last_packet_received_timestamp: builtins.float + total_round_trip_time: builtins.float + current_round_trip_time: builtins.float + available_outgoing_bitrate: builtins.float + available_incoming_bitrate: builtins.float + requests_received: builtins.int + requests_sent: builtins.int + responses_received: builtins.int + responses_sent: builtins.int + consent_requests_sent: builtins.int + packets_discarded_on_send: builtins.int + bytes_discarded_on_send: builtins.int + def __init__( + self, + *, + transport_id: builtins.str = ..., + local_candidate_id: builtins.str = ..., + remote_candidate_id: builtins.str = ..., + state: global___IceCandidatePairState.ValueType | None = ..., + nominated: builtins.bool = ..., + packets_sent: builtins.int = ..., + packets_received: builtins.int = ..., + bytes_sent: builtins.int = ..., + bytes_received: builtins.int = ..., + last_packet_sent_timestamp: builtins.float = ..., + last_packet_received_timestamp: builtins.float = ..., + total_round_trip_time: builtins.float = ..., + current_round_trip_time: builtins.float = ..., + available_outgoing_bitrate: builtins.float = ..., + available_incoming_bitrate: builtins.float = ..., + requests_received: builtins.int = ..., + requests_sent: builtins.int = ..., + responses_received: builtins.int = ..., + responses_sent: builtins.int = ..., + consent_requests_sent: builtins.int = ..., + 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: ... + +global___CandidatePairStats = CandidatePairStats + +@typing_extensions.final +class IceCandidateStats(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TRANSPORT_ID_FIELD_NUMBER: builtins.int + ADDRESS_FIELD_NUMBER: builtins.int + PORT_FIELD_NUMBER: builtins.int + PROTOCOL_FIELD_NUMBER: builtins.int + CANDIDATE_TYPE_FIELD_NUMBER: builtins.int + PRIORITY_FIELD_NUMBER: builtins.int + URL_FIELD_NUMBER: builtins.int + RELAY_PROTOCOL_FIELD_NUMBER: builtins.int + FOUNDATION_FIELD_NUMBER: builtins.int + RELATED_ADDRESS_FIELD_NUMBER: builtins.int + RELATED_PORT_FIELD_NUMBER: builtins.int + USERNAME_FRAGMENT_FIELD_NUMBER: builtins.int + TCP_TYPE_FIELD_NUMBER: builtins.int + transport_id: builtins.str + address: builtins.str + port: builtins.int + protocol: builtins.str + candidate_type: global___IceCandidateType.ValueType + priority: builtins.int + url: builtins.str + relay_protocol: global___IceServerTransportProtocol.ValueType + foundation: builtins.str + related_address: builtins.str + related_port: builtins.int + username_fragment: builtins.str + tcp_type: global___IceTcpCandidateType.ValueType + def __init__( + self, + *, + transport_id: builtins.str = ..., + address: builtins.str = ..., + port: builtins.int = ..., + protocol: builtins.str = ..., + candidate_type: global___IceCandidateType.ValueType | None = ..., + priority: builtins.int = ..., + url: builtins.str = ..., + relay_protocol: global___IceServerTransportProtocol.ValueType | None = ..., + foundation: builtins.str = ..., + related_address: builtins.str = ..., + related_port: builtins.int = ..., + 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: ... + @typing.overload + def WhichOneof(self, oneof_group: typing_extensions.Literal["_candidate_type", b"_candidate_type"]) -> typing_extensions.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: ... + @typing.overload + def WhichOneof(self, oneof_group: typing_extensions.Literal["_tcp_type", b"_tcp_type"]) -> typing_extensions.Literal["tcp_type"] | None: ... + +global___IceCandidateStats = IceCandidateStats + +@typing_extensions.final +class CertificateStats(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + FINGERPRINT_FIELD_NUMBER: builtins.int + FINGERPRINT_ALGORITHM_FIELD_NUMBER: builtins.int + BASE64_CERTIFICATE_FIELD_NUMBER: builtins.int + ISSUER_CERTIFICATE_ID_FIELD_NUMBER: builtins.int + fingerprint: builtins.str + fingerprint_algorithm: builtins.str + base64_certificate: builtins.str + issuer_certificate_id: builtins.str + def __init__( + self, + *, + fingerprint: builtins.str = ..., + fingerprint_algorithm: builtins.str = ..., + 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: ... + +global___CertificateStats = CertificateStats diff --git a/livekit-rtc/livekit/rtc/_proto/track_pb2.py b/livekit-rtc/livekit/rtc/_proto/track_pb2.py new file mode 100644 index 00000000..39a25ebf --- /dev/null +++ b/livekit-rtc/livekit/rtc/_proto/track_pb2.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: track.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() + + +from . import e2ee_pb2 as e2ee__pb2 +from . import handle_pb2 as handle__pb2 +from . import stats_pb2 as stats__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0btrack.proto\x12\rlivekit.proto\x1a\ne2ee.proto\x1a\x0chandle.proto\x1a\x0bstats.proto\">\n\x17\x43reateVideoTrackRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rsource_handle\x18\x02 \x01(\x04\"D\n\x18\x43reateVideoTrackResponse\x12(\n\x05track\x18\x01 \x01(\x0b\x32\x19.livekit.proto.OwnedTrack\">\n\x17\x43reateAudioTrackRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rsource_handle\x18\x02 \x01(\x04\"D\n\x18\x43reateAudioTrackResponse\x12(\n\x05track\x18\x01 \x01(\x0b\x32\x19.livekit.proto.OwnedTrack\"\'\n\x0fGetStatsRequest\x12\x14\n\x0ctrack_handle\x18\x01 \x01(\x04\"$\n\x10GetStatsResponse\x12\x10\n\x08\x61sync_id\x18\x01 \x01(\x04\"j\n\x10GetStatsCallback\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\x05stats\x18\x03 \x03(\x0b\x32\x17.livekit.proto.RtcStatsB\x08\n\x06_error\"\x0c\n\nTrackEvent\"\xa3\x02\n\x14TrackPublicationInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12&\n\x04kind\x18\x03 \x01(\x0e\x32\x18.livekit.proto.TrackKind\x12*\n\x06source\x18\x04 \x01(\x0e\x32\x1a.livekit.proto.TrackSource\x12\x13\n\x0bsimulcasted\x18\x05 \x01(\x08\x12\r\n\x05width\x18\x06 \x01(\r\x12\x0e\n\x06height\x18\x07 \x01(\r\x12\x11\n\tmime_type\x18\x08 \x01(\t\x12\r\n\x05muted\x18\t \x01(\x08\x12\x0e\n\x06remote\x18\n \x01(\x08\x12\x36\n\x0f\x65ncryption_type\x18\x0b \x01(\x0e\x32\x1d.livekit.proto.EncryptionType\"y\n\x15OwnedTrackPublication\x12-\n\x06handle\x18\x01 \x01(\x0b\x32\x1d.livekit.proto.FfiOwnedHandle\x12\x31\n\x04info\x18\x02 \x01(\x0b\x32#.livekit.proto.TrackPublicationInfo\"\x9f\x01\n\tTrackInfo\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12&\n\x04kind\x18\x03 \x01(\x0e\x32\x18.livekit.proto.TrackKind\x12\x30\n\x0cstream_state\x18\x04 \x01(\x0e\x32\x1a.livekit.proto.StreamState\x12\r\n\x05muted\x18\x05 \x01(\x08\x12\x0e\n\x06remote\x18\x06 \x01(\x08\"c\n\nOwnedTrack\x12-\n\x06handle\x18\x01 \x01(\x0b\x32\x1d.livekit.proto.FfiOwnedHandle\x12&\n\x04info\x18\x02 \x01(\x0b\x32\x18.livekit.proto.TrackInfo*=\n\tTrackKind\x12\x10\n\x0cKIND_UNKNOWN\x10\x00\x12\x0e\n\nKIND_AUDIO\x10\x01\x12\x0e\n\nKIND_VIDEO\x10\x02*\x81\x01\n\x0bTrackSource\x12\x12\n\x0eSOURCE_UNKNOWN\x10\x00\x12\x11\n\rSOURCE_CAMERA\x10\x01\x12\x15\n\x11SOURCE_MICROPHONE\x10\x02\x12\x16\n\x12SOURCE_SCREENSHARE\x10\x03\x12\x1c\n\x18SOURCE_SCREENSHARE_AUDIO\x10\x04*D\n\x0bStreamState\x12\x11\n\rSTATE_UNKNOWN\x10\x00\x12\x10\n\x0cSTATE_ACTIVE\x10\x01\x12\x10\n\x0cSTATE_PAUSED\x10\x02\x42\x10\xaa\x02\rLiveKit.Protob\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'track_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + 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 + _globals['_TRACKSOURCE']._serialized_end=1411 + _globals['_STREAMSTATE']._serialized_start=1413 + _globals['_STREAMSTATE']._serialized_end=1481 + _globals['_CREATEVIDEOTRACKREQUEST']._serialized_start=69 + _globals['_CREATEVIDEOTRACKREQUEST']._serialized_end=131 + _globals['_CREATEVIDEOTRACKRESPONSE']._serialized_start=133 + _globals['_CREATEVIDEOTRACKRESPONSE']._serialized_end=201 + _globals['_CREATEAUDIOTRACKREQUEST']._serialized_start=203 + _globals['_CREATEAUDIOTRACKREQUEST']._serialized_end=265 + _globals['_CREATEAUDIOTRACKRESPONSE']._serialized_start=267 + _globals['_CREATEAUDIOTRACKRESPONSE']._serialized_end=335 + _globals['_GETSTATSREQUEST']._serialized_start=337 + _globals['_GETSTATSREQUEST']._serialized_end=376 + _globals['_GETSTATSRESPONSE']._serialized_start=378 + _globals['_GETSTATSRESPONSE']._serialized_end=414 + _globals['_GETSTATSCALLBACK']._serialized_start=416 + _globals['_GETSTATSCALLBACK']._serialized_end=522 + _globals['_TRACKEVENT']._serialized_start=524 + _globals['_TRACKEVENT']._serialized_end=536 + _globals['_TRACKPUBLICATIONINFO']._serialized_start=539 + _globals['_TRACKPUBLICATIONINFO']._serialized_end=830 + _globals['_OWNEDTRACKPUBLICATION']._serialized_start=832 + _globals['_OWNEDTRACKPUBLICATION']._serialized_end=953 + _globals['_TRACKINFO']._serialized_start=956 + _globals['_TRACKINFO']._serialized_end=1115 + _globals['_OWNEDTRACK']._serialized_start=1117 + _globals['_OWNEDTRACK']._serialized_end=1216 +# @@protoc_insertion_point(module_scope) diff --git a/livekit-rtc/livekit/rtc/_proto/track_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/track_pb2.pyi new file mode 100644 index 00000000..2a687298 --- /dev/null +++ b/livekit-rtc/livekit/rtc/_proto/track_pb2.pyi @@ -0,0 +1,349 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +Copyright 2023 LiveKit, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" +import builtins +import collections.abc +from . import e2ee_pb2 +import google.protobuf.descriptor +import google.protobuf.internal.containers +import google.protobuf.internal.enum_type_wrapper +import google.protobuf.message +from . import handle_pb2 +from . import stats_pb2 +import sys +import typing + +if sys.version_info >= (3, 10): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +class _TrackKind: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _TrackKindEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_TrackKind.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + KIND_UNKNOWN: _TrackKind.ValueType # 0 + KIND_AUDIO: _TrackKind.ValueType # 1 + KIND_VIDEO: _TrackKind.ValueType # 2 + +class TrackKind(_TrackKind, metaclass=_TrackKindEnumTypeWrapper): ... + +KIND_UNKNOWN: TrackKind.ValueType # 0 +KIND_AUDIO: TrackKind.ValueType # 1 +KIND_VIDEO: TrackKind.ValueType # 2 +global___TrackKind = TrackKind + +class _TrackSource: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _TrackSourceEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_TrackSource.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + SOURCE_UNKNOWN: _TrackSource.ValueType # 0 + SOURCE_CAMERA: _TrackSource.ValueType # 1 + SOURCE_MICROPHONE: _TrackSource.ValueType # 2 + SOURCE_SCREENSHARE: _TrackSource.ValueType # 3 + SOURCE_SCREENSHARE_AUDIO: _TrackSource.ValueType # 4 + +class TrackSource(_TrackSource, metaclass=_TrackSourceEnumTypeWrapper): ... + +SOURCE_UNKNOWN: TrackSource.ValueType # 0 +SOURCE_CAMERA: TrackSource.ValueType # 1 +SOURCE_MICROPHONE: TrackSource.ValueType # 2 +SOURCE_SCREENSHARE: TrackSource.ValueType # 3 +SOURCE_SCREENSHARE_AUDIO: TrackSource.ValueType # 4 +global___TrackSource = TrackSource + +class _StreamState: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _StreamStateEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_StreamState.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + STATE_UNKNOWN: _StreamState.ValueType # 0 + STATE_ACTIVE: _StreamState.ValueType # 1 + STATE_PAUSED: _StreamState.ValueType # 2 + +class StreamState(_StreamState, metaclass=_StreamStateEnumTypeWrapper): ... + +STATE_UNKNOWN: StreamState.ValueType # 0 +STATE_ACTIVE: StreamState.ValueType # 1 +STATE_PAUSED: StreamState.ValueType # 2 +global___StreamState = StreamState + +@typing_extensions.final +class CreateVideoTrackRequest(google.protobuf.message.Message): + """Create a new VideoTrack from a VideoSource""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAME_FIELD_NUMBER: builtins.int + SOURCE_HANDLE_FIELD_NUMBER: builtins.int + name: builtins.str + source_handle: builtins.int + def __init__( + self, + *, + 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: ... + +global___CreateVideoTrackRequest = CreateVideoTrackRequest + +@typing_extensions.final +class CreateVideoTrackResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TRACK_FIELD_NUMBER: builtins.int + @property + def track(self) -> global___OwnedTrack: ... + def __init__( + self, + *, + 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: ... + +global___CreateVideoTrackResponse = CreateVideoTrackResponse + +@typing_extensions.final +class CreateAudioTrackRequest(google.protobuf.message.Message): + """Create a new AudioTrack from a AudioSource""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NAME_FIELD_NUMBER: builtins.int + SOURCE_HANDLE_FIELD_NUMBER: builtins.int + name: builtins.str + source_handle: builtins.int + def __init__( + self, + *, + 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: ... + +global___CreateAudioTrackRequest = CreateAudioTrackRequest + +@typing_extensions.final +class CreateAudioTrackResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TRACK_FIELD_NUMBER: builtins.int + @property + def track(self) -> global___OwnedTrack: ... + def __init__( + self, + *, + 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: ... + +global___CreateAudioTrackResponse = CreateAudioTrackResponse + +@typing_extensions.final +class GetStatsRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TRACK_HANDLE_FIELD_NUMBER: builtins.int + track_handle: builtins.int + def __init__( + self, + *, + track_handle: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["track_handle", b"track_handle"]) -> None: ... + +global___GetStatsRequest = GetStatsRequest + +@typing_extensions.final +class GetStatsResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + async_id: builtins.int + def __init__( + self, + *, + async_id: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["async_id", b"async_id"]) -> None: ... + +global___GetStatsResponse = GetStatsResponse + +@typing_extensions.final +class GetStatsCallback(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ASYNC_ID_FIELD_NUMBER: builtins.int + ERROR_FIELD_NUMBER: builtins.int + STATS_FIELD_NUMBER: builtins.int + async_id: builtins.int + error: builtins.str + @property + def stats(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[stats_pb2.RtcStats]: ... + def __init__( + self, + *, + async_id: builtins.int = ..., + 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: ... + +global___GetStatsCallback = GetStatsCallback + +@typing_extensions.final +class TrackEvent(google.protobuf.message.Message): + """ + Track + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___TrackEvent = TrackEvent + +@typing_extensions.final +class TrackPublicationInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SID_FIELD_NUMBER: builtins.int + NAME_FIELD_NUMBER: builtins.int + KIND_FIELD_NUMBER: builtins.int + SOURCE_FIELD_NUMBER: builtins.int + SIMULCASTED_FIELD_NUMBER: builtins.int + WIDTH_FIELD_NUMBER: builtins.int + HEIGHT_FIELD_NUMBER: builtins.int + MIME_TYPE_FIELD_NUMBER: builtins.int + MUTED_FIELD_NUMBER: builtins.int + REMOTE_FIELD_NUMBER: builtins.int + ENCRYPTION_TYPE_FIELD_NUMBER: builtins.int + sid: builtins.str + name: builtins.str + kind: global___TrackKind.ValueType + source: global___TrackSource.ValueType + simulcasted: builtins.bool + width: builtins.int + height: builtins.int + mime_type: builtins.str + muted: builtins.bool + remote: builtins.bool + encryption_type: e2ee_pb2.EncryptionType.ValueType + def __init__( + self, + *, + sid: builtins.str = ..., + name: builtins.str = ..., + kind: global___TrackKind.ValueType = ..., + source: global___TrackSource.ValueType = ..., + simulcasted: builtins.bool = ..., + width: builtins.int = ..., + height: builtins.int = ..., + mime_type: builtins.str = ..., + muted: builtins.bool = ..., + 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: ... + +global___TrackPublicationInfo = TrackPublicationInfo + +@typing_extensions.final +class OwnedTrackPublication(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + HANDLE_FIELD_NUMBER: builtins.int + INFO_FIELD_NUMBER: builtins.int + @property + def handle(self) -> handle_pb2.FfiOwnedHandle: ... + @property + def info(self) -> global___TrackPublicationInfo: ... + def __init__( + self, + *, + 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: ... + +global___OwnedTrackPublication = OwnedTrackPublication + +@typing_extensions.final +class TrackInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SID_FIELD_NUMBER: builtins.int + NAME_FIELD_NUMBER: builtins.int + KIND_FIELD_NUMBER: builtins.int + STREAM_STATE_FIELD_NUMBER: builtins.int + MUTED_FIELD_NUMBER: builtins.int + REMOTE_FIELD_NUMBER: builtins.int + sid: builtins.str + name: builtins.str + kind: global___TrackKind.ValueType + stream_state: global___StreamState.ValueType + muted: builtins.bool + remote: builtins.bool + def __init__( + self, + *, + sid: builtins.str = ..., + name: builtins.str = ..., + kind: global___TrackKind.ValueType = ..., + stream_state: global___StreamState.ValueType = ..., + 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: ... + +global___TrackInfo = TrackInfo + +@typing_extensions.final +class OwnedTrack(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + HANDLE_FIELD_NUMBER: builtins.int + INFO_FIELD_NUMBER: builtins.int + @property + def handle(self) -> handle_pb2.FfiOwnedHandle: ... + @property + def info(self) -> global___TrackInfo: ... + def __init__( + self, + *, + 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: ... + +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 new file mode 100644 index 00000000..74124674 --- /dev/null +++ b/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.py @@ -0,0 +1,94 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: video_frame.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() + + +from . import handle_pb2 as handle__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11video_frame.proto\x12\rlivekit.proto\x1a\x0chandle.proto\"k\n\x17\x41llocVideoBufferRequest\x12\x31\n\x04type\x18\x01 \x01(\x0e\x32#.livekit.proto.VideoFrameBufferType\x12\r\n\x05width\x18\x02 \x01(\r\x12\x0e\n\x06height\x18\x03 \x01(\r\"P\n\x18\x41llocVideoBufferResponse\x12\x34\n\x06\x62uffer\x18\x01 \x01(\x0b\x32$.livekit.proto.OwnedVideoFrameBuffer\"[\n\x15NewVideoStreamRequest\x12\x14\n\x0ctrack_handle\x18\x01 \x01(\x04\x12,\n\x04type\x18\x02 \x01(\x0e\x32\x1e.livekit.proto.VideoStreamType\"I\n\x16NewVideoStreamResponse\x12/\n\x06stream\x18\x01 \x01(\x0b\x32\x1f.livekit.proto.OwnedVideoStream\"\x7f\n\x15NewVideoSourceRequest\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.livekit.proto.VideoSourceType\x12\x38\n\nresolution\x18\x02 \x01(\x0b\x32$.livekit.proto.VideoSourceResolution\"I\n\x16NewVideoSourceResponse\x12/\n\x06source\x18\x01 \x01(\x0b\x32\x1f.livekit.proto.OwnedVideoSource\"\xae\x01\n\x18\x43\x61ptureVideoFrameRequest\x12\x15\n\rsource_handle\x18\x01 \x01(\x04\x12,\n\x05\x66rame\x18\x02 \x01(\x0b\x32\x1d.livekit.proto.VideoFrameInfo\x12\x33\n\x04info\x18\x03 \x01(\x0b\x32#.livekit.proto.VideoFrameBufferInfoH\x00\x12\x10\n\x06handle\x18\x04 \x01(\x04H\x00\x42\x06\n\x04\x66rom\"\x1b\n\x19\x43\x61ptureVideoFrameResponse\"\x9f\x01\n\rToI420Request\x12\x0e\n\x06\x66lip_y\x18\x01 \x01(\x08\x12-\n\x04\x61rgb\x18\x02 \x01(\x0b\x32\x1d.livekit.proto.ArgbBufferInfoH\x00\x12\x35\n\x06\x62uffer\x18\x03 \x01(\x0b\x32#.livekit.proto.VideoFrameBufferInfoH\x00\x12\x10\n\x06handle\x18\x04 \x01(\x04H\x00\x42\x06\n\x04\x66rom\"F\n\x0eToI420Response\x12\x34\n\x06\x62uffer\x18\x01 \x01(\x0b\x32$.livekit.proto.OwnedVideoFrameBuffer\"\xd4\x01\n\rToArgbRequest\x12\x33\n\x06\x62uffer\x18\x01 \x01(\x0b\x32#.livekit.proto.VideoFrameBufferInfo\x12\x0f\n\x07\x64st_ptr\x18\x02 \x01(\x04\x12\x32\n\ndst_format\x18\x03 \x01(\x0e\x32\x1e.livekit.proto.VideoFormatType\x12\x12\n\ndst_stride\x18\x04 \x01(\r\x12\x11\n\tdst_width\x18\x05 \x01(\r\x12\x12\n\ndst_height\x18\x06 \x01(\r\x12\x0e\n\x06\x66lip_y\x18\x07 \x01(\x08\"\x10\n\x0eToArgbResponse\"D\n\x0fVideoResolution\x12\r\n\x05width\x18\x01 \x01(\r\x12\x0e\n\x06height\x18\x02 \x01(\r\x12\x12\n\nframe_rate\x18\x03 \x01(\x01\"|\n\x0e\x41rgbBufferInfo\x12\x0b\n\x03ptr\x18\x01 \x01(\x04\x12.\n\x06\x66ormat\x18\x02 \x01(\x0e\x32\x1e.livekit.proto.VideoFormatType\x12\x0e\n\x06stride\x18\x03 \x01(\r\x12\r\n\x05width\x18\x04 \x01(\r\x12\x0e\n\x06height\x18\x05 \x01(\r\"V\n\x0eVideoFrameInfo\x12\x14\n\x0ctimestamp_us\x18\x01 \x01(\x03\x12.\n\x08rotation\x18\x02 \x01(\x0e\x32\x1c.livekit.proto.VideoRotation\"\x97\x02\n\x14VideoFrameBufferInfo\x12\x38\n\x0b\x62uffer_type\x18\x01 \x01(\x0e\x32#.livekit.proto.VideoFrameBufferType\x12\r\n\x05width\x18\x02 \x01(\r\x12\x0e\n\x06height\x18\x03 \x01(\r\x12\x31\n\x03yuv\x18\x04 \x01(\x0b\x32\".livekit.proto.PlanarYuvBufferInfoH\x00\x12\x36\n\x06\x62i_yuv\x18\x05 \x01(\x0b\x32$.livekit.proto.BiplanarYuvBufferInfoH\x00\x12\x31\n\x06native\x18\x06 \x01(\x0b\x32\x1f.livekit.proto.NativeBufferInfoH\x00\x42\x08\n\x06\x62uffer\"y\n\x15OwnedVideoFrameBuffer\x12-\n\x06handle\x18\x01 \x01(\x0b\x32\x1d.livekit.proto.FfiOwnedHandle\x12\x31\n\x04info\x18\x02 \x01(\x0b\x32#.livekit.proto.VideoFrameBufferInfo\"\xda\x01\n\x13PlanarYuvBufferInfo\x12\x14\n\x0c\x63hroma_width\x18\x01 \x01(\r\x12\x15\n\rchroma_height\x18\x02 \x01(\r\x12\x10\n\x08stride_y\x18\x03 \x01(\r\x12\x10\n\x08stride_u\x18\x04 \x01(\r\x12\x10\n\x08stride_v\x18\x05 \x01(\r\x12\x10\n\x08stride_a\x18\x06 \x01(\r\x12\x12\n\ndata_y_ptr\x18\x07 \x01(\x04\x12\x12\n\ndata_u_ptr\x18\x08 \x01(\x04\x12\x12\n\ndata_v_ptr\x18\t \x01(\x04\x12\x12\n\ndata_a_ptr\x18\n \x01(\x04\"\x92\x01\n\x15\x42iplanarYuvBufferInfo\x12\x14\n\x0c\x63hroma_width\x18\x01 \x01(\r\x12\x15\n\rchroma_height\x18\x02 \x01(\r\x12\x10\n\x08stride_y\x18\x03 \x01(\r\x12\x11\n\tstride_uv\x18\x04 \x01(\r\x12\x12\n\ndata_y_ptr\x18\x05 \x01(\x04\x12\x13\n\x0b\x64\x61ta_uv_ptr\x18\x06 \x01(\x04\"\x12\n\x10NativeBufferInfo\"?\n\x0fVideoStreamInfo\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.livekit.proto.VideoStreamType\"o\n\x10OwnedVideoStream\x12-\n\x06handle\x18\x01 \x01(\x0b\x32\x1d.livekit.proto.FfiOwnedHandle\x12,\n\x04info\x18\x02 \x01(\x0b\x32\x1e.livekit.proto.VideoStreamInfo\"\x9f\x01\n\x10VideoStreamEvent\x12\x15\n\rstream_handle\x18\x01 \x01(\x04\x12;\n\x0e\x66rame_received\x18\x02 \x01(\x0b\x32!.livekit.proto.VideoFrameReceivedH\x00\x12,\n\x03\x65os\x18\x03 \x01(\x0b\x32\x1d.livekit.proto.VideoStreamEOSH\x00\x42\t\n\x07message\"x\n\x12VideoFrameReceived\x12,\n\x05\x66rame\x18\x01 \x01(\x0b\x32\x1d.livekit.proto.VideoFrameInfo\x12\x34\n\x06\x62uffer\x18\x02 \x01(\x0b\x32$.livekit.proto.OwnedVideoFrameBuffer\"\x10\n\x0eVideoStreamEOS\"6\n\x15VideoSourceResolution\x12\r\n\x05width\x18\x01 \x01(\r\x12\x0e\n\x06height\x18\x02 \x01(\r\"?\n\x0fVideoSourceInfo\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.livekit.proto.VideoSourceType\"o\n\x10OwnedVideoSource\x12-\n\x06handle\x18\x01 \x01(\x0b\x32\x1d.livekit.proto.FfiOwnedHandle\x12,\n\x04info\x18\x02 \x01(\x0b\x32\x1e.livekit.proto.VideoSourceInfo*(\n\nVideoCodec\x12\x07\n\x03VP8\x10\x00\x12\x08\n\x04H264\x10\x01\x12\x07\n\x03\x41V1\x10\x02*l\n\rVideoRotation\x12\x14\n\x10VIDEO_ROTATION_0\x10\x00\x12\x15\n\x11VIDEO_ROTATION_90\x10\x01\x12\x16\n\x12VIDEO_ROTATION_180\x10\x02\x12\x16\n\x12VIDEO_ROTATION_270\x10\x03*U\n\x0fVideoFormatType\x12\x0f\n\x0b\x46ORMAT_ARGB\x10\x00\x12\x0f\n\x0b\x46ORMAT_BGRA\x10\x01\x12\x0f\n\x0b\x46ORMAT_ABGR\x10\x02\x12\x0f\n\x0b\x46ORMAT_RGBA\x10\x03*_\n\x14VideoFrameBufferType\x12\n\n\x06NATIVE\x10\x00\x12\x08\n\x04I420\x10\x01\x12\t\n\x05I420A\x10\x02\x12\x08\n\x04I422\x10\x03\x12\x08\n\x04I444\x10\x04\x12\x08\n\x04I010\x10\x05\x12\x08\n\x04NV12\x10\x06*Y\n\x0fVideoStreamType\x12\x17\n\x13VIDEO_STREAM_NATIVE\x10\x00\x12\x16\n\x12VIDEO_STREAM_WEBGL\x10\x01\x12\x15\n\x11VIDEO_STREAM_HTML\x10\x02**\n\x0fVideoSourceType\x12\x17\n\x13VIDEO_SOURCE_NATIVE\x10\x00\x42\x10\xaa\x02\rLiveKit.Protob\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'video_frame_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\252\002\rLiveKit.Proto' + _globals['_VIDEOCODEC']._serialized_start=3079 + _globals['_VIDEOCODEC']._serialized_end=3119 + _globals['_VIDEOROTATION']._serialized_start=3121 + _globals['_VIDEOROTATION']._serialized_end=3229 + _globals['_VIDEOFORMATTYPE']._serialized_start=3231 + _globals['_VIDEOFORMATTYPE']._serialized_end=3316 + _globals['_VIDEOFRAMEBUFFERTYPE']._serialized_start=3318 + _globals['_VIDEOFRAMEBUFFERTYPE']._serialized_end=3413 + _globals['_VIDEOSTREAMTYPE']._serialized_start=3415 + _globals['_VIDEOSTREAMTYPE']._serialized_end=3504 + _globals['_VIDEOSOURCETYPE']._serialized_start=3506 + _globals['_VIDEOSOURCETYPE']._serialized_end=3548 + _globals['_ALLOCVIDEOBUFFERREQUEST']._serialized_start=50 + _globals['_ALLOCVIDEOBUFFERREQUEST']._serialized_end=157 + _globals['_ALLOCVIDEOBUFFERRESPONSE']._serialized_start=159 + _globals['_ALLOCVIDEOBUFFERRESPONSE']._serialized_end=239 + _globals['_NEWVIDEOSTREAMREQUEST']._serialized_start=241 + _globals['_NEWVIDEOSTREAMREQUEST']._serialized_end=332 + _globals['_NEWVIDEOSTREAMRESPONSE']._serialized_start=334 + _globals['_NEWVIDEOSTREAMRESPONSE']._serialized_end=407 + _globals['_NEWVIDEOSOURCEREQUEST']._serialized_start=409 + _globals['_NEWVIDEOSOURCEREQUEST']._serialized_end=536 + _globals['_NEWVIDEOSOURCERESPONSE']._serialized_start=538 + _globals['_NEWVIDEOSOURCERESPONSE']._serialized_end=611 + _globals['_CAPTUREVIDEOFRAMEREQUEST']._serialized_start=614 + _globals['_CAPTUREVIDEOFRAMEREQUEST']._serialized_end=788 + _globals['_CAPTUREVIDEOFRAMERESPONSE']._serialized_start=790 + _globals['_CAPTUREVIDEOFRAMERESPONSE']._serialized_end=817 + _globals['_TOI420REQUEST']._serialized_start=820 + _globals['_TOI420REQUEST']._serialized_end=979 + _globals['_TOI420RESPONSE']._serialized_start=981 + _globals['_TOI420RESPONSE']._serialized_end=1051 + _globals['_TOARGBREQUEST']._serialized_start=1054 + _globals['_TOARGBREQUEST']._serialized_end=1266 + _globals['_TOARGBRESPONSE']._serialized_start=1268 + _globals['_TOARGBRESPONSE']._serialized_end=1284 + _globals['_VIDEORESOLUTION']._serialized_start=1286 + _globals['_VIDEORESOLUTION']._serialized_end=1354 + _globals['_ARGBBUFFERINFO']._serialized_start=1356 + _globals['_ARGBBUFFERINFO']._serialized_end=1480 + _globals['_VIDEOFRAMEINFO']._serialized_start=1482 + _globals['_VIDEOFRAMEINFO']._serialized_end=1568 + _globals['_VIDEOFRAMEBUFFERINFO']._serialized_start=1571 + _globals['_VIDEOFRAMEBUFFERINFO']._serialized_end=1850 + _globals['_OWNEDVIDEOFRAMEBUFFER']._serialized_start=1852 + _globals['_OWNEDVIDEOFRAMEBUFFER']._serialized_end=1973 + _globals['_PLANARYUVBUFFERINFO']._serialized_start=1976 + _globals['_PLANARYUVBUFFERINFO']._serialized_end=2194 + _globals['_BIPLANARYUVBUFFERINFO']._serialized_start=2197 + _globals['_BIPLANARYUVBUFFERINFO']._serialized_end=2343 + _globals['_NATIVEBUFFERINFO']._serialized_start=2345 + _globals['_NATIVEBUFFERINFO']._serialized_end=2363 + _globals['_VIDEOSTREAMINFO']._serialized_start=2365 + _globals['_VIDEOSTREAMINFO']._serialized_end=2428 + _globals['_OWNEDVIDEOSTREAM']._serialized_start=2430 + _globals['_OWNEDVIDEOSTREAM']._serialized_end=2541 + _globals['_VIDEOSTREAMEVENT']._serialized_start=2544 + _globals['_VIDEOSTREAMEVENT']._serialized_end=2703 + _globals['_VIDEOFRAMERECEIVED']._serialized_start=2705 + _globals['_VIDEOFRAMERECEIVED']._serialized_end=2825 + _globals['_VIDEOSTREAMEOS']._serialized_start=2827 + _globals['_VIDEOSTREAMEOS']._serialized_end=2843 + _globals['_VIDEOSOURCERESOLUTION']._serialized_start=2845 + _globals['_VIDEOSOURCERESOLUTION']._serialized_end=2899 + _globals['_VIDEOSOURCEINFO']._serialized_start=2901 + _globals['_VIDEOSOURCEINFO']._serialized_end=2964 + _globals['_OWNEDVIDEOSOURCE']._serialized_start=2966 + _globals['_OWNEDVIDEOSOURCE']._serialized_end=3077 +# @@protoc_insertion_point(module_scope) diff --git a/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.pyi b/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.pyi new file mode 100644 index 00000000..106c3a21 --- /dev/null +++ b/livekit-rtc/livekit/rtc/_proto/video_frame_pb2.pyi @@ -0,0 +1,769 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +Copyright 2023 LiveKit, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" +import builtins +import google.protobuf.descriptor +import google.protobuf.internal.enum_type_wrapper +import google.protobuf.message +from . import handle_pb2 +import sys +import typing + +if sys.version_info >= (3, 10): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +class _VideoCodec: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _VideoCodecEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_VideoCodec.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + VP8: _VideoCodec.ValueType # 0 + H264: _VideoCodec.ValueType # 1 + AV1: _VideoCodec.ValueType # 2 + +class VideoCodec(_VideoCodec, metaclass=_VideoCodecEnumTypeWrapper): ... + +VP8: VideoCodec.ValueType # 0 +H264: VideoCodec.ValueType # 1 +AV1: VideoCodec.ValueType # 2 +global___VideoCodec = VideoCodec + +class _VideoRotation: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _VideoRotationEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_VideoRotation.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + VIDEO_ROTATION_0: _VideoRotation.ValueType # 0 + VIDEO_ROTATION_90: _VideoRotation.ValueType # 1 + VIDEO_ROTATION_180: _VideoRotation.ValueType # 2 + VIDEO_ROTATION_270: _VideoRotation.ValueType # 3 + +class VideoRotation(_VideoRotation, metaclass=_VideoRotationEnumTypeWrapper): ... + +VIDEO_ROTATION_0: VideoRotation.ValueType # 0 +VIDEO_ROTATION_90: VideoRotation.ValueType # 1 +VIDEO_ROTATION_180: VideoRotation.ValueType # 2 +VIDEO_ROTATION_270: VideoRotation.ValueType # 3 +global___VideoRotation = VideoRotation + +class _VideoFormatType: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _VideoFormatTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_VideoFormatType.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + FORMAT_ARGB: _VideoFormatType.ValueType # 0 + FORMAT_BGRA: _VideoFormatType.ValueType # 1 + FORMAT_ABGR: _VideoFormatType.ValueType # 2 + FORMAT_RGBA: _VideoFormatType.ValueType # 3 + +class VideoFormatType(_VideoFormatType, metaclass=_VideoFormatTypeEnumTypeWrapper): ... + +FORMAT_ARGB: VideoFormatType.ValueType # 0 +FORMAT_BGRA: VideoFormatType.ValueType # 1 +FORMAT_ABGR: VideoFormatType.ValueType # 2 +FORMAT_RGBA: VideoFormatType.ValueType # 3 +global___VideoFormatType = VideoFormatType + +class _VideoFrameBufferType: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _VideoFrameBufferTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_VideoFrameBufferType.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + NATIVE: _VideoFrameBufferType.ValueType # 0 + I420: _VideoFrameBufferType.ValueType # 1 + I420A: _VideoFrameBufferType.ValueType # 2 + I422: _VideoFrameBufferType.ValueType # 3 + I444: _VideoFrameBufferType.ValueType # 4 + I010: _VideoFrameBufferType.ValueType # 5 + NV12: _VideoFrameBufferType.ValueType # 6 + +class VideoFrameBufferType(_VideoFrameBufferType, metaclass=_VideoFrameBufferTypeEnumTypeWrapper): ... + +NATIVE: VideoFrameBufferType.ValueType # 0 +I420: VideoFrameBufferType.ValueType # 1 +I420A: VideoFrameBufferType.ValueType # 2 +I422: VideoFrameBufferType.ValueType # 3 +I444: VideoFrameBufferType.ValueType # 4 +I010: VideoFrameBufferType.ValueType # 5 +NV12: VideoFrameBufferType.ValueType # 6 +global___VideoFrameBufferType = VideoFrameBufferType + +class _VideoStreamType: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _VideoStreamTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_VideoStreamType.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + VIDEO_STREAM_NATIVE: _VideoStreamType.ValueType # 0 + VIDEO_STREAM_WEBGL: _VideoStreamType.ValueType # 1 + VIDEO_STREAM_HTML: _VideoStreamType.ValueType # 2 + +class VideoStreamType(_VideoStreamType, metaclass=_VideoStreamTypeEnumTypeWrapper): + """ + VideoStream + """ + +VIDEO_STREAM_NATIVE: VideoStreamType.ValueType # 0 +VIDEO_STREAM_WEBGL: VideoStreamType.ValueType # 1 +VIDEO_STREAM_HTML: VideoStreamType.ValueType # 2 +global___VideoStreamType = VideoStreamType + +class _VideoSourceType: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _VideoSourceTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_VideoSourceType.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + VIDEO_SOURCE_NATIVE: _VideoSourceType.ValueType # 0 + +class VideoSourceType(_VideoSourceType, metaclass=_VideoSourceTypeEnumTypeWrapper): ... + +VIDEO_SOURCE_NATIVE: VideoSourceType.ValueType # 0 +global___VideoSourceType = VideoSourceType + +@typing_extensions.final +class AllocVideoBufferRequest(google.protobuf.message.Message): + """Allocate a new VideoFrameBuffer""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TYPE_FIELD_NUMBER: builtins.int + WIDTH_FIELD_NUMBER: builtins.int + HEIGHT_FIELD_NUMBER: builtins.int + type: global___VideoFrameBufferType.ValueType + """Only I420 is supported atm""" + width: builtins.int + height: builtins.int + def __init__( + self, + *, + type: global___VideoFrameBufferType.ValueType = ..., + width: builtins.int = ..., + height: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["height", b"height", "type", b"type", "width", b"width"]) -> None: ... + +global___AllocVideoBufferRequest = AllocVideoBufferRequest + +@typing_extensions.final +class AllocVideoBufferResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + BUFFER_FIELD_NUMBER: builtins.int + @property + def buffer(self) -> global___OwnedVideoFrameBuffer: ... + def __init__( + self, + *, + buffer: global___OwnedVideoFrameBuffer | 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: ... + +global___AllocVideoBufferResponse = AllocVideoBufferResponse + +@typing_extensions.final +class NewVideoStreamRequest(google.protobuf.message.Message): + """Create a new VideoStream + VideoStream is used to receive video frames from a track + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TRACK_HANDLE_FIELD_NUMBER: builtins.int + TYPE_FIELD_NUMBER: builtins.int + track_handle: builtins.int + type: global___VideoStreamType.ValueType + def __init__( + self, + *, + track_handle: builtins.int = ..., + type: global___VideoStreamType.ValueType = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["track_handle", b"track_handle", "type", b"type"]) -> None: ... + +global___NewVideoStreamRequest = NewVideoStreamRequest + +@typing_extensions.final +class NewVideoStreamResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + STREAM_FIELD_NUMBER: builtins.int + @property + def stream(self) -> global___OwnedVideoStream: ... + def __init__( + self, + *, + 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: ... + +global___NewVideoStreamResponse = NewVideoStreamResponse + +@typing_extensions.final +class NewVideoSourceRequest(google.protobuf.message.Message): + """Create a new VideoSource + VideoSource is used to send video frame to a track + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TYPE_FIELD_NUMBER: builtins.int + RESOLUTION_FIELD_NUMBER: builtins.int + type: global___VideoSourceType.ValueType + @property + def resolution(self) -> global___VideoSourceResolution: + """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: ... + +global___NewVideoSourceRequest = NewVideoSourceRequest + +@typing_extensions.final +class NewVideoSourceResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SOURCE_FIELD_NUMBER: builtins.int + @property + def source(self) -> global___OwnedVideoSource: ... + def __init__( + self, + *, + 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: ... + +global___NewVideoSourceResponse = NewVideoSourceResponse + +@typing_extensions.final +class CaptureVideoFrameRequest(google.protobuf.message.Message): + """Push a frame to a VideoSource""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SOURCE_HANDLE_FIELD_NUMBER: builtins.int + FRAME_FIELD_NUMBER: builtins.int + INFO_FIELD_NUMBER: builtins.int + HANDLE_FIELD_NUMBER: builtins.int + source_handle: builtins.int + @property + def frame(self) -> global___VideoFrameInfo: ... + @property + def info(self) -> global___VideoFrameBufferInfo: ... + handle: builtins.int + def __init__( + self, + *, + source_handle: builtins.int = ..., + frame: global___VideoFrameInfo | None = ..., + info: global___VideoFrameBufferInfo | None = ..., + handle: builtins.int = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["frame", b"frame", "from", b"from", "handle", b"handle", "info", b"info"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["frame", b"frame", "from", b"from", "handle", b"handle", "info", b"info", "source_handle", b"source_handle"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["from", b"from"]) -> typing_extensions.Literal["info", "handle"] | None: ... + +global___CaptureVideoFrameRequest = CaptureVideoFrameRequest + +@typing_extensions.final +class CaptureVideoFrameResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___CaptureVideoFrameResponse = CaptureVideoFrameResponse + +@typing_extensions.final +class ToI420Request(google.protobuf.message.Message): + """Convert a RGBA frame to a I420 YUV frame + Or convert another YUV frame format to I420 + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + FLIP_Y_FIELD_NUMBER: builtins.int + ARGB_FIELD_NUMBER: builtins.int + BUFFER_FIELD_NUMBER: builtins.int + HANDLE_FIELD_NUMBER: builtins.int + flip_y: builtins.bool + @property + def argb(self) -> global___ArgbBufferInfo: ... + @property + def buffer(self) -> global___VideoFrameBufferInfo: ... + handle: builtins.int + def __init__( + self, + *, + flip_y: builtins.bool = ..., + argb: global___ArgbBufferInfo | None = ..., + buffer: global___VideoFrameBufferInfo | None = ..., + handle: builtins.int = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["argb", b"argb", "buffer", b"buffer", "from", b"from", "handle", b"handle"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["argb", b"argb", "buffer", b"buffer", "flip_y", b"flip_y", "from", b"from", "handle", b"handle"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["from", b"from"]) -> typing_extensions.Literal["argb", "buffer", "handle"] | None: ... + +global___ToI420Request = ToI420Request + +@typing_extensions.final +class ToI420Response(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + BUFFER_FIELD_NUMBER: builtins.int + @property + def buffer(self) -> global___OwnedVideoFrameBuffer: ... + def __init__( + self, + *, + buffer: global___OwnedVideoFrameBuffer | 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: ... + +global___ToI420Response = ToI420Response + +@typing_extensions.final +class ToArgbRequest(google.protobuf.message.Message): + """Convert a YUV frame to a RGBA frame + Only I420 is supported atm + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + BUFFER_FIELD_NUMBER: builtins.int + DST_PTR_FIELD_NUMBER: builtins.int + DST_FORMAT_FIELD_NUMBER: builtins.int + DST_STRIDE_FIELD_NUMBER: builtins.int + DST_WIDTH_FIELD_NUMBER: builtins.int + DST_HEIGHT_FIELD_NUMBER: builtins.int + FLIP_Y_FIELD_NUMBER: builtins.int + @property + def buffer(self) -> global___VideoFrameBufferInfo: ... + dst_ptr: builtins.int + dst_format: global___VideoFormatType.ValueType + dst_stride: builtins.int + dst_width: builtins.int + dst_height: builtins.int + flip_y: builtins.bool + def __init__( + self, + *, + buffer: global___VideoFrameBufferInfo | None = ..., + dst_ptr: builtins.int = ..., + dst_format: global___VideoFormatType.ValueType = ..., + dst_stride: builtins.int = ..., + dst_width: builtins.int = ..., + dst_height: builtins.int = ..., + flip_y: builtins.bool = ..., + ) -> 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_format", b"dst_format", "dst_height", b"dst_height", "dst_ptr", b"dst_ptr", "dst_stride", b"dst_stride", "dst_width", b"dst_width", "flip_y", b"flip_y"]) -> None: ... + +global___ToArgbRequest = ToArgbRequest + +@typing_extensions.final +class ToArgbResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___ToArgbResponse = ToArgbResponse + +@typing_extensions.final +class VideoResolution(google.protobuf.message.Message): + """ + VideoFrame buffers + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + WIDTH_FIELD_NUMBER: builtins.int + HEIGHT_FIELD_NUMBER: builtins.int + FRAME_RATE_FIELD_NUMBER: builtins.int + width: builtins.int + height: builtins.int + frame_rate: builtins.float + def __init__( + self, + *, + width: builtins.int = ..., + 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: ... + +global___VideoResolution = VideoResolution + +@typing_extensions.final +class ArgbBufferInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PTR_FIELD_NUMBER: builtins.int + FORMAT_FIELD_NUMBER: builtins.int + STRIDE_FIELD_NUMBER: builtins.int + WIDTH_FIELD_NUMBER: builtins.int + HEIGHT_FIELD_NUMBER: builtins.int + ptr: builtins.int + format: global___VideoFormatType.ValueType + stride: builtins.int + width: builtins.int + height: builtins.int + def __init__( + self, + *, + ptr: builtins.int = ..., + format: global___VideoFormatType.ValueType = ..., + stride: builtins.int = ..., + width: builtins.int = ..., + height: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["format", b"format", "height", b"height", "ptr", b"ptr", "stride", b"stride", "width", b"width"]) -> None: ... + +global___ArgbBufferInfo = ArgbBufferInfo + +@typing_extensions.final +class VideoFrameInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TIMESTAMP_US_FIELD_NUMBER: builtins.int + ROTATION_FIELD_NUMBER: builtins.int + timestamp_us: builtins.int + """In microseconds""" + rotation: global___VideoRotation.ValueType + def __init__( + self, + *, + timestamp_us: builtins.int = ..., + rotation: global___VideoRotation.ValueType = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["rotation", b"rotation", "timestamp_us", b"timestamp_us"]) -> None: ... + +global___VideoFrameInfo = VideoFrameInfo + +@typing_extensions.final +class VideoFrameBufferInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + BUFFER_TYPE_FIELD_NUMBER: builtins.int + WIDTH_FIELD_NUMBER: builtins.int + HEIGHT_FIELD_NUMBER: builtins.int + YUV_FIELD_NUMBER: builtins.int + BI_YUV_FIELD_NUMBER: builtins.int + NATIVE_FIELD_NUMBER: builtins.int + buffer_type: global___VideoFrameBufferType.ValueType + width: builtins.int + height: builtins.int + @property + def yuv(self) -> global___PlanarYuvBufferInfo: ... + @property + def bi_yuv(self) -> global___BiplanarYuvBufferInfo: ... + @property + def native(self) -> global___NativeBufferInfo: ... + def __init__( + self, + *, + buffer_type: global___VideoFrameBufferType.ValueType = ..., + width: builtins.int = ..., + height: builtins.int = ..., + yuv: global___PlanarYuvBufferInfo | None = ..., + bi_yuv: global___BiplanarYuvBufferInfo | None = ..., + native: global___NativeBufferInfo | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["bi_yuv", b"bi_yuv", "buffer", b"buffer", "native", b"native", "yuv", b"yuv"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["bi_yuv", b"bi_yuv", "buffer", b"buffer", "buffer_type", b"buffer_type", "height", b"height", "native", b"native", "width", b"width", "yuv", b"yuv"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["buffer", b"buffer"]) -> typing_extensions.Literal["yuv", "bi_yuv", "native"] | None: ... + +global___VideoFrameBufferInfo = VideoFrameBufferInfo + +@typing_extensions.final +class OwnedVideoFrameBuffer(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + HANDLE_FIELD_NUMBER: builtins.int + INFO_FIELD_NUMBER: builtins.int + @property + def handle(self) -> handle_pb2.FfiOwnedHandle: ... + @property + def info(self) -> global___VideoFrameBufferInfo: ... + def __init__( + self, + *, + handle: handle_pb2.FfiOwnedHandle | None = ..., + info: global___VideoFrameBufferInfo | 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: ... + +global___OwnedVideoFrameBuffer = OwnedVideoFrameBuffer + +@typing_extensions.final +class PlanarYuvBufferInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CHROMA_WIDTH_FIELD_NUMBER: builtins.int + CHROMA_HEIGHT_FIELD_NUMBER: builtins.int + STRIDE_Y_FIELD_NUMBER: builtins.int + STRIDE_U_FIELD_NUMBER: builtins.int + STRIDE_V_FIELD_NUMBER: builtins.int + STRIDE_A_FIELD_NUMBER: builtins.int + DATA_Y_PTR_FIELD_NUMBER: builtins.int + DATA_U_PTR_FIELD_NUMBER: builtins.int + DATA_V_PTR_FIELD_NUMBER: builtins.int + DATA_A_PTR_FIELD_NUMBER: builtins.int + chroma_width: builtins.int + chroma_height: builtins.int + stride_y: builtins.int + stride_u: builtins.int + stride_v: builtins.int + stride_a: builtins.int + data_y_ptr: builtins.int + """*const u8 or *const u16""" + data_u_ptr: builtins.int + data_v_ptr: builtins.int + data_a_ptr: builtins.int + """nullptr = no alpha""" + def __init__( + self, + *, + chroma_width: builtins.int = ..., + chroma_height: builtins.int = ..., + stride_y: builtins.int = ..., + stride_u: builtins.int = ..., + stride_v: builtins.int = ..., + stride_a: builtins.int = ..., + data_y_ptr: builtins.int = ..., + data_u_ptr: builtins.int = ..., + data_v_ptr: builtins.int = ..., + data_a_ptr: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["chroma_height", b"chroma_height", "chroma_width", b"chroma_width", "data_a_ptr", b"data_a_ptr", "data_u_ptr", b"data_u_ptr", "data_v_ptr", b"data_v_ptr", "data_y_ptr", b"data_y_ptr", "stride_a", b"stride_a", "stride_u", b"stride_u", "stride_v", b"stride_v", "stride_y", b"stride_y"]) -> None: ... + +global___PlanarYuvBufferInfo = PlanarYuvBufferInfo + +@typing_extensions.final +class BiplanarYuvBufferInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CHROMA_WIDTH_FIELD_NUMBER: builtins.int + CHROMA_HEIGHT_FIELD_NUMBER: builtins.int + STRIDE_Y_FIELD_NUMBER: builtins.int + STRIDE_UV_FIELD_NUMBER: builtins.int + DATA_Y_PTR_FIELD_NUMBER: builtins.int + DATA_UV_PTR_FIELD_NUMBER: builtins.int + chroma_width: builtins.int + chroma_height: builtins.int + stride_y: builtins.int + stride_uv: builtins.int + data_y_ptr: builtins.int + data_uv_ptr: builtins.int + def __init__( + self, + *, + chroma_width: builtins.int = ..., + chroma_height: builtins.int = ..., + stride_y: builtins.int = ..., + stride_uv: builtins.int = ..., + data_y_ptr: builtins.int = ..., + data_uv_ptr: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["chroma_height", b"chroma_height", "chroma_width", b"chroma_width", "data_uv_ptr", b"data_uv_ptr", "data_y_ptr", b"data_y_ptr", "stride_uv", b"stride_uv", "stride_y", b"stride_y"]) -> None: ... + +global___BiplanarYuvBufferInfo = BiplanarYuvBufferInfo + +@typing_extensions.final +class NativeBufferInfo(google.protobuf.message.Message): + """TODO(theomonnom): Expose graphic context?""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___NativeBufferInfo = NativeBufferInfo + +@typing_extensions.final +class VideoStreamInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TYPE_FIELD_NUMBER: builtins.int + type: global___VideoStreamType.ValueType + def __init__( + self, + *, + type: global___VideoStreamType.ValueType = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["type", b"type"]) -> None: ... + +global___VideoStreamInfo = VideoStreamInfo + +@typing_extensions.final +class OwnedVideoStream(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + HANDLE_FIELD_NUMBER: builtins.int + INFO_FIELD_NUMBER: builtins.int + @property + def handle(self) -> handle_pb2.FfiOwnedHandle: ... + @property + def info(self) -> global___VideoStreamInfo: ... + def __init__( + self, + *, + 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: ... + +global___OwnedVideoStream = OwnedVideoStream + +@typing_extensions.final +class VideoStreamEvent(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + STREAM_HANDLE_FIELD_NUMBER: builtins.int + FRAME_RECEIVED_FIELD_NUMBER: builtins.int + EOS_FIELD_NUMBER: builtins.int + stream_handle: builtins.int + @property + def frame_received(self) -> global___VideoFrameReceived: ... + @property + def eos(self) -> global___VideoStreamEOS: ... + def __init__( + self, + *, + stream_handle: builtins.int = ..., + 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: ... + +global___VideoStreamEvent = VideoStreamEvent + +@typing_extensions.final +class VideoFrameReceived(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + FRAME_FIELD_NUMBER: builtins.int + BUFFER_FIELD_NUMBER: builtins.int + @property + def frame(self) -> global___VideoFrameInfo: ... + @property + def buffer(self) -> global___OwnedVideoFrameBuffer: ... + def __init__( + self, + *, + frame: global___VideoFrameInfo | None = ..., + buffer: global___OwnedVideoFrameBuffer | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["buffer", b"buffer", "frame", b"frame"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["buffer", b"buffer", "frame", b"frame"]) -> None: ... + +global___VideoFrameReceived = VideoFrameReceived + +@typing_extensions.final +class VideoStreamEOS(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___VideoStreamEOS = VideoStreamEOS + +@typing_extensions.final +class VideoSourceResolution(google.protobuf.message.Message): + """ + VideoSource + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + WIDTH_FIELD_NUMBER: builtins.int + HEIGHT_FIELD_NUMBER: builtins.int + width: builtins.int + height: builtins.int + def __init__( + self, + *, + width: builtins.int = ..., + height: builtins.int = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["height", b"height", "width", b"width"]) -> None: ... + +global___VideoSourceResolution = VideoSourceResolution + +@typing_extensions.final +class VideoSourceInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TYPE_FIELD_NUMBER: builtins.int + type: global___VideoSourceType.ValueType + def __init__( + self, + *, + type: global___VideoSourceType.ValueType = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["type", b"type"]) -> None: ... + +global___VideoSourceInfo = VideoSourceInfo + +@typing_extensions.final +class OwnedVideoSource(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + HANDLE_FIELD_NUMBER: builtins.int + INFO_FIELD_NUMBER: builtins.int + @property + def handle(self) -> handle_pb2.FfiOwnedHandle: ... + @property + def info(self) -> global___VideoSourceInfo: ... + def __init__( + self, + *, + 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: ... + +global___OwnedVideoSource = OwnedVideoSource diff --git a/ruff.toml b/ruff.toml index c25c0605..c1dc76a4 100644 --- a/ruff.toml +++ b/ruff.toml @@ -1,4 +1,5 @@ exclude = [ + "_proto", "livekit-protocol/livekit/protocol" ]