OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/renderer/media/webrtc/media_stream_remote_video_source.h" | 5 #include "content/renderer/media/webrtc/media_stream_remote_video_source.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/callback_helpers.h" | 11 #include "base/callback_helpers.h" |
12 #include "base/location.h" | 12 #include "base/location.h" |
13 #include "base/threading/thread_checker.h" | 13 #include "base/threading/thread_checker.h" |
14 #include "base/trace_event/trace_event.h" | 14 #include "base/trace_event/trace_event.h" |
15 #include "content/renderer/media/webrtc/track_observer.h" | 15 #include "content/renderer/media/webrtc/track_observer.h" |
16 #include "media/base/bind_to_current_loop.h" | 16 #include "media/base/bind_to_current_loop.h" |
17 #include "media/base/timestamp_constants.h" | 17 #include "media/base/timestamp_constants.h" |
18 #include "media/base/video_frame.h" | 18 #include "media/base/video_frame.h" |
19 #include "media/base/video_util.h" | 19 #include "media/base/video_util.h" |
20 #include "third_party/libjingle/source/talk/media/base/videoframe.h" | 20 #include "third_party/webrtc/media/base/videoframe.h" |
21 #include "third_party/webrtc/system_wrappers/include/tick_util.h" | 21 #include "third_party/webrtc/system_wrappers/include/tick_util.h" |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 | 24 |
25 // Internal class used for receiving frames from the webrtc track on a | 25 // Internal class used for receiving frames from the webrtc track on a |
26 // libjingle thread and forward it to the IO-thread. | 26 // libjingle thread and forward it to the IO-thread. |
27 class MediaStreamRemoteVideoSource::RemoteVideoSourceDelegate | 27 class MediaStreamRemoteVideoSource::RemoteVideoSourceDelegate |
28 : public base::RefCountedThreadSafe<RemoteVideoSourceDelegate>, | 28 : public base::RefCountedThreadSafe<RemoteVideoSourceDelegate>, |
29 public webrtc::VideoRendererInterface { | 29 public webrtc::VideoRendererInterface { |
30 public: | 30 public: |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 case webrtc::MediaStreamTrackInterface::kEnded: | 217 case webrtc::MediaStreamTrackInterface::kEnded: |
218 SetReadyState(blink::WebMediaStreamSource::ReadyStateEnded); | 218 SetReadyState(blink::WebMediaStreamSource::ReadyStateEnded); |
219 break; | 219 break; |
220 default: | 220 default: |
221 NOTREACHED(); | 221 NOTREACHED(); |
222 break; | 222 break; |
223 } | 223 } |
224 } | 224 } |
225 | 225 |
226 } // namespace content | 226 } // namespace content |
OLD | NEW |