diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-10-28 08:58:35 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2026-02-16 01:19:06 +0100 |
| commit | 97dc9f9e9c1b6cbff63bed64ceb9d5a78d868f8b (patch) | |
| tree | a2cfde71be46c0fab076704f31480d41766760f2 /src/lib | |
| parent | 76574f93746b4f1a6ddfd1f80835b62d19b306d8 (diff) | |
Remove support for FFmpeg < 8.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/audio_filter_graph.cc | 14 | ||||
| -rw-r--r-- | src/lib/ffmpeg_content.cc | 8 | ||||
| -rw-r--r-- | src/lib/filter_graph.cc | 8 | ||||
| -rw-r--r-- | src/lib/video_filter_graph.cc | 5 |
4 files changed, 0 insertions, 35 deletions
diff --git a/src/lib/audio_filter_graph.cc b/src/lib/audio_filter_graph.cc index 25a0bc7f2..746ee68e3 100644 --- a/src/lib/audio_filter_graph.cc +++ b/src/lib/audio_filter_graph.cc @@ -79,29 +79,15 @@ AudioFilterGraph::src_parameters () const void AudioFilterGraph::set_parameters (AVFilterContext* context) const { -#ifdef DCPOMATIC_FFMPEG_8 int r = av_opt_set(context, "sample_formats", "fltp", AV_OPT_SEARCH_CHILDREN); -#else - AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }; - int r = av_opt_set_int_list (context, "sample_fmts", sample_fmts, AV_SAMPLE_FMT_NONE, AV_OPT_SEARCH_CHILDREN); -#endif DCPOMATIC_ASSERT (r >= 0); char ch_layout[64]; av_channel_layout_describe(&_channel_layout, ch_layout, sizeof(ch_layout)); -#ifdef DCPOMATIC_FFMPEG_8 r = av_opt_set(context, "channel_layouts", ch_layout, AV_OPT_SEARCH_CHILDREN); -#else - r = av_opt_set(context, "ch_layouts", ch_layout, AV_OPT_SEARCH_CHILDREN); -#endif DCPOMATIC_ASSERT (r >= 0); -#ifdef DCPOMATIC_FFMPEG_8 r = av_opt_set_array(context, "samplerates", AV_OPT_SEARCH_CHILDREN, 0, 1, AV_OPT_TYPE_INT, &_sample_rate); -#else - int sample_rates[] = { _sample_rate, -1 }; - r = av_opt_set_int_list (context, "sample_rates", sample_rates, -1, AV_OPT_SEARCH_CHILDREN); -#endif DCPOMATIC_ASSERT (r >= 0); } diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index 322553586..1bc824877 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -655,21 +655,13 @@ FFmpegContent::add_properties(shared_ptr<const Film> film, list<UserProperty>& p _("SMPTE 2085, Y'D'zD'x"), _("Chroma-derived non-constant luminance"), _("Chroma-derived constant luminance"), -#ifdef DCPOMATIC_FFMPEG_8 _("BT2100"), _("SMPTE ST 2128, IPT-C2"), _("YCgCo-R, even addition"), _("YCgCo-R, odd addition") -#else - _("BT2100") -#endif }; -#ifdef DCPOMATIC_FFMPEG_8 DCPOMATIC_ASSERT(AVCOL_SPC_NB == 18); -#else - DCPOMATIC_ASSERT(AVCOL_SPC_NB == 15); -#endif p.push_back(UserProperty(UserProperty::VIDEO, _("Colourspace"), spaces[_colorspace.get_value_or(AVCOL_SPC_UNSPECIFIED)])); diff --git a/src/lib/filter_graph.cc b/src/lib/filter_graph.cc index 60f046374..26f143360 100644 --- a/src/lib/filter_graph.cc +++ b/src/lib/filter_graph.cc @@ -80,24 +80,16 @@ FilterGraph::setup(vector<Filter> const& filters) throw DecodeError (N_("could not create buffer source")); } -#ifdef DCPOMATIC_FFMPEG_8 _buffer_sink_context = avfilter_graph_alloc_filter(_graph, buffer_sink, N_("out")); if (!_buffer_sink_context) { throw DecodeError(N_("could not allocate buffer sink.")); } -#else - if (avfilter_graph_create_filter (&_buffer_sink_context, buffer_sink, N_("out"), nullptr, nullptr, _graph) < 0) { - throw DecodeError (N_("could not create buffer sink.")); - } -#endif set_parameters (_buffer_sink_context); -#ifdef DCPOMATIC_FFMPEG_8 if (avfilter_init_dict(_buffer_sink_context, nullptr) < 0) { throw DecodeError(N_("could not initialise buffer sink.")); } -#endif auto outputs = avfilter_inout_alloc (); outputs->name = av_strdup(N_("in")); diff --git a/src/lib/video_filter_graph.cc b/src/lib/video_filter_graph.cc index 17b983c4d..9ead3c138 100644 --- a/src/lib/video_filter_graph.cc +++ b/src/lib/video_filter_graph.cc @@ -153,12 +153,7 @@ VideoFilterGraph::src_parameters () const void VideoFilterGraph::set_parameters (AVFilterContext* context) const { -#ifdef DCPOMATIC_FFMPEG_8 auto const r = av_opt_set(context, "pixel_formats", av_get_pix_fmt_name(_pixel_format), AV_OPT_SEARCH_CHILDREN); -#else - AVPixelFormat pix_fmts[] = { _pixel_format, AV_PIX_FMT_NONE }; - int r = av_opt_set_int_list (context, "pix_fmts", pix_fmts, AV_PIX_FMT_NONE, AV_OPT_SEARCH_CHILDREN); -#endif DCPOMATIC_ASSERT (r >= 0); } |
