OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 LOG(LS_INFO) << "RemoteVideoCapturer::Stop"; | 59 LOG(LS_INFO) << "RemoteVideoCapturer::Stop"; |
60 SetCaptureFormat(NULL); | 60 SetCaptureFormat(NULL); |
61 SetCaptureState(cricket::CS_STOPPED); | 61 SetCaptureState(cricket::CS_STOPPED); |
62 } | 62 } |
63 | 63 |
64 bool RemoteVideoCapturer::IsRunning() { | 64 bool RemoteVideoCapturer::IsRunning() { |
65 return capture_state() == cricket::CS_RUNNING; | 65 return capture_state() == cricket::CS_RUNNING; |
66 } | 66 } |
67 | 67 |
68 bool RemoteVideoCapturer::GetPreferredFourccs(std::vector<uint32>* fourccs) { | 68 bool RemoteVideoCapturer::GetPreferredFourccs(std::vector<uint32_t>* fourccs) { |
69 if (!fourccs) | 69 if (!fourccs) |
70 return false; | 70 return false; |
71 fourccs->push_back(cricket::FOURCC_I420); | 71 fourccs->push_back(cricket::FOURCC_I420); |
72 return true; | 72 return true; |
73 } | 73 } |
74 | 74 |
75 bool RemoteVideoCapturer::GetBestCaptureFormat( | 75 bool RemoteVideoCapturer::GetBestCaptureFormat( |
76 const cricket::VideoFormat& desired, cricket::VideoFormat* best_format) { | 76 const cricket::VideoFormat& desired, cricket::VideoFormat* best_format) { |
77 if (!best_format) { | 77 if (!best_format) { |
78 return false; | 78 return false; |
79 } | 79 } |
80 | 80 |
81 // RemoteVideoCapturer does not support capability enumeration. | 81 // RemoteVideoCapturer does not support capability enumeration. |
82 // Use the desired format as the best format. | 82 // Use the desired format as the best format. |
83 best_format->width = desired.width; | 83 best_format->width = desired.width; |
84 best_format->height = desired.height; | 84 best_format->height = desired.height; |
85 best_format->fourcc = cricket::FOURCC_I420; | 85 best_format->fourcc = cricket::FOURCC_I420; |
86 best_format->interval = desired.interval; | 86 best_format->interval = desired.interval; |
87 return true; | 87 return true; |
88 } | 88 } |
89 | 89 |
90 bool RemoteVideoCapturer::IsScreencast() const { | 90 bool RemoteVideoCapturer::IsScreencast() const { |
91 // TODO(ronghuawu): what about remote screencast stream. | 91 // TODO(ronghuawu): what about remote screencast stream. |
92 return false; | 92 return false; |
93 } | 93 } |
94 | 94 |
95 } // namespace webrtc | 95 } // namespace webrtc |
OLD | NEW |