* Add license headers & NOTICE * generated protobuf --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
155 lines
3.8 KiB
Protocol Buffer
155 lines
3.8 KiB
Protocol Buffer
// 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.
|
|
|
|
syntax = "proto3";
|
|
|
|
package livekit;
|
|
option go_package = "github.com/livekit/protocol/livekit";
|
|
option csharp_namespace = "LiveKit.Proto";
|
|
option ruby_package = "LiveKit::Proto";
|
|
|
|
import "google/protobuf/empty.proto";
|
|
import "google/protobuf/timestamp.proto";
|
|
import "livekit_models.proto";
|
|
import "livekit_egress.proto";
|
|
import "livekit_ingress.proto";
|
|
|
|
service AnalyticsRecorderService {
|
|
rpc IngestStats(stream AnalyticsStats) returns (google.protobuf.Empty){};
|
|
rpc IngestEvents(stream AnalyticsEvents) returns (google.protobuf.Empty){};
|
|
}
|
|
|
|
enum StreamType {
|
|
UPSTREAM = 0;
|
|
DOWNSTREAM = 1;
|
|
}
|
|
|
|
message AnalyticsVideoLayer {
|
|
int32 layer = 1;
|
|
uint32 packets = 2;
|
|
uint64 bytes = 3;
|
|
uint32 frames = 4;
|
|
}
|
|
|
|
message AnalyticsStream {
|
|
uint32 ssrc = 1;
|
|
uint32 primary_packets = 2;
|
|
uint64 primary_bytes = 3;
|
|
uint32 retransmit_packets = 4;
|
|
uint64 retransmit_bytes = 5;
|
|
uint32 padding_packets = 6;
|
|
uint64 padding_bytes = 7;
|
|
uint32 packets_lost = 8;
|
|
uint32 frames = 9;
|
|
uint32 rtt = 10;
|
|
uint32 jitter = 11;
|
|
uint32 nacks = 12;
|
|
uint32 plis = 13;
|
|
uint32 firs = 14;
|
|
repeated AnalyticsVideoLayer video_layers = 15;
|
|
}
|
|
|
|
message AnalyticsStat {
|
|
string analytics_key = 1;
|
|
StreamType kind = 2;
|
|
google.protobuf.Timestamp time_stamp = 3;
|
|
string node = 4;
|
|
string room_id = 5;
|
|
string room_name = 6;
|
|
string participant_id = 7;
|
|
string track_id = 8;
|
|
float score = 9; // average score
|
|
repeated AnalyticsStream streams = 10;
|
|
string mime = 11;
|
|
float min_score = 12;
|
|
float median_score = 13;
|
|
}
|
|
|
|
message AnalyticsStats {
|
|
repeated AnalyticsStat stats = 1;
|
|
}
|
|
|
|
enum AnalyticsEventType {
|
|
ROOM_CREATED = 0;
|
|
ROOM_ENDED = 1;
|
|
PARTICIPANT_JOINED = 2;
|
|
PARTICIPANT_LEFT = 3;
|
|
TRACK_PUBLISHED = 4;
|
|
TRACK_PUBLISH_REQUESTED = 20;
|
|
TRACK_UNPUBLISHED = 5;
|
|
TRACK_SUBSCRIBED = 6;
|
|
TRACK_SUBSCRIBE_REQUESTED = 21;
|
|
TRACK_SUBSCRIBE_FAILED = 25;
|
|
TRACK_UNSUBSCRIBED = 7;
|
|
TRACK_PUBLISHED_UPDATE = 10;
|
|
TRACK_MUTED = 23;
|
|
TRACK_UNMUTED = 24;
|
|
TRACK_PUBLISH_STATS = 26;
|
|
TRACK_SUBSCRIBE_STATS = 27;
|
|
PARTICIPANT_ACTIVE = 11;
|
|
PARTICIPANT_RESUMED = 22;
|
|
EGRESS_STARTED = 12;
|
|
EGRESS_ENDED = 13;
|
|
EGRESS_UPDATED = 28;
|
|
TRACK_MAX_SUBSCRIBED_VIDEO_QUALITY = 14;
|
|
RECONNECTED = 15;
|
|
INGRESS_CREATED = 18;
|
|
INGRESS_DELETED = 19;
|
|
INGRESS_STARTED = 16;
|
|
INGRESS_ENDED = 17;
|
|
INGRESS_UPDATED = 29;
|
|
|
|
// NEXT_ID: 30
|
|
}
|
|
|
|
message AnalyticsClientMeta {
|
|
string region = 1;
|
|
string node = 2;
|
|
string client_addr = 3;
|
|
uint32 client_connect_time = 4;
|
|
// udp, tcp, turn
|
|
string connection_type = 5;
|
|
ReconnectReason reconnect_reason = 6;
|
|
}
|
|
|
|
message AnalyticsEvent {
|
|
AnalyticsEventType type = 1;
|
|
google.protobuf.Timestamp timestamp = 2;
|
|
string room_id = 3;
|
|
Room room = 4;
|
|
string participant_id = 5;
|
|
ParticipantInfo participant = 6;
|
|
string track_id = 7;
|
|
TrackInfo track = 8;
|
|
string analytics_key = 10;
|
|
ClientInfo client_info = 11;
|
|
AnalyticsClientMeta client_meta = 12;
|
|
string egress_id = 13;
|
|
string ingress_id = 19;
|
|
VideoQuality max_subscribed_video_quality = 14;
|
|
ParticipantInfo publisher = 15;
|
|
string mime = 16;
|
|
EgressInfo egress = 17;
|
|
IngressInfo ingress = 18;
|
|
string error = 20;
|
|
RTPStats rtp_stats = 21;
|
|
int32 video_layer = 22;
|
|
|
|
// NEXT_ID: 23
|
|
}
|
|
|
|
message AnalyticsEvents {
|
|
repeated AnalyticsEvent events = 1;
|
|
}
|