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

GB28181: Fix when camera restart, can not connect to SRS. #3944 #3947

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

yushimeng
Copy link

Destroy session when SIP connection is disconnected

@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Feb 2, 2024
@yushimeng yushimeng changed the title fix GB28181: When camera restart, can not connect to SRS. #3944 GB28181: Fix when camera restart, can not connect to SRS. #3944 Feb 2, 2024
@daveyang05
Copy link

daveyang05 commented Feb 4, 2024

Hello @yushimeng, could you please inform us by which version the logic modifications will be completed, and on which branch these changes will be made? We would like to conduct subsequent tests to verify if everything is functioning as expected.

TRANS_BY_GPT4

@duiniuluantanqin
Copy link
Member

duiniuluantanqin commented Feb 4, 2024

Please fix the error in the utest-regression-blackbox-test first, thank you.

TRANS_BY_GPT4

@duiniuluantanqin
Copy link
Member

duiniuluantanqin commented Feb 4, 2024

I tested with a Uniview camera, and after restarting, it was unable to connect to the SRS. However, prior to the changes, it was capable of reconnecting.

TRANS_BY_GPT4

@winlinvip winlinvip linked an issue Feb 6, 2024 that may be closed by this pull request
@winlinvip
Copy link
Member

winlinvip commented Feb 6, 2024

Previously, there was a process in place for handling reconnection logic, but it seems that something might have been overlooked. Therefore, it is recommended to first thoroughly analyze the issue before making any modifications.

Additionally, we must add test cases to verify it. We have supported GB emulation in utest-regression-blackbox-test, so we can use it to simulate SIP disconnections and cover such exceptional scenarios. This approach will prevent the introduction of new issues during the modification process.

Since the GB camera is a hardware device, using actual hardware for verification after every modification is highly inefficient and can lead to very poor quality. Therefore, test cases also need to be improved: whenever code is modified, additional test cases must be added to verify and ensure test coverage, confirming that the changes made to the code are reasonable.

Although this approach may be more challenging, it is very worthwhile. I hope for your understanding.

TRANS_BY_GPT4

@yushimeng
Copy link
Author

yushimeng commented Feb 6, 2024

I very much agree with your approach. My previous idea was that session resources should be deleted after the connection is disconnected, but I overlooked the fact that SrsLazyObjectWrapper serves to isolate resources for sessions, SIP, and media. We should first identify the problem, and then supplement the test cases. @daveyang05, could you provide the log files and configuration files, please?

TRANS_BY_GPT4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EnglishNative This issue is conveyed exclusively in English.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GB28181: When camera restart, can not connect to SRS.
4 participants