-
Notifications
You must be signed in to change notification settings - Fork 765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libstagefright: enhance rtsp assembler to avoid video stuck in bad wifi ... #3
Conversation
…fi environmemnt enhance rtsp assembler to avoid video stuck, for too much packet lost and waiting for each packet for 10ms will cause video stuck.add a disorder threshold to fix the issue
Hi there; This is an automated reply, to let you know CyanogenMod doesn't merge pull You can submit your change requests through our public review system, That review system is an installation of Google's Gerrit code review. Thanks! On Fri, 16 Aug 2013 11:56:29 -0700 you wrote:
|
Strict overflow revert
STE Multimedia Fix
Hi there; This is an automated reply, to let you know CyanogenMod doesn't merge pull You can submit your change requests through our public review system, That review system is an installation of Google's Gerrit code review. Thanks! |
Sync with cyanogenmod
E.g.: size_t delta = offset - mCacheOffset; At this time the result will be converted to a size_t, delta will become very large, causing bounds exception. #00 pc 000ba316 /system/lib/libstagefright.so (android::PageCache::copy(unsigned int, void*, unsigned int)+57) CyanogenMod#1 pc 000bafaf /system/lib/libstagefright.so (android::NuCachedSource2::readInternal(long long, void*, unsigned int)+306) CyanogenMod#2 pc 000baac3 /system/lib/libstagefright.so (android::NuCachedSource2::onRead(android::sp<android::AMessage> const&)+82) CyanogenMod#3 pc 000bb5cb /system/lib/libstagefright.so Change-Id: I772bbe688cda0cd919e9c7fdb4de6f883216b0a8 Signed-off-by: zhangshuxiao <zhangshuxiao@xiaomi.com>
E.g.: size_t delta = offset - mCacheOffset; At this time the result will be converted to a size_t, delta will become very large, causing bounds exception. #00 pc 000ba316 /system/lib/libstagefright.so (android::PageCache::copy(unsigned int, void*, unsigned int)+57) CyanogenMod#1 pc 000bafaf /system/lib/libstagefright.so (android::NuCachedSource2::readInternal(long long, void*, unsigned int)+306) CyanogenMod#2 pc 000baac3 /system/lib/libstagefright.so (android::NuCachedSource2::onRead(android::sp<android::AMessage> const&)+82) CyanogenMod#3 pc 000bb5cb /system/lib/libstagefright.so Change-Id: I772bbe688cda0cd919e9c7fdb4de6f883216b0a8 Signed-off-by: zhangshuxiao <zhangshuxiao@xiaomi.com> Signed-off-by: mydongistiny <jaysonedson@gmail.com>
Fix crashes like this: 05-03 20:55:09.029 6254 6254 F DEBUG : #00 pc 00000000 <unknown> 05-03 20:55:09.029 6254 6254 F DEBUG : CyanogenMod#1 pc 000ec8ab /system/lib/libcameraservice.so (android::CameraHardwareInterface::notifyCallback(android::hardware::camera::device::V1_0::NotifyCallbackMsg, int, int)+18) (BuildId: 078b8118f1d0503988dc8f86045848d8) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#2 pc 0002e6cd /system/lib/android.hardware.camera.device@1.0.so (android::hardware::camera::device::V1_0::BsCameraDeviceCallback::notifyCallback(android::hardware::camera::device::V1_0::NotifyCallbackMsg, int, int)+96) (BuildId: a964b5ab287096bfb4e9fb1357483757) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#3 pc 00013783 /system/vendor/lib/camera.device@1.0-impl-htc_msm8960.so (android::hardware::camera::device::V1_0::implementation::CameraDevice::sNotifyCb(int, int, int, void*)+46) (BuildId: 183c013753a49cdceaf880f00b6083b7) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#4 pc 00038b99 /system/vendor/lib/hw/camera.vendor.msm8960.so (android::QCameraStream_preview::processPreviewFrameWithDisplay(mm_camera_ch_data_buf_t*)+128) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#5 pc 000086ff /system/lib/libmmcamera_interface2.so 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#6 pc 00008855 /system/lib/libmmcamera_interface2.so (mm_camera_msm_data_notify+248) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#7 pc 0000736f /system/lib/libmmcamera_interface2.so 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#8 pc 000a6b67 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+20) (BuildId: 1c34385a63ae9f807822c87c6b4126d2) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#9 pc 00060101 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: 1c34385a63ae9f807822c87c6b4126d2) In case of HTC One M7, the nullptr appears because of this call: https://github.com/AICP/frameworks_av/blob/q10.0/services/camera/libcameraservice/CameraFlashlight.cpp#L528 And while we're on it, lets fix some more possible nullptr's too. Change-Id: I2f67756d576d62560a2e65af55ab868bfc3e36ba Signed-off-by: Julian Veit <claymore1298@gmail.com>
Fix crashes like this: 05-03 20:55:09.029 6254 6254 F DEBUG : #00 pc 00000000 <unknown> 05-03 20:55:09.029 6254 6254 F DEBUG : CyanogenMod#1 pc 000ec8ab /system/lib/libcameraservice.so (android::CameraHardwareInterface::notifyCallback(android::hardware::camera::device::V1_0::NotifyCallbackMsg, int, int)+18) (BuildId: 078b8118f1d0503988dc8f86045848d8) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#2 pc 0002e6cd /system/lib/android.hardware.camera.device@1.0.so (android::hardware::camera::device::V1_0::BsCameraDeviceCallback::notifyCallback(android::hardware::camera::device::V1_0::NotifyCallbackMsg, int, int)+96) (BuildId: a964b5ab287096bfb4e9fb1357483757) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#3 pc 00013783 /system/vendor/lib/camera.device@1.0-impl-htc_msm8960.so (android::hardware::camera::device::V1_0::implementation::CameraDevice::sNotifyCb(int, int, int, void*)+46) (BuildId: 183c013753a49cdceaf880f00b6083b7) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#4 pc 00038b99 /system/vendor/lib/hw/camera.vendor.msm8960.so (android::QCameraStream_preview::processPreviewFrameWithDisplay(mm_camera_ch_data_buf_t*)+128) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#5 pc 000086ff /system/lib/libmmcamera_interface2.so 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#6 pc 00008855 /system/lib/libmmcamera_interface2.so (mm_camera_msm_data_notify+248) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#7 pc 0000736f /system/lib/libmmcamera_interface2.so 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#8 pc 000a6b67 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+20) (BuildId: 1c34385a63ae9f807822c87c6b4126d2) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#9 pc 00060101 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: 1c34385a63ae9f807822c87c6b4126d2) In case of HTC One M7, the nullptr appears because of this call: https://github.com/AICP/frameworks_av/blob/q10.0/services/camera/libcameraservice/CameraFlashlight.cpp#L528 And while we're on it, lets fix some more possible nullptr's too. Change-Id: I2f67756d576d62560a2e65af55ab868bfc3e36ba Signed-off-by: Julian Veit <claymore1298@gmail.com>
Fix crashes like this: 05-03 20:55:09.029 6254 6254 F DEBUG : #00 pc 00000000 <unknown> 05-03 20:55:09.029 6254 6254 F DEBUG : CyanogenMod#1 pc 000ec8ab /system/lib/libcameraservice.so (android::CameraHardwareInterface::notifyCallback(android::hardware::camera::device::V1_0::NotifyCallbackMsg, int, int)+18) (BuildId: 078b8118f1d0503988dc8f86045848d8) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#2 pc 0002e6cd /system/lib/android.hardware.camera.device@1.0.so (android::hardware::camera::device::V1_0::BsCameraDeviceCallback::notifyCallback(android::hardware::camera::device::V1_0::NotifyCallbackMsg, int, int)+96) (BuildId: a964b5ab287096bfb4e9fb1357483757) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#3 pc 00013783 /system/vendor/lib/camera.device@1.0-impl-htc_msm8960.so (android::hardware::camera::device::V1_0::implementation::CameraDevice::sNotifyCb(int, int, int, void*)+46) (BuildId: 183c013753a49cdceaf880f00b6083b7) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#4 pc 00038b99 /system/vendor/lib/hw/camera.vendor.msm8960.so (android::QCameraStream_preview::processPreviewFrameWithDisplay(mm_camera_ch_data_buf_t*)+128) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#5 pc 000086ff /system/lib/libmmcamera_interface2.so 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#6 pc 00008855 /system/lib/libmmcamera_interface2.so (mm_camera_msm_data_notify+248) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#7 pc 0000736f /system/lib/libmmcamera_interface2.so 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#8 pc 000a6b67 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+20) (BuildId: 1c34385a63ae9f807822c87c6b4126d2) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#9 pc 00060101 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: 1c34385a63ae9f807822c87c6b4126d2) In case of HTC One M7, the nullptr appears because of this call: https://github.com/AICP/frameworks_av/blob/q10.0/services/camera/libcameraservice/CameraFlashlight.cpp#L528 And while we're on it, lets fix some more possible nullptr's too. Change-Id: I2f67756d576d62560a2e65af55ab868bfc3e36ba Signed-off-by: Julian Veit <claymore1298@gmail.com>
Fix crashes like this: 05-03 20:55:09.029 6254 6254 F DEBUG : #00 pc 00000000 <unknown> 05-03 20:55:09.029 6254 6254 F DEBUG : CyanogenMod#1 pc 000ec8ab /system/lib/libcameraservice.so (android::CameraHardwareInterface::notifyCallback(android::hardware::camera::device::V1_0::NotifyCallbackMsg, int, int)+18) (BuildId: 078b8118f1d0503988dc8f86045848d8) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#2 pc 0002e6cd /system/lib/android.hardware.camera.device@1.0.so (android::hardware::camera::device::V1_0::BsCameraDeviceCallback::notifyCallback(android::hardware::camera::device::V1_0::NotifyCallbackMsg, int, int)+96) (BuildId: a964b5ab287096bfb4e9fb1357483757) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#3 pc 00013783 /system/vendor/lib/camera.device@1.0-impl-htc_msm8960.so (android::hardware::camera::device::V1_0::implementation::CameraDevice::sNotifyCb(int, int, int, void*)+46) (BuildId: 183c013753a49cdceaf880f00b6083b7) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#4 pc 00038b99 /system/vendor/lib/hw/camera.vendor.msm8960.so (android::QCameraStream_preview::processPreviewFrameWithDisplay(mm_camera_ch_data_buf_t*)+128) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#5 pc 000086ff /system/lib/libmmcamera_interface2.so 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#6 pc 00008855 /system/lib/libmmcamera_interface2.so (mm_camera_msm_data_notify+248) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#7 pc 0000736f /system/lib/libmmcamera_interface2.so 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#8 pc 000a6b67 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+20) (BuildId: 1c34385a63ae9f807822c87c6b4126d2) 05-03 20:55:09.030 6254 6254 F DEBUG : CyanogenMod#9 pc 00060101 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: 1c34385a63ae9f807822c87c6b4126d2) In case of HTC One M7, the nullptr appears because of this call: https://github.com/AICP/frameworks_av/blob/q10.0/services/camera/libcameraservice/CameraFlashlight.cpp#L528 And while we're on it, lets fix some more possible nullptr's too. Change-Id: I2f67756d576d62560a2e65af55ab868bfc3e36ba Signed-off-by: Julian Veit <claymore1298@gmail.com>
Do not hold lock when IPC call is expected from HAL. C2SurfaceSyncObj is shared lock between framework and HAL. HAL process can have only one thread to handle IPC from HAL to framework. Therefore Holding C2SurfaceSyncObj from HAL during IPC call could trigger deadlock. The exact scenario is as follows. Thread CyanogenMod#1:(HAL -> framework IPC) HIDL call onInputBuffersReleased() calls to feedInputBufferIfAvailable(). Since this is using HAL IPC thread, this will block Thread CyanogenMod#3. This is waiting for mOuput mutex which is held by Thread CyanogenMod#2. Thread CyanogenMod#2:(framework) discardBuffer() holds mOutput mutex which blocks Thread CyanogenMod#1. But this is waiting for C2SurfaceSyncObj which is held by Thread CyanogenMod#3. Thread CyanogenMod#3:(HAL) Dtor of C2BufferQueueBlockPoolData is holding C2SurfaceSyncObj, therefore this will block CyanogenMod#2. This thread is waiting for HIDL IPC thread to be free in order for 'igbp->cancel()', but HIDL IPC thread is already occupied by Thread CyanogenMod#1. Bug: 246707566 Test: atest android.media.decoder.cts.AdaptivePlaybackTest Test: atest android.media.decoder.cts.DecoderTest Change-Id: I6a9540d3b4d03806cd40bb4f89a234a6b77758a9 Merged-In: I6a9540d3b4d03806cd40bb4f89a234a6b77758a9
...environmemnt
enhance rtsp assembler to avoid video stuck, for too much packet lost and
waiting for each packet for 10ms will cause video stuck.add a disorder threshold
to fix the issue