Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / chrome / common / cast_messages.h
blob21c19353e2064d9ba5999d172e2950ff8bfc810c
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(stored_frames)
51 IPC_STRUCT_TRAITS_MEMBER(aes_key)
52 IPC_STRUCT_TRAITS_MEMBER(aes_iv_mask)
53 IPC_STRUCT_TRAITS_END()
55 IPC_STRUCT_TRAITS_BEGIN(media::cast::PacketEvent)
56 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp)
57 IPC_STRUCT_TRAITS_MEMBER(frame_id)
58 IPC_STRUCT_TRAITS_MEMBER(max_packet_id)
59 IPC_STRUCT_TRAITS_MEMBER(packet_id)
60 IPC_STRUCT_TRAITS_MEMBER(size)
61 IPC_STRUCT_TRAITS_MEMBER(timestamp)
62 IPC_STRUCT_TRAITS_MEMBER(type)
63 IPC_STRUCT_TRAITS_MEMBER(media_type)
64 IPC_STRUCT_TRAITS_END()
66 IPC_STRUCT_TRAITS_BEGIN(media::cast::FrameEvent)
67 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp)
68 IPC_STRUCT_TRAITS_MEMBER(frame_id)
69 IPC_STRUCT_TRAITS_MEMBER(size)
70 IPC_STRUCT_TRAITS_MEMBER(timestamp)
71 IPC_STRUCT_TRAITS_MEMBER(type)
72 IPC_STRUCT_TRAITS_MEMBER(media_type)
73 IPC_STRUCT_TRAITS_MEMBER(delay_delta)
74 IPC_STRUCT_TRAITS_MEMBER(key_frame)
75 IPC_STRUCT_TRAITS_MEMBER(target_bitrate)
76 IPC_STRUCT_TRAITS_END()
78 IPC_STRUCT_TRAITS_BEGIN(media::cast::RtcpCastMessage)
79 IPC_STRUCT_TRAITS_MEMBER(media_ssrc)
80 IPC_STRUCT_TRAITS_MEMBER(ack_frame_id)
81 IPC_STRUCT_TRAITS_MEMBER(target_delay_ms)
82 IPC_STRUCT_TRAITS_MEMBER(missing_frames_and_packets)
83 IPC_STRUCT_TRAITS_END()
85 IPC_STRUCT_TRAITS_BEGIN(media::cast::RtcpRttReport)
86 IPC_STRUCT_TRAITS_MEMBER(rtt)
87 IPC_STRUCT_TRAITS_MEMBER(avg_rtt)
88 IPC_STRUCT_TRAITS_MEMBER(min_rtt)
89 IPC_STRUCT_TRAITS_MEMBER(max_rtt)
90 IPC_STRUCT_TRAITS_END()
92 // Cast messages sent from the browser to the renderer.
94 IPC_MESSAGE_CONTROL3(CastMsg_Rtt,
95 int32 /* channel_id */,
96 uint32 /* ssrc */,
97 media::cast::RtcpRttReport /* rtt_report */)
99 IPC_MESSAGE_CONTROL3(CastMsg_RtcpCastMessage,
100 int32 /* channel_id */,
101 uint32 /* ssrc */,
102 media::cast::RtcpCastMessage /* cast_message */)
104 IPC_MESSAGE_CONTROL2(
105 CastMsg_NotifyStatusChange,
106 int32 /* channel_id */,
107 media::cast::CastTransportStatus /* status */)
109 IPC_MESSAGE_CONTROL3(CastMsg_RawEvents,
110 int32 /* channel_id */,
111 std::vector<media::cast::PacketEvent> /* packet_events */,
112 std::vector<media::cast::FrameEvent> /* frame_events */)
114 // Cast messages sent from the renderer to the browser.
116 IPC_MESSAGE_CONTROL2(
117 CastHostMsg_InitializeAudio,
118 int32 /*channel_id*/,
119 media::cast::CastTransportRtpConfig /*config*/)
121 IPC_MESSAGE_CONTROL2(
122 CastHostMsg_InitializeVideo,
123 int32 /*channel_id*/,
124 media::cast::CastTransportRtpConfig /*config*/)
126 IPC_MESSAGE_CONTROL2(
127 CastHostMsg_InsertCodedAudioFrame,
128 int32 /* channel_id */,
129 media::cast::EncodedFrame /* audio_frame */)
131 IPC_MESSAGE_CONTROL2(
132 CastHostMsg_InsertCodedVideoFrame,
133 int32 /* channel_id */,
134 media::cast::EncodedFrame /* video_frame */)
136 IPC_MESSAGE_CONTROL4(
137 CastHostMsg_SendSenderReport,
138 int32 /* channel_id */,
139 uint32 /* ssrc */,
140 base::TimeTicks /* current_time */,
141 uint32 /* current_time_as_rtp_timestamp */)
143 IPC_MESSAGE_CONTROL3(
144 CastHostMsg_CancelSendingFrames,
145 int32 /* channel_id */,
146 uint32 /* ssrc */,
147 std::vector<uint32> /* frame_ids */)
149 IPC_MESSAGE_CONTROL3(
150 CastHostMsg_ResendFrameForKickstart,
151 int32 /* channel_id */,
152 uint32 /* ssrc */,
153 uint32 /* frame_id */)
155 IPC_MESSAGE_CONTROL2(
156 CastHostMsg_New,
157 int32 /* channel_id */,
158 net::IPEndPoint /*remote_end_point*/)
160 IPC_MESSAGE_CONTROL1(
161 CastHostMsg_Delete,
162 int32 /* channel_id */)