Gstreamer: rtsp server: authentication in another thread

六月ゝ 毕业季﹏ 提交于 2019-12-10 11:57:11

问题


My application returns data for authentification in another thread.

I use:

auth = gst_rtsp_auth_new();
GstRTSPAuthClass* klass = GST_RTSP_AUTH_GET_CLASS(auth);
klass->authenticate = authentificateAndAuthorizeAsync;
...

gboolean authentificateAndAuthorizeAsync(GstRTSPAuth *auth, GstRTSPContext
*ctx)
{
   /*can send required answer in another thread*/    
   return true;   
}

How can I use asynchronous authentification without blocking the first thread?

C++-tools like condition_variables and future/promise are not attractive, because they block first thread.

Maybe GStreamer can handle it natively?

Thanks!

Full example you can take here: https://drive.google.com/drive/folders/1CenbXtUT60hXdB1dQ67Jc1iYyW-Hm8y5

来源:https://stackoverflow.com/questions/55177273/gstreamer-rtsp-server-authentication-in-another-thread

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!