Add copyts, start_at_zero and use_wallclock_as_timestamps option

This commit is contained in:
Jan Stabenow 2023-02-14 16:53:05 +01:00
parent 8e07fcef80
commit b39e04ec68
No known key found for this signature in database
GPG Key ID: 9C22DD65A9AAF133
2 changed files with 34 additions and 1 deletions

View File

@ -2,6 +2,7 @@
## v1.6.0 > x.x.x
- Add copyts, start_at_zero and use_wallclock_as_timestamps option
- Add heuristic to find core address if UI is proxied
- Add Turkish translation (thanks to Ramazan Sancar) ([#22](https://github.com/datarhei/restreamer-ui/issues/22))
- Add Danish translation (Thanks to Filip Stadler and Info)

View File

@ -73,6 +73,9 @@ const initSettings = (initialSettings) => {
settings.general = {
fflags: ['genpts'],
thread_queue_size: 512,
copyts: false,
start_at_zero: false,
use_wallclock_as_timestamps: false,
...settings.general,
};
@ -180,6 +183,18 @@ const createInputs = (settings, config, skills) => {
input.options.push('-thread_queue_size', settings.general.thread_queue_size);
if (settings.general.copyts) {
input.options.push('-copyts');
}
if (settings.general.start_at_zero) {
input.options.push('-start_at_zero');
}
if (settings.general.use_wallclock_as_timestamps) {
input.options.push('-use_wallclock_as_timestamps', '1');
}
if (settings.mode === 'push') {
if (settings.push.type === 'hls') {
input.address = getLocalHLS(config);
@ -590,6 +605,23 @@ function Pull(props) {
<MultiSelectOption value="sortdts" name="sortdts" />
</MultiSelect>
</Grid>
<Grid item xs={12}>
<Checkbox
label={<Trans>copyts</Trans>}
checked={settings.general.copyts}
onChange={props.onChange('general', 'copyts')}
/>
<Checkbox
label={<Trans>start_at_zero</Trans>}
checked={settings.general.start_at_zero}
onChange={props.onChange('general', 'start_at_zero')}
/>
<Checkbox
label={<Trans>use_wallclock_as_timestamps</Trans>}
checked={settings.general.use_wallclock_as_timestamps}
onChange={props.onChange('general', 'use_wallclock_as_timestamps')}
/>
</Grid>
</Grid>
</AccordionDetails>
</Accordion>
@ -799,7 +831,7 @@ function Source(props) {
settings.rtsp[what] = value;
}
} else if (section === 'general') {
if ([].includes(what)) {
if (['copyts', 'start_at_zero', 'use_wallclock_as_timestamps'].includes(what)) {
settings.general[what] = !settings.general[what];
} else {
settings.general[what] = value;