Logo
ApraPipes 1.0
Loading...
Searching...
No Matches
Mp4ReaderDetailAbs Class Referenceabstract
Inheritance diagram for Mp4ReaderDetailAbs:
Inheritance graph
Collaboration diagram for Mp4ReaderDetailAbs:
Collaboration graph

Classes

struct  DemuxAndParserState
 

Public Member Functions

 Mp4ReaderDetailAbs (Mp4ReaderSourceProps &props, std::function< frame_sp(size_t size, string &pinId)> _makeFrame, std::function< frame_sp(frame_sp &bigFrame, size_t &size, string &pinId)> _makeFrameTrim, std::function< void(frame_sp frame)> _sendEOS, std::function< void(std::string &pinId, framemetadata_sp &metadata)> _setMetadata, std::function< void(frame_sp &errorFrame)> _sendMp4ErrorFrame, std::function< void(Mp4ReaderSourceProps &props)> _setProps)
 
 ~Mp4ReaderDetailAbs ()
 
virtual void setMetadata ()
 
virtual void sendEndOfStream ()=0
 
virtual bool produceFrames (frame_container &frames)=0
 
virtual int mp4Seek (mp4_demux *demux, uint64_t time_offset_usec, mp4_seek_method syncType, int &seekedToFrame)=0
 
virtual int getGop ()=0
 
bool Init ()
 
void updateMstate (Mp4ReaderSourceProps &props, std::string videoPath)
 
void setProps (Mp4ReaderSourceProps &props)
 
std::string getOpenVideoPath ()
 
int32_t getOpenVideoFrameCount ()
 
std::map< std::string, std::pair< uint64_t, uint64_t > > getSnapShot ()
 
bool refreshCache ()
 
std::string getSerFormatVersion ()
 
void setPlayback (float _speed, bool _direction)
 
bool getVideoRangeFromCache (std::string &videoPath, uint64_t &start_ts, uint64_t &end_ts)
 
bool attemptFileClose ()
 
bool parseFS ()
 
bool initNewVideo (bool firstOpenAfterInit=false)
 
void openVideoSetPointer (std::string &filePath)
 
bool randomSeekInternal (uint64_t &skipTS, bool forceReopen=false)
 
uint64_t calcReloadFileAfter ()
 
void termOpenVideo ()
 
bool randomSeek (uint64_t &skipTS, bool forceReopen=false) noexcept
 
void makeAndSendMp4Error (int errorType, int errorCode, std::string errorMsg, int openErrorCode, uint64_t _errorMp4TS)
 
bool isOpenVideoFinished ()
 
void readNextFrame (frame_sp &imgFrame, frame_sp &metadetaFrame, size_t &imgSize, size_t &metadataSize, uint64_t &frameTSInMsecs, int32_t &mp4FIndex) noexcept
 
void readNextFrameInternal (frame_sp &imgFrame, frame_sp &metadetaFrame, size_t &imageFrameSize, size_t &metadataFrameSize, uint64_t &frameTSInMsecs, int32_t &mp4FIndex)
 

Public Attributes

Mp4ReaderSourceProps mProps
 
int mWidth = 0
 
int mHeight = 0
 
bool mDirection
 
bool isMp4SeekFrame = false
 
int ret
 
double mFPS = 0
 
float playbackSpeed = 1
 
float framesToSkip = 0
 
double mDurationInSecs = 0
 
std::function< frame_sp(size_t size, string &pinId)> makeFrame
 
std::function< void(frame_sp frame)> sendEOS
 
std::function< frame_sp(frame_sp &bigFrame, size_t &size, string &pinId)> makeFrameTrim
 
std::function< void(frame_sp &errorFrame)> sendMp4ErrorFrame
 
std::function< void(std::string &pinId, framemetadata_sp &metadata)> mSetMetadata
 
std::function< void(Mp4ReaderSourceProps &props)> setMp4ReaderProps
 
std::string h264ImagePinId
 
std::string encodedImagePinId
 
std::string metadataFramePinId
 
boost::shared_ptr< ModulecontrolModule = nullptr
 

Protected Attributes

struct Mp4ReaderDetailAbs::DemuxAndParserState mState
 
uint64_t openVideoStartingTS = 0
 
uint64_t reloadFileAfter = 0
 
int seekedToFrame = -1
 
bool isVideoFileFound = true
 
uint64_t currentTS = 0
 
bool sentEOSSignal = false
 
bool seekReachedEOF = false
 
bool waitFlag = false
 
uint64_t recheckDiskTS = 0
 
boost::shared_ptr< OrderedCacheOfFilescof
 
framemetadata_sp updatedEncodedImgMetadata
 
framemetadata_sp mH264Metadata
 

Constructor & Destructor Documentation

◆ Mp4ReaderDetailAbs()

Mp4ReaderDetailAbs::Mp4ReaderDetailAbs ( Mp4ReaderSourceProps & props,
std::function< frame_sp(size_t size, string &pinId)> _makeFrame,
std::function< frame_sp(frame_sp &bigFrame, size_t &size, string &pinId)> _makeFrameTrim,
std::function< void(frame_sp frame)> _sendEOS,
std::function< void(std::string &pinId, framemetadata_sp &metadata)> _setMetadata,
std::function< void(frame_sp &errorFrame)> _sendMp4ErrorFrame,
std::function< void(Mp4ReaderSourceProps &props)> _setProps )
inline
Here is the call graph for this function:

◆ ~Mp4ReaderDetailAbs()

Mp4ReaderDetailAbs::~Mp4ReaderDetailAbs ( )
inline

Member Function Documentation

◆ attemptFileClose()

bool Mp4ReaderDetailAbs::attemptFileClose ( )
inline
Here is the caller graph for this function:

◆ calcReloadFileAfter()

uint64_t Mp4ReaderDetailAbs::calcReloadFileAfter ( )
inline
Here is the caller graph for this function:

◆ getGop()

virtual int Mp4ReaderDetailAbs::getGop ( )
pure virtual

Implemented in Mp4ReaderDetailH264, and Mp4ReaderDetailJpeg.

Here is the caller graph for this function:

◆ getOpenVideoFrameCount()

int32_t Mp4ReaderDetailAbs::getOpenVideoFrameCount ( )
inline

◆ getOpenVideoPath()

std::string Mp4ReaderDetailAbs::getOpenVideoPath ( )
inline

◆ getSerFormatVersion()

std::string Mp4ReaderDetailAbs::getSerFormatVersion ( )
inline
Here is the caller graph for this function:

◆ getSnapShot()

std::map< std::string, std::pair< uint64_t, uint64_t > > Mp4ReaderDetailAbs::getSnapShot ( )
inline

◆ getVideoRangeFromCache()

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

◆ Init()

bool Mp4ReaderDetailAbs::Init ( )
inline
Here is the call graph for this function:

◆ initNewVideo()

bool Mp4ReaderDetailAbs::initNewVideo ( bool firstOpenAfterInit = false)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isOpenVideoFinished()

bool Mp4ReaderDetailAbs::isOpenVideoFinished ( )
inline
Here is the caller graph for this function:

◆ makeAndSendMp4Error()

void Mp4ReaderDetailAbs::makeAndSendMp4Error ( int errorType,
int errorCode,
std::string errorMsg,
int openErrorCode,
uint64_t _errorMp4TS )
inline
Here is the caller graph for this function:

◆ mp4Seek()

virtual int Mp4ReaderDetailAbs::mp4Seek ( mp4_demux * demux,
uint64_t time_offset_usec,
mp4_seek_method syncType,
int & seekedToFrame )
pure virtual

Implemented in Mp4ReaderDetailH264, and Mp4ReaderDetailJpeg.

Here is the caller graph for this function:

◆ openVideoSetPointer()

void Mp4ReaderDetailAbs::openVideoSetPointer ( std::string & filePath)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseFS()

bool Mp4ReaderDetailAbs::parseFS ( )
inline
Here is the caller graph for this function:

◆ produceFrames()

virtual bool Mp4ReaderDetailAbs::produceFrames ( frame_container & frames)
pure virtual

◆ randomSeek()

bool Mp4ReaderDetailAbs::randomSeek ( uint64_t & skipTS,
bool forceReopen = false )
inlinenoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ randomSeekInternal()

bool Mp4ReaderDetailAbs::randomSeekInternal ( uint64_t & skipTS,
bool forceReopen = false )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readNextFrame()

void Mp4ReaderDetailAbs::readNextFrame ( frame_sp & imgFrame,
frame_sp & metadetaFrame,
size_t & imgSize,
size_t & metadataSize,
uint64_t & frameTSInMsecs,
int32_t & mp4FIndex )
inlinenoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readNextFrameInternal()

void Mp4ReaderDetailAbs::readNextFrameInternal ( frame_sp & imgFrame,
frame_sp & metadetaFrame,
size_t & imageFrameSize,
size_t & metadataFrameSize,
uint64_t & frameTSInMsecs,
int32_t & mp4FIndex )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ refreshCache()

bool Mp4ReaderDetailAbs::refreshCache ( )
inline

◆ sendEndOfStream()

virtual void Mp4ReaderDetailAbs::sendEndOfStream ( )
pure virtual

◆ setMetadata()

virtual void Mp4ReaderDetailAbs::setMetadata ( )
inlinevirtual

Reimplemented in Mp4ReaderDetailH264, and Mp4ReaderDetailJpeg.

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

◆ setPlayback()

void Mp4ReaderDetailAbs::setPlayback ( float _speed,
bool _direction )
inline
Here is the call graph for this function:

◆ setProps()

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

◆ termOpenVideo()

void Mp4ReaderDetailAbs::termOpenVideo ( )
inline
Here is the caller graph for this function:

◆ updateMstate()

void Mp4ReaderDetailAbs::updateMstate ( Mp4ReaderSourceProps & props,
std::string videoPath )
inline
Here is the caller graph for this function:

Member Data Documentation

◆ cof

boost::shared_ptr<OrderedCacheOfFiles> Mp4ReaderDetailAbs::cof
protected

◆ controlModule

boost::shared_ptr<Module> Mp4ReaderDetailAbs::controlModule = nullptr

◆ currentTS

uint64_t Mp4ReaderDetailAbs::currentTS = 0
protected

◆ encodedImagePinId

std::string Mp4ReaderDetailAbs::encodedImagePinId

◆ framesToSkip

float Mp4ReaderDetailAbs::framesToSkip = 0

◆ h264ImagePinId

std::string Mp4ReaderDetailAbs::h264ImagePinId

◆ isMp4SeekFrame

bool Mp4ReaderDetailAbs::isMp4SeekFrame = false

◆ isVideoFileFound

bool Mp4ReaderDetailAbs::isVideoFileFound = true
protected

◆ makeFrame

std::function<frame_sp(size_t size, string& pinId)> Mp4ReaderDetailAbs::makeFrame

◆ makeFrameTrim

std::function<frame_sp(frame_sp& bigFrame, size_t& size, string& pinId)> Mp4ReaderDetailAbs::makeFrameTrim

◆ mDirection

bool Mp4ReaderDetailAbs::mDirection

◆ mDurationInSecs

double Mp4ReaderDetailAbs::mDurationInSecs = 0

◆ metadataFramePinId

std::string Mp4ReaderDetailAbs::metadataFramePinId

◆ mFPS

double Mp4ReaderDetailAbs::mFPS = 0

◆ mH264Metadata

framemetadata_sp Mp4ReaderDetailAbs::mH264Metadata
protected

◆ mHeight

int Mp4ReaderDetailAbs::mHeight = 0

◆ mProps

Mp4ReaderSourceProps Mp4ReaderDetailAbs::mProps

◆ mSetMetadata

std::function<void(std::string& pinId, framemetadata_sp& metadata)> Mp4ReaderDetailAbs::mSetMetadata

◆ mState

struct Mp4ReaderDetailAbs::DemuxAndParserState Mp4ReaderDetailAbs::mState
protected

◆ mWidth

int Mp4ReaderDetailAbs::mWidth = 0

◆ openVideoStartingTS

uint64_t Mp4ReaderDetailAbs::openVideoStartingTS = 0
protected

◆ playbackSpeed

float Mp4ReaderDetailAbs::playbackSpeed = 1

◆ recheckDiskTS

uint64_t Mp4ReaderDetailAbs::recheckDiskTS = 0
protected

◆ reloadFileAfter

uint64_t Mp4ReaderDetailAbs::reloadFileAfter = 0
protected

◆ ret

int Mp4ReaderDetailAbs::ret

◆ seekedToFrame

int Mp4ReaderDetailAbs::seekedToFrame = -1
protected

◆ seekReachedEOF

bool Mp4ReaderDetailAbs::seekReachedEOF = false
protected

◆ sendEOS

std::function<void(frame_sp frame)> Mp4ReaderDetailAbs::sendEOS

◆ sendMp4ErrorFrame

std::function<void(frame_sp& errorFrame)> Mp4ReaderDetailAbs::sendMp4ErrorFrame

◆ sentEOSSignal

bool Mp4ReaderDetailAbs::sentEOSSignal = false
protected

◆ setMp4ReaderProps

std::function<void(Mp4ReaderSourceProps& props)> Mp4ReaderDetailAbs::setMp4ReaderProps

◆ updatedEncodedImgMetadata

framemetadata_sp Mp4ReaderDetailAbs::updatedEncodedImgMetadata
protected

◆ waitFlag

bool Mp4ReaderDetailAbs::waitFlag = false
protected

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