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

#include <Mp4ReaderSource.h>

Inheritance diagram for Mp4ReaderSource:
Inheritance graph
Collaboration diagram for Mp4ReaderSource:
Collaboration graph

Public Member Functions

 Mp4ReaderSource (Mp4ReaderSourceProps _props)
 
virtual ~Mp4ReaderSource ()
 
bool init ()
 
bool term ()
 
Mp4ReaderSourceProps getProps ()
 
void setProps (Mp4ReaderSourceProps &props)
 
std::string getOpenVideoPath ()
 
void setImageMetadata (std::string &pinId, framemetadata_sp &metadata)
 
std::string addOutPutPin (framemetadata_sp &metadata)
 
bool changePlayback (float speed, bool direction)
 
bool getVideoRangeFromCache (std::string videoPath, uint64_t &start_ts, uint64_t &end_ts)
 
bool randomSeek (uint64_t skipTS, bool forceReopen=false)
 
bool refreshCache ()
 
std::map< std::string, std::pair< uint64_t, uint64_t > > getCacheSnapShot ()
 
double getOpenVideoFPS ()
 
double getOpenVideoDurationInSecs ()
 
int32_t getOpenVideoFrameCount ()
 
void setPlaybackSpeed (float _playbckSpeed)
 
void getResolution (uint32_t &width, uint32_t &height)
 
- 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 ()
 

Protected Member Functions

bool produce ()
 
bool validateOutputPins ()
 
bool handleCommand (Command::CommandType type, frame_sp &fame)
 
bool handlePropsChange (frame_sp &frame)
 
bool handlePausePlay (float speed, bool direction) override
 
- Protected Member Functions inherited from Module
virtual boost_deque< frame_sp > getFrames (frame_container &frames)
 
virtual bool process (frame_container &frames)
 
virtual bool processEOS (string &pinId)
 
virtual bool processSOS (frame_sp &frame)
 
virtual bool shouldTriggerSOS ()
 
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 ()
 
virtual bool validateInputPins ()
 
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 void notifyPlay (bool play)
 
FFBufferMaker createFFBufferMaker ()
 

Private Attributes

std::string h264ImagePinId
 
std::string encodedImagePinId
 
uint32_t mWidth = 0
 
uint32_t mHeight = 0
 
std::string metadataFramePinId
 
boost::shared_ptr< Mp4ReaderDetailAbsmDetail
 
Mp4ReaderSourceProps props
 

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
 

Constructor & Destructor Documentation

◆ Mp4ReaderSource()

Mp4ReaderSource::Mp4ReaderSource ( Mp4ReaderSourceProps _props)

◆ ~Mp4ReaderSource()

Mp4ReaderSource::~Mp4ReaderSource ( )
virtual

Member Function Documentation

◆ addOutPutPin()

std::string Mp4ReaderSource::addOutPutPin ( framemetadata_sp & metadata)
Here is the call graph for this function:

◆ changePlayback()

bool Mp4ReaderSource::changePlayback ( float speed,
bool direction )
Here is the call graph for this function:

◆ getCacheSnapShot()

std::map< std::string, std::pair< uint64_t, uint64_t > > Mp4ReaderSource::getCacheSnapShot ( )

◆ getOpenVideoDurationInSecs()

double Mp4ReaderSource::getOpenVideoDurationInSecs ( )

◆ getOpenVideoFPS()

double Mp4ReaderSource::getOpenVideoFPS ( )

◆ getOpenVideoFrameCount()

int32_t Mp4ReaderSource::getOpenVideoFrameCount ( )

◆ getOpenVideoPath()

std::string Mp4ReaderSource::getOpenVideoPath ( )

◆ getProps()

Mp4ReaderSourceProps Mp4ReaderSource::getProps ( )

◆ getResolution()

void Mp4ReaderSource::getResolution ( uint32_t & width,
uint32_t & height )
inline

◆ getVideoRangeFromCache()

bool Mp4ReaderSource::getVideoRangeFromCache ( std::string videoPath,
uint64_t & start_ts,
uint64_t & end_ts )

◆ handleCommand()

bool Mp4ReaderSource::handleCommand ( Command::CommandType type,
frame_sp & fame )
protectedvirtual

Reimplemented from Module.

Here is the call graph for this function:

◆ handlePausePlay()

bool Mp4ReaderSource::handlePausePlay ( float speed,
bool direction )
overrideprotectedvirtual

Reimplemented from Module.

Here is the call graph for this function:

◆ handlePropsChange()

bool Mp4ReaderSource::handlePropsChange ( frame_sp & frame)
protectedvirtual

Reimplemented from Module.

Here is the call graph for this function:

◆ init()

bool Mp4ReaderSource::init ( )
virtual

Reimplemented from Module.

Here is the call graph for this function:

◆ produce()

bool Mp4ReaderSource::produce ( )
protectedvirtual

Reimplemented from Module.

Here is the call graph for this function:

◆ randomSeek()

bool Mp4ReaderSource::randomSeek ( uint64_t skipTS,
bool forceReopen = false )
Here is the call graph for this function:

◆ refreshCache()

bool Mp4ReaderSource::refreshCache ( )

◆ setImageMetadata()

void Mp4ReaderSource::setImageMetadata ( std::string & pinId,
framemetadata_sp & metadata )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPlaybackSpeed()

void Mp4ReaderSource::setPlaybackSpeed ( float _playbckSpeed)

◆ setProps()

void Mp4ReaderSource::setProps ( Mp4ReaderSourceProps & props)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ term()

bool Mp4ReaderSource::term ( )
virtual

Reimplemented from Module.

Here is the call graph for this function:

◆ validateOutputPins()

bool Mp4ReaderSource::validateOutputPins ( )
protectedvirtual

Reimplemented from Module.

Here is the call graph for this function:

Member Data Documentation

◆ encodedImagePinId

std::string Mp4ReaderSource::encodedImagePinId
private

◆ h264ImagePinId

std::string Mp4ReaderSource::h264ImagePinId
private

◆ mDetail

boost::shared_ptr<Mp4ReaderDetailAbs> Mp4ReaderSource::mDetail
private

◆ metadataFramePinId

std::string Mp4ReaderSource::metadataFramePinId
private

◆ mHeight

uint32_t Mp4ReaderSource::mHeight = 0
private

◆ mWidth

uint32_t Mp4ReaderSource::mWidth = 0
private

◆ props

Mp4ReaderSourceProps Mp4ReaderSource::props
private

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