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