Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(890)

Unified Diff: webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.cc

Issue 1599353003: Name SimulcastEncoderApdater on InitEncode. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.cc
diff --git a/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.cc b/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.cc
index 40e438f7e424c90a03727053443bb67ff90dd523..31682024984cb8db0e63cb775291ea3fe99c54cd 100644
--- a/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.cc
+++ b/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.cc
@@ -137,7 +137,9 @@ class AdapterEncodedImageCallback : public webrtc::EncodedImageCallback {
namespace webrtc {
SimulcastEncoderAdapter::SimulcastEncoderAdapter(VideoEncoderFactory* factory)
- : factory_(factory), encoded_complete_callback_(NULL) {
+ : factory_(factory),
+ encoded_complete_callback_(NULL),
+ implementation_name_("SimulcastEncoderAdapter") {
memset(&codec_, 0, sizeof(webrtc::VideoCodec));
}
@@ -195,6 +197,7 @@ int SimulcastEncoderAdapter::InitEncode(const VideoCodec* inst,
codec_.extra_options = screensharing_extra_options_.get();
}
+ std::string implementation_name;
// Create |number_of_streams| of encoder instances and init them.
for (int i = 0; i < number_of_streams; ++i) {
VideoCodec stream_codec;
@@ -224,7 +227,12 @@ int SimulcastEncoderAdapter::InitEncode(const VideoCodec* inst,
encoder->RegisterEncodeCompleteCallback(callback);
streaminfos_.push_back(StreamInfo(encoder, callback, stream_codec.width,
stream_codec.height, send_stream));
+ if (i != 0)
+ implementation_name_ += ", ";
+ implementation_name += streaminfos_[0].encoder->ImplementationName();
stefan-webrtc 2016/01/20 14:18:12 i?
pbos-webrtc 2016/01/20 14:44:38 Done.
}
+ implementation_name_ =
+ "SimulcastEncoderAdapter (" + implementation_name + ")";
return WEBRTC_VIDEO_CODEC_OK;
}
@@ -497,10 +505,7 @@ bool SimulcastEncoderAdapter::SupportsNativeHandle() const {
}
const char* SimulcastEncoderAdapter::ImplementationName() const {
- // We should not be calling this method before streaminfos_ are configured.
- RTC_DCHECK(!streaminfos_.empty());
- // TODO(pbos): Support multiple implementation names for different encoders.
- return streaminfos_[0].encoder->ImplementationName();
+ return implementation_name_.c_str();
}
} // namespace webrtc
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698