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

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

Issue 2609863004: Pass camera facing to WebKit (Closed)
Patch Set: modify settings names Created 3 years, 11 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 /* 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 24 matching lines...) Expand all
35 class MediaStreamComponent; 35 class MediaStreamComponent;
36 class MediaStreamTrack; 36 class MediaStreamTrack;
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 struct Settings { 44 struct Settings {
45 enum VideoFacingMode { User, Environment, Left, Right };
45 bool hasFrameRate() { return frameRate >= 0.0; } 46 bool hasFrameRate() { return frameRate >= 0.0; }
46 bool hasWidth() { return width >= 0; } 47 bool hasWidth() { return width >= 0; }
47 bool hasHeight() { return height >= 0; } 48 bool hasHeight() { return height >= 0; }
48 // The variables are read from 49 // The variables are read from
49 // MediaStreamTrack::GetSettings only. 50 // MediaStreamTrack::GetSettings only.
50 double frameRate = -1.0; 51 double frameRate = -1.0;
51 long width = -1; 52 long width = -1;
52 long height = -1; 53 long height = -1;
53 WebString deviceId; 54 WebString deviceId;
55 VideoFacingMode facingMode = VideoFacingMode::User;
mcasas 2017/01/05 20:26:37 WebMediaStreamTrack applies to non-video tracks (c
shenghao 2017/01/06 09:43:01 Done.
54 }; 56 };
55 57
56 class TrackData { 58 class TrackData {
57 public: 59 public:
58 TrackData() {} 60 TrackData() {}
59 virtual ~TrackData() {} 61 virtual ~TrackData() {}
60 virtual void getSettings(Settings&) = 0; 62 virtual void getSettings(Settings&) = 0;
61 }; 63 };
62 64
63 enum class ContentHintType { 65 enum class ContentHintType {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 BLINK_PLATFORM_EXPORT operator MediaStreamComponent*() const; 113 BLINK_PLATFORM_EXPORT operator MediaStreamComponent*() const;
112 #endif 114 #endif
113 115
114 private: 116 private:
115 WebPrivatePtr<MediaStreamComponent> m_private; 117 WebPrivatePtr<MediaStreamComponent> m_private;
116 }; 118 };
117 119
118 } // namespace blink 120 } // namespace blink
119 121
120 #endif // WebMediaStreamTrack_h 122 #endif // WebMediaStreamTrack_h
OLDNEW
« media/capture/video_capturer_source.h ('K') | « media/capture/video_capturer_source.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698