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 "media/capture/video/win/sink_input_pin_win.h" | 5 #include "media/capture/video/win/sink_input_pin_win.h" |
6 | 6 |
7 #include <cstring> | 7 #include <cstring> |
8 | 8 |
9 // Avoid including strsafe.h via dshow as it will cause build warnings. | 9 // Avoid including strsafe.h via dshow as it will cause build warnings. |
10 #define NO_DSHOW_STRSAFE | 10 #define NO_DSHOW_STRSAFE |
11 #include <dshow.h> | 11 #include <dshow.h> |
| 12 #include <stdint.h> |
12 | 13 |
13 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/macros.h" |
14 | 16 |
15 namespace media { | 17 namespace media { |
16 | 18 |
17 const REFERENCE_TIME kSecondsToReferenceTime = 10000000; | 19 const REFERENCE_TIME kSecondsToReferenceTime = 10000000; |
18 | 20 |
19 static DWORD GetArea(const BITMAPINFOHEADER& info_header) { | 21 static DWORD GetArea(const BITMAPINFOHEADER& info_header) { |
20 return info_header.biWidth * info_header.biHeight; | 22 return info_header.biWidth * info_header.biHeight; |
21 } | 23 } |
22 | 24 |
23 SinkInputPin::SinkInputPin(IBaseFilter* filter, SinkFilterObserver* observer) | 25 SinkInputPin::SinkInputPin(IBaseFilter* filter, SinkFilterObserver* observer) |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 | 211 |
210 | 212 |
211 observer_->FrameReceived(buffer, length, timestamp); | 213 observer_->FrameReceived(buffer, length, timestamp); |
212 return S_OK; | 214 return S_OK; |
213 } | 215 } |
214 | 216 |
215 SinkInputPin::~SinkInputPin() { | 217 SinkInputPin::~SinkInputPin() { |
216 } | 218 } |
217 | 219 |
218 } // namespace media | 220 } // namespace media |
OLD | NEW |