Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: media/video/capture/mac/video_capture_device_decklink_mac.h

Issue 655713003: Standardize usage of virtual/override/final in media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_DECKLINK_MAC_H_ 8 #ifndef MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_DECKLINK_MAC_H_
9 #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_DECKLINK_MAC_H_ 9 #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_DECKLINK_MAC_H_
10 10
(...skipping 23 matching lines...) Expand all
34 static void EnumerateDevices(VideoCaptureDevice::Names* device_names); 34 static void EnumerateDevices(VideoCaptureDevice::Names* device_names);
35 35
36 // Gets the supported formats of a particular device attached to the system, 36 // Gets the supported formats of a particular device attached to the system,
37 // identified by |device|. Formats are retrieved from the DeckLink SDK. 37 // identified by |device|. Formats are retrieved from the DeckLink SDK.
38 // Following the enumeration, each camera will have only one capability. 38 // Following the enumeration, each camera will have only one capability.
39 static void EnumerateDeviceCapabilities( 39 static void EnumerateDeviceCapabilities(
40 const VideoCaptureDevice::Name& device, 40 const VideoCaptureDevice::Name& device,
41 VideoCaptureFormats* supported_formats); 41 VideoCaptureFormats* supported_formats);
42 42
43 explicit VideoCaptureDeviceDeckLinkMac(const Name& device_name); 43 explicit VideoCaptureDeviceDeckLinkMac(const Name& device_name);
44 virtual ~VideoCaptureDeviceDeckLinkMac(); 44 ~VideoCaptureDeviceDeckLinkMac() override;
45 45
46 // Copy of VideoCaptureDevice::Client::OnIncomingCapturedData(). Used by 46 // Copy of VideoCaptureDevice::Client::OnIncomingCapturedData(). Used by
47 // |decklink_capture_delegate_| to forward captured frames. 47 // |decklink_capture_delegate_| to forward captured frames.
48 void OnIncomingCapturedData(const uint8* data, 48 void OnIncomingCapturedData(const uint8* data,
49 size_t length, 49 size_t length,
50 const VideoCaptureFormat& frame_format, 50 const VideoCaptureFormat& frame_format,
51 int rotation, // Clockwise. 51 int rotation, // Clockwise.
52 base::TimeTicks timestamp); 52 base::TimeTicks timestamp);
53 53
54 // Forwarder to VideoCaptureDevice::Client::OnError(). 54 // Forwarder to VideoCaptureDevice::Client::OnError().
55 void SendErrorString(const std::string& reason); 55 void SendErrorString(const std::string& reason);
56 56
57 // Forwarder to VideoCaptureDevice::Client::OnLog(). 57 // Forwarder to VideoCaptureDevice::Client::OnLog().
58 void SendLogString(const std::string& message); 58 void SendLogString(const std::string& message);
59 59
60 private: 60 private:
61 // VideoCaptureDevice implementation. 61 // VideoCaptureDevice implementation.
62 virtual void AllocateAndStart( 62 void AllocateAndStart(const VideoCaptureParams& params,
63 const VideoCaptureParams& params, 63 scoped_ptr<VideoCaptureDevice::Client> client) override;
64 scoped_ptr<VideoCaptureDevice::Client> client) override; 64 void StopAndDeAllocate() override;
65 virtual void StopAndDeAllocate() override;
66 65
67 // Protects concurrent setting and using of |client_|. 66 // Protects concurrent setting and using of |client_|.
68 base::Lock lock_; 67 base::Lock lock_;
69 scoped_ptr<VideoCaptureDevice::Client> client_; 68 scoped_ptr<VideoCaptureDevice::Client> client_;
70 69
71 // Reference counted handle to the DeckLink capture delegate, ref counted by 70 // Reference counted handle to the DeckLink capture delegate, ref counted by
72 // the DeckLink SDK as well. 71 // the DeckLink SDK as well.
73 scoped_refptr<DeckLinkCaptureDelegate> decklink_capture_delegate_; 72 scoped_refptr<DeckLinkCaptureDelegate> decklink_capture_delegate_;
74 73
75 // Checks for Device (a.k.a. Audio) thread. 74 // Checks for Device (a.k.a. Audio) thread.
76 base::ThreadChecker thread_checker_; 75 base::ThreadChecker thread_checker_;
77 76
78 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceDeckLinkMac); 77 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceDeckLinkMac);
79 }; 78 };
80 79
81 } // namespace media 80 } // namespace media
82 81
83 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_DECKLINK_MAC_H_ 82 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_DECKLINK_MAC_H_
OLDNEW
« no previous file with comments | « media/video/capture/file_video_capture_device_factory.h ('k') | media/video/capture/mac/video_capture_device_decklink_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698