Home
last modified time | relevance | path

Searched refs:avCodecContext_ (Results 1 - 22 of 22) sorted by relevance

/foundation/multimedia/av_codec/services/media_engine/plugins/ffmpeg_adapter/audio_decoder/
H A Dffmpeg_base_decoder.cpp45 avCodecContext_(nullptr), in FfmpegBaseDecoder()
63 if (avCodecContext_ == nullptr) { in ProcessSendData()
64 AVCODEC_LOGE("avCodecContext_ is nullptr"); in ProcessSendData()
111 auto ret = avcodec_send_packet(avCodecContext_.get(), avPacket_.get()); in SendBuffer()
139 if (avCodecContext_ == nullptr) { in ProcessReceiveData()
140 AVCODEC_LOGE("avCodecContext_ is nullptr"); in ProcessReceiveData()
148 auto ret = avcodec_receive_frame(avCodecContext_.get(), cachedFrame_.get()); in ReceiveBuffer()
160 avcodec_flush_buffers(avCodecContext_.get()); in ReceiveBuffer()
189 FFMpegConverter::ConvertFFMpegToOHAudioFormat(avCodecContext_->sample_fmt)); in ReceiveFrameSucc()
190 auto layout = FFMpegConverter::ConvertFFToOHAudioChannelLayoutV2(avCodecContext_ in ReceiveFrameSucc()
[all...]
H A Dffmpeg_base_decoder.h87 std::shared_ptr<AVCodecContext> avCodecContext_; member in OHOS::Media::Plugins::Ffmpeg::FfmpegBaseDecoder
/foundation/multimedia/av_codec/services/media_engine/plugins/ffmpeg_adapter/audio_encoder/aac/
H A Dffmpeg_aac_encoder_plugin.cpp77 avCodecContext_(nullptr), in FFmpegAACEncoderPlugin()
245 if (avCodecContext_ == nullptr) { in QueueInputBuffer()
270 if (avCodecContext_ == nullptr) { in QueueOutputBuffer()
283 GetAdtsHeader(header, headerSize, avCodecContext_, avPacket_->size); in ReceivePacketSucc()
306 outBuffer->duration_ = ConvertTimeFromFFmpeg(avPacket_->duration, avCodecContext_->time_base) / NS_PER_US; in ReceivePacketSucc()
319 auto ret = avcodec_receive_packet(avCodecContext_.get(), avPacket_.get()); in ReceiveBuffer()
326 avcodec_flush_buffers(avCodecContext_.get()); in ReceiveBuffer()
363 if (fifoSize >= avCodecContext_->frame_size) { in SendOutputBuffer()
398 if (avCodecContext_ != nullptr) { in Flush()
399 avcodec_flush_buffers(avCodecContext_ in Flush()
[all...]
H A Dffmpeg_aac_encoder_plugin.h114 std::shared_ptr<AVCodecContext> avCodecContext_{};
/foundation/multimedia/media_foundation/engine/plugin/plugins/ffmpeg_adapter/audio_encoder/
H A Daudio_ffmpeg_encoder_plugin.cpp177 if (avCodecContext_ == nullptr) { in GetParameter()
180 return GetAudioEncoderParameters(*avCodecContext_, tag, value); in GetParameter()
192 avCodecContext_ = std::shared_ptr<AVCodecContext>(context, [](AVCodecContext* ptr) { in Prepare()
203 ConfigAudioEncoder(*avCodecContext_, audioParameter_); in Prepare()
206 if (!avCodecContext_->time_base.den) { in Prepare()
207 avCodecContext_->time_base.den = avCodecContext_->sample_rate; in Prepare()
208 avCodecContext_->time_base.num = 1; in Prepare()
209 avCodecContext_->ticks_per_frame = 1; in Prepare()
212 avCodecContext_ in Prepare()
[all...]
H A Daudio_ffmpeg_encoder_plugin.h102 std::shared_ptr<AVCodecContext> avCodecContext_ {nullptr};
/foundation/multimedia/av_codec/services/engine/codec/audio/decoder/
H A Daudio_ffmpeg_decoder_plugin.cpp40 avCodecContext_(nullptr), in AudioFfmpegDecoderPlugin()
58 if (avCodecContext_ == nullptr) { in ProcessSendData()
59 AVCODEC_LOGE("avCodecContext_ is nullptr"); in ProcessSendData()
106 auto ret = avcodec_send_packet(avCodecContext_.get(), avPacket_.get()); in SendBuffer()
128 if (avCodecContext_ == nullptr) { in ProcessRecieveData()
129 AVCODEC_LOGE("avCodecContext_ is nullptr"); in ProcessRecieveData()
137 auto ret = avcodec_receive_frame(avCodecContext_.get(), cachedFrame_.get()); in ReceiveBuffer()
167 avcodec_flush_buffers(avCodecContext_.get()); in ReceiveBuffer()
201 FFMpegConverter::ConvertFFMpegToOHAudioFormat(avCodecContext_->sample_fmt)); in ReceiveFrameSucc()
202 auto layout = FFMpegConverter::ConvertFFToOHAudioChannelLayout(avCodecContext_ in ReceiveFrameSucc()
[all...]
/foundation/multimedia/av_codec/services/engine/codec/audio/encoder/
H A Daudio_ffmpeg_aac_encoder_plugin.cpp57 : maxInputSize_(-1), avCodec_(nullptr), avCodecContext_(nullptr), cachedFrame_(nullptr), avPacket_(nullptr), in AudioFFMpegAacEncoderPlugin()
183 format_.PutIntValue(MediaDescriptionKey::MD_KEY_AUDIO_SAMPLES_PER_FRAME, avCodecContext_->frame_size);
214 if (avCodecContext_ == nullptr) { in ProcessSendData()
215 AVCODEC_LOGE("avCodecContext_ is nullptr"); in ProcessSendData()
230 if (avCodecContext_ == nullptr) { in ProcessRecieveData()
231 AVCODEC_LOGE("avCodecContext_ is nullptr"); in ProcessRecieveData()
257 if (avCodecContext_ != nullptr) { in Flush()
258 avcodec_flush_buffers(avCodecContext_.get()); in Flush()
306 avCodecContext_ = std::shared_ptr<AVCodecContext>(context, [](AVCodecContext *ptr) { in AllocateContext()
312 CHECK_AND_RETURN_RET_LOG(avCodecContext_ ! in AllocateContext()
[all...]
H A Daudio_ffmpeg_encoder_plugin.cpp32 avCodecContext_(nullptr), in AudioFfmpegEncoderPlugin()
48 if (avCodecContext_ == nullptr) { in ProcessSendData()
49 AVCODEC_LOGE("avCodecContext_ is nullptr"); in ProcessSendData()
59 auto frameSize = avCodecContext_->frame_size; in PcmFillFrame()
61 AVCODEC_LOGI("sampleRate : %{public}d, frameSize : %{public}d", avCodecContext_->sample_rate, frameSize); in PcmFillFrame()
103 ret = avcodec_send_frame(avCodecContext_.get(), cachedFrame_.get()); in SendBuffer()
105 ret = avcodec_send_frame(avCodecContext_.get(), nullptr); in SendBuffer()
126 if (avCodecContext_ == nullptr) { in ProcessRecieveData()
127 AVCODEC_LOGE("avCodecContext_ is nullptr"); in ProcessRecieveData()
138 auto ret = avcodec_receive_packet(avCodecContext_ in ReceiveBuffer()
[all...]
/foundation/multimedia/av_codec/services/media_engine/plugins/ffmpeg_adapter/audio_encoder/
H A Dffmpeg_base_encoder.cpp34 avCodecContext_(nullptr), in FFmpegBaseEncoder()
61 if (avCodecContext_ == nullptr) { in ProcessSendData()
83 auto frameSize = avCodecContext_->frame_size; in PcmFillFrame()
85 AVCODEC_LOGI("sampleRate : %{public}d, frameSize : %{public}d", avCodecContext_->sample_rate, frameSize); in PcmFillFrame()
113 ret = avcodec_send_frame(avCodecContext_.get(), cachedFrame_.get()); in SendBuffer()
115 ret = avcodec_send_frame(avCodecContext_.get(), nullptr); in SendBuffer()
138 if (avCodecContext_ == nullptr) { in ProcessReceiveData()
149 auto ret = avcodec_receive_packet(avCodecContext_.get(), avPacket_.get()); in ReceiveBuffer()
156 avcodec_flush_buffers(avCodecContext_.get()); in ReceiveBuffer()
184 outputBuffer->duration_ = ConvertTimeFromFFmpeg(avPacket_->duration, avCodecContext_ in ReceivePacketSucc()
[all...]
H A Dffmpeg_base_encoder.h68 std::shared_ptr<AVCodecContext> avCodecContext_; member in OHOS::Media::Plugins::Ffmpeg::FFmpegBaseEncoder
/foundation/multimedia/media_foundation/engine/plugin/plugins/ffmpeg_adapter/video_encoder/
H A Dvideo_ffmpeg_encoder_plugin.cpp185 FALSE_RETURN_V_MSG_E(avCodecContext_ != nullptr, Status::ERROR_WRONG_STATE, "codec context is null"); in GetParameter()
186 return GetVideoEncoderParameters(*avCodecContext_, tag, value); in GetParameter()
205 avCodecContext_ = std::shared_ptr<AVCodecContext>(context, [](AVCodecContext* ptr) { in CreateCodecContext()
220 avCodecContext_->codec_type = AVMEDIA_TYPE_VIDEO; in InitCodecContext()
227 ConfigVideoEncoder(*avCodecContext_, vencParams_); in InitCodecContext()
232 if (avCodecContext_ == nullptr) { in DeinitCodecContext()
235 if (avCodecContext_->extradata) { in DeinitCodecContext()
236 av_free(avCodecContext_->extradata); in DeinitCodecContext()
237 avCodecContext_->extradata = nullptr; in DeinitCodecContext()
239 avCodecContext_ in DeinitCodecContext()
[all...]
H A Dvideo_ffmpeg_encoder_plugin.h125 std::shared_ptr<AVCodecContext> avCodecContext_ {};
/foundation/multimedia/media_foundation/engine/plugin/plugins/ffmpeg_adapter/video_decoder/
H A Dvideo_ffmpeg_decoder_plugin.cpp216 avCodecContext_ = std::shared_ptr<AVCodecContext>(context, [](AVCodecContext* ptr) { in CreateCodecContext()
231 avCodecContext_->codec_type = AVMEDIA_TYPE_VIDEO; in InitCodecContext()
232 FindInParameterMapThenAssignLocked<int64_t>(Tag::MEDIA_BITRATE, avCodecContext_->bit_rate); in InitCodecContext()
237 ", pixelFormat: " PUBLIC_LOG_U32, avCodecContext_->bit_rate, width_, height_, pixelFormat_); in InitCodecContext()
241 avCodecContext_->coded_width = 0; in InitCodecContext()
242 avCodecContext_->coded_height = 0; in InitCodecContext()
243 avCodecContext_->workaround_bugs |= FF_BUG_AUTODETECT; in InitCodecContext()
244 avCodecContext_->err_recognition = 1; in InitCodecContext()
249 if (avCodecContext_ == nullptr) { in DeinitCodecContext()
252 if (avCodecContext_ in DeinitCodecContext()
[all...]
H A Dvideo_ffmpeg_decoder_plugin.h145 std::shared_ptr<AVCodecContext> avCodecContext_ {};
/foundation/multimedia/media_foundation/engine/plugin/plugins/ffmpeg_adapter/audio_decoder/
H A Daudio_ffmpeg_decoder_plugin.cpp327 avCodecContext_ = tmpCtx; in Prepare()
375 avCodecContext_.reset(); in ResetLocked()
392 if (avCodecContext_ == nullptr) { in OpenCtxLocked()
395 auto res = avcodec_open2(avCodecContext_.get(), avCodec_.get(), nullptr); in OpenCtxLocked()
411 if (avCodecContext_ != nullptr) { in CloseCtxLocked()
412 auto res = avcodec_close(avCodecContext_.get()); in CloseCtxLocked()
425 avCodecContext_.reset(); in StopLocked()
443 if (avCodecContext_ != nullptr) { in Flush()
444 avcodec_flush_buffers(avCodecContext_.get()); in Flush()
461 if (avCodecContext_ in QueueInputBuffer()
[all...]
H A Daudio_ffmpeg_decoder_plugin.h109 std::shared_ptr<AVCodecContext> avCodecContext_ {};
/foundation/multimedia/av_codec/services/engine/codec/video/fcodec/
H A Dfcodec.cpp206 avCodecContext_ = std::shared_ptr<AVCodecContext>(avcodec_alloc_context3(avCodec_.get()), [](AVCodecContext *p) { in ConfigureContext()
215 CHECK_AND_RETURN_RET_LOG(avCodecContext_ != nullptr, AVCS_ERR_INVALID_OPERATION, in ConfigureContext()
217 avCodecContext_->codec_type = AVMEDIA_TYPE_VIDEO; in ConfigureContext()
226 avCodecContext_->width = width_; in ConfigureContext()
227 avCodecContext_->height = height_; in ConfigureContext()
228 avCodecContext_->thread_count = DEFAULT_THREAD_COUNT; in ConfigureContext()
286 if (avCodecContext_ == nullptr) { in ResetContext()
289 if (avCodecContext_->extradata) { in ResetContext()
290 av_free(avCodecContext_->extradata); in ResetContext()
291 avCodecContext_ in ResetContext()
[all...]
H A Dfcodec.h148 std::shared_ptr<AVCodecContext> avCodecContext_ = nullptr; member in OHOS::MediaAVCodec::Codec::FCodec
/foundation/multimedia/av_codec/services/engine/codec/include/audio/decoder/
H A Daudio_ffmpeg_decoder_plugin.h85 std::shared_ptr<AVCodecContext> avCodecContext_; member in OHOS::MediaAVCodec::AudioFfmpegDecoderPlugin
/foundation/multimedia/av_codec/services/engine/codec/include/audio/encoder/
H A Daudio_ffmpeg_encoder_plugin.h56 std::shared_ptr<AVCodecContext> avCodecContext_; member in OHOS::MediaAVCodec::AudioFfmpegEncoderPlugin
H A Daudio_ffmpeg_aac_encoder_plugin.h60 std::shared_ptr<AVCodecContext> avCodecContext_; member in OHOS::MediaAVCodec::AudioFFMpegAacEncoderPlugin

Completed in 15 milliseconds