From 69ed1b39d8ee855e9fe4c7b0ea0cffea951c1d59 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 4 Dec 2013 14:03:31 +0100 Subject: Remove obsolete cahce mechanism. --- src/rtp_profile_raw.cc | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/rtp_profile_raw.cc b/src/rtp_profile_raw.cc index cf34186..2b27501 100644 --- a/src/rtp_profile_raw.cc +++ b/src/rtp_profile_raw.cc @@ -36,10 +36,6 @@ struct lrtp_profile_raw_t { struct lrtp_profile_t profile; // 'Inherit' lrtp_profile_t unsigned short int pkg_size; - - // Cache - char *pkg_cache; - int pkg_cache_size; }; int profile_raw_pack(struct lrtp_profile_t *profile, @@ -48,19 +44,11 @@ int profile_raw_pack(struct lrtp_profile_t *profile, { struct lrtp_profile_raw_t *p = (struct lrtp_profile_raw_t *)profile; - size_t cpsz = p->pkg_size - p->pkg_cache_size; + size_t cpsz = p->pkg_size; if(cpsz > framesize) cpsz = framesize; - if(cpsz != 0) { - memcpy(p->pkg_cache, frame, cpsz); - p->pkg_cache_size += cpsz; - } - - if(p->pkg_cache_size == p->pkg_size) { - rtp.setPayload(p->pkg_cache, p->pkg_cache_size); - p->pkg_cache_size = 0; - } + rtp.setPayload(frame, cpsz); return cpsz; } @@ -85,7 +73,6 @@ int profile_raw_unpack(struct lrtp_profile_t *profile, void profile_raw_destroy(struct lrtp_profile_t *profile) { struct lrtp_profile_raw_t *p = (struct lrtp_profile_raw_t *)profile; - delete p->pkg_cache; delete p; } @@ -115,9 +102,6 @@ struct lrtp_profile_t *profile_raw_create(struct lrtp_t *lrtp, } } - p->pkg_cache = new char[p->pkg_size]; - p->pkg_cache_size = 0; - return &p->profile; } -- cgit v1.2.3