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

Unified Diff: webrtc/video_engine/vie_encoder.h

Issue 1354143004: Remove callback_cs_ in ViEEncoder. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 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/video_engine/vie_channel_group.cc ('k') | webrtc/video_engine/vie_encoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video_engine/vie_encoder.h
diff --git a/webrtc/video_engine/vie_encoder.h b/webrtc/video_engine/vie_encoder.h
index 424a2a2b51fc61b7c33044b0d6cb7411d88f3f7b..2221f0781debe4225ed0364ff6a2ee31c82d9783 100644
--- a/webrtc/video_engine/vie_encoder.h
+++ b/webrtc/video_engine/vie_encoder.h
@@ -39,29 +39,8 @@ class QMVideoSettingsCallback;
class SendStatisticsProxy;
class ViEBitrateObserver;
class ViEEffectFilter;
-class ViEEncoderObserver;
class VideoCodingModule;
-// This class declares an abstract interface for a user defined observer. It is
-// up to the VideoEngine user to implement a derived class which implements the
-// observer class. The observer is registered using RegisterEncoderObserver()
-// and deregistered using DeregisterEncoderObserver().
-class ViEEncoderObserver {
- public:
- // This method is called once per second with the current encoded frame rate
- // and bit rate.
- virtual void OutgoingRate(const int video_channel,
- const unsigned int framerate,
- const unsigned int bitrate) = 0;
-
- // This method is called whenever the state of the SuspendBelowMinBitrate
- // changes, i.e., when |is_suspended| toggles.
- virtual void SuspendChange(int video_channel, bool is_suspended) = 0;
-
- protected:
- virtual ~ViEEncoderObserver() {}
-};
-
class ViEEncoder : public RtcpIntraFrameObserver,
public VideoEncoderRateObserver,
public VCMPacketizationCallback,
@@ -72,7 +51,9 @@ class ViEEncoder : public RtcpIntraFrameObserver,
ViEEncoder(int32_t channel_id,
uint32_t number_of_cores,
- ProcessThread& module_process_thread,
+ ProcessThread* module_process_thread,
+ SendStatisticsProxy* stats_proxy,
+ I420FrameCallback* pre_encode_callback,
PacedSender* pacer,
BitrateAllocator* bitrate_allocator);
~ViEEncoder();
@@ -146,8 +127,6 @@ class ViEEncoder : public RtcpIntraFrameObserver,
int32_t SendStatistics(const uint32_t bit_rate,
const uint32_t frame_rate) override;
- int32_t RegisterCodecObserver(ViEEncoderObserver* observer);
-
// Implements RtcpIntraFrameObserver.
void OnReceivedIntraFrameRequest(uint32_t ssrc) override;
void OnReceivedSLI(uint32_t ssrc, uint8_t picture_id) override;
@@ -165,12 +144,9 @@ class ViEEncoder : public RtcpIntraFrameObserver,
void SuspendBelowMinBitrate();
// New-style callbacks, used by VideoSendStream.
- void RegisterPreEncodeCallback(I420FrameCallback* pre_encode_callback);
void RegisterPostEncodeImageCallback(
EncodedImageCallback* post_encode_callback);
- void RegisterSendStatisticsProxy(SendStatisticsProxy* send_statistics_proxy);
-
int channel_id() const { return channel_id_; }
int GetPaddingNeededBps() const;
@@ -196,10 +172,11 @@ class ViEEncoder : public RtcpIntraFrameObserver,
const rtc::scoped_ptr<VideoCodingModule> vcm_;
rtc::scoped_refptr<PayloadRouter> send_payload_router_;
- rtc::scoped_ptr<CriticalSectionWrapper> callback_cs_;
rtc::scoped_ptr<CriticalSectionWrapper> data_cs_;
rtc::scoped_ptr<BitrateObserver> bitrate_observer_;
+ SendStatisticsProxy* const stats_proxy_;
+ I420FrameCallback* const pre_encode_callback_;
PacedSender* const pacer_;
BitrateAllocator* const bitrate_allocator_;
@@ -220,8 +197,7 @@ class ViEEncoder : public RtcpIntraFrameObserver,
bool fec_enabled_;
bool nack_enabled_;
- ViEEncoderObserver* codec_observer_ GUARDED_BY(callback_cs_);
- ProcessThread& module_process_thread_;
+ ProcessThread* module_process_thread_;
bool has_received_sli_ GUARDED_BY(data_cs_);
uint8_t picture_id_sli_ GUARDED_BY(data_cs_);
@@ -230,10 +206,7 @@ class ViEEncoder : public RtcpIntraFrameObserver,
std::map<uint32_t, int> ssrc_streams_ GUARDED_BY(data_cs_);
bool video_suspended_ GUARDED_BY(data_cs_);
- I420FrameCallback* pre_encode_callback_ GUARDED_BY(callback_cs_);
const int64_t start_ms_;
-
- SendStatisticsProxy* send_statistics_proxy_ GUARDED_BY(callback_cs_);
};
} // namespace webrtc
« no previous file with comments | « webrtc/video_engine/vie_channel_group.cc ('k') | webrtc/video_engine/vie_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698