Closed SearchSunny closed 3 years ago
锤子坚果手机调用视频拍摄时报异常:
依赖版本: implementation 'com.yanzhenjie:album:2.1.3'
异常手机信息: 锤子 M1L 系统版本:android 6.0.1 锤子 坚果 Pro 系统版本:android 7.1.1 锤子 坚果R2 系统版本:android 10
异常信息: 3-15 15:59:14.511 V/CAM_VideoUI(20307): Using mdp_preview_content (MDP path) 03-15 15:59:14.516 V/CameraHolder(20307): open camera 0 03-15 15:59:14.518 E/Camera (20307): Camera open package is com.android.camera2 03-15 15:59:14.518 I/CameraService( 514): CameraService::connect call (PID 20307 "com.android.camera2", camera ID 0) for HAL version 256 and Camera API version 1 03-15 15:59:14.519 E/CameraService( 514): Check active client size :0 03-15 15:59:14.519 I/QCamera ( 514): int qcamera::QCamera2Factory::getCameraInfo(int, camera_info): 316: Camera id 0 API version 256 03-15 15:59:14.519 I/QCamera ( 514): static int qcamera::QCamera3HardwareInterface::getCamInfo(uint32_t, camera_info): 7751: camera 0 resource cost is 100 03-15 15:59:14.519 I/CameraService( 514): onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=0 03-15 15:59:14.520 I/CameraClient( 514): Opening camera 0 03-15 15:59:14.520 I/QCamera ( 514): int qcamera::QCamera2Factory::getCameraInfo(int, camera_info): 316: Camera id 0 API version 256 03-15 15:59:14.520 I/QCamera ( 514): static int qcamera::QCamera3HardwareInterface::getCamInfo(uint32_t, camera_info): 7751: camera 0 resource cost is 100 03-15 15:59:14.520 I/QCamera ( 514): int qcamera::QCamera2Factory::cameraDeviceOpen(int, hw_device_t): 382: Open camera id 0 API version 256 03-15 15:59:14.522 I/QCamera ( 514): int qcamera::QCamera2HardwareInterface::openCamera(hw_device_t): 1847: [KPI Perf]: E PROFILE_OPEN_CAMERA camera id 0 03-15 15:59:14.523 I/CameraService( 514): onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=0 03-15 15:59:14.523 I/mm-camera( 589): < INFO> 395: void enable_memleak_trace(int): start memleak tracking. 03-15 15:59:14.524 I/mm-camera( 589): < INFO> 63: mct_controller_new: Creating new mct_controller with session-id 7 03-15 15:59:14.524 I/mm-camera( 589): < INFO> 190: isp_module_start_session: session id 7 03-15 15:59:14.526 E/ANDR-PERF-OPTSHANDLER( 3073): freq is change to 2342400 03-15 15:59:14.527 I/mm-camera( 589): < INFO> 1771: module_imglib_start_session: module_imglib_start_session:1771 ###Img_Loglevel 1, moduleMask 65535 03-15 15:59:14.534 I/mm-camera( 589): < INFO> 338: gyro_port_use_dsps_iface: Use DSPS interface as it supports 03-15 15:59:14.539 I/mm-camera( 589): < INFO> 463: mct_stream_start_link: Start linking Session-stream 0x7000f 03-15 15:59:14.539 I/mm-camera( 589): < INFO> 775: isp_port_check_caps_reserve: port 0xf36339c0 ide 7000f type 10 dim 0 0 03-15 15:59:14.539 E/mm-camera( 589): 2211: cpp_module_notify_add_stream: failed, CPP current version can not support rotation 03-15 15:59:14.540 E/QCamera2HWI( 514): level: 0, preview minfps 7000.000000, preview maxfpS 30000.000000, video minfps 7000.000000, video maxfpS 30000.000000 03-15 15:59:14.540 E/QCamera2HWI( 514): adjustedRange level: 0, preview minfps 7.000000, preview maxfpS 30.000000, video minfps 7.000000, video maxfpS 30.000000 03-15 15:59:14.541 E/QCameraParameters( 514): Setting Flash value off 03-15 15:59:14.541 E/QCameraParameters( 514): Setting ISO value auto 03-15 15:59:14.541 D/QCameraParameters( 514): HFR values 60,90,120,240,off HFR Sizes = 160x120,160x120,1920x1080,1280x720 03-15 15:59:14.542 E/mm-camera( 589): 2982: sensor_get_cur_chromatix_name_for_type: chromatix for res_idx = 0 special_mode_mask = 0 module = 4 chromatix_type = 0 is NULL 03-15 15:59:14.542 I/QCamera ( 514): int qcamera::QCamera2HardwareInterface::openCamera(hw_device_t*): 1860: [KPI Perf]: X PROFILE_OPEN_CAMERA camera id 0, rc: 0 03-15 15:59:14.542 E/mm-camera( 589): 5447: iface_util_set_dis_enable_flag: iface_util_set_dis_enable_flag:5447 DIS enable flag = 0 03-15 15:59:14.542 E/mm-camera( 589): 2982: sensor_get_cur_chromatix_name_for_type: chromatix for res_idx = 0 special_mode_mask = 0 module = 4 chromatix_type = 0 is NULL 03-15 15:59:14.542 E/mm-camera( 589): 5677: iface_util_set_hfr: iface_util_set_hfr: can't find hw stream, only save hfr mode 03-15 15:59:14.543 D/QCameraParameters( 514): setNumOfSnapshot nBurstNum:1 03-15 15:59:14.543 E/QCamera2HWI( 514): level: 0, preview minfps 7000.000000, preview maxfpS 30000.000000, video minfps 7000.000000, video maxfpS 30000.000000 03-15 15:59:14.543 E/QCamera2HWI( 514): adjustedRange level: 0, preview minfps 7.000000, preview maxfpS 30.000000, video minfps 7.000000, video maxfpS 30.000000 03-15 15:59:14.543 E/QCamera2HWI( 514): level: 0, preview minfps 7000.000000, preview maxfpS 30000.000000, video minfps 7000.000000, video maxfpS 30000.000000 03-15 15:59:14.543 E/QCamera2HWI( 514): adjustedRange level: 0, preview minfps 7.000000, preview maxfpS 30.000000, video minfps 7.000000, video maxfpS 30.000000 03-15 15:59:14.553 W/Bundle (20307): Key android.intent.extra.durationLimit expected Integer but value was a java.lang.Long. The default value 0 was returned. 03-15 15:59:14.554 W/Bundle (20307): Attempt to cast generated internal exception: 03-15 15:59:14.554 W/Bundle (20307): java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer 03-15 15:59:14.554 W/Bundle (20307): at android.os.BaseBundle.getInt(BaseBundle.java:807) 03-15 15:59:14.554 W/Bundle (20307): at android.content.Intent.getIntExtra(Intent.java:5453) 03-15 15:59:14.554 W/Bundle (20307): at com.android.camera.VideoModule.readVideoPreferences(VideoModule.java:588) 03-15 15:59:14.554 W/Bundle (20307): at com.android.camera.VideoModule.init(VideoModule.java:263) 03-15 15:59:14.554 W/Bundle (20307): at com.android.camera.CameraActivity.onCreate(CameraActivity.java:1072) 03-15 15:59:14.554 W/Bundle (20307): at android.app.Activity.performCreate(Activity.java:6441) 03-15 15:59:14.554 W/Bundle (20307): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108) 03-15 15:59:14.554 W/Bundle (20307): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2460) 03-15 15:59:14.554 W/Bundle (20307): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2581) 03-15 15:59:14.554 W/Bundle (20307): at android.app.ActivityThread.access$900(ActivityThread.java:163) 03-15 15:59:14.554 W/Bundle (20307): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1418) 03-15 15:59:14.554 W/Bundle (20307): at android.os.Handler.dispatchMessage(Handler.java:102) 03-15 15:59:14.554 W/Bundle (20307): at android.os.Looper.loop(Looper.java:148) 03-15 15:59:14.554 W/Bundle (20307): at android.app.ActivityThread.main(ActivityThread.java:5554) 03-15 15:59:14.554 W/Bundle (20307): at java.lang.reflect.Method.invoke(Native Method) 03-15 15:59:14.554 W/Bundle (20307): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:935) 03-15 15:59:14.554 W/Bundle (20307): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:726) 03-15 15:59:14.555 V/CAM_VideoModule(20307): mDesiredPreviewWidth=1920. mDesiredPreviewHeight=1080 03-15 15:59:14.555 V/CAM_VideoUI(20307): setTransformMatrix: scaledTextureWidth = 1440.0, scaledTextureHeight = 2560.0 03-15 15:59:14.555 V/CAM_VideoModuleBase(20307): Video Encoder selected = 2 03-15 15:59:14.555 V/CAM_VideoModuleBase(20307): Audio Encoder selected = 3 03-15 15:59:14.555 I/QCamera ( 514): int qcamera::QCamera2Factory::getCameraInfo(int, camera_info): 316: Camera id 0 API version 256 03-15 15:59:14.556 I/QCamera ( 514): static int qcamera::QCamera3HardwareInterface::getCamInfo(uint32_t, camera_info*): 7751: camera 0 resource cost is 100 03-15 15:59:14.556 I/ANDR-IOP_CAP( 3057): Getting snapshot 20307 03-15 15:59:14.556 I/ANDR-IOP_CAP( 3057): Dirname = /proc/20307/fd MAX_PATH = 4096 03-15 15:59:14.556 V/CAM_VideoUI(20307): setTransformMatrix: scaledTextureWidth = 1440.0, scaledTextureHeight = 2560.0 03-15 15:59:14.556 I/ANDR-IOP_CAP( 3057): get_snapshot Enter dp = 0x7f95b12000 03-15 15:59:14.556 I/ANDR-IOP_CAP( 3057): dp = -1783554048
异常问题已找到:使用Record Viedo时,设置quality()、limitDuration(),limitBytes()这些方法就会导致报异常。其它品牌手机没问题,只有在锤子手机会出现。
锤子坚果手机调用视频拍摄时报异常:
依赖版本: implementation 'com.yanzhenjie:album:2.1.3'
异常手机信息: 锤子 M1L 系统版本:android 6.0.1 锤子 坚果 Pro 系统版本:android 7.1.1 锤子 坚果R2 系统版本:android 10
异常信息: 3-15 15:59:14.511 V/CAM_VideoUI(20307): Using mdp_preview_content (MDP path) 03-15 15:59:14.516 V/CameraHolder(20307): open camera 0 03-15 15:59:14.518 E/Camera (20307): Camera open package is com.android.camera2 03-15 15:59:14.518 I/CameraService( 514): CameraService::connect call (PID 20307 "com.android.camera2", camera ID 0) for HAL version 256 and Camera API version 1 03-15 15:59:14.519 E/CameraService( 514): Check active client size :0 03-15 15:59:14.519 I/QCamera ( 514): int qcamera::QCamera2Factory::getCameraInfo(int, camera_info): 316: Camera id 0 API version 256
03-15 15:59:14.519 I/QCamera ( 514): static int qcamera::QCamera3HardwareInterface::getCamInfo(uint32_t, camera_info ): 7751: camera 0 resource cost is 100
03-15 15:59:14.519 I/CameraService( 514): onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=0
03-15 15:59:14.520 I/CameraClient( 514): Opening camera 0
03-15 15:59:14.520 I/QCamera ( 514): int qcamera::QCamera2Factory::getCameraInfo(int, camera_info): 316: Camera id 0 API version 256
03-15 15:59:14.520 I/QCamera ( 514): static int qcamera::QCamera3HardwareInterface::getCamInfo(uint32_t, camera_info ): 7751: camera 0 resource cost is 100
03-15 15:59:14.520 I/QCamera ( 514): int qcamera::QCamera2Factory::cameraDeviceOpen(int, hw_device_t): 382: Open camera id 0 API version 256
03-15 15:59:14.522 I/QCamera ( 514): int qcamera::QCamera2HardwareInterface::openCamera(hw_device_t ): 1847: [KPI Perf]: E PROFILE_OPEN_CAMERA camera id 0
03-15 15:59:14.523 I/CameraService( 514): onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=0
03-15 15:59:14.523 I/mm-camera( 589): < INFO> 395: void enable_memleak_trace(int): start memleak tracking.
03-15 15:59:14.524 I/mm-camera( 589): < INFO> 63: mct_controller_new: Creating new mct_controller with session-id 7
03-15 15:59:14.524 I/mm-camera( 589): < INFO> 190: isp_module_start_session: session id 7
03-15 15:59:14.526 E/ANDR-PERF-OPTSHANDLER( 3073): freq is change to 2342400
03-15 15:59:14.527 I/mm-camera( 589): < INFO> 1771: module_imglib_start_session: module_imglib_start_session:1771 ###Img_Loglevel 1, moduleMask 65535
03-15 15:59:14.534 I/mm-camera( 589): < INFO> 338: gyro_port_use_dsps_iface: Use DSPS interface as it supports
03-15 15:59:14.539 I/mm-camera( 589): < INFO> 463: mct_stream_start_link: Start linking Session-stream 0x7000f
03-15 15:59:14.539 I/mm-camera( 589): < INFO> 775: isp_port_check_caps_reserve: port 0xf36339c0 ide 7000f type 10 dim 0 0
03-15 15:59:14.539 E/mm-camera( 589): 2211: cpp_module_notify_add_stream: failed, CPP current version can not support rotation
03-15 15:59:14.540 E/QCamera2HWI( 514): level: 0, preview minfps 7000.000000, preview maxfpS 30000.000000, video minfps 7000.000000, video maxfpS 30000.000000
03-15 15:59:14.540 E/QCamera2HWI( 514): adjustedRange level: 0, preview minfps 7.000000, preview maxfpS 30.000000, video minfps 7.000000, video maxfpS 30.000000
03-15 15:59:14.541 E/QCameraParameters( 514): Setting Flash value off
03-15 15:59:14.541 E/QCameraParameters( 514): Setting ISO value auto
03-15 15:59:14.541 D/QCameraParameters( 514): HFR values 60,90,120,240,off HFR Sizes = 160x120,160x120,1920x1080,1280x720
03-15 15:59:14.542 E/mm-camera( 589): 2982: sensor_get_cur_chromatix_name_for_type: chromatix for res_idx = 0 special_mode_mask = 0 module = 4 chromatix_type = 0 is NULL
03-15 15:59:14.542 I/QCamera ( 514): int qcamera::QCamera2HardwareInterface::openCamera(hw_device_t*): 1860: [KPI Perf]: X PROFILE_OPEN_CAMERA camera id 0, rc: 0
03-15 15:59:14.542 E/mm-camera( 589): 5447: iface_util_set_dis_enable_flag: iface_util_set_dis_enable_flag:5447 DIS enable flag = 0
03-15 15:59:14.542 E/mm-camera( 589): 2982: sensor_get_cur_chromatix_name_for_type: chromatix for res_idx = 0 special_mode_mask = 0 module = 4 chromatix_type = 0 is NULL
03-15 15:59:14.542 E/mm-camera( 589): 5677: iface_util_set_hfr: iface_util_set_hfr: can't find hw stream, only save hfr mode
03-15 15:59:14.543 D/QCameraParameters( 514): setNumOfSnapshot nBurstNum:1
03-15 15:59:14.543 E/QCamera2HWI( 514): level: 0, preview minfps 7000.000000, preview maxfpS 30000.000000, video minfps 7000.000000, video maxfpS 30000.000000
03-15 15:59:14.543 E/QCamera2HWI( 514): adjustedRange level: 0, preview minfps 7.000000, preview maxfpS 30.000000, video minfps 7.000000, video maxfpS 30.000000
03-15 15:59:14.543 E/QCamera2HWI( 514): level: 0, preview minfps 7000.000000, preview maxfpS 30000.000000, video minfps 7000.000000, video maxfpS 30000.000000
03-15 15:59:14.543 E/QCamera2HWI( 514): adjustedRange level: 0, preview minfps 7.000000, preview maxfpS 30.000000, video minfps 7.000000, video maxfpS 30.000000
03-15 15:59:14.553 W/Bundle (20307): Key android.intent.extra.durationLimit expected Integer but value was a java.lang.Long. The default value 0 was returned.
03-15 15:59:14.554 W/Bundle (20307): Attempt to cast generated internal exception:
03-15 15:59:14.554 W/Bundle (20307): java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
03-15 15:59:14.554 W/Bundle (20307): at android.os.BaseBundle.getInt(BaseBundle.java:807)
03-15 15:59:14.554 W/Bundle (20307): at android.content.Intent.getIntExtra(Intent.java:5453)
03-15 15:59:14.554 W/Bundle (20307): at com.android.camera.VideoModule.readVideoPreferences(VideoModule.java:588)
03-15 15:59:14.554 W/Bundle (20307): at com.android.camera.VideoModule.init(VideoModule.java:263)
03-15 15:59:14.554 W/Bundle (20307): at com.android.camera.CameraActivity.onCreate(CameraActivity.java:1072)
03-15 15:59:14.554 W/Bundle (20307): at android.app.Activity.performCreate(Activity.java:6441)
03-15 15:59:14.554 W/Bundle (20307): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
03-15 15:59:14.554 W/Bundle (20307): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2460)
03-15 15:59:14.554 W/Bundle (20307): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2581)
03-15 15:59:14.554 W/Bundle (20307): at android.app.ActivityThread.access$900(ActivityThread.java:163)
03-15 15:59:14.554 W/Bundle (20307): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1418)
03-15 15:59:14.554 W/Bundle (20307): at android.os.Handler.dispatchMessage(Handler.java:102)
03-15 15:59:14.554 W/Bundle (20307): at android.os.Looper.loop(Looper.java:148)
03-15 15:59:14.554 W/Bundle (20307): at android.app.ActivityThread.main(ActivityThread.java:5554)
03-15 15:59:14.554 W/Bundle (20307): at java.lang.reflect.Method.invoke(Native Method)
03-15 15:59:14.554 W/Bundle (20307): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:935)
03-15 15:59:14.554 W/Bundle (20307): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:726)
03-15 15:59:14.555 V/CAM_VideoModule(20307): mDesiredPreviewWidth=1920. mDesiredPreviewHeight=1080
03-15 15:59:14.555 V/CAM_VideoUI(20307): setTransformMatrix: scaledTextureWidth = 1440.0, scaledTextureHeight = 2560.0
03-15 15:59:14.555 V/CAM_VideoModuleBase(20307): Video Encoder selected = 2
03-15 15:59:14.555 V/CAM_VideoModuleBase(20307): Audio Encoder selected = 3
03-15 15:59:14.555 I/QCamera ( 514): int qcamera::QCamera2Factory::getCameraInfo(int, camera_info ): 316: Camera id 0 API version 256
03-15 15:59:14.556 I/QCamera ( 514): static int qcamera::QCamera3HardwareInterface::getCamInfo(uint32_t, camera_info*): 7751: camera 0 resource cost is 100
03-15 15:59:14.556 I/ANDR-IOP_CAP( 3057): Getting snapshot 20307
03-15 15:59:14.556 I/ANDR-IOP_CAP( 3057): Dirname = /proc/20307/fd MAX_PATH = 4096
03-15 15:59:14.556 V/CAM_VideoUI(20307): setTransformMatrix: scaledTextureWidth = 1440.0, scaledTextureHeight = 2560.0
03-15 15:59:14.556 I/ANDR-IOP_CAP( 3057): get_snapshot Enter dp = 0x7f95b12000
03-15 15:59:14.556 I/ANDR-IOP_CAP( 3057): dp = -1783554048