Skip to content

Commit

Permalink
Plugin threading changes to fix instancing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Avi Saranga committed Jul 24, 2018
1 parent 24ef688 commit f1f4449
Show file tree
Hide file tree
Showing 5 changed files with 244 additions and 204 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,57 +19,44 @@ namespace module
namespace telmateframegrabber
{

TelmateFrameGrabberImpl::TelmateFrameGrabberImpl (const boost::property_tree::ptree &config,
std::shared_ptr<MediaPipeline> mediaPipeline) :
OpenCVFilterImpl (config, std::dynamic_pointer_cast<MediaPipelineImpl> (mediaPipeline) )
TelmateFrameGrabberImpl::TelmateFrameGrabberImpl (const boost::property_tree::ptree &config, std::shared_ptr<MediaPipeline> mediaPipeline) : OpenCVFilterImpl (config, std::dynamic_pointer_cast<MediaPipelineImpl> (mediaPipeline) )

{

GST_DEBUG("TelmateFrameGrabberImpl::TelmateFrameGrabberImpl() called");

pTelmateFrameGrabberOpenCVImpl = new TelmateFrameGrabberOpenCVImpl();

}

int TelmateFrameGrabberImpl::cleanup()
int TelmateFrameGrabberImpl::cleanup ()
{
pTelmateFrameGrabberOpenCVImpl->cleanup();
delete pTelmateFrameGrabberOpenCVImpl;
pTelmateFrameGrabberOpenCVImpl = NULL;
return 1;
return TelmateFrameGrabberOpenCVImpl::cleanup ();
}

int TelmateFrameGrabberImpl::getSnapInterval ()
{
return pTelmateFrameGrabberOpenCVImpl->snapInterval;
return TelmateFrameGrabberOpenCVImpl::getSnapInterval ();
}

void TelmateFrameGrabberImpl::setSnapInterval (int snapInterval)
{
pTelmateFrameGrabberOpenCVImpl->snapInterval = snapInterval;
return;
return TelmateFrameGrabberOpenCVImpl::setSnapInterval(snapInterval);
}

std::string TelmateFrameGrabberImpl::getStoragePath ()
{
return pTelmateFrameGrabberOpenCVImpl->storagePath;
return TelmateFrameGrabberOpenCVImpl::getStoragePath ();
}

void TelmateFrameGrabberImpl::setStoragePath (const std::string &path)
{
pTelmateFrameGrabberOpenCVImpl->storagePath = path;
return TelmateFrameGrabberOpenCVImpl::setStoragePath (path);
}

void TelmateFrameGrabberImpl::setWebRtcEpName (const std::string &epName)
{
pTelmateFrameGrabberOpenCVImpl->epName = epName;
return;
return TelmateFrameGrabberOpenCVImpl::setWebRtcEpName (epName);
}

void TelmateFrameGrabberImpl::setOutputFormat (int outputFormat)
{
pTelmateFrameGrabberOpenCVImpl->outputFormat = outputFormat;
return;
return TelmateFrameGrabberOpenCVImpl::setOutputFormat (outputFormat);
}

MediaObjectImpl *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ class TelmateFrameGrabberImpl : public OpenCVFilterImpl, public virtual TelmateF

virtual ~TelmateFrameGrabberImpl () {};

int cleanup ();
int getSnapInterval ();
void setSnapInterval (int snapInterval);
std::string getStoragePath ();
void setStoragePath (const std::string &path);
void setWebRtcEpName (const std::string &epName);
void setOutputFormat (int outputFormat);
int cleanup();

/* Next methods are automatically implemented by code generator */
virtual bool connect (const std::string &eventType, std::shared_ptr<EventHandler> handler);
Expand All @@ -64,9 +64,6 @@ class TelmateFrameGrabberImpl : public OpenCVFilterImpl, public virtual TelmateF

private:

/*GstElement *telmateframegrabberopencvimpl{};*/
TelmateFrameGrabberOpenCVImpl *pTelmateFrameGrabberOpenCVImpl;

class StaticConstructor
{
public:
Expand Down
Loading

0 comments on commit f1f4449

Please sign in to comment.