forked from Keylost/jetson-ffmpeg
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
G.J.R. Timmer edited this page Jun 16, 2026
·
1 revision
libnvmpi source files follow a naming convention that keeps each file focused on one concern. The convention applies to both the decoder and encoder.
nvmpi_{codec}_{concern}.cpp where {codec} is dec or enc:
| Concern | Suffix | Decoder | Encoder |
|---|---|---|---|
| Public API | _api |
nvmpi_dec_api.cpp |
nvmpi_enc_api.cpp |
| Capture/output loop |
_capture / _output
|
nvmpi_dec_capture.cpp |
nvmpi_enc_output.cpp |
| V4L2 plane management | _planes |
nvmpi_dec_planes.cpp |
— |
| Internal header | _internal.h |
nvmpi_dec_internal.h |
nvmpi_enc_internal.h |
Shared infrastructure:
| File | Contents |
|---|---|
NVMPI_bufPool.hpp |
Generic thread-safe producer/consumer buffer pool (header-only template) |
nvmpi_frame_buffer.hpp / .cpp
|
DMA buffer allocation and destruction |
-
Internal headers (
*_internal.h) hold the context struct (nvmpictx) and internal forward declarations. Located insrc/, NOT installed. -
Public API (
include/nvmpi.h) is the only installed header — no ABI break from internal refactors. - Each
.cppfile must be independently compilable — no circular includes. -
CMakeLists.txtlists source files explicitly (no globs). - When to split further: a file exceeds ~500 lines or gains a new logical concern (e.g., a new thread, a new V4L2 device interaction).
include/nvmpi.h <- public, installed
include/NVMPI_bufPool.hpp <- public (used by both dec and enc)
include/nvmpi_frame_buffer.hpp
src/nvmpi_dec_internal.h <- private, includes all of the above + NVIDIA headers
src/nvmpi_dec_api.cpp <- includes nvmpi_dec_internal.h
src/nvmpi_dec_capture.cpp <- includes nvmpi_dec_internal.h
src/nvmpi_dec_planes.cpp <- includes nvmpi_dec_internal.h
The encoder follows the same modular pattern:
| File | Concern |
|---|---|
src/nvmpi_enc_api.cpp |
Public API (create, put_frame, get_packet, close, packet pool ops) |
src/nvmpi_enc_output.cpp |
DQ-thread callback, output-plane DMA buffer setup |
src/nvmpi_enc_internal.h |
Context struct, macros (TEST_ERROR, MAX_BUFFERS, OUTPLANE_MEMTYPE_*), forward declarations |
🏠 Home · 📦 Repository · 🐞 Issues · 🏷 Releases · 📋 README · 📝 CHANGELOG
Documentation lives in this wiki. To change a doc, edit the relevant wiki page (clone jetson-ffmpeg.wiki.git) — the docs/ folder in the repo has been retired.
📦 Usage & Runtime
❓ FAQ
- Overview
- Hardware & Platform
- Versions & Compatibility
- Build & Install
- Performance
- Features & Fork Differences
🛠 Development
⚙️ CI / Infrastructure
- GitHub Actions
- GitLab CI
- GitHub Runner — Manual
- GitHub Runner — Kubernetes
- GitLab Runner — Manual
- GitLab Runner — Kubernetes
- Release Process
🔬 Project / Fork Analysis