@stinkycomputing/sesame-api-client 1.9.0-alpha.1 → 1.10.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -52,6 +52,7 @@ __export(index_exports, {
52
52
  WireProtocol: () => WireProtocol,
53
53
  buildAudioControlFrame: () => buildAudioControlFrame,
54
54
  buildBinaryDataFrame: () => buildBinaryDataFrame,
55
+ buildSourceControlFrame: () => buildSourceControlFrame,
55
56
  buildTransportControlFrame: () => buildTransportControlFrame,
56
57
  getLogger: () => getLogger,
57
58
  getSideData: () => getSideData,
@@ -6082,6 +6083,7 @@ var sesame = $root.sesame = (() => {
6082
6083
  values[valuesById[8] = "SOURCE_TYPE_SRT_STREAM"] = 8;
6083
6084
  values[valuesById[9] = "SOURCE_TYPE_WEBSOCKET"] = 9;
6084
6085
  values[valuesById[10] = "SOURCE_TYPE_MOQ"] = 10;
6086
+ values[valuesById[11] = "SOURCE_TYPE_SCOPE"] = 11;
6085
6087
  return values;
6086
6088
  }();
6087
6089
  sources.DeinterlaceType = function() {
@@ -6132,9 +6134,9 @@ var sesame = $root.sesame = (() => {
6132
6134
  sources.PreprocessStep = function() {
6133
6135
  const valuesById = {}, values = Object.create(valuesById);
6134
6136
  values[valuesById[0] = "PREPROCESS_STEP_UNSPECIFIED"] = 0;
6135
- values[valuesById[1] = "PREPROCESS_STEP_VIDEO_SCOPES"] = 1;
6136
6137
  values[valuesById[2] = "PREPROCESS_STEP_CHROMA_KEY"] = 2;
6137
6138
  values[valuesById[3] = "PREPROCESS_STEP_BLUR"] = 3;
6139
+ values[valuesById[4] = "PREPROCESS_STEP_COLOR_CORRECT"] = 4;
6138
6140
  return values;
6139
6141
  }();
6140
6142
  sources.VideoProcessorParam = function() {
@@ -6331,9 +6333,9 @@ var sesame = $root.sesame = (() => {
6331
6333
  default:
6332
6334
  return "type: enum value expected";
6333
6335
  case 0:
6334
- case 1:
6335
6336
  case 2:
6336
6337
  case 3:
6338
+ case 4:
6337
6339
  break;
6338
6340
  }
6339
6341
  if (message.params != null && message.hasOwnProperty("params")) {
@@ -6364,10 +6366,6 @@ var sesame = $root.sesame = (() => {
6364
6366
  case 0:
6365
6367
  message.type = 0;
6366
6368
  break;
6367
- case "PREPROCESS_STEP_VIDEO_SCOPES":
6368
- case 1:
6369
- message.type = 1;
6370
- break;
6371
6369
  case "PREPROCESS_STEP_CHROMA_KEY":
6372
6370
  case 2:
6373
6371
  message.type = 2;
@@ -6376,6 +6374,10 @@ var sesame = $root.sesame = (() => {
6376
6374
  case 3:
6377
6375
  message.type = 3;
6378
6376
  break;
6377
+ case "PREPROCESS_STEP_COLOR_CORRECT":
6378
+ case 4:
6379
+ message.type = 4;
6380
+ break;
6379
6381
  }
6380
6382
  if (object.params) {
6381
6383
  if (!Array.isArray(object.params))
@@ -7320,6 +7322,175 @@ var sesame = $root.sesame = (() => {
7320
7322
  };
7321
7323
  return RTTSourceConfig;
7322
7324
  }();
7325
+ sources.ScopeMode = function() {
7326
+ const valuesById = {}, values = Object.create(valuesById);
7327
+ values[valuesById[0] = "SCOPE_MODE_UNSPECIFIED"] = 0;
7328
+ values[valuesById[1] = "SCOPE_MODE_WAVEFORM"] = 1;
7329
+ values[valuesById[2] = "SCOPE_MODE_RGB_PARADE"] = 2;
7330
+ values[valuesById[3] = "SCOPE_MODE_VECTORSCOPE"] = 3;
7331
+ values[valuesById[4] = "SCOPE_MODE_AUDIO_PHASE"] = 4;
7332
+ return values;
7333
+ }();
7334
+ sources.ScopeSourceConfig = function() {
7335
+ function ScopeSourceConfig(properties) {
7336
+ if (properties) {
7337
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
7338
+ if (properties[keys[i]] != null)
7339
+ this[keys[i]] = properties[keys[i]];
7340
+ }
7341
+ }
7342
+ ScopeSourceConfig.prototype.compositorId = "";
7343
+ ScopeSourceConfig.prototype.audioMix = "";
7344
+ ScopeSourceConfig.prototype.mode = 0;
7345
+ ScopeSourceConfig.create = function create(properties) {
7346
+ return new ScopeSourceConfig(properties);
7347
+ };
7348
+ ScopeSourceConfig.encode = function encode(message, writer) {
7349
+ if (!writer)
7350
+ writer = $Writer.create();
7351
+ if (message.compositorId != null && Object.hasOwnProperty.call(message, "compositorId"))
7352
+ writer.uint32(
7353
+ /* id 1, wireType 2 =*/
7354
+ 10
7355
+ ).string(message.compositorId);
7356
+ if (message.audioMix != null && Object.hasOwnProperty.call(message, "audioMix"))
7357
+ writer.uint32(
7358
+ /* id 2, wireType 2 =*/
7359
+ 18
7360
+ ).string(message.audioMix);
7361
+ if (message.mode != null && Object.hasOwnProperty.call(message, "mode"))
7362
+ writer.uint32(
7363
+ /* id 3, wireType 0 =*/
7364
+ 24
7365
+ ).int32(message.mode);
7366
+ return writer;
7367
+ };
7368
+ ScopeSourceConfig.encodeDelimited = function encodeDelimited(message, writer) {
7369
+ return this.encode(message, writer).ldelim();
7370
+ };
7371
+ ScopeSourceConfig.decode = function decode(reader, length, error) {
7372
+ if (!(reader instanceof $Reader))
7373
+ reader = $Reader.create(reader);
7374
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.sources.ScopeSourceConfig();
7375
+ while (reader.pos < end) {
7376
+ let tag = reader.uint32();
7377
+ if (tag === error)
7378
+ break;
7379
+ switch (tag >>> 3) {
7380
+ case 1: {
7381
+ message.compositorId = reader.string();
7382
+ break;
7383
+ }
7384
+ case 2: {
7385
+ message.audioMix = reader.string();
7386
+ break;
7387
+ }
7388
+ case 3: {
7389
+ message.mode = reader.int32();
7390
+ break;
7391
+ }
7392
+ default:
7393
+ reader.skipType(tag & 7);
7394
+ break;
7395
+ }
7396
+ }
7397
+ return message;
7398
+ };
7399
+ ScopeSourceConfig.decodeDelimited = function decodeDelimited(reader) {
7400
+ if (!(reader instanceof $Reader))
7401
+ reader = new $Reader(reader);
7402
+ return this.decode(reader, reader.uint32());
7403
+ };
7404
+ ScopeSourceConfig.verify = function verify(message) {
7405
+ if (typeof message !== "object" || message === null)
7406
+ return "object expected";
7407
+ if (message.compositorId != null && message.hasOwnProperty("compositorId")) {
7408
+ if (!$util.isString(message.compositorId))
7409
+ return "compositorId: string expected";
7410
+ }
7411
+ if (message.audioMix != null && message.hasOwnProperty("audioMix")) {
7412
+ if (!$util.isString(message.audioMix))
7413
+ return "audioMix: string expected";
7414
+ }
7415
+ if (message.mode != null && message.hasOwnProperty("mode"))
7416
+ switch (message.mode) {
7417
+ default:
7418
+ return "mode: enum value expected";
7419
+ case 0:
7420
+ case 1:
7421
+ case 2:
7422
+ case 3:
7423
+ case 4:
7424
+ break;
7425
+ }
7426
+ return null;
7427
+ };
7428
+ ScopeSourceConfig.fromObject = function fromObject(object) {
7429
+ if (object instanceof $root.sesame.v1.sources.ScopeSourceConfig)
7430
+ return object;
7431
+ let message = new $root.sesame.v1.sources.ScopeSourceConfig();
7432
+ if (object.compositorId != null)
7433
+ message.compositorId = String(object.compositorId);
7434
+ if (object.audioMix != null)
7435
+ message.audioMix = String(object.audioMix);
7436
+ switch (object.mode) {
7437
+ default:
7438
+ if (typeof object.mode === "number") {
7439
+ message.mode = object.mode;
7440
+ break;
7441
+ }
7442
+ break;
7443
+ case "SCOPE_MODE_UNSPECIFIED":
7444
+ case 0:
7445
+ message.mode = 0;
7446
+ break;
7447
+ case "SCOPE_MODE_WAVEFORM":
7448
+ case 1:
7449
+ message.mode = 1;
7450
+ break;
7451
+ case "SCOPE_MODE_RGB_PARADE":
7452
+ case 2:
7453
+ message.mode = 2;
7454
+ break;
7455
+ case "SCOPE_MODE_VECTORSCOPE":
7456
+ case 3:
7457
+ message.mode = 3;
7458
+ break;
7459
+ case "SCOPE_MODE_AUDIO_PHASE":
7460
+ case 4:
7461
+ message.mode = 4;
7462
+ break;
7463
+ }
7464
+ return message;
7465
+ };
7466
+ ScopeSourceConfig.toObject = function toObject(message, options) {
7467
+ if (!options)
7468
+ options = {};
7469
+ let object = {};
7470
+ if (options.defaults) {
7471
+ object.compositorId = "";
7472
+ object.audioMix = "";
7473
+ object.mode = options.enums === String ? "SCOPE_MODE_UNSPECIFIED" : 0;
7474
+ }
7475
+ if (message.compositorId != null && message.hasOwnProperty("compositorId"))
7476
+ object.compositorId = message.compositorId;
7477
+ if (message.audioMix != null && message.hasOwnProperty("audioMix"))
7478
+ object.audioMix = message.audioMix;
7479
+ if (message.mode != null && message.hasOwnProperty("mode"))
7480
+ object.mode = options.enums === String ? $root.sesame.v1.sources.ScopeMode[message.mode] === void 0 ? message.mode : $root.sesame.v1.sources.ScopeMode[message.mode] : message.mode;
7481
+ return object;
7482
+ };
7483
+ ScopeSourceConfig.prototype.toJSON = function toJSON() {
7484
+ return this.constructor.toObject(this, import_minimal.default.util.toJSONOptions);
7485
+ };
7486
+ ScopeSourceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
7487
+ if (typeUrlPrefix === void 0) {
7488
+ typeUrlPrefix = "type.googleapis.com";
7489
+ }
7490
+ return typeUrlPrefix + "/sesame.v1.sources.ScopeSourceConfig";
7491
+ };
7492
+ return ScopeSourceConfig;
7493
+ }();
7323
7494
  sources.DecklinkSourceConfig = function() {
7324
7495
  function DecklinkSourceConfig(properties) {
7325
7496
  if (properties) {
@@ -8295,9 +8466,10 @@ var sesame = $root.sesame = (() => {
8295
8466
  SourceConfig.prototype.srtStream = null;
8296
8467
  SourceConfig.prototype.websocket = null;
8297
8468
  SourceConfig.prototype.moq = null;
8469
+ SourceConfig.prototype.scope = null;
8298
8470
  let $oneOfFields;
8299
8471
  Object.defineProperty(SourceConfig.prototype, "details", {
8300
- get: $util.oneOfGetter($oneOfFields = ["file", "recorder", "browser", "rtt", "decklink", "signalGenerator", "systemAudio", "srtStream", "websocket", "moq"]),
8472
+ get: $util.oneOfGetter($oneOfFields = ["file", "recorder", "browser", "rtt", "decklink", "signalGenerator", "systemAudio", "srtStream", "websocket", "moq", "scope"]),
8301
8473
  set: $util.oneOfSetter($oneOfFields)
8302
8474
  });
8303
8475
  SourceConfig.create = function create(properties) {
@@ -8361,6 +8533,11 @@ var sesame = $root.sesame = (() => {
8361
8533
  /* id 19, wireType 2 =*/
8362
8534
  154
8363
8535
  ).fork()).ldelim();
8536
+ if (message.scope != null && Object.hasOwnProperty.call(message, "scope"))
8537
+ $root.sesame.v1.sources.ScopeSourceConfig.encode(message.scope, writer.uint32(
8538
+ /* id 20, wireType 2 =*/
8539
+ 162
8540
+ ).fork()).ldelim();
8364
8541
  return writer;
8365
8542
  };
8366
8543
  SourceConfig.encodeDelimited = function encodeDelimited(message, writer) {
@@ -8419,6 +8596,10 @@ var sesame = $root.sesame = (() => {
8419
8596
  message.moq = $root.sesame.v1.sources.MoqSourceConfig.decode(reader, reader.uint32());
8420
8597
  break;
8421
8598
  }
8599
+ case 20: {
8600
+ message.scope = $root.sesame.v1.sources.ScopeSourceConfig.decode(reader, reader.uint32());
8601
+ break;
8602
+ }
8422
8603
  default:
8423
8604
  reader.skipType(tag & 7);
8424
8605
  break;
@@ -8538,6 +8719,16 @@ var sesame = $root.sesame = (() => {
8538
8719
  return "moq." + error;
8539
8720
  }
8540
8721
  }
8722
+ if (message.scope != null && message.hasOwnProperty("scope")) {
8723
+ if (properties.details === 1)
8724
+ return "details: multiple values";
8725
+ properties.details = 1;
8726
+ {
8727
+ let error = $root.sesame.v1.sources.ScopeSourceConfig.verify(message.scope);
8728
+ if (error)
8729
+ return "scope." + error;
8730
+ }
8731
+ }
8541
8732
  return null;
8542
8733
  };
8543
8734
  SourceConfig.fromObject = function fromObject(object) {
@@ -8599,6 +8790,11 @@ var sesame = $root.sesame = (() => {
8599
8790
  throw TypeError(".sesame.v1.sources.SourceConfig.moq: object expected");
8600
8791
  message.moq = $root.sesame.v1.sources.MoqSourceConfig.fromObject(object.moq);
8601
8792
  }
8793
+ if (object.scope != null) {
8794
+ if (typeof object.scope !== "object")
8795
+ throw TypeError(".sesame.v1.sources.SourceConfig.scope: object expected");
8796
+ message.scope = $root.sesame.v1.sources.ScopeSourceConfig.fromObject(object.scope);
8797
+ }
8602
8798
  return message;
8603
8799
  };
8604
8800
  SourceConfig.toObject = function toObject(message, options) {
@@ -8659,6 +8855,11 @@ var sesame = $root.sesame = (() => {
8659
8855
  if (options.oneofs)
8660
8856
  object.details = "moq";
8661
8857
  }
8858
+ if (message.scope != null && message.hasOwnProperty("scope")) {
8859
+ object.scope = $root.sesame.v1.sources.ScopeSourceConfig.toObject(message.scope, options);
8860
+ if (options.oneofs)
8861
+ object.details = "scope";
8862
+ }
8662
8863
  return object;
8663
8864
  };
8664
8865
  SourceConfig.prototype.toJSON = function toJSON() {
@@ -8986,6 +9187,7 @@ var sesame = $root.sesame = (() => {
8986
9187
  }();
8987
9188
  sources.SourceStatus = function() {
8988
9189
  function SourceStatus(properties) {
9190
+ this.videoProcessors = [];
8989
9191
  if (properties) {
8990
9192
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
8991
9193
  if (properties[keys[i]] != null)
@@ -9013,6 +9215,7 @@ var sesame = $root.sesame = (() => {
9013
9215
  SourceStatus.prototype.decodeTiming = null;
9014
9216
  SourceStatus.prototype.videoBufAvg = 0;
9015
9217
  SourceStatus.prototype.srtStats = null;
9218
+ SourceStatus.prototype.videoProcessors = $util.emptyArray;
9016
9219
  let $oneOfFields;
9017
9220
  Object.defineProperty(SourceStatus.prototype, "_msg", {
9018
9221
  get: $util.oneOfGetter($oneOfFields = ["msg"]),
@@ -9133,6 +9336,12 @@ var sesame = $root.sesame = (() => {
9133
9336
  /* id 21, wireType 2 =*/
9134
9337
  170
9135
9338
  ).fork()).ldelim();
9339
+ if (message.videoProcessors != null && message.videoProcessors.length)
9340
+ for (let i = 0; i < message.videoProcessors.length; ++i)
9341
+ $root.sesame.v1.sources.VideoProcessor.encode(message.videoProcessors[i], writer.uint32(
9342
+ /* id 22, wireType 2 =*/
9343
+ 178
9344
+ ).fork()).ldelim();
9136
9345
  return writer;
9137
9346
  };
9138
9347
  SourceStatus.encodeDelimited = function encodeDelimited(message, writer) {
@@ -9231,6 +9440,12 @@ var sesame = $root.sesame = (() => {
9231
9440
  message.srtStats = $root.sesame.v1.status.SRTReceiveStatistics.decode(reader, reader.uint32());
9232
9441
  break;
9233
9442
  }
9443
+ case 22: {
9444
+ if (!(message.videoProcessors && message.videoProcessors.length))
9445
+ message.videoProcessors = [];
9446
+ message.videoProcessors.push($root.sesame.v1.sources.VideoProcessor.decode(reader, reader.uint32()));
9447
+ break;
9448
+ }
9234
9449
  default:
9235
9450
  reader.skipType(tag & 7);
9236
9451
  break;
@@ -9266,6 +9481,7 @@ var sesame = $root.sesame = (() => {
9266
9481
  case 8:
9267
9482
  case 9:
9268
9483
  case 10:
9484
+ case 11:
9269
9485
  break;
9270
9486
  }
9271
9487
  if (message.userId != null && message.hasOwnProperty("userId")) {
@@ -9367,6 +9583,15 @@ var sesame = $root.sesame = (() => {
9367
9583
  return "srtStats." + error;
9368
9584
  }
9369
9585
  }
9586
+ if (message.videoProcessors != null && message.hasOwnProperty("videoProcessors")) {
9587
+ if (!Array.isArray(message.videoProcessors))
9588
+ return "videoProcessors: array expected";
9589
+ for (let i = 0; i < message.videoProcessors.length; ++i) {
9590
+ let error = $root.sesame.v1.sources.VideoProcessor.verify(message.videoProcessors[i]);
9591
+ if (error)
9592
+ return "videoProcessors." + error;
9593
+ }
9594
+ }
9370
9595
  return null;
9371
9596
  };
9372
9597
  SourceStatus.fromObject = function fromObject(object) {
@@ -9426,6 +9651,10 @@ var sesame = $root.sesame = (() => {
9426
9651
  case 10:
9427
9652
  message.type = 10;
9428
9653
  break;
9654
+ case "SOURCE_TYPE_SCOPE":
9655
+ case 11:
9656
+ message.type = 11;
9657
+ break;
9429
9658
  }
9430
9659
  if (object.userId != null)
9431
9660
  message.userId = String(object.userId);
@@ -9559,12 +9788,24 @@ var sesame = $root.sesame = (() => {
9559
9788
  throw TypeError(".sesame.v1.sources.SourceStatus.srtStats: object expected");
9560
9789
  message.srtStats = $root.sesame.v1.status.SRTReceiveStatistics.fromObject(object.srtStats);
9561
9790
  }
9791
+ if (object.videoProcessors) {
9792
+ if (!Array.isArray(object.videoProcessors))
9793
+ throw TypeError(".sesame.v1.sources.SourceStatus.videoProcessors: array expected");
9794
+ message.videoProcessors = [];
9795
+ for (let i = 0; i < object.videoProcessors.length; ++i) {
9796
+ if (typeof object.videoProcessors[i] !== "object")
9797
+ throw TypeError(".sesame.v1.sources.SourceStatus.videoProcessors: object expected");
9798
+ message.videoProcessors[i] = $root.sesame.v1.sources.VideoProcessor.fromObject(object.videoProcessors[i]);
9799
+ }
9800
+ }
9562
9801
  return message;
9563
9802
  };
9564
9803
  SourceStatus.toObject = function toObject(message, options) {
9565
9804
  if (!options)
9566
9805
  options = {};
9567
9806
  let object = {};
9807
+ if (options.arrays || options.defaults)
9808
+ object.videoProcessors = [];
9568
9809
  if (options.defaults) {
9569
9810
  object.id = "";
9570
9811
  object.type = options.enums === String ? "SOURCE_TYPE_UNSPECIFIED" : 0;
@@ -9655,6 +9896,11 @@ var sesame = $root.sesame = (() => {
9655
9896
  if (options.oneofs)
9656
9897
  object._srtStats = "srtStats";
9657
9898
  }
9899
+ if (message.videoProcessors && message.videoProcessors.length) {
9900
+ object.videoProcessors = [];
9901
+ for (let j = 0; j < message.videoProcessors.length; ++j)
9902
+ object.videoProcessors[j] = $root.sesame.v1.sources.VideoProcessor.toObject(message.videoProcessors[j], options);
9903
+ }
9658
9904
  return object;
9659
9905
  };
9660
9906
  SourceStatus.prototype.toJSON = function toJSON() {
@@ -10994,6 +11240,325 @@ var sesame = $root.sesame = (() => {
10994
11240
  };
10995
11241
  return TransportControlRequest;
10996
11242
  }();
11243
+ sources.VideoProcessorControlRequest = function() {
11244
+ function VideoProcessorControlRequest(properties) {
11245
+ this.params = [];
11246
+ if (properties) {
11247
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
11248
+ if (properties[keys[i]] != null)
11249
+ this[keys[i]] = properties[keys[i]];
11250
+ }
11251
+ }
11252
+ VideoProcessorControlRequest.prototype.processorId = "";
11253
+ VideoProcessorControlRequest.prototype.params = $util.emptyArray;
11254
+ VideoProcessorControlRequest.create = function create(properties) {
11255
+ return new VideoProcessorControlRequest(properties);
11256
+ };
11257
+ VideoProcessorControlRequest.encode = function encode(message, writer) {
11258
+ if (!writer)
11259
+ writer = $Writer.create();
11260
+ if (message.processorId != null && Object.hasOwnProperty.call(message, "processorId"))
11261
+ writer.uint32(
11262
+ /* id 1, wireType 2 =*/
11263
+ 10
11264
+ ).string(message.processorId);
11265
+ if (message.params != null && message.params.length)
11266
+ for (let i = 0; i < message.params.length; ++i)
11267
+ $root.sesame.v1.sources.VideoProcessorParam.encode(message.params[i], writer.uint32(
11268
+ /* id 2, wireType 2 =*/
11269
+ 18
11270
+ ).fork()).ldelim();
11271
+ return writer;
11272
+ };
11273
+ VideoProcessorControlRequest.encodeDelimited = function encodeDelimited(message, writer) {
11274
+ return this.encode(message, writer).ldelim();
11275
+ };
11276
+ VideoProcessorControlRequest.decode = function decode(reader, length, error) {
11277
+ if (!(reader instanceof $Reader))
11278
+ reader = $Reader.create(reader);
11279
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.sources.VideoProcessorControlRequest();
11280
+ while (reader.pos < end) {
11281
+ let tag = reader.uint32();
11282
+ if (tag === error)
11283
+ break;
11284
+ switch (tag >>> 3) {
11285
+ case 1: {
11286
+ message.processorId = reader.string();
11287
+ break;
11288
+ }
11289
+ case 2: {
11290
+ if (!(message.params && message.params.length))
11291
+ message.params = [];
11292
+ message.params.push($root.sesame.v1.sources.VideoProcessorParam.decode(reader, reader.uint32()));
11293
+ break;
11294
+ }
11295
+ default:
11296
+ reader.skipType(tag & 7);
11297
+ break;
11298
+ }
11299
+ }
11300
+ return message;
11301
+ };
11302
+ VideoProcessorControlRequest.decodeDelimited = function decodeDelimited(reader) {
11303
+ if (!(reader instanceof $Reader))
11304
+ reader = new $Reader(reader);
11305
+ return this.decode(reader, reader.uint32());
11306
+ };
11307
+ VideoProcessorControlRequest.verify = function verify(message) {
11308
+ if (typeof message !== "object" || message === null)
11309
+ return "object expected";
11310
+ if (message.processorId != null && message.hasOwnProperty("processorId")) {
11311
+ if (!$util.isString(message.processorId))
11312
+ return "processorId: string expected";
11313
+ }
11314
+ if (message.params != null && message.hasOwnProperty("params")) {
11315
+ if (!Array.isArray(message.params))
11316
+ return "params: array expected";
11317
+ for (let i = 0; i < message.params.length; ++i) {
11318
+ let error = $root.sesame.v1.sources.VideoProcessorParam.verify(message.params[i]);
11319
+ if (error)
11320
+ return "params." + error;
11321
+ }
11322
+ }
11323
+ return null;
11324
+ };
11325
+ VideoProcessorControlRequest.fromObject = function fromObject(object) {
11326
+ if (object instanceof $root.sesame.v1.sources.VideoProcessorControlRequest)
11327
+ return object;
11328
+ let message = new $root.sesame.v1.sources.VideoProcessorControlRequest();
11329
+ if (object.processorId != null)
11330
+ message.processorId = String(object.processorId);
11331
+ if (object.params) {
11332
+ if (!Array.isArray(object.params))
11333
+ throw TypeError(".sesame.v1.sources.VideoProcessorControlRequest.params: array expected");
11334
+ message.params = [];
11335
+ for (let i = 0; i < object.params.length; ++i) {
11336
+ if (typeof object.params[i] !== "object")
11337
+ throw TypeError(".sesame.v1.sources.VideoProcessorControlRequest.params: object expected");
11338
+ message.params[i] = $root.sesame.v1.sources.VideoProcessorParam.fromObject(object.params[i]);
11339
+ }
11340
+ }
11341
+ return message;
11342
+ };
11343
+ VideoProcessorControlRequest.toObject = function toObject(message, options) {
11344
+ if (!options)
11345
+ options = {};
11346
+ let object = {};
11347
+ if (options.arrays || options.defaults)
11348
+ object.params = [];
11349
+ if (options.defaults)
11350
+ object.processorId = "";
11351
+ if (message.processorId != null && message.hasOwnProperty("processorId"))
11352
+ object.processorId = message.processorId;
11353
+ if (message.params && message.params.length) {
11354
+ object.params = [];
11355
+ for (let j = 0; j < message.params.length; ++j)
11356
+ object.params[j] = $root.sesame.v1.sources.VideoProcessorParam.toObject(message.params[j], options);
11357
+ }
11358
+ return object;
11359
+ };
11360
+ VideoProcessorControlRequest.prototype.toJSON = function toJSON() {
11361
+ return this.constructor.toObject(this, import_minimal.default.util.toJSONOptions);
11362
+ };
11363
+ VideoProcessorControlRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
11364
+ if (typeUrlPrefix === void 0) {
11365
+ typeUrlPrefix = "type.googleapis.com";
11366
+ }
11367
+ return typeUrlPrefix + "/sesame.v1.sources.VideoProcessorControlRequest";
11368
+ };
11369
+ return VideoProcessorControlRequest;
11370
+ }();
11371
+ sources.SourceControlRequest = function() {
11372
+ function SourceControlRequest(properties) {
11373
+ this.videoProcessors = [];
11374
+ this.resetProcessors = [];
11375
+ if (properties) {
11376
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
11377
+ if (properties[keys[i]] != null)
11378
+ this[keys[i]] = properties[keys[i]];
11379
+ }
11380
+ }
11381
+ SourceControlRequest.prototype.videoProcessors = $util.emptyArray;
11382
+ SourceControlRequest.prototype.audioLevel = null;
11383
+ SourceControlRequest.prototype.resetProcessors = $util.emptyArray;
11384
+ SourceControlRequest.prototype.sourceId = "";
11385
+ let $oneOfFields;
11386
+ Object.defineProperty(SourceControlRequest.prototype, "_audioLevel", {
11387
+ get: $util.oneOfGetter($oneOfFields = ["audioLevel"]),
11388
+ set: $util.oneOfSetter($oneOfFields)
11389
+ });
11390
+ SourceControlRequest.create = function create(properties) {
11391
+ return new SourceControlRequest(properties);
11392
+ };
11393
+ SourceControlRequest.encode = function encode(message, writer) {
11394
+ if (!writer)
11395
+ writer = $Writer.create();
11396
+ if (message.videoProcessors != null && message.videoProcessors.length)
11397
+ for (let i = 0; i < message.videoProcessors.length; ++i)
11398
+ $root.sesame.v1.sources.VideoProcessorControlRequest.encode(message.videoProcessors[i], writer.uint32(
11399
+ /* id 1, wireType 2 =*/
11400
+ 10
11401
+ ).fork()).ldelim();
11402
+ if (message.audioLevel != null && Object.hasOwnProperty.call(message, "audioLevel"))
11403
+ writer.uint32(
11404
+ /* id 2, wireType 5 =*/
11405
+ 21
11406
+ ).float(message.audioLevel);
11407
+ if (message.resetProcessors != null && message.resetProcessors.length)
11408
+ for (let i = 0; i < message.resetProcessors.length; ++i)
11409
+ writer.uint32(
11410
+ /* id 3, wireType 2 =*/
11411
+ 26
11412
+ ).string(message.resetProcessors[i]);
11413
+ if (message.sourceId != null && Object.hasOwnProperty.call(message, "sourceId"))
11414
+ writer.uint32(
11415
+ /* id 4, wireType 2 =*/
11416
+ 34
11417
+ ).string(message.sourceId);
11418
+ return writer;
11419
+ };
11420
+ SourceControlRequest.encodeDelimited = function encodeDelimited(message, writer) {
11421
+ return this.encode(message, writer).ldelim();
11422
+ };
11423
+ SourceControlRequest.decode = function decode(reader, length, error) {
11424
+ if (!(reader instanceof $Reader))
11425
+ reader = $Reader.create(reader);
11426
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.sources.SourceControlRequest();
11427
+ while (reader.pos < end) {
11428
+ let tag = reader.uint32();
11429
+ if (tag === error)
11430
+ break;
11431
+ switch (tag >>> 3) {
11432
+ case 1: {
11433
+ if (!(message.videoProcessors && message.videoProcessors.length))
11434
+ message.videoProcessors = [];
11435
+ message.videoProcessors.push($root.sesame.v1.sources.VideoProcessorControlRequest.decode(reader, reader.uint32()));
11436
+ break;
11437
+ }
11438
+ case 2: {
11439
+ message.audioLevel = reader.float();
11440
+ break;
11441
+ }
11442
+ case 3: {
11443
+ if (!(message.resetProcessors && message.resetProcessors.length))
11444
+ message.resetProcessors = [];
11445
+ message.resetProcessors.push(reader.string());
11446
+ break;
11447
+ }
11448
+ case 4: {
11449
+ message.sourceId = reader.string();
11450
+ break;
11451
+ }
11452
+ default:
11453
+ reader.skipType(tag & 7);
11454
+ break;
11455
+ }
11456
+ }
11457
+ return message;
11458
+ };
11459
+ SourceControlRequest.decodeDelimited = function decodeDelimited(reader) {
11460
+ if (!(reader instanceof $Reader))
11461
+ reader = new $Reader(reader);
11462
+ return this.decode(reader, reader.uint32());
11463
+ };
11464
+ SourceControlRequest.verify = function verify(message) {
11465
+ if (typeof message !== "object" || message === null)
11466
+ return "object expected";
11467
+ let properties = {};
11468
+ if (message.videoProcessors != null && message.hasOwnProperty("videoProcessors")) {
11469
+ if (!Array.isArray(message.videoProcessors))
11470
+ return "videoProcessors: array expected";
11471
+ for (let i = 0; i < message.videoProcessors.length; ++i) {
11472
+ let error = $root.sesame.v1.sources.VideoProcessorControlRequest.verify(message.videoProcessors[i]);
11473
+ if (error)
11474
+ return "videoProcessors." + error;
11475
+ }
11476
+ }
11477
+ if (message.audioLevel != null && message.hasOwnProperty("audioLevel")) {
11478
+ properties._audioLevel = 1;
11479
+ if (typeof message.audioLevel !== "number")
11480
+ return "audioLevel: number expected";
11481
+ }
11482
+ if (message.resetProcessors != null && message.hasOwnProperty("resetProcessors")) {
11483
+ if (!Array.isArray(message.resetProcessors))
11484
+ return "resetProcessors: array expected";
11485
+ for (let i = 0; i < message.resetProcessors.length; ++i)
11486
+ if (!$util.isString(message.resetProcessors[i]))
11487
+ return "resetProcessors: string[] expected";
11488
+ }
11489
+ if (message.sourceId != null && message.hasOwnProperty("sourceId")) {
11490
+ if (!$util.isString(message.sourceId))
11491
+ return "sourceId: string expected";
11492
+ }
11493
+ return null;
11494
+ };
11495
+ SourceControlRequest.fromObject = function fromObject(object) {
11496
+ if (object instanceof $root.sesame.v1.sources.SourceControlRequest)
11497
+ return object;
11498
+ let message = new $root.sesame.v1.sources.SourceControlRequest();
11499
+ if (object.videoProcessors) {
11500
+ if (!Array.isArray(object.videoProcessors))
11501
+ throw TypeError(".sesame.v1.sources.SourceControlRequest.videoProcessors: array expected");
11502
+ message.videoProcessors = [];
11503
+ for (let i = 0; i < object.videoProcessors.length; ++i) {
11504
+ if (typeof object.videoProcessors[i] !== "object")
11505
+ throw TypeError(".sesame.v1.sources.SourceControlRequest.videoProcessors: object expected");
11506
+ message.videoProcessors[i] = $root.sesame.v1.sources.VideoProcessorControlRequest.fromObject(object.videoProcessors[i]);
11507
+ }
11508
+ }
11509
+ if (object.audioLevel != null)
11510
+ message.audioLevel = Number(object.audioLevel);
11511
+ if (object.resetProcessors) {
11512
+ if (!Array.isArray(object.resetProcessors))
11513
+ throw TypeError(".sesame.v1.sources.SourceControlRequest.resetProcessors: array expected");
11514
+ message.resetProcessors = [];
11515
+ for (let i = 0; i < object.resetProcessors.length; ++i)
11516
+ message.resetProcessors[i] = String(object.resetProcessors[i]);
11517
+ }
11518
+ if (object.sourceId != null)
11519
+ message.sourceId = String(object.sourceId);
11520
+ return message;
11521
+ };
11522
+ SourceControlRequest.toObject = function toObject(message, options) {
11523
+ if (!options)
11524
+ options = {};
11525
+ let object = {};
11526
+ if (options.arrays || options.defaults) {
11527
+ object.videoProcessors = [];
11528
+ object.resetProcessors = [];
11529
+ }
11530
+ if (options.defaults)
11531
+ object.sourceId = "";
11532
+ if (message.videoProcessors && message.videoProcessors.length) {
11533
+ object.videoProcessors = [];
11534
+ for (let j = 0; j < message.videoProcessors.length; ++j)
11535
+ object.videoProcessors[j] = $root.sesame.v1.sources.VideoProcessorControlRequest.toObject(message.videoProcessors[j], options);
11536
+ }
11537
+ if (message.audioLevel != null && message.hasOwnProperty("audioLevel")) {
11538
+ object.audioLevel = options.json && !isFinite(message.audioLevel) ? String(message.audioLevel) : message.audioLevel;
11539
+ if (options.oneofs)
11540
+ object._audioLevel = "audioLevel";
11541
+ }
11542
+ if (message.resetProcessors && message.resetProcessors.length) {
11543
+ object.resetProcessors = [];
11544
+ for (let j = 0; j < message.resetProcessors.length; ++j)
11545
+ object.resetProcessors[j] = message.resetProcessors[j];
11546
+ }
11547
+ if (message.sourceId != null && message.hasOwnProperty("sourceId"))
11548
+ object.sourceId = message.sourceId;
11549
+ return object;
11550
+ };
11551
+ SourceControlRequest.prototype.toJSON = function toJSON() {
11552
+ return this.constructor.toObject(this, import_minimal.default.util.toJSONOptions);
11553
+ };
11554
+ SourceControlRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
11555
+ if (typeUrlPrefix === void 0) {
11556
+ typeUrlPrefix = "type.googleapis.com";
11557
+ }
11558
+ return typeUrlPrefix + "/sesame.v1.sources.SourceControlRequest";
11559
+ };
11560
+ return SourceControlRequest;
11561
+ }();
10997
11562
  return sources;
10998
11563
  }();
10999
11564
  v1.recorder = function() {
@@ -26665,6 +27230,8 @@ var sesame = $root.sesame = (() => {
26665
27230
  case 7:
26666
27231
  case 8:
26667
27232
  case 9:
27233
+ case 10:
27234
+ case 11:
26668
27235
  break;
26669
27236
  }
26670
27237
  return null;
@@ -26730,6 +27297,14 @@ var sesame = $root.sesame = (() => {
26730
27297
  case 9:
26731
27298
  message.dataType = 9;
26732
27299
  break;
27300
+ case "DATA_TYPE_SOURCE_CONTROL":
27301
+ case 10:
27302
+ message.dataType = 10;
27303
+ break;
27304
+ case "DATA_TYPE_SOURCE_STATUS":
27305
+ case 11:
27306
+ message.dataType = 11;
27307
+ break;
26733
27308
  }
26734
27309
  return message;
26735
27310
  };
@@ -27448,6 +28023,8 @@ var sesame = $root.sesame = (() => {
27448
28023
  values[valuesById[7] = "DATA_TYPE_OUTPUT_STATUS"] = 7;
27449
28024
  values[valuesById[8] = "DATA_TYPE_OUTPUT_CONTROL"] = 8;
27450
28025
  values[valuesById[9] = "DATA_TYPE_ENGINE_STATUS"] = 9;
28026
+ values[valuesById[10] = "DATA_TYPE_SOURCE_CONTROL"] = 10;
28027
+ values[valuesById[11] = "DATA_TYPE_SOURCE_STATUS"] = 11;
27451
28028
  return values;
27452
28029
  }();
27453
28030
  wire.DataFrameData = function() {
@@ -27527,6 +28104,8 @@ var sesame = $root.sesame = (() => {
27527
28104
  case 7:
27528
28105
  case 8:
27529
28106
  case 9:
28107
+ case 10:
28108
+ case 11:
27530
28109
  break;
27531
28110
  }
27532
28111
  if (message.trackName != null && message.hasOwnProperty("trackName")) {
@@ -27586,6 +28165,14 @@ var sesame = $root.sesame = (() => {
27586
28165
  case 9:
27587
28166
  message.dataType = 9;
27588
28167
  break;
28168
+ case "DATA_TYPE_SOURCE_CONTROL":
28169
+ case 10:
28170
+ message.dataType = 10;
28171
+ break;
28172
+ case "DATA_TYPE_SOURCE_STATUS":
28173
+ case 11:
28174
+ message.dataType = 11;
28175
+ break;
27589
28176
  }
27590
28177
  if (object.trackName != null)
27591
28178
  message.trackName = String(object.trackName);
@@ -28336,6 +28923,16 @@ function buildTransportControlFrame(trackName, request) {
28336
28923
  payload
28337
28924
  );
28338
28925
  }
28926
+ function buildSourceControlFrame(trackName, request) {
28927
+ const payload = sesame.v1.sources.SourceControlRequest.encode(request).finish();
28928
+ return WireProtocol.serialize(
28929
+ {
28930
+ type: sesame.v1.wire.FrameType.FRAME_TYPE_DATA,
28931
+ data: { dataType: sesame.v1.wire.DataType.DATA_TYPE_SOURCE_CONTROL, trackName }
28932
+ },
28933
+ payload
28934
+ );
28935
+ }
28339
28936
  function buildBinaryDataFrame(trackName, payload) {
28340
28937
  return WireProtocol.serialize(
28341
28938
  {
@@ -29045,6 +29642,7 @@ var Event = sesame.v1.rpc.Event;
29045
29642
  WireProtocol,
29046
29643
  buildAudioControlFrame,
29047
29644
  buildBinaryDataFrame,
29645
+ buildSourceControlFrame,
29048
29646
  buildTransportControlFrame,
29049
29647
  getLogger,
29050
29648
  getSideData,