2021-10-22 19:30:09 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package media_set;
|
|
|
|
|
|
|
|
option go_package = "pb/media_set";
|
|
|
|
|
|
|
|
import "google/protobuf/duration.proto";
|
|
|
|
|
|
|
|
message MediaSet {
|
|
|
|
string id = 1;
|
2021-11-01 19:33:45 +00:00
|
|
|
string youtube_id = 2;
|
2021-11-02 16:20:47 +00:00
|
|
|
|
|
|
|
int32 audio_channels = 3;
|
|
|
|
int64 audio_approx_frames = 4;
|
|
|
|
int64 audio_frames = 5;
|
|
|
|
int32 audio_sample_rate = 6;
|
|
|
|
int32 audio_youtube_itag = 7;
|
|
|
|
string audio_mime_type = 8;
|
|
|
|
|
|
|
|
google.protobuf.Duration video_duration = 9;
|
|
|
|
int32 video_youtube_itag = 10;
|
|
|
|
string video_mime_type = 11;
|
2021-10-22 19:30:09 +00:00
|
|
|
};
|
|
|
|
|
2021-11-01 05:28:40 +00:00
|
|
|
message GetAudioProgress {
|
2021-10-27 19:34:59 +00:00
|
|
|
float percent_completed = 2;
|
|
|
|
repeated int32 peaks = 1;
|
|
|
|
}
|
|
|
|
|
2021-11-01 05:28:40 +00:00
|
|
|
message GetRequest {
|
|
|
|
string youtube_id = 1;
|
2021-10-22 19:30:09 +00:00
|
|
|
}
|
|
|
|
|
2021-11-01 05:28:40 +00:00
|
|
|
message GetAudioRequest {
|
2021-10-22 19:30:09 +00:00
|
|
|
string id = 1;
|
2021-10-27 19:34:59 +00:00
|
|
|
int32 num_bins = 2;
|
2021-10-22 19:30:09 +00:00
|
|
|
}
|
|
|
|
|
2021-11-01 05:28:40 +00:00
|
|
|
service MediaSetService {
|
|
|
|
rpc Get(GetRequest) returns (MediaSet) {}
|
|
|
|
rpc GetAudio(GetAudioRequest) returns (stream GetAudioProgress) {}
|
2021-10-22 19:30:09 +00:00
|
|
|
}
|