-
Notifications
You must be signed in to change notification settings - Fork 2
Added httpclient #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Added httpclient #73
Conversation
There was a problem hiding this comment.
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 a new HTTP client package for the FFmpeg API, enabling remote execution of FFmpeg operations via HTTP endpoints. The implementation follows the existing client pattern used in pkg/chromaprint/client.go.
Key changes:
- Created
pkg/ffmpeg/httpclientpackage with Client struct embeddinggo-client.Client - Implemented
ListAudioChannelLayoutsmethod to fetch audio channel layout information via HTTP - Integrated client into gomedia CLI tool with optional endpoint configuration via
--urlflag orGOMEDIA_ENDPOINTenvironment variable
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/ffmpeg/httpclient/client.go | Defines Client struct and New() constructor for creating HTTP clients with endpoint configuration |
| pkg/ffmpeg/httpclient/opts.go | Defines options pattern infrastructure (opt struct, Opt type, applyOpts function) |
| pkg/ffmpeg/httpclient/list.go | Implements ListAudioChannelLayouts method for fetching audio channel layouts via HTTP |
| cmd/gomedia/main.go | Adds Client() method to Globals for lazy HTTP client initialization with debug tracing support |
| cmd/gomedia/list.go | Updates ListAudioChannelsCommand to use HTTP client when endpoint is configured, falling back to local manager |
This PR adds a new HTTP client package for the FFmpeg API, enabling remote execution of FFmpeg operations via HTTP endpoints. The implementation follows the existing client pattern used in pkg/chromaprint/client.go.
Key changes: