Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: add vscode dev container config file #3041

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rickstaa
Copy link
Contributor

@rickstaa rickstaa commented May 4, 2024

What does this pull request do? Explain your changes. (required)

This is my first attempt at creating a working Vscode dev container for the go-livepeer repository. This development container will greatly simplify me dev workflow in cases where the AI subnet fails inside a container but not when using the binary.

Specific updates (required)

How did you test each of these updates (required)

Does this pull request close any open issues?

Checklist:

This commit adds an initial dev container configuration file.
@rickstaa rickstaa marked this pull request as draft May 4, 2024 14:00
@github-actions github-actions bot added the AI Issues and PR related to the AI-video branch. label May 4, 2024
@rickstaa
Copy link
Contributor Author

rickstaa commented May 4, 2024

@eliteprox, @ad-astra-video, I've been setting up a development container this morning to simplify debugging the timeout issues with external containers as reported in LIV-299. I managed to get the build running, but I'm encountering errors when attempting to use the go-livepeer binaries within the development container. These seem to be related to missing permissions, mounts, environment variables, or configuration values. Have you come across these errors before?

Steps to Reproduce Errors

Debugging Setup

  1. Open the repository in VSCode.
  2. Click on Reopen in Container to initiate the container setup.
  3. Ensure the development container builds successfully.
  4. Insert the following configuration into your .vscode/launch.json:
{
    "name": "Launch Transcoder",
    "type": "go",
    "request": "launch",
    "mode": "auto",
    "program": "${workspaceFolder}/cmd/livepeer",
    "buildFlags": "-tags=mainnet,experimental",
    "env": {
        "GO111MODULE": "on",
        "CGO_ENABLED": "1",
        "CGO_LDFLAGS": "-L/usr/local/cuda/lib64 -L/home/elite/compiled/lib",
        "PATH": "/usr/local/cuda/bin:${PATH}",
        "PKG_CONFIG_PATH": "/home/elite/compiled/lib/pkgconfig",
        "LD_LIBRARY_PATH": "/home/elite/compiled/lib"
    },
    "args": [
        "-transcoder",
        "-nvidia", "0",
        "-orchAddr", "https://127.0.0.1:8935",
        "-orchSecret", "1234",
        "-cliAddr", "127.0.0.1:7926",
        "-maxSessions", "5",
        "-dataDir", "/livepeer/arbitrum-one-mainnet/transcoder",
        "-v", "7"
    ]
}
  1. Start the debugging session and monitor for errors.
Error Logs
ERROR: decoder.c:352] Unable to open video decoder : 
decoder.c:364] Freeing input based on OPEN INPUT error
E0504 14:08:43.664813    4546 ffmpeg.go:1031] Transcoder Return : Operation not permitted
I0504 14:08:43.664931    4546 transcoder.go:295] required capability "H.264" is not supported on device 0
[h264_cuvid @ 0x75581c210940] Cannot load libnvcuvid.so.1
[h264_cuvid @ 0x75581c210940] Failed loading nvcuvid.
ERROR: decoder.c:321] Unable to open video decoder : 
ERROR: decoder.c:352] Unable to open video decoder : 
decoder.c:364] Freeing input based on OPEN INPUT error
E0504 14:08:43.735477    4546 ffmpeg.go:1031] Transcoder Return : Operation not permitted
F0504 14:08:43.735628    4546 starter.go:484] required capability "H.264" is not supported on hardware

Build Errors

  1. Open the repository in VSCode.
  2. Click on Reopen in Container to initiate the container setup.
  3. Confirm the development container builds successfully.
  4. Follow the go-livepeer documentation to build the Livepeer binaries.
  5. Observe the build errors listed below:
Error Logs
GO111MODULE=on CGO_ENABLED=1 CC="" CGO_CFLAGS="" CGO_LDFLAGS=" -L/usr/local/cuda_amd64/lib64" go build -o /build/ -tags "" -ldflags="-X github.com/livepeer/go-livepeer/core.LivepeerVersion=0.7.2-99864f54-dirty" cmd/livepeer/*.go
# github.com/livepeer/lpms/ffmpeg
decoder.c: In function 'open_audio_decoder':
decoder.c:216:65: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
  216 |   ctx->ai = av_find_best_stream(ic, AVMEDIA_TYPE_AUDIO, -1, -1, &codec, 0);
      |                                                                 ^~~~~~
      |                                                                 |
      |                                                                 AVCodec ** {aka struct AVCodec **}
In file included from transcoder.h:7,
                 from decoder.c:1:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
decoder.c: In function 'open_video_decoder':
decoder.c:277:65: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
  277 |   ctx->vi = av_find_best_stream(ic, AVMEDIA_TYPE_VIDEO, -1, -1, &codec, 0);
      |                                                                 ^~~~~~
      |                                                                 |
      |                                                                 AVCodec ** {aka struct AVCodec **}
In file included from transcoder.h:7,
                 from decoder.c:1:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
decoder.c:288:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  288 |       AVCodec *c = avcodec_find_decoder_by_name(decoder_name);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
decoder.c:299:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  299 |       AVCodec *c = avcodec_find_decoder_by_name(params->video.name);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
# github.com/livepeer/lpms/ffmpeg
encoder.c: In function 'open_audio_output':
encoder.c:126:11: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  126 |     codec = avcodec_find_encoder_by_name(octx->audio->name);
      |           ^
encoder.c:133:5: warning: 'channel_layout' is deprecated [-Wdeprecated-declarations]
  133 |     ac->channel_layout = av_buffersink_get_channel_layout(octx->af.sink_ctx);
      |     ^~
In file included from decoder.h:5,
                 from encoder.h:4,
                 from encoder.c:1:
/root/compiled/include/libavcodec/avcodec.h:1130:14: note: declared here
 1130 |     uint64_t channel_layout;
      |              ^~~~~~~~~~~~~~
encoder.c:133:5: warning: 'av_buffersink_get_channel_layout' is deprecated [-Wdeprecated-declarations]
  133 |     ac->channel_layout = av_buffersink_get_channel_layout(octx->af.sink_ctx);
      |     ^~
In file included from encoder.c:6:
/root/compiled/include/libavfilter/buffersink.h:126:18: note: declared here
  126 | uint64_t         av_buffersink_get_channel_layout      (const AVFilterContext *ctx);
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encoder.c:134:5: warning: 'channels' is deprecated [-Wdeprecated-declarations]
  134 |     ac->channels = av_buffersink_get_channels(octx->af.sink_ctx);
      |     ^~
In file included from decoder.h:5,
                 from encoder.h:4,
                 from encoder.c:1:
/root/compiled/include/libavcodec/avcodec.h:1072:9: note: declared here
 1072 |     int channels;
      |         ^~~~~~~~
encoder.c: In function 'open_output':
encoder.c:217:7: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  217 |   fmt = av_guess_format(octx->muxer->name, octx->fname, NULL);
      |       ^
encoder.c:228:11: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  228 |     codec = avcodec_find_encoder_by_name(octx->video->name);
      |           ^
encoder.c: In function 'reopen_output':
encoder.c:301:25: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  301 |   AVOutputFormat *fmt = av_guess_format(octx->muxer->name, octx->fname, NULL);
      |                         ^~~~~~~~~~~~~~~
# github.com/livepeer/lpms/ffmpeg
extras.c: In function 'lpms_rtmp2hls':
extras.c:60:8: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   60 |   ofmt = av_guess_format(NULL, outf, NULL);
      |        ^
extras.c:66:71: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
   66 |   stream_map[0] = av_find_best_stream(ic, AVMEDIA_TYPE_VIDEO, -1, -1, &codec, 0);
      |                                                                       ^~~~~~
      |                                                                       |
      |                                                                       AVCodec ** {aka struct AVCodec **}
In file included from extras.c:2:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
extras.c:68:71: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
   68 |   stream_map[1] = av_find_best_stream(ic, AVMEDIA_TYPE_AUDIO, -1, -1, &codec, 0);
      |                                                                       ^~~~~~
      |                                                                       |
      |                                                                       AVCodec ** {aka struct AVCodec **}
In file included from extras.c:2:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
extras.c: In function 'lpms_get_codec_info':
extras.c:159:65: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
  159 |   vstream = av_find_best_stream(ic, AVMEDIA_TYPE_VIDEO, -1, -1, &vc, 0);
      |                                                                 ^~~
      |                                                                 |
      |                                                                 AVCodec ** {aka struct AVCodec **}
In file included from extras.c:2:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
extras.c:160:65: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
  160 |   astream = av_find_best_stream(ic, AVMEDIA_TYPE_AUDIO, -1, -1, &ac, 0);
      |                                                                 ^~~
      |                                                                 |
      |                                                                 AVCodec ** {aka struct AVCodec **}
In file included from extras.c:2:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
# github.com/livepeer/lpms/ffmpeg
filter.c: In function 'init_audio_filters':
filter.c:157:7: warning: 'channel_layout' is deprecated [-Wdeprecated-declarations]
  157 |       ictx->ac->sample_rate, ictx->ac->sample_fmt, ictx->ac->channel_layout,
      |       ^~~~
In file included from decoder.h:5,
                 from filter.h:5,
                 from filter.c:1:
/root/compiled/include/libavcodec/avcodec.h:1130:14: note: declared here
 1130 |     uint64_t channel_layout;
      |              ^~~~~~~~~~~~~~
filter.c:158:7: warning: 'channels' is deprecated [-Wdeprecated-declarations]
  158 |       ictx->ac->channels, time_base.num, time_base.den);
      |       ^~~~
In file included from decoder.h:5,
                 from filter.h:5,
                 from filter.c:1:
/root/compiled/include/libavcodec/avcodec.h:1072:9: note: declared here
 1072 |     int channels;
      |         ^~~~~~~~
filter.c: In function 'filtergraph_write':
filter.c:310:7: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  310 |       ts_step = inf->pkt_duration;
      |       ^~~~~~~
In file included from /root/compiled/include/libavfilter/avfilter.h:44,
                 from filter.h:4,
                 from filter.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
# github.com/livepeer/lpms/ffmpeg
transcoder.c: In function 'handle_audio_frame':
transcoder.c:295:3: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  295 |   if (dframe->pkt_duration) {
      |   ^~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:296:5: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  296 |     dur = dframe->pkt_duration;
      |     ^~~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:303:3: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  303 |   dframe->pkt_duration = dur;
      |   ^~~~~~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c: In function 'handle_video_frame':
transcoder.c:335:3: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  335 |   if (dframe->pkt_duration) {
      |   ^~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:336:5: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  336 |     dur = dframe->pkt_duration;
      |     ^~~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:343:3: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  343 |   dframe->pkt_duration = dur;
      |   ^~~~~~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c: In function 'transcode':
transcoder.c:751:7: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  751 |       if (dframe->pkt_duration) dur = dframe->pkt_duration;
      |       ^~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:751:7: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  751 |       if (dframe->pkt_duration) dur = dframe->pkt_duration;
      |       ^~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:758:7: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  758 |       dframe->pkt_duration = dur;
      |       ^~~~~~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
GO111MODULE=on CGO_ENABLED=1 CC="" CGO_CFLAGS="" CGO_LDFLAGS=" -L/usr/local/cuda_amd64/lib64" go build -o /build/ -tags "" -ldflags="-X github.com/livepeer/go-livepeer/core.LivepeerVersion=0.7.2-99864f54-dirty" cmd/livepeer_cli/*.go
# github.com/livepeer/lpms/ffmpeg
decoder.c: In function 'open_audio_decoder':
decoder.c:216:65: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
  216 |   ctx->ai = av_find_best_stream(ic, AVMEDIA_TYPE_AUDIO, -1, -1, &codec, 0);
      |                                                                 ^~~~~~
      |                                                                 |
      |                                                                 AVCodec ** {aka struct AVCodec **}
In file included from transcoder.h:7,
                 from decoder.c:1:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
decoder.c: In function 'open_video_decoder':
decoder.c:277:65: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
  277 |   ctx->vi = av_find_best_stream(ic, AVMEDIA_TYPE_VIDEO, -1, -1, &codec, 0);
      |                                                                 ^~~~~~
      |                                                                 |
      |                                                                 AVCodec ** {aka struct AVCodec **}
In file included from transcoder.h:7,
                 from decoder.c:1:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
decoder.c:288:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  288 |       AVCodec *c = avcodec_find_decoder_by_name(decoder_name);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
decoder.c:299:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  299 |       AVCodec *c = avcodec_find_decoder_by_name(params->video.name);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
# github.com/livepeer/lpms/ffmpeg
encoder.c: In function 'open_audio_output':
encoder.c:126:11: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  126 |     codec = avcodec_find_encoder_by_name(octx->audio->name);
      |           ^
encoder.c:133:5: warning: 'channel_layout' is deprecated [-Wdeprecated-declarations]
  133 |     ac->channel_layout = av_buffersink_get_channel_layout(octx->af.sink_ctx);
      |     ^~
In file included from decoder.h:5,
                 from encoder.h:4,
                 from encoder.c:1:
/root/compiled/include/libavcodec/avcodec.h:1130:14: note: declared here
 1130 |     uint64_t channel_layout;
      |              ^~~~~~~~~~~~~~
encoder.c:133:5: warning: 'av_buffersink_get_channel_layout' is deprecated [-Wdeprecated-declarations]
  133 |     ac->channel_layout = av_buffersink_get_channel_layout(octx->af.sink_ctx);
      |     ^~
In file included from encoder.c:6:
/root/compiled/include/libavfilter/buffersink.h:126:18: note: declared here
  126 | uint64_t         av_buffersink_get_channel_layout      (const AVFilterContext *ctx);
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encoder.c:134:5: warning: 'channels' is deprecated [-Wdeprecated-declarations]
  134 |     ac->channels = av_buffersink_get_channels(octx->af.sink_ctx);
      |     ^~
In file included from decoder.h:5,
                 from encoder.h:4,
                 from encoder.c:1:
/root/compiled/include/libavcodec/avcodec.h:1072:9: note: declared here
 1072 |     int channels;
      |         ^~~~~~~~
encoder.c: In function 'open_output':
encoder.c:217:7: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  217 |   fmt = av_guess_format(octx->muxer->name, octx->fname, NULL);
      |       ^
encoder.c:228:11: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  228 |     codec = avcodec_find_encoder_by_name(octx->video->name);
      |           ^
encoder.c: In function 'reopen_output':
encoder.c:301:25: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  301 |   AVOutputFormat *fmt = av_guess_format(octx->muxer->name, octx->fname, NULL);
      |                         ^~~~~~~~~~~~~~~
# github.com/livepeer/lpms/ffmpeg
extras.c: In function 'lpms_rtmp2hls':
extras.c:60:8: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   60 |   ofmt = av_guess_format(NULL, outf, NULL);
      |        ^
extras.c:66:71: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
   66 |   stream_map[0] = av_find_best_stream(ic, AVMEDIA_TYPE_VIDEO, -1, -1, &codec, 0);
      |                                                                       ^~~~~~
      |                                                                       |
      |                                                                       AVCodec ** {aka struct AVCodec **}
In file included from extras.c:2:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
extras.c:68:71: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
   68 |   stream_map[1] = av_find_best_stream(ic, AVMEDIA_TYPE_AUDIO, -1, -1, &codec, 0);
      |                                                                       ^~~~~~
      |                                                                       |
      |                                                                       AVCodec ** {aka struct AVCodec **}
In file included from extras.c:2:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
extras.c: In function 'lpms_get_codec_info':
extras.c:159:65: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
  159 |   vstream = av_find_best_stream(ic, AVMEDIA_TYPE_VIDEO, -1, -1, &vc, 0);
      |                                                                 ^~~
      |                                                                 |
      |                                                                 AVCodec ** {aka struct AVCodec **}
In file included from extras.c:2:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
extras.c:160:65: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
  160 |   astream = av_find_best_stream(ic, AVMEDIA_TYPE_AUDIO, -1, -1, &ac, 0);
      |                                                                 ^~~
      |                                                                 |
      |                                                                 AVCodec ** {aka struct AVCodec **}
In file included from extras.c:2:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
# github.com/livepeer/lpms/ffmpeg
filter.c: In function 'init_audio_filters':
filter.c:157:7: warning: 'channel_layout' is deprecated [-Wdeprecated-declarations]
  157 |       ictx->ac->sample_rate, ictx->ac->sample_fmt, ictx->ac->channel_layout,
      |       ^~~~
In file included from decoder.h:5,
                 from filter.h:5,
                 from filter.c:1:
/root/compiled/include/libavcodec/avcodec.h:1130:14: note: declared here
 1130 |     uint64_t channel_layout;
      |              ^~~~~~~~~~~~~~
filter.c:158:7: warning: 'channels' is deprecated [-Wdeprecated-declarations]
  158 |       ictx->ac->channels, time_base.num, time_base.den);
      |       ^~~~
In file included from decoder.h:5,
                 from filter.h:5,
                 from filter.c:1:
/root/compiled/include/libavcodec/avcodec.h:1072:9: note: declared here
 1072 |     int channels;
      |         ^~~~~~~~
filter.c: In function 'filtergraph_write':
filter.c:310:7: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  310 |       ts_step = inf->pkt_duration;
      |       ^~~~~~~
In file included from /root/compiled/include/libavfilter/avfilter.h:44,
                 from filter.h:4,
                 from filter.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
# github.com/livepeer/lpms/ffmpeg
transcoder.c: In function 'handle_audio_frame':
transcoder.c:295:3: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  295 |   if (dframe->pkt_duration) {
      |   ^~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:296:5: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  296 |     dur = dframe->pkt_duration;
      |     ^~~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:303:3: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  303 |   dframe->pkt_duration = dur;
      |   ^~~~~~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c: In function 'handle_video_frame':
transcoder.c:335:3: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  335 |   if (dframe->pkt_duration) {
      |   ^~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:336:5: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  336 |     dur = dframe->pkt_duration;
      |     ^~~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:343:3: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  343 |   dframe->pkt_duration = dur;
      |   ^~~~~~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c: In function 'transcode':
transcoder.c:751:7: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  751 |       if (dframe->pkt_duration) dur = dframe->pkt_duration;
      |       ^~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:751:7: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  751 |       if (dframe->pkt_duration) dur = dframe->pkt_duration;
      |       ^~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:758:7: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  758 |       dframe->pkt_duration = dur;
      |       ^~~~~~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
GO111MODULE=on CGO_ENABLED=1 CC="" CGO_CFLAGS="" CGO_LDFLAGS=" -L/usr/local/cuda_amd64/lib64" go build -o /build/ -ldflags="-X github.com/livepeer/go-livepeer/core.LivepeerVersion=0.7.2-99864f54-dirty" cmd/livepeer_router/*.go
# github.com/livepeer/lpms/ffmpeg
decoder.c: In function 'open_audio_decoder':
decoder.c:216:65: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
  216 |   ctx->ai = av_find_best_stream(ic, AVMEDIA_TYPE_AUDIO, -1, -1, &codec, 0);
      |                                                                 ^~~~~~
      |                                                                 |
      |                                                                 AVCodec ** {aka struct AVCodec **}
In file included from transcoder.h:7,
                 from decoder.c:1:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
decoder.c: In function 'open_video_decoder':
decoder.c:277:65: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
  277 |   ctx->vi = av_find_best_stream(ic, AVMEDIA_TYPE_VIDEO, -1, -1, &codec, 0);
      |                                                                 ^~~~~~
      |                                                                 |
      |                                                                 AVCodec ** {aka struct AVCodec **}
In file included from transcoder.h:7,
                 from decoder.c:1:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
decoder.c:288:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  288 |       AVCodec *c = avcodec_find_decoder_by_name(decoder_name);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
decoder.c:299:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  299 |       AVCodec *c = avcodec_find_decoder_by_name(params->video.name);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
# github.com/livepeer/lpms/ffmpeg
encoder.c: In function 'open_audio_output':
encoder.c:126:11: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  126 |     codec = avcodec_find_encoder_by_name(octx->audio->name);
      |           ^
encoder.c:133:5: warning: 'channel_layout' is deprecated [-Wdeprecated-declarations]
  133 |     ac->channel_layout = av_buffersink_get_channel_layout(octx->af.sink_ctx);
      |     ^~
In file included from decoder.h:5,
                 from encoder.h:4,
                 from encoder.c:1:
/root/compiled/include/libavcodec/avcodec.h:1130:14: note: declared here
 1130 |     uint64_t channel_layout;
      |              ^~~~~~~~~~~~~~
encoder.c:133:5: warning: 'av_buffersink_get_channel_layout' is deprecated [-Wdeprecated-declarations]
  133 |     ac->channel_layout = av_buffersink_get_channel_layout(octx->af.sink_ctx);
      |     ^~
In file included from encoder.c:6:
/root/compiled/include/libavfilter/buffersink.h:126:18: note: declared here
  126 | uint64_t         av_buffersink_get_channel_layout      (const AVFilterContext *ctx);
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encoder.c:134:5: warning: 'channels' is deprecated [-Wdeprecated-declarations]
  134 |     ac->channels = av_buffersink_get_channels(octx->af.sink_ctx);
      |     ^~
In file included from decoder.h:5,
                 from encoder.h:4,
                 from encoder.c:1:
/root/compiled/include/libavcodec/avcodec.h:1072:9: note: declared here
 1072 |     int channels;
      |         ^~~~~~~~
encoder.c: In function 'open_output':
encoder.c:217:7: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  217 |   fmt = av_guess_format(octx->muxer->name, octx->fname, NULL);
      |       ^
encoder.c:228:11: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  228 |     codec = avcodec_find_encoder_by_name(octx->video->name);
      |           ^
encoder.c: In function 'reopen_output':
encoder.c:301:25: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  301 |   AVOutputFormat *fmt = av_guess_format(octx->muxer->name, octx->fname, NULL);
      |                         ^~~~~~~~~~~~~~~
# github.com/livepeer/lpms/ffmpeg
extras.c: In function 'lpms_rtmp2hls':
extras.c:60:8: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   60 |   ofmt = av_guess_format(NULL, outf, NULL);
      |        ^
extras.c:66:71: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
   66 |   stream_map[0] = av_find_best_stream(ic, AVMEDIA_TYPE_VIDEO, -1, -1, &codec, 0);
      |                                                                       ^~~~~~
      |                                                                       |
      |                                                                       AVCodec ** {aka struct AVCodec **}
In file included from extras.c:2:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
extras.c:68:71: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
   68 |   stream_map[1] = av_find_best_stream(ic, AVMEDIA_TYPE_AUDIO, -1, -1, &codec, 0);
      |                                                                       ^~~~~~
      |                                                                       |
      |                                                                       AVCodec ** {aka struct AVCodec **}
In file included from extras.c:2:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
extras.c: In function 'lpms_get_codec_info':
extras.c:159:65: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
  159 |   vstream = av_find_best_stream(ic, AVMEDIA_TYPE_VIDEO, -1, -1, &vc, 0);
      |                                                                 ^~~
      |                                                                 |
      |                                                                 AVCodec ** {aka struct AVCodec **}
In file included from extras.c:2:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
extras.c:160:65: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
  160 |   astream = av_find_best_stream(ic, AVMEDIA_TYPE_AUDIO, -1, -1, &ac, 0);
      |                                                                 ^~~
      |                                                                 |
      |                                                                 AVCodec ** {aka struct AVCodec **}
In file included from extras.c:2:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
# github.com/livepeer/lpms/ffmpeg
filter.c: In function 'init_audio_filters':
filter.c:157:7: warning: 'channel_layout' is deprecated [-Wdeprecated-declarations]
  157 |       ictx->ac->sample_rate, ictx->ac->sample_fmt, ictx->ac->channel_layout,
      |       ^~~~
In file included from decoder.h:5,
                 from filter.h:5,
                 from filter.c:1:
/root/compiled/include/libavcodec/avcodec.h:1130:14: note: declared here
 1130 |     uint64_t channel_layout;
      |              ^~~~~~~~~~~~~~
filter.c:158:7: warning: 'channels' is deprecated [-Wdeprecated-declarations]
  158 |       ictx->ac->channels, time_base.num, time_base.den);
      |       ^~~~
In file included from decoder.h:5,
                 from filter.h:5,
                 from filter.c:1:
/root/compiled/include/libavcodec/avcodec.h:1072:9: note: declared here
 1072 |     int channels;
      |         ^~~~~~~~
filter.c: In function 'filtergraph_write':
filter.c:310:7: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  310 |       ts_step = inf->pkt_duration;
      |       ^~~~~~~
In file included from /root/compiled/include/libavfilter/avfilter.h:44,
                 from filter.h:4,
                 from filter.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
# github.com/livepeer/lpms/ffmpeg
transcoder.c: In function 'handle_audio_frame':
transcoder.c:295:3: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  295 |   if (dframe->pkt_duration) {
      |   ^~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:296:5: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  296 |     dur = dframe->pkt_duration;
      |     ^~~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:303:3: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  303 |   dframe->pkt_duration = dur;
      |   ^~~~~~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c: In function 'handle_video_frame':
transcoder.c:335:3: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  335 |   if (dframe->pkt_duration) {
      |   ^~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:336:5: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  336 |     dur = dframe->pkt_duration;
      |     ^~~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:343:3: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  343 |   dframe->pkt_duration = dur;
      |   ^~~~~~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c: In function 'transcode':
transcoder.c:751:7: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  751 |       if (dframe->pkt_duration) dur = dframe->pkt_duration;
      |       ^~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:751:7: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  751 |       if (dframe->pkt_duration) dur = dframe->pkt_duration;
      |       ^~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:758:7: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  758 |       dframe->pkt_duration = dur;
      |       ^~~~~~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
GO111MODULE=on CGO_ENABLED=1 CC="" CGO_CFLAGS="" CGO_LDFLAGS=" -L/usr/local/cuda_amd64/lib64" go build -o /build/ -ldflags="-X github.com/livepeer/go-livepeer/core.LivepeerVersion=0.7.2-99864f54-dirty" cmd/livepeer_bench/*.go
# github.com/livepeer/lpms/ffmpeg
decoder.c: In function 'open_audio_decoder':
decoder.c:216:65: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
  216 |   ctx->ai = av_find_best_stream(ic, AVMEDIA_TYPE_AUDIO, -1, -1, &codec, 0);
      |                                                                 ^~~~~~
      |                                                                 |
      |                                                                 AVCodec ** {aka struct AVCodec **}
In file included from transcoder.h:7,
                 from decoder.c:1:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
decoder.c: In function 'open_video_decoder':
decoder.c:277:65: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
  277 |   ctx->vi = av_find_best_stream(ic, AVMEDIA_TYPE_VIDEO, -1, -1, &codec, 0);
      |                                                                 ^~~~~~
      |                                                                 |
      |                                                                 AVCodec ** {aka struct AVCodec **}
In file included from transcoder.h:7,
                 from decoder.c:1:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
decoder.c:288:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  288 |       AVCodec *c = avcodec_find_decoder_by_name(decoder_name);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
decoder.c:299:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  299 |       AVCodec *c = avcodec_find_decoder_by_name(params->video.name);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
# github.com/livepeer/lpms/ffmpeg
encoder.c: In function 'open_audio_output':
encoder.c:126:11: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  126 |     codec = avcodec_find_encoder_by_name(octx->audio->name);
      |           ^
encoder.c:133:5: warning: 'channel_layout' is deprecated [-Wdeprecated-declarations]
  133 |     ac->channel_layout = av_buffersink_get_channel_layout(octx->af.sink_ctx);
      |     ^~
In file included from decoder.h:5,
                 from encoder.h:4,
                 from encoder.c:1:
/root/compiled/include/libavcodec/avcodec.h:1130:14: note: declared here
 1130 |     uint64_t channel_layout;
      |              ^~~~~~~~~~~~~~
encoder.c:133:5: warning: 'av_buffersink_get_channel_layout' is deprecated [-Wdeprecated-declarations]
  133 |     ac->channel_layout = av_buffersink_get_channel_layout(octx->af.sink_ctx);
      |     ^~
In file included from encoder.c:6:
/root/compiled/include/libavfilter/buffersink.h:126:18: note: declared here
  126 | uint64_t         av_buffersink_get_channel_layout      (const AVFilterContext *ctx);
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encoder.c:134:5: warning: 'channels' is deprecated [-Wdeprecated-declarations]
  134 |     ac->channels = av_buffersink_get_channels(octx->af.sink_ctx);
      |     ^~
In file included from decoder.h:5,
                 from encoder.h:4,
                 from encoder.c:1:
/root/compiled/include/libavcodec/avcodec.h:1072:9: note: declared here
 1072 |     int channels;
      |         ^~~~~~~~
encoder.c: In function 'open_output':
encoder.c:217:7: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  217 |   fmt = av_guess_format(octx->muxer->name, octx->fname, NULL);
      |       ^
encoder.c:228:11: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  228 |     codec = avcodec_find_encoder_by_name(octx->video->name);
      |           ^
encoder.c: In function 'reopen_output':
encoder.c:301:25: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  301 |   AVOutputFormat *fmt = av_guess_format(octx->muxer->name, octx->fname, NULL);
      |                         ^~~~~~~~~~~~~~~
# github.com/livepeer/lpms/ffmpeg
extras.c: In function 'lpms_rtmp2hls':
extras.c:60:8: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   60 |   ofmt = av_guess_format(NULL, outf, NULL);
      |        ^
extras.c:66:71: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
   66 |   stream_map[0] = av_find_best_stream(ic, AVMEDIA_TYPE_VIDEO, -1, -1, &codec, 0);
      |                                                                       ^~~~~~
      |                                                                       |
      |                                                                       AVCodec ** {aka struct AVCodec **}
In file included from extras.c:2:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
extras.c:68:71: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
   68 |   stream_map[1] = av_find_best_stream(ic, AVMEDIA_TYPE_AUDIO, -1, -1, &codec, 0);
      |                                                                       ^~~~~~
      |                                                                       |
      |                                                                       AVCodec ** {aka struct AVCodec **}
In file included from extras.c:2:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
extras.c: In function 'lpms_get_codec_info':
extras.c:159:65: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
  159 |   vstream = av_find_best_stream(ic, AVMEDIA_TYPE_VIDEO, -1, -1, &vc, 0);
      |                                                                 ^~~
      |                                                                 |
      |                                                                 AVCodec ** {aka struct AVCodec **}
In file included from extras.c:2:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
extras.c:160:65: warning: passing argument 5 of 'av_find_best_stream' from incompatible pointer type [-Wincompatible-pointer-types]
  160 |   astream = av_find_best_stream(ic, AVMEDIA_TYPE_AUDIO, -1, -1, &ac, 0);
      |                                                                 ^~~
      |                                                                 |
      |                                                                 AVCodec ** {aka struct AVCodec **}
In file included from extras.c:2:
/root/compiled/include/libavformat/avformat.h:2262:48: note: expected 'const struct AVCodec **' but argument is of type 'AVCodec **' {aka 'struct AVCodec **'}
 2262 |                         const struct AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
# github.com/livepeer/lpms/ffmpeg
filter.c: In function 'init_audio_filters':
filter.c:157:7: warning: 'channel_layout' is deprecated [-Wdeprecated-declarations]
  157 |       ictx->ac->sample_rate, ictx->ac->sample_fmt, ictx->ac->channel_layout,
      |       ^~~~
In file included from decoder.h:5,
                 from filter.h:5,
                 from filter.c:1:
/root/compiled/include/libavcodec/avcodec.h:1130:14: note: declared here
 1130 |     uint64_t channel_layout;
      |              ^~~~~~~~~~~~~~
filter.c:158:7: warning: 'channels' is deprecated [-Wdeprecated-declarations]
  158 |       ictx->ac->channels, time_base.num, time_base.den);
      |       ^~~~
In file included from decoder.h:5,
                 from filter.h:5,
                 from filter.c:1:
/root/compiled/include/libavcodec/avcodec.h:1072:9: note: declared here
 1072 |     int channels;
      |         ^~~~~~~~
filter.c: In function 'filtergraph_write':
filter.c:310:7: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  310 |       ts_step = inf->pkt_duration;
      |       ^~~~~~~
In file included from /root/compiled/include/libavfilter/avfilter.h:44,
                 from filter.h:4,
                 from filter.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
# github.com/livepeer/lpms/ffmpeg
transcoder.c: In function 'handle_audio_frame':
transcoder.c:295:3: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  295 |   if (dframe->pkt_duration) {
      |   ^~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:296:5: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  296 |     dur = dframe->pkt_duration;
      |     ^~~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:303:3: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  303 |   dframe->pkt_duration = dur;
      |   ^~~~~~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c: In function 'handle_video_frame':
transcoder.c:335:3: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  335 |   if (dframe->pkt_duration) {
      |   ^~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:336:5: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  336 |     dur = dframe->pkt_duration;
      |     ^~~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:343:3: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  343 |   dframe->pkt_duration = dur;
      |   ^~~~~~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c: In function 'transcode':
transcoder.c:751:7: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  751 |       if (dframe->pkt_duration) dur = dframe->pkt_duration;
      |       ^~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:751:7: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  751 |       if (dframe->pkt_duration) dur = dframe->pkt_duration;
      |       ^~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~
transcoder.c:758:7: warning: 'pkt_duration' is deprecated [-Wdeprecated-declarations]
  758 |       dframe->pkt_duration = dur;
      |       ^~~~~~
In file included from /root/compiled/include/libavutil/hwcontext.h:23,
                 from transcoder.h:4,
                 from transcoder.c:1:
/root/compiled/include/libavutil/frame.h:700:13: note: declared here
  700 |     int64_t pkt_duration;
      |             ^~~~~~~~~~~~

Base automatically changed from ai-video to master November 7, 2024 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AI Issues and PR related to the AI-video branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant