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 7192007: Adding error signalling from device to VideocaptureManager to relay up to MediaStream and WebKit. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Adding the gyp-files. Created 9 years, 6 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
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_
6 #define CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_
7
8 #include <string>
9 #include <vector>
10
11 namespace media_stream {
12
13 // StreamOptions is a Chromium representation of WebKits
Leandro Graciá Gil 2011/06/21 18:00:26 WebKit's
mflodman1 2011/06/21 19:23:51 Done.
14 // WebGenerateStreamOptionFlags. It describes the components in a request for a
15 // new media stream.
16 struct StreamOptions {
17 enum VideoOption {
18 kNoCamera = 0,
19 kFacingUser,
20 kFacingEnvironment,
21 kFacingBoth
22 };
23
24 StreamOptions() : audio(false), video_option(kNoCamera) {}
25 StreamOptions(bool audio, VideoOption option)
26 : audio(audio), video_option(option) {}
27
28 // True if the stream shall contain an audio input stream.
29 bool audio;
30
31 // Describes if a / which type of video capture device is requested.
32 VideoOption video_option;
33 };
34
35 // Type of media stream.
36 enum MediaStreamType {
37 kNoService = 0,
38 kAudioCapture,
39 kVideoCapture
40 };
41
42 // StreamDeviceInfo describes information about a device.
43 struct StreamDeviceInfo {
44 StreamDeviceInfo();
45 StreamDeviceInfo(MediaStreamType service_param,
46 const std::string& name_param,
47 const std::string& device_param,
48 bool opened);
49
50 enum { kNoId = -1 };
51
52 // Describes the capture type.
53 MediaStreamType stream_type;
54 // Friendly name of the device.
55 std::string name;
56 // Unique name of a device. Even if there are multiple devices with the same
57 // friendly name connected to the computer, this will be unique.
58 std::string device_id;
59 // Set to true if the device has been opened, false otherwise.
60 bool in_use;
61 // Id for this capture session. Unique for all sessions of the same type.
62 int session_id;
63 };
64
65 typedef std::vector<StreamDeviceInfo> StreamDeviceInfoArray;
66
67 } // namespace media_stream
68
69 #endif // CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698