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/synchronization/waitable_event.h" | 7 #include "base/synchronization/waitable_event.h" |
8 #include "base/time/time.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) { |
13 #if defined(OS_WIN) | |
14 base::Time::ActivateHighResolutionTimer(true); | |
miu
2015/05/07 02:58:00
Consider adding a LOG(WARNING) message if this fun
miu
2015/05/07 02:58:00
Also, should all these code changes go in CastSess
hubbe
2015/05/07 19:16:50
No thinking, I just put it in the wrong place. :)
hubbe
2015/05/07 19:16:50
Done.
| |
15 #endif | |
12 } | 16 } |
13 CastReceiverSessionDelegate::~CastReceiverSessionDelegate() {} | 17 CastReceiverSessionDelegate::~CastReceiverSessionDelegate() { |
18 #if defined(OS_WIN) | |
19 base::Time::ActivateHighResolutionTimer(false); | |
20 #endif | |
21 } | |
14 | 22 |
15 void CastReceiverSessionDelegate::LogRawEvents( | 23 void CastReceiverSessionDelegate::LogRawEvents( |
16 const std::vector<media::cast::PacketEvent>& packet_events, | 24 const std::vector<media::cast::PacketEvent>& packet_events, |
17 const std::vector<media::cast::FrameEvent>& frame_events) { | 25 const std::vector<media::cast::FrameEvent>& frame_events) { |
18 NOTREACHED(); | 26 NOTREACHED(); |
19 } | 27 } |
20 | 28 |
21 void CastReceiverSessionDelegate::Start( | 29 void CastReceiverSessionDelegate::Start( |
22 const media::cast::FrameReceiverConfig& audio_config, | 30 const media::cast::FrameReceiverConfig& audio_config, |
23 const media::cast::FrameReceiverConfig& video_config, | 31 const media::cast::FrameReceiverConfig& video_config, |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
94 | 102 |
95 void CastReceiverSessionDelegate::OnDecodedVideoFrame( | 103 void CastReceiverSessionDelegate::OnDecodedVideoFrame( |
96 const scoped_refptr<media::VideoFrame>& video_frame, | 104 const scoped_refptr<media::VideoFrame>& video_frame, |
97 const base::TimeTicks& playout_time, | 105 const base::TimeTicks& playout_time, |
98 bool is_continous) { | 106 bool is_continous) { |
99 if (frame_callback_.is_null()) | 107 if (frame_callback_.is_null()) |
100 return; | 108 return; |
101 frame_callback_.Run(video_frame, playout_time); | 109 frame_callback_.Run(video_frame, playout_time); |
102 cast_receiver_->RequestDecodedVideoFrame(on_video_decoded_cb_); | 110 cast_receiver_->RequestDecodedVideoFrame(on_video_decoded_cb_); |
103 } | 111 } |
OLD | NEW |