UNPKG

mediasoup

Version:

Cutting Edge WebRTC Video Conferencing

62 lines (61 loc) 2.48 kB
"use strict"; // automatically generated by the FlatBuffers compiler, do not modify Object.defineProperty(exports, "__esModule", { value: true }); exports.RtcpTupleNotificationT = exports.RtcpTupleNotification = void 0; /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */ const flatbuffers = require("flatbuffers"); const tuple_1 = require("../../fbs/transport/tuple"); class RtcpTupleNotification { bb = null; bb_pos = 0; __init(i, bb) { this.bb_pos = i; this.bb = bb; return this; } static getRootAsRtcpTupleNotification(bb, obj) { return (obj || new RtcpTupleNotification()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } static getSizePrefixedRootAsRtcpTupleNotification(bb, obj) { bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); return (obj || new RtcpTupleNotification()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } tuple(obj) { const offset = this.bb.__offset(this.bb_pos, 4); return offset ? (obj || new tuple_1.Tuple()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; } static startRtcpTupleNotification(builder) { builder.startObject(1); } static addTuple(builder, tupleOffset) { builder.addFieldOffset(0, tupleOffset, 0); } static endRtcpTupleNotification(builder) { const offset = builder.endObject(); builder.requiredField(offset, 4); // tuple return offset; } static createRtcpTupleNotification(builder, tupleOffset) { RtcpTupleNotification.startRtcpTupleNotification(builder); RtcpTupleNotification.addTuple(builder, tupleOffset); return RtcpTupleNotification.endRtcpTupleNotification(builder); } unpack() { return new RtcpTupleNotificationT((this.tuple() !== null ? this.tuple().unpack() : null)); } unpackTo(_o) { _o.tuple = (this.tuple() !== null ? this.tuple().unpack() : null); } } exports.RtcpTupleNotification = RtcpTupleNotification; class RtcpTupleNotificationT { tuple; constructor(tuple = null) { this.tuple = tuple; } pack(builder) { const tuple = (this.tuple !== null ? this.tuple.pack(builder) : 0); return RtcpTupleNotification.createRtcpTupleNotification(builder, tuple); } } exports.RtcpTupleNotificationT = RtcpTupleNotificationT;