mirror of https://github.com/synctv-org/synctv
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
2.9 KiB
Protocol Buffer
83 lines
2.9 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package synctv.playback_provider.cloudreve;
|
|
|
|
import "proto/buf/validate/validate.proto";
|
|
import "proto/playback_provider/common.proto";
|
|
|
|
enum CloudreveHlsResourceKind {
|
|
CLOUDREVE_HLS_RESOURCE_KIND_UNSPECIFIED = 0;
|
|
CLOUDREVE_HLS_RESOURCE_KIND_MEDIA = 1;
|
|
CLOUDREVE_HLS_RESOURCE_KIND_MANIFEST = 2;
|
|
}
|
|
|
|
message GetCloudreveResourceRequest {
|
|
string version = 1 [(buf.validate.field).string.min_len = 1];
|
|
string mode_name = 2 [(buf.validate.field).string.min_len = 1];
|
|
uint32 media_index = 3;
|
|
string sig = 4 [(buf.validate.field).string.min_len = 1];
|
|
string uid = 5 [(buf.validate.field).string.min_len = 1];
|
|
string rid = 6 [(buf.validate.field).string.min_len = 1];
|
|
int64 exp = 7;
|
|
optional string range = 8;
|
|
bool head = 9;
|
|
}
|
|
|
|
message CloudreveResourceResponse {
|
|
synctv.playback_provider.common.StreamChunk chunk = 1;
|
|
}
|
|
|
|
message GetCloudreveHlsManifestRequest {
|
|
string version = 1 [(buf.validate.field).string.min_len = 1];
|
|
string mode_name = 2 [(buf.validate.field).string.min_len = 1];
|
|
uint32 media_index = 3;
|
|
string sig = 4 [(buf.validate.field).string.min_len = 1];
|
|
string uid = 5 [(buf.validate.field).string.min_len = 1];
|
|
string rid = 6 [(buf.validate.field).string.min_len = 1];
|
|
int64 exp = 7;
|
|
bool head = 8;
|
|
}
|
|
|
|
message CloudreveHlsManifestResponse {
|
|
synctv.playback_provider.common.StreamChunk chunk = 1;
|
|
}
|
|
|
|
message GetCloudreveHlsResourceRequest {
|
|
string version = 1 [(buf.validate.field).string.min_len = 1];
|
|
string target_url = 2 [(buf.validate.field).string.min_len = 1];
|
|
string sig = 3 [(buf.validate.field).string.min_len = 1];
|
|
string uid = 4 [(buf.validate.field).string.min_len = 1];
|
|
string rid = 5 [(buf.validate.field).string.min_len = 1];
|
|
int64 exp = 6;
|
|
optional string range = 7;
|
|
bool head = 8;
|
|
string mode_name = 9 [(buf.validate.field).string.min_len = 1];
|
|
uint32 media_index = 10;
|
|
CloudreveHlsResourceKind resource_kind = 11 [(buf.validate.field).enum.defined_only = true];
|
|
}
|
|
|
|
message CloudreveHlsResourceResponse {
|
|
synctv.playback_provider.common.StreamChunk chunk = 1;
|
|
}
|
|
|
|
message GetCloudreveSubtitleRequest {
|
|
string version = 1 [(buf.validate.field).string.min_len = 1];
|
|
string mode_name = 2 [(buf.validate.field).string.min_len = 1];
|
|
uint32 subtitle_index = 3;
|
|
string sig = 4 [(buf.validate.field).string.min_len = 1];
|
|
string uid = 5 [(buf.validate.field).string.min_len = 1];
|
|
string rid = 6 [(buf.validate.field).string.min_len = 1];
|
|
int64 exp = 7;
|
|
}
|
|
|
|
message CloudreveSubtitleResponse {
|
|
synctv.playback_provider.common.StreamChunk chunk = 1;
|
|
}
|
|
|
|
service CloudrevePlaybackProviderService {
|
|
rpc GetResource(GetCloudreveResourceRequest) returns (stream CloudreveResourceResponse);
|
|
rpc GetHlsManifest(GetCloudreveHlsManifestRequest) returns (stream CloudreveHlsManifestResponse);
|
|
rpc GetHlsResource(GetCloudreveHlsResourceRequest) returns (stream CloudreveHlsResourceResponse);
|
|
rpc GetSubtitle(GetCloudreveSubtitleRequest) returns (stream CloudreveSubtitleResponse);
|
|
}
|