Skip to content

Commit

Permalink
Videostream: fix stderr detection
Browse files Browse the repository at this point in the history
  • Loading branch information
stephendade committed Nov 14, 2023
1 parent 96f3437 commit 31060e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/videostream.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class videoStream {
getVideoDevices (callback) {
// get all video device details
exec('python3 ./python/gstcaps.py', (error, stdout, stderr) => {
if (stderr && !stderr.includes('DeprecationWarning') && !stderr.includes('gst_element_message_full_with_details' &&
!stderr.includes('camera_manager.cpp') && !stderr.includes('Unsupported V4L2 pixel format'))) {
const warnstrings = ['DeprecationWarning', 'gst_element_message_full_with_details', 'camera_manager.cpp', 'Unsupported V4L2 pixel format']
if (stderr && !warnstrings.some(wrn => stderr.includes(wrn))) {
console.error(`exec error: ${error}`)
this.winston.error('Error in getVideoDevices() ', { message: stderr })
return callback(stderr)
Expand Down

0 comments on commit 31060e7

Please sign in to comment.