Skip to content

Commit

Permalink
multimedia/wf-recorder: unbreak build with ffmpeg 7.0
Browse files Browse the repository at this point in the history
../src/frame-writer.cpp:458:19: error: no member named 'channel_layouts' in 'AVCodec'; did you mean 'ch_layouts'?
      if (!codec->channel_layouts)
                  ^~~~~~~~~~~~~~~
                  ch_layouts
/usr/local/include/libavcodec/codec.h:230:28: note: 'ch_layouts' declared here
    const AVChannelLayout *ch_layouts;
                           ^
../src/frame-writer.cpp:461:23: error: no member named 'channel_layouts' in 'AVCodec'; did you mean 'ch_layouts'?
          if (!codec->channel_layouts[i])
                      ^~~~~~~~~~~~~~~
                      ch_layouts
/usr/local/include/libavcodec/codec.h:230:28: note: 'ch_layouts' declared here
    const AVChannelLayout *ch_layouts;
                           ^
../src/frame-writer.cpp:461:15: error: invalid argument type 'const AVChannelLayout' to unary expression
          if (!codec->channel_layouts[i])
              ^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/frame-writer.cpp:463:22: error: no member named 'channel_layouts' in 'AVCodec'; did you mean 'ch_layouts'?
          if (codec->channel_layouts[i] == AV_CH_LAYOUT_STEREO)
                     ^~~~~~~~~~~~~~~
                     ch_layouts
/usr/local/include/libavcodec/codec.h:230:28: note: 'ch_layouts' declared here
    const AVChannelLayout *ch_layouts;
                           ^
../src/frame-writer.cpp:463:41: error: invalid operands to binary expression ('const AVChannelLayout' and 'unsigned long long')
          if (codec->channel_layouts[i] == AV_CH_LAYOUT_STEREO)
              ~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~
../src/frame-writer.cpp:464:29: error: no member named 'channel_layouts' in 'AVCodec'; did you mean 'ch_layouts'?
              return codec->channel_layouts[i];
                            ^~~~~~~~~~~~~~~
                            ch_layouts
/usr/local/include/libavcodec/codec.h:230:28: note: 'ch_layouts' declared here
    const AVChannelLayout *ch_layouts;
                           ^
../src/frame-writer.cpp:464:22: error: no viable conversion from returned value of type 'const AVChannelLayout' to function return type 'uint64_t' (aka 'unsigned long')
              return codec->channel_layouts[i];
                     ^~~~~~~~~~~~~~~~~~~~~~~~~
../src/frame-writer.cpp:467:21: error: no member named 'channel_layouts' in 'AVCodec'; did you mean 'ch_layouts'?
      return codec->channel_layouts[0];
                    ^~~~~~~~~~~~~~~
                    ch_layouts
/usr/local/include/libavcodec/codec.h:230:28: note: 'ch_layouts' declared here
    const AVChannelLayout *ch_layouts;
                           ^
../src/frame-writer.cpp:467:14: error: no viable conversion from returned value of type 'const AVChannelLayout' to function return type 'uint64_t' (aka 'unsigned long')
      return codec->channel_layouts[0];
             ^~~~~~~~~~~~~~~~~~~~~~~~~
../src/frame-writer.cpp:542:20: error: no member named 'channel_layout' in 'AVCodecContext'
    audioCodecCtx->channel_layout = get_codec_channel_layout(codec);
    ~~~~~~~~~~~~~  ^
../src/frame-writer.cpp:545:20: error: no member named 'channels' in 'AVCodecContext'
    audioCodecCtx->channels = av_get_channel_layout_nb_channels(audioCodecCtx->channel_layout);
    ~~~~~~~~~~~~~  ^
../src/frame-writer.cpp:545:80: error: no member named 'channel_layout' in 'AVCodecContext'
    audioCodecCtx->channels = av_get_channel_layout_nb_channels(audioCodecCtx->channel_layout);
                                                                ~~~~~~~~~~~~~  ^
../src/frame-writer.cpp:568:5: error: use of undeclared identifier 'av_opt_set_channel_layout'; did you mean 'av_opt_set_chlayout'?
    av_opt_set_channel_layout(swrCtx, "in_channel_layout", AV_CH_LAYOUT_STEREO, 0);
    ^~~~~~~~~~~~~~~~~~~~~~~~~
    av_opt_set_chlayout
/usr/local/include/libavutil/opt.h:789:5: note: 'av_opt_set_chlayout' declared here
int av_opt_set_chlayout(void *obj, const char *name, const AVChannelLayout *layout, int search_flags);
    ^
../src/frame-writer.cpp:568:60: error: cannot initialize a parameter of type 'const AVChannelLayout *' with an rvalue of type 'unsigned long long'
    av_opt_set_channel_layout(swrCtx, "in_channel_layout", AV_CH_LAYOUT_STEREO, 0);
                                                           ^~~~~~~~~~~~~~~~~~~
/usr/local/include/libavutil/channel_layout.h:205:40: note: expanded from macro 'AV_CH_LAYOUT_STEREO'
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/libavutil/opt.h:789:77: note: passing argument to parameter 'layout' here
int av_opt_set_chlayout(void *obj, const char *name, const AVChannelLayout *layout, int search_flags);
                                                                            ^
../src/frame-writer.cpp:569:76: error: no member named 'channel_layout' in 'AVCodecContext'
    av_opt_set_channel_layout(swrCtx, "out_channel_layout", audioCodecCtx->channel_layout, 0);
                                                            ~~~~~~~~~~~~~  ^
../src/frame-writer.cpp:859:13: error: no member named 'channel_layout' in 'AVFrame'
    inputf->channel_layout = AV_CH_LAYOUT_STEREO;
    ~~~~~~  ^
../src/frame-writer.cpp:868:14: error: no member named 'channel_layout' in 'AVFrame'
    outputf->channel_layout = audioCodecCtx->channel_layout;
    ~~~~~~~  ^
../src/frame-writer.cpp:868:46: error: no member named 'channel_layout' in 'AVCodecContext'
    outputf->channel_layout = audioCodecCtx->channel_layout;
                              ~~~~~~~~~~~~~  ^

Reported by:	antoine (via bug 278705 exp-run)
  • Loading branch information
jbeich committed May 11, 2024
1 parent 874d8e4 commit 28ed4a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions multimedia/wf-recorder/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ PORTREVISION= 1
CATEGORIES= multimedia wayland
MASTER_SITES= https://github.com/ammen99/wf-recorder/releases/download/v${DISTVERSION}/

PATCH_SITES= https://github.com/ammen99/${PORTNAME}/commit/
PATCHFILES+= 239829231e6b.patch:-p1 # https://github.com/ammen99/wf-recorder/pull/262

MAINTAINER= ports@FreeBSD.org
COMMENT= Screen recorder for wlroots-based compositors
WWW= https://github.com/ammen99/wf-recorder
Expand Down
2 changes: 2 additions & 0 deletions multimedia/wf-recorder/distinfo
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
TIMESTAMP = 1693891097
SHA256 (wf-recorder-0.4.1.tar.xz) = 502ba54db8aaf5ebd280738f065c73409694a1440b9a660ef5c4e398714c51f7
SIZE (wf-recorder-0.4.1.tar.xz) = 26184
SHA256 (239829231e6b.patch) = a3542558964c088cd88da521aaa4708b9cb8246803dd8a6367dff25b9c4b3f40
SIZE (239829231e6b.patch) = 4075

0 comments on commit 28ed4a3

Please sign in to comment.