• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/minidlna/ffmpeg-2.3.4/libavcodec/

Lines Matching refs:avctx

38 static av_cold int aacPlus_encode_init(AVCodecContext *avctx)
40 aacPlusAudioContext *s = avctx->priv_data;
44 if (avctx->channels < 1 || avctx->channels > 2) {
45 av_log(avctx, AV_LOG_ERROR, "encoding %d channel(s) is not allowed\n", avctx->channels);
49 if (avctx->profile != FF_PROFILE_AAC_LOW && avctx->profile != FF_PROFILE_UNKNOWN) {
50 av_log(avctx, AV_LOG_ERROR, "invalid AAC profile: %d, only LC supported\n", avctx->profile);
54 s->aacplus_handle = aacplusEncOpen(avctx->sample_rate, avctx->channels,
57 av_log(avctx, AV_LOG_ERROR, "can't open encoder\n");
64 aacplus_cfg->bitRate = avctx->bit_rate;
65 aacplus_cfg->bandWidth = avctx->cutoff;
66 aacplus_cfg->outputFormat = !(avctx->flags & CODEC_FLAG_GLOBAL_HEADER);
67 aacplus_cfg->inputFormat = avctx->sample_fmt == AV_SAMPLE_FMT_FLT ? AACPLUS_INPUT_FLOAT : AACPLUS_INPUT_16BIT;
69 av_log(avctx, AV_LOG_ERROR, "libaacplus doesn't support this output format!\n");
73 avctx->frame_size = s->samples_input / avctx->channels;
76 avctx->extradata_size = 0;
77 if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
84 avctx->extradata = av_malloc(decoder_specific_info_size + FF_INPUT_BUFFER_PADDING_SIZE);
85 avctx->extradata_size = decoder_specific_info_size;
86 memcpy(avctx->extradata, buffer, avctx->extradata_size);
93 static int aacPlus_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
96 aacPlusAudioContext *s = avctx->priv_data;
100 if ((ret = ff_alloc_packet2(avctx, pkt, s->max_output_bytes)) < 0)
110 static av_cold int aacPlus_encode_close(AVCodecContext *avctx)
112 aacPlusAudioContext *s = avctx->priv_data;
114 av_freep(&avctx->extradata);