Android Chromoting: Remove exit-fullscreen button.
[chromium-blink-merge.git] / chrome / common / cast_messages.h
blobe10717189ffb17db6e5995c88eaab3e9ced5e578
1 // Copyright 2014 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.
5 // IPC messages for the Cast transport API.
6 // Multiply-included message file, hence no include guard.
8 #include "ipc/ipc_message_macros.h"
9 #include "media/cast/cast_sender.h"
10 #include "media/cast/logging/logging_defines.h"
11 #include "media/cast/net/cast_transport_sender.h"
12 #include "media/cast/net/rtcp/rtcp_defines.h"
13 #include "net/base/ip_endpoint.h"
15 #undef IPC_MESSAGE_EXPORT
16 #define IPC_MESSAGE_EXPORT
17 #define IPC_MESSAGE_START CastMsgStart
19 IPC_ENUM_TRAITS_MAX_VALUE(
20 media::cast::EncodedFrame::Dependency,
21 media::cast::EncodedFrame::DEPENDENCY_LAST)
22 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::Codec,
23 media::cast::CODEC_LAST)
24 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::CastTransportStatus,
25 media::cast::CAST_TRANSPORT_STATUS_LAST)
26 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::CastLoggingEvent,
27 media::cast::kNumOfLoggingEvents)
28 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::EventMediaType,
29 media::cast::EVENT_MEDIA_TYPE_LAST)
31 IPC_STRUCT_TRAITS_BEGIN(media::cast::EncodedFrame)
32 IPC_STRUCT_TRAITS_MEMBER(dependency)
33 IPC_STRUCT_TRAITS_MEMBER(frame_id)
34 IPC_STRUCT_TRAITS_MEMBER(referenced_frame_id)
35 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp)
36 IPC_STRUCT_TRAITS_MEMBER(reference_time)
37 IPC_STRUCT_TRAITS_MEMBER(new_playout_delay_ms)
38 IPC_STRUCT_TRAITS_MEMBER(data)
39 IPC_STRUCT_TRAITS_END()
41 IPC_STRUCT_TRAITS_BEGIN(media::cast::RtcpDlrrReportBlock)
42 IPC_STRUCT_TRAITS_MEMBER(last_rr)
43 IPC_STRUCT_TRAITS_MEMBER(delay_since_last_rr)
44 IPC_STRUCT_TRAITS_END()
46 IPC_STRUCT_TRAITS_BEGIN(media::cast::CastTransportRtpConfig)
47 IPC_STRUCT_TRAITS_MEMBER(ssrc)
48 IPC_STRUCT_TRAITS_MEMBER(feedback_ssrc)
49 IPC_STRUCT_TRAITS_MEMBER(rtp_payload_type)
50 IPC_STRUCT_TRAITS_MEMBER(aes_key)
51 IPC_STRUCT_TRAITS_MEMBER(aes_iv_mask)
52 IPC_STRUCT_TRAITS_END()
54 IPC_STRUCT_TRAITS_BEGIN(media::cast::PacketEvent)
55 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp)
56 IPC_STRUCT_TRAITS_MEMBER(frame_id)
57 IPC_STRUCT_TRAITS_MEMBER(max_packet_id)
58 IPC_STRUCT_TRAITS_MEMBER(packet_id)
59 IPC_STRUCT_TRAITS_MEMBER(size)
60 IPC_STRUCT_TRAITS_MEMBER(timestamp)
61 IPC_STRUCT_TRAITS_MEMBER(type)
62 IPC_STRUCT_TRAITS_MEMBER(media_type)
63 IPC_STRUCT_TRAITS_END()
65 IPC_STRUCT_TRAITS_BEGIN(media::cast::FrameEvent)
66 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp)
67 IPC_STRUCT_TRAITS_MEMBER(frame_id)
68 IPC_STRUCT_TRAITS_MEMBER(size)
69 IPC_STRUCT_TRAITS_MEMBER(timestamp)
70 IPC_STRUCT_TRAITS_MEMBER(type)
71 IPC_STRUCT_TRAITS_MEMBER(media_type)
72 IPC_STRUCT_TRAITS_MEMBER(delay_delta)
73 IPC_STRUCT_TRAITS_MEMBER(key_frame)
74 IPC_STRUCT_TRAITS_MEMBER(target_bitrate)
75 IPC_STRUCT_TRAITS_END()
77 IPC_STRUCT_TRAITS_BEGIN(media::cast::RtcpCastMessage)
78 IPC_STRUCT_TRAITS_MEMBER(media_ssrc)
79 IPC_STRUCT_TRAITS_MEMBER(ack_frame_id)
80 IPC_STRUCT_TRAITS_MEMBER(target_delay_ms)
81 IPC_STRUCT_TRAITS_MEMBER(missing_frames_and_packets)
82 IPC_STRUCT_TRAITS_END()
84 IPC_STRUCT_TRAITS_BEGIN(media::cast::RtpReceiverStatistics)
85 IPC_STRUCT_TRAITS_MEMBER(fraction_lost)
86 IPC_STRUCT_TRAITS_MEMBER(cumulative_lost)
87 IPC_STRUCT_TRAITS_MEMBER(extended_high_sequence_number)
88 IPC_STRUCT_TRAITS_MEMBER(jitter)
89 IPC_STRUCT_TRAITS_END()
91 IPC_STRUCT_TRAITS_BEGIN(media::cast::RtcpEvent)
92 IPC_STRUCT_TRAITS_MEMBER(type)
93 IPC_STRUCT_TRAITS_MEMBER(timestamp)
94 IPC_STRUCT_TRAITS_MEMBER(delay_delta)
95 IPC_STRUCT_TRAITS_MEMBER(packet_id)
96 IPC_STRUCT_TRAITS_END()
98 IPC_STRUCT_TRAITS_BEGIN(media::cast::RtcpTimeData)
99 IPC_STRUCT_TRAITS_MEMBER(ntp_seconds)
100 IPC_STRUCT_TRAITS_MEMBER(ntp_fraction)
101 IPC_STRUCT_TRAITS_MEMBER(timestamp)
102 IPC_STRUCT_TRAITS_END()
104 IPC_STRUCT_TRAITS_BEGIN(media::cast::SendRtcpFromRtpReceiver_Params)
105 IPC_STRUCT_TRAITS_MEMBER(ssrc)
106 IPC_STRUCT_TRAITS_MEMBER(sender_ssrc)
107 IPC_STRUCT_TRAITS_MEMBER(time_data)
108 IPC_STRUCT_TRAITS_MEMBER(cast_message)
109 IPC_STRUCT_TRAITS_MEMBER(target_delay)
110 IPC_STRUCT_TRAITS_MEMBER(rtcp_events)
111 IPC_STRUCT_TRAITS_MEMBER(rtp_receiver_statistics)
112 IPC_STRUCT_TRAITS_END()
115 // Cast messages sent from the browser to the renderer.
117 IPC_MESSAGE_CONTROL2(CastMsg_ReceivedPacket,
118 int32 /* channel_id */,
119 media::cast::Packet /* packet */)
121 IPC_MESSAGE_CONTROL3(CastMsg_Rtt,
122 int32 /* channel_id */,
123 uint32 /* ssrc */,
124 base::TimeDelta /* rtt */)
126 IPC_MESSAGE_CONTROL3(CastMsg_RtcpCastMessage,
127 int32 /* channel_id */,
128 uint32 /* ssrc */,
129 media::cast::RtcpCastMessage /* cast_message */)
131 IPC_MESSAGE_CONTROL2(
132 CastMsg_NotifyStatusChange,
133 int32 /* channel_id */,
134 media::cast::CastTransportStatus /* status */)
136 IPC_MESSAGE_CONTROL3(CastMsg_RawEvents,
137 int32 /* channel_id */,
138 std::vector<media::cast::PacketEvent> /* packet_events */,
139 std::vector<media::cast::FrameEvent> /* frame_events */)
141 // Cast messages sent from the renderer to the browser.
143 IPC_MESSAGE_CONTROL2(
144 CastHostMsg_InitializeAudio,
145 int32 /*channel_id*/,
146 media::cast::CastTransportRtpConfig /*config*/)
148 IPC_MESSAGE_CONTROL2(
149 CastHostMsg_InitializeVideo,
150 int32 /*channel_id*/,
151 media::cast::CastTransportRtpConfig /*config*/)
153 IPC_MESSAGE_CONTROL3(
154 CastHostMsg_InsertFrame,
155 int32 /* channel_id */,
156 uint32 /* ssrc */,
157 media::cast::EncodedFrame /* audio/video frame */)
159 IPC_MESSAGE_CONTROL4(
160 CastHostMsg_SendSenderReport,
161 int32 /* channel_id */,
162 uint32 /* ssrc */,
163 base::TimeTicks /* current_time */,
164 uint32 /* current_time_as_rtp_timestamp */)
166 IPC_MESSAGE_CONTROL3(
167 CastHostMsg_CancelSendingFrames,
168 int32 /* channel_id */,
169 uint32 /* ssrc */,
170 std::vector<uint32> /* frame_ids */)
172 IPC_MESSAGE_CONTROL3(
173 CastHostMsg_ResendFrameForKickstart,
174 int32 /* channel_id */,
175 uint32 /* ssrc */,
176 uint32 /* frame_id */)
178 IPC_MESSAGE_CONTROL2(
179 CastHostMsg_AddValidSsrc,
180 int32 /* channel id */,
181 uint32 /* ssrc */)
183 IPC_MESSAGE_CONTROL2(
184 CastHostMsg_SendRtcpFromRtpReceiver,
185 int32 /* channel id */,
186 media::cast::SendRtcpFromRtpReceiver_Params /* data */)
188 IPC_MESSAGE_CONTROL4(
189 CastHostMsg_New,
190 int32 /* channel_id */,
191 net::IPEndPoint /* local_end_point */,
192 net::IPEndPoint /* remote_end_point */,
193 base::DictionaryValue /* options */)
195 IPC_MESSAGE_CONTROL1(
196 CastHostMsg_Delete,
197 int32 /* channel_id */)