OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/rtc_video_capturer.h" | 5 #include "content/renderer/media/rtc_video_capturer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 | 8 |
9 RtcVideoCapturer::RtcVideoCapturer( | 9 RtcVideoCapturer::RtcVideoCapturer( |
10 const media::VideoCaptureSessionId id, | 10 const media::VideoCaptureSessionId id, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 return state_ == video_capture::kStarted; | 53 return state_ == video_capture::kStarted; |
54 } | 54 } |
55 | 55 |
56 bool RtcVideoCapturer::GetPreferredFourccs(std::vector<uint32>* fourccs) { | 56 bool RtcVideoCapturer::GetPreferredFourccs(std::vector<uint32>* fourccs) { |
57 if (!fourccs) | 57 if (!fourccs) |
58 return false; | 58 return false; |
59 fourccs->push_back(cricket::FOURCC_I420); | 59 fourccs->push_back(cricket::FOURCC_I420); |
60 return true; | 60 return true; |
61 } | 61 } |
62 | 62 |
| 63 bool RtcVideoCapturer::IsScreencast() { |
| 64 return false; |
| 65 } |
| 66 |
63 bool RtcVideoCapturer::GetBestCaptureFormat(const cricket::VideoFormat& desired, | 67 bool RtcVideoCapturer::GetBestCaptureFormat(const cricket::VideoFormat& desired, |
64 cricket::VideoFormat* best_format) { | 68 cricket::VideoFormat* best_format) { |
65 if (!best_format) { | 69 if (!best_format) { |
66 return false; | 70 return false; |
67 } | 71 } |
68 | 72 |
69 // Chrome does not support capability enumeration. | 73 // Chrome does not support capability enumeration. |
70 // Use the desired format as the best format. | 74 // Use the desired format as the best format. |
71 best_format->width = desired.width; | 75 best_format->width = desired.width; |
72 best_format->height = desired.height; | 76 best_format->height = desired.height; |
(...skipping 15 matching lines...) Expand all Loading... |
88 base::Time::kNanosecondsPerMicrosecond; | 92 base::Time::kNanosecondsPerMicrosecond; |
89 frame.time_stamp = frame.elapsed_time; | 93 frame.time_stamp = frame.elapsed_time; |
90 frame.data = buf.memory_pointer; | 94 frame.data = buf.memory_pointer; |
91 frame.pixel_height = 1; | 95 frame.pixel_height = 1; |
92 frame.pixel_width = 1; | 96 frame.pixel_width = 1; |
93 | 97 |
94 // This signals to libJingle that a new VideoFrame is available. | 98 // This signals to libJingle that a new VideoFrame is available. |
95 // libJingle have no assumptions on what thread this signal come from. | 99 // libJingle have no assumptions on what thread this signal come from. |
96 SignalFrameCaptured(this, &frame); | 100 SignalFrameCaptured(this, &frame); |
97 } | 101 } |
OLD | NEW |