You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if grep -q -E '^ERROR:|^FATAL:|^0:[0-9]+:[0-9]+\.[0-9]+ [0-9]+ [^ ]+ (ERROR|FATAL)'"$check_log"2>/dev/null;then
683
+
rm -f "$filtered_log"2>/dev/null ||true
682
684
return 1
683
685
fi
684
-
685
-
# Check for pipeline failures (more specific patterns)
686
-
if grep -q -E "pipeline doesn't want to preroll|pipeline doesn't want to play|ERROR.*pipeline""$logfile"2>/dev/null;then
686
+
687
+
# Element-reported hard failures.
688
+
if grep -q -E 'ERROR: from element|gst.*ERROR|gst.*FATAL'"$check_log"2>/dev/null;then
689
+
rm -f "$filtered_log"2>/dev/null ||true
687
690
return 1
688
691
fi
689
-
690
-
# Check for state change failures (require ERROR context)
691
-
if grep -q -E "ERROR.*failed to change state|ERROR.*state change failed""$logfile"2>/dev/null;then
692
+
693
+
# Known fatal streaming / negotiation failures.
694
+
if grep -q -E 'Internal data stream error|streaming stopped, reason not-negotiated|not-negotiated'"$check_log"2>/dev/null;then
695
+
rm -f "$filtered_log"2>/dev/null ||true
692
696
return 1
693
697
fi
694
-
695
-
# Check for specific error patterns with proper grouping
696
-
if grep -q -E '(^ERROR:|ERROR: from element|Internal data stream error|streaming stopped, reason not-negotiated|pipeline.*failed|state change failed|Could not open resource|No such file or directory)'"$logfile"2>/dev/null;then
698
+
699
+
# Pipeline / state transition failures.
700
+
if grep -q -E "pipeline doesn't want to preroll|pipeline doesn't want to play|ERROR.*pipeline|ERROR.*failed to change state|ERROR.*state change failed|failed to change state|state change failed""$check_log"2>/dev/null;then
701
+
rm -f "$filtered_log"2>/dev/null ||true
697
702
return 1
698
703
fi
699
-
700
-
# Check for CRITICAL or FATAL level messages (keep these as they are actual severity indicators)
701
-
if grep -q -E '(^CRITICAL:|^FATAL:|gst.*(CRITICAL|FATAL))'"$logfile"2>/dev/null;then
704
+
705
+
# Resource / file failures.
706
+
if grep -q -E 'Could not open resource|No such file or directory|Failed to open|failed to open'"$check_log"2>/dev/null;then
707
+
rm -f "$filtered_log"2>/dev/null ||true
702
708
return 1
703
709
fi
704
-
710
+
711
+
rm -f "$filtered_log"2>/dev/null ||true
705
712
return 0
706
713
}
707
714
@@ -712,42 +719,94 @@ gstreamer_check_errors() {
712
719
gstreamer_validate_log() {
713
720
logfile="$1"
714
721
testname="${2:-test}"
715
-
722
+
716
723
[ -f"$logfile" ] || {
717
724
log_warn "$testname: Log file not found: $logfile"
718
725
return 1
719
726
}
720
-
727
+
721
728
if! gstreamer_check_errors "$logfile";then
722
-
log_fail "$testname: GStreamer errors detected in log"
log_fail "$testname: GStreamer fatal errors detected in log"
730
+
731
+
grep -E '^ERROR:|^FATAL:|ERROR: from element|gst.*ERROR|gst.*FATAL|Internal data stream error|streaming stopped, reason not-negotiated|not-negotiated|pipeline doesn'\''t want to preroll|pipeline doesn'\''t want to play|failed to change state|state change failed|Could not open resource|No such file or directory|Failed to open|failed to open' \
732
+
"$logfile"2>/dev/null | head -n 5 |while IFS= read -r line;do
733
+
[ -n"$line" ] && log_fail "$line"
734
+
done
735
+
736
+
if grep -q 'not-negotiated'"$logfile"2>/dev/null;then
737
+
log_fail " Reason: Format negotiation failed (caps mismatch)"
730
738
fi
731
-
732
-
# Check for specific failure reasons
733
-
if grep -q "not-negotiated""$logfile"2>/dev/null;then
734
-
log_fail " Reason: Format negotiation failed (caps mismatch)"
739
+
740
+
if grep -q -E 'Could not open resource|Failed to open|failed to open'"$logfile"2>/dev/null;then
741
+
log_fail " Reason: File or device access failed"
735
742
fi
736
-
737
-
if grep -q "Could not open""$logfile"2>/dev/null;then
738
-
log_fail "Reason: File or device access failed"
743
+
744
+
if grep -q 'No such file or directory'"$logfile"2>/dev/null;then
745
+
log_fail " Reason: File not found"
739
746
fi
740
-
741
-
if grep -q "No such file""$logfile"2>/dev/null;then
742
-
log_fail " Reason: File not found"
747
+
748
+
return 1
749
+
fi
750
+
751
+
filtered_log="${logfile}.filtered.$$"
752
+
check_log="$logfile"
753
+
754
+
# Ignore known benign warnings seen on successful downstream V4L2 decode paths.
0 commit comments