Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/dom/PVideoDecoderChild.h"
8 :
9 : #include "mozilla/dom/PVideoDecoderManagerChild.h"
10 :
11 : #include "nsIFile.h"
12 : #include "GeckoProfiler.h"
13 :
14 : namespace mozilla {
15 : namespace dom {
16 :
17 :
18 0 : auto PVideoDecoderChild::ActorDestroy(ActorDestroyReason aWhy) -> void
19 : {
20 0 : }
21 :
22 0 : MOZ_IMPLICIT PVideoDecoderChild::PVideoDecoderChild() :
23 : mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
24 0 : mState(PVideoDecoder::__Dead)
25 : {
26 0 : MOZ_COUNT_CTOR(PVideoDecoderChild);
27 0 : }
28 :
29 0 : PVideoDecoderChild::~PVideoDecoderChild()
30 : {
31 0 : MOZ_COUNT_DTOR(PVideoDecoderChild);
32 0 : }
33 :
34 0 : auto PVideoDecoderChild::Manager() const -> PVideoDecoderManagerChild*
35 : {
36 0 : return static_cast<PVideoDecoderManagerChild*>(IProtocol::Manager());
37 : }
38 :
39 0 : auto PVideoDecoderChild::SendInit() -> bool
40 : {
41 0 : IPC::Message* msg__ = PVideoDecoder::Msg_Init(Id());
42 :
43 :
44 :
45 :
46 :
47 0 : if (mozilla::ipc::LoggingEnabledFor("PVideoDecoderChild")) {
48 0 : mozilla::ipc::LogMessageForProtocol("PVideoDecoderChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
49 : }
50 0 : AUTO_PROFILER_LABEL("PVideoDecoder::Msg_Init", OTHER);
51 0 : PVideoDecoder::Transition(PVideoDecoder::Msg_Init__ID, (&(mState)));
52 :
53 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
54 0 : return sendok__;
55 : }
56 :
57 0 : auto PVideoDecoderChild::SendInput(const MediaRawDataIPDL& data) -> bool
58 : {
59 0 : IPC::Message* msg__ = PVideoDecoder::Msg_Input(Id());
60 :
61 0 : Write(data, msg__);
62 : // Sentinel = 'data'
63 0 : (msg__)->WriteSentinel(843352540);
64 :
65 :
66 :
67 :
68 0 : if (mozilla::ipc::LoggingEnabledFor("PVideoDecoderChild")) {
69 0 : mozilla::ipc::LogMessageForProtocol("PVideoDecoderChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
70 : }
71 0 : AUTO_PROFILER_LABEL("PVideoDecoder::Msg_Input", OTHER);
72 0 : PVideoDecoder::Transition(PVideoDecoder::Msg_Input__ID, (&(mState)));
73 :
74 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
75 0 : return sendok__;
76 : }
77 :
78 0 : auto PVideoDecoderChild::SendFlush() -> bool
79 : {
80 0 : IPC::Message* msg__ = PVideoDecoder::Msg_Flush(Id());
81 :
82 :
83 :
84 :
85 :
86 0 : if (mozilla::ipc::LoggingEnabledFor("PVideoDecoderChild")) {
87 0 : mozilla::ipc::LogMessageForProtocol("PVideoDecoderChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
88 : }
89 0 : AUTO_PROFILER_LABEL("PVideoDecoder::Msg_Flush", OTHER);
90 0 : PVideoDecoder::Transition(PVideoDecoder::Msg_Flush__ID, (&(mState)));
91 :
92 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
93 0 : return sendok__;
94 : }
95 :
96 0 : auto PVideoDecoderChild::SendDrain() -> bool
97 : {
98 0 : IPC::Message* msg__ = PVideoDecoder::Msg_Drain(Id());
99 :
100 :
101 :
102 :
103 :
104 0 : if (mozilla::ipc::LoggingEnabledFor("PVideoDecoderChild")) {
105 0 : mozilla::ipc::LogMessageForProtocol("PVideoDecoderChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
106 : }
107 0 : AUTO_PROFILER_LABEL("PVideoDecoder::Msg_Drain", OTHER);
108 0 : PVideoDecoder::Transition(PVideoDecoder::Msg_Drain__ID, (&(mState)));
109 :
110 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
111 0 : return sendok__;
112 : }
113 :
114 0 : auto PVideoDecoderChild::SendShutdown() -> bool
115 : {
116 0 : IPC::Message* msg__ = PVideoDecoder::Msg_Shutdown(Id());
117 :
118 :
119 :
120 :
121 :
122 0 : if (mozilla::ipc::LoggingEnabledFor("PVideoDecoderChild")) {
123 0 : mozilla::ipc::LogMessageForProtocol("PVideoDecoderChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
124 : }
125 0 : AUTO_PROFILER_LABEL("PVideoDecoder::Msg_Shutdown", OTHER);
126 0 : PVideoDecoder::Transition(PVideoDecoder::Msg_Shutdown__ID, (&(mState)));
127 :
128 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
129 0 : return sendok__;
130 : }
131 :
132 0 : auto PVideoDecoderChild::SendSetSeekThreshold(const int64_t& time) -> bool
133 : {
134 0 : IPC::Message* msg__ = PVideoDecoder::Msg_SetSeekThreshold(Id());
135 :
136 0 : Write(time, msg__);
137 : // Sentinel = 'time'
138 0 : (msg__)->WriteSentinel(4231890935);
139 :
140 :
141 :
142 :
143 0 : if (mozilla::ipc::LoggingEnabledFor("PVideoDecoderChild")) {
144 0 : mozilla::ipc::LogMessageForProtocol("PVideoDecoderChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
145 : }
146 0 : AUTO_PROFILER_LABEL("PVideoDecoder::Msg_SetSeekThreshold", OTHER);
147 0 : PVideoDecoder::Transition(PVideoDecoder::Msg_SetSeekThreshold__ID, (&(mState)));
148 :
149 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
150 0 : return sendok__;
151 : }
152 :
153 0 : auto PVideoDecoderChild::Send__delete__(PVideoDecoderChild* actor) -> bool
154 : {
155 0 : if ((!(actor))) {
156 0 : return false;
157 : }
158 :
159 0 : IPC::Message* msg__ = PVideoDecoder::Msg___delete__((actor)->Id());
160 :
161 0 : (actor)->Write(actor, msg__, false);
162 : // Sentinel = 'actor'
163 0 : (msg__)->WriteSentinel(875202478);
164 :
165 :
166 :
167 0 : if (mozilla::ipc::LoggingEnabledFor("PVideoDecoderChild")) {
168 0 : mozilla::ipc::LogMessageForProtocol("PVideoDecoderChild", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
169 : }
170 0 : AUTO_PROFILER_LABEL("PVideoDecoder::Msg___delete__", OTHER);
171 0 : PVideoDecoder::Transition(PVideoDecoder::Msg___delete____ID, (&((actor)->mState)));
172 :
173 0 : bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
174 :
175 0 : IProtocol* mgr = (actor)->Manager();
176 0 : (actor)->DestroySubtree(Deletion);
177 0 : (actor)->DeallocSubtree();
178 0 : (mgr)->RemoveManagee(PVideoDecoderMsgStart, actor);
179 0 : return sendok__;
180 : }
181 :
182 0 : auto PVideoDecoderChild::RemoveManagee(
183 : int32_t aProtocolId,
184 : ProtocolBase* aListener) -> void
185 : {
186 0 : FatalError("unreached");
187 0 : return;
188 : }
189 :
190 0 : auto PVideoDecoderChild::OnMessageReceived(const Message& msg__) -> PVideoDecoderChild::Result
191 : {
192 0 : switch ((msg__).type()) {
193 : case PVideoDecoder::Reply___delete____ID:
194 : {
195 0 : return MsgProcessed;
196 : }
197 : case PVideoDecoder::Msg_InitComplete__ID:
198 : {
199 0 : if (mozilla::ipc::LoggingEnabledFor("PVideoDecoderChild")) {
200 0 : mozilla::ipc::LogMessageForProtocol("PVideoDecoderChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
201 : }
202 0 : AUTO_PROFILER_LABEL("PVideoDecoder::Msg_InitComplete", OTHER);
203 :
204 0 : PickleIterator iter__(msg__);
205 : bool hardware;
206 0 : nsCString hardwareReason;
207 : uint32_t conversion;
208 :
209 0 : if ((!(Read((&(hardware)), (&(msg__)), (&(iter__)))))) {
210 0 : FatalError("Error deserializing 'bool'");
211 0 : return MsgValueError;
212 : }
213 : // Sentinel = 'hardware'
214 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2165251472)))) {
215 0 : mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
216 0 : return MsgValueError;
217 : }
218 0 : if ((!(Read((&(hardwareReason)), (&(msg__)), (&(iter__)))))) {
219 0 : FatalError("Error deserializing 'nsCString'");
220 0 : return MsgValueError;
221 : }
222 : // Sentinel = 'hardwareReason'
223 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 360765986)))) {
224 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
225 0 : return MsgValueError;
226 : }
227 0 : if ((!(Read((&(conversion)), (&(msg__)), (&(iter__)))))) {
228 0 : FatalError("Error deserializing 'uint32_t'");
229 0 : return MsgValueError;
230 : }
231 : // Sentinel = 'conversion'
232 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1292757922)))) {
233 0 : mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
234 0 : return MsgValueError;
235 : }
236 0 : (msg__).EndRead(iter__, (msg__).type());
237 0 : PVideoDecoder::Transition(PVideoDecoder::Msg_InitComplete__ID, (&(mState)));
238 0 : if ((!(RecvInitComplete(mozilla::Move(hardware), mozilla::Move(hardwareReason), mozilla::Move(conversion))))) {
239 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
240 : // Error handled in mozilla::ipc::IPCResult
241 0 : return MsgProcessingError;
242 : }
243 :
244 0 : return MsgProcessed;
245 : }
246 : case PVideoDecoder::Msg_InitFailed__ID:
247 : {
248 0 : if (mozilla::ipc::LoggingEnabledFor("PVideoDecoderChild")) {
249 0 : mozilla::ipc::LogMessageForProtocol("PVideoDecoderChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
250 : }
251 0 : AUTO_PROFILER_LABEL("PVideoDecoder::Msg_InitFailed", OTHER);
252 :
253 0 : PickleIterator iter__(msg__);
254 : nsresult reason;
255 :
256 0 : if ((!(Read((&(reason)), (&(msg__)), (&(iter__)))))) {
257 0 : FatalError("Error deserializing 'nsresult'");
258 0 : return MsgValueError;
259 : }
260 : // Sentinel = 'reason'
261 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 4151390930)))) {
262 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
263 0 : return MsgValueError;
264 : }
265 0 : (msg__).EndRead(iter__, (msg__).type());
266 0 : PVideoDecoder::Transition(PVideoDecoder::Msg_InitFailed__ID, (&(mState)));
267 0 : if ((!(RecvInitFailed(mozilla::Move(reason))))) {
268 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
269 : // Error handled in mozilla::ipc::IPCResult
270 0 : return MsgProcessingError;
271 : }
272 :
273 0 : return MsgProcessed;
274 : }
275 : case PVideoDecoder::Msg_FlushComplete__ID:
276 : {
277 0 : if (mozilla::ipc::LoggingEnabledFor("PVideoDecoderChild")) {
278 0 : mozilla::ipc::LogMessageForProtocol("PVideoDecoderChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
279 : }
280 0 : AUTO_PROFILER_LABEL("PVideoDecoder::Msg_FlushComplete", OTHER);
281 :
282 0 : PVideoDecoder::Transition(PVideoDecoder::Msg_FlushComplete__ID, (&(mState)));
283 0 : if ((!(RecvFlushComplete()))) {
284 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
285 : // Error handled in mozilla::ipc::IPCResult
286 0 : return MsgProcessingError;
287 : }
288 :
289 0 : return MsgProcessed;
290 : }
291 : case PVideoDecoder::Msg_Output__ID:
292 : {
293 0 : if (mozilla::ipc::LoggingEnabledFor("PVideoDecoderChild")) {
294 0 : mozilla::ipc::LogMessageForProtocol("PVideoDecoderChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
295 : }
296 0 : AUTO_PROFILER_LABEL("PVideoDecoder::Msg_Output", OTHER);
297 :
298 0 : PickleIterator iter__(msg__);
299 0 : VideoDataIPDL data;
300 :
301 0 : if ((!(Read((&(data)), (&(msg__)), (&(iter__)))))) {
302 0 : FatalError("Error deserializing 'VideoDataIPDL'");
303 0 : return MsgValueError;
304 : }
305 : // Sentinel = 'data'
306 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 843352540)))) {
307 0 : mozilla::ipc::SentinelReadError("Error deserializing 'VideoDataIPDL'");
308 0 : return MsgValueError;
309 : }
310 0 : (msg__).EndRead(iter__, (msg__).type());
311 0 : PVideoDecoder::Transition(PVideoDecoder::Msg_Output__ID, (&(mState)));
312 0 : if ((!(RecvOutput(mozilla::Move(data))))) {
313 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
314 : // Error handled in mozilla::ipc::IPCResult
315 0 : return MsgProcessingError;
316 : }
317 :
318 0 : return MsgProcessed;
319 : }
320 : case PVideoDecoder::Msg_InputExhausted__ID:
321 : {
322 0 : if (mozilla::ipc::LoggingEnabledFor("PVideoDecoderChild")) {
323 0 : mozilla::ipc::LogMessageForProtocol("PVideoDecoderChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
324 : }
325 0 : AUTO_PROFILER_LABEL("PVideoDecoder::Msg_InputExhausted", OTHER);
326 :
327 0 : PVideoDecoder::Transition(PVideoDecoder::Msg_InputExhausted__ID, (&(mState)));
328 0 : if ((!(RecvInputExhausted()))) {
329 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
330 : // Error handled in mozilla::ipc::IPCResult
331 0 : return MsgProcessingError;
332 : }
333 :
334 0 : return MsgProcessed;
335 : }
336 : case PVideoDecoder::Msg_DrainComplete__ID:
337 : {
338 0 : if (mozilla::ipc::LoggingEnabledFor("PVideoDecoderChild")) {
339 0 : mozilla::ipc::LogMessageForProtocol("PVideoDecoderChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
340 : }
341 0 : AUTO_PROFILER_LABEL("PVideoDecoder::Msg_DrainComplete", OTHER);
342 :
343 0 : PVideoDecoder::Transition(PVideoDecoder::Msg_DrainComplete__ID, (&(mState)));
344 0 : if ((!(RecvDrainComplete()))) {
345 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
346 : // Error handled in mozilla::ipc::IPCResult
347 0 : return MsgProcessingError;
348 : }
349 :
350 0 : return MsgProcessed;
351 : }
352 : case PVideoDecoder::Msg_Error__ID:
353 : {
354 0 : if (mozilla::ipc::LoggingEnabledFor("PVideoDecoderChild")) {
355 0 : mozilla::ipc::LogMessageForProtocol("PVideoDecoderChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
356 : }
357 0 : AUTO_PROFILER_LABEL("PVideoDecoder::Msg_Error", OTHER);
358 :
359 0 : PickleIterator iter__(msg__);
360 : nsresult error;
361 :
362 0 : if ((!(Read((&(error)), (&(msg__)), (&(iter__)))))) {
363 0 : FatalError("Error deserializing 'nsresult'");
364 0 : return MsgValueError;
365 : }
366 : // Sentinel = 'error'
367 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 313726327)))) {
368 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
369 0 : return MsgValueError;
370 : }
371 0 : (msg__).EndRead(iter__, (msg__).type());
372 0 : PVideoDecoder::Transition(PVideoDecoder::Msg_Error__ID, (&(mState)));
373 0 : if ((!(RecvError(mozilla::Move(error))))) {
374 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
375 : // Error handled in mozilla::ipc::IPCResult
376 0 : return MsgProcessingError;
377 : }
378 :
379 0 : return MsgProcessed;
380 : }
381 : default:
382 : {
383 0 : return MsgNotKnown;
384 : }
385 : }
386 : }
387 :
388 0 : auto PVideoDecoderChild::OnMessageReceived(
389 : const Message& msg__,
390 : Message*& reply__) -> PVideoDecoderChild::Result
391 : {
392 0 : return MsgNotKnown;
393 : }
394 :
395 0 : auto PVideoDecoderChild::OnCallReceived(
396 : const Message& msg__,
397 : Message*& reply__) -> PVideoDecoderChild::Result
398 : {
399 0 : MOZ_ASSERT_UNREACHABLE("message protocol not supported");
400 : return MsgNotKnown;
401 : }
402 :
403 0 : auto PVideoDecoderChild::GetProtocolTypeId() -> int32_t
404 : {
405 0 : return PVideoDecoderMsgStart;
406 : }
407 :
408 0 : auto PVideoDecoderChild::ProtocolName() const -> const char*
409 : {
410 0 : return "PVideoDecoderChild";
411 : }
412 :
413 0 : auto PVideoDecoderChild::DestroySubtree(ActorDestroyReason why) -> void
414 : {
415 : // Unregister from our manager.
416 0 : Unregister(Id());
417 :
418 : // Reject owning pending promises.
419 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
420 :
421 : // Finally, destroy "us".
422 0 : ActorDestroy(why);
423 0 : }
424 :
425 0 : auto PVideoDecoderChild::DeallocSubtree() -> void
426 : {
427 0 : }
428 :
429 0 : auto PVideoDecoderChild::Write(
430 : Shmem& v__,
431 : Message* msg__) -> void
432 : {
433 0 : IPC::WriteParam(msg__, v__);
434 0 : (v__).RevokeRights(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead());
435 0 : (v__).forget(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead());
436 0 : }
437 :
438 0 : auto PVideoDecoderChild::Read(
439 : Shmem* v__,
440 : const Message* msg__,
441 : PickleIterator* iter__) -> bool
442 : {
443 0 : Shmem tmp;
444 0 : if ((!(IPC::ReadParam(msg__, iter__, (&(tmp)))))) {
445 0 : return false;
446 : }
447 :
448 0 : Shmem::id_t shmemid = (tmp).Id(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead());
449 0 : Shmem::SharedMemory* rawmem = LookupSharedMemory(shmemid);
450 0 : if (rawmem) {
451 0 : (*(v__)) = Shmem(Shmem::IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead(), rawmem, shmemid);
452 0 : return true;
453 : }
454 0 : (*(v__)) = Shmem();
455 0 : return true;
456 : }
457 :
458 0 : auto PVideoDecoderChild::Write(
459 : const MediaRawDataIPDL& v__,
460 : Message* msg__) -> void
461 : {
462 0 : Write((v__).base(), msg__);
463 : // Sentinel = 'base'
464 0 : (msg__)->WriteSentinel(4253725395);
465 0 : Write((v__).buffer(), msg__);
466 : // Sentinel = 'buffer'
467 0 : (msg__)->WriteSentinel(4093250504);
468 0 : }
469 :
470 0 : auto PVideoDecoderChild::Read(
471 : MediaRawDataIPDL* v__,
472 : const Message* msg__,
473 : PickleIterator* iter__) -> bool
474 : {
475 0 : if ((!(Read((&((v__)->base())), msg__, iter__)))) {
476 0 : FatalError("Error deserializing 'base' (MediaDataIPDL) member of 'MediaRawDataIPDL'");
477 0 : return false;
478 : }
479 : // Sentinel = 'base'
480 0 : if ((!((msg__)->ReadSentinel(iter__, 4253725395)))) {
481 0 : mozilla::ipc::SentinelReadError("Error deserializing 'base' (MediaDataIPDL) member of 'MediaRawDataIPDL'");
482 0 : return false;
483 : }
484 0 : if ((!(Read((&((v__)->buffer())), msg__, iter__)))) {
485 0 : FatalError("Error deserializing 'buffer' (Shmem) member of 'MediaRawDataIPDL'");
486 0 : return false;
487 : }
488 : // Sentinel = 'buffer'
489 0 : if ((!((msg__)->ReadSentinel(iter__, 4093250504)))) {
490 0 : mozilla::ipc::SentinelReadError("Error deserializing 'buffer' (Shmem) member of 'MediaRawDataIPDL'");
491 0 : return false;
492 : }
493 0 : return true;
494 : }
495 :
496 0 : auto PVideoDecoderChild::Write(
497 : const VideoDataIPDL& v__,
498 : Message* msg__) -> void
499 : {
500 0 : Write((v__).base(), msg__);
501 : // Sentinel = 'base'
502 0 : (msg__)->WriteSentinel(4253725395);
503 0 : Write((v__).display(), msg__);
504 : // Sentinel = 'display'
505 0 : (msg__)->WriteSentinel(3884334973);
506 0 : Write((v__).frameSize(), msg__);
507 : // Sentinel = 'frameSize'
508 0 : (msg__)->WriteSentinel(2459009893);
509 0 : Write((v__).sd(), msg__);
510 : // Sentinel = 'sd'
511 0 : (msg__)->WriteSentinel(2856126975);
512 0 : Write((v__).frameID(), msg__);
513 : // Sentinel = 'frameID'
514 0 : (msg__)->WriteSentinel(3054835247);
515 0 : }
516 :
517 0 : auto PVideoDecoderChild::Read(
518 : VideoDataIPDL* v__,
519 : const Message* msg__,
520 : PickleIterator* iter__) -> bool
521 : {
522 0 : if ((!(Read((&((v__)->base())), msg__, iter__)))) {
523 0 : FatalError("Error deserializing 'base' (MediaDataIPDL) member of 'VideoDataIPDL'");
524 0 : return false;
525 : }
526 : // Sentinel = 'base'
527 0 : if ((!((msg__)->ReadSentinel(iter__, 4253725395)))) {
528 0 : mozilla::ipc::SentinelReadError("Error deserializing 'base' (MediaDataIPDL) member of 'VideoDataIPDL'");
529 0 : return false;
530 : }
531 0 : if ((!(Read((&((v__)->display())), msg__, iter__)))) {
532 0 : FatalError("Error deserializing 'display' (IntSize) member of 'VideoDataIPDL'");
533 0 : return false;
534 : }
535 : // Sentinel = 'display'
536 0 : if ((!((msg__)->ReadSentinel(iter__, 3884334973)))) {
537 0 : mozilla::ipc::SentinelReadError("Error deserializing 'display' (IntSize) member of 'VideoDataIPDL'");
538 0 : return false;
539 : }
540 0 : if ((!(Read((&((v__)->frameSize())), msg__, iter__)))) {
541 0 : FatalError("Error deserializing 'frameSize' (IntSize) member of 'VideoDataIPDL'");
542 0 : return false;
543 : }
544 : // Sentinel = 'frameSize'
545 0 : if ((!((msg__)->ReadSentinel(iter__, 2459009893)))) {
546 0 : mozilla::ipc::SentinelReadError("Error deserializing 'frameSize' (IntSize) member of 'VideoDataIPDL'");
547 0 : return false;
548 : }
549 0 : if ((!(Read((&((v__)->sd())), msg__, iter__)))) {
550 0 : FatalError("Error deserializing 'sd' (SurfaceDescriptorGPUVideo) member of 'VideoDataIPDL'");
551 0 : return false;
552 : }
553 : // Sentinel = 'sd'
554 0 : if ((!((msg__)->ReadSentinel(iter__, 2856126975)))) {
555 0 : mozilla::ipc::SentinelReadError("Error deserializing 'sd' (SurfaceDescriptorGPUVideo) member of 'VideoDataIPDL'");
556 0 : return false;
557 : }
558 0 : if ((!(Read((&((v__)->frameID())), msg__, iter__)))) {
559 0 : FatalError("Error deserializing 'frameID' (int32_t) member of 'VideoDataIPDL'");
560 0 : return false;
561 : }
562 : // Sentinel = 'frameID'
563 0 : if ((!((msg__)->ReadSentinel(iter__, 3054835247)))) {
564 0 : mozilla::ipc::SentinelReadError("Error deserializing 'frameID' (int32_t) member of 'VideoDataIPDL'");
565 0 : return false;
566 : }
567 0 : return true;
568 : }
569 :
570 0 : auto PVideoDecoderChild::Write(
571 : const PVideoDecoderChild* v__,
572 : Message* msg__,
573 : bool nullable__) -> void
574 : {
575 : int32_t id;
576 0 : if ((!(v__))) {
577 0 : if ((!(nullable__))) {
578 0 : FatalError("NULL actor value passed to non-nullable param");
579 : }
580 0 : id = 0;
581 : }
582 : else {
583 0 : id = (v__)->Id();
584 0 : if ((1) == (id)) {
585 0 : FatalError("actor has been |delete|d");
586 : }
587 : }
588 :
589 0 : Write(id, msg__);
590 0 : }
591 :
592 0 : auto PVideoDecoderChild::Read(
593 : PVideoDecoderChild** v__,
594 : const Message* msg__,
595 : PickleIterator* iter__,
596 : bool nullable__) -> bool
597 : {
598 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PVideoDecoder", PVideoDecoderMsgStart);
599 0 : if ((actor).isNothing()) {
600 0 : return false;
601 : }
602 :
603 0 : (*(v__)) = static_cast<PVideoDecoderChild*>((actor).value());
604 0 : return true;
605 : }
606 :
607 0 : auto PVideoDecoderChild::Write(
608 : const SurfaceDescriptorGPUVideo& v__,
609 : Message* msg__) -> void
610 : {
611 0 : Write((v__).handle(), msg__);
612 : // Sentinel = 'handle'
613 0 : (msg__)->WriteSentinel(453975108);
614 0 : }
615 :
616 0 : auto PVideoDecoderChild::Read(
617 : SurfaceDescriptorGPUVideo* v__,
618 : const Message* msg__,
619 : PickleIterator* iter__) -> bool
620 : {
621 0 : if ((!(Read((&((v__)->handle())), msg__, iter__)))) {
622 0 : FatalError("Error deserializing 'handle' (uint64_t) member of 'SurfaceDescriptorGPUVideo'");
623 0 : return false;
624 : }
625 : // Sentinel = 'handle'
626 0 : if ((!((msg__)->ReadSentinel(iter__, 453975108)))) {
627 0 : mozilla::ipc::SentinelReadError("Error deserializing 'handle' (uint64_t) member of 'SurfaceDescriptorGPUVideo'");
628 0 : return false;
629 : }
630 0 : return true;
631 : }
632 :
633 0 : auto PVideoDecoderChild::Write(
634 : const MediaDataIPDL& v__,
635 : Message* msg__) -> void
636 : {
637 0 : Write((v__).offset(), msg__);
638 : // Sentinel = 'offset'
639 0 : (msg__)->WriteSentinel(1369947863);
640 0 : Write((v__).time(), msg__);
641 : // Sentinel = 'time'
642 0 : (msg__)->WriteSentinel(4231890935);
643 0 : Write((v__).timecode(), msg__);
644 : // Sentinel = 'timecode'
645 0 : (msg__)->WriteSentinel(2839730520);
646 0 : Write((v__).duration(), msg__);
647 : // Sentinel = 'duration'
648 0 : (msg__)->WriteSentinel(1938599576);
649 0 : Write((v__).frames(), msg__);
650 : // Sentinel = 'frames'
651 0 : (msg__)->WriteSentinel(3065599768);
652 0 : Write((v__).keyframe(), msg__);
653 : // Sentinel = 'keyframe'
654 0 : (msg__)->WriteSentinel(3591662836);
655 0 : }
656 :
657 0 : auto PVideoDecoderChild::Read(
658 : MediaDataIPDL* v__,
659 : const Message* msg__,
660 : PickleIterator* iter__) -> bool
661 : {
662 0 : if ((!(Read((&((v__)->offset())), msg__, iter__)))) {
663 0 : FatalError("Error deserializing 'offset' (int64_t) member of 'MediaDataIPDL'");
664 0 : return false;
665 : }
666 : // Sentinel = 'offset'
667 0 : if ((!((msg__)->ReadSentinel(iter__, 1369947863)))) {
668 0 : mozilla::ipc::SentinelReadError("Error deserializing 'offset' (int64_t) member of 'MediaDataIPDL'");
669 0 : return false;
670 : }
671 0 : if ((!(Read((&((v__)->time())), msg__, iter__)))) {
672 0 : FatalError("Error deserializing 'time' (int64_t) member of 'MediaDataIPDL'");
673 0 : return false;
674 : }
675 : // Sentinel = 'time'
676 0 : if ((!((msg__)->ReadSentinel(iter__, 4231890935)))) {
677 0 : mozilla::ipc::SentinelReadError("Error deserializing 'time' (int64_t) member of 'MediaDataIPDL'");
678 0 : return false;
679 : }
680 0 : if ((!(Read((&((v__)->timecode())), msg__, iter__)))) {
681 0 : FatalError("Error deserializing 'timecode' (int64_t) member of 'MediaDataIPDL'");
682 0 : return false;
683 : }
684 : // Sentinel = 'timecode'
685 0 : if ((!((msg__)->ReadSentinel(iter__, 2839730520)))) {
686 0 : mozilla::ipc::SentinelReadError("Error deserializing 'timecode' (int64_t) member of 'MediaDataIPDL'");
687 0 : return false;
688 : }
689 0 : if ((!(Read((&((v__)->duration())), msg__, iter__)))) {
690 0 : FatalError("Error deserializing 'duration' (int64_t) member of 'MediaDataIPDL'");
691 0 : return false;
692 : }
693 : // Sentinel = 'duration'
694 0 : if ((!((msg__)->ReadSentinel(iter__, 1938599576)))) {
695 0 : mozilla::ipc::SentinelReadError("Error deserializing 'duration' (int64_t) member of 'MediaDataIPDL'");
696 0 : return false;
697 : }
698 0 : if ((!(Read((&((v__)->frames())), msg__, iter__)))) {
699 0 : FatalError("Error deserializing 'frames' (uint32_t) member of 'MediaDataIPDL'");
700 0 : return false;
701 : }
702 : // Sentinel = 'frames'
703 0 : if ((!((msg__)->ReadSentinel(iter__, 3065599768)))) {
704 0 : mozilla::ipc::SentinelReadError("Error deserializing 'frames' (uint32_t) member of 'MediaDataIPDL'");
705 0 : return false;
706 : }
707 0 : if ((!(Read((&((v__)->keyframe())), msg__, iter__)))) {
708 0 : FatalError("Error deserializing 'keyframe' (bool) member of 'MediaDataIPDL'");
709 0 : return false;
710 : }
711 : // Sentinel = 'keyframe'
712 0 : if ((!((msg__)->ReadSentinel(iter__, 3591662836)))) {
713 0 : mozilla::ipc::SentinelReadError("Error deserializing 'keyframe' (bool) member of 'MediaDataIPDL'");
714 0 : return false;
715 : }
716 0 : return true;
717 : }
718 :
719 :
720 :
721 : } // namespace dom
722 : } // namespace mozilla
|