| 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_android.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 #include "media/base/android/demuxer_stream_player_params.h" | 21 #include "media/base/android/demuxer_stream_player_params.h" |
| 21 | 22 |
| 22 IPC_ENUM_TRAITS(media::AudioCodec) | 23 IPC_ENUM_TRAITS(media::AudioCodec) |
| 23 IPC_ENUM_TRAITS(media::DemuxerStream::Status) | 24 IPC_ENUM_TRAITS(media::DemuxerStream::Status) |
| (...skipping 30 matching lines...) Expand all Loading... |
| 54 IPC_STRUCT_TRAITS_MEMBER(key_id) | 55 IPC_STRUCT_TRAITS_MEMBER(key_id) |
| 55 IPC_STRUCT_TRAITS_MEMBER(iv) | 56 IPC_STRUCT_TRAITS_MEMBER(iv) |
| 56 IPC_STRUCT_TRAITS_MEMBER(subsamples) | 57 IPC_STRUCT_TRAITS_MEMBER(subsamples) |
| 57 IPC_STRUCT_TRAITS_END() | 58 IPC_STRUCT_TRAITS_END() |
| 58 | 59 |
| 59 IPC_STRUCT_TRAITS_BEGIN(media::SubsampleEntry) | 60 IPC_STRUCT_TRAITS_BEGIN(media::SubsampleEntry) |
| 60 IPC_STRUCT_TRAITS_MEMBER(clear_bytes) | 61 IPC_STRUCT_TRAITS_MEMBER(clear_bytes) |
| 61 IPC_STRUCT_TRAITS_MEMBER(cypher_bytes) | 62 IPC_STRUCT_TRAITS_MEMBER(cypher_bytes) |
| 62 IPC_STRUCT_TRAITS_END() | 63 IPC_STRUCT_TRAITS_END() |
| 63 | 64 |
| 65 IPC_ENUM_TRAITS(media::MediaPlayerAndroid::SourceType) |
| 66 |
| 64 // Messages for notifying the render process of media playback status ------- | 67 // Messages for notifying the render process of media playback status ------- |
| 65 | 68 |
| 66 // Media buffering has updated. | 69 // Media buffering has updated. |
| 67 IPC_MESSAGE_ROUTED2(MediaPlayerMsg_MediaBufferingUpdate, | 70 IPC_MESSAGE_ROUTED2(MediaPlayerMsg_MediaBufferingUpdate, |
| 68 int /* player_id */, | 71 int /* player_id */, |
| 69 int /* percent */) | 72 int /* percent */) |
| 70 | 73 |
| 71 // A media playback error has occured. | 74 // A media playback error has occured. |
| 72 IPC_MESSAGE_ROUTED2(MediaPlayerMsg_MediaError, | 75 IPC_MESSAGE_ROUTED2(MediaPlayerMsg_MediaError, |
| 73 int /* player_id */, | 76 int /* player_id */, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 // Messages for controllering the media playback in browser process ---------- | 139 // Messages for controllering the media playback in browser process ---------- |
| 137 | 140 |
| 138 // Destroy the media player object. | 141 // Destroy the media player object. |
| 139 IPC_MESSAGE_ROUTED1(MediaPlayerHostMsg_DestroyMediaPlayer, | 142 IPC_MESSAGE_ROUTED1(MediaPlayerHostMsg_DestroyMediaPlayer, |
| 140 int /* player_id */) | 143 int /* player_id */) |
| 141 | 144 |
| 142 // Destroy all the players. | 145 // Destroy all the players. |
| 143 IPC_MESSAGE_ROUTED0(MediaPlayerHostMsg_DestroyAllMediaPlayers) | 146 IPC_MESSAGE_ROUTED0(MediaPlayerHostMsg_DestroyAllMediaPlayers) |
| 144 | 147 |
| 145 // Initialize a media player object with the given player_id. | 148 // Initialize a media player object with the given player_id. |
| 146 IPC_MESSAGE_ROUTED4(MediaPlayerHostMsg_MediaPlayerInitialize, | 149 IPC_MESSAGE_ROUTED4( |
| 147 int /* player_id */, | 150 MediaPlayerHostMsg_MediaPlayerInitialize, |
| 148 GURL /* url */, | 151 int /* player_id */, |
| 149 bool /* is_media_source */, | 152 GURL /* url */, |
| 150 GURL /* first_party_for_cookies */) | 153 media::MediaPlayerAndroid::SourceType /* source_type */, |
| 154 GURL /* first_party_for_cookies */) |
| 151 | 155 |
| 152 // Pause the player. | 156 // Pause the player. |
| 153 IPC_MESSAGE_ROUTED1(MediaPlayerHostMsg_MediaPlayerPause, | 157 IPC_MESSAGE_ROUTED1(MediaPlayerHostMsg_MediaPlayerPause, |
| 154 int /* player_id */) | 158 int /* player_id */) |
| 155 | 159 |
| 156 // Release player resources, but keep the object for future usage. | 160 // Release player resources, but keep the object for future usage. |
| 157 IPC_MESSAGE_ROUTED1(MediaPlayerHostMsg_MediaPlayerRelease, | 161 IPC_MESSAGE_ROUTED1(MediaPlayerHostMsg_MediaPlayerRelease, |
| 158 int /* player_id */) | 162 int /* player_id */) |
| 159 | 163 |
| 160 // Perform a seek. | 164 // Perform a seek. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 189 media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params) | 193 media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params) |
| 190 | 194 |
| 191 #if defined(GOOGLE_TV) | 195 #if defined(GOOGLE_TV) |
| 192 // Notify the player about the external surface, requesting it if necessary. | 196 // Notify the player about the external surface, requesting it if necessary. |
| 193 IPC_MESSAGE_ROUTED3(MediaPlayerHostMsg_NotifyExternalSurface, | 197 IPC_MESSAGE_ROUTED3(MediaPlayerHostMsg_NotifyExternalSurface, |
| 194 int /* player_id */, | 198 int /* player_id */, |
| 195 bool /* is_request */, | 199 bool /* is_request */, |
| 196 gfx::RectF /* rect */) | 200 gfx::RectF /* rect */) |
| 197 | 201 |
| 198 #endif | 202 #endif |
| OLD | NEW |