| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 memset(reinterpret_cast<uint8*>(frame.data) + (size / 2), 2, | 126 memset(reinterpret_cast<uint8*>(frame.data) + (size / 2), 2, |
| 127 size - (size / 2)); | 127 size - (size / 2)); |
| 128 memcpy(frame.data, reinterpret_cast<const uint8*>(&fourcc), 4); | 128 memcpy(frame.data, reinterpret_cast<const uint8*>(&fourcc), 4); |
| 129 frame.rotation = rotation_; | 129 frame.rotation = rotation_; |
| 130 // TODO(zhurunz): SignalFrameCaptured carry returned value to be able to | 130 // TODO(zhurunz): SignalFrameCaptured carry returned value to be able to |
| 131 // capture results from downstream. | 131 // capture results from downstream. |
| 132 SignalFrameCaptured(this, &frame); | 132 SignalFrameCaptured(this, &frame); |
| 133 return true; | 133 return true; |
| 134 } | 134 } |
| 135 | 135 |
| 136 void SignalCapturedFrame(cricket::CapturedFrame* frame) { |
| 137 SignalFrameCaptured(this, frame); |
| 138 } |
| 139 |
| 136 sigslot::signal1<FakeVideoCapturer*> SignalDestroyed; | 140 sigslot::signal1<FakeVideoCapturer*> SignalDestroyed; |
| 137 | 141 |
| 138 virtual cricket::CaptureState Start(const cricket::VideoFormat& format) { | 142 virtual cricket::CaptureState Start(const cricket::VideoFormat& format) { |
| 139 cricket::VideoFormat supported; | 143 cricket::VideoFormat supported; |
| 140 if (GetBestCaptureFormat(format, &supported)) { | 144 if (GetBestCaptureFormat(format, &supported)) { |
| 141 SetCaptureFormat(&supported); | 145 SetCaptureFormat(&supported); |
| 142 } | 146 } |
| 143 running_ = true; | 147 running_ = true; |
| 144 SetCaptureState(cricket::CS_RUNNING); | 148 SetCaptureState(cricket::CS_RUNNING); |
| 145 return cricket::CS_RUNNING; | 149 return cricket::CS_RUNNING; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 170 bool running_; | 174 bool running_; |
| 171 int64 initial_unix_timestamp_; | 175 int64 initial_unix_timestamp_; |
| 172 int64 next_timestamp_; | 176 int64 next_timestamp_; |
| 173 bool is_screencast_; | 177 bool is_screencast_; |
| 174 webrtc::VideoRotation rotation_; | 178 webrtc::VideoRotation rotation_; |
| 175 }; | 179 }; |
| 176 | 180 |
| 177 } // namespace cricket | 181 } // namespace cricket |
| 178 | 182 |
| 179 #endif // TALK_MEDIA_BASE_FAKEVIDEOCAPTURER_H_ | 183 #endif // TALK_MEDIA_BASE_FAKEVIDEOCAPTURER_H_ |
| OLD | NEW |