question

Dr.Gigabit avatar image
Dr.Gigabit asked

Front camera fails to deliver stream

Hi all, I am developing a camera app. Once I use the front camera with the following settings bitrate 19200 30 fps resolution 320-240 I use these settings from the stream setVideoSource(MediaRecorder.VideoSource.CAMERA); setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); and start the playback, I see the following log 12-03 11:57:41.608 3336-3341/? I/CameraClient﹕ Opening camera 0 12-03 11:58:38.809 3820-3874/com.my.app I/MediaRecorderJNI﹕ prepare: surface=0xb99b6a70 (identity=129) 12-03 11:58:39.732 3336-3341/? W/QCUtilClass﹕ Invalid hfr value(-1) set from app. Disabling HFR. 12-03 11:58:39.739 3336-3341/? I/SoftAVCEncoder﹕ Construct SoftAVCEncoder 12-03 11:58:39.739 3336-3341/? I/MPEG4Writer﹕ limits: 4294967295/0 bytes/us, bit rate: 192000 bps and the estimated moov size 3072 bytes 12-03 11:58:39.739 3336-3341/? W/CameraSource﹕ Failed to set video buffer count to 2 due to -38 12-03 11:58:39.739 3336-3341/? I/AwesomePlayer﹕ sendDolbyProfile in play_l 12-03 11:58:39.739 3336-3341/? E/AwesomePlayer﹕ LPAPlayer::Clip duration setting of less than 30sec not supported, defaulting to 60sec 12-03 11:58:39.739 3336-3341/? I/AudioFlinger﹕ New playback track created at 44100Hz sample rate. 12-03 11:58:39.828 3336-3885/? E/gralloc_goldfish﹕ gralloc_lock usage mismatch usage=0x30 cb->usage=0x900 12-03 11:58:39.828 3336-3885/? W/GraphicBufferMapper﹕ lock(...) failed -22 (Invalid argument) 12-03 11:58:39.828 3336-3885/? E/EmulatedCamera_Preview﹕ onNextFrameAvailable: grbuffer_mapper.lock failure: -22 -> Unknown error 4294967274 the last error repeats for a while, and then MediaRecorder dies. This doesn't happen on other devises, so presumably this is not the app issue. Looks like my parameters don't match hardware performance. Any advises?
fire tablet
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Dr.Gigabit, Thank you for writing to us. Can you please provide a sample app (with source code) what can demonstrate the issue?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dr.Gigabit avatar image
Dr.Gigabit answered
Hi, I think this is actually an emulator issue. The actual device is OK. Pretty much any app which would record video from the camera would have it on emulator. Unfortunately I don't have a hello world app at the moment. But again, is seems an emulator issue, not the device. thanks, Andrei
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Gigabit, Can you please ensure that the camera is enabled in the AVD you are testing? If that doesn't work, then it is most likely that the emulator does not support the settings you are using. Sample code would help us to debug the issue.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.