Hi,
I am using the below configurations for encoder and decoder and verified with screenrecord.cpp
format = MediaFormat.createVideoFormat(param.codec, param.width, param.height);
format.setInteger(MediaFormat.KEY_WIDTH, param.width);
format.setInteger(MediaFormat.KEY_HEIGHT, param.height);
format.setInteger(MediaFormat.KEY_COLOR_FORMAT, MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420Flexible);
format.setInteger(MediaFormat.KEY_BIT_RATE, 14000 * 1000); //trying with different bit rates
format.setInteger(MediaFormat.KEY_FRAME_RATE, 30);
format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, 0);
format.setInteger(MediaFormat.KEY_PROFILE, CodecProfileLevel.AVCProfileHigh);
format.setInteger(MediaFormat.KEY_LEVEL, CodecProfileLevel.AVCLevel31);
encoderInstance.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE);
12-11 22:29:04.508 3154 4229 I mediasdk_omx: mfx_omx_venc_component: Created OMX.Intel.hw_ve.h264
12-11 22:29:04.509 3154 4229 E OMXNodeInstance: setParameter(0xf6320cc0:Intel.hw_ve.h264, OMX.google.android.index.enableAndroidNativeBuffers(0x6ff00004): Output:1 en=0) ERROR: UnsupportedIndex(0x8000101a)
12-11 22:29:04.509 3154 4229 E OMXNodeInstance: setParameter(0xf6320cc0:Intel.hw_ve.h264, OMX.google.android.index.allocateNativeHandle(0x6ff00002): Output:1 en=0) ERROR: UnsupportedIndex(0x8000101a)
12-11 22:29:04.509 4431 7009 I ACodec : [OMX.Intel.hw_ve.h264] using color format 0x15 in place of 0x7f420888
12-11 22:29:04.510 4431 7009 I ACodec : setupAVCEncoderParameters with [profile: High] [level: Level31]
12-11 22:29:04.510 4431 7009 I ACodec : [OMX.Intel.hw_ve.h264] cannot encode color aspects. Ignoring.
12-11 22:29:04.510 4431 7009 I ACodec : [OMX.Intel.hw_ve.h264] cannot encode HDR static metadata. Ignoring.
12-11 22:29:04.510 4431 7009 I ACodec : setupVideoEncoder succeeded
12-11 22:29:04.510 3154 4229 E OMXNodeInstance: getConfig(0xf6320cc0:Intel.hw_ve.h264, ConfigLatency(0x6f800005)) ERROR: UnsupportedIndex(0x8000101a)
12-11 22:29:04.510 3154 4229 E OMXNodeInstance: getConfig(0xf6320cc0:Intel.hw_ve.h264, ConfigAndroidVendorExtension(0x6f100004)) ERROR: UnsupportedIndex(0x8000101a)
12-11 22:29:04.511 4431 4431 I System.out: NUCRAW .. Initializing and configuring encoder stop
decoderInstance = MediaCodec.createDecoderByType(codec);
format = MediaFormat.createVideoFormat(codec, decoderWidth, decoderHeight);
format.setInteger(MediaFormat.KEY_MAX_INPUT_SIZE, decoderWidth * decoderHeight);
format.setInteger("dohflip", doHflip ? 1 : 0);
format.setInteger("dovflip", doVflip ? 1 : 0);
decoderInstance.setVideoScalingMode(videoScalingMode); //MediaCodec.VIDEO_SCALING_MODE_SCALE_TO_FIT;
decoderInstance.configure(format, renderSurface, null, 0);
12-11 22:29:05.410 3154 6663 I mediasdk_omx: mfx_omx_vdec_component: Created OMX.Intel.hw_vd.h264
12-11 22:29:05.410 4431 4431 D TelyDecoder: Decoder Format: {mime=video/avc, width=1280, height=720}
12-11 22:29:05.411 4431 4431 D TelyDecoder: StartDecoder with Surface: Surface(name=null)/@0x62909d9 - 103352793
12-11 22:29:05.411 4431 7061 D SurfaceUtils: connecting to surface 0x79ef92dd2010, reason connectToSurface
12-11 22:29:05.411 4431 7061 I MediaCodec: [OMX.Intel.hw_vd.h264] setting surface generation to 4537345
12-11 22:29:05.411 4431 7061 D SurfaceUtils: disconnecting from surface 0x79ef92dd2010, reason connectToSurface(reconnect)
12-11 22:29:05.411 4431 7061 D SurfaceUtils: connecting to surface 0x79ef92dd2010, reason connectToSurface(reconnect)
12-11 22:29:05.411 3154 6663 E OMXNodeInstance: getConfig(0xf5e2b360:Intel.hw_vd.h264, ConfigAndroidVendorExtension(0x6f100004)) ERROR: UnsupportedIndex(0x8000101a)
But still having the same issue, do we see any issues with the config logs above ?
Thanks,
Sathish