From 9d666e0879e45331cb79527832e1d14003deca31 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Mon, 29 Apr 2024 15:54:17 +0200 Subject: [PATCH] Fix missing stream URL, summarize streams in probe log, don't lock type for first stream --- src/misc/coders/settings/Video.js | 38 +++++++++++++++++++++++++++++++ src/misc/modals/Hint.js | 12 +++++++--- src/utils/metadata.js | 2 ++ src/views/Edit/Profile.js | 33 +++++++++++++++++++++++++-- 4 files changed, 80 insertions(+), 5 deletions(-) diff --git a/src/misc/coders/settings/Video.js b/src/misc/coders/settings/Video.js index dacf3f1..7b77963 100644 --- a/src/misc/coders/settings/Video.js +++ b/src/misc/coders/settings/Video.js @@ -327,6 +327,43 @@ Format.defaultProps = { onChange: function (event) {}, }; +function PixFormat(props) { + const { i18n } = useLingui(); + const sizes = [ + { value: 'yuv420p', label: 'yuv420p' }, + { value: 'nv12', label: 'nv12' }, + ]; + + if (props.allowAuto === true) { + sizes.unshift({ value: 'auto', label: 'auto' }); + } + + if (props.allowCustom === true) { + sizes.push({ value: 'custom', label: i18n._(t`Custom ...`) }); + } + + return ( + + ); +} + +PixFormat.defaultProps = { + allowAuto: false, + allowCustom: false, + variant: 'outlined', + label: Pixel Format, + customLabel: Custom format, + onChange: function (event) {}, +}; + function FpsMode(props) { return ( Type} value={props.stream.type} onChange={handleChange('type')} disabled={props.locked}> + @@ -87,6 +91,9 @@ const Stream = function (props) { + + + )} @@ -95,7 +102,6 @@ const Stream = function (props) { Stream.defaultProps = { stream: {}, - locked: false, onChange: () => {}, }; @@ -138,7 +144,7 @@ const Streams = function (props) { Stream {stream.stream} - + {index > 0 && (