ScreenRecordingSample icon indicating copy to clipboard operation
ScreenRecordingSample copied to clipboard

Crash on one plus phone

Open shoulderdh opened this issue 8 years ago • 0 comments

here is my solution:

replace a method at MediaVideoEncoderBase

protected MediaFormat create_encoder_format1(final String mime, final int frame_rate, final int bitrate) { if (DEBUG) Log.v(TAG, String.format("create_encoder_format:(%d,%d),mime=%s,frame_rate=%d,bitrate=%d", 720, 1280, mime, frame_rate, bitrate)); final MediaFormat format = MediaFormat.createVideoFormat(mime, 720, 1280); format.setInteger(MediaFormat.KEY_COLOR_FORMAT, MediaCodecInfo.CodecCapabilities.COLOR_FormatSurface); // API >= 18 format.setInteger(MediaFormat.KEY_BIT_RATE, bitrate > 0 ? bitrate : calcBitRate(frame_rate)); //800000 format.setInteger(MediaFormat.KEY_FRAME_RATE,30); format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, 10); return format; }

shoulderdh avatar Dec 22 '17 03:12 shoulderdh