srs/trunk/src
OSSRS-AI 1a96abc880
AI: API: Add audio_frames and video_frames to HTTP API. v7.0.122 (#4559) (#4564)
This PR adds separate audio and video frame counting to the HTTP API
(`/api/v1/streams/`) for better stream observability. The API now
reports three frame fields:
- `frames` - Total frames (video + audio)
- `video_frames` - Video frames/packets only
- `audio_frames` - Audio frames/packets only

This enhancement provides better visibility into stream composition and
helps detect issues with CBR/VBR streams, audio/video sync problems, and
codec-specific behavior.

**Before:**
```json
{
  "streams": [
    {
      "frames": 0, // video frames.
    }
  ]
}
```

**After:**
```json
{
  "streams": [
    {
      "frames": 6912, // video frames.
      "audio_frames": 5678, // audio frames.
      "video_frames": 1234, // video frames.
    }
  ]
}
```

Frame Counting Strategy
- All protocols report frames every N frames to balance accuracy and
performance
- Frames are counted at the protocol-specific message/packet level:
  - RTMP: Counts RTMP messages (video/audio)
  - WebRTC: Counts RTP packets (video/audio)
  - SRT: Counts MPEG-TS messages (H.264/HEVC/AAC)
2025-11-07 22:32:26 -05:00
..
app AI: API: Add audio_frames and video_frames to HTTP API. v7.0.122 (#4559) (#4564) 2025-11-07 22:32:26 -05:00
core AI: API: Add audio_frames and video_frames to HTTP API. v7.0.122 (#4559) (#4564) 2025-11-07 22:32:26 -05:00
kernel WHIP: Return detailed HTTP error responses with proper status codes. v7.0.121 (#4502) (#4562) 2025-11-07 21:05:41 -05:00
main Add ignore configuration for cursor. v7.0.115 (#4547) 2025-10-31 19:11:51 -04:00
protocol Add ignore configuration for cursor. v7.0.115 (#4547) 2025-10-31 19:11:51 -04:00
utest AI: API: Add audio_frames and video_frames to HTTP API. v7.0.122 (#4559) (#4564) 2025-11-07 22:32:26 -05:00