Skip to content

Commit

Permalink
move recording options, use oneof (#7)
Browse files Browse the repository at this point in the history
* move options, use oneof

* use start recording request in reservation

* models unused in internal
  • Loading branch information
frostbyte73 authored Aug 6, 2021
1 parent 4c64ffc commit 9caa97d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 28 deletions.
5 changes: 2 additions & 3 deletions livekit_internal.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ package livekit;
option go_package = "github.com/livekit/livekit-server/proto/livekit";

// internal protos, not exposed to clients
import "livekit_recording.proto";
import "livekit_rtc.proto";
import "livekit_room.proto";
import "livekit_models.proto";

message Node {
string id = 1;
Expand Down Expand Up @@ -75,6 +75,5 @@ message RemoveParticipant {
message RecordingReservation {
string id = 1;
int64 submitted_at = 2;
RecordingInput input = 3;
RecordingOutput output = 4;
StartRecordingRequest request = 3;
}
37 changes: 14 additions & 23 deletions livekit_models.proto
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,6 @@ message DataMessage {
}
}

message RecordingInput {
// either url or template required
string url = 1;
RecordingTemplate template = 2;
int32 width = 3;
int32 height = 4;
int32 depth = 5;
int32 framerate = 6;
}

message RecordingTemplate {
string layout = 1;
string ws_url = 2;
Expand All @@ -86,23 +76,24 @@ message RecordingTemplate {
string room_name = 4;
}

message RecordingOutput {
// either file, rtmp, or s3 required
string file = 1;
string rtmp = 2;
RecordingS3Output s3 = 3;
int32 width = 4;
int32 height = 5;
string audio_bitrate = 6;
string audio_frequency = 7;
string video_bitrate = 8;
string video_buffer = 9;
}

message RecordingS3Output {
string bucket = 1;
string key = 2;
// optional
string access_key = 3;
string secret = 4;
}

message RecordingOptions {
// 720p30, 720p60, 1080p30, or 1080p60
string preset = 1;
int32 input_width = 2;
int32 input_height = 3;
int32 output_width = 4;
int32 output_height = 5;
int32 depth = 6;
int32 framerate = 7;
int32 audio_bitrate = 8;
int32 audio_frequency = 9;
int32 video_bitrate = 10;
}
12 changes: 10 additions & 2 deletions livekit_recording.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,16 @@ service RecordingService {
}

message StartRecordingRequest {
RecordingInput input = 1;
RecordingOutput output = 2;
oneof input {
string url = 1;
RecordingTemplate template = 2;
}
oneof output {
string file = 3;
RecordingS3Output s3 = 4;
string rtmp = 5;
}
RecordingOptions options = 6;
}

message EndRecordingRequest {
Expand Down

0 comments on commit 9caa97d

Please sign in to comment.