clipper/proto/media_set.proto

49 lines
891 B
Protocol Buffer

syntax = "proto3";
package media_set;
option go_package = "pb/media_set";
import "google/protobuf/duration.proto";
message MediaSet {
message Audio {
int64 bytes = 1;
int32 channels = 2;
int64 approx_frames = 3;
int64 frames = 4;
int32 sample_rate = 5;
};
message Video {
int64 bytes = 1;
google.protobuf.Duration duration = 2;
int32 thumbnail_width = 3;
int32 thumbnail_height = 4;
};
string id = 1;
Audio audio = 2;
Video video = 3;
bool loaded = 4;
};
message PeaksProgress {
float percent_completed = 2;
repeated int32 peaks = 1;
}
message GetMediaSetRequest {
string id = 1;
string source = 2;
}
message GetPeaksRequest {
string id = 1;
int32 num_bins = 2;
}
service MediaSetService {
rpc GetMediaSet(GetMediaSetRequest) returns (MediaSet) {}
rpc GetPeaks(GetPeaksRequest) returns (stream PeaksProgress) {}
}