1syntax = "proto3";
2
3package livekit;
4
5import "livekit_models.proto";
6
7option go_package = "github.com/livekit/protocol/livekit";
8option csharp_namespace = "LiveKit.Proto";
9option ruby_package = "LiveKit::Proto";
10
11service Ingress {
12 // Create a new Ingress
13 rpc CreateIngress(CreateIngressRequest) returns (IngressInfo);
14 // Update an existing Ingress. Ingress can only be updated when it's in ENDPOINT_WAITING state.
15 rpc UpdateIngress(UpdateIngressRequest) returns (IngressInfo);
16 rpc ListIngress(ListIngressRequest) returns (ListIngressResponse);
17 rpc DeleteIngress(DeleteIngressRequest) returns (IngressInfo);
18}
19
20message CreateIngressRequest {
21 IngressInput input_type = 1;
22 // User provided identifier for the ingress
23 string name = 2;
24 // room to publish to
25 string room_name = 3;
26 // publish as participant
27 string participant_identity = 4;
28 // name of publishing participant (used for display only)
29 string participant_name = 5;
30 IngressAudioOptions audio = 6;
31 IngressVideoOptions video = 7;
32}
33
34enum IngressInput {
35 RTMP_INPUT = 0;
36 // FILE_INPUT = 1;
37 // SRT_INPUT = 2;
38 // URL_INPUT = 3;
39}
40
41message IngressAudioOptions {
42 string name = 1;
43 TrackSource source = 2;
44 // desired mime_type to publish to room
45 string mime_type = 3;
46 uint32 bitrate = 4;
47 bool disable_dtx = 5;
48 uint32 channels = 6;
49}
50
51message IngressVideoOptions {
52 string name = 1;
53 TrackSource source = 2;
54 // desired mime_type to publish to room
55 string mime_type = 3;
56 // simulcast layers to publish, when empty, it'll pick default simulcast
57 // layers at 1/2 and 1/4 of the dimensions
58 repeated VideoLayer layers = 4;
59}
60
61message IngressInfo {
62 string ingress_id = 1;
63 string name = 2;
64 string stream_key = 3;
65 string url = 4;
66 // for RTMP input, it'll be a rtmp:// URL
67 // for FILE input, it'll be a http:// URL
68 // for SRT input, it'll be a srt:// URL
69 IngressInput input_type = 5;
70 IngressAudioOptions audio = 6;
71 IngressVideoOptions video = 7;
72 string room_name = 8;
73 string participant_identity = 9;
74 string participant_name = 10;
75 bool reusable = 11;
76 IngressState state = 12; // Description of error/stream non compliance and debug info for publisher otherwise (received bitrate, resolution, bandwidth)
77
78 // NEXT_ID: 13
79}
80
81message IngressState {
82 enum Status {
83 ENDPOINT_INACTIVE = 0;
84 ENDPOINT_BUFFERING = 1;
85 ENDPOINT_PUBLISHING = 2;
86 ENDPOINT_ERROR = 3;
87 }
88
89 Status status = 1;
90 string error = 2; // Error/non compliance description if any
91 InputVideoState video = 3;
92 InputAudioState audio = 4;
93 string room_id = 5; // ID of the current/previous room published to
94 int64 started_at = 7;
95 repeated TrackInfo tracks = 6;
96}
97
98message InputVideoState {
99 uint32 mime_type = 1;
100// uint32 bitrate = 2;
101 uint32 width = 3;
102 uint32 height = 4;
103 uint32 framerate = 5;
104}
105
106message InputAudioState {
107 uint32 mime_type = 1;
108// uint32 bitrate = 2;
109 uint32 channels = 3;
110 uint32 sample_rate = 4;
111}
112
113message UpdateIngressRequest {
114 string ingress_id = 1;
115 string name = 2;
116 string room_name = 3;
117 string participant_identity = 4;
118 string participant_name = 5;
119 IngressAudioOptions audio = 6;
120 IngressVideoOptions video = 7;
121}
122
123message ListIngressRequest {
124 // when blank, lists all ingress endpoints
125 string room_name = 1;
126}
127
128message ListIngressResponse {
129 repeated IngressInfo items = 1;
130}
131
132message DeleteIngressRequest {
133 string ingress_id = 1;
134}