Logo
ApraPipes 1.0
Loading...
Searching...
No Matches
AbsControlModule Class Reference

#include <AbsControlModule.h>

Inheritance diagram for AbsControlModule:
Inheritance graph
Collaboration diagram for AbsControlModule:
Collaboration graph

Classes

class  Detail
 

Public Member Functions

 AbsControlModule (AbsControlModuleProps _props)
 
 ~AbsControlModule ()
 
bool init ()
 
bool term ()
 
bool enrollModule (std::string role, boost::shared_ptr< Module > module)
 Enroll your module to use healthcallback, errorcallback and other control module functions.
 
boost::shared_ptr< ModulegetModuleofRole (std::string role)
 
std::string printStatus ()
 
virtual void handleMp4MissingVideotrack (std::string previousVideoFile, std::string nextVideoFile)
 
virtual void handleMMQExport (Command cmd, bool priority=false)
 
virtual void handleMMQExportView (uint64_t startTS, uint64_t endTS=9999999999999, bool playabckDirection=true, bool Mp4ReaderExport=false, bool priority=false)
 
virtual void handleSendMMQTSCmd (uint64_t mmqBeginTS, uint64_t mmqEndTS, bool priority=false)
 
virtual void handleLastGtkGLRenderTS (uint64_t latestGtkGlRenderTS, bool priority)
 
virtual void handleGoLive (bool goLive, bool priority)
 
virtual void handleDecoderSpeed (DecoderPlaybackSpeed cmd, bool priority)
 
virtual void handleError (const APErrorObject &error)
 
virtual void handleHealthCallback (const APHealthObject &healthObj)
 
void registerHealthCallbackExtention (boost::function< void(const APHealthObject *, unsigned short)> callbackFunction)
 Register external function to be triggered on every health callBack that control modules recieves from the modules. For eg. In SimpleControlModule, this extention is called at the end of handleHealthCallback function.
 
- Public Member Functions inherited from Module
 Module (Kind nature, string name, ModuleProps _props)
 
virtual ~Module ()
 
Kind getNature ()
 
string getName ()
 
string getId ()
 
double getPipelineFps ()
 
uint64_t getTickCounter ()
 
string addOutputPin (framemetadata_sp &metadata)
 
vector< string > getAllOutputPinsByType (int type)
 
void addOutputPin (framemetadata_sp &metadata, string &pinId)
 
bool setNext (boost::shared_ptr< Module > next, vector< string > &pinIdArr, bool open=true)
 
virtual bool setNext (boost::shared_ptr< Module > next, bool open=true, bool sieve=true)
 
bool addFeedback (boost::shared_ptr< Module > next, vector< string > &pinIdArr, bool open=true)
 
bool addFeedback (boost::shared_ptr< Module > next, bool open=true)
 
boost_deque< boost::shared_ptr< Module > > getConnectedModules ()
 
bool relay (boost::shared_ptr< Module > next, bool open, bool priority=false)
 
void operator() ()
 
virtual bool run ()
 
bool play (float speed, bool direction=true)
 
bool play (bool play)
 
bool queueStep ()
 
virtual bool step ()
 
virtual bool stop ()
 
virtual bool isFull ()
 
bool isNextModuleQueFull ()
 
void adaptQueue (boost::shared_ptr< FrameContainerQueueAdapter > queAdapter)
 
void register_consumer (boost::function< void(Module *, unsigned short)>, bool bFatal=false)
 
boost::shared_ptr< PaceMakergetPacer ()
 
virtual void flushQue ()
 
bool getPlayDirection ()
 
virtual void flushQueRecursive ()
 
virtual void addControlModule (boost::shared_ptr< Module > cModule)
 
void registerHealthCallback (APHealthCallback callback)
 
void executeErrorCallback (const APErrorObject &error)
 
void registerErrorCallback (APErrorCallback callback)
 
ModuleProps getProps ()
 

Public Attributes

std::map< std::string, boost::weak_ptr< Module > > moduleRoles
 

Protected Member Functions

bool process (frame_container &frames)
 
bool handleCommand (Command::CommandType type, frame_sp &frame)
 
bool handlePropsChange (frame_sp &frame)
 
virtual void sendEOS ()
 
virtual void sendEOS (frame_sp &frame)
 
virtual void sendEOPFrame ()
 
std::vector< std::string > serializeControlModule ()
 
- Protected Member Functions inherited from Module
virtual boost_deque< frame_sp > getFrames (frame_container &frames)
 
virtual bool processEOS (string &pinId)
 
virtual bool processSOS (frame_sp &frame)
 
virtual bool shouldTriggerSOS ()
 
virtual bool produce ()
 
bool stepNonSource (frame_container &frames)
 
bool preProcessNonSource (frame_container &frames)
 
bool preProcessControl (frame_container &frames)
 
bool isRunning ()
 
void setProps (ModuleProps &props)
 
void fillProps (ModuleProps &props)
 
template<class T >
void addPropsToQueue (T &props, bool priority=false)
 
template<class T >
bool handlePropsChange (frame_sp &frame, T &props)
 
template<class T >
bool queuePriorityCommand (T &cmd)
 
template<class T >
bool queueCommand (T &cmd, bool priority=false)
 
template<class T >
void getCommand (T &cmd, frame_sp &frame)
 
bool queuePlayPauseCommand (PlayPauseCommand ppCmd, bool priority=false)
 
frame_sp makeCommandFrame (size_t size, framemetadata_sp &metadata)
 
frame_sp makeFrame (size_t size, string &pinId)
 
frame_sp makeFrame (size_t size)
 
frame_sp makeFrame ()
 
frame_sp makeFrame (frame_sp &bigFrame, size_t &newSize, string &pinId)
 
frame_sp getEOSFrame ()
 
frame_sp getEmptyFrame ()
 
void setMetadata (std::string &pinId, framemetadata_sp &metadata)
 
virtual bool send (frame_container &frames, bool forceBlockingPush=false)
 
virtual void sendMp4ErrorFrame (frame_sp &frame)
 
virtual void sendEoPFrame ()
 
void ignore (int times)
 
void stop_onStepfail ()
 
void emit_event (unsigned short eventID)
 
void emit_fatal (unsigned short eventID)
 
void setModuleState (enum ModuleState es)
 
ModuleState getModuleState ()
 
virtual bool validateInputPins ()
 
virtual bool validateOutputPins ()
 
virtual bool validateInputOutputPins ()
 
size_t getNumberOfOutputPins (bool implicit=true)
 
size_t getNumberOfInputPins ()
 
framemetadata_sp getFirstInputMetadata ()
 
framemetadata_sp getFirstOutputMetadata ()
 
framemetadata_sp getOutputMetadata (string outPinID)
 
metadata_by_pin & getInputMetadata ()
 
framefactory_by_pin & getOutputFrameFactory ()
 
framemetadata_sp getInputMetadataByType (int type)
 
int getNumberOfInputsByType (int type)
 
int getNumberOfOutputsByType (int type)
 
framemetadata_sp getOutputMetadataByType (int type)
 
bool isMetadataEmpty (framemetadata_sp &metadata)
 
bool isFrameEmpty (frame_sp &frame)
 
string getInputPinIdByType (int type)
 
string getOutputPinIdByType (int type)
 
bool setNext (boost::shared_ptr< Module > next, bool open, bool isFeedback, bool sieve)
 
bool setNext (boost::shared_ptr< Module > next, vector< string > &pinIdArr, bool open, bool isFeedback, bool sieve)
 
void addInputPin (framemetadata_sp &metadata, string &pinId, bool isFeedback)
 
virtual void addInputPin (framemetadata_sp &metadata, string &pinId)
 
boost::shared_ptr< FrameContainerQueuegetQue ()
 
bool getPlayState ()
 
Connections getConnections ()
 
frame_container try_pop ()
 
frame_container pop ()
 
bool processSourceQue ()
 
bool handlePausePlay (bool play)
 
virtual bool handlePausePlay (float speed=1, bool direction=true)
 
virtual void notifyPlay (bool play)
 
FFBufferMaker createFFBufferMaker ()
 

Protected Attributes

boost::function< void(const APHealthObject *, unsigned short)> healthCallbackExtention
 
- Protected Attributes inherited from Module
boost::function< void()> onStepFail
 
boost::function< void(Module *, unsigned short)> event_consumer
 
boost::function< void(Module *, unsigned short)> fatal_event_consumer
 
enum ModuleState module_state
 
boost::shared_ptr< ModulecontrolModule = nullptr
 

Private Attributes

boost::shared_ptr< DetailmDetail
 

Additional Inherited Members

- Public Types inherited from Module
enum  Kind { SOURCE , TRANSFORM , SINK , CONTROL }
 
enum  ModuleState { Initialized , Running , EndOfStreamNormal , EndOfStreamSocketError }
 
- Static Public Member Functions inherited from Module
static frame_sp getFrameByType (frame_container &frames, int frameType)
 

Constructor & Destructor Documentation

◆ AbsControlModule()

AbsControlModule::AbsControlModule ( AbsControlModuleProps _props)

◆ ~AbsControlModule()

AbsControlModule::~AbsControlModule ( )

Member Function Documentation

◆ enrollModule()

bool AbsControlModule::enrollModule ( std::string role,
boost::shared_ptr< Module > module )

Enroll your module to use healthcallback, errorcallback and other control module functions.

Parameters
boost::shared_ptr<Module>the module to be registered
roleunique string for role of the module
Returns
bool.

◆ getModuleofRole()

boost::shared_ptr< Module > AbsControlModule::getModuleofRole ( std::string role)

◆ handleCommand()

bool AbsControlModule::handleCommand ( Command::CommandType type,
frame_sp & frame )
protectedvirtual

Reimplemented from Module.

◆ handleDecoderSpeed()

virtual void AbsControlModule::handleDecoderSpeed ( DecoderPlaybackSpeed cmd,
bool priority )
inlinevirtual

◆ handleError()

virtual void AbsControlModule::handleError ( const APErrorObject & error)
inlinevirtual

Reimplemented in SimpleControlModule.

◆ handleGoLive()

virtual void AbsControlModule::handleGoLive ( bool goLive,
bool priority )
inlinevirtual

◆ handleHealthCallback()

void AbsControlModule::handleHealthCallback ( const APHealthObject & healthObj)
virtual

Reimplemented in SimpleControlModule.

Here is the call graph for this function:

◆ handleLastGtkGLRenderTS()

virtual void AbsControlModule::handleLastGtkGLRenderTS ( uint64_t latestGtkGlRenderTS,
bool priority )
inlinevirtual

◆ handleMMQExport()

virtual void AbsControlModule::handleMMQExport ( Command cmd,
bool priority = false )
inlinevirtual

◆ handleMMQExportView()

virtual void AbsControlModule::handleMMQExportView ( uint64_t startTS,
uint64_t endTS = 9999999999999,
bool playabckDirection = true,
bool Mp4ReaderExport = false,
bool priority = false )
inlinevirtual

◆ handleMp4MissingVideotrack()

virtual void AbsControlModule::handleMp4MissingVideotrack ( std::string previousVideoFile,
std::string nextVideoFile )
inlinevirtual

◆ handlePropsChange()

bool AbsControlModule::handlePropsChange ( frame_sp & frame)
protectedvirtual

Reimplemented from Module.

◆ handleSendMMQTSCmd()

virtual void AbsControlModule::handleSendMMQTSCmd ( uint64_t mmqBeginTS,
uint64_t mmqEndTS,
bool priority = false )
inlinevirtual

◆ init()

bool AbsControlModule::init ( )
virtual

Reimplemented from Module.

Here is the call graph for this function:

◆ printStatus()

std::string AbsControlModule::printStatus ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ process()

bool AbsControlModule::process ( frame_container & frames)
protectedvirtual

Reimplemented from Module.

◆ registerHealthCallbackExtention()

void AbsControlModule::registerHealthCallbackExtention ( boost::function< void(const APHealthObject *, unsigned short)> callbackFunction)

Register external function to be triggered on every health callBack that control modules recieves from the modules. For eg. In SimpleControlModule, this extention is called at the end of handleHealthCallback function.

Parameters
functionwith signature void f(const APHealthObject*, unsigned short)
Returns
nothing.

◆ sendEOPFrame()

virtual void AbsControlModule::sendEOPFrame ( )
inlineprotectedvirtual

Reimplemented in SimpleControlModule.

◆ sendEOS() [1/2]

virtual void AbsControlModule::sendEOS ( )
inlineprotectedvirtual

Reimplemented from Module.

Reimplemented in SimpleControlModule.

◆ sendEOS() [2/2]

virtual void AbsControlModule::sendEOS ( frame_sp & frame)
inlineprotectedvirtual

Reimplemented from Module.

Reimplemented in SimpleControlModule.

◆ serializeControlModule()

std::vector< std::string > AbsControlModule::serializeControlModule ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ term()

bool AbsControlModule::term ( )
virtual

Reimplemented from Module.

Here is the call graph for this function:

Member Data Documentation

◆ healthCallbackExtention

boost::function<void(const APHealthObject*, unsigned short)> AbsControlModule::healthCallbackExtention
protected

◆ mDetail

boost::shared_ptr<Detail> AbsControlModule::mDetail
private

◆ moduleRoles

std::map<std::string, boost::weak_ptr<Module> > AbsControlModule::moduleRoles

The documentation for this class was generated from the following files: