Fix discards filter options if coder=copy + replaces 'none' with 'inherit'
This commit is contained in:
parent
9aaaf8e61b
commit
d4f8f25d65
@ -12,7 +12,7 @@ import Select from '../../Select';
|
||||
|
||||
function init(initialState) {
|
||||
const state = {
|
||||
value: 'none',
|
||||
value: 'inherit',
|
||||
...initialState,
|
||||
};
|
||||
|
||||
@ -43,9 +43,15 @@ function Pan(props) {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Select label={<Trans>Pan</Trans>} value={props.value} onChange={props.onChange}>
|
||||
<MenuItem value="none"><Trans>None</Trans></MenuItem>
|
||||
<MenuItem value="mute_left"><Trans>Mute left</Trans></MenuItem>
|
||||
<MenuItem value="mute_right"><Trans>Mute right</Trans></MenuItem>
|
||||
<MenuItem value="inherit">
|
||||
<Trans>Inherit</Trans>
|
||||
</MenuItem>
|
||||
<MenuItem value="mute_left">
|
||||
<Trans>Mute left</Trans>
|
||||
</MenuItem>
|
||||
<MenuItem value="mute_right">
|
||||
<Trans>Mute right</Trans>
|
||||
</MenuItem>
|
||||
</Select>
|
||||
<Typography variant="caption">
|
||||
<Trans>Mute a channel.</Trans>
|
||||
@ -107,9 +113,7 @@ const type = 'audio';
|
||||
const hwaccel = false;
|
||||
|
||||
function summarize(settings) {
|
||||
|
||||
|
||||
return `${name} (${settings.value.replace(/_/i, " ")})`;
|
||||
return `${name} (${settings.value.replace(/_/i, ' ')})`;
|
||||
}
|
||||
|
||||
function defaults() {
|
||||
|
||||
@ -12,7 +12,7 @@ import Select from '../../Select';
|
||||
|
||||
function init(initialState) {
|
||||
const state = {
|
||||
level: 'none',
|
||||
level: 'inherit',
|
||||
db: 0,
|
||||
...initialState,
|
||||
};
|
||||
@ -26,7 +26,7 @@ function createGraph(settings) {
|
||||
const mapping = [];
|
||||
|
||||
switch (settings.level) {
|
||||
case 'none':
|
||||
case 'inherit':
|
||||
break;
|
||||
case 'custom':
|
||||
mapping.push(`volume=volume=${settings.db}dB`);
|
||||
@ -42,8 +42,8 @@ function createGraph(settings) {
|
||||
function VolumeLevel(props) {
|
||||
return (
|
||||
<Select label={<Trans>Volume</Trans>} value={props.value} onChange={props.onChange}>
|
||||
<MenuItem value="none">
|
||||
<Trans>None</Trans>
|
||||
<MenuItem value="inherit">
|
||||
<Trans>Inherit</Trans>
|
||||
</MenuItem>
|
||||
<MenuItem value="10">10%</MenuItem>
|
||||
<MenuItem value="20">20%</MenuItem>
|
||||
|
||||
@ -647,7 +647,7 @@ const createInputsOutputs = (sources, profiles) => {
|
||||
|
||||
const local = profile.video.encoder.mapping.local.slice();
|
||||
|
||||
if (profile.video.filter.graph.length !== 0) {
|
||||
if (profile.video.encoder.coder !== 'copy' && profile.video.filter.graph.length !== 0) {
|
||||
// Check if there's already a video filter in the local mapping
|
||||
let filterIndex = local.indexOf('-filter:v');
|
||||
if (filterIndex !== -1) {
|
||||
@ -681,7 +681,7 @@ const createInputsOutputs = (sources, profiles) => {
|
||||
|
||||
const local = profile.audio.encoder.mapping.local.slice();
|
||||
|
||||
if (profile.audio.filter.graph.length !== 0) {
|
||||
if (profile.audio.encoder.coder !== 'copy' && profile.audio.filter.graph.length !== 0) {
|
||||
// Check if there's already a audio filter in the local mapping
|
||||
let filterIndex = local.indexOf('-filter:a');
|
||||
if (filterIndex !== -1) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user