diff --git a/src/misc/Progress.js b/src/misc/Progress.js
index c5a58c6..f07f044 100644
--- a/src/misc/Progress.js
+++ b/src/misc/Progress.js
@@ -28,6 +28,8 @@ function init(props) {
drop: 0,
dup: 0,
frames: 0,
+ cpu: 0,
+ memory: 0,
...props,
};
@@ -54,6 +56,32 @@ export default function Progress(props) {
+
+
+
+ %
+
+
+
+ CPU
+
+
+
+
+
+
+
+
+ MB
+
+
+
+ Memory
+
+
+
+
+
diff --git a/src/misc/modals/Process.js b/src/misc/modals/Process.js
index 3eee837..37645f9 100644
--- a/src/misc/modals/Process.js
+++ b/src/misc/modals/Process.js
@@ -38,11 +38,26 @@ const initLogdata = (logdata) => {
logdata = {};
}
- return {
+ const data = {
+ command: [],
prelude: [],
log: [],
...logdata,
};
+
+ if (!Array.isArray(data.command)) {
+ data.command = [];
+ }
+
+ if (!Array.isArray(data.prelude)) {
+ data.prelude = [];
+ }
+
+ if (!Array.isArray(data.prelude)) {
+ data.prelude = [];
+ }
+
+ return data;
};
const formatLogline = (entry) => {
@@ -65,7 +80,10 @@ const formatLogline = (entry) => {
const Component = function (props) {
const classes = useStyles();
- const logdata = initLogdata(props.logdata);
+ const logdata = initLogdata({
+ ...props.logdata,
+ command: props.progress?.command,
+ });
return (
@@ -77,6 +95,15 @@ const Component = function (props) {
+
+ Command
+
+
+
+
+
+
+
Banner
diff --git a/src/utils/restreamer.js b/src/utils/restreamer.js
index 71d31c3..c60bf16 100644
--- a/src/utils/restreamer.js
+++ b/src/utils/restreamer.js
@@ -1,7 +1,7 @@
import { i18n } from '@lingui/core';
import { t } from '@lingui/macro';
import { v4 as uuidv4 } from 'uuid';
-import { jwtDecode } from "jwt-decode";
+import { jwtDecode } from 'jwt-decode';
import Handlebars from 'handlebars/dist/cjs/handlebars';
import SemverSatisfies from 'semver/functions/satisfies';
import SemverGt from 'semver/functions/gt';
@@ -3328,6 +3328,9 @@ class Restreamer {
frames: 0,
drop: 0,
dup: 0,
+ command: [],
+ cpu: 0,
+ memory: 0,
};
if (state === null) {
@@ -3336,6 +3339,7 @@ class Restreamer {
progress.valid = true;
progress.order = state.order;
+ progress.command = state.command.slice();
const fps = state.progress.fps || 0;
@@ -3367,6 +3371,8 @@ class Restreamer {
progress.frames = state.progress.frames || 0;
progress.drop = state.progress.drop || 0;
progress.dup = state.progress.dup || 0;
+ progress.cpu = state.cpu_usage || 0;
+ progress.memory = state.memory_bytes || 0;
}
return progress;