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 // Implementation of VideoCaptureDevice class for Blackmagic video capture | 5 // Implementation of VideoCaptureDevice class for Blackmagic video capture |
6 // devices by using the DeckLink SDK. | 6 // devices by using the DeckLink SDK. |
7 | 7 |
8 #ifndef MEDIA_CAPTURE_VIDEO_MAC_VIDEO_CAPTURE_DEVICE_DECKLINK_MAC_H_ | 8 #ifndef MEDIA_CAPTURE_VIDEO_MAC_VIDEO_CAPTURE_DEVICE_DECKLINK_MAC_H_ |
9 #define MEDIA_CAPTURE_VIDEO_MAC_VIDEO_CAPTURE_DEVICE_DECKLINK_MAC_H_ | 9 #define MEDIA_CAPTURE_VIDEO_MAC_VIDEO_CAPTURE_DEVICE_DECKLINK_MAC_H_ |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 base::TimeTicks reference_time, | 61 base::TimeTicks reference_time, |
62 base::TimeDelta timestamp); | 62 base::TimeDelta timestamp); |
63 | 63 |
64 // Forwarder to VideoCaptureDevice::Client::OnError(). | 64 // Forwarder to VideoCaptureDevice::Client::OnError(). |
65 void SendErrorString(const tracked_objects::Location& from_here, | 65 void SendErrorString(const tracked_objects::Location& from_here, |
66 const std::string& reason); | 66 const std::string& reason); |
67 | 67 |
68 // Forwarder to VideoCaptureDevice::Client::OnLog(). | 68 // Forwarder to VideoCaptureDevice::Client::OnLog(). |
69 void SendLogString(const std::string& message); | 69 void SendLogString(const std::string& message); |
70 | 70 |
| 71 // Forwarder to VideoCaptureDevice::Client::OnStarted(). |
| 72 void ReportStarted(); |
| 73 |
71 private: | 74 private: |
72 // VideoCaptureDevice implementation. | 75 // VideoCaptureDevice implementation. |
73 void AllocateAndStart( | 76 void AllocateAndStart( |
74 const VideoCaptureParams& params, | 77 const VideoCaptureParams& params, |
75 std::unique_ptr<VideoCaptureDevice::Client> client) override; | 78 std::unique_ptr<VideoCaptureDevice::Client> client) override; |
76 void StopAndDeAllocate() override; | 79 void StopAndDeAllocate() override; |
77 | 80 |
78 // Protects concurrent setting and using of |client_|. | 81 // Protects concurrent setting and using of |client_|. |
79 base::Lock lock_; | 82 base::Lock lock_; |
80 std::unique_ptr<VideoCaptureDevice::Client> client_; | 83 std::unique_ptr<VideoCaptureDevice::Client> client_; |
81 | 84 |
82 // Reference counted handle to the DeckLink capture delegate, ref counted by | 85 // Reference counted handle to the DeckLink capture delegate, ref counted by |
83 // the DeckLink SDK as well. | 86 // the DeckLink SDK as well. |
84 scoped_refptr<DeckLinkCaptureDelegate> decklink_capture_delegate_; | 87 scoped_refptr<DeckLinkCaptureDelegate> decklink_capture_delegate_; |
85 | 88 |
86 // Checks for Device (a.k.a. Audio) thread. | 89 // Checks for Device (a.k.a. Audio) thread. |
87 base::ThreadChecker thread_checker_; | 90 base::ThreadChecker thread_checker_; |
88 | 91 |
89 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceDeckLinkMac); | 92 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceDeckLinkMac); |
90 }; | 93 }; |
91 | 94 |
92 } // namespace media | 95 } // namespace media |
93 | 96 |
94 #endif // MEDIA_CAPTURE_VIDEO_MAC_VIDEO_CAPTURE_DEVICE_DECKLINK_MAC_H_ | 97 #endif // MEDIA_CAPTURE_VIDEO_MAC_VIDEO_CAPTURE_DEVICE_DECKLINK_MAC_H_ |
OLD | NEW |