Change return value for number of discarded packets to be int.
R=mflodman@webrtc.org Review URL: https://webrtc-codereview.appspot.com/14209004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7054 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
01581da711
commit
9d453931c5
@ -42,7 +42,7 @@ VideoReceiveStream::Stats ReceiveStatisticsProxy::GetStats() const {
|
||||
}
|
||||
stats.c_name = GetCName();
|
||||
codec_->GetReceiveSideDelay(channel_, &stats.avg_delay_ms);
|
||||
stats.discarded_packets = codec_->GetDiscardedPackets(channel_);
|
||||
stats.discarded_packets = codec_->GetNumDiscardedPackets(channel_);
|
||||
codec_->GetReceiveCodecStastistics(
|
||||
channel_, stats.key_frames, stats.delta_frames);
|
||||
|
||||
|
@ -150,7 +150,13 @@ class WEBRTC_DLLEXPORT ViECodec {
|
||||
|
||||
// Gets the number of packets discarded by the jitter buffer because they
|
||||
// arrived too late.
|
||||
virtual unsigned int GetDiscardedPackets(const int video_channel) const = 0;
|
||||
// TODO(asapersson): Remove default implementation.
|
||||
virtual int GetNumDiscardedPackets(int video_channel) const { return -1; }
|
||||
|
||||
// TODO(asapersson): Remove once the api has been removed from
|
||||
// fakewebrtcvideoengine.h.
|
||||
virtual unsigned int GetDiscardedPackets(
|
||||
const int video_channel) const { return 0; }
|
||||
|
||||
// Enables key frame request callback in ViEDecoderObserver.
|
||||
virtual int SetKeyFrameRequestCallbackStatus(const int video_channel,
|
||||
|
@ -1651,7 +1651,7 @@ void PrintCodecStatistics(webrtc::ViECodec* vie_codec,
|
||||
void PrintGetDiscardedPackets(webrtc::ViECodec* vie_codec, int video_channel) {
|
||||
std::cout << "Discarded Packets" << std::endl;
|
||||
int discarded_packets = 0;
|
||||
discarded_packets = vie_codec->GetDiscardedPackets(video_channel);
|
||||
discarded_packets = vie_codec->GetNumDiscardedPackets(video_channel);
|
||||
std::cout << "\tNumber of discarded packets: "
|
||||
<< discarded_packets << std::endl;
|
||||
}
|
||||
|
@ -416,20 +416,20 @@ int ViECodecImpl::GetCodecTargetBitrate(const int video_channel,
|
||||
return vie_encoder->CodecTargetBitrate(static_cast<uint32_t*>(bitrate));
|
||||
}
|
||||
|
||||
unsigned int ViECodecImpl::GetDiscardedPackets(const int video_channel) const {
|
||||
int ViECodecImpl::GetNumDiscardedPackets(int video_channel) const {
|
||||
ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));
|
||||
ViEChannel* vie_channel = cs.Channel(video_channel);
|
||||
if (!vie_channel) {
|
||||
shared_data_->SetLastError(kViECodecInvalidChannelId);
|
||||
return static_cast<unsigned int>(-1);
|
||||
return -1;
|
||||
}
|
||||
return vie_channel->DiscardedPackets();
|
||||
return static_cast<int>(vie_channel->DiscardedPackets());
|
||||
}
|
||||
|
||||
int ViECodecImpl::SetKeyFrameRequestCallbackStatus(const int video_channel,
|
||||
const bool enable) {
|
||||
LOG(LS_INFO) << "SetKeyFrameRequestCallbackStatus for " << video_channel
|
||||
<< ", enacle " << enable;
|
||||
<< ", enable " << enable;
|
||||
|
||||
ViEChannelManagerScoped cs(*(shared_data_->channel_manager()));
|
||||
ViEChannel* vie_channel = cs.Channel(video_channel);
|
||||
|
@ -53,7 +53,7 @@ class ViECodecImpl
|
||||
int* delay_ms) const;
|
||||
virtual int GetCodecTargetBitrate(const int video_channel,
|
||||
unsigned int* bitrate) const;
|
||||
virtual unsigned int GetDiscardedPackets(const int video_channel) const;
|
||||
virtual int GetNumDiscardedPackets(int video_channel) const;
|
||||
virtual int SetKeyFrameRequestCallbackStatus(const int video_channel,
|
||||
const bool enable);
|
||||
virtual int SetSignalKeyPacketLossStatus(const int video_channel,
|
||||
|
@ -68,7 +68,7 @@ class VideoReceiveStream {
|
||||
int decode_frame_rate;
|
||||
int render_frame_rate;
|
||||
int avg_delay_ms;
|
||||
uint32_t discarded_packets;
|
||||
int discarded_packets;
|
||||
uint32_t ssrc;
|
||||
std::string c_name;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user