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

Eyevinn / mp4ff / 18874849030 / 1
82%
master: 82%

Build:
Build:
LAST BUILD BRANCH: sphericalv1
DEFAULT BRANCH: master
Ran 28 Oct 2025 12:32PM UTC
Files 174
Run time 7s
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

28 Oct 2025 12:30PM UTC coverage: 81.601% (+0.1%) from 81.501%
18874849030.1

Pull #465

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
Pull Request #465: Stream process support with example for on-the-fly MP4 encryption and refragmentation

18015 of 22077 relevant lines covered (81.6%)

0.9 hits per line

Source Files on job 18874849030.1
  • Tree
  • List 174
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 18874849030
  • 1d446eda on github
  • Prev Job for on stream-process (#18166478260.1)
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