MCPcopy Create free account
hub / github.com/MusicPlayerDaemon/MPD / OpenHdcdFilter

Function OpenHdcdFilter

src/filter/plugins/HdcdFilterPlugin.cxx:24–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24static auto
25OpenHdcdFilter(AudioFormat &in_audio_format)
26{
27 Ffmpeg::FilterGraph graph;
28
29 auto &buffer_src =
30 Ffmpeg::MakeAudioBufferSource(in_audio_format,
31 *graph);
32
33 auto &buffer_sink = Ffmpeg::MakeAudioBufferSink(*graph);
34
35 graph.ParseSingleInOut(hdcd_graph, buffer_sink, buffer_src);
36 graph.CheckAndConfigure();
37
38 auto out_audio_format = in_audio_format;
39 // TODO: convert to 32 bit only if HDCD actually detected
40 out_audio_format.format = SampleFormat::S32;
41
42 return std::make_unique<FfmpegFilter>(in_audio_format,
43 out_audio_format,
44 std::move(graph),
45 buffer_src,
46 buffer_sink);
47}
48
49class PreparedHdcdFilter final : public PreparedFilter {
50public:

Callers 1

OpenMethod · 0.85

Calls 1

ParseSingleInOutMethod · 0.80

Tested by

no test coverage detected