Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: content/common/media/media_player_messages_android.h

Issue 181903003: Reland r253665 "Rename MediaKeys*Msg to Cdm*Msg." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "content/common/media/media_player_messages_enums_android.h" 14 #include "content/common/media/media_player_messages_enums_android.h"
15 #include "ipc/ipc_message_macros.h" 15 #include "ipc/ipc_message_macros.h"
16 #include "media/base/android/media_player_android.h" 16 #include "media/base/android/media_player_android.h"
17 #include "media/base/android/demuxer_stream_player_params.h" 17 #include "media/base/android/demuxer_stream_player_params.h"
18 #include "media/base/media_keys.h" 18 #include "media/base/media_keys.h"
19 #include "ui/gfx/rect_f.h" 19 #include "ui/gfx/rect_f.h"
20 #include "url/gurl.h" 20 #include "url/gurl.h"
21 21
22 #undef IPC_MESSAGE_EXPORT 22 #undef IPC_MESSAGE_EXPORT
23 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 23 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
24 #define IPC_MESSAGE_START MediaPlayerMsgStart 24 #define IPC_MESSAGE_START MediaPlayerMsgStart
25 25
26 IPC_ENUM_TRAITS(media::AudioCodec) 26 IPC_ENUM_TRAITS(media::AudioCodec)
27 IPC_ENUM_TRAITS(media::DemuxerStream::Status) 27 IPC_ENUM_TRAITS(media::DemuxerStream::Status)
28 IPC_ENUM_TRAITS(media::DemuxerStream::Type) 28 IPC_ENUM_TRAITS(media::DemuxerStream::Type)
29 IPC_ENUM_TRAITS(media::MediaKeys::KeyError)
30 IPC_ENUM_TRAITS(media::VideoCodec) 29 IPC_ENUM_TRAITS(media::VideoCodec)
31 30
32 IPC_STRUCT_TRAITS_BEGIN(media::DemuxerConfigs) 31 IPC_STRUCT_TRAITS_BEGIN(media::DemuxerConfigs)
33 IPC_STRUCT_TRAITS_MEMBER(audio_codec) 32 IPC_STRUCT_TRAITS_MEMBER(audio_codec)
34 IPC_STRUCT_TRAITS_MEMBER(audio_channels) 33 IPC_STRUCT_TRAITS_MEMBER(audio_channels)
35 IPC_STRUCT_TRAITS_MEMBER(audio_sampling_rate) 34 IPC_STRUCT_TRAITS_MEMBER(audio_sampling_rate)
36 IPC_STRUCT_TRAITS_MEMBER(is_audio_encrypted) 35 IPC_STRUCT_TRAITS_MEMBER(is_audio_encrypted)
37 IPC_STRUCT_TRAITS_MEMBER(audio_extra_data) 36 IPC_STRUCT_TRAITS_MEMBER(audio_extra_data)
38 37
39 IPC_STRUCT_TRAITS_MEMBER(video_codec) 38 IPC_STRUCT_TRAITS_MEMBER(video_codec)
(...skipping 18 matching lines...) Expand all
58 IPC_STRUCT_TRAITS_MEMBER(iv) 57 IPC_STRUCT_TRAITS_MEMBER(iv)
59 IPC_STRUCT_TRAITS_MEMBER(subsamples) 58 IPC_STRUCT_TRAITS_MEMBER(subsamples)
60 IPC_STRUCT_TRAITS_END() 59 IPC_STRUCT_TRAITS_END()
61 60
62 IPC_STRUCT_TRAITS_BEGIN(media::SubsampleEntry) 61 IPC_STRUCT_TRAITS_BEGIN(media::SubsampleEntry)
63 IPC_STRUCT_TRAITS_MEMBER(clear_bytes) 62 IPC_STRUCT_TRAITS_MEMBER(clear_bytes)
64 IPC_STRUCT_TRAITS_MEMBER(cypher_bytes) 63 IPC_STRUCT_TRAITS_MEMBER(cypher_bytes)
65 IPC_STRUCT_TRAITS_END() 64 IPC_STRUCT_TRAITS_END()
66 65
67 IPC_ENUM_TRAITS(MediaPlayerHostMsg_Initialize_Type) 66 IPC_ENUM_TRAITS(MediaPlayerHostMsg_Initialize_Type)
68 IPC_ENUM_TRAITS(MediaKeysHostMsg_CreateSession_Type)
69 67
70 // Chrome for Android seek message sequence is: 68 // Chrome for Android seek message sequence is:
71 // 1. Renderer->Browser MediaPlayerHostMsg_Seek 69 // 1. Renderer->Browser MediaPlayerHostMsg_Seek
72 // This is the beginning of actual seek flow in response to web app requests 70 // This is the beginning of actual seek flow in response to web app requests
73 // for seeks and browser MediaPlayerMsg_SeekRequests. With this message, 71 // for seeks and browser MediaPlayerMsg_SeekRequests. With this message,
74 // the renderer asks browser to perform actual seek. At most one of these 72 // the renderer asks browser to perform actual seek. At most one of these
75 // actual seeks will be in process between this message and renderer's later 73 // actual seeks will be in process between this message and renderer's later
76 // receipt of MediaPlayerMsg_SeekCompleted from the browser. 74 // receipt of MediaPlayerMsg_SeekCompleted from the browser.
77 // 2. Browser->Renderer MediaPlayerMsg_SeekCompleted 75 // 2. Browser->Renderer MediaPlayerMsg_SeekCompleted
78 // Once the browser determines the seek is complete, it sends this message to 76 // Once the browser determines the seek is complete, it sends this message to
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 // |is_request| true if the player is requesting the external surface. 276 // |is_request| true if the player is requesting the external surface.
279 // |rect| the boundary rectangle of the video element. 277 // |rect| the boundary rectangle of the video element.
280 IPC_MESSAGE_ROUTED3(MediaPlayerHostMsg_NotifyExternalSurface, 278 IPC_MESSAGE_ROUTED3(MediaPlayerHostMsg_NotifyExternalSurface,
281 int /* player_id */, 279 int /* player_id */,
282 bool /* is_request */, 280 bool /* is_request */,
283 gfx::RectF /* rect */) 281 gfx::RectF /* rect */)
284 #endif // defined(VIDEO_HOLE) 282 #endif // defined(VIDEO_HOLE)
285 283
286 // Messages for encrypted media extensions API ------------------------------ 284 // Messages for encrypted media extensions API ------------------------------
287 // TODO(xhwang): Move the following messages to a separate file. 285 // TODO(xhwang): Move the following messages to a separate file.
286 #undef IPC_MESSAGE_START
287 #define IPC_MESSAGE_START CdmMsgStart
288 288
289 IPC_MESSAGE_ROUTED3(MediaKeysHostMsg_InitializeCDM, 289 IPC_ENUM_TRAITS(media::MediaKeys::KeyError)
290 IPC_ENUM_TRAITS(CdmHostMsg_CreateSession_Type)
291
292 IPC_MESSAGE_ROUTED3(CdmHostMsg_InitializeCDM,
290 int /* media_keys_id */, 293 int /* media_keys_id */,
291 std::vector<uint8> /* uuid */, 294 std::vector<uint8> /* uuid */,
292 GURL /* frame url */) 295 GURL /* frame url */)
293 296
294 IPC_MESSAGE_ROUTED4(MediaKeysHostMsg_CreateSession, 297 IPC_MESSAGE_ROUTED4(CdmHostMsg_CreateSession,
295 int /* media_keys_id */, 298 int /* media_keys_id */,
296 uint32_t /* session_id */, 299 uint32_t /* session_id */,
297 MediaKeysHostMsg_CreateSession_Type /* type */, 300 CdmHostMsg_CreateSession_Type /* type */,
298 std::vector<uint8> /* init_data */) 301 std::vector<uint8> /* init_data */)
299 302
300 IPC_MESSAGE_ROUTED3(MediaKeysHostMsg_UpdateSession, 303 IPC_MESSAGE_ROUTED3(CdmHostMsg_UpdateSession,
301 int /* media_keys_id */, 304 int /* media_keys_id */,
302 uint32_t /* session_id */, 305 uint32_t /* session_id */,
303 std::vector<uint8> /* response */) 306 std::vector<uint8> /* response */)
304 307
305 IPC_MESSAGE_ROUTED2(MediaKeysHostMsg_ReleaseSession, 308 IPC_MESSAGE_ROUTED2(CdmHostMsg_ReleaseSession,
306 int /* media_keys_id */, 309 int /* media_keys_id */,
307 uint32_t /* session_id */) 310 uint32_t /* session_id */)
308 311
309 IPC_MESSAGE_ROUTED1(MediaKeysHostMsg_DestroyCdm, 312 IPC_MESSAGE_ROUTED1(CdmHostMsg_DestroyCdm,
310 int /* media_keys_id */) 313 int /* media_keys_id */)
311 314
312 IPC_MESSAGE_ROUTED3(MediaKeysMsg_SessionCreated, 315 IPC_MESSAGE_ROUTED3(CdmMsg_SessionCreated,
313 int /* media_keys_id */, 316 int /* media_keys_id */,
314 uint32_t /* session_id */, 317 uint32_t /* session_id */,
315 std::string /* web_session_id */) 318 std::string /* web_session_id */)
316 319
317 IPC_MESSAGE_ROUTED4(MediaKeysMsg_SessionMessage, 320 IPC_MESSAGE_ROUTED4(CdmMsg_SessionMessage,
318 int /* media_keys_id */, 321 int /* media_keys_id */,
319 uint32_t /* session_id */, 322 uint32_t /* session_id */,
320 std::vector<uint8> /* message */, 323 std::vector<uint8> /* message */,
321 GURL /* destination_url */) 324 GURL /* destination_url */)
322 325
323 IPC_MESSAGE_ROUTED2(MediaKeysMsg_SessionReady, 326 IPC_MESSAGE_ROUTED2(CdmMsg_SessionReady,
324 int /* media_keys_id */, 327 int /* media_keys_id */,
325 uint32_t /* session_id */) 328 uint32_t /* session_id */)
326 329
327 IPC_MESSAGE_ROUTED2(MediaKeysMsg_SessionClosed, 330 IPC_MESSAGE_ROUTED2(CdmMsg_SessionClosed,
328 int /* media_keys_id */, 331 int /* media_keys_id */,
329 uint32_t /* session_id */) 332 uint32_t /* session_id */)
330 333
331 IPC_MESSAGE_ROUTED4(MediaKeysMsg_SessionError, 334 IPC_MESSAGE_ROUTED4(CdmMsg_SessionError,
332 int /* media_keys_id */, 335 int /* media_keys_id */,
333 uint32_t /* session_id */, 336 uint32_t /* session_id */,
334 media::MediaKeys::KeyError /* error_code */, 337 media::MediaKeys::KeyError /* error_code */,
335 int /* system_code */) 338 int /* system_code */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698