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

Side by Side Diff: content/renderer/media/media_stream_video_source.cc

Issue 526173003: Change VideoTrackAdapter to not drop frames if the source frame rate is known. Also change remote v… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2125
Patch Set: Created 6 years, 3 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 #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
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
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
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_video_source.h ('k') | content/renderer/media/video_track_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698