Skip to content

Make probe result objects more immutable #384

Description

@bramp

Probe result objects (FFmpegProbeResult, FFmpegStream, FFmpegFormat, etc.) are currently mutable — fields are public and collections (e.g., streams list, tags map) are modifiable after construction.

We should make these objects more immutable to prevent accidental modification and improve thread safety.

This is part of the API modernization discussed in #316.

Scope:

  • Return unmodifiable collections from getter methods (e.g., Collections.unmodifiableList() for streams)
  • Consider making fields final where possible
  • Ensure Gson deserialization still works (may need custom deserializers or builder pattern)

Depends on: #382, #383
Related: #316

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions