当我尝试获取mediecodec信息时,总是崩溃,但不知道为什么?
MediaCodecInfo info = null;
CodecCapabilities capabilities;
try {
Logging.e(TAG, " 22222222222222222222;");
capabilities = info.getCapabilitiesForType(mime);
Logging.e(TAG, " 3333333333333333333333333333333333333;");
Logging.e(TAG, " capabilities = info.getCapabilitiesForType(mime);");
} catch (IllegalArgumentException e) {
Logging.e(TAG, "Cannot retrieve encoder capabilities", e);
continue;
}
Folllow是崩溃堆栈:
1-02 12:38:24.849 4583-4583 /?我/ DEBUG:#00 pc 00022e38 /system/lib/libc.so(strlen + 15)11-02 12:38:24.850 4583-4583 /? I / DEBUG:#01 pc 00026583 /system/lib/libc.so(sscanf + 34)11-02 12:38:24.850 4583-4583 /? I / DEBUG:#02 pc 00010b93 /system/lib/hw/camera.bigfish.so 11-02 12:38:24.850 4583-4583 /? 我/ DEBUG:#03 pc 00011ddb /system/lib/hw/camera.bigfish.so (机器人:: CameraParameterPreview :: queryCapability(机器人:: CameraParameters&安培;)+ 298) 11-02 12:38:24.850 4583-4583 /? I / DEBUG:#04 pc 00012bf9 /system/lib/hw/camera.bigfish.so (机器人:: CapabilityManager :: queryCap(机器人:: CameraParameters&安培;)+ 56) 11-02 12:38:24.850 4583-4583 /? I / DEBUG:#05 pc 0000c8b7 /system/lib/hw/camera.bigfish.so (android :: CameraHal :: initDefaultParameters()+ 18)11-02 12:38:24.850 4583-4583 /? I / DEBUG:#06 pc 0000e81b /system/lib/hw/camera.bigfish.so (android :: CameraHal :: CameraHal(int)+554)11-02 12:38:24.850 4583-4583 /? I / DEBUG:#07 pc 0000eafd /system/lib/hw/camera.bigfish.so 11-02 12:38:24.850 4583-4583 /? I / DEBUG:#08 pc 00044875 /system/lib/libcameraservice.so (android :: CameraClient :: initialize(camera_module *)+ 180)11-02 12:38:24.850 4583-4583 /?我/ DEBUG:#09 pc 0003e493 /system/lib/libcameraservice.so (机器人:: CameraService :: connectFinishUnsafe(机器人:: SP const&,android :: sp const&)+ 16)11-02 12:38:24.850 4583-4583 /? I / DEBUG:#10 pc 000402a7 /system/lib/libcameraservice.so (机器人:: CameraService ::连接(机器人:: SP const&,int,android :: String16 const&,int, android :: sp&)+ 494)11-02 12:38:24.850 4583-4583 /? I / DEBUG:#11 pc 00021943 /system/lib/libcamera_client.so (android :: BnCameraService :: onTransact(unsigned int,android :: Parcel const&,android :: Parcel *,unsigned int)+314)11-02 12:38:24.850 4583-4583 /? I / DEBUG:#12 pc 0003dfb1 /system/lib/libcameraservice.so (android :: CameraService :: onTransact(unsigned int,android :: Parcel const&,android :: Parcel *,unsigned int)+104)11-02 12:38:24.850 4583-4583 /? I / DEBUG:#13 pc 00019225 /system/lib/libbinder.so (android :: BBinder :: transact(unsigned int,android :: Parcel const&amp ;,, android :: Parcel *,unsigned int)+60)11-02 12:38:24.850 4583-4583 /? I / DEBUG:#14 pc 0001d799 /system/lib/libbinder.so (android :: IPCThreadState :: executeCommand(int)+508)11-02 12:38:24.850 4583-4583 /? I / DEBUG:#15 pc 0001db17 /system/lib/libbinder.so (android :: IPCThreadState :: getAndExecuteCommand()+ 38)11-02 12:38:24.850 4583-4583 /? I / DEBUG:#16 pc 0001db8d /system/lib/libbinder.so (android :: IPCThreadState :: joinThreadPool(bool)+48)11-02 12:38:24.850 4583-4583 /? I / DEBUG:#17 pc 000219a5 /system/lib/libbinder.so 11-02 12:38:24.850 4583-4583 /? I / DEBUG:#18 pc 0000ea5d /system/lib/libutils.so(android :: Thread :: _ threadLoop(void *)+ 216) 11-02 12:38:24.850 4583-4583 /? I / DEBUG:#19 pc 0000e58f /system/lib/libutils.so 11-02 12:38:24.850 4583-4583 /?我/ DEBUG:
20 pc 0000d228 /system/lib/libc.so(__thread_entry + 72)11-02 12:38:24.850 4583-4583 /? I / DEBUG:#21 pc 0000d3c0
/system/lib/libc.so(pthread_create + 240)