System.err: android.media.MediaC
MediaFormat format = MediaFormat.createVideoFormat(MIME_TYPE, mWidth, mHeight);
format.setInteger(MediaFormat.KEY_COLOR_FORMAT, MediaCodecInfo.CodecCapabilities.COLOR_FormatSurface);
format.setInteger(MediaFormat.KEY_BIT_RATE, mBitRate);
format.setInteger(MediaFormat.KEY_FRAME_RATE, FRAME_RATE);
format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, IFRAME_INTERVAL);
format.setInteger(MediaFormat.KEY_MAX_WIDTH, mWidth);
format.setInteger(MediaFormat.KEY_MAX_HEIGHT, mHeight);
format.setInteger(MediaFormat.KEY_MAX_INPUT_SIZE, mWidth *mHeight);
format.setInteger(MediaFormat.KEY_WIDTH, mWidth);
format.setInteger(MediaFormat.KEY_HEIGHT, mHeight);
mEncoder = MediaCodec.createEncoderByType(MIME_TYPE);
mEncoder.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE);
mSurface =mEncoder.createInputSurface();
这段代码在华为jkm-al00b报的错
InputMethodManager: startInputReason = 1
04-16 17:38:34.359 25069-25555/ty.duobiao.dartscool I/ACodec: In onAllocateComponent create compenent, codec name: OMX.google.aac.encoder
04-16 17:38:34.360 25069-25555/ty.duobiao.dartscool W/HwExtendedUtils: hw configLocalPlayBack err = -2147483648
04-16 17:38:34.364 25069-25555/ty.duobiao.dartscool W/ColorUtils: expected specified color aspects (0:0:0:0)
04-16 17:38:34.365 25069-25555/ty.duobiao.dartscool E/ACodec: [OMX.google.aac.encoder] Unable to configure for node (err -1010)
[OMX.google.aac.encoder] onCreateInputSurface returning error -1010
04-16 17:38:34.365 25069-25554/ty.duobiao.dartscool W/MediaCodec: createInputSurface failed, err=-1010
04-16 17:38:34.365 25069-25554/ty.duobiao.dartscool W/System.err: android.media.MediaCodec$CodecException: Error 0xfffffc0e
04-16 17:38:34.366 25069-25554/ty.duobiao.dartscool W/System.err: at android.media.MediaCodec.createInputSurface(Native Method)
at ty.duobiao.dartscool.recordscreen.recordutils.ScreenRecordThread.prepareEncoder(ScreenRecordThread.java:214)
at ty.duobiao.dartscool.recordscreen.recordutils.ScreenRecordThread.run(ScreenRecordThread.java:85)
04-16 17:38:34.373 25069-25197/ty.duobiao.dartscool D/OpenGLRenderer: HWUI Binary is enabled
04-16 17:38:34.386 25069-25069/ty.duobiao.dartscool W/ViewRootImpl[Toast]: EGLdebug relayoutWindow Surface isSurface(name=null) (appName =ty.duobiao.dartscool) ( mSurfaceControllerIsValid =false) (mNativeObject =0)/@0x2bbcdb9,viewVisibility is0
04-16 17:38:34.397 25069-25069/ty.duobiao.dartscool W/ViewRootImpl[Toast]: EGLdebug relayoutWindow Surface isSurface(name=null) (appName =ty.duobiao.dartscool) ( mSurfaceControllerIsValid =true) (mNativeObject =cf17a800)/@0x2bbcdb9,relayoutResult is7
EGLdebug Surface isSurface(name=null) (appName =ty.duobiao.dartscool) ( mSurfaceControllerIsValid =true) (mNativeObject =cf17a800)/@0x2bbcdb9