Hi,
I saw many discussions about the sharing of the desktop/windows in the javascript API.
I wanted to try to do the same on the native C++ API and I don't find how. I'm even wondering if it is implemented in the libjingle code.
Here is how I was planning to do:
std::vector<talk_base::WindowDescription> descriptions_desk;
dev_manager->GetWindows(&descriptions_desk);
std::cout << " Number of window found: " << descriptions_desk.size() << std::endl;
std::vector<talk_base::WindowDescription>::iterator desk_it = descriptions_desk.begin();
for (; desk_it != descriptions_desk.end(); ++desk_it)
{
capturer = dev_manager->CreateWindowCapturer(desk_it->id());
if (capturer != NULL)
break;
else
std::cout << "Couldn't create window capturer for: " << desk_it->title() << std::endl;
}
But "createWindowCapturer" is always returning NULL which is normal because in the implementation of the DeviceManager.cc(243):
VideoCapturer* DeviceManager::CreateWindowCapturer(talk_base::WindowId window) {
#if defined(WINDOW_CAPTURER_NAME)
WINDOW_CAPTURER_NAME* window_capturer = new WINDOW_CAPTURER_NAME();
if (!window_capturer->Init(window)) {
delete window_capturer;
return NULL;
}
return window_capturer;
#else
return NULL;
#endif
}
According to this code I was looking for a child of cricket::VideoCapturer that has a Init() function and except the FileVideoCapturer class there is nothing.
Should I write my own classes for implementing this function?