| 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 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_VIDEO_CAPTURER_ADAPTER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_VIDEO_CAPTURER_ADAPTER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_VIDEO_CAPTURER_ADAPTER_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_VIDEO_CAPTURER_ADAPTER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/threading/thread_checker.h" | 14 #include "base/threading/thread_checker.h" |
| 15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
| 16 #include "media/base/video_capture_types.h" | 16 #include "media/base/video_capture_types.h" |
| 17 #include "media/base/video_frame.h" | 17 #include "media/base/video_frame.h" |
| 18 #include "media/base/video_frame_pool.h" | |
| 19 #include "third_party/webrtc/media/base/videocapturer.h" | 18 #include "third_party/webrtc/media/base/videocapturer.h" |
| 20 | 19 |
| 21 namespace content { | 20 namespace content { |
| 22 | 21 |
| 23 // WebRtcVideoCapturerAdapter implements a simple cricket::VideoCapturer that is | 22 // WebRtcVideoCapturerAdapter implements a simple cricket::VideoCapturer that is |
| 24 // used for VideoCapturing in libJingle and especially in PeerConnections. | 23 // used for VideoCapturing in libJingle and especially in PeerConnections. |
| 25 // The class is created and destroyed on the main render thread. | 24 // The class is created and destroyed on the main render thread. |
| 26 // PeerConnection access cricket::VideoCapturer from a libJingle worker thread. | 25 // PeerConnection access cricket::VideoCapturer from a libJingle worker thread. |
| 27 // An instance of WebRtcVideoCapturerAdapter is owned by an instance of | 26 // An instance of WebRtcVideoCapturerAdapter is owned by an instance of |
| 28 // webrtc::VideoTrackSourceInterface in libJingle. The implementation of | 27 // webrtc::VideoTrackSourceInterface in libJingle. The implementation of |
| (...skipping 21 matching lines...) Expand all Loading... |
| 50 bool GetBestCaptureFormat(const cricket::VideoFormat& desired, | 49 bool GetBestCaptureFormat(const cricket::VideoFormat& desired, |
| 51 cricket::VideoFormat* best_format) override; | 50 cricket::VideoFormat* best_format) override; |
| 52 bool IsScreencast() const override; | 51 bool IsScreencast() const override; |
| 53 | 52 |
| 54 // |thread_checker_| is bound to the libjingle worker thread. | 53 // |thread_checker_| is bound to the libjingle worker thread. |
| 55 base::ThreadChecker thread_checker_; | 54 base::ThreadChecker thread_checker_; |
| 56 | 55 |
| 57 const bool is_screencast_; | 56 const bool is_screencast_; |
| 58 bool running_; | 57 bool running_; |
| 59 | 58 |
| 60 media::VideoFramePool scaled_frame_pool_; | 59 class MediaVideoFrameFactory; |
| 61 | 60 |
| 62 DISALLOW_COPY_AND_ASSIGN(WebRtcVideoCapturerAdapter); | 61 DISALLOW_COPY_AND_ASSIGN(WebRtcVideoCapturerAdapter); |
| 63 }; | 62 }; |
| 64 | 63 |
| 65 } // namespace content | 64 } // namespace content |
| 66 | 65 |
| 67 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_VIDEO_CAPTURER_ADAPTER_H_ | 66 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_VIDEO_CAPTURER_ADAPTER_H_ |
| OLD | NEW |