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 #ifndef CONTENT_RENDERER_MEDIA_VIDEO_TRACK_ADAPTER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_VIDEO_TRACK_ADAPTER_H_ |
6 #define CONTENT_RENDERER_MEDIA_VIDEO_TRACK_ADAPTER_H_ | 6 #define CONTENT_RENDERER_MEDIA_VIDEO_TRACK_ADAPTER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 16 matching lines...) Expand all Loading... |
27 double min_aspect_ratio, | 27 double min_aspect_ratio, |
28 double max_aspect_ratio, | 28 double max_aspect_ratio, |
29 double max_frame_rate, | 29 double max_frame_rate, |
30 const base::Optional<gfx::Size>& expected_native_resolution); | 30 const base::Optional<gfx::Size>& expected_native_resolution); |
31 VideoTrackAdapterSettings(const VideoTrackAdapterSettings& other); | 31 VideoTrackAdapterSettings(const VideoTrackAdapterSettings& other); |
32 VideoTrackAdapterSettings& operator=(const VideoTrackAdapterSettings& other); | 32 VideoTrackAdapterSettings& operator=(const VideoTrackAdapterSettings& other); |
33 int max_width; | 33 int max_width; |
34 int max_height; | 34 int max_height; |
35 double min_aspect_ratio; | 35 double min_aspect_ratio; |
36 double max_aspect_ratio; | 36 double max_aspect_ratio; |
| 37 // A |max_frame_rate| of zero is used to signal that no frame-rate adjustment |
| 38 // is necessary. |
| 39 // TODO(guidou): Change this to base::Optional. http://crbug.com/734528 |
37 double max_frame_rate; | 40 double max_frame_rate; |
38 // If supplied, this can be used to detect frames from a rotated device. | 41 // If supplied, this can be used to detect frames from a rotated device. |
39 base::Optional<gfx::Size> expected_native_size; | 42 base::Optional<gfx::Size> expected_native_size; |
40 }; | 43 }; |
41 | 44 |
42 // VideoTrackAdapter is a helper class used by MediaStreamVideoSource used for | 45 // VideoTrackAdapter is a helper class used by MediaStreamVideoSource used for |
43 // adapting the video resolution from a source implementation to the resolution | 46 // adapting the video resolution from a source implementation to the resolution |
44 // a track requires. Different tracks can have different resolution constraints. | 47 // a track requires. Different tracks can have different resolution constraints. |
45 // The constraints can be set as max width and height as well as max and min | 48 // The constraints can be set as max width and height as well as max and min |
46 // aspect ratio. | 49 // aspect ratio. |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 | 143 |
141 // Frame rate configured on the video source, accessed on the IO-thread. | 144 // Frame rate configured on the video source, accessed on the IO-thread. |
142 float source_frame_rate_; | 145 float source_frame_rate_; |
143 | 146 |
144 DISALLOW_COPY_AND_ASSIGN(VideoTrackAdapter); | 147 DISALLOW_COPY_AND_ASSIGN(VideoTrackAdapter); |
145 }; | 148 }; |
146 | 149 |
147 } // namespace content | 150 } // namespace content |
148 | 151 |
149 #endif // CONTENT_RENDERER_MEDIA_VIDEO_TRACK_ADAPTER_H_ | 152 #endif // CONTENT_RENDERER_MEDIA_VIDEO_TRACK_ADAPTER_H_ |
OLD | NEW |