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

Side by Side Diff: third_party/WebKit/public/platform/WebMediaStreamTrack.h

Issue 2664673002: Media Capture Depth Stream Extensions API: videoKind settings and constraint. (Closed)
Patch Set: GetVideoKindForFormat moved to utility. thanks guidou@. Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/public/platform/WebMediaConstraints.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 26 matching lines...) Expand all
37 class WebAudioSourceProvider; 37 class WebAudioSourceProvider;
38 class WebMediaStream; 38 class WebMediaStream;
39 class WebMediaStreamSource; 39 class WebMediaStreamSource;
40 class WebString; 40 class WebString;
41 41
42 class WebMediaStreamTrack { 42 class WebMediaStreamTrack {
43 public: 43 public:
44 enum class FacingMode { None, User, Environment, Left, Right }; 44 enum class FacingMode { None, User, Environment, Left, Right };
45 45
46 struct Settings { 46 struct Settings {
47 bool hasFrameRate() { return frameRate >= 0.0; } 47 bool hasFrameRate() const { return frameRate >= 0.0; }
48 bool hasWidth() { return width >= 0; } 48 bool hasWidth() const { return width >= 0; }
49 bool hasHeight() { return height >= 0; } 49 bool hasHeight() const { return height >= 0; }
50 bool hasFacingMode() { return facingMode != FacingMode::None; } 50 bool hasFacingMode() const { return facingMode != FacingMode::None; }
51 bool hasFocalLengthX() { return focalLengthX >= 0.0; } 51 bool hasVideoKind() const { return !videoKind.isNull(); }
52 bool hasFocalLengthY() { return focalLengthY >= 0.0; } 52 bool hasFocalLengthX() const { return focalLengthX >= 0.0; }
53 bool hasDepthNear() { return depthNear >= 0.0; } 53 bool hasFocalLengthY() const { return focalLengthY >= 0.0; }
54 bool hasDepthFar() { return depthFar >= 0.0; } 54 bool hasDepthNear() const { return depthNear >= 0.0; }
55 bool hasDepthFar() const { return depthFar >= 0.0; }
55 // The variables are read from 56 // The variables are read from
56 // MediaStreamTrack::GetSettings only. 57 // MediaStreamTrack::GetSettings only.
57 double frameRate = -1.0; 58 double frameRate = -1.0;
58 long width = -1; 59 long width = -1;
59 long height = -1; 60 long height = -1;
60 WebString deviceId; 61 WebString deviceId;
61 FacingMode facingMode = FacingMode::None; 62 FacingMode facingMode = FacingMode::None;
62 // Media Capture Depth Stream Extensions. 63 // Media Capture Depth Stream Extensions.
64 WebString videoKind;
63 double focalLengthX = -1.0; 65 double focalLengthX = -1.0;
64 double focalLengthY = -1.0; 66 double focalLengthY = -1.0;
65 double depthNear = -1.0; 67 double depthNear = -1.0;
66 double depthFar = -1.0; 68 double depthFar = -1.0;
67 }; 69 };
68 70
69 class TrackData { 71 class TrackData {
70 public: 72 public:
71 TrackData() {} 73 TrackData() {}
72 virtual ~TrackData() {} 74 virtual ~TrackData() {}
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 BLINK_PLATFORM_EXPORT operator MediaStreamComponent*() const; 126 BLINK_PLATFORM_EXPORT operator MediaStreamComponent*() const;
125 #endif 127 #endif
126 128
127 private: 129 private:
128 WebPrivatePtr<MediaStreamComponent> m_private; 130 WebPrivatePtr<MediaStreamComponent> m_private;
129 }; 131 };
130 132
131 } // namespace blink 133 } // namespace blink
132 134
133 #endif // WebMediaStreamTrack_h 135 #endif // WebMediaStreamTrack_h
OLDNEW
« no previous file with comments | « third_party/WebKit/public/platform/WebMediaConstraints.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698