blob: e5127ed376e6a0da0bdb618e98d6514db901d5f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_
#define CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_
#include <string>
#include <vector>
#include "content/common/content_export.h"
#include "content/public/common/media_stream_request.h"
namespace media_stream {
// StreamOptions is a Chromium representation of WebKit's
// WebUserMediaRequest Options. It describes the components
// in a request for a new media stream.
struct CONTENT_EXPORT StreamOptions {
StreamOptions() : audio(false), video(false) {}
StreamOptions(bool audio, bool video)
: audio(audio), video(video) {}
// True if the stream shall contain an audio input stream.
bool audio;
// True if the stream shall contain a video input stream.
bool video;
};
typedef content::MediaStreamDeviceType MediaStreamType;
// StreamDeviceInfo describes information about a device.
struct CONTENT_EXPORT StreamDeviceInfo {
static const int kNoId;
StreamDeviceInfo();
StreamDeviceInfo(MediaStreamType service_param,
const std::string& name_param,
const std::string& device_param,
bool opened);
// Describes the capture type.
MediaStreamType stream_type;
// Friendly name of the device.
std::string name;
// Unique name of a device. Even if there are multiple devices with the same
// friendly name connected to the computer, this will be unique.
std::string device_id;
// Set to true if the device has been opened, false otherwise.
bool in_use;
// Id for this capture session. Unique for all sessions of the same type.
int session_id;
};
typedef std::vector<StreamDeviceInfo> StreamDeviceInfoArray;
} // namespace media_stream
#endif // CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_
|