summaryrefslogtreecommitdiffstats
path: root/chromium/content/common/media
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-08 14:30:41 +0200
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-12 13:49:54 +0200
commitab0a50979b9eb4dfa3320eff7e187e41efedf7a9 (patch)
tree498dfb8a97ff3361a9f7486863a52bb4e26bb898 /chromium/content/common/media
parent4ce69f7403811819800e7c5ae1318b2647e778d1 (diff)
Update Chromium to beta version 37.0.2062.68
Change-Id: I188e3b5aff1bec75566014291b654eb19f5bc8ca Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'chromium/content/common/media')
-rw-r--r--chromium/content/common/media/OWNERS18
-rw-r--r--chromium/content/common/media/aec_dump_messages.h36
-rw-r--r--chromium/content/common/media/audio_messages.h10
-rw-r--r--chromium/content/common/media/cdm_messages.h70
-rw-r--r--chromium/content/common/media/cdm_messages_enums.h14
-rw-r--r--chromium/content/common/media/media_param_traits.cc5
-rw-r--r--chromium/content/common/media/media_player_messages_android.h121
-rw-r--r--chromium/content/common/media/media_player_messages_enums_android.h3
-rw-r--r--chromium/content/common/media/media_stream_messages.h23
-rw-r--r--chromium/content/common/media/media_stream_options.cc3
-rw-r--r--chromium/content/common/media/media_stream_options.h3
-rw-r--r--chromium/content/common/media/media_stream_track_metrics_host_messages.h19
-rw-r--r--chromium/content/common/media/midi_messages.h43
-rw-r--r--chromium/content/common/media/peer_connection_tracker_messages.h8
-rw-r--r--chromium/content/common/media/video_capture.h10
-rw-r--r--chromium/content/common/media/video_capture_messages.h44
16 files changed, 301 insertions, 129 deletions
diff --git a/chromium/content/common/media/OWNERS b/chromium/content/common/media/OWNERS
index 49ed0e11aaa..9314814ce29 100644
--- a/chromium/content/common/media/OWNERS
+++ b/chromium/content/common/media/OWNERS
@@ -1,7 +1,6 @@
acolwell@chromium.org
dalecurtis@chromium.org
ddorwin@chromium.org
-fischman@chromium.org
scherkus@chromium.org
shadi@chromium.org
tommi@chromium.org
@@ -11,10 +10,23 @@ xhwang@chromium.org
# For security review of IPC message files.
per-file *_messages*.h=set noparent
-per-file *_messages*.h=cdn@chromium.org
per-file *_messages*.h=cevans@chromium.org
+per-file *_messages*.h=dcheng@chromium.org
per-file *_messages*.h=inferno@chromium.org
+per-file *_messages*.h=jln@chromium.org
per-file *_messages*.h=jschuh@chromium.org
+per-file *_messages*.h=kenrb@chromium.org
+per-file *_messages*.h=nasko@chromium.org
per-file *_messages*.h=palmer@chromium.org
per-file *_messages*.h=tsepez@chromium.org
-per-file *_messages*.h=kenrb@chromium.org
+
+per-file *_param_traits.*=set noparent
+per-file *_param_traits.*=cevans@chromium.org
+per-file *_param_traits.*=dcheng@chromium.org
+per-file *_param_traits.*=inferno@chromium.org
+per-file *_param_traits.*=jln@chromium.org
+per-file *_param_traits.*=jschuh@chromium.org
+per-file *_param_traits.*=kenrb@chromium.org
+per-file *_param_traits.*=nasko@chromium.org
+per-file *_param_traits.*=palmer@chromium.org
+per-file *_param_traits.*=tsepez@chromium.org
diff --git a/chromium/content/common/media/aec_dump_messages.h b/chromium/content/common/media/aec_dump_messages.h
new file mode 100644
index 00000000000..0f98f272334
--- /dev/null
+++ b/chromium/content/common/media/aec_dump_messages.h
@@ -0,0 +1,36 @@
+// Copyright 2014 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.
+
+// IPC messages for the AEC dump.
+// Multiply-included message file, hence no include guard.
+
+#include "content/common/content_export.h"
+#include "ipc/ipc_message_macros.h"
+#include "ipc/ipc_platform_file.h"
+
+#undef IPC_MESSAGE_EXPORT
+#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
+#define IPC_MESSAGE_START AecDumpMsgStart
+
+// Messages sent from the browser to the renderer.
+
+// The browser hands over a file handle to the consumer in the renderer
+// identified by |id| to use for AEC dump.
+IPC_MESSAGE_CONTROL2(AecDumpMsg_EnableAecDump,
+ int /* id */,
+ IPC::PlatformFileForTransit /* file_handle */)
+
+// Tell the renderer to disable AEC dump in all consumers.
+IPC_MESSAGE_CONTROL0(AecDumpMsg_DisableAecDump)
+
+// Messages sent from the renderer to the browser.
+
+// Registers a consumer with the browser. The consumer will then get a file
+// handle when the dump is enabled.
+IPC_MESSAGE_CONTROL1(AecDumpMsg_RegisterAecDumpConsumer,
+ int /* id */)
+
+// Unregisters a consumer with the browser.
+IPC_MESSAGE_CONTROL1(AecDumpMsg_UnregisterAecDumpConsumer,
+ int /* id */)
diff --git a/chromium/content/common/media/audio_messages.h b/chromium/content/common/media/audio_messages.h
index 590d6c90cdb..3b9bc36ce6e 100644
--- a/chromium/content/common/media/audio_messages.h
+++ b/chromium/content/common/media/audio_messages.h
@@ -20,8 +20,11 @@
#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
#define IPC_MESSAGE_START AudioMsgStart
-IPC_ENUM_TRAITS(media::AudioInputIPCDelegate::State)
-IPC_ENUM_TRAITS(media::AudioOutputIPCDelegate::State)
+IPC_ENUM_TRAITS_MAX_VALUE(media::AudioInputIPCDelegate::State,
+ media::AudioInputIPCDelegate::kStateLast)
+
+IPC_ENUM_TRAITS_MAX_VALUE(media::AudioOutputIPCDelegate::State,
+ media::AudioOutputIPCDelegate::kStateLast)
IPC_STRUCT_BEGIN(AudioInputHostMsg_CreateStream_Config)
IPC_STRUCT_MEMBER(media::AudioParameters, params)
@@ -96,9 +99,10 @@ IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyStreamVolume,
// Request that is sent to the browser for creating an audio output stream.
// |render_view_id| is the routing ID for the render view producing the audio
// data.
-IPC_MESSAGE_CONTROL4(AudioHostMsg_CreateStream,
+IPC_MESSAGE_CONTROL5(AudioHostMsg_CreateStream,
int /* stream_id */,
int /* render_view_id */,
+ int /* render_frame_id */,
int /* session_id */,
media::AudioParameters /* params */)
diff --git a/chromium/content/common/media/cdm_messages.h b/chromium/content/common/media/cdm_messages.h
new file mode 100644
index 00000000000..11b0eefdfd6
--- /dev/null
+++ b/chromium/content/common/media/cdm_messages.h
@@ -0,0 +1,70 @@
+// Copyright 2014 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.
+
+// IPC messages for content decryption module (CDM) implementation.
+// Multiply-included message file, hence no include guard.
+
+#include <string>
+#include <vector>
+
+#include "base/basictypes.h"
+#include "content/common/content_export.h"
+#include "content/common/media/cdm_messages_enums.h"
+#include "ipc/ipc_message_macros.h"
+#include "media/base/media_keys.h"
+#include "url/gurl.h"
+
+#undef IPC_MESSAGE_EXPORT
+#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
+#define IPC_MESSAGE_START CdmMsgStart
+
+IPC_ENUM_TRAITS(media::MediaKeys::KeyError)
+IPC_ENUM_TRAITS(CdmHostMsg_CreateSession_ContentType)
+
+IPC_MESSAGE_ROUTED3(CdmHostMsg_InitializeCdm,
+ int /* cdm_id */,
+ std::string /* key_system */,
+ GURL /* security_origin */)
+
+IPC_MESSAGE_ROUTED4(CdmHostMsg_CreateSession,
+ int /* cdm_id */,
+ uint32_t /* session_id */,
+ CdmHostMsg_CreateSession_ContentType /* content_type */,
+ std::vector<uint8> /* init_data */)
+
+IPC_MESSAGE_ROUTED3(CdmHostMsg_UpdateSession,
+ int /* cdm_id */,
+ uint32_t /* session_id */,
+ std::vector<uint8> /* response */)
+
+IPC_MESSAGE_ROUTED2(CdmHostMsg_ReleaseSession,
+ int /* cdm_id */,
+ uint32_t /* session_id */)
+
+IPC_MESSAGE_ROUTED1(CdmHostMsg_DestroyCdm, int /* cdm_id */)
+
+IPC_MESSAGE_ROUTED3(CdmMsg_SessionCreated,
+ int /* cdm_id */,
+ uint32_t /* session_id */,
+ std::string /* web_session_id */)
+
+IPC_MESSAGE_ROUTED4(CdmMsg_SessionMessage,
+ int /* cdm_id */,
+ uint32_t /* session_id */,
+ std::vector<uint8> /* message */,
+ GURL /* destination_url */)
+
+IPC_MESSAGE_ROUTED2(CdmMsg_SessionReady,
+ int /* cdm_id */,
+ uint32_t /* session_id */)
+
+IPC_MESSAGE_ROUTED2(CdmMsg_SessionClosed,
+ int /* cdm_id */,
+ uint32_t /* session_id */)
+
+IPC_MESSAGE_ROUTED4(CdmMsg_SessionError,
+ int /* cdm_id */,
+ uint32_t /* session_id */,
+ media::MediaKeys::KeyError /* error_code */,
+ uint32_t /* system_code */)
diff --git a/chromium/content/common/media/cdm_messages_enums.h b/chromium/content/common/media/cdm_messages_enums.h
new file mode 100644
index 00000000000..3e6aeae7d58
--- /dev/null
+++ b/chromium/content/common/media/cdm_messages_enums.h
@@ -0,0 +1,14 @@
+// Copyright 2014 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_CDM_MESSAGES_ENUMS_H_
+#define CONTENT_COMMON_MEDIA_CDM_MESSAGES_ENUMS_H_
+
+// Dictates the session type when an EME session is created.
+enum CdmHostMsg_CreateSession_ContentType {
+ CREATE_SESSION_TYPE_WEBM,
+ CREATE_SESSION_TYPE_MP4
+};
+
+#endif // CONTENT_COMMON_MEDIA_CDM_MESSAGES_ENUMS_H_
diff --git a/chromium/content/common/media/media_param_traits.cc b/chromium/content/common/media/media_param_traits.cc
index 3ec6a25994c..345f838119b 100644
--- a/chromium/content/common/media/media_param_traits.cc
+++ b/chromium/content/common/media/media_param_traits.cc
@@ -60,9 +60,10 @@ void ParamTraits<AudioParameters>::Log(const AudioParameters& p,
void ParamTraits<VideoCaptureFormat>::Write(Message* m,
const VideoCaptureFormat& p) {
+ // Crash during Send rather than have a failure at the message handler.
m->WriteInt(p.frame_size.width());
m->WriteInt(p.frame_size.height());
- m->WriteInt(p.frame_rate);
+ m->WriteFloat(p.frame_rate);
m->WriteInt(static_cast<int>(p.pixel_format));
}
@@ -72,7 +73,7 @@ bool ParamTraits<VideoCaptureFormat>::Read(const Message* m,
int frame_size_width, frame_size_height, pixel_format;
if (!m->ReadInt(iter, &frame_size_width) ||
!m->ReadInt(iter, &frame_size_height) ||
- !m->ReadInt(iter, &r->frame_rate) ||
+ !m->ReadFloat(iter, &r->frame_rate) ||
!m->ReadInt(iter, &pixel_format))
return false;
diff --git a/chromium/content/common/media/media_player_messages_android.h b/chromium/content/common/media/media_player_messages_android.h
index 5addcf1b5e5..4548f0b849b 100644
--- a/chromium/content/common/media/media_player_messages_android.h
+++ b/chromium/content/common/media/media_player_messages_android.h
@@ -5,9 +5,6 @@
// IPC messages for android media player.
// Multiply-included message file, hence no include guard.
-#include <string>
-#include <vector>
-
#include "base/basictypes.h"
#include "base/time/time.h"
#include "content/common/content_export.h"
@@ -15,7 +12,6 @@
#include "ipc/ipc_message_macros.h"
#include "media/base/android/media_player_android.h"
#include "media/base/android/demuxer_stream_player_params.h"
-#include "media/base/media_keys.h"
#include "ui/gfx/rect_f.h"
#include "url/gurl.h"
@@ -26,7 +22,6 @@
IPC_ENUM_TRAITS(media::AudioCodec)
IPC_ENUM_TRAITS(media::DemuxerStream::Status)
IPC_ENUM_TRAITS(media::DemuxerStream::Type)
-IPC_ENUM_TRAITS(media::MediaKeys::KeyError)
IPC_ENUM_TRAITS(media::VideoCodec)
IPC_STRUCT_TRAITS_BEGIN(media::DemuxerConfigs)
@@ -41,15 +36,13 @@ IPC_STRUCT_TRAITS_BEGIN(media::DemuxerConfigs)
IPC_STRUCT_TRAITS_MEMBER(is_video_encrypted)
IPC_STRUCT_TRAITS_MEMBER(video_extra_data)
- IPC_STRUCT_TRAITS_MEMBER(duration_ms)
-#if defined(GOOGLE_TV)
- IPC_STRUCT_TRAITS_MEMBER(key_system)
-#endif // defined(GOOGLE_TV)
+ IPC_STRUCT_TRAITS_MEMBER(duration)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(media::DemuxerData)
IPC_STRUCT_TRAITS_MEMBER(type)
IPC_STRUCT_TRAITS_MEMBER(access_units)
+ IPC_STRUCT_TRAITS_MEMBER(demuxer_configs)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(media::AccessUnit)
@@ -69,6 +62,17 @@ IPC_STRUCT_TRAITS_END()
IPC_ENUM_TRAITS(MediaPlayerHostMsg_Initialize_Type)
+// Parameters to describe a media player
+IPC_STRUCT_BEGIN(MediaPlayerHostMsg_Initialize_Params)
+ IPC_STRUCT_MEMBER(MediaPlayerHostMsg_Initialize_Type, type)
+ IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle)
+ IPC_STRUCT_MEMBER(int, player_id)
+ IPC_STRUCT_MEMBER(int, demuxer_client_id)
+ IPC_STRUCT_MEMBER(GURL, url)
+ IPC_STRUCT_MEMBER(GURL, first_party_for_cookies)
+ IPC_STRUCT_MEMBER(GURL, frame_url)
+IPC_STRUCT_END()
+
// Chrome for Android seek message sequence is:
// 1. Renderer->Browser MediaPlayerHostMsg_Seek
// This is the beginning of actual seek flow in response to web app requests
@@ -183,13 +187,12 @@ IPC_MESSAGE_CONTROL2(MediaPlayerMsg_ReadFromDemuxer,
int /* demuxer_client_id */,
media::DemuxerStream::Type /* type */)
-// The player needs new config data
-IPC_MESSAGE_CONTROL1(MediaPlayerMsg_MediaConfigRequest,
- int /* demuxer_client_id */)
-
-IPC_MESSAGE_ROUTED1(MediaPlayerMsg_ConnectedToRemoteDevice,
- int /* player_id */)
+// Clank has connected to the remote device.
+IPC_MESSAGE_ROUTED2(MediaPlayerMsg_ConnectedToRemoteDevice,
+ int /* player_id */,
+ std::string /* remote_playback_message */)
+// Clank has disconnected from the remote device.
IPC_MESSAGE_ROUTED1(MediaPlayerMsg_DisconnectedFromRemoteDevice,
int /* player_id */)
@@ -197,31 +200,19 @@ IPC_MESSAGE_ROUTED1(MediaPlayerMsg_DisconnectedFromRemoteDevice,
IPC_MESSAGE_ROUTED1(MediaPlayerMsg_RequestFullscreen,
int /*player_id */)
+// Pauses all video playback.
+IPC_MESSAGE_ROUTED0(MediaPlayerMsg_PauseVideo)
+
// Messages for controlling the media playback in browser process ----------
// Destroy the media player object.
IPC_MESSAGE_ROUTED1(MediaPlayerHostMsg_DestroyMediaPlayer,
int /* player_id */)
-// Destroy all the players.
-IPC_MESSAGE_ROUTED0(MediaPlayerHostMsg_DestroyAllMediaPlayers)
-
-// Initialize a media player object with the given type and player_id. The other
-// parameters are used depending on the type of player.
-//
-// url: the URL to load when initializing a URL player.
-//
-// first_party_for_cookies: the cookie store to use when loading a URL.
-//
-// demuxer_client_id: the demuxer associated with this player when initializing
-// a media source player.
-IPC_MESSAGE_ROUTED5(
+// Initialize a media player object.
+IPC_MESSAGE_ROUTED1(
MediaPlayerHostMsg_Initialize,
- MediaPlayerHostMsg_Initialize_Type /* type */,
- int /* player_id */,
- GURL /* url */,
- GURL /* first_party_for_cookies */,
- int /* demuxer_client_id */)
+ MediaPlayerHostMsg_Initialize_Params);
// Pause the player.
IPC_MESSAGE_ROUTED2(MediaPlayerHostMsg_Pause,
@@ -239,17 +230,27 @@ IPC_MESSAGE_ROUTED2(MediaPlayerHostMsg_Seek,
// Start the player for playback.
IPC_MESSAGE_ROUTED1(MediaPlayerHostMsg_Start, int /* player_id */)
-// Start the player for playback.
+// Set the volume.
IPC_MESSAGE_ROUTED2(MediaPlayerHostMsg_SetVolume,
int /* player_id */,
double /* volume */)
+// Set the poster image.
+IPC_MESSAGE_ROUTED2(MediaPlayerHostMsg_SetPoster,
+ int /* player_id */,
+ GURL /* poster url */)
+
// Requests the player to enter fullscreen.
IPC_MESSAGE_ROUTED1(MediaPlayerHostMsg_EnterFullscreen, int /* player_id */)
// Requests the player to exit fullscreen.
IPC_MESSAGE_ROUTED1(MediaPlayerHostMsg_ExitFullscreen, int /* player_id */)
+// Requests the player with |player_id| to use the CDM with |cdm_id|.
+IPC_MESSAGE_ROUTED2(MediaPlayerHostMsg_SetCdm,
+ int /* player_id */,
+ int /* cdm_id */);
+
// Sent after the renderer demuxer has seeked.
IPC_MESSAGE_CONTROL2(MediaPlayerHostMsg_DemuxerSeekDone,
int /* demuxer_client_id */,
@@ -272,58 +273,10 @@ IPC_MESSAGE_CONTROL2(MediaPlayerHostMsg_DurationChanged,
#if defined(VIDEO_HOLE)
// Notify the player about the external surface, requesting it if necessary.
+// |is_request| true if the player is requesting the external surface.
+// |rect| the boundary rectangle of the video element.
IPC_MESSAGE_ROUTED3(MediaPlayerHostMsg_NotifyExternalSurface,
int /* player_id */,
bool /* is_request */,
gfx::RectF /* rect */)
#endif // defined(VIDEO_HOLE)
-
-// Messages for encrypted media extensions API ------------------------------
-// TODO(xhwang): Move the following messages to a separate file.
-
-IPC_MESSAGE_ROUTED3(MediaKeysHostMsg_InitializeCDM,
- int /* media_keys_id */,
- std::vector<uint8> /* uuid */,
- GURL /* frame url */)
-
-IPC_MESSAGE_ROUTED4(MediaKeysHostMsg_CreateSession,
- int /* media_keys_id */,
- uint32_t /* session_id */,
- std::string /* type */,
- std::vector<uint8> /* init_data */)
-// TODO(jrummell): Use enum for type (http://crbug.com/327449)
-
-IPC_MESSAGE_ROUTED3(MediaKeysHostMsg_UpdateSession,
- int /* media_keys_id */,
- uint32_t /* session_id */,
- std::vector<uint8> /* response */)
-
-IPC_MESSAGE_ROUTED2(MediaKeysHostMsg_ReleaseSession,
- int /* media_keys_id */,
- uint32_t /* session_id */)
-
-IPC_MESSAGE_ROUTED3(MediaKeysMsg_SessionCreated,
- int /* media_keys_id */,
- uint32_t /* session_id */,
- std::string /* web_session_id */)
-
-IPC_MESSAGE_ROUTED4(MediaKeysMsg_SessionMessage,
- int /* media_keys_id */,
- uint32_t /* session_id */,
- std::vector<uint8> /* message */,
- std::string /* destination_url */)
-// TODO(jrummell): Use GURL for destination_url (http://crbug.com/326663)
-
-IPC_MESSAGE_ROUTED2(MediaKeysMsg_SessionReady,
- int /* media_keys_id */,
- uint32_t /* session_id */)
-
-IPC_MESSAGE_ROUTED2(MediaKeysMsg_SessionClosed,
- int /* media_keys_id */,
- uint32_t /* session_id */)
-
-IPC_MESSAGE_ROUTED4(MediaKeysMsg_SessionError,
- int /* media_keys_id */,
- uint32_t /* session_id */,
- media::MediaKeys::KeyError /* error_code */,
- int /* system_code */)
diff --git a/chromium/content/common/media/media_player_messages_enums_android.h b/chromium/content/common/media/media_player_messages_enums_android.h
index fe45950eede..97818ffe57a 100644
--- a/chromium/content/common/media/media_player_messages_enums_android.h
+++ b/chromium/content/common/media/media_player_messages_enums_android.h
@@ -9,9 +9,6 @@
enum MediaPlayerHostMsg_Initialize_Type {
MEDIA_PLAYER_TYPE_URL,
MEDIA_PLAYER_TYPE_MEDIA_SOURCE,
-#if defined(GOOGLE_TV)
- MEDIA_PLAYER_TYPE_MEDIA_STREAM,
-#endif
};
#endif // CONTENT_COMMON_MEDIA_MEDIA_PLAYER_MESSAGES_ENUMS_ANDROID_H_
diff --git a/chromium/content/common/media/media_stream_messages.h b/chromium/content/common/media/media_stream_messages.h
index 8c4caf5a1b2..0d331709a1d 100644
--- a/chromium/content/common/media/media_stream_messages.h
+++ b/chromium/content/common/media/media_stream_messages.h
@@ -10,6 +10,7 @@
#include "content/common/content_export.h"
#include "content/common/media/media_stream_options.h"
#include "ipc/ipc_message_macros.h"
+#include "ipc/ipc_platform_file.h"
#include "url/gurl.h"
#undef IPC_MESSAGE_EXPORT
@@ -22,6 +23,9 @@ IPC_ENUM_TRAITS_MAX_VALUE(content::MediaStreamType,
IPC_ENUM_TRAITS_MAX_VALUE(content::VideoFacingMode,
content::NUM_MEDIA_VIDEO_FACING_MODE - 1)
+IPC_ENUM_TRAITS_MAX_VALUE(content::MediaStreamRequestResult,
+ content::NUM_MEDIA_REQUEST_RESULTS - 1)
+
IPC_STRUCT_TRAITS_BEGIN(content::StreamOptions::Constraint)
IPC_STRUCT_TRAITS_MEMBER(name)
IPC_STRUCT_TRAITS_MEMBER(value)
@@ -62,8 +66,9 @@ IPC_MESSAGE_ROUTED4(MediaStreamMsg_StreamGenerated,
content::StreamDeviceInfoArray /* video_device_list */)
// The browser has failed to generate a stream.
-IPC_MESSAGE_ROUTED1(MediaStreamMsg_StreamGenerationFailed,
- int /* request id */)
+IPC_MESSAGE_ROUTED2(MediaStreamMsg_StreamGenerationFailed,
+ int /* request id */,
+ content::MediaStreamRequestResult /* result */)
// The browser reports that a media device has been stopped. Stopping was
// triggered from the browser process.
@@ -99,11 +104,12 @@ IPC_MESSAGE_CONTROL2(MediaStreamMsg_GetSourcesACK,
// Messages sent from the renderer to the browser.
// Request a new media stream.
-IPC_MESSAGE_CONTROL4(MediaStreamHostMsg_GenerateStream,
+IPC_MESSAGE_CONTROL5(MediaStreamHostMsg_GenerateStream,
int /* render view id */,
int /* request id */,
content::StreamOptions /* components */,
- GURL /* security origin */)
+ GURL /* security origin */,
+ bool /* user_gesture */)
// Request to cancel the request for a new media stream.
IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_CancelGenerateStream,
@@ -120,15 +126,14 @@ IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_GetSources,
int /* request id */,
GURL /* origin */)
-
// Request to enumerate devices.
-// Used by Pepper.
-// TODO(vrk,wjia): Move this to pepper code.
-IPC_MESSAGE_CONTROL4(MediaStreamHostMsg_EnumerateDevices,
+// Used by Pepper and WebRTC.
+IPC_MESSAGE_CONTROL5(MediaStreamHostMsg_EnumerateDevices,
int /* render view id */,
int /* request id */,
content::MediaStreamType /* type */,
- GURL /* security origin */)
+ GURL /* security origin */,
+ bool /* hide_labels_if_no_access */)
// Request to stop enumerating devices.
IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_CancelEnumerateDevices,
diff --git a/chromium/content/common/media/media_stream_options.cc b/chromium/content/common/media/media_stream_options.cc
index 4ddef015334..c727b63718c 100644
--- a/chromium/content/common/media/media_stream_options.cc
+++ b/chromium/content/common/media/media_stream_options.cc
@@ -17,6 +17,9 @@ const char kMediaStreamSourceDesktop[] = "desktop";
const char kMediaStreamSourceSystem[] = "system";
const char kMediaStreamRenderToAssociatedSink[] =
"chromeRenderToAssociatedSink";
+// The prefix of this constant is 'goog' to match with other getUserMedia
+// constraints for audio.
+const char kMediaStreamAudioDucking[] = "googDucking";
namespace {
diff --git a/chromium/content/common/media/media_stream_options.h b/chromium/content/common/media/media_stream_options.h
index 1b7401caaa1..e58f1370003 100644
--- a/chromium/content/common/media/media_stream_options.h
+++ b/chromium/content/common/media/media_stream_options.h
@@ -28,6 +28,9 @@ CONTENT_EXPORT extern const char kMediaStreamSourceSystem[];
// device belongs to.
CONTENT_EXPORT extern const char kMediaStreamRenderToAssociatedSink[];
+// Controls whether ducking of audio is enabled on platforms that support it.
+CONTENT_EXPORT extern const char kMediaStreamAudioDucking[];
+
// StreamOptions is a Chromium representation of constraints
// used in WebUserMediaRequest.
// It describes properties requested by JS in a request for a new
diff --git a/chromium/content/common/media/media_stream_track_metrics_host_messages.h b/chromium/content/common/media/media_stream_track_metrics_host_messages.h
new file mode 100644
index 00000000000..a7ec0759a45
--- /dev/null
+++ b/chromium/content/common/media/media_stream_track_metrics_host_messages.h
@@ -0,0 +1,19 @@
+// Copyright 2014 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.
+
+#include "base/values.h"
+#include "content/common/content_export.h"
+#include "ipc/ipc_message_macros.h"
+
+#undef IPC_MESSAGE_EXPORT
+#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
+#define IPC_MESSAGE_START MediaStreamTrackMetricsHostMsgStart
+
+// Messages sent to MediaStreamTrackMetricsHost.
+IPC_MESSAGE_CONTROL3(MediaStreamTrackMetricsHost_AddTrack,
+ uint64 /* id */,
+ bool /* is_audio */,
+ bool /* is_remote */)
+IPC_MESSAGE_CONTROL1(MediaStreamTrackMetricsHost_RemoveTrack,
+ uint64 /* id */)
diff --git a/chromium/content/common/media/midi_messages.h b/chromium/content/common/media/midi_messages.h
index eced85dbb79..599f42c8ab9 100644
--- a/chromium/content/common/media/midi_messages.h
+++ b/chromium/content/common/media/midi_messages.h
@@ -8,63 +8,66 @@
#include "base/basictypes.h"
#include "content/common/content_export.h"
#include "ipc/ipc_message_macros.h"
+#include "ipc/param_traits_macros.h"
#include "media/midi/midi_port_info.h"
+#include "media/midi/midi_result.h"
#include "url/gurl.h"
#undef IPC_MESSAGE_EXPORT
#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
-#define IPC_MESSAGE_START MIDIMsgStart
+#define IPC_MESSAGE_START MidiMsgStart
-IPC_STRUCT_TRAITS_BEGIN(media::MIDIPortInfo)
+IPC_STRUCT_TRAITS_BEGIN(media::MidiPortInfo)
IPC_STRUCT_TRAITS_MEMBER(id)
IPC_STRUCT_TRAITS_MEMBER(manufacturer)
IPC_STRUCT_TRAITS_MEMBER(name)
IPC_STRUCT_TRAITS_MEMBER(version)
IPC_STRUCT_TRAITS_END()
-// Messages for IPC between MIDIDispatcher and MIDIDispatcherHost.
+IPC_ENUM_TRAITS_MAX_VALUE(media::MidiResult, media::MIDI_RESULT_LAST)
+
+// Messages for IPC between MidiDispatcher and MidiDispatcherHost.
// Renderer request to browser for using system exclusive messages.
-IPC_MESSAGE_CONTROL3(MIDIHostMsg_RequestSysExPermission,
- int /* routing id */,
- int /* client id */,
- GURL /* origin */)
+IPC_MESSAGE_ROUTED3(MidiHostMsg_RequestSysExPermission,
+ int /* client id */,
+ GURL /* origin */,
+ bool /* user_gesture */)
// Renderer request to browser for canceling a previous permission request.
-IPC_MESSAGE_CONTROL3(MIDIHostMsg_CancelSysExPermissionRequest,
- int /* render_view_id */,
+IPC_MESSAGE_ROUTED2(MidiHostMsg_CancelSysExPermissionRequest,
int /* bridge_id */,
GURL /* GURL of the frame */)
// Messages sent from the browser to the renderer.
-IPC_MESSAGE_ROUTED2(MIDIMsg_SysExPermissionApproved,
+IPC_MESSAGE_ROUTED2(MidiMsg_SysExPermissionApproved,
int /* client id */,
- bool /* success */)
+ bool /* is_allowed */)
-// Messages for IPC between MIDIMessageFilter and MIDIHost.
+// Messages for IPC between MidiMessageFilter and MidiHost.
// Renderer request to browser for access to MIDI services.
-IPC_MESSAGE_CONTROL1(MIDIHostMsg_StartSession,
+IPC_MESSAGE_CONTROL1(MidiHostMsg_StartSession,
int /* client id */)
-IPC_MESSAGE_CONTROL3(MIDIHostMsg_SendData,
+IPC_MESSAGE_CONTROL3(MidiHostMsg_SendData,
uint32 /* port */,
std::vector<uint8> /* data */,
double /* timestamp */)
// Messages sent from the browser to the renderer.
-IPC_MESSAGE_CONTROL4(MIDIMsg_SessionStarted,
+IPC_MESSAGE_CONTROL4(MidiMsg_SessionStarted,
int /* client id */,
- bool /* success */,
- media::MIDIPortInfoList /* input ports */,
- media::MIDIPortInfoList /* output ports */)
+ media::MidiResult /* result */,
+ media::MidiPortInfoList /* input ports */,
+ media::MidiPortInfoList /* output ports */)
-IPC_MESSAGE_CONTROL3(MIDIMsg_DataReceived,
+IPC_MESSAGE_CONTROL3(MidiMsg_DataReceived,
uint32 /* port */,
std::vector<uint8> /* data */,
double /* timestamp */)
-IPC_MESSAGE_CONTROL1(MIDIMsg_AcknowledgeSentData,
+IPC_MESSAGE_CONTROL1(MidiMsg_AcknowledgeSentData,
uint32 /* bytes sent */)
diff --git a/chromium/content/common/media/peer_connection_tracker_messages.h b/chromium/content/common/media/peer_connection_tracker_messages.h
index 6a1ea03b091..c5ed72fd0dd 100644
--- a/chromium/content/common/media/peer_connection_tracker_messages.h
+++ b/chromium/content/common/media/peer_connection_tracker_messages.h
@@ -29,6 +29,14 @@ IPC_MESSAGE_CONTROL3(PeerConnectionTrackerHost_UpdatePeerConnection,
IPC_MESSAGE_CONTROL2(PeerConnectionTrackerHost_AddStats,
int /* lid */,
base::ListValue /* value */)
+IPC_MESSAGE_CONTROL5(PeerConnectionTrackerHost_GetUserMedia,
+ std::string /*origin*/,
+ bool /*audio*/,
+ bool /*video*/,
+ // The constraints strings are for dispaly only and should
+ // not be parsed by the browser for security reasons.
+ std::string /* audio_constraints */,
+ std::string /* video_constraints */)
// Messages sent to PeerConnectionTracker.
IPC_MESSAGE_CONTROL0(PeerConnectionTracker_GetAllStats)
diff --git a/chromium/content/common/media/video_capture.h b/chromium/content/common/media/video_capture.h
index f6e24bac44c..80dca93ad82 100644
--- a/chromium/content/common/media/video_capture.h
+++ b/chromium/content/common/media/video_capture.h
@@ -7,6 +7,10 @@
#ifndef CONTENT_COMMON_MEDIA_VIDEO_CAPTURE_H_
#define CONTENT_COMMON_MEDIA_VIDEO_CAPTURE_H_
+#include "base/time/time.h"
+#include "media/base/video_frame.h"
+#include "media/video/capture/video_capture_types.h"
+
namespace content {
// Current status of the video capture device. It's used by multiple classes
@@ -21,8 +25,14 @@ enum VideoCaptureState {
VIDEO_CAPTURE_STATE_STOPPED,
VIDEO_CAPTURE_STATE_ERROR,
VIDEO_CAPTURE_STATE_ENDED,
+ VIDEO_CAPTURE_STATE_LAST = VIDEO_CAPTURE_STATE_ENDED
};
+typedef base::Callback<void(VideoCaptureState)>
+ VideoCaptureStateUpdateCB;
+typedef base::Callback<void(const media::VideoCaptureFormats&)>
+ VideoCaptureDeviceFormatsCB;
+
} // namespace content
#endif // CONTENT_COMMON_MEDIA_VIDEO_CAPTURE_H_
diff --git a/chromium/content/common/media/video_capture_messages.h b/chromium/content/common/media/video_capture_messages.h
index 55cbb38496d..c3970df76f8 100644
--- a/chromium/content/common/media/video_capture_messages.h
+++ b/chromium/content/common/media/video_capture_messages.h
@@ -6,6 +6,7 @@
#include "content/common/content_export.h"
#include "content/common/media/video_capture.h"
#include "content/public/common/common_param_traits.h"
+#include "gpu/command_buffer/common/mailbox_holder.h"
#include "ipc/ipc_message_macros.h"
#include "media/video/capture/video_capture_types.h"
@@ -13,7 +14,8 @@
#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
#define IPC_MESSAGE_START VideoCaptureMsgStart
-IPC_ENUM_TRAITS(content::VideoCaptureState)
+IPC_ENUM_TRAITS_MAX_VALUE(content::VideoCaptureState,
+ content::VIDEO_CAPTURE_STATE_LAST)
IPC_STRUCT_TRAITS_BEGIN(media::VideoCaptureParams)
IPC_STRUCT_TRAITS_MEMBER(requested_format)
@@ -46,8 +48,29 @@ IPC_MESSAGE_CONTROL2(VideoCaptureMsg_FreeBuffer,
IPC_MESSAGE_CONTROL4(VideoCaptureMsg_BufferReady,
int /* device id */,
int /* buffer_id */,
- base::Time /* timestamp */,
- media::VideoCaptureFormat /* resolution */)
+ media::VideoCaptureFormat /* format */,
+ base::TimeTicks /* timestamp */)
+
+// Tell the renderer process that a texture mailbox buffer is available from
+// video capture.
+IPC_MESSAGE_CONTROL5(VideoCaptureMsg_MailboxBufferReady,
+ int /* device_id */,
+ int /* buffer_id */,
+ gpu::MailboxHolder /* mailbox_holder */,
+ media::VideoCaptureFormat /* format */,
+ base::TimeTicks /* timestamp */)
+
+// Notify the renderer about a device's supported formats; this is a response
+// to a VideoCaptureHostMsg_GetDeviceSupportedFormats request.
+IPC_MESSAGE_CONTROL2(VideoCaptureMsg_DeviceSupportedFormatsEnumerated,
+ int /* device_id */,
+ media::VideoCaptureFormats /* supported_formats */)
+
+// Notify the renderer about a device's format(s) in use; this is a response
+// to a VideoCaptureHostMsg_GetDeviceFormatInUse request.
+IPC_MESSAGE_CONTROL2(VideoCaptureMsg_DeviceFormatsInUseReceived,
+ int /* device_id */,
+ media::VideoCaptureFormats /* formats_in_use */)
// Start a video capture as |device_id|, a new id picked by the renderer
// process. The session to be started is determined by |params.session_id|.
@@ -66,6 +89,17 @@ IPC_MESSAGE_CONTROL1(VideoCaptureHostMsg_Stop,
// Tell the browser process that the renderer has finished reading from
// a buffer previously delivered by VideoCaptureMsg_BufferReady.
-IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_BufferReady,
+IPC_MESSAGE_CONTROL3(VideoCaptureHostMsg_BufferReady,
int /* device_id */,
- int /* buffer_id */)
+ int /* buffer_id */,
+ std::vector<uint32> /* syncpoints */)
+
+// Get the formats supported by a device referenced by |capture_session_id|.
+IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_GetDeviceSupportedFormats,
+ int /* device_id */,
+ media::VideoCaptureSessionId /* session_id */)
+
+// Get the format(s) in use by a device referenced by |capture_session_id|.
+IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_GetDeviceFormatsInUse,
+ int /* device_id */,
+ media::VideoCaptureSessionId /* session_id */)