Open spaul13 opened 5 years ago
ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "mediacodec", 1);
Hi, @befovy really thanks for the reply. Just one little help, Can u please tell me why after decoding using the ijkplayer code in queue_picture() [in ff_ffplay.c] the AVFrame *src_frame has no data[0], data[1], data[2] (they are all NULL, although the pix_fmt is YUVJ420P).
I can't see three dataplanes and linesizes for the decoded frames. can u please tell me why?
"mediacodec-avc" replace with "h264_mediacodec"
I am trying to assign a hardware video decoder and then use that decoder to decode my video frames.
_pCodec = avcodec_find_decoder_by_name("mediacodec-avc"); pCodecCtx = avcodec_alloc_context3(pCodec); if(avcodec_copy_context(pCodecCtx, pCodecCtxOrig) != 0) { ALOGD(stderr, "Couldn't copy codec context"); return -1; // Error copying codec context } if(avcodecopen2(pCodecCtx, pCodec, NULL)<0) { ALOGD("Video: Could not open codec\n"); return -1; } But it keeps showing the error message No codec is provided to avcodec_open2. Can anyone please tell me how can I find and assign hardware-decoder for android?