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 #ifndef MEDIA_BASE_VIDEO_CAPTURE_TYPES_H_ | 5 #ifndef MEDIA_BASE_VIDEO_CAPTURE_TYPES_H_ |
6 #define MEDIA_BASE_VIDEO_CAPTURE_TYPES_H_ | 6 #define MEDIA_BASE_VIDEO_CAPTURE_TYPES_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 // Checks that all values are in the expected range. All limits are specified | 74 // Checks that all values are in the expected range. All limits are specified |
75 // in media::Limits. | 75 // in media::Limits. |
76 bool IsValid() const; | 76 bool IsValid() const; |
77 | 77 |
78 gfx::Size frame_size; | 78 gfx::Size frame_size; |
79 float frame_rate; | 79 float frame_rate; |
80 VideoPixelFormat pixel_format; | 80 VideoPixelFormat pixel_format; |
81 }; | 81 }; |
82 | 82 |
83 // Image capture format specification. | |
84 // This class is used by the video capture device to specify the format of a | |
85 // still image captured and returned to a client. A list of these is also | |
86 // provided when client queries supported formats for still image capture. | |
87 class MEDIA_EXPORT ImageCaptureFormat { | |
88 public: | |
89 ImageCaptureFormat(); | |
90 | |
91 ImageCaptureFormat(const gfx::Size& frame_size, | |
92 VideoPixelFormat pixel_format); | |
93 | |
94 gfx::Size frame_size; | |
95 VideoPixelFormat pixel_format; | |
96 }; | |
97 | |
98 typedef std::vector<VideoCaptureFormat> VideoCaptureFormats; | 83 typedef std::vector<VideoCaptureFormat> VideoCaptureFormats; |
99 | 84 |
100 typedef std::vector<ImageCaptureFormat> ImageCaptureFormats; | |
101 | |
102 // Parameters for starting video capture. | 85 // Parameters for starting video capture. |
103 // This class is used by the client of a video capture device to specify the | 86 // This class is used by the client of a video capture device to specify the |
104 // format of frames in which the client would like to have captured frames | 87 // format of frames in which the client would like to have captured frames |
105 // returned. | 88 // returned. |
106 class MEDIA_EXPORT VideoCaptureParams { | 89 class MEDIA_EXPORT VideoCaptureParams { |
107 public: | 90 public: |
108 VideoCaptureParams(); | 91 VideoCaptureParams(); |
109 | 92 |
110 // Requests a resolution and format at which the capture will occur. | 93 // Requests a resolution and format at which the capture will occur. |
111 VideoCaptureFormat requested_format; | 94 VideoCaptureFormat requested_format; |
112 | 95 |
113 // Policy for resolution change. | 96 // Policy for resolution change. |
114 ResolutionChangePolicy resolution_change_policy; | 97 ResolutionChangePolicy resolution_change_policy; |
115 }; | 98 }; |
116 | 99 |
117 } // namespace media | 100 } // namespace media |
118 | 101 |
119 #endif // MEDIA_BASE_VIDEO_CAPTURE_TYPES_H_ | 102 #endif // MEDIA_BASE_VIDEO_CAPTURE_TYPES_H_ |
OLD | NEW |