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

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

Issue 10928043: Media Related changes for TabCapture API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename REQUEST_*->MEDIA_REQUEST_* Created 8 years, 2 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 | Annotate | Revision Log
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 // MediaStreamConstraint keys for constraints that are passed to getUserMedia.
17 CONTENT_EXPORT extern const char kMediaStreamSource[];
18 CONTENT_EXPORT extern const char kMediaStreamSourceId[];
19 CONTENT_EXPORT extern const char kMediaStreamSourceTab[];
20
16 typedef content::MediaStreamDeviceType MediaStreamType; 21 typedef content::MediaStreamDeviceType MediaStreamType;
17 22
18 // StreamOptions is a Chromium representation of WebKit's 23 // StreamOptions is a Chromium representation of WebKit's
19 // WebUserMediaRequest Options. It describes the components 24 // WebUserMediaRequest Options. It describes the components
20 // in a request for a new media stream. 25 // in a request for a new media stream.
21 struct CONTENT_EXPORT StreamOptions { 26 struct CONTENT_EXPORT StreamOptions {
22 StreamOptions(); 27 StreamOptions();
23 // TODO(miu): Remove the 2-bools ctor in later clean-up CL. 28 // TODO(miu): Remove the 2-bools ctor in later clean-up CL.
24 StreamOptions(bool user_audio, bool user_video); 29 StreamOptions(bool user_audio, bool user_video);
25 StreamOptions(MediaStreamType audio_type, MediaStreamType video_type); 30 StreamOptions(MediaStreamType audio_type, MediaStreamType video_type);
26 31
27 // If not NO_SERVICE, the stream shall contain an audio input stream. 32 // If not NO_SERVICE, the stream shall contain an audio input stream.
28 MediaStreamType audio_type; 33 MediaStreamType audio_type;
34 std::string audio_device_id;
29 35
30 // If not NO_SERVICE, the stream shall contain a video input stream. 36 // If not NO_SERVICE, the stream shall contain a video input stream.
31 MediaStreamType video_type; 37 MediaStreamType video_type;
38 std::string video_device_id;
32 }; 39 };
33 40
34 // StreamDeviceInfo describes information about a device. 41 // StreamDeviceInfo describes information about a device.
35 struct CONTENT_EXPORT StreamDeviceInfo { 42 struct CONTENT_EXPORT StreamDeviceInfo {
36 static const int kNoId; 43 static const int kNoId;
37 44
38 StreamDeviceInfo(); 45 StreamDeviceInfo();
39 StreamDeviceInfo(MediaStreamType service_param, 46 StreamDeviceInfo(MediaStreamType service_param,
40 const std::string& name_param, 47 const std::string& name_param,
41 const std::string& device_param, 48 const std::string& device_param,
(...skipping 12 matching lines...) Expand all
54 bool in_use; 61 bool in_use;
55 // Id for this capture session. Unique for all sessions of the same type. 62 // Id for this capture session. Unique for all sessions of the same type.
56 int session_id; 63 int session_id;
57 }; 64 };
58 65
59 typedef std::vector<StreamDeviceInfo> StreamDeviceInfoArray; 66 typedef std::vector<StreamDeviceInfo> StreamDeviceInfoArray;
60 67
61 } // namespace media_stream 68 } // namespace media_stream
62 69
63 #endif // CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ 70 #endif // CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698