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_ENUM_TRAITS(media_stream::MediaStreamType) |
| 16 IPC_ENUM_TRAITS(media_stream::StreamOptions::VideoOption) |
| 17 |
| 18 IPC_STRUCT_TRAITS_BEGIN(media_stream::StreamOptions) |
| 19 IPC_STRUCT_TRAITS_MEMBER(audio) |
| 20 IPC_STRUCT_TRAITS_MEMBER(video_option) |
| 21 IPC_STRUCT_TRAITS_END() |
| 22 |
| 23 IPC_STRUCT_TRAITS_BEGIN(media_stream::StreamDeviceInfo) |
| 24 IPC_STRUCT_TRAITS_MEMBER(stream_type) |
| 25 IPC_STRUCT_TRAITS_MEMBER(name) |
| 26 IPC_STRUCT_TRAITS_MEMBER(device_id) |
| 27 IPC_STRUCT_TRAITS_MEMBER(in_use) |
| 28 IPC_STRUCT_TRAITS_MEMBER(session_id) |
| 29 IPC_STRUCT_TRAITS_END() |
| 30 |
| 31 // Message sent from the browser to the renderer |
| 32 |
| 33 // The browser has generated a stream successfully. |
| 34 IPC_MESSAGE_ROUTED4(MediaStreamMsg_StreamGenerated, |
| 35 int /* request id */, |
| 36 std::string /* label */, |
| 37 media_stream::StreamDeviceInfoArray /* audio_device_list */, |
| 38 media_stream::StreamDeviceInfoArray /* video_device_list */) |
| 39 |
| 40 // The browser has failed to generate a stream. |
| 41 IPC_MESSAGE_ROUTED1(MediaStreamMsg_StreamGenerationFailed, |
| 42 int /* request id */) |
| 43 |
| 44 // Report of a failure of a video device. |
| 45 IPC_MESSAGE_ROUTED2(MediaStreamHostMsg_VideoDeviceFailed, |
| 46 std::string /* label */, |
| 47 int /* index */) |
| 48 |
| 49 // Report of a failure of an audio device. |
| 50 IPC_MESSAGE_ROUTED2(MediaStreamHostMsg_AudioDeviceFailed, |
| 51 std::string /* label */, |
| 52 int /* index */) |
| 53 |
| 54 // Messages sent from the renderer to the browser. |
| 55 |
| 56 // Request a new media stream. |
| 57 IPC_MESSAGE_CONTROL4(MediaStreamHostMsg_GenerateStream, |
| 58 int /* render view id */, |
| 59 int /* request id */, |
| 60 media_stream::StreamOptions /* options */, |
| 61 std::string /* security origin */) |
| 62 |
| 63 // Request to stop streaming from the media stream. |
| 64 IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_StopGeneratedStream, |
| 65 int /* render view id */, |
| 66 std::string /* label */) |
OLD | NEW |