| 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/rtcp/rtcp_defines.h" | 11 #include "media/cast/rtcp/rtcp_defines.h" |
| 11 #include "media/cast/transport/cast_transport_sender.h" | 12 #include "media/cast/transport/cast_transport_sender.h" |
| 12 #include "net/base/ip_endpoint.h" | 13 #include "net/base/ip_endpoint.h" |
| 13 #include "net/base/net_util.h" | 14 #include "net/base/net_util.h" |
| 14 | 15 |
| 15 #undef IPC_MESSAGE_EXPORT | 16 #undef IPC_MESSAGE_EXPORT |
| 16 #define IPC_MESSAGE_EXPORT | 17 #define IPC_MESSAGE_EXPORT |
| 17 #define IPC_MESSAGE_START CastMsgStart | 18 #define IPC_MESSAGE_START CastMsgStart |
| 18 | 19 |
| 19 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::transport::AudioCodec, | 20 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::transport::AudioCodec, |
| 20 media::cast::transport::kAudioCodecLast) | 21 media::cast::transport::kAudioCodecLast) |
| 21 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::transport::VideoCodec, | 22 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::transport::VideoCodec, |
| 22 media::cast::transport::kVideoCodecLast) | 23 media::cast::transport::kVideoCodecLast) |
| 23 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::transport::RtcpSenderFrameStatus, | 24 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::transport::RtcpSenderFrameStatus, |
| 24 media::cast::transport::kRtcpSenderFrameStatusLast) | 25 media::cast::transport::kRtcpSenderFrameStatusLast) |
| 25 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::transport::CastTransportStatus, | 26 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::transport::CastTransportStatus, |
| 26 media::cast::transport::CAST_TRANSPORT_STATUS_LAST) | 27 media::cast::transport::CAST_TRANSPORT_STATUS_LAST) |
| 28 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::CastLoggingEvent, |
| 29 media::cast::kNumOfLoggingEvents) |
| 27 | 30 |
| 28 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::EncodedAudioFrame) | 31 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::EncodedAudioFrame) |
| 29 IPC_STRUCT_TRAITS_MEMBER(codec) | 32 IPC_STRUCT_TRAITS_MEMBER(codec) |
| 30 IPC_STRUCT_TRAITS_MEMBER(frame_id) | 33 IPC_STRUCT_TRAITS_MEMBER(frame_id) |
| 31 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp) | 34 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp) |
| 32 IPC_STRUCT_TRAITS_MEMBER(data) | 35 IPC_STRUCT_TRAITS_MEMBER(data) |
| 33 IPC_STRUCT_TRAITS_END() | 36 IPC_STRUCT_TRAITS_END() |
| 34 | 37 |
| 35 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::EncodedVideoFrame) | 38 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::EncodedVideoFrame) |
| 36 IPC_STRUCT_TRAITS_MEMBER(codec) | 39 IPC_STRUCT_TRAITS_MEMBER(codec) |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 IPC_STRUCT_TRAITS_MEMBER(aes_key) | 81 IPC_STRUCT_TRAITS_MEMBER(aes_key) |
| 79 IPC_STRUCT_TRAITS_MEMBER(aes_iv_mask) | 82 IPC_STRUCT_TRAITS_MEMBER(aes_iv_mask) |
| 80 IPC_STRUCT_TRAITS_END() | 83 IPC_STRUCT_TRAITS_END() |
| 81 | 84 |
| 82 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::SendRtcpFromRtpSenderData) | 85 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::SendRtcpFromRtpSenderData) |
| 83 IPC_STRUCT_TRAITS_MEMBER(packet_type_flags) | 86 IPC_STRUCT_TRAITS_MEMBER(packet_type_flags) |
| 84 IPC_STRUCT_TRAITS_MEMBER(sending_ssrc) | 87 IPC_STRUCT_TRAITS_MEMBER(sending_ssrc) |
| 85 IPC_STRUCT_TRAITS_MEMBER(c_name) | 88 IPC_STRUCT_TRAITS_MEMBER(c_name) |
| 86 IPC_STRUCT_TRAITS_END() | 89 IPC_STRUCT_TRAITS_END() |
| 87 | 90 |
| 91 IPC_STRUCT_TRAITS_BEGIN(media::cast::PacketEvent) |
| 92 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp) |
| 93 IPC_STRUCT_TRAITS_MEMBER(frame_id) |
| 94 IPC_STRUCT_TRAITS_MEMBER(max_packet_id) |
| 95 IPC_STRUCT_TRAITS_MEMBER(packet_id) |
| 96 IPC_STRUCT_TRAITS_MEMBER(size) |
| 97 IPC_STRUCT_TRAITS_MEMBER(timestamp) |
| 98 IPC_STRUCT_TRAITS_MEMBER(type) |
| 99 IPC_STRUCT_TRAITS_END() |
| 100 |
| 101 IPC_STRUCT_TRAITS_BEGIN(media::cast::CastLoggingConfig) |
| 102 IPC_STRUCT_TRAITS_MEMBER(enable_raw_data_collection) |
| 103 IPC_STRUCT_TRAITS_MEMBER(enable_stats_data_collection) |
| 104 IPC_STRUCT_TRAITS_MEMBER(enable_tracing) |
| 105 IPC_STRUCT_TRAITS_END() |
| 88 | 106 |
| 89 // Cast messages sent from the browser to the renderer. | 107 // Cast messages sent from the browser to the renderer. |
| 90 | 108 |
| 91 IPC_MESSAGE_CONTROL2(CastMsg_ReceivedPacket, | 109 IPC_MESSAGE_CONTROL2(CastMsg_ReceivedPacket, |
| 92 int32 /* channel_id */, | 110 int32 /* channel_id */, |
| 93 media::cast::Packet /* packet */); | 111 media::cast::Packet /* packet */); |
| 94 | 112 |
| 95 IPC_MESSAGE_CONTROL2( | 113 IPC_MESSAGE_CONTROL2( |
| 96 CastMsg_NotifyStatusChange, | 114 CastMsg_NotifyStatusChange, |
| 97 int32 /* channel_id */, | 115 int32 /* channel_id */, |
| 98 media::cast::transport::CastTransportStatus /* status */); | 116 media::cast::transport::CastTransportStatus /* status */); |
| 99 | 117 |
| 100 IPC_MESSAGE_CONTROL5( | 118 IPC_MESSAGE_CONTROL5( |
| 101 CastMsg_RtpStatistics, | 119 CastMsg_RtpStatistics, |
| 102 int32 /* channel_id */, | 120 int32 /* channel_id */, |
| 103 bool /* audio */, | 121 bool /* audio */, |
| 104 media::cast::transport::RtcpSenderInfo /* sender_info */, | 122 media::cast::transport::RtcpSenderInfo /* sender_info */, |
| 105 base::TimeTicks /* time_sent */, | 123 base::TimeTicks /* time_sent */, |
| 106 uint32 /* rtp_timestamp */); | 124 uint32 /* rtp_timestamp */); |
| 107 | 125 |
| 126 IPC_MESSAGE_CONTROL2(CastMsg_RawEvents, |
| 127 int32 /* channel_id */, |
| 128 std::vector<media::cast::PacketEvent> /* packet_events */); |
| 108 | 129 |
| 109 // Cast messages sent from the renderer to the browser. | 130 // Cast messages sent from the renderer to the browser. |
| 110 | 131 |
| 111 IPC_MESSAGE_CONTROL3( | 132 IPC_MESSAGE_CONTROL3( |
| 112 CastHostMsg_InsertCodedAudioFrame, | 133 CastHostMsg_InsertCodedAudioFrame, |
| 113 int32 /* channel_id */, | 134 int32 /* channel_id */, |
| 114 media::cast::transport::EncodedAudioFrame /* audio_frame */, | 135 media::cast::transport::EncodedAudioFrame /* audio_frame */, |
| 115 base::TimeTicks /* recorded_time */) | 136 base::TimeTicks /* recorded_time */) |
| 116 | 137 |
| 117 IPC_MESSAGE_CONTROL3( | 138 IPC_MESSAGE_CONTROL3( |
| 118 CastHostMsg_InsertCodedVideoFrame, | 139 CastHostMsg_InsertCodedVideoFrame, |
| 119 int32 /* channel_id */, | 140 int32 /* channel_id */, |
| 120 media::cast::transport::EncodedVideoFrame /* video_frame */, | 141 media::cast::transport::EncodedVideoFrame /* video_frame */, |
| 121 base::TimeTicks /* recorded_time */) | 142 base::TimeTicks /* recorded_time */) |
| 122 | 143 |
| 123 IPC_MESSAGE_CONTROL5( | 144 IPC_MESSAGE_CONTROL5( |
| 124 CastHostMsg_SendRtcpFromRtpSender, | 145 CastHostMsg_SendRtcpFromRtpSender, |
| 125 int32 /* channel_id */, | 146 int32 /* channel_id */, |
| 126 media::cast::transport::SendRtcpFromRtpSenderData /* flags, ssrc, name */, | 147 media::cast::transport::SendRtcpFromRtpSenderData /* flags, ssrc, name */, |
| 127 media::cast::transport::RtcpSenderInfo /* sender_info */, | 148 media::cast::transport::RtcpSenderInfo /* sender_info */, |
| 128 media::cast::transport::RtcpDlrrReportBlock /* dlrr */, | 149 media::cast::transport::RtcpDlrrReportBlock /* dlrr */, |
| 129 media::cast::transport::RtcpSenderLogMessage /* sender_log */) | 150 media::cast::transport::RtcpSenderLogMessage /* sender_log */) |
| 130 | 151 |
| 131 IPC_MESSAGE_CONTROL3( | 152 IPC_MESSAGE_CONTROL3( |
| 132 CastHostMsg_ResendPackets, | 153 CastHostMsg_ResendPackets, |
| 133 int32 /* channel_id */, | 154 int32 /* channel_id */, |
| 134 bool /* is_audio */, | 155 bool /* is_audio */, |
| 135 media::cast::MissingFramesAndPacketsMap /* missing_packets */) | 156 media::cast::MissingFramesAndPacketsMap /* missing_packets */) |
| 136 | 157 |
| 137 IPC_MESSAGE_CONTROL2( | 158 IPC_MESSAGE_CONTROL3( |
| 138 CastHostMsg_New, | 159 CastHostMsg_New, |
| 139 int32 /* channel_id */, | 160 int32 /* channel_id */, |
| 140 media::cast::transport::CastTransportConfig /* config */); | 161 media::cast::transport::CastTransportConfig /* config */, |
| 162 media::cast::CastLoggingConfig /* logging_config */); |
| 141 | 163 |
| 142 IPC_MESSAGE_CONTROL1( | 164 IPC_MESSAGE_CONTROL1( |
| 143 CastHostMsg_Delete, | 165 CastHostMsg_Delete, |
| 144 int32 /* channel_id */); | 166 int32 /* channel_id */); |
| OLD | NEW |