From e208458643c4b92e3ec98f80913e14cc400032c9 Mon Sep 17 00:00:00 2001 From: "stefan@webrtc.org" Date: Tue, 20 May 2014 13:09:16 +0000 Subject: [PATCH] Expose the original packet length in in the RTP play tools. R=henrik.lundin@webrtc.org Review URL: https://webrtc-codereview.appspot.com/14579004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6198 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/video_coding/main/test/rtp_file_reader.cc | 4 +++- webrtc/modules/video_coding/main/test/rtp_player.h | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/webrtc/modules/video_coding/main/test/rtp_file_reader.cc b/webrtc/modules/video_coding/main/test/rtp_file_reader.cc index 447eb9bea9..2ab5460cbd 100644 --- a/webrtc/modules/video_coding/main/test/rtp_file_reader.cc +++ b/webrtc/modules/video_coding/main/test/rtp_file_reader.cc @@ -103,10 +103,11 @@ class RtpFileReaderImpl : public RtpPacketSourceInterface { } virtual int NextPacket(uint8_t* rtp_data, uint32_t* length, - uint32_t* time_ms) { + uint32_t* time_ms, uint32_t* original_length) { assert(rtp_data); assert(length); assert(time_ms); + assert(original_length); uint16_t len; uint16_t plen; @@ -126,6 +127,7 @@ class RtpFileReaderImpl : public RtpPacketSourceInterface { *length = len; *time_ms = offset; + *original_length = plen; return kResultSuccess; } diff --git a/webrtc/modules/video_coding/main/test/rtp_player.h b/webrtc/modules/video_coding/main/test/rtp_player.h index 24e62b63c5..c945b5cabb 100644 --- a/webrtc/modules/video_coding/main/test/rtp_player.h +++ b/webrtc/modules/video_coding/main/test/rtp_player.h @@ -53,9 +53,10 @@ class RtpPacketSourceInterface { // Read next RTP packet into buffer pointed to by rtp_data. On call, 'length' // field must be filled in with the size of the buffer. The actual size of // the packet is available in 'length' upon returning. Time in milliseconds - // from start of stream is returned in 'time_ms'. + // from start of stream is returned in 'time_ms'. The original full length + // of the packet is returned in 'original_length'. virtual int NextPacket(uint8_t* rtp_data, uint32_t* length, - uint32_t* time_ms) = 0; + uint32_t* time_ms, uint32_t* original_length) = 0; }; // Implemented by RtpPlayer and given to client as a means to retrieve