mirror of
https://github.com/xaionaro-go/streamctl.git
synced 2025-10-23 23:44:11 +08:00
111 lines
2.3 KiB
Protocol Buffer
111 lines
2.3 KiB
Protocol Buffer
syntax = "proto3";
|
|
package encoder_grpc;
|
|
option go_package = "go/encoder_grpc";
|
|
|
|
service Encoder {
|
|
rpc SetLoggingLevel(SetLoggingLevelRequest) returns(SetLoggingLevelReply) {}
|
|
rpc NewInput(NewInputRequest) returns (NewInputReply) {}
|
|
rpc NewOutput(NewOutputRequest) returns (NewOutputReply) {}
|
|
rpc NewEncoder(NewEncoderRequest) returns (NewEncoderReply) {}
|
|
rpc CloseInput(CloseInputRequest) returns (CloseInputReply) {}
|
|
rpc CloseOutput(CloseOutputRequest) returns (CloseOutputReply) {}
|
|
rpc GetEncoderStats(GetEncoderStatsRequest) returns (GetEncoderStatsReply) {}
|
|
rpc StartEncoding(StartEncodingRequest) returns (StartEncodingReply) {}
|
|
rpc EncodingEndedChan(EncodingEndedChanRequest) returns (stream EncodingEndedChanReply) {}
|
|
}
|
|
|
|
enum LoggingLevel {
|
|
LoggingLevelNone = 0;
|
|
LoggingLevelFatal = 1;
|
|
LoggingLevelPanic = 2;
|
|
LoggingLevelError = 3;
|
|
LoggingLevelWarn = 4;
|
|
LoggingLevelInfo = 5;
|
|
LoggingLevelDebug = 6;
|
|
LoggingLevelTrace = 7;
|
|
}
|
|
|
|
message SetLoggingLevelRequest {
|
|
LoggingLevel level = 1;
|
|
}
|
|
|
|
message SetLoggingLevelReply {}
|
|
|
|
message Error {
|
|
uint64 code = 1;
|
|
string message = 2;
|
|
}
|
|
|
|
message ResourcePathURL {
|
|
string url = 1;
|
|
string authKey = 2;
|
|
}
|
|
|
|
message ResourcePath {
|
|
oneof ResourcePath {
|
|
ResourcePathURL url = 1;
|
|
}
|
|
}
|
|
|
|
message InputConfig {}
|
|
|
|
message NewInputRequest {
|
|
ResourcePath path = 1;
|
|
InputConfig config = 2;
|
|
}
|
|
|
|
message NewInputReply {
|
|
uint64 id = 1;
|
|
}
|
|
|
|
message OutputConfig {}
|
|
|
|
message NewOutputRequest {
|
|
ResourcePath path = 1;
|
|
OutputConfig config = 2;
|
|
}
|
|
|
|
message NewOutputReply {
|
|
uint64 id = 1;
|
|
}
|
|
|
|
message EncoderConfig {}
|
|
|
|
message NewEncoderRequest {
|
|
EncoderConfig config = 1;
|
|
}
|
|
|
|
message NewEncoderReply {
|
|
uint64 id = 1;
|
|
}
|
|
|
|
message CloseInputRequest {
|
|
uint64 inputID = 1;
|
|
}
|
|
message CloseInputReply {}
|
|
message CloseOutputRequest {
|
|
uint64 outputID = 2;
|
|
}
|
|
message CloseOutputReply {}
|
|
|
|
message GetEncoderStatsRequest {
|
|
uint64 encoderID = 1;
|
|
}
|
|
|
|
message GetEncoderStatsReply {
|
|
uint64 bytesCountRead = 1;
|
|
uint64 bytesCountWrote = 2;
|
|
}
|
|
|
|
message StartEncodingRequest {
|
|
uint64 encoderID = 1;
|
|
uint64 inputID = 2;
|
|
uint64 outputID = 3;
|
|
}
|
|
message StartEncodingReply {}
|
|
|
|
message EncodingEndedChanRequest {
|
|
uint64 encoderID = 1;
|
|
}
|
|
message EncodingEndedChanReply {}
|