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

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

Issue 2745813003: Don't set the priority of the decoder to 'high' on Android. (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | no next file » | 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 } 303 }
304 304
305 video_stream_decoder_.reset(new VideoStreamDecoder( 305 video_stream_decoder_.reset(new VideoStreamDecoder(
306 &video_receiver_, &rtp_stream_receiver_, &rtp_stream_receiver_, 306 &video_receiver_, &rtp_stream_receiver_, &rtp_stream_receiver_,
307 rtp_stream_receiver_.IsRetransmissionsEnabled(), protected_by_fec, 307 rtp_stream_receiver_.IsRetransmissionsEnabled(), protected_by_fec,
308 &stats_proxy_, renderer)); 308 &stats_proxy_, renderer));
309 // Register the channel to receive stats updates. 309 // Register the channel to receive stats updates.
310 call_stats_->RegisterStatsObserver(video_stream_decoder_.get()); 310 call_stats_->RegisterStatsObserver(video_stream_decoder_.get());
311 // Start the decode thread 311 // Start the decode thread
312 decode_thread_.Start(); 312 decode_thread_.Start();
313 #if !defined(WEBRTC_ANDROID)
314 // On android, the decoding happens on a different thread and frames
315 // are delivered on that thread (that in itself needs to be fixed).
316 // In any event, the actual decoding work is higher priority than the
317 // |decode_thread_| on Android, so we only raise the deocode priority on
318 // platforms other than Android.
313 decode_thread_.SetPriority(rtc::kHighestPriority); 319 decode_thread_.SetPriority(rtc::kHighestPriority);
320 #endif
314 rtp_stream_receiver_.StartReceive(); 321 rtp_stream_receiver_.StartReceive();
315 } 322 }
316 323
317 void VideoReceiveStream::Stop() { 324 void VideoReceiveStream::Stop() {
318 RTC_DCHECK_RUN_ON(&worker_thread_checker_); 325 RTC_DCHECK_RUN_ON(&worker_thread_checker_);
319 rtp_stream_receiver_.StopReceive(); 326 rtp_stream_receiver_.StopReceive();
320 // TriggerDecoderShutdown will release any waiting decoder thread and make it 327 // TriggerDecoderShutdown will release any waiting decoder thread and make it
321 // stop immediately, instead of waiting for a timeout. Needs to be called 328 // stop immediately, instead of waiting for a timeout. Needs to be called
322 // before joining the decoder thread thread. 329 // before joining the decoder thread thread.
323 video_receiver_.TriggerDecoderShutdown(); 330 video_receiver_.TriggerDecoderShutdown();
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 rtp_stream_receiver_.FrameDecoded(frame->picture_id); 496 rtp_stream_receiver_.FrameDecoded(frame->picture_id);
490 } else { 497 } else {
491 LOG(LS_WARNING) << "No decodable frame in " << kMaxWaitForFrameMs 498 LOG(LS_WARNING) << "No decodable frame in " << kMaxWaitForFrameMs
492 << " ms, requesting keyframe."; 499 << " ms, requesting keyframe.";
493 RequestKeyFrame(); 500 RequestKeyFrame();
494 } 501 }
495 return true; 502 return true;
496 } 503 }
497 } // namespace internal 504 } // namespace internal
498 } // namespace webrtc 505 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698