OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 android media player. | 5 // IPC messages for android media player. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/time.h" | 10 #include "base/time.h" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 #include "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
13 #include "ipc/ipc_message_macros.h" | 13 #include "ipc/ipc_message_macros.h" |
| 14 #include "media/base/android/media_player_bridge.h" |
14 #include "ui/gfx/rect_f.h" | 15 #include "ui/gfx/rect_f.h" |
15 | 16 |
16 #undef IPC_MESSAGE_EXPORT | 17 #undef IPC_MESSAGE_EXPORT |
17 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 18 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
18 #define IPC_MESSAGE_START MediaPlayerMsgStart | 19 #define IPC_MESSAGE_START MediaPlayerMsgStart |
19 | 20 |
20 #if defined(GOOGLE_TV) | 21 #if defined(GOOGLE_TV) |
21 #include "media/base/android/demuxer_stream_player_params.h" | 22 #include "media/base/android/demuxer_stream_player_params.h" |
22 | 23 |
23 IPC_ENUM_TRAITS(media::AudioCodec) | 24 IPC_ENUM_TRAITS(media::AudioCodec) |
24 IPC_ENUM_TRAITS(media::DemuxerStream::Status) | 25 IPC_ENUM_TRAITS(media::DemuxerStream::Status) |
25 IPC_ENUM_TRAITS(media::DemuxerStream::Type) | 26 IPC_ENUM_TRAITS(media::DemuxerStream::Type) |
| 27 IPC_ENUM_TRAITS(media::MediaPlayerBridge::MediaSource) |
26 IPC_ENUM_TRAITS(media::VideoCodec) | 28 IPC_ENUM_TRAITS(media::VideoCodec) |
27 | 29 |
28 IPC_STRUCT_TRAITS_BEGIN(media::MediaPlayerHostMsg_DemuxerReady_Params) | 30 IPC_STRUCT_TRAITS_BEGIN(media::MediaPlayerHostMsg_DemuxerReady_Params) |
29 IPC_STRUCT_TRAITS_MEMBER(audio_codec) | 31 IPC_STRUCT_TRAITS_MEMBER(audio_codec) |
30 IPC_STRUCT_TRAITS_MEMBER(audio_channels) | 32 IPC_STRUCT_TRAITS_MEMBER(audio_channels) |
31 IPC_STRUCT_TRAITS_MEMBER(audio_sampling_rate) | 33 IPC_STRUCT_TRAITS_MEMBER(audio_sampling_rate) |
32 IPC_STRUCT_TRAITS_MEMBER(is_audio_encrypted) | 34 IPC_STRUCT_TRAITS_MEMBER(is_audio_encrypted) |
33 IPC_STRUCT_TRAITS_MEMBER(audio_extra_data) | 35 IPC_STRUCT_TRAITS_MEMBER(audio_extra_data) |
34 | 36 |
35 IPC_STRUCT_TRAITS_MEMBER(video_codec) | 37 IPC_STRUCT_TRAITS_MEMBER(video_codec) |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 IPC_MESSAGE_ROUTED1(MediaPlayerHostMsg_DestroyMediaPlayer, | 139 IPC_MESSAGE_ROUTED1(MediaPlayerHostMsg_DestroyMediaPlayer, |
138 int /* player_id */) | 140 int /* player_id */) |
139 | 141 |
140 // Destroy all the players. | 142 // Destroy all the players. |
141 IPC_MESSAGE_ROUTED0(MediaPlayerHostMsg_DestroyAllMediaPlayers) | 143 IPC_MESSAGE_ROUTED0(MediaPlayerHostMsg_DestroyAllMediaPlayers) |
142 | 144 |
143 // Initialize a media player object with the given player_id. | 145 // Initialize a media player object with the given player_id. |
144 IPC_MESSAGE_ROUTED4(MediaPlayerHostMsg_MediaPlayerInitialize, | 146 IPC_MESSAGE_ROUTED4(MediaPlayerHostMsg_MediaPlayerInitialize, |
145 int /* player_id */, | 147 int /* player_id */, |
146 GURL /* url */, | 148 GURL /* url */, |
147 bool /* is_media_source */, | 149 media::MediaPlayerBridge::MediaSource /* media_source */, |
148 GURL /* first_party_for_cookies */) | 150 GURL /* first_party_for_cookies */) |
149 | 151 |
150 // Pause the player. | 152 // Pause the player. |
151 IPC_MESSAGE_ROUTED1(MediaPlayerHostMsg_MediaPlayerPause, | 153 IPC_MESSAGE_ROUTED1(MediaPlayerHostMsg_MediaPlayerPause, |
152 int /* player_id */) | 154 int /* player_id */) |
153 | 155 |
154 // Release player resources, but keep the object for future usage. | 156 // Release player resources, but keep the object for future usage. |
155 IPC_MESSAGE_ROUTED1(MediaPlayerHostMsg_MediaPlayerRelease, | 157 IPC_MESSAGE_ROUTED1(MediaPlayerHostMsg_MediaPlayerRelease, |
156 int /* player_id */) | 158 int /* player_id */) |
157 | 159 |
(...skipping 24 matching lines...) Expand all Loading... |
182 // Inform the media source player that the demuxer is ready. | 184 // Inform the media source player that the demuxer is ready. |
183 IPC_MESSAGE_ROUTED2(MediaPlayerHostMsg_DemuxerReady, | 185 IPC_MESSAGE_ROUTED2(MediaPlayerHostMsg_DemuxerReady, |
184 int /* player_id */, | 186 int /* player_id */, |
185 media::MediaPlayerHostMsg_DemuxerReady_Params) | 187 media::MediaPlayerHostMsg_DemuxerReady_Params) |
186 | 188 |
187 // Sent when the data was read from the ChunkDemuxer. | 189 // Sent when the data was read from the ChunkDemuxer. |
188 IPC_MESSAGE_ROUTED2(MediaPlayerHostMsg_ReadFromDemuxerAck, | 190 IPC_MESSAGE_ROUTED2(MediaPlayerHostMsg_ReadFromDemuxerAck, |
189 int /* player_id */, | 191 int /* player_id */, |
190 media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params) | 192 media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params) |
191 #endif | 193 #endif |
OLD | NEW |