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

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: Rebased and fixed SendStatisics const uint. 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
« no previous file with comments | « webrtc/modules/video_coding/generic_encoder.h ('k') | webrtc/modules/video_coding/include/video_coding.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1704a9216ede1b82de45d94d45ce17f2a2fbd28b..abc6369a005ce2e6fe7a4d3198a8b079056b3710 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;
@@ -139,20 +138,14 @@ bool VCMGenericEncoder::SupportsNativeHandle() const {
}
VCMEncodedFrameCallback::VCMEncodedFrameCallback(
- EncodedImageCallback* post_encode_callback)
- : send_callback_(),
- media_opt_(nullptr),
- internal_source_(false),
- post_encode_callback_(post_encode_callback) {}
+ EncodedImageCallback* post_encode_callback,
+ media_optimization::MediaOptimization* media_opt)
+ : internal_source_(false),
+ post_encode_callback_(post_encode_callback),
+ media_opt_(media_opt) {}
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,
@@ -172,14 +165,4 @@ int32_t VCMEncodedFrameCallback::Encoded(
return VCM_OK;
}
-void VCMEncodedFrameCallback::SetMediaOpt(
- media_optimization::MediaOptimization* mediaOpt) {
- media_opt_ = mediaOpt;
-}
-
-void VCMEncodedFrameCallback::SignalLastEncoderImplementationUsed(
- const char* implementation_name) {
- if (send_callback_)
- send_callback_->OnEncoderImplementationName(implementation_name);
-}
} // namespace webrtc
« no previous file with comments | « webrtc/modules/video_coding/generic_encoder.h ('k') | webrtc/modules/video_coding/include/video_coding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698