#include "gfx.hpp" namespace Tesses::CrossLang::GFX { TWebcam::TWebcam(uint8_t id, const Size& sz, uint8_t fps) : webcam(id,sz, fps) { } TObject TWebcam::CallMethod(GCList& ls, std::string key, std::vector args) { if(key == "Open") { this->webcam.Open(); } if(key == "ReadFrame") { TImage* img; if(GetArgumentHeap(args,0,img)) { this->webcam.ReadFrame(&img->img); } } if(key == "Close") { this->webcam.Close(); } return Undefined(); } std::string TWebcam::TypeName() { return "GFX.Webcam"; } }