Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
1146 Discussions

How to get a string from analytics plugin c++ code in analytics Server and handle it

Cast__Jorge
Beginner
525 Views

Hi team.

As I understand, plug-ins in samples folder perform an analysis on a video stream specified and published on the conference server and return a video stream with the result printed directly on another video stream, such as a bounding box in the face of a person (face detection plugin), it can also print text string directly in the video stream.


But it is possible to get the text as string type and manipulate it, so that it can be sent as a message from the conference server to a connected peer?

best regards, Jorge.

0 Kudos
2 Replies
Cast__Jorge
Beginner
525 Views

Hi team.

I am trying to do the above and reviewing the c ++ code of the Face Detector Plugin, I found this piece of code (in main.cpp file):

  if (event_callback) {
         std :: stringstream ss;
         ss << "x:" << Glob_result.location.x << "y:" << Glob_result.location.y << "w:" << Glob_result.location.width
            << "h:" << Glob_result.location.height;
         std :: string msg = ss.str ();
         event_callback-> OnPluginEvent (0, msg);
     }

Someone knows where the javascript code on the analytics server receives or manipulates this: "event_callback", apparently it will be with this function (in file myplugin.h):
....
virtual rvaStatus RegisterEventCallback (rvaEventCallback * pCallback)
...
but I can't find where or what that function is called in the Analytics Sever javascript code.

Best Regards, Jorge

0 Kudos
Qiujiao_W_Intel
Employee
525 Views

Currently this event does not report to javascript layer, you need to customize this feature by yourself.

0 Kudos
Reply