Delete unused downloads page asset.
[chromium-blink-merge.git] / chromecast / common / media / cma_messages.h
blob1edb9827794b29ccbdc8ee710b96c45d788bc303
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
3 // found in the LICENSE file.
5 // IPC messages for the Cast Media Acceleration (CMA) pipeline.
6 // Multiply-included message file, hence no include guard.
8 #include "chromecast/common/media/cma_ipc_common.h"
9 #include "chromecast/common/media/cma_param_traits.h"
10 #include "chromecast/common/media/cma_param_traits_macros.h"
11 #include "chromecast/media/cma/pipeline/load_type.h"
12 #include "content/public/common/common_param_traits.h"
13 #include "ipc/ipc_message_macros.h"
14 #include "media/base/audio_decoder_config.h"
15 #include "media/base/buffering_state.h"
16 #include "media/base/pipeline_status.h"
17 #include "media/base/video_decoder_config.h"
18 #include "ui/gfx/ipc/gfx_param_traits.h"
20 #undef IPC_MESSAGE_EXPORT
21 #define IPC_MESSAGE_EXPORT
22 #define IPC_MESSAGE_START CastMediaMsgStart
24 // Messages sent from the renderer to the browser process.
26 IPC_MESSAGE_CONTROL2(CmaHostMsg_CreateMedia,
27 int /* Media pipeline ID */,
28 chromecast::media::LoadType /* Load type */)
29 IPC_MESSAGE_CONTROL1(CmaHostMsg_DestroyMedia,
30 int /* Media pipeline ID */)
31 IPC_MESSAGE_CONTROL3(CmaHostMsg_SetCdm,
32 int /* Media pipeline ID */,
33 int /* render_frame_id */,
34 int /* cdm_id */)
35 IPC_MESSAGE_CONTROL2(CmaHostMsg_StartPlayingFrom,
36 int /* Media pipeline ID */,
37 base::TimeDelta /* Timestamp */)
38 IPC_MESSAGE_CONTROL1(CmaHostMsg_Flush,
39 int /* Media pipeline ID */)
40 IPC_MESSAGE_CONTROL1(CmaHostMsg_Stop,
41 int /* Media pipeline ID */)
42 IPC_MESSAGE_CONTROL2(CmaHostMsg_SetPlaybackRate,
43 int /* Media pipeline ID */,
44 double /* Playback rate */)
46 IPC_MESSAGE_CONTROL3(CmaHostMsg_CreateAvPipe,
47 int /* Media pipeline ID */,
48 chromecast::media::TrackId /* Track ID */,
49 size_t /* Fifo size */)
50 IPC_MESSAGE_CONTROL3(CmaHostMsg_AudioInitialize,
51 int /* Media pipeline ID */,
52 chromecast::media::TrackId /* Track ID */,
53 ::media::AudioDecoderConfig /* Audio config */)
54 IPC_MESSAGE_CONTROL3(CmaHostMsg_VideoInitialize,
55 int /* Media pipeline ID */,
56 chromecast::media::TrackId /* Track ID */,
57 /* Video Config */
58 std::vector<::media::VideoDecoderConfig>)
59 IPC_MESSAGE_CONTROL3(CmaHostMsg_SetVolume,
60 int /* Media pipeline ID */,
61 chromecast::media::TrackId /* Track ID */,
62 float /* Volume */)
63 IPC_MESSAGE_CONTROL2(CmaHostMsg_NotifyPipeWrite,
64 int /* Media pipeline ID */,
65 chromecast::media::TrackId /* Track ID */)
67 IPC_MESSAGE_CONTROL5(CmaHostMsg_NotifyExternalSurface,
68 int /* Surface ID */,
69 gfx::PointF /* Quad video top left */,
70 gfx::PointF /* Quad video top right */,
71 gfx::PointF /* Quad video bottim right */,
72 gfx::PointF /* Quad video bottom left */)
74 // Messages from the browser to the renderer process.
76 IPC_MESSAGE_CONTROL2(CmaMsg_MediaStateChanged,
77 int /* Media pipeline ID */,
78 media::PipelineStatus /* Status */)
79 IPC_MESSAGE_CONTROL4(CmaMsg_TimeUpdate,
80 int /* Media pipeline ID */,
81 base::TimeDelta /* Media time */,
82 base::TimeDelta /* Max media time */,
83 base::TimeTicks /* STC */)
84 IPC_MESSAGE_CONTROL2(CmaMsg_BufferingNotification,
85 int /* Media pipeline ID */,
86 media::BufferingState /* Buffering state */)
88 IPC_MESSAGE_CONTROL5(CmaMsg_AvPipeCreated,
89 int /* Media pipeline ID */,
90 chromecast::media::TrackId /* Track ID */,
91 bool /* Status */,
92 base::SharedMemoryHandle /* Shared memory */,
93 base::FileDescriptor /* socket handle */)
94 IPC_MESSAGE_CONTROL3(CmaMsg_TrackStateChanged,
95 int /* Media pipeline ID */,
96 chromecast::media::TrackId /* Track ID */,
97 media::PipelineStatus /* Status */)
98 IPC_MESSAGE_CONTROL2(CmaMsg_NotifyPipeRead,
99 int /* Media pipeline ID */,
100 chromecast::media::TrackId /* Track ID */)
102 IPC_MESSAGE_CONTROL2(CmaMsg_Eos,
103 int /* Media pipeline ID */,
104 chromecast::media::TrackId /* Track ID */)
105 IPC_MESSAGE_CONTROL3(CmaMsg_PlaybackError,
106 int /* Media pipeline ID */,
107 chromecast::media::TrackId /* Track ID */,
108 media::PipelineStatus /* status */)
109 IPC_MESSAGE_CONTROL3(CmaMsg_PlaybackStatistics,
110 int /* Media pipeline ID */,
111 chromecast::media::TrackId /* Track ID */,
112 media::PipelineStatistics /* status */)
113 IPC_MESSAGE_CONTROL3(CmaMsg_NaturalSizeChanged,
114 int /* Media pipeline ID */,
115 chromecast::media::TrackId /* Track ID */,
116 gfx::Size /* Size */)