Open boolemancer opened 3 years ago
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:
AudioPlayer
class that override CreateDecoder
methodIAudioDecoder
factory method, or a function that constructs and returns IAudioDecoder
instance in AudioPlayer
's constructor
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.