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 #include "content/renderer/media/media_stream_video_source.h" | 5 #include "content/renderer/media/media_stream_video_source.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 MediaStreamVideoSource::kMinWidth, | 36 MediaStreamVideoSource::kMinWidth, |
37 MediaStreamVideoSource::kMaxHeight, | 37 MediaStreamVideoSource::kMaxHeight, |
38 MediaStreamVideoSource::kMinHeight, | 38 MediaStreamVideoSource::kMinHeight, |
39 MediaStreamVideoSource::kMaxFrameRate, | 39 MediaStreamVideoSource::kMaxFrameRate, |
40 MediaStreamVideoSource::kMinFrameRate, | 40 MediaStreamVideoSource::kMinFrameRate, |
41 }; | 41 }; |
42 | 42 |
43 const int MediaStreamVideoSource::kDefaultWidth = 640; | 43 const int MediaStreamVideoSource::kDefaultWidth = 640; |
44 const int MediaStreamVideoSource::kDefaultHeight = 480; | 44 const int MediaStreamVideoSource::kDefaultHeight = 480; |
45 const int MediaStreamVideoSource::kDefaultFrameRate = 30; | 45 const int MediaStreamVideoSource::kDefaultFrameRate = 30; |
| 46 const int MediaStreamVideoSource::kUnknownFrameRate = 0; |
46 | 47 |
47 namespace { | 48 namespace { |
48 | 49 |
49 // Google-specific key prefix. Constraints with this prefix are ignored if they | 50 // Google-specific key prefix. Constraints with this prefix are ignored if they |
50 // are unknown. | 51 // are unknown. |
51 const char kGooglePrefix[] = "goog"; | 52 const char kGooglePrefix[] = "goog"; |
52 | 53 |
53 // Returns true if |constraint| has mandatory constraints. | 54 // Returns true if |constraint| has mandatory constraints. |
54 bool HasMandatoryConstraints(const blink::WebMediaConstraints& constraints) { | 55 bool HasMandatoryConstraints(const blink::WebMediaConstraints& constraints) { |
55 blink::WebVector<blink::WebMediaConstraint> mandatory_constraints; | 56 blink::WebVector<blink::WebMediaConstraint> mandatory_constraints; |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 : track(track), | 627 : track(track), |
627 frame_callback(frame_callback), | 628 frame_callback(frame_callback), |
628 constraints(constraints), | 629 constraints(constraints), |
629 callback(callback) { | 630 callback(callback) { |
630 } | 631 } |
631 | 632 |
632 MediaStreamVideoSource::RequestedConstraints::~RequestedConstraints() { | 633 MediaStreamVideoSource::RequestedConstraints::~RequestedConstraints() { |
633 } | 634 } |
634 | 635 |
635 } // namespace content | 636 } // namespace content |
OLD | NEW |