#ifndef __WEBRTC_JITTER_BUFFER_H__ #define __WEBRTC_JITTER_BUFFER_H__ #include "AudioCodec.h" #include "WebRtcCodec.h" #include "RtpPacket.h" #include #include #include #include #include class WebRtcJitterBuffer { private: webrtc::NetEq *neteq; WebRtcCodec webRtcCodec; pthread_t stats; pthread_mutex_t lock; pthread_cond_t condition; public: WebRtcJitterBuffer(AudioCodec &codec); ~WebRtcJitterBuffer(); int init(); void addAudio(RtpPacket *packet, uint32_t tick); int getAudio(short *rawData, int maxRawData); void stop(); void collectStats(); static void* collectStats(void *context); }; #endif