[General Questions and Answers] amuppet:
Hi all,

I'm getting an error when attempting to encode video frames using the h264 encoder. I'd like to get some help i understanding what could be going wrong, and especially understanding which errors are fatal and which are not:

06-04 14:43:39.478 25211 25211 I OMXClient: IOmx service obtained
06-04 14:43:39.479 286 1364 I OMXMaster: makeComponentInstance(OMX.qcom.video.encoder.avc) in omx@1.0-service process
06-04 14:43:39.486 286 1364 D PlatformConfig: getInstance: Enter
06-04 14:43:39.486 286 1364 D PlatformConfig: getInt32: Returning default
06-04 14:43:39.486 286 1364 D PlatformConfig: getInstance: Enter
06-04 14:43:39.486 286 1364 D PlatformConfig: getInt32 Config name: vidc_enc_log_in value: 0
06-04 14:43:39.486 286 1364 D PlatformConfig: getInstance: Enter
06-04 14:43:39.486 286 1364 D PlatformConfig: getInt32 Config name: vidc_enc_log_out value: 0
06-04 14:43:39.486 286 1364 D PlatformConfig: getInstance: Enter
06-04 14:43:39.486 286 1364 D PlatformConfig: getInt32 Config name: vidc_enc_csc_custom_matrix value: 0
06-04 14:43:39.486 286 1364 D PlatformConfig: getInstance: Enter
06-04 14:43:39.486 286 1364 D PlatformConfig: getInt32: Returning default
06-04 14:43:39.486 286 1364 D PlatformConfig: getInstance: Enter
06-04 14:43:39.486 286 1364 D PlatformConfig: getInt32: Returning default
06-04 14:43:39.503 286 1364 I OMX-VENC: Component_init : OMX.qcom.video.encoder.avc : return = 0x0
06-04 14:43:39.508 25098 25098 I MediaCodec: MediaCodec will operate in async mode
06-04 14:43:39.511 286 1364 I OMX-VENC: WARN: Enable/Disable allocate-native-handle allowed only in secure session
06-04 14:43:39.511 286 1364 E OMXNodeInstance: setParameter(0xe3fb6144:qcom.encoder.avc, OMX.google.android.index.allocateNativeHandle(0x7f00005d): Output:1 en=0) ERROR: UnsupportedSetting(0x80001019)
06-04 14:43:39.511 286 1364 I OMX-VENC: WARN: set_parameter: metamode is valid for input port only
06-04 14:43:39.511 286 1364 W OMXNodeInstance: [0xe3fb6144:qcom.encoder.avc] component does not support metadata mode; using fallback
06-04 14:43:39.513 25211 25211 W OMXUtils: do not know color format 0x7fa30c06 = 2141391878
06-04 14:43:39.513 25211 25211 W OMXUtils: do not know color format 0x7fa30c04 = 2141391876
06-04 14:43:39.513 25211 25211 W OMXUtils: do not know color format 0x7fa30c00 = 2141391872
06-04 14:43:39.514 25211 25211 W OMXUtils: do not know color format 0x7fa30c09 = 2141391881
06-04 14:43:39.514 25211 25211 W OMXUtils: do not know color format 0x7fa30c0a = 2141391882
06-04 14:43:39.514 25211 25211 W OMXUtils: do not know color format 0x7fa30c08 = 2141391880
06-04 14:43:39.515 25211 25211 W OMXUtils: do not know color format 0x7fa30c07 = 2141391879
06-04 14:43:39.516 25211 25211 W OMXUtils: do not know color format 0x7f000789 = 2130708361
06-04 14:43:39.518 286 1364 I OMX-VENC: venc_dev: WARN: Unsupported eColorFormat 0x7f000789
06-04 14:43:39.525 25211 25211 I ACodec : setupAVCEncoderParameters with [profile: Baseline] [level: Level1]
06-04 14:43:39.527 286 943 I OMX-VENC: WARN: Failed to update the profile_level
06-04 14:43:39.527 25211 25211 I ACodec : [OMX.qcom.video.encoder.avc] cannot encode HDR static metadata. Ignoring.
06-04 14:43:39.527 25211 25211 I ACodec : setupVideoEncoder succeeded
06-04 14:43:39.528 25211 25211 W OMXUtils: do not know color format 0x7f000789 = 2130708361
06-04 14:43:39.528 286 1556 E OMX-VENC: ERROR: unsupported index 1870659589
06-04 14:43:39.528 286 1556 E OMXNodeInstance: getConfig(0xe3fb6144:qcom.encoder.avc, ConfigLatency(0x6f800005)) ERROR: UnsupportedIndex(0x8000101a)
06-04 14:43:39.533 137 137 W AshmemAllocator: ashmem_create_region(1490944) returning hidl_memory(0x7e34a2c110, 1490944)
06-04 14:43:39.534 25211 25211 D vndksupport: Loading /system/lib64/vndk-sp-28/hw/android.hidl.memory@1.0-impl.so from current namespace instead of sphal namespace.
06-04 14:43:39.536 286 1364 E ion : ioctl c0044901 failed with code -1: Not a typewriter
06-04 14:43:39.538 137 137 W AshmemAllocator: ashmem_create_region(1490944) returning hidl_memory(0x7e34a2c110, 1490944)
06-04 14:43:39.546 137 137 I chatty : uid=1000(system) allocator@1.0-s identical 5 lines
06-04 14:43:39.547 137 137 W AshmemAllocator: ashmem_create_region(1490944) returning hidl_memory(0x7e34a2c110, 1490944)
06-04 14:43:39.553 137 137 W AshmemAllocator: ashmem_create_region(921600) returning hidl_memory(0x7e34a2c110, 921600)
06-04 14:43:39.555 137 137 I chatty : uid=1000(system) allocator@1.0-s identical 2 lines
06-04 14:43:39.556 137 137 W AshmemAllocator: ashmem_create_region(921600) returning hidl_memory(0x7e34a2c110, 921600)
06-04 14:43:39.558 286 1757 I OMX-VENC: venc_dev: id = 10035242, value = 4294967295, min = 0, max = 0
06-04 14:43:39.558 286 1757 I OMX-VENC: venc_dev: id = 10035230, value = 4294967295, min = 0, max = 5
06-04 14:43:39.558 286 1757 I OMX-VENC: venc_dev: id = 10035243, value = 4294967295, min = 0, max = 5
06-04 14:43:39.558 286 1757 I OMX-VENC: venc_dev: WARN: TemporalLayer: Invalid settings, hardware doesn't support 0 temporal layers
06-04 14:43:39.558 286 1757 I OMX-VENC: venc_dev: id = 10035242, value = 4294967295, min = 0, max = 0
06-04 14:43:39.558 286 1757 I OMX-VENC: venc_dev: id = 10035230, value = 4294967295, min = 0, max = 5
06-04 14:43:39.558 286 1757 I OMX-VENC: venc_dev: id = 10035243, value = 4294967295, min = 0, max = 5
06-04 14:43:39.558 286 1757 I OMX-VENC: venc_dev: WARN: TemporalLayer: Invalid settings, hardware doesn't support 0 temporal layers
06-04 14:43:40.058 25097 25097 I MediaCodecSource: MediaCodecSource (video) starting
06-04 14:43:40.060 25097 25097 I MediaCodecSource: MediaCodecSource (video) started
06-04 14:43:40.066 25216 25216 V MediaCompatibilityLayer: bool media_codec_source_read(MediaCodecSourceWrapper *, MediaBufferWrapper **):346
06-04 14:43:40.066 25216 25216 V MediaCompatibilityLayer: bool media_codec_source_read(MediaCodecSourceWrapper *, MediaBufferWrapper **):350
06-04 14:43:40.066 25216 25216 V MediaCompatibilityLayer: bool media_codec_source_read(MediaCodecSourceWrapper *, MediaBufferWrapper **):357
06-04 14:43:40.083 286 1757 E OMX-VENC: ERROR: ETBProxyA: Invalid bufindex = 1718596252
06-04 14:43:40.083 286 1757 E OMX-VENC: ERROR: ETBProxy() failed!
06-04 14:43:40.083 286 1757 E OMX-VENC: ERROR: send OMX_ErrorHardware to Client
06-04 14:43:40.085 25211 25211 E ACodec : [OMX.qcom.video.encoder.avc] ERROR(0x80001009)
06-04 14:43:40.085 25211 25211 E ACodec : signalError(omxError 0x80001009, internalError -2147483648)
06-04 14:43:40.085 25098 25098 E MediaCodec: Codec reported err 0x80001009, actionCode 0, while in state 6
06-04 14:43:40.085 25098 25098 W MediaAnalyticsItem: Unable to record: [1:codec:0:-1::0:-1:1:0:10:android.media.mediacodec.codec=OMX.qcom.video.encoder.avc:android.media.mediacodec.mode=video:android.media.mediacodec.secure=0:android.media.mediacodec.encoder=1:android.media.mediacodec.width=1280:android.media.mediacodec.height=720:android.media.mediacodec.rotation-degrees=0:android.media.mediacodec.mime=video/avc:android.media.mediacodec.errcode=-2147479543:android.media.mediacodec.errstate=STARTED:] [forcenew=0]
06-04 14:43:40.087 25097 25097 E MediaCodecSource: Encoder (video) reported error : 0x80001009
06-04 14:43:40.088 25216 25216 V MediaCompatibilityLayer: bool media_codec_source_read(MediaCodecSourceWrapper *, MediaBufferWrapper **):359 err is -1011
06-04 14:43:40.109 25096 25096 E qdgralloc: Invalid gralloc handle (at 0x760400b420): ver(12/12) ints(0/22) fds(0/2)
06-04 14:43:40.109 25096 25096 E qdgralloc: Gralloc Error : device= 0x760400a820, buffer-handle=0x760400b420
06-04 14:43:42.104 2311 2311 W SDM : HWCSession::UEventThread: UEvent dropped. No uevent listener.
06-04 14:43:42.141 2311 2311 W SDM : HWCSession::UEventThread: UEvent dropped. No uevent listener.
06-04 14:43:43.088 25211 25211 I ACodec : [OMX.qcom.video.encoder.avc] forcing the release of codec
06-04 14:43:43.194 286 1758 E OMX-VENC: venc_dev: async_venc_message_thread interrupted to be exited
06-04 14:43:43.198 286 1364 I OMX-VENC: Component Deinit
06-04 14:43:43.204 25211 25211 E ACodec : OMX.qcom.video.encoder.avc
06-04 14:43:43.207 25097 25097 I MediaCodecSource: encoder (video) stopped

The code is the aethercast project from UBports, and all calls are going through libhybris: https://github.com/ubports/aethercast/blob/xenial/src/ac/android/h264encoder.cpp