Expose codec implementation names in stats.

Used to distinguish between software/hardware encoders/decoders and
other implementation differences. Useful for tracking quality
regressions related to specific implementations.

BUG=webrtc:4897
R=hta@webrtc.org, mflodman@webrtc.org, stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1406903002 .

Cr-Commit-Position: refs/heads/master@{#11084}
This commit is contained in:
Peter Boström
2015-12-18 16:01:11 +01:00
parent 6c6510afad
commit b7d9a97ce4
43 changed files with 266 additions and 63 deletions

View File

@ -266,6 +266,10 @@ void H264VideoToolboxDecoder::SetVideoFormat(
}
}
const char* H264VideoToolboxDecoder::ImplementationName() const {
return "VideoToolbox";
}
} // namespace webrtc
#endif // defined(WEBRTC_VIDEO_TOOLBOX_SUPPORTED)

View File

@ -45,6 +45,8 @@ class H264VideoToolboxDecoder : public H264Decoder {
int Reset() override;
const char* ImplementationName() const override;
private:
int ResetDecompressionSession();
void ConfigureDecompressionSession();

View File

@ -434,6 +434,10 @@ void H264VideoToolboxEncoder::DestroyCompressionSession() {
}
}
const char* H264VideoToolboxEncoder::ImplementationName() const {
return "VideoToolbox";
}
} // namespace webrtc
#endif // defined(WEBRTC_VIDEO_TOOLBOX_SUPPORTED)

View File

@ -48,6 +48,8 @@ class H264VideoToolboxEncoder : public H264Encoder {
int Release() override;
const char* ImplementationName() const override;
private:
int ResetCompressionSession();
void ConfigureCompressionSession();

View File

@ -301,6 +301,10 @@ int VP8EncoderImpl::SetRates(uint32_t new_bitrate_kbit,
return WEBRTC_VIDEO_CODEC_OK;
}
const char* VP8EncoderImpl::ImplementationName() const {
return "libvpx";
}
void VP8EncoderImpl::SetStreamState(bool send_stream,
int stream_idx) {
if (send_stream && !send_stream_[stream_idx]) {
@ -1398,6 +1402,10 @@ int VP8DecoderImpl::Release() {
return WEBRTC_VIDEO_CODEC_OK;
}
const char* VP8DecoderImpl::ImplementationName() const {
return "libvpx";
}
int VP8DecoderImpl::CopyReference(VP8DecoderImpl* copy) {
// The type of frame to copy should be set in ref_frame_->frame_type
// before the call to this function.

View File

@ -58,6 +58,8 @@ class VP8EncoderImpl : public VP8Encoder {
void OnDroppedFrame() override {}
const char* ImplementationName() const override;
private:
void SetupTemporalLayers(int num_streams, int num_temporal_layers,
const VideoCodec& codec);
@ -135,6 +137,8 @@ class VP8DecoderImpl : public VP8Decoder {
int Release() override;
int Reset() override;
const char* ImplementationName() const override;
private:
// Copy reference image from this _decoder to the _decoder in copyTo. Set
// which frame type to copy in _refFrame->frame_type before the call to

View File

@ -809,6 +809,10 @@ int VP9EncoderImpl::RegisterEncodeCompleteCallback(
return WEBRTC_VIDEO_CODEC_OK;
}
const char* VP9EncoderImpl::ImplementationName() const {
return "libvpx";
}
VP9Decoder* VP9Decoder::Create() {
return new VP9DecoderImpl();
}
@ -980,4 +984,9 @@ int VP9DecoderImpl::Release() {
inited_ = false;
return WEBRTC_VIDEO_CODEC_OK;
}
const char* VP9DecoderImpl::ImplementationName() const {
return "libvpx";
}
} // namespace webrtc

View File

@ -47,6 +47,8 @@ class VP9EncoderImpl : public VP9Encoder {
void OnDroppedFrame() override {}
const char* ImplementationName() const override;
struct LayerFrameRefSettings {
int8_t upd_buf = -1; // -1 - no update, 0..7 - update buffer 0..7
int8_t ref_buf1 = -1; // -1 - no reference, 0..7 - reference buffer 0..7
@ -148,6 +150,8 @@ class VP9DecoderImpl : public VP9Decoder {
int Reset() override;
const char* ImplementationName() const override;
private:
int ReturnFrame(const vpx_image_t* img, uint32_t timeStamp);