Enable PPAPI tests for non-SFI mode.
[chromium-blink-merge.git] / chrome / common / cast_messages.h
blob5b91f59a86f51019589c28d00f065d14ce802c30
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/rtcp/rtcp_defines.h"
12 #include "media/cast/transport/cast_transport_sender.h"
13 #include "net/base/ip_endpoint.h"
14 #include "net/base/net_util.h"
16 #undef IPC_MESSAGE_EXPORT
17 #define IPC_MESSAGE_EXPORT
18 #define IPC_MESSAGE_START CastMsgStart
20 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::transport::AudioCodec,
21 media::cast::transport::kAudioCodecLast)
22 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::transport::VideoCodec,
23 media::cast::transport::kVideoCodecLast)
24 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::transport::RtcpSenderFrameStatus,
25 media::cast::transport::kRtcpSenderFrameStatusLast)
26 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::transport::CastTransportStatus,
27 media::cast::transport::CAST_TRANSPORT_STATUS_LAST)
28 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::CastLoggingEvent,
29 media::cast::kNumOfLoggingEvents)
31 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::EncodedAudioFrame)
32 IPC_STRUCT_TRAITS_MEMBER(codec)
33 IPC_STRUCT_TRAITS_MEMBER(frame_id)
34 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp)
35 IPC_STRUCT_TRAITS_MEMBER(data)
36 IPC_STRUCT_TRAITS_END()
38 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::EncodedVideoFrame)
39 IPC_STRUCT_TRAITS_MEMBER(codec)
40 IPC_STRUCT_TRAITS_MEMBER(key_frame)
41 IPC_STRUCT_TRAITS_MEMBER(frame_id)
42 IPC_STRUCT_TRAITS_MEMBER(last_referenced_frame_id)
43 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp)
44 IPC_STRUCT_TRAITS_MEMBER(data)
45 IPC_STRUCT_TRAITS_END()
47 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::RtcpSenderInfo)
48 IPC_STRUCT_TRAITS_MEMBER(ntp_seconds)
49 IPC_STRUCT_TRAITS_MEMBER(ntp_fraction)
50 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp)
51 IPC_STRUCT_TRAITS_MEMBER(send_packet_count)
52 IPC_STRUCT_TRAITS_MEMBER(send_octet_count)
53 IPC_STRUCT_TRAITS_END()
55 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::RtcpDlrrReportBlock)
56 IPC_STRUCT_TRAITS_MEMBER(last_rr)
57 IPC_STRUCT_TRAITS_MEMBER(delay_since_last_rr)
58 IPC_STRUCT_TRAITS_END()
60 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::RtcpSenderFrameLogMessage)
61 IPC_STRUCT_TRAITS_MEMBER(frame_status)
62 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp)
63 IPC_STRUCT_TRAITS_END()
65 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::RtpConfig)
66 IPC_STRUCT_TRAITS_MEMBER(history_ms)
67 IPC_STRUCT_TRAITS_MEMBER(max_delay_ms)
68 IPC_STRUCT_TRAITS_MEMBER(payload_type)
69 IPC_STRUCT_TRAITS_END()
71 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::CastTransportBaseConfig)
72 IPC_STRUCT_TRAITS_MEMBER(ssrc)
73 IPC_STRUCT_TRAITS_MEMBER(rtp_config)
74 IPC_STRUCT_TRAITS_MEMBER(aes_key)
75 IPC_STRUCT_TRAITS_MEMBER(aes_iv_mask)
76 IPC_STRUCT_TRAITS_END()
78 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::CastTransportAudioConfig)
79 IPC_STRUCT_TRAITS_MEMBER(base)
80 IPC_STRUCT_TRAITS_MEMBER(codec)
81 IPC_STRUCT_TRAITS_MEMBER(frequency)
82 IPC_STRUCT_TRAITS_MEMBER(channels)
83 IPC_STRUCT_TRAITS_END()
85 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::CastTransportVideoConfig)
86 IPC_STRUCT_TRAITS_MEMBER(base)
87 IPC_STRUCT_TRAITS_MEMBER(codec)
88 IPC_STRUCT_TRAITS_END()
90 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::SendRtcpFromRtpSenderData)
91 IPC_STRUCT_TRAITS_MEMBER(packet_type_flags)
92 IPC_STRUCT_TRAITS_MEMBER(sending_ssrc)
93 IPC_STRUCT_TRAITS_MEMBER(c_name)
94 IPC_STRUCT_TRAITS_END()
96 IPC_STRUCT_TRAITS_BEGIN(media::cast::PacketEvent)
97 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp)
98 IPC_STRUCT_TRAITS_MEMBER(frame_id)
99 IPC_STRUCT_TRAITS_MEMBER(max_packet_id)
100 IPC_STRUCT_TRAITS_MEMBER(packet_id)
101 IPC_STRUCT_TRAITS_MEMBER(size)
102 IPC_STRUCT_TRAITS_MEMBER(timestamp)
103 IPC_STRUCT_TRAITS_MEMBER(type)
104 IPC_STRUCT_TRAITS_END()
106 // Cast messages sent from the browser to the renderer.
108 IPC_MESSAGE_CONTROL2(CastMsg_ReceivedPacket,
109 int32 /* channel_id */,
110 media::cast::Packet /* packet */);
112 IPC_MESSAGE_CONTROL2(
113 CastMsg_NotifyStatusChange,
114 int32 /* channel_id */,
115 media::cast::transport::CastTransportStatus /* status */);
117 IPC_MESSAGE_CONTROL5(
118 CastMsg_RtpStatistics,
119 int32 /* channel_id */,
120 bool /* audio */,
121 media::cast::transport::RtcpSenderInfo /* sender_info */,
122 base::TimeTicks /* time_sent */,
123 uint32 /* rtp_timestamp */);
125 IPC_MESSAGE_CONTROL2(CastMsg_RawEvents,
126 int32 /* channel_id */,
127 std::vector<media::cast::PacketEvent> /* packet_events */);
129 // Cast messages sent from the renderer to the browser.
131 IPC_MESSAGE_CONTROL2(
132 CastHostMsg_InitializeAudio,
133 int32 /*channel_id*/,
134 media::cast::transport::CastTransportAudioConfig /*config*/)
136 IPC_MESSAGE_CONTROL2(
137 CastHostMsg_InitializeVideo,
138 int32 /*channel_id*/,
139 media::cast::transport::CastTransportVideoConfig /*config*/)
141 IPC_MESSAGE_CONTROL3(
142 CastHostMsg_InsertCodedAudioFrame,
143 int32 /* channel_id */,
144 media::cast::transport::EncodedAudioFrame /* audio_frame */,
145 base::TimeTicks /* recorded_time */)
147 IPC_MESSAGE_CONTROL3(
148 CastHostMsg_InsertCodedVideoFrame,
149 int32 /* channel_id */,
150 media::cast::transport::EncodedVideoFrame /* video_frame */,
151 base::TimeTicks /* recorded_time */)
153 IPC_MESSAGE_CONTROL5(
154 CastHostMsg_SendRtcpFromRtpSender,
155 int32 /* channel_id */,
156 media::cast::transport::SendRtcpFromRtpSenderData /* flags, ssrc, name */,
157 media::cast::transport::RtcpSenderInfo /* sender_info */,
158 media::cast::transport::RtcpDlrrReportBlock /* dlrr */,
159 media::cast::transport::RtcpSenderLogMessage /* sender_log */)
161 IPC_MESSAGE_CONTROL3(
162 CastHostMsg_ResendPackets,
163 int32 /* channel_id */,
164 bool /* is_audio */,
165 media::cast::MissingFramesAndPacketsMap /* missing_packets */)
167 IPC_MESSAGE_CONTROL2(
168 CastHostMsg_New,
169 int32 /* channel_id */,
170 net::IPEndPoint /*remote_end_point*/);
172 IPC_MESSAGE_CONTROL1(
173 CastHostMsg_Delete,
174 int32 /* channel_id */);