| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/renderer/media/cast_receiver_session_delegate.h" | 5 #include "chrome/renderer/media/cast_receiver_session_delegate.h" |
| 6 | 6 |
| 7 #include "base/bind.h" |
| 7 #include "base/synchronization/waitable_event.h" | 8 #include "base/synchronization/waitable_event.h" |
| 8 #include "base/values.h" | 9 #include "base/values.h" |
| 9 | 10 |
| 10 CastReceiverSessionDelegate::CastReceiverSessionDelegate() | 11 CastReceiverSessionDelegate::CastReceiverSessionDelegate() |
| 11 : weak_factory_(this) { | 12 : weak_factory_(this) { |
| 12 } | 13 } |
| 13 CastReceiverSessionDelegate::~CastReceiverSessionDelegate() {} | 14 CastReceiverSessionDelegate::~CastReceiverSessionDelegate() {} |
| 14 | 15 |
| 15 void CastReceiverSessionDelegate::LogRawEvents( | 16 void CastReceiverSessionDelegate::LogRawEvents( |
| 16 const std::vector<media::cast::PacketEvent>& packet_events, | 17 const std::vector<media::cast::PacketEvent>& packet_events, |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 95 |
| 95 void CastReceiverSessionDelegate::OnDecodedVideoFrame( | 96 void CastReceiverSessionDelegate::OnDecodedVideoFrame( |
| 96 const scoped_refptr<media::VideoFrame>& video_frame, | 97 const scoped_refptr<media::VideoFrame>& video_frame, |
| 97 const base::TimeTicks& playout_time, | 98 const base::TimeTicks& playout_time, |
| 98 bool is_continous) { | 99 bool is_continous) { |
| 99 if (frame_callback_.is_null()) | 100 if (frame_callback_.is_null()) |
| 100 return; | 101 return; |
| 101 frame_callback_.Run(video_frame, playout_time); | 102 frame_callback_.Run(video_frame, playout_time); |
| 102 cast_receiver_->RequestDecodedVideoFrame(on_video_decoded_cb_); | 103 cast_receiver_->RequestDecodedVideoFrame(on_video_decoded_cb_); |
| 103 } | 104 } |
| OLD | NEW |