#ifndef __BASIC_MEDIA_DESTINATION_H_INCL__ #define __BASIC_MEDIA_DESTINATION_H_INCL__ #ifndef LRF_PROXY_ONLY #include "basicFunctionality.h" #include "basicLIBAV.h" #include "basicLogCollection.h" /** * TODO: Add class description * * @author Gagua */ class basicMediaDestination { //private: //basicLogCollection * m_pLog; public: basicMediaDestination(); virtual ~basicMediaDestination(); virtual bool pushFrame(AVFrame * Frame, void * src = NULL) { if ( Frame || src ) return false; return false; } virtual bool pushFrame(cv::Mat * Frame, void * src = NULL) { if ( Frame || src ) return false; return false; } virtual bool pushFrame(cv::Mat & Frame, void * src = NULL) { if ( Frame.empty() || src ) return false; return false; } virtual void setError(bool A, CSTR BOBO = NULL) { if ( A || BOBO ) A=false; } virtual int startRecord(uint32_t FramesToRecord) { if ( FramesToRecord ) return -1; return -1; } virtual void startRecord(CSTR FileName) { if ( FileName ) FileName = FileName; } virtual int stopRecord(void) { return -1; } virtual bool isRecorder(void) { return false; } /* Compressed H264 of the source, before it is decoded (live view / recording without re-encoding, see streamHandler). A destination that does not need it ignores these calls. */ // Parameter sets: SPS / PPS NAL units (sprop-parameter-sets of the SDP) or libav extradata // (Annex-B or avcC). Called when the source (re)connects, before the first packet. virtual void pushEncodedParams(const uint8_t * data, size_t size, bool extradata, void * src = NULL) { if (data || size || extradata || src) return; } // One NAL unit without start code (RTP depacketizer, live555). marker: last NAL unit of the // picture; synced: the presentation times are RTCP synchronised virtual void pushEncodedNalu(const uint8_t * data, size_t size, int64_t ptUs, bool marker, bool synced, void * src = NULL) { if (data || size || ptUs || marker || synced || src) return; } // One access unit (libav packet): Annex-B, or length prefixed when the extradata was avcC. // ptsUs < 0: not known virtual void pushEncodedPacket(const uint8_t * data, size_t size, int64_t ptsUs, void * src = NULL) { if (data || size || ptsUs || src) return; } // The source lost its stream (it reconnects): the next data starts again with the parameters virtual void encodedSourceStopped(void * src = NULL) { if (src) return; } }; inline basicMediaDestination::basicMediaDestination() { //m_pLog = basicLogCollection::getInstance(); } inline basicMediaDestination::~basicMediaDestination() {} typedef vector mediaDestinationsCollection; #endif // ! LRF_PROXY_ONLY #endif // __BASICMEDIADESTINATION_H_INCL__