For those of you who have downloaded the AOKP MM that God graciously allowed me to build, there was a problem with video recordings. It was recently brought to my attention on XDA that my build would take great camera stills, but if you tried to record video, it actually didn’t save the video anywhere! Don’t worry if you are using one of my builds, though, because (Praise God!) the errors are now solved and it works since the 20160716 build. So if you have a build before that, click on the “Homemade Roms” button above and download the latest version, where it is fixed.

Here were the fails from the logcat. I am only focusing on the errors, stops, or fails.

Using the built in Camera app:

[CODE]
07-12 06:43:32.459 244 3766 I MediaCodecSource: encoder (audio) stopped
07-12 06:43:32.459 244 652 I MediaCodecSource: puller (audio) stopping
07-12 06:43:32.461 244 3847 E OMXNodeInstance: setConfig(1d:google.vorbis.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
07-12 06:43:32.461 244 3847 I ACodec : codec does not support config priority (err -2147483648)
07-12 06:43:32.462 244 3847 I MediaCodec: MediaCodec will operate in async mode
07-12 06:43:32.467 244 3846 I NuPlayerDecoder: [OMX.google.vorbis.decoder] resubmitting CSD
07-12 06:43:32.468 244 3846 I NuPlayerDecoder: [OMX.google.vorbis.decoder] resubmitting CSD
07-12 06:43:32.469 244 3775 D ALSAStreamOps: setParameters(): keyRouting with device 0x0
07-12 06:43:32.469 244 3775 E ALSAStreamOps: must not change mDevices to 0
07-12 06:43:32.470 244 3775 D AudioStreamInALSA: standby
07-12 06:43:32.470 244 3775 D AudioStreamInALSA: standby
07-12 06:43:32.470 244 3775 D ALSADevice: standby: handle 0xb216c1c0 h 0x0
07-12 06:43:32.472 244 3848 W SoftVorbis: vorbis_dsp_synthesis returned -135
07-12 06:43:32.473 244 3848 W SoftVorbis: vorbis_dsp_synthesis returned -135
07-12 06:43:32.500 3612 3612 E MediaRecorder: stop failed: -1007
07-12 06:43:32.502 3612 3612 E CAM_VideoModule: java.lang.RuntimeException: stop failed.
07-12 06:43:33.984 244 3647 W AMessage: failed to post message as target looper for handler 0 is gone.
[/CODE]

Using the OpenCamera App for comparison:

[CODE]
07-12 06:50:28.951 244 4439 E ACDB-LOADER: Error: ACDB EC_REF_RX returned = -8
07-12 06:50:28.976 244 4436 E SoftAVCEnc: Error in extractGraphicBuffer
07-12 06:50:28.976 244 4435 E ACodec : [OMX.google.h264.encoder] ERROR(0x80001001)
07-12 06:50:28.976 244 4435 E ACodec : signalError(omxError 0x80001001, internalError -2147483648)
07-12 06:50:28.976 244 4435 E ACodec : [OMX.google.h264.encoder] ERROR(0x80001001)
07-12 06:50:28.976 244 4435 E ACodec : signalError(omxError 0x80001001, internalError -2147483648)
07-12 06:50:28.977 244 4434 E MediaCodec: Codec reported err 0x80001001, actionCode 0, while in state 6
07-12 06:50:28.977 244 4439 D ALSADevice: setHardwareParams: buffer_size 16384, period_size 4096, period_cnt 4
07-12 06:50:28.977 244 4431 E MediaCodecSource: Encoder (video) reported error : 0x80001001
07-12 06:50:29.124 4180 4180 E MediaRecorder: stop failed: -1007
[/CODE]

So, the errors or fails that are the same are these:

[CODE]
ACDB-LOADER: Error: ACDB EC_REF_RX returned = -8
MediaRecorder: stop failed: -1007
[/CODE]

These appeared to me to both be audio errors. It appears that the audio is creating an error, so the video will not save. Unless someone out there knows better (be sure to correct me, I’m still learning). So I began looking at MediaRecorder and ACDB-LOADER for audio problems. In the end, I couldn’t quite figure out what was wrong until I downloaded the latest device trees from CM13. Once I merged them with my files on Github, I started seeing all the little details that must have added up to it not working quite right. Here is a link to the commit:

https://github.com/alaskalinuxuser/android_device_samsung_jf-common/commit/bce04ddbb06bcae14642dfd117860ab291d5026a

Pay special attention to the audio changes, and the camerawrapper commits. I am too inexperienced to tell you exactly what was wrong with it, but I can definately see a change in these files that make more sense. In either event, the issue was fixed, and everything else still worked! Along the way, I got to learn some great things about cameras, so it was a good thing this happened!

Linux – keep it simple.

 

Leave a Reply

Your email address will not be published. Required fields are marked *