Skip to content

Added options for codecs, filters and formats#72

Merged
djthorpe merged 7 commits into
mainfrom
djt/0107/options
Jan 7, 2026
Merged

Added options for codecs, filters and formats#72
djthorpe merged 7 commits into
mainfrom
djt/0107/options

Conversation

@djthorpe

@djthorpe djthorpe commented Jan 7, 2026

Copy link
Copy Markdown
Member

This PR adds comprehensive FFmpeg AVOption API bindings to enable runtime inspection and configuration of codecs, filters, and formats. The implementation exposes options metadata through JSON APIs, making it possible for clients to discover and configure available options dynamically.

Key changes:

  • New AVOption API bindings in sys/ffmpeg80/avutil_opt.go with get/set functions for all FFmpeg option types (string, int, double, rational, pixel format, etc.)
  • Added PrivClass() methods to AVCodec, AVFilter, AVInputFormat, and AVOutputFormat to expose their option classes
  • Extended Codec, Filter, and Format schema types to include options lists in JSON responses

@djthorpe djthorpe self-assigned this Jan 7, 2026
Copilot AI review requested due to automatic review settings January 7, 2026 19:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive FFmpeg AVOption API bindings to enable runtime inspection and configuration of codecs, filters, and formats. The implementation exposes options metadata through JSON APIs, making it possible for clients to discover and configure available options dynamically.

Key changes:

  • New AVOption API bindings in sys/ffmpeg80/avutil_opt.go with get/set functions for all FFmpeg option types (string, int, double, rational, pixel format, etc.)
  • Added PrivClass() methods to AVCodec, AVFilter, AVInputFormat, and AVOutputFormat to expose their option classes
  • Extended Codec, Filter, and Format schema types to include options lists in JSON responses

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
sys/ffmpeg80/avutil_opt.go Implements comprehensive AVOption API bindings including getters, setters, iteration, serialization, and JSON marshaling for option metadata
sys/ffmpeg80/avutil_opt_test.go Adds 23 test functions covering all AVOption API operations (set/get for various types, iteration, serialization, JSON output)
sys/ffmpeg80/avcodec_codec.go Adds IsEncoder(), IsDecoder(), and PrivClass() methods; extends JSON output to include encoder/decoder flags
sys/ffmpeg80/avfilter_filter.go Adds PrivClass() method to expose filter options class
sys/ffmpeg80/avformat_input.go Adds PrivClass() method to expose input format options class
sys/ffmpeg80/avformat_output.go Adds PrivClass() method to expose output format options class
pkg/ffmpeg/schema/codec.go Extends Codec type with Opts field and custom JSON marshaling; adds help tags to request struct
pkg/ffmpeg/schema/filter.go Extends Filter type with Opts field and custom JSON marshaling; adds help tag to request struct
pkg/ffmpeg/schema/format.go Extends Format type with Opts field populated using FAKE_OBJ trick; adds help tags to request struct
pkg/ffmpeg/task/url.go Modifies OpenReader and OpenReaderFromURL to accept variadic extra options, maintaining backward compatibility
pkg/ffmpeg/task/probe.go Updates probe task to pass input options through to OpenReaderFromURL

Comment thread sys/ffmpeg80/avutil_opt_test.go
Comment thread sys/ffmpeg80/avutil_opt.go Outdated
Comment thread pkg/ffmpeg/schema/codec.go
Comment thread pkg/ffmpeg/schema/filter.go
@mutablelogic mutablelogic deleted a comment from codecov Bot Jan 7, 2026
@codecov

codecov Bot commented Jan 7, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

@djthorpe djthorpe merged commit aa64947 into main Jan 7, 2026
3 checks passed
@djthorpe djthorpe deleted the djt/0107/options branch January 7, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants