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
# Returns: 0 if no critical errors found, 1 if errors found
505
+
# Checks for common GStreamer ERROR patterns that indicate failure
506
+
gstreamer_check_errors() {
507
+
logfile="$1"
508
+
509
+
[ -f"$logfile" ] ||return 0
510
+
511
+
# Check for critical ERROR messages
512
+
if grep -q -E "^ERROR:|ERROR: from element|Internal data stream error|streaming stopped, reason not-negotiated|Could not open|No such file|Permission denied|Failed to|Cannot""$logfile"2>/dev/null;then
513
+
return 1
514
+
fi
515
+
516
+
# Check for pipeline preroll failures
517
+
if grep -q -E "pipeline doesn't want to preroll|pipeline doesn't want to play""$logfile"2>/dev/null;then
518
+
return 1
519
+
fi
520
+
521
+
# Check for state change failures
522
+
if grep -q -E "failed to change state|state change failed""$logfile"2>/dev/null;then
523
+
return 1
524
+
fi
525
+
526
+
return 0
527
+
}
528
+
529
+
# -------------------- GStreamer log validation with detailed reporting --------------------
530
+
# gstreamer_validate_log <logfile> <testname>
531
+
# Returns: 0 if validation passes, 1 if errors found
532
+
# Logs detailed error information if errors are detected
533
+
gstreamer_validate_log() {
534
+
logfile="$1"
535
+
testname="${2:-test}"
536
+
537
+
[ -f"$logfile" ] || {
538
+
log_warn "$testname: Log file not found: $logfile"
539
+
return 1
540
+
}
541
+
542
+
if! gstreamer_check_errors "$logfile";then
543
+
log_fail "$testname: GStreamer errors detected in log"
0 commit comments