Wire up statistics in video receive stream of new API
This CL includes Call tests that test both send and receive sides.
BUG=2235
R=mflodman@webrtc.org, pbos@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/8049004
git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@5499 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/video_receive_stream.h b/video_receive_stream.h
index ae1b112..f1eea82 100644
--- a/video_receive_stream.h
+++ b/video_receive_stream.h
@@ -55,39 +55,22 @@
class VideoReceiveStream {
public:
- struct Stats {
+ struct Stats : public StreamStats {
Stats()
: network_frame_rate(0),
decode_frame_rate(0),
render_frame_rate(0),
- key_frames(0),
- delta_frames(0),
- video_packets(0),
- retransmitted_packets(0),
- fec_packets(0),
- padding_packets(0),
+ avg_delay_ms(0),
discarded_packets(0),
- received_bitrate_bps(0),
- receive_side_delay_ms(0) {}
- RtpStatistics rtp_stats;
+ ssrc(0) {}
+
int network_frame_rate;
int decode_frame_rate;
int render_frame_rate;
- uint32_t key_frames;
- uint32_t delta_frames;
- uint32_t video_packets;
- uint32_t retransmitted_packets;
- uint32_t fec_packets;
- uint32_t padding_packets;
+ int avg_delay_ms;
uint32_t discarded_packets;
- int32_t received_bitrate_bps;
- int receive_side_delay_ms;
- };
-
- class StatsCallback {
- public:
- virtual ~StatsCallback() {}
- virtual void ReceiveStats(const Stats& stats) = 0;
+ uint32_t ssrc;
+ std::string c_name;
};
struct Config {
@@ -186,13 +169,11 @@
// Target delay in milliseconds. A positive value indicates this stream is
// used for streaming instead of a real-time call.
int target_delay_ms;
-
- // Callback for periodically receiving receiver stats.
- StatsCallback* stats_callback;
};
virtual void StartReceiving() = 0;
virtual void StopReceiving() = 0;
+ virtual Stats GetStats() = 0;
// TODO(mflodman) Replace this with callback.
virtual void GetCurrentReceiveCodec(VideoCodec* receive_codec) = 0;