Fixes a bunch of noisy deprecation warnings. FFmpegCapture and
AudioEncoder are not done yet.
avstream_audio->time_base = AVRational{ 1, TIMEBASE };
avstream_audio->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
avstream_audio->codecpar->codec_id = AV_CODEC_ID_PCM_S32LE;
avstream_audio->time_base = AVRational{ 1, TIMEBASE };
avstream_audio->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
avstream_audio->codecpar->codec_id = AV_CODEC_ID_PCM_S32LE;
- avstream_audio->codecpar->channel_layout = AV_CH_LAYOUT_STEREO;
- avstream_audio->codecpar->channels = 2;
+ avstream_audio->codecpar->ch_layout.order = AV_CHANNEL_ORDER_NATIVE;
+ avstream_audio->codecpar->ch_layout.nb_channels = 2;
+ avstream_audio->codecpar->ch_layout.u.mask = AV_CH_LAYOUT_STEREO;
avstream_audio->codecpar->sample_rate = OUTPUT_FREQUENCY;
audio_streams.push_back(avstream_audio);
}
avstream_audio->codecpar->sample_rate = OUTPUT_FREQUENCY;
audio_streams.push_back(avstream_audio);
}
audio_codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
audio_codecpar->codec_id = AV_CODEC_ID_PCM_S32LE;
audio_codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
audio_codecpar->codec_id = AV_CODEC_ID_PCM_S32LE;
- audio_codecpar->channel_layout = AV_CH_LAYOUT_STEREO;
- audio_codecpar->channels = 2;
+ audio_codecpar->ch_layout.order = AV_CHANNEL_ORDER_NATIVE;
+ audio_codecpar->ch_layout.nb_channels = 2;
+ audio_codecpar->ch_layout.u.mask = AV_CH_LAYOUT_STEREO;
audio_codecpar->sample_rate = OUTPUT_FREQUENCY;
size_t width = global_flags.width, height = global_flags.height; // Doesn't matter for MJPEG.
audio_codecpar->sample_rate = OUTPUT_FREQUENCY;
size_t width = global_flags.width, height = global_flags.height; // Doesn't matter for MJPEG.
ctx->bit_rate = bit_rate;
ctx->sample_rate = OUTPUT_FREQUENCY;
ctx->sample_fmt = codec->sample_fmts[0];
ctx->bit_rate = bit_rate;
ctx->sample_rate = OUTPUT_FREQUENCY;
ctx->sample_fmt = codec->sample_fmts[0];
- ctx->channels = 2;
- ctx->channel_layout = AV_CH_LAYOUT_STEREO;
+ ctx->ch_layout.order = AV_CHANNEL_ORDER_NATIVE;
+ ctx->ch_layout.nb_channels = 2;
+ ctx->ch_layout.u.mask = AV_CH_LAYOUT_STEREO;
ctx->time_base = AVRational{1, TIMEBASE};
if (oformat->flags & AVFMT_GLOBALHEADER) {
ctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
ctx->time_base = AVRational{1, TIMEBASE};
if (oformat->flags & AVFMT_GLOBALHEADER) {
ctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
{
audio_frame->pts = audio_pts;
audio_frame->nb_samples = num_samples;
{
audio_frame->pts = audio_pts;
audio_frame->nb_samples = num_samples;
- audio_frame->channels = 2;
- audio_frame->channel_layout = AV_CH_LAYOUT_STEREO;
+ audio_frame->ch_layout.order = AV_CHANNEL_ORDER_NATIVE;
+ audio_frame->ch_layout.nb_channels = 2;
+ audio_frame->ch_layout.u.mask = AV_CH_LAYOUT_STEREO;
audio_frame->format = ctx->sample_fmt;
audio_frame->sample_rate = OUTPUT_FREQUENCY;
audio_frame->format = ctx->sample_fmt;
audio_frame->sample_rate = OUTPUT_FREQUENCY;
stream->time_base = AVRational{ 1, OUTPUT_FREQUENCY };
stream->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
stream->codecpar->codec_id = AV_CODEC_ID_PCM_S32LE;
stream->time_base = AVRational{ 1, OUTPUT_FREQUENCY };
stream->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
stream->codecpar->codec_id = AV_CODEC_ID_PCM_S32LE;
- stream->codecpar->channel_layout = AV_CH_LAYOUT_STEREO;
- stream->codecpar->channels = 2;
+ stream->codecpar->ch_layout.order = AV_CHANNEL_ORDER_NATIVE;
+ stream->codecpar->ch_layout.nb_channels = 2;
+ stream->codecpar->ch_layout.u.mask = AV_CH_LAYOUT_STEREO;
stream->codecpar->sample_rate = OUTPUT_FREQUENCY;
}
stream->codecpar->sample_rate = OUTPUT_FREQUENCY;
}