OLD | NEW |
(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 // IPC messages for the media streaming. |
| 6 // Multiply-included message file, hence no include guard. |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "content/common/media/media_stream_options.h" |
| 11 #include "ipc/ipc_message_macros.h" |
| 12 |
| 13 #define IPC_MESSAGE_START MediaStreamMsgStart |
| 14 |
| 15 IPC_STRUCT_TRAITS_BEGIN(media_stream::GenerateStreamOptions) |
| 16 IPC_STRUCT_TRAITS_MEMBER(audio) |
| 17 IPC_STRUCT_TRAITS_MEMBER(video_options) |
| 18 IPC_STRUCT_TRAITS_END() |
| 19 |
| 20 IPC_ENUM_TRAITS(media_stream::MediaStreamType) |
| 21 |
| 22 IPC_STRUCT_TRAITS_BEGIN(media_stream::StreamDeviceInfo) |
| 23 IPC_STRUCT_TRAITS_MEMBER(stream_type) |
| 24 IPC_STRUCT_TRAITS_MEMBER(name) |
| 25 IPC_STRUCT_TRAITS_MEMBER(device_id) |
| 26 IPC_STRUCT_TRAITS_MEMBER(in_use) |
| 27 IPC_STRUCT_TRAITS_MEMBER(session_id) |
| 28 IPC_STRUCT_TRAITS_END() |
| 29 |
| 30 // Message sent from the browser to the renderer |
| 31 |
| 32 // The browser has generated a stream successfully. |
| 33 IPC_MESSAGE_ROUTED4(MediaStreamMsg_StreamGenerated, |
| 34 int /* request id */, |
| 35 std::string /* label */, |
| 36 media_stream::StreamDeviceInfoArray /* audio_device_list */, |
| 37 media_stream::StreamDeviceInfoArray /* video_device_list */) |
| 38 |
| 39 // The browser has failed to generate a stream. |
| 40 IPC_MESSAGE_ROUTED1(MediaStreamMsg_StreamGenerationFailed, |
| 41 int /* request id */) |
| 42 |
| 43 // Report of a failure of a video device. |
| 44 IPC_MESSAGE_ROUTED2(MediaStreamHostMsg_VideoDeviceFailed, |
| 45 std::string /* label */, |
| 46 int /* index */) |
| 47 |
| 48 // Report of a failure of an audio device. |
| 49 IPC_MESSAGE_ROUTED2(MediaStreamHostMsg_AudioDeviceFailed, |
| 50 std::string /* label */, |
| 51 int /* index */) |
| 52 |
| 53 // Messages sent from the renderer to the browser. |
| 54 |
| 55 // Request a new media stream. |
| 56 IPC_MESSAGE_CONTROL4(MediaStreamHostMsg_GenerateStream, |
| 57 int /* render view id */, |
| 58 int /* request id */, |
| 59 media_stream::GenerateStreamOptions /* options */, |
| 60 std::string /* security origin */) |
| 61 |
| 62 // Request to stop streaming from the media stream. |
| 63 IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_StopGeneratedStream, |
| 64 int /* render view id */, |
| 65 std::string /* label */) |
OLD | NEW |