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

Unified Diff: webrtc/pc/mediacontroller.cc

Issue 2826263004: Move responsibility for RTP header extensions on video receive. (Closed)
Patch Set: Created 3 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/pc/mediacontroller.cc
diff --git a/webrtc/pc/mediacontroller.cc b/webrtc/pc/mediacontroller.cc
index fa8acadddcc5229b7126c4b4c2c9cdc7b34b25fb..ead69ad1044de0cdb4bcd2a641dd77712e3578ae 100644
--- a/webrtc/pc/mediacontroller.cc
+++ b/webrtc/pc/mediacontroller.cc
@@ -63,6 +63,20 @@ class MediaController : public webrtc::MediaControllerInterface,
}
const cricket::MediaConfig& config() const override { return media_config_; }
+ // Call's SetVideoReceiveRtpHeaderExtensions can be called on any thread,
+ // but we need to go via worker_thread_ to access the call_ pointer.
+ void SetVideoReceiveRtpHeaderExtensions(
+ const std::vector<webrtc::RtpExtension>& extensions) override {
+ if (!worker_thread_->IsCurrent()) {
+ worker_thread_->Invoke<void>(
+ RTC_FROM_HERE,
+ rtc::Bind(&MediaController::SetVideoReceiveRtpHeaderExtensions,
+ this, extensions));
+ return;
+ }
+ call_w()->SetVideoReceiveRtpHeaderExtensions(extensions);
+ }
+
private:
void Construct_w(cricket::MediaEngineInterface* media_engine) {
RTC_DCHECK(worker_thread_->IsCurrent());

Powered by Google App Engine
This is Rietveld 408576698