EasyScreenLive icon indicating copy to clipboard operation
EasyScreenLive copied to clipboard

请问下有没有推流回调函数?

Open bishangshuo opened this issue 4 years ago • 3 comments

请问下可以设置回调函数吗?用于推流状态过程中流状态的变化,如流断开了,网络差停止推流了,流恢复了等等。谢谢

bishangshuo avatar Mar 03 '20 13:03 bishangshuo

内部有状态回调事件,如需要可以外放接口提供回调函数

------------------ 原始邮件 ------------------ 发件人: "bishangshuo"<[email protected]>; 发送时间: 2020年3月3日(星期二) 晚上9:26 收件人: "tsingsee/EasyScreenLive"<[email protected]>; 抄送: "Subscribed"<[email protected]>; 主题: [tsingsee/EasyScreenLive] 请问下有没有推流回调函数? (#5)

请问下可以设置回调函数吗?用于推流状态过程中流状态的变化,如流断开了,网络差停止推流了,流恢复了等等。谢谢

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

SwordTwelve avatar Mar 03 '20 13:03 SwordTwelve

@SwordTwelve 我觉得很有必要,应用层需要知道推流状态的变化,以便用户在掉线或网络不佳时做出相应处理。

能否添加一个接口,设置回调函数的,形如: typedef void (*lpCallbackFunc)(int status, void *userData); lpCallbackFunc m_pCallbackFunc; void SetStreamCallback(lpCallbackFunc cbFunc, void *userData);

//调用 class Caller{ ....... m_pusher.SetStreamCallback(CallbackFunc, (void *)this); static void CallbackFunc(int status, void *userData) { Caller *pThins = (Caller *)userData; //处理status状态 } ....... }

bishangshuo avatar Mar 05 '20 04:03 bishangshuo

非常感谢您提到宝贵的意见,我们会在后续的版本中优化,提供事件和数据回调

------------------ 原始邮件 ------------------ 发件人: "bishangshuo"<[email protected]>; 发送时间: 2020年3月5日(星期四) 中午12:02 收件人: "tsingsee/EasyScreenLive"<[email protected]>; 抄送: "SwordTwelve"<[email protected]>;"Mention"<[email protected]>; 主题: Re: [tsingsee/EasyScreenLive] 请问下有没有推流回调函数? (#5)

@SwordTwelve 我觉得很有必要,应用层需要知道推流状态的变化,以便用户在掉线或网络不佳时做出相应处理。

能否添加一个接口,设置回调函数的,形如: typedef void (*lpCallbackFunc)(int status, void *userData); lpCallbackFunc m_pCallbackFunc; void SetStreamCallback(lpCallbackFunc cbFunc, void *userData);

//调用 class Caller{ ....... m_pusher.SetStreamCallback(CallbackFunc, (void *)this); static void CallbackFunc(int status, void *userData) { Caller *pThins = (Caller *)userData; //处理status状态 } ....... }

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

SwordTwelve avatar Mar 05 '20 06:03 SwordTwelve

加我QQ 2779005381,可以看下

leo-09 avatar Mar 11 '24 03:03 leo-09