AugmentedUnreality icon indicating copy to clipboard operation
AugmentedUnreality copied to clipboard

Adding a video source

Open alicranck opened this issue 7 years ago • 1 comments

Hi,

I'm looking at adding an NDI(https://www.newtek.com/ndi/) video source to your plugin. I would love to hear your input about what's the best way to go about it i.e. what methods to override and how to make sure I don't break your code.

Thanks!

alicranck avatar Jul 20 '18 14:07 alicranck

First, please extend UAURVideoSource and implement the methods. UAURVideoSourceTest is a good example. The important methods:

  • DiscoverConfigurations - creates entries in the list of available sources in the UI: create an FAURVideoConfiguration, set the name and resolution and add it to this->Configurations
  • Connect - activate this video source, a configuration from the list created in DiscoverConfigurations specifies which variant (for example which resolution) of operation is requested
  • GetNextFrame(cv::Mat_<cv::Vec3b>& frame) - get the next frame and write it to the provided matrix

Finally, create a blueprint extending the class and add it to the list in ExampleDriver: image

adynathos avatar Aug 19 '18 08:08 adynathos