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

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

Issue 308813002: Mac Video Capture: Connect error logging to WebRTC Log (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: grunell@ second round of comments. Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
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 // MacOSX implementation of generic VideoCaptureDevice, using either QTKit or 5 // MacOSX implementation of generic VideoCaptureDevice, using either QTKit or
6 // AVFoundation as native capture API. QTKit is available in all OSX versions, 6 // AVFoundation as native capture API. QTKit is available in all OSX versions,
7 // although namely deprecated in 10.9, and AVFoundation is available in versions 7 // although namely deprecated in 10.9, and AVFoundation is available in versions
8 // 10.7 (Lion) and later. 8 // 10.7 (Lion) and later.
9 9
10 #ifndef MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ 10 #ifndef MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 void ReceiveFrame(const uint8* video_frame, 45 void ReceiveFrame(const uint8* video_frame,
46 int video_frame_length, 46 int video_frame_length,
47 const VideoCaptureFormat& frame_format, 47 const VideoCaptureFormat& frame_format,
48 int aspect_numerator, 48 int aspect_numerator,
49 int aspect_denominator); 49 int aspect_denominator);
50 50
51 void ReceiveError(const std::string& reason); 51 void ReceiveError(const std::string& reason);
52 52
53 private: 53 private:
54 void SetErrorState(const std::string& reason); 54 void SetErrorState(const std::string& reason);
55 void LogMessage(const std::string& message);
55 bool UpdateCaptureResolution(); 56 bool UpdateCaptureResolution();
56 57
57 // Flag indicating the internal state. 58 // Flag indicating the internal state.
58 enum InternalState { 59 enum InternalState {
59 kNotInitialized, 60 kNotInitialized,
60 kIdle, 61 kIdle,
61 kCapturing, 62 kCapturing,
62 kError 63 kError
63 }; 64 };
64 65
(...skipping 18 matching lines...) Expand all
83 // VideoCaptureDeviceMac is destroyed. 84 // VideoCaptureDeviceMac is destroyed.
84 // NOTE: Weak pointers must be invalidated before all other member variables. 85 // NOTE: Weak pointers must be invalidated before all other member variables.
85 base::WeakPtrFactory<VideoCaptureDeviceMac> weak_factory_; 86 base::WeakPtrFactory<VideoCaptureDeviceMac> weak_factory_;
86 87
87 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceMac); 88 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceMac);
88 }; 89 };
89 90
90 } // namespace media 91 } // namespace media
91 92
92 #endif // MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_ 93 #endif // MEDIA_VIDEO_CAPTURE_MAC_VIDEO_CAPTURE_DEVICE_MAC_H_
OLDNEW
« no previous file with comments | « media/video/capture/mac/video_capture_device_avfoundation_mac.mm ('k') | media/video/capture/mac/video_capture_device_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698