diff --git a/README.md b/README.md index dc795dd..b9a8c67 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ cmake --build build **Verify binaries exist:** ```bash -ls -la build/{cvmmap_sim,cvmmap_streamer,rtp_receiver_tester,rtmp_stub_tester} +ls -la build/{cvmmap_streamer,rtp_receiver_tester,rtmp_stub_tester} ``` ### Mandatory Acceptance (Standalone) @@ -79,14 +79,17 @@ Run the fault injection and latency validation suite. **1. Start the simulator:** ```bash -./build/cvmmap_sim \ +./build/cvmmap_streamer \ + --run-mode pipeline \ + --codec h264 \ --shm-name test_stream \ --zmq-endpoint "ipc:///tmp/test_sync.ipc" \ - --label teststream \ - --frames 300 \ - --fps 30 \ - --width 640 \ - --height 360 + --input-mode dummy \ + --dummy-label teststream \ + --dummy-frames 300 \ + --dummy-fps 30 \ + --dummy-width 640 \ + --dummy-height 360 ``` **2. Test RTP output:** diff --git a/docs/caveats.md b/docs/caveats.md index c91a949..1360899 100644 --- a/docs/caveats.md +++ b/docs/caveats.md @@ -21,10 +21,10 @@ The cv-mmap simulator uses POSIX shared memory naming that imposes a 24-byte max Use compact deterministic labels: ```bash # Good (19 bytes) -./build/cvmmap_sim --label acc_1_rtp_h264 ... +./build/cvmmap_streamer --run-mode pipeline --input-mode dummy --dummy-label acc_1_rtp_h264 ... # Bad (28 bytes, will fail) -./build/cvmmap_sim --label acceptance_rtp_h264_test ... +./build/cvmmap_streamer --run-mode pipeline --input-mode dummy --dummy-label acceptance_rtp_h264_test ... ``` ### Deterministic Simulator Sizing @@ -37,11 +37,14 @@ Small frame sizes can trigger GStreamer caps negotiation failures before the fir **Recommended simulator parameters for validation:** ```bash -./build/cvmmap_sim \ - --width 640 \ - --height 360 \ - --fps 200 \ - --frames 320 +./build/cvmmap_streamer \ + --run-mode pipeline \ + --input-mode dummy \ + --dummy-label acc_1_rtp_h264 \ + --dummy-width 640 \ + --dummy-height 360 \ + --dummy-fps 200 \ + --dummy-frames 320 ``` ### Build Path Isolation @@ -266,7 +269,7 @@ cat .sisyphus/evidence/task-14-acceptance/RUN_ID/1-rtp_h264/streamer.log Before running scripts, verify all binaries are built: ```bash -for bin in cvmmap_sim cvmmap_streamer rtp_receiver_tester rtmp_stub_tester; do +for bin in cvmmap_streamer rtp_receiver_tester rtmp_stub_tester; do test -x "build/$bin" || echo "Missing: $bin" done ``` @@ -275,7 +278,7 @@ done ```bash # Test simulator only -./build/cvmmap_sim --help +./build/cvmmap_streamer --run-mode pipeline --help # Test streamer config validation only ./build/cvmmap_streamer --codec h264 --shm-name test --zmq-endpoint ipc:///tmp/test.ipc diff --git a/docs/compat_matrix.md b/docs/compat_matrix.md index 45c74b6..4366891 100644 --- a/docs/compat_matrix.md +++ b/docs/compat_matrix.md @@ -134,15 +134,17 @@ echo "Exit code: $?" --packet-threshold 1 \ --timeout-ms 10000 -# Terminal 2: Simulator + Streamer -./build/cvmmap_sim \ +# Terminal 2: Streamer in dummy input mode +./build/cvmmap_streamer \ + --run-mode pipeline \ + --input-mode dummy \ --shm-name test_rtp_h264 \ --zmq-endpoint "ipc:///tmp/test_rtp_h264.ipc" \ - --label rtp_h264 \ - --frames 320 \ - --fps 200 \ - --width 640 \ - --height 360 & + --dummy-label rtp_h264 \ + --dummy-frames 320 \ + --dummy-fps 200 \ + --dummy-width 640 \ + --dummy-height 360 & ./build/cvmmap_streamer \ --run-mode pipeline \ diff --git a/scripts/acceptance_standalone.sh b/scripts/acceptance_standalone.sh index 2a4dda5..d8e8ce0 100755 --- a/scripts/acceptance_standalone.sh +++ b/scripts/acceptance_standalone.sh @@ -126,23 +126,19 @@ run_matrix_row() { local sim_label="acc_${order}_${protocol}_${codec}" - local sim_cmd=( - "${BUILD_DIR}/cvmmap_sim" - --shm-name "${shm_name}" - --zmq-endpoint "${zmq_endpoint}" - --label "${sim_label}" - --frames 320 - --fps 200 - --width 640 - --height 360 - ) - local streamer_cmd=( "${BUILD_DIR}/cvmmap_streamer" --run-mode pipeline --codec "${codec}" --shm-name "${shm_name}" --zmq-endpoint "${zmq_endpoint}" + --input-mode dummy + --dummy-label "${sim_label}" + --dummy-frames 320 + --dummy-fps 200 + --dummy-width 640 + --dummy-height 360 + --dummy-startup-delay-ms 0 --queue-size 1 --gop 30 --b-frames 0 @@ -220,12 +216,7 @@ run_matrix_row() { cleanup_pids+=("${tester_pid}") sleep 1 - - "${sim_cmd[@]}" > "${sim_log}" 2>&1 & - local sim_pid=$! - cleanup_pids+=("${sim_pid}") - - sleep 1 + : > "${sim_log}" "${streamer_cmd[@]}" > "${streamer_log}" 2>&1 local streamer_rc=$? @@ -233,8 +224,7 @@ run_matrix_row() { wait_pid "${tester_pid}" 15 local tester_rc=$? - wait_pid "${sim_pid}" 15 - local sim_rc=$? + local sim_rc=0 row_end_ms="$(date +%s%3N)" duration_ms=$((row_end_ms - row_start_ms)) @@ -269,11 +259,10 @@ run_matrix_row() { } main() { - local required=( - "${BUILD_DIR}/cvmmap_sim" - "${BUILD_DIR}/cvmmap_streamer" - "${BUILD_DIR}/rtp_receiver_tester" - "${BUILD_DIR}/rtmp_stub_tester" +local required=( + "${BUILD_DIR}/cvmmap_streamer" + "${BUILD_DIR}/rtp_receiver_tester" + "${BUILD_DIR}/rtmp_stub_tester" ) local missing=() diff --git a/scripts/fault_suite.sh b/scripts/fault_suite.sh index 7dec350..e9947a7 100755 --- a/scripts/fault_suite.sh +++ b/scripts/fault_suite.sh @@ -205,26 +205,19 @@ run_fault_scenario() { local rtp_port rtp_port="$(scenario_port "${order}")" - local sim_cmd=( - "${BUILD_DIR}/cvmmap_sim" - --shm-name "${shm_name}" - --zmq-endpoint "${zmq_endpoint}" - --label "${sim_label}" - --frames "${sim_frames}" - --fps "${sim_fps}" - --width 640 - --height 360 - ) - if [[ -n "${reset_every}" ]]; then - sim_cmd+=(--emit-reset-every "${reset_every}") - fi - local streamer_cmd=( "${BUILD_DIR}/cvmmap_streamer" --run-mode pipeline --codec h264 --shm-name "${shm_name}" --zmq-endpoint "${zmq_endpoint}" + --input-mode dummy + --dummy-label "${sim_label}" + --dummy-frames "${sim_frames}" + --dummy-fps "${sim_fps}" + --dummy-width 640 + --dummy-height 360 + --dummy-startup-delay-ms 0 --queue-size 1 --gop 30 --b-frames 0 @@ -237,6 +230,9 @@ run_fault_scenario() { --rtp-payload-type 96 --rtp-sdp "${sdp_path}" ) + if [[ -n "${reset_every}" ]]; then + streamer_cmd+=(--dummy-reset-every "${reset_every}") + fi local tester_cmd=( "${BUILD_DIR}/rtp_receiver_tester" @@ -254,21 +250,14 @@ run_fault_scenario() { cleanup_pids+=("${tester_pid}") sleep 1 - - "${sim_cmd[@]}" > "${sim_log}" 2>&1 & - local sim_pid=$! - cleanup_pids+=("${sim_pid}") - - sleep 1 + : > "${sim_log}" "${streamer_cmd[@]}" > "${streamer_log}" 2>&1 local streamer_rc=$? wait_pid "${tester_pid}" 25 local tester_rc=$? - - wait_pid "${sim_pid}" 25 - local sim_rc=$? + local sim_rc=0 row_end_ms="$(date +%s%3N)" duration_ms=$((row_end_ms - row_start_ms)) @@ -300,9 +289,8 @@ run_fault_scenario() { main() { local required=( - "${BUILD_DIR}/cvmmap_sim" - "${BUILD_DIR}/cvmmap_streamer" - "${BUILD_DIR}/rtp_receiver_tester" + "${BUILD_DIR}/cvmmap_streamer" + "${BUILD_DIR}/rtp_receiver_tester" ) local missing=()