Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Plumb through a list of key-value pair options to the ffmpeg demuxer#2

Open
boolemancer wants to merge 1 commit into
luthfiampas:mainfrom
boolemancer:boolemancer/plumb_demuxer_options
Open

Plumb through a list of key-value pair options to the ffmpeg demuxer#2
boolemancer wants to merge 1 commit into
luthfiampas:mainfrom
boolemancer:boolemancer/plumb_demuxer_options

Conversation

@boolemancer

Copy link
Copy Markdown

I stumbled across the library and it seemed like it would be pretty useful, but for my scenario, I needed a way to set some specific demuxer options (see here for examples).

To that end, I added an optional parameter when loading a file to pass a set of key-value pairs that eventually get passed to avformat_open_input, and figured I'd share the changes if you find them useful.

@luthfiampas

luthfiampas commented Oct 12, 2021

Copy link
Copy Markdown
Owner

Hello @boolemancer
Thank you very much. Sorry for the late response, I've been very busy lately.

I'm okay with the demuxer options in the FFmpeg decoder. But I think, we should not explicitly declare FFmpegDecoderOptions in the AudioPlayer. Also, adding IReadOnlyDictionary<string, string> parameter in the IAudioPlayer's Load method seems little bit hackish to me, the IAudioPlayer interface should not know FFmpeg things.

Based on the current design, we have 2 solutions:

  1. User need to create custom AudioPlayer class that override CreateDecoder method
  2. Or, we can add an optional IAudioDecoder factory method, or a function that constructs and returns IAudioDecoder instance in AudioPlayer's constructor

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants