Chromium Code Reviews| 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" | 14 #include "net/base/net_util.h" |
|
wtc
2014/07/11 22:31:35
Nit: you should not need to include net/base/net_u
Alpha Left Google
2014/07/12 01:37:54
Done.
| |
| 15 | 15 |
| 16 #undef IPC_MESSAGE_EXPORT | 16 #undef IPC_MESSAGE_EXPORT |
| 17 #define IPC_MESSAGE_EXPORT | 17 #define IPC_MESSAGE_EXPORT |
| 18 #define IPC_MESSAGE_START CastMsgStart | 18 #define IPC_MESSAGE_START CastMsgStart |
| 19 | 19 |
| 20 IPC_ENUM_TRAITS_MAX_VALUE( | 20 IPC_ENUM_TRAITS_MAX_VALUE( |
| 21 media::cast::transport::EncodedFrame::Dependency, | 21 media::cast::EncodedFrame::Dependency, |
| 22 media::cast::transport::EncodedFrame::DEPENDENCY_LAST) | 22 media::cast::EncodedFrame::DEPENDENCY_LAST) |
| 23 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::transport::Codec, | 23 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::Codec, |
| 24 media::cast::transport::CODEC_LAST) | 24 media::cast::CODEC_LAST) |
| 25 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::transport::CastTransportStatus, | 25 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::CastTransportStatus, |
| 26 media::cast::transport::CAST_TRANSPORT_STATUS_LAST) | 26 media::cast::CAST_TRANSPORT_STATUS_LAST) |
| 27 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::CastLoggingEvent, | 27 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::CastLoggingEvent, |
| 28 media::cast::kNumOfLoggingEvents) | 28 media::cast::kNumOfLoggingEvents) |
| 29 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::EventMediaType, | 29 IPC_ENUM_TRAITS_MAX_VALUE(media::cast::EventMediaType, |
| 30 media::cast::EVENT_MEDIA_TYPE_LAST) | 30 media::cast::EVENT_MEDIA_TYPE_LAST) |
| 31 | 31 |
| 32 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::EncodedFrame) | 32 IPC_STRUCT_TRAITS_BEGIN(media::cast::EncodedFrame) |
| 33 IPC_STRUCT_TRAITS_MEMBER(dependency) | 33 IPC_STRUCT_TRAITS_MEMBER(dependency) |
| 34 IPC_STRUCT_TRAITS_MEMBER(frame_id) | 34 IPC_STRUCT_TRAITS_MEMBER(frame_id) |
| 35 IPC_STRUCT_TRAITS_MEMBER(referenced_frame_id) | 35 IPC_STRUCT_TRAITS_MEMBER(referenced_frame_id) |
| 36 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp) | 36 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp) |
| 37 IPC_STRUCT_TRAITS_MEMBER(reference_time) | 37 IPC_STRUCT_TRAITS_MEMBER(reference_time) |
| 38 IPC_STRUCT_TRAITS_MEMBER(data) | 38 IPC_STRUCT_TRAITS_MEMBER(data) |
| 39 IPC_STRUCT_TRAITS_END() | 39 IPC_STRUCT_TRAITS_END() |
| 40 | 40 |
| 41 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::RtcpDlrrReportBlock) | 41 IPC_STRUCT_TRAITS_BEGIN(media::cast::RtcpDlrrReportBlock) |
| 42 IPC_STRUCT_TRAITS_MEMBER(last_rr) | 42 IPC_STRUCT_TRAITS_MEMBER(last_rr) |
| 43 IPC_STRUCT_TRAITS_MEMBER(delay_since_last_rr) | 43 IPC_STRUCT_TRAITS_MEMBER(delay_since_last_rr) |
| 44 IPC_STRUCT_TRAITS_END() | 44 IPC_STRUCT_TRAITS_END() |
| 45 | 45 |
| 46 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::CastTransportRtpConfig) | 46 IPC_STRUCT_TRAITS_BEGIN(media::cast::CastTransportRtpConfig) |
| 47 IPC_STRUCT_TRAITS_MEMBER(ssrc) | 47 IPC_STRUCT_TRAITS_MEMBER(ssrc) |
| 48 IPC_STRUCT_TRAITS_MEMBER(rtp_payload_type) | 48 IPC_STRUCT_TRAITS_MEMBER(rtp_payload_type) |
| 49 IPC_STRUCT_TRAITS_MEMBER(stored_frames) | 49 IPC_STRUCT_TRAITS_MEMBER(stored_frames) |
| 50 IPC_STRUCT_TRAITS_MEMBER(aes_key) | 50 IPC_STRUCT_TRAITS_MEMBER(aes_key) |
| 51 IPC_STRUCT_TRAITS_MEMBER(aes_iv_mask) | 51 IPC_STRUCT_TRAITS_MEMBER(aes_iv_mask) |
| 52 IPC_STRUCT_TRAITS_END() | 52 IPC_STRUCT_TRAITS_END() |
| 53 | 53 |
| 54 IPC_STRUCT_TRAITS_BEGIN(media::cast::transport::SendRtcpFromRtpSenderData) | 54 IPC_STRUCT_TRAITS_BEGIN(media::cast::SendRtcpFromRtpSenderData) |
| 55 IPC_STRUCT_TRAITS_MEMBER(packet_type_flags) | 55 IPC_STRUCT_TRAITS_MEMBER(packet_type_flags) |
| 56 IPC_STRUCT_TRAITS_MEMBER(sending_ssrc) | 56 IPC_STRUCT_TRAITS_MEMBER(sending_ssrc) |
| 57 IPC_STRUCT_TRAITS_MEMBER(c_name) | 57 IPC_STRUCT_TRAITS_MEMBER(c_name) |
| 58 IPC_STRUCT_TRAITS_MEMBER(ntp_seconds) | 58 IPC_STRUCT_TRAITS_MEMBER(ntp_seconds) |
| 59 IPC_STRUCT_TRAITS_MEMBER(ntp_fraction) | 59 IPC_STRUCT_TRAITS_MEMBER(ntp_fraction) |
| 60 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp) | 60 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp) |
| 61 IPC_STRUCT_TRAITS_END() | 61 IPC_STRUCT_TRAITS_END() |
| 62 | 62 |
| 63 IPC_STRUCT_TRAITS_BEGIN(media::cast::PacketEvent) | 63 IPC_STRUCT_TRAITS_BEGIN(media::cast::PacketEvent) |
| 64 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp) | 64 IPC_STRUCT_TRAITS_MEMBER(rtp_timestamp) |
| 65 IPC_STRUCT_TRAITS_MEMBER(frame_id) | 65 IPC_STRUCT_TRAITS_MEMBER(frame_id) |
| 66 IPC_STRUCT_TRAITS_MEMBER(max_packet_id) | 66 IPC_STRUCT_TRAITS_MEMBER(max_packet_id) |
| 67 IPC_STRUCT_TRAITS_MEMBER(packet_id) | 67 IPC_STRUCT_TRAITS_MEMBER(packet_id) |
| 68 IPC_STRUCT_TRAITS_MEMBER(size) | 68 IPC_STRUCT_TRAITS_MEMBER(size) |
| 69 IPC_STRUCT_TRAITS_MEMBER(timestamp) | 69 IPC_STRUCT_TRAITS_MEMBER(timestamp) |
| 70 IPC_STRUCT_TRAITS_MEMBER(type) | 70 IPC_STRUCT_TRAITS_MEMBER(type) |
| 71 IPC_STRUCT_TRAITS_MEMBER(media_type) | 71 IPC_STRUCT_TRAITS_MEMBER(media_type) |
| 72 IPC_STRUCT_TRAITS_END() | 72 IPC_STRUCT_TRAITS_END() |
| 73 | 73 |
| 74 // Cast messages sent from the browser to the renderer. | 74 // Cast messages sent from the browser to the renderer. |
| 75 | 75 |
| 76 IPC_MESSAGE_CONTROL2(CastMsg_ReceivedPacket, | 76 IPC_MESSAGE_CONTROL2(CastMsg_ReceivedPacket, |
| 77 int32 /* channel_id */, | 77 int32 /* channel_id */, |
| 78 media::cast::Packet /* packet */) | 78 media::cast::Packet /* packet */) |
| 79 | 79 |
| 80 IPC_MESSAGE_CONTROL2( | 80 IPC_MESSAGE_CONTROL2( |
| 81 CastMsg_NotifyStatusChange, | 81 CastMsg_NotifyStatusChange, |
| 82 int32 /* channel_id */, | 82 int32 /* channel_id */, |
| 83 media::cast::transport::CastTransportStatus /* status */) | 83 media::cast::CastTransportStatus /* status */) |
| 84 | 84 |
| 85 IPC_MESSAGE_CONTROL2(CastMsg_RawEvents, | 85 IPC_MESSAGE_CONTROL2(CastMsg_RawEvents, |
| 86 int32 /* channel_id */, | 86 int32 /* channel_id */, |
| 87 std::vector<media::cast::PacketEvent> /* packet_events */) | 87 std::vector<media::cast::PacketEvent> /* packet_events */) |
| 88 | 88 |
| 89 // Cast messages sent from the renderer to the browser. | 89 // Cast messages sent from the renderer to the browser. |
| 90 | 90 |
| 91 IPC_MESSAGE_CONTROL2( | 91 IPC_MESSAGE_CONTROL2( |
| 92 CastHostMsg_InitializeAudio, | 92 CastHostMsg_InitializeAudio, |
| 93 int32 /*channel_id*/, | 93 int32 /*channel_id*/, |
| 94 media::cast::transport::CastTransportRtpConfig /*config*/) | 94 media::cast::CastTransportRtpConfig /*config*/) |
| 95 | 95 |
| 96 IPC_MESSAGE_CONTROL2( | 96 IPC_MESSAGE_CONTROL2( |
| 97 CastHostMsg_InitializeVideo, | 97 CastHostMsg_InitializeVideo, |
| 98 int32 /*channel_id*/, | 98 int32 /*channel_id*/, |
| 99 media::cast::transport::CastTransportRtpConfig /*config*/) | 99 media::cast::CastTransportRtpConfig /*config*/) |
| 100 | 100 |
| 101 IPC_MESSAGE_CONTROL2( | 101 IPC_MESSAGE_CONTROL2( |
| 102 CastHostMsg_InsertCodedAudioFrame, | 102 CastHostMsg_InsertCodedAudioFrame, |
| 103 int32 /* channel_id */, | 103 int32 /* channel_id */, |
| 104 media::cast::transport::EncodedFrame /* audio_frame */) | 104 media::cast::EncodedFrame /* audio_frame */) |
| 105 | 105 |
| 106 IPC_MESSAGE_CONTROL2( | 106 IPC_MESSAGE_CONTROL2( |
| 107 CastHostMsg_InsertCodedVideoFrame, | 107 CastHostMsg_InsertCodedVideoFrame, |
| 108 int32 /* channel_id */, | 108 int32 /* channel_id */, |
| 109 media::cast::transport::EncodedFrame /* video_frame */) | 109 media::cast::EncodedFrame /* video_frame */) |
| 110 | 110 |
| 111 IPC_MESSAGE_CONTROL3( | 111 IPC_MESSAGE_CONTROL3( |
| 112 CastHostMsg_SendRtcpFromRtpSender, | 112 CastHostMsg_SendRtcpFromRtpSender, |
| 113 int32 /* channel_id */, | 113 int32 /* channel_id */, |
| 114 media::cast::transport::SendRtcpFromRtpSenderData /* data */, | 114 media::cast::SendRtcpFromRtpSenderData /* data */, |
| 115 media::cast::transport::RtcpDlrrReportBlock /* dlrr */) | 115 media::cast::RtcpDlrrReportBlock /* dlrr */) |
| 116 | 116 |
| 117 IPC_MESSAGE_CONTROL5( | 117 IPC_MESSAGE_CONTROL5( |
| 118 CastHostMsg_ResendPackets, | 118 CastHostMsg_ResendPackets, |
| 119 int32 /* channel_id */, | 119 int32 /* channel_id */, |
| 120 bool /* is_audio */, | 120 bool /* is_audio */, |
| 121 media::cast::MissingFramesAndPacketsMap /* missing_packets */, | 121 media::cast::MissingFramesAndPacketsMap /* missing_packets */, |
| 122 bool /* cancel_rtx_if_not_in_list */, | 122 bool /* cancel_rtx_if_not_in_list */, |
| 123 base::TimeDelta /* dedupe_window */) | 123 base::TimeDelta /* dedupe_window */) |
| 124 | 124 |
| 125 IPC_MESSAGE_CONTROL2( | 125 IPC_MESSAGE_CONTROL2( |
| 126 CastHostMsg_New, | 126 CastHostMsg_New, |
| 127 int32 /* channel_id */, | 127 int32 /* channel_id */, |
| 128 net::IPEndPoint /*remote_end_point*/) | 128 net::IPEndPoint /*remote_end_point*/) |
| 129 | 129 |
| 130 IPC_MESSAGE_CONTROL1( | 130 IPC_MESSAGE_CONTROL1( |
| 131 CastHostMsg_Delete, | 131 CastHostMsg_Delete, |
| 132 int32 /* channel_id */) | 132 int32 /* channel_id */) |
| OLD | NEW |