mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-03-26 04:46:35 +08:00
feat: 支持硬件编码能力测试,otg 自检修改为需要手动执行
This commit is contained in:
@@ -177,6 +177,31 @@ export interface StreamConstraintsResponse {
|
||||
current_mode: string
|
||||
}
|
||||
|
||||
export interface VideoEncoderSelfCheckCodec {
|
||||
id: string
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface VideoEncoderSelfCheckCell {
|
||||
codec_id: string
|
||||
ok: boolean
|
||||
elapsed_ms?: number | null
|
||||
}
|
||||
|
||||
export interface VideoEncoderSelfCheckRow {
|
||||
resolution_id: string
|
||||
resolution_label: string
|
||||
width: number
|
||||
height: number
|
||||
cells: VideoEncoderSelfCheckCell[]
|
||||
}
|
||||
|
||||
export interface VideoEncoderSelfCheckResponse {
|
||||
current_hardware_encoder: string
|
||||
codecs: VideoEncoderSelfCheckCodec[]
|
||||
rows: VideoEncoderSelfCheckRow[]
|
||||
}
|
||||
|
||||
export const streamApi = {
|
||||
status: () =>
|
||||
request<{
|
||||
@@ -217,6 +242,9 @@ export const streamApi = {
|
||||
getConstraints: () =>
|
||||
request<StreamConstraintsResponse>('/stream/constraints'),
|
||||
|
||||
encoderSelfCheck: () =>
|
||||
request<VideoEncoderSelfCheckResponse>('/video/encoder/self-check'),
|
||||
|
||||
setBitratePreset: (bitrate_preset: import('@/types/generated').BitratePreset) =>
|
||||
request<{ success: boolean; message?: string }>('/stream/bitrate', {
|
||||
method: 'POST',
|
||||
|
||||
Reference in New Issue
Block a user