Skip to content

Architecture Overview

TamKungZ_ edited this page Mar 5, 2026 · 1 revision

Public API layer

  • CodecMedia (factory)
  • CodecMediaEngine (interface with all supported operations)
  • CodecMediaException (checked exception)

Data models (model package)

Core records returned by API:

  • ProbeResult
  • StreamInfo
  • Metadata
  • ExtractionResult
  • ConversionResult
  • PlaybackResult
  • ValidationResult

Enums:

  • MediaType: AUDIO, VIDEO, IMAGE, CONTAINER, UNKNOWN
  • StreamKind: AUDIO, VIDEO, SUBTITLE, DATA, UNKNOWN

Options (options package)

  • AudioExtractOptions(targetFormat, bitrateKbps, streamIndex)
  • ConversionOptions(targetFormat, preset, overwrite)
  • PlaybackOptions(dryRun, allowExternalApp)
  • ValidationOptions(strict, maxBytes)

Internal implementation

StubCodecMediaEngine orchestrates parsers and conversion routes.

Notable internal areas:

  • internal/audio/* for MP3/OGG/WAV probing
  • internal/image/* for PNG/JPEG/WebP/BMP/TIFF/HEIF probing
  • internal/video/* for MOV/MP4/WebM probing
  • internal/convert/* conversion routing and converter dispatch

Clone this wiki locally