From 87cf722029f00e659df35f210e935a896867467f Mon Sep 17 00:00:00 2001 From: Aaro Altonen Date: Fri, 17 May 2019 11:08:40 +0300 Subject: [PATCH] Remove util.cc --- src/util.cc | 16 ---------------- src/util.hh | 12 ++++++++---- 2 files changed, 8 insertions(+), 20 deletions(-) delete mode 100644 src/util.cc diff --git a/src/util.cc b/src/util.cc deleted file mode 100644 index 6c780c5..0000000 --- a/src/util.cc +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef _WIN32 -#else -#include -#endif -#include -#include - -#include "util.hh" -#include "conn.hh" -#include "rtp_generic.hh" - -uint64_t rtpGetUniqueId() -{ - static uint64_t i = 1; - return i++; -} diff --git a/src/util.hh b/src/util.hh index 9cf748c..e24e0e8 100644 --- a/src/util.hh +++ b/src/util.hh @@ -4,8 +4,9 @@ class RTPConnection; -const int MAX_PACKET = 65536; -const int MAX_PAYLOAD = 1000; +const int MAX_PACKET = 65536; +const int MAX_PAYLOAD = 1000; +const int RTP_HEADER_SIZE = 12; enum RTP_ERROR { RTP_OK = 0, @@ -22,5 +23,8 @@ typedef enum RTP_FORMAT { } rtp_format_t; -uint64_t rtpGetUniqueId(); -int rtpRecvData(RTPConnection *conn); +static inline uint64_t rtpGetUniqueId() +{ + static uint64_t i = 1; + return i++; +}