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