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

#include <MultimediaQueueXform.h>

Inheritance diagram for MultimediaQueueXform:
Inheritance graph
Collaboration diagram for MultimediaQueueXform:
Collaboration graph

Public Member Functions

 MultimediaQueueXform (MultimediaQueueXformProps _props)
 
virtual ~MultimediaQueueXform ()
 
bool init ()
 
bool term ()
 
void setState (uint64_t ts, uint64_t te)
 
bool handleCommand (Command::CommandType type, frame_sp &frame)
 
bool allowFrames (uint64_t &ts, uint64_t &te)
 
void addInputPin (framemetadata_sp &metadata, string &pinId)
 
void setProps (MultimediaQueueXformProps _props)
 
MultimediaQueueXformProps getProps ()
 
bool handlePropsChange (frame_sp &frame)
 
boost::shared_ptr< FrameContainerQueuegetQue ()
 
void extractFramesAndEnqueue (boost::shared_ptr< FrameContainerQueue > &FrameQueue)
 
void setMmqFps (int fps)
 
void setPlaybackSpeed (float playbackSpeed)
 
void stopExportFrames ()
 
- 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

boost::shared_ptr< StatemState
 
MultimediaQueueXformProps mProps
 

Protected Member Functions

bool process (frame_container &frames)
 
bool validateInputPins ()
 
bool validateOutputPins ()
 
bool validateInputOutputPins ()
 
- 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 sendEOS ()
 
virtual void sendEOS (frame_sp &frame)
 
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 ()
 
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)
 
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 ()
 

Private Types

using sys_clock = std::chrono::system_clock
 

Private Member Functions

void getQueueBoundaryTS (uint64_t &tOld, uint64_t &tNew)
 

Private Attributes

std::string mOutputPinId
 
bool pushToNextModule = true
 
bool reset = false
 
uint64_t startTimeSaved = 0
 
uint64_t endTimeSaved = 0
 
uint64_t queryStartTime = 0
 
uint64_t queryEndTime = 0
 
bool direction = true
 
FrameMetadata::FrameType mFrameType
 
sys_clock::time_point frame_begin
 
std::chrono::nanoseconds myTargetFrameLen
 
std::chrono::nanoseconds myNextWait
 
uint64_t latestFrameExportedFromHandleCmd = 0
 
uint64_t latestFrameExportedFromProcess = 0
 
bool initDone = false
 
int framesToSkip = 0
 
int initialFps = 0
 
float speed = 1
 
bool exportFrames
 

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)
 
- 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
 

Member Typedef Documentation

◆ sys_clock

using MultimediaQueueXform::sys_clock = std::chrono::system_clock
private

Constructor & Destructor Documentation

◆ MultimediaQueueXform()

MultimediaQueueXform::MultimediaQueueXform ( MultimediaQueueXformProps _props)

◆ ~MultimediaQueueXform()

virtual MultimediaQueueXform::~MultimediaQueueXform ( )
inlinevirtual

Member Function Documentation

◆ addInputPin()

void MultimediaQueueXform::addInputPin ( framemetadata_sp & metadata,
string & pinId )
virtual

Reimplemented from Module.

Here is the call graph for this function:

◆ allowFrames()

bool MultimediaQueueXform::allowFrames ( uint64_t & ts,
uint64_t & te )
Here is the call graph for this function:

◆ extractFramesAndEnqueue()

void MultimediaQueueXform::extractFramesAndEnqueue ( boost::shared_ptr< FrameContainerQueue > & FrameQueue)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getProps()

MultimediaQueueXformProps MultimediaQueueXform::getProps ( )
Here is the call graph for this function:

◆ getQue()

boost::shared_ptr< FrameContainerQueue > MultimediaQueueXform::getQue ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getQueueBoundaryTS()

void MultimediaQueueXform::getQueueBoundaryTS ( uint64_t & tOld,
uint64_t & tNew )
private
Here is the caller graph for this function:

◆ handleCommand()

bool MultimediaQueueXform::handleCommand ( Command::CommandType type,
frame_sp & frame )
virtual

Reimplemented from Module.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ handlePropsChange()

bool MultimediaQueueXform::handlePropsChange ( frame_sp & frame)
virtual

Reimplemented from Module.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

bool MultimediaQueueXform::init ( )
virtual

Reimplemented from Module.

Here is the call graph for this function:

◆ process()

bool MultimediaQueueXform::process ( frame_container & frames)
protectedvirtual

Reimplemented from Module.

Here is the call graph for this function:

◆ setMmqFps()

void MultimediaQueueXform::setMmqFps ( int fps)

◆ setPlaybackSpeed()

void MultimediaQueueXform::setPlaybackSpeed ( float playbackSpeed)
Here is the caller graph for this function:

◆ setProps()

void MultimediaQueueXform::setProps ( MultimediaQueueXformProps _props)
Here is the call graph for this function:

◆ setState()

void MultimediaQueueXform::setState ( uint64_t ts,
uint64_t te )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stopExportFrames()

void MultimediaQueueXform::stopExportFrames ( )

◆ term()

bool MultimediaQueueXform::term ( )
virtual

Reimplemented from Module.

Here is the call graph for this function:

◆ validateInputOutputPins()

bool MultimediaQueueXform::validateInputOutputPins ( )
protectedvirtual

Reimplemented from Module.

Here is the call graph for this function:

◆ validateInputPins()

bool MultimediaQueueXform::validateInputPins ( )
protectedvirtual

Reimplemented from Module.

◆ validateOutputPins()

bool MultimediaQueueXform::validateOutputPins ( )
protectedvirtual

Reimplemented from Module.

Member Data Documentation

◆ direction

bool MultimediaQueueXform::direction = true
private

◆ endTimeSaved

uint64_t MultimediaQueueXform::endTimeSaved = 0
private

◆ exportFrames

bool MultimediaQueueXform::exportFrames
private

◆ frame_begin

sys_clock::time_point MultimediaQueueXform::frame_begin
private

◆ framesToSkip

int MultimediaQueueXform::framesToSkip = 0
private

◆ initDone

bool MultimediaQueueXform::initDone = false
private

◆ initialFps

int MultimediaQueueXform::initialFps = 0
private

◆ latestFrameExportedFromHandleCmd

uint64_t MultimediaQueueXform::latestFrameExportedFromHandleCmd = 0
private

◆ latestFrameExportedFromProcess

uint64_t MultimediaQueueXform::latestFrameExportedFromProcess = 0
private

◆ mFrameType

FrameMetadata::FrameType MultimediaQueueXform::mFrameType
private

◆ mOutputPinId

std::string MultimediaQueueXform::mOutputPinId
private

◆ mProps

MultimediaQueueXformProps MultimediaQueueXform::mProps

◆ mState

boost::shared_ptr<State> MultimediaQueueXform::mState

◆ myNextWait

std::chrono::nanoseconds MultimediaQueueXform::myNextWait
private

◆ myTargetFrameLen

std::chrono::nanoseconds MultimediaQueueXform::myTargetFrameLen
private

◆ pushToNextModule

bool MultimediaQueueXform::pushToNextModule = true
private

◆ queryEndTime

uint64_t MultimediaQueueXform::queryEndTime = 0
private

◆ queryStartTime

uint64_t MultimediaQueueXform::queryStartTime = 0
private

◆ reset

bool MultimediaQueueXform::reset = false
private

◆ speed

float MultimediaQueueXform::speed = 1
private

◆ startTimeSaved

uint64_t MultimediaQueueXform::startTimeSaved = 0
private

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