OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // IPC messages for the Cast transport API. | 5 // IPC messages for the Cast transport API. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
8 #include "ipc/ipc_message_macros.h" | 8 #include "ipc/ipc_message_macros.h" |
9 #include "media/cast/cast_sender.h" | 9 #include "media/cast/cast_sender.h" |
10 #include "media/cast/logging/logging_defines.h" | 10 #include "media/cast/logging/logging_defines.h" |
11 #include "media/cast/rtcp/rtcp_defines.h" | 11 #include "media/cast/net/cast_transport_sender.h" |
12 #include "media/cast/transport/cast_transport_sender.h" | 12 #include "media/cast/net/rtcp/rtcp_defines.h" |
13 #include "net/base/ip_endpoint.h" | 13 #include "net/base/ip_endpoint.h" |
14 #include "net/base/net_util.h" | |
15 | 14 |
16 #undef IPC_MESSAGE_EXPORT | 15 #undef IPC_MESSAGE_EXPORT |
17 #define IPC_MESSAGE_EXPORT | 16 #define IPC_MESSAGE_EXPORT |
18 #define IPC_MESSAGE_START CastMsgStart | 17 #define IPC_MESSAGE_START CastMsgStart |
19 | 18 |
20 IPC_ENUM_TRAITS_MAX_VALUE( | 19 IPC_ENUM_TRAITS_MAX_VALUE( |
21 media::cast::transport::EncodedFrame::Dependency, | 20 media::cast::EncodedFrame::Dependency, |
22 media::cast::transport::EncodedFrame::DEPENDENCY_LAST) | 21 media::cast::EncodedFrame::DEPENDENCY_LAST) |
23 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::transport::Codec, | 22 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::Codec, |
24 media::cast::transport::CODEC_LAST) | 23 media::cast::CODEC_LAST) |
25 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::transport::CastTransportStatus, | 24 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::CastTransportStatus, |
26 media::cast::transport::CAST_TRANSPORT_STATUS_LAST) | 25 media::cast::CAST_TRANSPORT_STATUS_LAST) |
27 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::CastLoggingEvent, | 26 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::CastLoggingEvent, |
28 media::cast::kNumOfLoggingEvents) | 27 media::cast::kNumOfLoggingEvents) |
29 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::EventMediaType, | 28 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::EventMediaType, |
30 media::cast::EVENT_MEDIA_TYPE_LAST) | 29 media::cast::EVENT_MEDIA_TYPE_LAST) |
31 | 30 |
32 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::EncodedFrame) | 31 IPC_STRUCT_TRAITS_BEGIN(media::cast::EncodedFrame) |
33 IPC_STRUCT_TRAITS_MEMBER(dependency) | 32 IPC_STRUCT_TRAITS_MEMBER(dependency) |
34 IPC_STRUCT_TRAITS_MEMBER(frame_id) | 33 IPC_STRUCT_TRAITS_MEMBER(frame_id) |
35 IPC_STRUCT_TRAITS_MEMBER(referenced_frame_id) | 34 IPC_STRUCT_TRAITS_MEMBER(referenced_frame_id) |
36 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp) | 35 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp) |
37 IPC_STRUCT_TRAITS_MEMBER(reference_time) | 36 IPC_STRUCT_TRAITS_MEMBER(reference_time) |
38 IPC_STRUCT_TRAITS_MEMBER(data) | 37 IPC_STRUCT_TRAITS_MEMBER(data) |
39 IPC_STRUCT_TRAITS_END() | 38 IPC_STRUCT_TRAITS_END() |
40 | 39 |
41 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::RtcpDlrrReportBlock) | 40 IPC_STRUCT_TRAITS_BEGIN(media::cast::RtcpDlrrReportBlock) |
42 IPC_STRUCT_TRAITS_MEMBER(last_rr) | 41 IPC_STRUCT_TRAITS_MEMBER(last_rr) |
43 IPC_STRUCT_TRAITS_MEMBER(delay_since_last_rr) | 42 IPC_STRUCT_TRAITS_MEMBER(delay_since_last_rr) |
44 IPC_STRUCT_TRAITS_END() | 43 IPC_STRUCT_TRAITS_END() |
45 | 44 |
46 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::CastTransportRtpConfig) | 45 IPC_STRUCT_TRAITS_BEGIN(media::cast::CastTransportRtpConfig) |
47 IPC_STRUCT_TRAITS_MEMBER(ssrc) | 46 IPC_STRUCT_TRAITS_MEMBER(ssrc) |
48 IPC_STRUCT_TRAITS_MEMBER(rtp_payload_type) | 47 IPC_STRUCT_TRAITS_MEMBER(rtp_payload_type) |
49 IPC_STRUCT_TRAITS_MEMBER(stored_frames) | 48 IPC_STRUCT_TRAITS_MEMBER(stored_frames) |
50 IPC_STRUCT_TRAITS_MEMBER(aes_key) | 49 IPC_STRUCT_TRAITS_MEMBER(aes_key) |
51 IPC_STRUCT_TRAITS_MEMBER(aes_iv_mask) | 50 IPC_STRUCT_TRAITS_MEMBER(aes_iv_mask) |
52 IPC_STRUCT_TRAITS_END() | 51 IPC_STRUCT_TRAITS_END() |
53 | 52 |
54 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::SendRtcpFromRtpSenderData) | 53 IPC_STRUCT_TRAITS_BEGIN(media::cast::SendRtcpFromRtpSenderData) |
55 IPC_STRUCT_TRAITS_MEMBER(packet_type_flags) | 54 IPC_STRUCT_TRAITS_MEMBER(packet_type_flags) |
56 IPC_STRUCT_TRAITS_MEMBER(sending_ssrc) | 55 IPC_STRUCT_TRAITS_MEMBER(sending_ssrc) |
57 IPC_STRUCT_TRAITS_MEMBER(c_name) | 56 IPC_STRUCT_TRAITS_MEMBER(c_name) |
58 IPC_STRUCT_TRAITS_MEMBER(ntp_seconds) | 57 IPC_STRUCT_TRAITS_MEMBER(ntp_seconds) |
59 IPC_STRUCT_TRAITS_MEMBER(ntp_fraction) | 58 IPC_STRUCT_TRAITS_MEMBER(ntp_fraction) |
60 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp) | 59 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp) |
61 IPC_STRUCT_TRAITS_END() | 60 IPC_STRUCT_TRAITS_END() |
62 | 61 |
63 IPC_STRUCT_TRAITS_BEGIN(media::cast::PacketEvent) | 62 IPC_STRUCT_TRAITS_BEGIN(media::cast::PacketEvent) |
64 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp) | 63 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp) |
65 IPC_STRUCT_TRAITS_MEMBER(frame_id) | 64 IPC_STRUCT_TRAITS_MEMBER(frame_id) |
66 IPC_STRUCT_TRAITS_MEMBER(max_packet_id) | 65 IPC_STRUCT_TRAITS_MEMBER(max_packet_id) |
67 IPC_STRUCT_TRAITS_MEMBER(packet_id) | 66 IPC_STRUCT_TRAITS_MEMBER(packet_id) |
68 IPC_STRUCT_TRAITS_MEMBER(size) | 67 IPC_STRUCT_TRAITS_MEMBER(size) |
69 IPC_STRUCT_TRAITS_MEMBER(timestamp) | 68 IPC_STRUCT_TRAITS_MEMBER(timestamp) |
70 IPC_STRUCT_TRAITS_MEMBER(type) | 69 IPC_STRUCT_TRAITS_MEMBER(type) |
71 IPC_STRUCT_TRAITS_MEMBER(media_type) | 70 IPC_STRUCT_TRAITS_MEMBER(media_type) |
72 IPC_STRUCT_TRAITS_END() | 71 IPC_STRUCT_TRAITS_END() |
73 | 72 |
74 // Cast messages sent from the browser to the renderer. | 73 // Cast messages sent from the browser to the renderer. |
75 | 74 |
76 IPC_MESSAGE_CONTROL2(CastMsg_ReceivedPacket, | 75 IPC_MESSAGE_CONTROL2(CastMsg_ReceivedPacket, |
77 int32 /* channel_id */, | 76 int32 /* channel_id */, |
78 media::cast::Packet /* packet */) | 77 media::cast::Packet /* packet */) |
79 | 78 |
80 IPC_MESSAGE_CONTROL2( | 79 IPC_MESSAGE_CONTROL2( |
81 CastMsg_NotifyStatusChange, | 80 CastMsg_NotifyStatusChange, |
82 int32 /* channel_id */, | 81 int32 /* channel_id */, |
83 media::cast::transport::CastTransportStatus /* status */) | 82 media::cast::CastTransportStatus /* status */) |
84 | 83 |
85 IPC_MESSAGE_CONTROL2(CastMsg_RawEvents, | 84 IPC_MESSAGE_CONTROL2(CastMsg_RawEvents, |
86 int32 /* channel_id */, | 85 int32 /* channel_id */, |
87 std::vector<media::cast::PacketEvent> /* packet_events */) | 86 std::vector<media::cast::PacketEvent> /* packet_events */) |
88 | 87 |
89 // Cast messages sent from the renderer to the browser. | 88 // Cast messages sent from the renderer to the browser. |
90 | 89 |
91 IPC_MESSAGE_CONTROL2( | 90 IPC_MESSAGE_CONTROL2( |
92 CastHostMsg_InitializeAudio, | 91 CastHostMsg_InitializeAudio, |
93 int32 /*channel_id*/, | 92 int32 /*channel_id*/, |
94 media::cast::transport::CastTransportRtpConfig /*config*/) | 93 media::cast::CastTransportRtpConfig /*config*/) |
95 | 94 |
96 IPC_MESSAGE_CONTROL2( | 95 IPC_MESSAGE_CONTROL2( |
97 CastHostMsg_InitializeVideo, | 96 CastHostMsg_InitializeVideo, |
98 int32 /*channel_id*/, | 97 int32 /*channel_id*/, |
99 media::cast::transport::CastTransportRtpConfig /*config*/) | 98 media::cast::CastTransportRtpConfig /*config*/) |
100 | 99 |
101 IPC_MESSAGE_CONTROL2( | 100 IPC_MESSAGE_CONTROL2( |
102 CastHostMsg_InsertCodedAudioFrame, | 101 CastHostMsg_InsertCodedAudioFrame, |
103 int32 /* channel_id */, | 102 int32 /* channel_id */, |
104 media::cast::transport::EncodedFrame /* audio_frame */) | 103 media::cast::EncodedFrame /* audio_frame */) |
105 | 104 |
106 IPC_MESSAGE_CONTROL2( | 105 IPC_MESSAGE_CONTROL2( |
107 CastHostMsg_InsertCodedVideoFrame, | 106 CastHostMsg_InsertCodedVideoFrame, |
108 int32 /* channel_id */, | 107 int32 /* channel_id */, |
109 media::cast::transport::EncodedFrame /* video_frame */) | 108 media::cast::EncodedFrame /* video_frame */) |
110 | 109 |
111 IPC_MESSAGE_CONTROL3( | 110 IPC_MESSAGE_CONTROL3( |
112 CastHostMsg_SendRtcpFromRtpSender, | 111 CastHostMsg_SendRtcpFromRtpSender, |
113 int32 /* channel_id */, | 112 int32 /* channel_id */, |
114 media::cast::transport::SendRtcpFromRtpSenderData /* data */, | 113 media::cast::SendRtcpFromRtpSenderData /* data */, |
115 media::cast::transport::RtcpDlrrReportBlock /* dlrr */) | 114 media::cast::RtcpDlrrReportBlock /* dlrr */) |
116 | 115 |
117 IPC_MESSAGE_CONTROL5( | 116 IPC_MESSAGE_CONTROL5( |
118 CastHostMsg_ResendPackets, | 117 CastHostMsg_ResendPackets, |
119 int32 /* channel_id */, | 118 int32 /* channel_id */, |
120 bool /* is_audio */, | 119 bool /* is_audio */, |
121 media::cast::MissingFramesAndPacketsMap /* missing_packets */, | 120 media::cast::MissingFramesAndPacketsMap /* missing_packets */, |
122 bool /* cancel_rtx_if_not_in_list */, | 121 bool /* cancel_rtx_if_not_in_list */, |
123 base::TimeDelta /* dedupe_window */) | 122 base::TimeDelta /* dedupe_window */) |
124 | 123 |
125 IPC_MESSAGE_CONTROL2( | 124 IPC_MESSAGE_CONTROL2( |
126 CastHostMsg_New, | 125 CastHostMsg_New, |
127 int32 /* channel_id */, | 126 int32 /* channel_id */, |
128 net::IPEndPoint /*remote_end_point*/) | 127 net::IPEndPoint /*remote_end_point*/) |
129 | 128 |
130 IPC_MESSAGE_CONTROL1( | 129 IPC_MESSAGE_CONTROL1( |
131 CastHostMsg_Delete, | 130 CastHostMsg_Delete, |
132 int32 /* channel_id */) | 131 int32 /* channel_id */) |
OLD | NEW |