0
Meine Frage ist sehr klar. Ist es möglich, Media Codec zu konfigurieren, wenn Codec ausgeführt wird?MediaCodec dynamisch konfigurieren
Codebeispiel:
codec = MediaCodec.createDecoderByType("video/avc");
MediaFormat format = MediaFormat.createVideoFormat(CodecConfigurations.MIME_TYPE,
CodecConfigurations.WIDTH, CodecConfigurations.HEIGHT);
Log.d(LOG_TAG, "Track Format: " + mime);
format.setInteger(MediaFormat.KEY_BIT_RATE, 125000);
format.setInteger(MediaFormat.KEY_FRAME_RATE, 15);
format.setInteger(MediaFormat.KEY_COLOR_FORMAT, MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420Planar);
format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, 5);
codec.configure(format, null, null, 0);
codec.start();
Ist es möglich, wie weiter unten zu rekonfigurieren Codec ohne den Codec zu stoppen?
format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, 10);
codec.configure(format, null, null, 0);