-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
At the same time, when capturing screenshots and recording, on_dvr cannot obtain the parameter, and the IP address also becomes 127.0.0.1. #1613
Comments
Temporary solution:
|
Check it.
|
Premise: The content of the HTTP callback comes from the request (req), so if the callback encounters an exception, it is almost certain that the request has been modified. The root cause of the problem is that the DVR's request (req) comes from the source, but the source's request changes with each request (play/publish) due to the update_auth. Previously, the last request was used (passing a pointer), which had issues. Later, it was changed to use the first request (making a copy), as seen in #1380. Now it seems that this also has issues. In reality, there are many possible timelines.
We want to use the req in the publish. It is necessary to carefully consider how to make modifications.
|
Because the logic of the DVR is only related to publishing and not related to playing. The solution that is currently being considered is to copy the req in on_publish.
|
In the cases of 2. play->publish->unpublish->dvr and 3. play->publish->play->unpublish->dvr, the DVR actually uses the req from the first play request, which causes the client IP in the DVR callbacks and on_publish/on_unpublish callbacks to be inconsistent. I feel that what is needed in the initialize function is not the req information (including the client IP), but the metadata information of the request (tcurl, streamid, app, vhost, etc.). Can we store the req as the current streaming client information and pass it in on_publish? Can we add a new UrlRequest in SrsSource, which only includes the request metadata information, and pass it in initialize?
|
The new version has been fixed.
|
Testing verification is normal. The IP information in the req will be updated in update_auth. Like👍🏻.
|
Description
When both screenshot and recording are enabled, on_dvr cannot obtain the param, and the IP address becomes 127.0.0.1. Everything works fine when screenshot is not enabled. It seems like the TCP connection is being reused incorrectly.
SRS/3.0.121(OuXuli)
https://github.com/ossrs/srs, licensed under The MIT License (MIT), built at 2020-02-19 13:34:57, configured by --x86-x64 , which means --prefix=/usr/local/srs --with-hls --with-hds --with-dvr --with-ssl --with-transcode --with-ingest --with-stat --with-http-callback --with-http-server --with-stream-caster --with-http-api --with-librtmp --without-research --with-utest --without-gperf --without-gmc --without-gmd --without-gmp --without-gcp --without-gprof --log-trace --cc=gcc --cxx=g++ --ar=ar --ld=ld --randlib=randlib
Replay
How to replay bug?
objs/srs -c conf/srs.conf
nohup python research/api-server/server.py 8085 &>/dev/null &
1.
Push stream
Expected Behavior (Expect)
Not affected by screenshots
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered: