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

Unified Diff: content/public/common/media_stream_request.cc

Issue 2609863004: Pass camera facing to WebKit (Closed)
Patch Set: change comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/common/media_stream_request.h ('k') | content/renderer/media/media_stream_video_track.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/media_stream_request.cc
diff --git a/content/public/common/media_stream_request.cc b/content/public/common/media_stream_request.cc
index 42db0e145c81801deb8660c0c279833164199c63..8512aad59eca64b656e7faf96cda2b079deb5017 100644
--- a/content/public/common/media_stream_request.cc
+++ b/content/public/common/media_stream_request.cc
@@ -29,19 +29,20 @@ bool IsScreenCaptureMediaType(MediaStreamType type) {
}
MediaStreamDevice::MediaStreamDevice()
- : type(MEDIA_NO_SERVICE),
- video_facing(MEDIA_VIDEO_FACING_NONE) {
-}
+ : type(MEDIA_NO_SERVICE), video_facing(media::MEDIA_VIDEO_FACING_NONE) {}
MediaStreamDevice::MediaStreamDevice(MediaStreamType type,
const std::string& id,
const std::string& name)
- : type(type), id(id), video_facing(MEDIA_VIDEO_FACING_NONE), name(name) {
+ : type(type),
+ id(id),
+ video_facing(media::MEDIA_VIDEO_FACING_NONE),
+ name(name) {
#if defined(OS_ANDROID)
if (name.find("front") != std::string::npos) {
- video_facing = MEDIA_VIDEO_FACING_USER;
+ video_facing = media::MEDIA_VIDEO_FACING_USER;
} else if (name.find("back") != std::string::npos) {
- video_facing = MEDIA_VIDEO_FACING_ENVIRONMENT;
+ video_facing = media::MEDIA_VIDEO_FACING_ENVIRONMENT;
}
#endif
}
@@ -49,12 +50,18 @@ MediaStreamDevice::MediaStreamDevice(MediaStreamType type,
MediaStreamDevice::MediaStreamDevice(MediaStreamType type,
const std::string& id,
const std::string& name,
+ media::VideoFacingMode facing)
+ : type(type), id(id), video_facing(facing), name(name) {}
+
+MediaStreamDevice::MediaStreamDevice(MediaStreamType type,
+ const std::string& id,
+ const std::string& name,
int sample_rate,
int channel_layout,
int frames_per_buffer)
: type(type),
id(id),
- video_facing(MEDIA_VIDEO_FACING_NONE),
+ video_facing(media::MEDIA_VIDEO_FACING_NONE),
name(name),
input(sample_rate, channel_layout, frames_per_buffer) {}
« no previous file with comments | « content/public/common/media_stream_request.h ('k') | content/renderer/media/media_stream_video_track.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698