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 #include "media/video/capture/mac/video_capture_device_decklink_mac.h" | 5 #include "media/video/capture/mac/video_capture_device_decklink_mac.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/strings/sys_string_conversions.h" |
9 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
10 #include "base/strings/sys_string_conversions.h" | |
11 #include "third_party/decklink/mac/include/DeckLinkAPI.h" | 11 #include "third_party/decklink/mac/include/DeckLinkAPI.h" |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 // DeckLink SDK uses ScopedComPtr-style APIs. Chrome ScopedComPtr is only | 15 // DeckLink SDK uses ScopedComPtr-style APIs. Chrome ScopedComPtr is only |
16 // available for Windows builds. This is a verbatim knock-off of the needed | 16 // available for Windows builds. This is a verbatim knock-off of the needed |
17 // parts of base::win::ScopedComPtr<> for ref counting. | 17 // parts of base::win::ScopedComPtr<> for ref counting. |
18 template <class T> | 18 template <class T> |
19 class ScopedDeckLinkPtr : public scoped_refptr<T> { | 19 class ScopedDeckLinkPtr : public scoped_refptr<T> { |
20 private: | 20 private: |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 if (decklink_capture_delegate_.get()) | 474 if (decklink_capture_delegate_.get()) |
475 decklink_capture_delegate_->AllocateAndStart(params); | 475 decklink_capture_delegate_->AllocateAndStart(params); |
476 } | 476 } |
477 | 477 |
478 void VideoCaptureDeviceDeckLinkMac::StopAndDeAllocate() { | 478 void VideoCaptureDeviceDeckLinkMac::StopAndDeAllocate() { |
479 if (decklink_capture_delegate_.get()) | 479 if (decklink_capture_delegate_.get()) |
480 decklink_capture_delegate_->StopAndDeAllocate(); | 480 decklink_capture_delegate_->StopAndDeAllocate(); |
481 } | 481 } |
482 | 482 |
483 } // namespace media | 483 } // namespace media |
OLD | NEW |