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

When the same client is streaming, the client_id for on_dvr callback is different from the other callbacks. #458

Closed
ghost opened this issue Aug 22, 2015 · 7 comments
Assignees
Labels
Bug It might be a bug. TransByAI Translated by AI/GPT.
Milestone

Comments

@ghost
Copy link

ghost commented Aug 22, 2015

The client_id for on_dvr callback is different from other callbacks when streaming with srs2.

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Aug 22, 2015

Can you provide more information? I didn't understand much.

TRANS_BY_GPT3

@ghost
Copy link
Author

ghost commented Aug 24, 2015

srs2 http_hook http回调我的程序的时候,同一个客户端的情况下 on_connect on_publish 等 传过来的client_id的值都是一样的 只有 on_dvr 传过来的client_id 和其他几个 callback不一样

@winlinvip
Copy link
Member

winlinvip commented Aug 25, 2015

Oh, I understand now. It's because the DVR is an asynchronous request that cannot be blocked, while the others are synchronous requests. Asynchronous requests are all opened in new threads, which causes the IDs to be different. This can be considered a bug.

TRANS_BY_GPT3

@winlinvip winlinvip added the Bug It might be a bug. label Aug 25, 2015
@winlinvip winlinvip added this to the srs 2.0 release milestone Aug 25, 2015
@winlinvip
Copy link
Member

winlinvip commented Sep 14, 2015



[2015-09-14 13:40:55][trace] post to clients, req={"action":"on_connect","client_id":107,"ip":"127.0.0.1","vhost":"__defaultVhost__","app":"live","tcUrl":"rtmp://127.0.0.1:1935/live?vhost=__defaultVhost__","pageUrl":""}
[2015-09-14 13:40:55][trace] srs on_connect: client id=107, ip=127.0.0.1, vhost=__defaultVhost__, app=live, tcUrl=rtmp://127.0.0.1:1935/live?vhost=__defaultVhost__, pageUrl=
127.0.0.1 - - [14/Sep/2015:13:40:55] "POST /api/v1/clients HTTP/1.1" 200 1 "" "SRS(Simple RTMP Server)2.0.187"
[2015-09-14 13:40:55][trace] post to clients, req={"action":"on_connect","client_id":107,"ip":"127.0.0.1","vhost":"__defaultVhost__","app":"live","tcUrl":"rtmp://127.0.0.1:1935/live?vhost=__defaultVhost__","pageUrl":""}
[2015-09-14 13:40:55][trace] srs on_connect: client id=107, ip=127.0.0.1, vhost=__defaultVhost__, app=live, tcUrl=rtmp://127.0.0.1:1935/live?vhost=__defaultVhost__, pageUrl=
127.0.0.1 - - [14/Sep/2015:13:40:55] "POST /api/v1/clients HTTP/1.1" 200 1 "" "SRS(Simple RTMP Server)2.0.187"
[2015-09-14 13:41:00][trace] post to dvrs, req={"action":"on_dvr","client_id":107,"ip":"127.0.0.1","vhost":"__defaultVhost__","app":"live","stream":"livestream","cwd":"/Users/winlin/Desktop/git/simple-rtmp-server/trunk","file":"./objs/nginx/html/live/livestream.1442209255227.flv"}
[2015-09-14 13:41:00][trace] srs on_dvr: client id=107, ip=127.0.0.1, vhost=__defaultVhost__, app=live, stream=livestream, cwd=/Users/winlin/Desktop/git/simple-rtmp-server/trunk, file=./objs/nginx/html/live/livestream.1442209255227.flv

Already fixed.

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Sep 14, 2015

on_dvr
on_hls
on_hls_notify
These three async hooks have all updated the cid.

TRANS_BY_GPT3

@ghost
Copy link
Author

ghost commented Nov 12, 2015

牛逼

@TTnTTT
Copy link

TTnTTT commented Feb 26, 2021

awesome

TRANS_BY_GPT3

@winlinvip winlinvip self-assigned this Sep 25, 2021
@winlinvip winlinvip changed the title 同一个 客户端 推流时 on_dvr 的client_id 和 其他的回调的不一样 When the same client is streaming, the client_id for on_dvr callback is different from the other callbacks. Jul 28, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug It might be a bug. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

2 participants