Files
2023-06-18 22:45:05 +02:00

79 lines
1.4 KiB
Protocol Buffer

syntax = "proto3";
package livekit;
option csharp_namespace = "LiveKit.Proto";
import "handle.proto";
import "video_frame.proto";
import "audio_frame.proto";
// Create a new VideoTrack from a VideoSource
message CreateVideoTrackRequest {
string name = 1;
FfiHandleId source_handle = 2;
}
message CreateVideoTrackResponse {
TrackInfo track = 1;
}
// Create a new AudioTrack from a AudioSource
message CreateAudioTrackRequest {
string name = 1;
FfiHandleId source_handle = 2;
}
message CreateAudioTrackResponse {
TrackInfo track = 1;
}
///
/// Track
///
message TrackEvent {}
enum TrackKind {
KIND_UNKNOWN = 0;
KIND_AUDIO = 1;
KIND_VIDEO = 2;
}
enum TrackSource {
SOURCE_UNKNOWN = 0;
SOURCE_CAMERA = 1;
SOURCE_MICROPHONE = 2;
SOURCE_SCREENSHARE = 3;
SOURCE_SCREENSHARE_AUDIO = 4;
}
enum StreamState {
STATE_UNKNOWN = 0;
STATE_ACTIVE = 1;
STATE_PAUSED = 2;
}
// TODO(theomonnom): Should we have a separate message whether the track is local or remote?
message TrackPublicationInfo {
string sid = 1;
string name = 2;
TrackKind kind = 3;
TrackSource source = 4;
bool simulcasted = 5;
uint32 width = 6;
uint32 height = 7;
string mime_type = 8;
bool muted = 9;
bool remote = 10;
}
message TrackInfo {
FfiHandleId handle = 1;
string sid = 2;
string name = 3;
TrackKind kind = 4;
StreamState stream_state = 5;
bool muted = 6;
bool remote = 7;
}