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

Side by Side Diff: webrtc/video/video_receive_stream.cc

Issue 2974453002: Protected streams report RTP messages directly to the FlexFec streams (Closed)
Patch Set: Appease lint. Created 3 years, 4 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 unified diff | Download patch
« no previous file with comments | « webrtc/video/video_receive_stream.h ('k') | webrtc/video_receive_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 } 360 }
361 } 361 }
362 362
363 if (file != rtc::kInvalidPlatformFileValue) { 363 if (file != rtc::kInvalidPlatformFileValue) {
364 // Make a keyframe appear as early as possible in the logs, to give actually 364 // Make a keyframe appear as early as possible in the logs, to give actually
365 // decodable output. 365 // decodable output.
366 RequestKeyFrame(); 366 RequestKeyFrame();
367 } 367 }
368 } 368 }
369 369
370 void VideoReceiveStream::AddSecondarySink(RtpPacketSinkInterface* sink) {
371 rtp_video_stream_receiver_.AddSecondarySink(sink);
372 }
373
374 void VideoReceiveStream::RemoveSecondarySink(
375 const RtpPacketSinkInterface* sink) {
376 rtp_video_stream_receiver_.RemoveSecondarySink(sink);
377 }
378
370 // TODO(tommi): This method grabs a lock 6 times. 379 // TODO(tommi): This method grabs a lock 6 times.
371 void VideoReceiveStream::OnFrame(const VideoFrame& video_frame) { 380 void VideoReceiveStream::OnFrame(const VideoFrame& video_frame) {
372 int64_t sync_offset_ms; 381 int64_t sync_offset_ms;
373 double estimated_freq_khz; 382 double estimated_freq_khz;
374 // TODO(tommi): GetStreamSyncOffsetInMs grabs three locks. One inside the 383 // TODO(tommi): GetStreamSyncOffsetInMs grabs three locks. One inside the
375 // function itself, another in GetChannel() and a third in 384 // function itself, another in GetChannel() and a third in
376 // GetPlayoutTimestamp. Seems excessive. Anyhow, I'm assuming the function 385 // GetPlayoutTimestamp. Seems excessive. Anyhow, I'm assuming the function
377 // succeeds most of the time, which leads to grabbing a fourth lock. 386 // succeeds most of the time, which leads to grabbing a fourth lock.
378 if (rtp_stream_sync_.GetStreamSyncOffsetInMs(video_frame.timestamp(), 387 if (rtp_stream_sync_.GetStreamSyncOffsetInMs(video_frame.timestamp(),
379 video_frame.render_time_ms(), 388 video_frame.render_time_ms(),
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 if (stream_is_active && !receiving_keyframe) { 526 if (stream_is_active && !receiving_keyframe) {
518 LOG(LS_WARNING) << "No decodable frame in " << kMaxWaitForFrameMs 527 LOG(LS_WARNING) << "No decodable frame in " << kMaxWaitForFrameMs
519 << " ms, requesting keyframe."; 528 << " ms, requesting keyframe.";
520 RequestKeyFrame(); 529 RequestKeyFrame();
521 } 530 }
522 } 531 }
523 return true; 532 return true;
524 } 533 }
525 } // namespace internal 534 } // namespace internal
526 } // namespace webrtc 535 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/video_receive_stream.h ('k') | webrtc/video_receive_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698