This document provides an architectural overview of the Advanced Adaptive Media Player (AAMP). For comprehensive architectural details, design patterns, and module descriptions, refer to .github/instructions/aamp.instructions.md.
- Foundation: Built on GStreamer for low-level media handling
- Optimization: Designed for performance, memory efficiency, and embedded constraints
- Primary Use Case: Core playback engine for RDK-based devices
- Interface: Universal Video Engine (UVE) API provides JavaScript access to AAMP
- Implementation: WebKit Injectedbundle on RDK platforms
- Compatibility: Also available as API wrapper for non-RDK browsers
SOLID Design
- Single Responsibility: Each module has one clear purpose
- Open/Closed: Extend via interfaces, not by modifying core logic
- Liskov Substitution: Subtypes are interchangeable
- Interface Segregation: Small, specific interfaces
- Dependency Inversion: Depend on abstractions
Modern C++ Patterns
- RAII (Resource Acquisition Is Initialization) for all resources
- Smart pointers (
unique_ptr,shared_ptr) instead of raw pointers - Composition over inheritance
- Low cyclomatic complexity
Video Streaming Focus
- Low latency playback
- Correct buffering behavior
- Real-time performance guarantees
- Minimal memory footprint
- Fragment Collectors: HLS (
fragmentcollector_hls.cpp), DASH (fragmentcollector_mpd.cpp), Progressive MP4 - DRM Support: Clear Key, AES-128, PlayReady, Widevine
- Buffering & ABR: Adaptive bitrate management and buffer control
- Event Management: Event dispatching and listener coordination
- Diagnostics: Profiling, telemetry, and logging
AAMP uses a scheduler-based approach with worker threads for asynchronous operations:
- Fragment downloading happens on worker threads
- Main playback synchronization on GStreamer thread
- Thread-safe event handling through event manager
Configuration has priority order (lowest to highest):
- AAMP defaults in code
- Operator settings (RFC/ENV variables)
- Stream-provided settings
- Application settings
- Developer configuration (
/opt/aamp.cfg,/opt/aampcfg.json)
See CONFIGURATION.md for detailed options.
- AAMP Instructions - Deep architectural details
- C++ Guidelines - Coding standards
- Testing Strategy - L1 unit tests and test infrastructure