Files
monibuca/plugin/mp4/pb/mp4.proto
T
pg 5f9031c5f2 feat:
1.mp4 plugin support event record
2.mp4 plugin support auto overwrite oldest record file
fix:
1.mysql.go:error never use
2.rtsp/server.go:get url query param
3.device.go:update device to db omit deleted_at
2024-11-20 08:29:36 +08:00

104 lines
2.3 KiB
Protocol Buffer

syntax = "proto3";
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
package mp4;
option go_package="m7s.live/v5/plugin/mp4/pb";
service api {
rpc List (ReqRecordList) returns (ResponseList) {
option (google.api.http) = {
get: "/mp4/api/list/{streamPath=**}"
};
}
rpc Catalog (google.protobuf.Empty) returns (ResponseCatalog) {
option (google.api.http) = {
get: "/mp4/api/catalog"
};
}
rpc Delete (ReqRecordDelete) returns (ResponseDelete) {
option (google.api.http) = {
post: "/mp4/api/delete/{streamPath=**}"
body: "*"
};
}
rpc EventStart (ReqEventRecord) returns (ResponseEventRecord) {
option (google.api.http) = {
post: "/mp4/api/event/start"
body: "*"
};
}
}
message ReqRecordList {
string streamPath = 1;
string range = 2;
string start = 3;
string end = 4;
uint32 pageNum = 5;
uint32 pageSize = 6;
string recordMode = 7;
}
message RecordFile {
uint32 id = 1;
string filePath = 2;
string streamPath = 3;
google.protobuf.Timestamp startTime = 4;
google.protobuf.Timestamp endTime = 5;
}
message ResponseList {
int32 code = 1;
string message = 2;
uint32 totalCount = 3;
uint32 pageNum = 4;
uint32 pageSize = 5;
repeated RecordFile data = 6;
}
message Catalog {
string streamPath = 1;
uint32 count = 2;
google.protobuf.Timestamp startTime = 3;
google.protobuf.Timestamp endTime = 4;
}
message ResponseCatalog {
int32 code = 1;
string message = 2;
repeated Catalog data = 3;
}
message ReqRecordDelete {
string streamPath = 1;
repeated uint32 ids = 2;
string startTime = 3;
string endTime = 4;
string range = 5;
}
message ResponseDelete {
int32 code = 1;
string message = 2;
repeated RecordFile data = 3;
}
message ReqEventRecord {
string streamPath = 1;
string eventId = 2;
string recordMode = 3;//0=连续录像模式,1=事件录像模式
string eventName = 4;
string beforeDuration = 5;
string afterDuration = 6;
string eventDesc = 7;
string eventLevel = 8;//事件级别,0表示重要事件,无法删除且表示无需自动删除,1表示非重要事件,达到自动删除时间后,自动删除
string fragment = 9;
}
message ResponseEventRecord {
int32 code = 1;
string message = 2;
uint32 id = 3;
}