mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
Fix CPU usage descripting mapping. Fixes #2682
This commit is contained in:
parent
e90da6c756
commit
701e57a580
@ -151,7 +151,9 @@ export const CurrentVariantsTable: FC = () => {
|
|||||||
dataIndex: 'cpuUsageLevel',
|
dataIndex: 'cpuUsageLevel',
|
||||||
key: 'cpuUsageLevel',
|
key: 'cpuUsageLevel',
|
||||||
render: (level: string, variant: VideoVariant) =>
|
render: (level: string, variant: VideoVariant) =>
|
||||||
!level || variant.videoPassthrough ? 'n/a' : ENCODER_PRESET_TOOLTIPS[level].split(' ')[0],
|
!level || variant.videoPassthrough
|
||||||
|
? 'n/a'
|
||||||
|
: ENCODER_PRESET_TOOLTIPS[level]?.split(' ')[0] || 'Warning: please edit & reset',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '',
|
title: '',
|
||||||
|
|||||||
@ -159,8 +159,8 @@ export const VideoVariantForm: FC<VideoVariantFormProps> = ({
|
|||||||
<Slider
|
<Slider
|
||||||
tipFormatter={value => ENCODER_PRESET_TOOLTIPS[value]}
|
tipFormatter={value => ENCODER_PRESET_TOOLTIPS[value]}
|
||||||
onChange={handleVideoCpuUsageLevelChange}
|
onChange={handleVideoCpuUsageLevelChange}
|
||||||
min={1}
|
min={0}
|
||||||
max={Object.keys(ENCODER_PRESET_SLIDER_MARKS).length}
|
max={Object.keys(ENCODER_PRESET_SLIDER_MARKS).length - 1}
|
||||||
marks={ENCODER_PRESET_SLIDER_MARKS}
|
marks={ENCODER_PRESET_SLIDER_MARKS}
|
||||||
defaultValue={dataState.cpuUsageLevel}
|
defaultValue={dataState.cpuUsageLevel}
|
||||||
value={dataState.cpuUsageLevel}
|
value={dataState.cpuUsageLevel}
|
||||||
|
|||||||
@ -424,16 +424,16 @@ export const VIDEO_BITRATE_SLIDER_MARKS = {
|
|||||||
// VIDEO VARIANT FORM - encoder preset
|
// VIDEO VARIANT FORM - encoder preset
|
||||||
// CPU
|
// CPU
|
||||||
export const ENCODER_PRESET_SLIDER_MARKS = {
|
export const ENCODER_PRESET_SLIDER_MARKS = {
|
||||||
1: {
|
0: {
|
||||||
style: {
|
style: {
|
||||||
marginLeft: '15px',
|
marginLeft: '15px',
|
||||||
},
|
},
|
||||||
label: <p>lowest</p>,
|
label: <p>lowest</p>,
|
||||||
},
|
},
|
||||||
|
1: '',
|
||||||
2: '',
|
2: '',
|
||||||
3: '',
|
3: '',
|
||||||
4: '',
|
4: {
|
||||||
5: {
|
|
||||||
style: {
|
style: {
|
||||||
marginLeft: '-15px',
|
marginLeft: '-15px',
|
||||||
},
|
},
|
||||||
@ -441,11 +441,11 @@ export const ENCODER_PRESET_SLIDER_MARKS = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
export const ENCODER_PRESET_TOOLTIPS = {
|
export const ENCODER_PRESET_TOOLTIPS = {
|
||||||
1: 'Lowest hardware usage - lowest quality video',
|
0: 'Lowest hardware usage - lowest quality video',
|
||||||
2: 'Low hardware usage - low quality video',
|
1: 'Low hardware usage - low quality video',
|
||||||
3: 'Medium hardware usage - average quality video',
|
2: 'Medium hardware usage - average quality video',
|
||||||
4: 'High hardware usage - high quality video',
|
3: 'High hardware usage - high quality video',
|
||||||
5: 'Highest hardware usage - higher quality video',
|
4: 'Highest hardware usage - higher quality video',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ENCODER_RECOMMENDATION_THRESHOLD = {
|
export const ENCODER_RECOMMENDATION_THRESHOLD = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user