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

Side by Side Diff: content/common/media/media_stream_options.h

Issue 10177008: Shift media_stream::StreamOptions to align with the new getUserMedia spec (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 8 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ 5 #ifndef CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_
6 #define CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ 6 #define CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "content/public/common/media_stream_request.h" 12 #include "content/public/common/media_stream_request.h"
13 13
14 namespace media_stream { 14 namespace media_stream {
15 15
16 // StreamOptions is a Chromium representation of WebKit's 16 // StreamOptions is a Chromium representation of WebKit's
17 // WebGenerateStreamOptionFlags. It describes the components in a request for a 17 // WebUserMediaRequest Options. It describes the components
18 // new media stream. 18 // in a request for a new media stream.
19 struct CONTENT_EXPORT StreamOptions { 19 struct CONTENT_EXPORT StreamOptions {
20 enum VideoOption { 20 StreamOptions() : audio(false), video(false) {}
21 kNoCamera = 0, 21 StreamOptions(bool audio, bool video)
22 kFacingUser, 22 : audio(audio), video(video) {}
23 kFacingEnvironment,
24 kFacingBoth
25 };
26
27 StreamOptions() : audio(false), video_option(kNoCamera) {}
28 StreamOptions(bool audio, VideoOption option)
29 : audio(audio), video_option(option) {}
30 23
31 // True if the stream shall contain an audio input stream. 24 // True if the stream shall contain an audio input stream.
32 bool audio; 25 bool audio;
33 26
34 // Describes if a / which type of video capture device is requested. 27 // True if the stream shall contain a video input stream.
35 VideoOption video_option; 28 bool video;
36 }; 29 };
37 30
38 typedef content::MediaStreamDeviceType MediaStreamType; 31 typedef content::MediaStreamDeviceType MediaStreamType;
39 32
40 // StreamDeviceInfo describes information about a device. 33 // StreamDeviceInfo describes information about a device.
41 struct CONTENT_EXPORT StreamDeviceInfo { 34 struct CONTENT_EXPORT StreamDeviceInfo {
42 static const int kNoId; 35 static const int kNoId;
43 36
44 StreamDeviceInfo(); 37 StreamDeviceInfo();
45 StreamDeviceInfo(MediaStreamType service_param, 38 StreamDeviceInfo(MediaStreamType service_param,
(...skipping 12 matching lines...) Expand all
58 bool in_use; 51 bool in_use;
59 // Id for this capture session. Unique for all sessions of the same type. 52 // Id for this capture session. Unique for all sessions of the same type.
60 int session_id; 53 int session_id;
61 }; 54 };
62 55
63 typedef std::vector<StreamDeviceInfo> StreamDeviceInfoArray; 56 typedef std::vector<StreamDeviceInfo> StreamDeviceInfoArray;
64 57
65 } // namespace media_stream 58 } // namespace media_stream
66 59
67 #endif // CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ 60 #endif // CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_
OLDNEW
« no previous file with comments | « content/common/media/media_stream_messages.h ('k') | content/renderer/media/media_stream_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698