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

Unified Diff: webrtc/media/engine/webrtcvideoengine2.cc

Issue 1875713002: New peerconnection test case, for video stream forwarding. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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/media/engine/webrtcvideoengine2.cc
diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc
index fc87607d20a6d0259d4a69c8f64b0b0cf6313a1e..69917c338bfdd9ec834f675f8688035e482f5aae 100644
--- a/webrtc/media/engine/webrtcvideoengine2.cc
+++ b/webrtc/media/engine/webrtcvideoengine2.cc
@@ -1562,15 +1562,24 @@ static void CreateBlackFrame(webrtc::VideoFrame* video_frame,
void WebRtcVideoChannel2::WebRtcVideoSendStream::OnFrame(
const VideoFrame& frame) {
TRACE_EVENT0("webrtc", "WebRtcVideoSendStream::OnFrame");
- webrtc::VideoFrame video_frame(frame.GetVideoFrameBuffer(), 0, 0,
- frame.GetVideoRotation());
+ invoker_.AsyncInvoke<void>(
pbos-webrtc 2016/04/08 14:08:56 I really don't want a thread hop here, I've CLs th
perkj_webrtc 2016/04/08 14:34:07 This can wait until then....
nisse-webrtc 2016/04/08 14:57:03 Agreed.
nisse-webrtc 2016/04/11 06:35:39 Can you cc me on that cl?
+ worker_thread_,
+ rtc::Bind(&WebRtcVideoChannel2::WebRtcVideoSendStream::OnFrame_w,
+ this,
+ webrtc::VideoFrame(frame.GetVideoFrameBuffer(), 0, 0,
+ frame.GetVideoRotation()),
+ frame.GetTimeStamp() / rtc::kNumNanosecsPerMillisec));
+}
+
+void WebRtcVideoChannel2::WebRtcVideoSendStream::OnFrame_w(
+ webrtc::VideoFrame video_frame, int64_t frame_delta_ms) {
+ RTC_DCHECK(worker_thread_->IsCurrent());
rtc::CritScope cs(&lock_);
if (stream_ == NULL) {
// Frame input before send codecs are configured, dropping frame.
return;
}
- int64_t frame_delta_ms = frame.GetTimeStamp() / rtc::kNumNanosecsPerMillisec;
// frame->GetTimeStamp() is essentially a delta, align to webrtc time
if (first_frame_timestamp_ms_ == 0) {
first_frame_timestamp_ms_ = rtc::Time() - frame_delta_ms;
« webrtc/media/engine/webrtcvideoengine2.h ('K') | « webrtc/media/engine/webrtcvideoengine2.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698