Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

x10forevers
Copy link

...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

…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
@cm-gerrit
Copy link

Hi there;

This is an automated reply, to let you know CyanogenMod doesn't merge pull
requests submitted directly to our github.com repositories.

You can submit your change requests through our public review system,
located at http://review.cyanogenmod.org/

That review system is an installation of Google's Gerrit code review.
If you've never interacted with Gerrit before, we also suggest you take
a look at http://wiki.cyanogenmod.org/wiki/Howto:_Gerrit

Thanks!

On Fri, 16 Aug 2013 11:56:29 -0700 you wrote:

...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
You can merge this Pull Request by running:

git pull https://github.com/x10forevers/android_frameworks_av cm-10.2

Or you can view, comment on it, or merge it online at:

#3

-- Commit Summary --

  • libstagefright: enhance rtsp assembler to avoid video stuck in bad wifi environmemnt

-- File Changes --

M media/libstagefright/rtsp/AMPEG4ElementaryAssembler.cpp (9)

-- Patch Links --

https://github.com/CyanogenMod/android_frameworks_av/pull/3.patch
https://github.com/CyanogenMod/android_frameworks_av/pull/3.diff

@cm-gerrit cm-gerrit mentioned this pull request Jan 10, 2014
Closed
jgcaaprom pushed a commit to jgcaaprom/android_frameworks_av that referenced this pull request Apr 30, 2015
spezi77 pushed a commit to spezi77/android_frameworks_av that referenced this pull request Nov 1, 2015
@cm-gerrit
Copy link

Hi there;

This is an automated reply, to let you know CyanogenMod doesn't merge pull
requests submitted directly to our github.com repositories.

You can submit your change requests through our public review system,
located at http://review.cyanogenmod.org/

That review system is an installation of Google's Gerrit code review.
If you've never interacted with Gerrit before, we also suggest you take
a look at http://wiki.cyanogenmod.org/wiki/Howto:_Gerrit

Thanks!

@cm-gerrit cm-gerrit closed this Feb 9, 2016
a-kalmykov pushed a commit to a-kalmykov/android_frameworks_av that referenced this pull request Mar 17, 2016
namagi pushed a commit to namagi/android_frameworks_av that referenced this pull request Oct 20, 2016
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>
CMRemix pushed a commit to CMRemix/android_frameworks_av that referenced this pull request May 17, 2017
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>
semdoc pushed a commit to semdoc/frameworks_av that referenced this pull request Mar 23, 2022
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>
semdoc pushed a commit to semdoc/frameworks_av that referenced this pull request Mar 25, 2022
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>
semdoc pushed a commit to semdoc/frameworks_av that referenced this pull request Mar 25, 2022
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>
semdoc pushed a commit to semdoc/frameworks_av that referenced this pull request Apr 6, 2022
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>
semdoc pushed a commit to semdoc/frameworks_av that referenced this pull request Mar 25, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants