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

Unified Diff: webrtc/modules/video_coding/generic_encoder.cc

Issue 1900193004: Remove VCMPacketizationCallback (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed offline comments. Created 4 years, 8 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
Index: webrtc/modules/video_coding/generic_encoder.cc
diff --git a/webrtc/modules/video_coding/generic_encoder.cc b/webrtc/modules/video_coding/generic_encoder.cc
index 321deb0a473f72254adbb15c365b240b1a8f54f6..19309260dced4e1e7ca8d8dafb6ec854d8daafc0 100644
--- a/webrtc/modules/video_coding/generic_encoder.cc
+++ b/webrtc/modules/video_coding/generic_encoder.cc
@@ -72,11 +72,6 @@ int32_t VCMGenericEncoder::Encode(const VideoFrame& frame,
int32_t result = encoder_->Encode(frame, codec_specific, &frame_types);
- if (vcm_encoded_frame_callback_) {
- vcm_encoded_frame_callback_->SignalLastEncoderImplementationUsed(
- encoder_->ImplementationName());
- }
-
if (is_screenshare_ &&
result == WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT) {
// Target bitrate exceeded, encoder state has been reset - try again.
@@ -86,6 +81,10 @@ int32_t VCMGenericEncoder::Encode(const VideoFrame& frame,
return result;
}
+const char* VCMGenericEncoder::ImplementationName() const {
+ return encoder_->ImplementationName();
+}
+
void VCMGenericEncoder::SetEncoderParameters(const EncoderParameters& params) {
bool channel_parameters_have_changed;
bool rates_have_changed;
@@ -144,19 +143,12 @@ int VCMGenericEncoder::GetTargetFramerate() {
VCMEncodedFrameCallback::VCMEncodedFrameCallback(
EncodedImageCallback* post_encode_callback)
- : send_callback_(),
- media_opt_(nullptr),
+ : media_opt_(nullptr),
internal_source_(false),
post_encode_callback_(post_encode_callback) {}
VCMEncodedFrameCallback::~VCMEncodedFrameCallback() {}
-int32_t VCMEncodedFrameCallback::SetTransportCallback(
- VCMPacketizationCallback* transport) {
- send_callback_ = transport;
- return VCM_OK;
-}
-
int32_t VCMEncodedFrameCallback::Encoded(
const EncodedImage& encoded_image,
const CodecSpecificInfo* codec_specific,
@@ -181,9 +173,4 @@ void VCMEncodedFrameCallback::SetMediaOpt(
media_opt_ = mediaOpt;
}
-void VCMEncodedFrameCallback::SignalLastEncoderImplementationUsed(
- const char* implementation_name) {
- if (send_callback_)
- send_callback_->OnEncoderImplementationName(implementation_name);
-}
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698