• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Eyevinn / mp4ff / 22222966201
83%

Build:
DEFAULT BRANCH: master
Ran 20 Feb 2026 11:50AM UTC
Jobs 1
Files 176
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Feb 2026 11:50AM UTC coverage: 82.742% (+0.1%) from 82.63%
22222966201

push

github

tobbee
feat: add streaming/incremental processing for fragmented MP4 files.

Add Copy method for StypBox and FtypBox.

Implements support for processing fragmented MP4 files incrementally without
loading entire files into memory. This is essential for handling large media
files, live streaming scenarios, and network streams where fragments arrive
over time.

Key components:

1. StreamFile API (stream.go)
   - DecodeStream/InitDecodeStream: Reads init segment (ftyp, moov) and stops
   - ProcessFragments: Iteratively processes fragments with callbacks
   - Sliding window memory management with configurable retention
   - Fragment lifecycle callbacks for processing and cleanup control

2. BoxSeekReader (boxseekreader.go)
   - Emulates seeking on non-seekable streams using buffered reading
   - Auto-growing buffer sized for current needs
   - Peek operations for looking ahead without consuming data

3. SampleAccessor interface
   - GetSample: Fetch individual samples (1-based indexing)
   - GetSampleRange: Fetch ranges of samples efficiently
   - GetSamples: Fetch all samples for a track

Buffer management:
- ReadFullBox returns a slice view of the buffer (no copy for performance)
- Callers must use data immediately before next operation
- ResetBuffer() explicitly clears buffer after parsing is complete
- Buffer clearing happens after box parsing, not during ReadFullBox
- For mdat seeks, ResetBuffer() called after seek to avoid buffer corruption

Testing:
- Comprehensive test suite using external black-box testing (mp4_test package)
- Tests cover streaming, callbacks, sliding windows, retention, sample access
- All tests use public API only per project guidelines

806 of 962 new or added lines in 7 files covered. (83.78%)

18435 of 22280 relevant lines covered (82.74%)

0.92 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
6
88.46
examples/stream-encrypt/encryptor.go
18
81.05
examples/stream-encrypt/refragment.go
27
76.52
examples/stream-encrypt/main.go
29
88.21
mp4/boxseekreader.go
76
82.88
mp4/stream.go
Jobs
ID Job ID Ran Files Coverage
1 22222966201.1 20 Feb 2026 11:50AM UTC 176
82.74
GitHub Action Run
Source Files on build 22222966201
  • Tree
  • List 176
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 780130b0 on github
  • Prev Build on master (#22160289151)
  • Next Build on master (#22225277811)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc