Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/ipc/ipdl/PGMPVideoEncoderParent.cpp
Line
Count
Source (jump to first uncovered line)
1
//
2
// Automatically generated by ipdlc.
3
// Edit at your own risk
4
//
5
6
7
#include "mozilla/gmp/PGMPVideoEncoderParent.h"
8
9
#include "mozilla/gmp/PGMPContentParent.h"
10
11
#include "nsIFile.h"
12
#include "GeckoProfiler.h"
13
14
namespace mozilla {
15
namespace gmp {
16
17
18
auto PGMPVideoEncoderParent::Recv__delete__() -> mozilla::ipc::IPCResult
19
0
{
20
0
    return IPC_OK();
21
0
}
22
23
auto PGMPVideoEncoderParent::ActorDestroy(ActorDestroyReason aWhy) -> void
24
0
{
25
0
}
26
27
MOZ_IMPLICIT PGMPVideoEncoderParent::PGMPVideoEncoderParent() :
28
    mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
29
    mLivenessState(mozilla::ipc::LivenessState::Dead)
30
0
{
31
0
    MOZ_COUNT_CTOR(PGMPVideoEncoderParent);
32
0
}
33
34
PGMPVideoEncoderParent::~PGMPVideoEncoderParent()
35
0
{
36
0
    MOZ_COUNT_DTOR(PGMPVideoEncoderParent);
37
0
}
38
39
auto PGMPVideoEncoderParent::Manager() const -> PGMPContentParent*
40
0
{
41
0
    return static_cast<PGMPContentParent*>(IProtocol::Manager());
42
0
}
43
44
auto PGMPVideoEncoderParent::SendInitEncode(
45
        const GMPVideoCodec& aCodecSettings,
46
        const nsTArray<uint8_t>& aCodecSpecific,
47
        const int32_t& aNumberOfCores,
48
        const uint32_t& aMaxPayloadSize) -> bool
49
0
{
50
0
    IPC::Message* msg__ = PGMPVideoEncoder::Msg_InitEncode(Id());
51
0
52
0
    WriteIPDLParam(msg__, this, aCodecSettings);
53
0
    // Sentinel = 'aCodecSettings'
54
0
    (msg__)->WriteSentinel(394896860);
55
0
    WriteIPDLParam(msg__, this, aCodecSpecific);
56
0
    // Sentinel = 'aCodecSpecific'
57
0
    (msg__)->WriteSentinel(3773952059);
58
0
    WriteIPDLParam(msg__, this, aNumberOfCores);
59
0
    // Sentinel = 'aNumberOfCores'
60
0
    (msg__)->WriteSentinel(3247212389);
61
0
    WriteIPDLParam(msg__, this, aMaxPayloadSize);
62
0
    // Sentinel = 'aMaxPayloadSize'
63
0
    (msg__)->WriteSentinel(4078750881);
64
0
65
0
66
0
67
0
68
0
    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoderParent")) {
69
0
        mozilla::ipc::LogMessageForProtocol("PGMPVideoEncoderParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
70
0
    }
71
0
    AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_InitEncode", OTHER);
72
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
73
0
        mozilla::ipc::LogicError("Transition error");
74
0
    }
75
0
76
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
77
0
    return sendok__;
78
0
}
79
80
auto PGMPVideoEncoderParent::SendEncode(
81
        const GMPVideoi420FrameData& aInputFrame,
82
        const nsTArray<uint8_t>& aCodecSpecificInfo,
83
        const nsTArray<GMPVideoFrameType>& aFrameTypes) -> bool
84
0
{
85
0
    IPC::Message* msg__ = PGMPVideoEncoder::Msg_Encode(Id());
86
0
87
0
    WriteIPDLParam(msg__, this, aInputFrame);
88
0
    // Sentinel = 'aInputFrame'
89
0
    (msg__)->WriteSentinel(3664588317);
90
0
    WriteIPDLParam(msg__, this, aCodecSpecificInfo);
91
0
    // Sentinel = 'aCodecSpecificInfo'
92
0
    (msg__)->WriteSentinel(742576219);
93
0
    WriteIPDLParam(msg__, this, aFrameTypes);
94
0
    // Sentinel = 'aFrameTypes'
95
0
    (msg__)->WriteSentinel(2159018888);
96
0
97
0
98
0
99
0
100
0
    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoderParent")) {
101
0
        mozilla::ipc::LogMessageForProtocol("PGMPVideoEncoderParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
102
0
    }
103
0
    AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_Encode", OTHER);
104
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
105
0
        mozilla::ipc::LogicError("Transition error");
106
0
    }
107
0
108
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
109
0
    return sendok__;
110
0
}
111
112
auto PGMPVideoEncoderParent::SendSetChannelParameters(
113
        const uint32_t& aPacketLoss,
114
        const uint32_t& aRTT) -> bool
115
0
{
116
0
    IPC::Message* msg__ = PGMPVideoEncoder::Msg_SetChannelParameters(Id());
117
0
118
0
    WriteIPDLParam(msg__, this, aPacketLoss);
119
0
    // Sentinel = 'aPacketLoss'
120
0
    (msg__)->WriteSentinel(767954619);
121
0
    WriteIPDLParam(msg__, this, aRTT);
122
0
    // Sentinel = 'aRTT'
123
0
    (msg__)->WriteSentinel(1233438341);
124
0
125
0
126
0
127
0
128
0
    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoderParent")) {
129
0
        mozilla::ipc::LogMessageForProtocol("PGMPVideoEncoderParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
130
0
    }
131
0
    AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_SetChannelParameters", OTHER);
132
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
133
0
        mozilla::ipc::LogicError("Transition error");
134
0
    }
135
0
136
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
137
0
    return sendok__;
138
0
}
139
140
auto PGMPVideoEncoderParent::SendSetRates(
141
        const uint32_t& aNewBitRate,
142
        const uint32_t& aFrameRate) -> bool
143
0
{
144
0
    IPC::Message* msg__ = PGMPVideoEncoder::Msg_SetRates(Id());
145
0
146
0
    WriteIPDLParam(msg__, this, aNewBitRate);
147
0
    // Sentinel = 'aNewBitRate'
148
0
    (msg__)->WriteSentinel(1554340975);
149
0
    WriteIPDLParam(msg__, this, aFrameRate);
150
0
    // Sentinel = 'aFrameRate'
151
0
    (msg__)->WriteSentinel(770773236);
152
0
153
0
154
0
155
0
156
0
    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoderParent")) {
157
0
        mozilla::ipc::LogMessageForProtocol("PGMPVideoEncoderParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
158
0
    }
159
0
    AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_SetRates", OTHER);
160
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
161
0
        mozilla::ipc::LogicError("Transition error");
162
0
    }
163
0
164
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
165
0
    return sendok__;
166
0
}
167
168
auto PGMPVideoEncoderParent::SendSetPeriodicKeyFrames(const bool& aEnable) -> bool
169
0
{
170
0
    IPC::Message* msg__ = PGMPVideoEncoder::Msg_SetPeriodicKeyFrames(Id());
171
0
172
0
    WriteIPDLParam(msg__, this, aEnable);
173
0
    // Sentinel = 'aEnable'
174
0
    (msg__)->WriteSentinel(163837555);
175
0
176
0
177
0
178
0
179
0
    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoderParent")) {
180
0
        mozilla::ipc::LogMessageForProtocol("PGMPVideoEncoderParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
181
0
    }
182
0
    AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_SetPeriodicKeyFrames", OTHER);
183
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
184
0
        mozilla::ipc::LogicError("Transition error");
185
0
    }
186
0
187
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
188
0
    return sendok__;
189
0
}
190
191
auto PGMPVideoEncoderParent::SendEncodingComplete() -> bool
192
0
{
193
0
    IPC::Message* msg__ = PGMPVideoEncoder::Msg_EncodingComplete(Id());
194
0
195
0
196
0
197
0
198
0
199
0
    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoderParent")) {
200
0
        mozilla::ipc::LogMessageForProtocol("PGMPVideoEncoderParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
201
0
    }
202
0
    AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_EncodingComplete", OTHER);
203
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
204
0
        mozilla::ipc::LogicError("Transition error");
205
0
    }
206
0
207
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
208
0
    return sendok__;
209
0
}
210
211
auto PGMPVideoEncoderParent::SendChildShmemForPool(Shmem& aEncodedBuffer) -> bool
212
0
{
213
0
    IPC::Message* msg__ = PGMPVideoEncoder::Msg_ChildShmemForPool(Id());
214
0
215
0
    WriteIPDLParam(msg__, this, aEncodedBuffer);
216
0
    // Sentinel = 'aEncodedBuffer'
217
0
    (msg__)->WriteSentinel(3335299401);
218
0
219
0
220
0
221
0
222
0
    if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoderParent")) {
223
0
        mozilla::ipc::LogMessageForProtocol("PGMPVideoEncoderParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
224
0
    }
225
0
    AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_ChildShmemForPool", OTHER);
226
0
    if ((!(StateTransition(false, (&(mLivenessState)))))) {
227
0
        mozilla::ipc::LogicError("Transition error");
228
0
    }
229
0
230
0
    bool sendok__ = (GetIPCChannel())->Send(msg__);
231
0
    return sendok__;
232
0
}
233
234
auto PGMPVideoEncoderParent::RemoveManagee(
235
        int32_t aProtocolId,
236
        IProtocol* aListener) -> void
237
0
{
238
0
    FatalError("unreached");
239
0
    return;
240
0
}
241
242
auto PGMPVideoEncoderParent::OnMessageReceived(const Message& msg__) -> PGMPVideoEncoderParent::Result
243
0
{
244
0
    switch ((msg__).type()) {
245
0
    case PGMPVideoEncoder::Msg___delete____ID:
246
0
        {
247
0
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoderParent")) {
248
0
                mozilla::ipc::LogMessageForProtocol("PGMPVideoEncoderParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
249
0
            }
250
0
            AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg___delete__", OTHER);
251
0
252
0
            PickleIterator iter__(msg__);
253
0
            PGMPVideoEncoderParent* actor;
254
0
255
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(actor)))))) {
256
0
                FatalError("Error deserializing 'PGMPVideoEncoderParent'");
257
0
                return MsgValueError;
258
0
            }
259
0
            if ((!((*((&(actor))))))) {
260
0
                FatalError("Error deserializing 'PGMPVideoEncoderParent'");
261
0
                return MsgValueError;
262
0
            }
263
0
            // Sentinel = 'actor'
264
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
265
0
                mozilla::ipc::SentinelReadError("Error deserializing 'PGMPVideoEncoderParent'");
266
0
                return MsgValueError;
267
0
            }
268
0
            (msg__).EndRead(iter__, (msg__).type());
269
0
            if ((!(StateTransition(true, (&(mLivenessState)))))) {
270
0
                FatalError("Transition error");
271
0
                return MsgValueError;
272
0
            }
273
0
            if ((!(Recv__delete__()))) {
274
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
275
0
                // Error handled in mozilla::ipc::IPCResult
276
0
                return MsgProcessingError;
277
0
            }
278
0
279
0
280
0
            IProtocol* mgr = (actor)->Manager();
281
0
            (actor)->DestroySubtree(Deletion);
282
0
            (actor)->DeallocSubtree();
283
0
            (mgr)->RemoveManagee(PGMPVideoEncoderMsgStart, actor);
284
0
285
0
            return MsgProcessed;
286
0
        }
287
0
    case PGMPVideoEncoder::Msg_Encoded__ID:
288
0
        {
289
0
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoderParent")) {
290
0
                mozilla::ipc::LogMessageForProtocol("PGMPVideoEncoderParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
291
0
            }
292
0
            AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_Encoded", OTHER);
293
0
294
0
            PickleIterator iter__(msg__);
295
0
            GMPVideoEncodedFrameData aEncodedFrame;
296
0
            nsTArray<uint8_t> aCodecSpecificInfo;
297
0
298
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aEncodedFrame)))))) {
299
0
                FatalError("Error deserializing 'GMPVideoEncodedFrameData'");
300
0
                return MsgValueError;
301
0
            }
302
0
            // Sentinel = 'aEncodedFrame'
303
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3455883009)))) {
304
0
                mozilla::ipc::SentinelReadError("Error deserializing 'GMPVideoEncodedFrameData'");
305
0
                return MsgValueError;
306
0
            }
307
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aCodecSpecificInfo)))))) {
308
0
                FatalError("Error deserializing 'nsTArray'");
309
0
                return MsgValueError;
310
0
            }
311
0
            // Sentinel = 'aCodecSpecificInfo'
312
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 742576219)))) {
313
0
                mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'");
314
0
                return MsgValueError;
315
0
            }
316
0
            (msg__).EndRead(iter__, (msg__).type());
317
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
318
0
                FatalError("Transition error");
319
0
                return MsgValueError;
320
0
            }
321
0
            if ((!(RecvEncoded(aEncodedFrame, std::move(aCodecSpecificInfo))))) {
322
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
323
0
                // Error handled in mozilla::ipc::IPCResult
324
0
                return MsgProcessingError;
325
0
            }
326
0
327
0
            return MsgProcessed;
328
0
        }
329
0
    case PGMPVideoEncoder::Msg_Error__ID:
330
0
        {
331
0
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoderParent")) {
332
0
                mozilla::ipc::LogMessageForProtocol("PGMPVideoEncoderParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
333
0
            }
334
0
            AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_Error", OTHER);
335
0
336
0
            PickleIterator iter__(msg__);
337
0
            GMPErr aErr;
338
0
339
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aErr)))))) {
340
0
                FatalError("Error deserializing 'GMPErr'");
341
0
                return MsgValueError;
342
0
            }
343
0
            // Sentinel = 'aErr'
344
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 540683382)))) {
345
0
                mozilla::ipc::SentinelReadError("Error deserializing 'GMPErr'");
346
0
                return MsgValueError;
347
0
            }
348
0
            (msg__).EndRead(iter__, (msg__).type());
349
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
350
0
                FatalError("Transition error");
351
0
                return MsgValueError;
352
0
            }
353
0
            if ((!(RecvError(aErr)))) {
354
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
355
0
                // Error handled in mozilla::ipc::IPCResult
356
0
                return MsgProcessingError;
357
0
            }
358
0
359
0
            return MsgProcessed;
360
0
        }
361
0
    case PGMPVideoEncoder::Msg_Shutdown__ID:
362
0
        {
363
0
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoderParent")) {
364
0
                mozilla::ipc::LogMessageForProtocol("PGMPVideoEncoderParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
365
0
            }
366
0
            AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_Shutdown", OTHER);
367
0
368
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
369
0
                FatalError("Transition error");
370
0
                return MsgValueError;
371
0
            }
372
0
            if ((!(RecvShutdown()))) {
373
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
374
0
                // Error handled in mozilla::ipc::IPCResult
375
0
                return MsgProcessingError;
376
0
            }
377
0
378
0
            return MsgProcessed;
379
0
        }
380
0
    case PGMPVideoEncoder::Msg_ParentShmemForPool__ID:
381
0
        {
382
0
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoderParent")) {
383
0
                mozilla::ipc::LogMessageForProtocol("PGMPVideoEncoderParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
384
0
            }
385
0
            AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_ParentShmemForPool", OTHER);
386
0
387
0
            PickleIterator iter__(msg__);
388
0
            Shmem aFrameBuffer;
389
0
390
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aFrameBuffer)))))) {
391
0
                FatalError("Error deserializing 'Shmem'");
392
0
                return MsgValueError;
393
0
            }
394
0
            // Sentinel = 'aFrameBuffer'
395
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3888831322)))) {
396
0
                mozilla::ipc::SentinelReadError("Error deserializing 'Shmem'");
397
0
                return MsgValueError;
398
0
            }
399
0
            (msg__).EndRead(iter__, (msg__).type());
400
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
401
0
                FatalError("Transition error");
402
0
                return MsgValueError;
403
0
            }
404
0
            if ((!(RecvParentShmemForPool(std::move(aFrameBuffer))))) {
405
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
406
0
                // Error handled in mozilla::ipc::IPCResult
407
0
                return MsgProcessingError;
408
0
            }
409
0
410
0
            return MsgProcessed;
411
0
        }
412
0
    default:
413
0
        {
414
0
            return MsgNotKnown;
415
0
        }
416
0
    }
417
0
}
418
419
auto PGMPVideoEncoderParent::OnMessageReceived(
420
        const Message& msg__,
421
        Message*& reply__) -> PGMPVideoEncoderParent::Result
422
0
{
423
0
    return MsgNotKnown;
424
0
}
425
426
auto PGMPVideoEncoderParent::OnCallReceived(
427
        const Message& msg__,
428
        Message*& reply__) -> PGMPVideoEncoderParent::Result
429
0
{
430
0
    switch ((msg__).type()) {
431
0
    case PGMPVideoEncoder::Msg_NeedShmem__ID:
432
0
        {
433
0
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoderParent")) {
434
0
                mozilla::ipc::LogMessageForProtocol("PGMPVideoEncoderParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
435
0
            }
436
0
            AUTO_PROFILER_LABEL("PGMPVideoEncoder::Msg_NeedShmem", OTHER);
437
0
438
0
            PickleIterator iter__(msg__);
439
0
            uint32_t aEncodedBufferSize;
440
0
441
0
            if ((!(ReadIPDLParam((&(msg__)), (&(iter__)), this, (&(aEncodedBufferSize)))))) {
442
0
                FatalError("Error deserializing 'uint32_t'");
443
0
                return MsgValueError;
444
0
            }
445
0
            // Sentinel = 'aEncodedBufferSize'
446
0
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2299884566)))) {
447
0
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
448
0
                return MsgValueError;
449
0
            }
450
0
            (msg__).EndRead(iter__, (msg__).type());
451
0
            if ((!(StateTransition(false, (&(mLivenessState)))))) {
452
0
                FatalError("Transition error");
453
0
                return MsgValueError;
454
0
            }
455
0
            int32_t id__ = Id();
456
0
            Shmem aMem;
457
0
            if ((!(AnswerNeedShmem(aEncodedBufferSize, (&(aMem)))))) {
458
0
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
459
0
                // Error handled in mozilla::ipc::IPCResult
460
0
                return MsgProcessingError;
461
0
            }
462
0
463
0
            reply__ = PGMPVideoEncoder::Reply_NeedShmem(id__);
464
0
465
0
            WriteIPDLParam(reply__, this, aMem);
466
0
            // Sentinel = 'aMem'
467
0
            (reply__)->WriteSentinel(3574578916);
468
0
469
0
            if (mozilla::ipc::LoggingEnabledFor("PGMPVideoEncoderParent")) {
470
0
                mozilla::ipc::LogMessageForProtocol("PGMPVideoEncoderParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending);
471
0
            }
472
0
            return MsgProcessed;
473
0
        }
474
0
    default:
475
0
        {
476
0
            return MsgNotKnown;
477
0
        }
478
0
    }
479
0
}
480
481
auto PGMPVideoEncoderParent::GetProtocolTypeId() -> int32_t
482
0
{
483
0
    return PGMPVideoEncoderMsgStart;
484
0
}
485
486
auto PGMPVideoEncoderParent::DestroySubtree(ActorDestroyReason why) -> void
487
0
{
488
0
    // Unregister from our manager.
489
0
    Unregister(Id());
490
0
491
0
    // Reject owning pending responses.
492
0
    (GetIPCChannel())->RejectPendingResponsesForActor(this);
493
0
494
0
    // Finally, destroy "us".
495
0
    ActorDestroy(why);
496
0
}
497
498
auto PGMPVideoEncoderParent::DeallocSubtree() -> void
499
0
{
500
0
}
501
502
503
504
} // namespace gmp
505
} // namespace mozilla
506
namespace mozilla {
507
namespace ipc {
508
auto IPDLParamTraits<mozilla::gmp::PGMPVideoEncoderParent>::Write(
509
        IPC::Message* aMsg,
510
        mozilla::ipc::IProtocol* aActor,
511
        const paramType& aVar) -> void
512
0
{
513
0
    int32_t id;
514
0
    if ((!(aVar))) {
515
0
        id = 0;
516
0
    }
517
0
    else {
518
0
        id = (aVar)->Id();
519
0
        if ((1) == (id)) {
520
0
            (aActor)->FatalError("actor has been |delete|d");
521
0
        }
522
0
    }
523
0
    WriteIPDLParam(aMsg, aActor, id);
524
0
}
525
526
auto IPDLParamTraits<mozilla::gmp::PGMPVideoEncoderParent>::Read(
527
        const IPC::Message* aMsg,
528
        PickleIterator* aIter,
529
        mozilla::ipc::IProtocol* aActor,
530
        paramType* aVar) -> bool
531
0
{
532
0
    mozilla::Maybe<mozilla::ipc::IProtocol*> actor = (aActor)->ReadActor(aMsg, aIter, true, "PGMPVideoEncoder", PGMPVideoEncoderMsgStart);
533
0
    if ((actor).isNothing()) {
534
0
        return false;
535
0
    }
536
0
537
0
    (*(aVar)) = static_cast<mozilla::gmp::PGMPVideoEncoderParent*>((actor).value());
538
0
    return true;
539
0
}
540
541
} // namespace ipc
542
} // namespace mozilla