45 lines
772 B
Protocol Buffer
45 lines
772 B
Protocol Buffer
syntax = "proto3";
|
|
package media_set;
|
|
|
|
option go_package = "pb/media_set";
|
|
|
|
import "google/protobuf/duration.proto";
|
|
|
|
message Peaks {
|
|
repeated int32 peaks = 1;
|
|
}
|
|
|
|
message MediaSet {
|
|
message Audio {
|
|
int64 bytes = 1;
|
|
int32 channels = 2;
|
|
int64 frames = 3;
|
|
int32 sample_rate = 4;
|
|
};
|
|
|
|
message Video {
|
|
int64 bytes = 1;
|
|
google.protobuf.Duration duration = 2;
|
|
int32 ThumbnailWidth = 3;
|
|
int32 ThumbnailHeight = 4;
|
|
};
|
|
|
|
string id = 1;
|
|
Audio audio = 2;
|
|
Video video = 3;
|
|
};
|
|
|
|
message GetMediaSetRequest {
|
|
string id = 1;
|
|
string source = 2;
|
|
}
|
|
|
|
message GetPeaksRequest {
|
|
string id = 1;
|
|
}
|
|
|
|
service MediaSetService {
|
|
rpc GetMediaSet(GetMediaSetRequest) returns (MediaSet) {}
|
|
rpc GetPeaks(GetPeaksRequest) returns (stream Peaks) {}
|
|
}
|