@stinkycomputing/sesame-api-client 1.4.1-alpha.9 → 1.4.1-beta.10

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.
@@ -3541,15 +3541,20 @@ var sesame = $root.sesame = (() => {
3541
3541
  values[valuesById[4] = "VIDEO_FORMAT_1080_60P"] = 4;
3542
3542
  return values;
3543
3543
  }();
3544
- common.CodecId = function() {
3544
+ common.CodecType = function() {
3545
3545
  const valuesById = {}, values = Object.create(valuesById);
3546
- values[valuesById[0] = "CODEC_ID_UNSPECIFIED"] = 0;
3547
- values[valuesById[1] = "CODEC_ID_H264"] = 1;
3548
- values[valuesById[2] = "CODEC_ID_HEVC"] = 2;
3549
- values[valuesById[3] = "CODEC_ID_AV1"] = 3;
3550
- values[valuesById[4] = "CODEC_ID_VP8"] = 4;
3551
- values[valuesById[5] = "CODEC_ID_PRORES"] = 5;
3552
- values[valuesById[6] = "CODEC_ID_DNXHR"] = 6;
3546
+ values[valuesById[0] = "CODEC_TYPE_UNSPECIFIED"] = 0;
3547
+ values[valuesById[1] = "CODEC_TYPE_VIDEO_VP8"] = 1;
3548
+ values[valuesById[2] = "CODEC_TYPE_VIDEO_VP9"] = 2;
3549
+ values[valuesById[3] = "CODEC_TYPE_VIDEO_AVC"] = 3;
3550
+ values[valuesById[4] = "CODEC_TYPE_VIDEO_HEVC"] = 4;
3551
+ values[valuesById[5] = "CODEC_TYPE_VIDEO_AV1"] = 5;
3552
+ values[valuesById[6] = "CODEC_TYPE_VIDEO_PRORES"] = 6;
3553
+ values[valuesById[7] = "CODEC_TYPE_VIDEO_DNXHR"] = 7;
3554
+ values[valuesById[64] = "CODEC_TYPE_AUDIO_OPUS"] = 64;
3555
+ values[valuesById[65] = "CODEC_TYPE_AUDIO_AAC"] = 65;
3556
+ values[valuesById[66] = "CODEC_TYPE_AUDIO_PCM"] = 66;
3557
+ values[valuesById[67] = "CODEC_TYPE_AUDIO_PCM_S24LE"] = 67;
3553
3558
  return values;
3554
3559
  }();
3555
3560
  common.Empty = function() {
@@ -4137,7 +4142,7 @@ var sesame = $root.sesame = (() => {
4137
4142
  }
4138
4143
  }
4139
4144
  NameValue.prototype.name = "";
4140
- NameValue.prototype.value = "";
4145
+ NameValue.prototype.value = null;
4141
4146
  NameValue.create = function create(properties) {
4142
4147
  return new NameValue(properties);
4143
4148
  };
@@ -4150,10 +4155,10 @@ var sesame = $root.sesame = (() => {
4150
4155
  10
4151
4156
  ).string(message.name);
4152
4157
  if (message.value != null && Object.hasOwnProperty.call(message, "value"))
4153
- writer.uint32(
4158
+ $root.sesame.v1.common.PropValue.encode(message.value, writer.uint32(
4154
4159
  /* id 2, wireType 2 =*/
4155
4160
  18
4156
- ).string(message.value);
4161
+ ).fork()).ldelim();
4157
4162
  return writer;
4158
4163
  };
4159
4164
  NameValue.encodeDelimited = function encodeDelimited(message, writer) {
@@ -4173,7 +4178,7 @@ var sesame = $root.sesame = (() => {
4173
4178
  break;
4174
4179
  }
4175
4180
  case 2: {
4176
- message.value = reader.string();
4181
+ message.value = $root.sesame.v1.common.PropValue.decode(reader, reader.uint32());
4177
4182
  break;
4178
4183
  }
4179
4184
  default:
@@ -4196,8 +4201,9 @@ var sesame = $root.sesame = (() => {
4196
4201
  return "name: string expected";
4197
4202
  }
4198
4203
  if (message.value != null && message.hasOwnProperty("value")) {
4199
- if (!$util.isString(message.value))
4200
- return "value: string expected";
4204
+ let error = $root.sesame.v1.common.PropValue.verify(message.value);
4205
+ if (error)
4206
+ return "value." + error;
4201
4207
  }
4202
4208
  return null;
4203
4209
  };
@@ -4207,8 +4213,11 @@ var sesame = $root.sesame = (() => {
4207
4213
  let message = new $root.sesame.v1.common.NameValue();
4208
4214
  if (object.name != null)
4209
4215
  message.name = String(object.name);
4210
- if (object.value != null)
4211
- message.value = String(object.value);
4216
+ if (object.value != null) {
4217
+ if (typeof object.value !== "object")
4218
+ throw TypeError(".sesame.v1.common.NameValue.value: object expected");
4219
+ message.value = $root.sesame.v1.common.PropValue.fromObject(object.value);
4220
+ }
4212
4221
  return message;
4213
4222
  };
4214
4223
  NameValue.toObject = function toObject(message, options) {
@@ -4217,12 +4226,12 @@ var sesame = $root.sesame = (() => {
4217
4226
  let object = {};
4218
4227
  if (options.defaults) {
4219
4228
  object.name = "";
4220
- object.value = "";
4229
+ object.value = null;
4221
4230
  }
4222
4231
  if (message.name != null && message.hasOwnProperty("name"))
4223
4232
  object.name = message.name;
4224
4233
  if (message.value != null && message.hasOwnProperty("value"))
4225
- object.value = message.value;
4234
+ object.value = $root.sesame.v1.common.PropValue.toObject(message.value, options);
4226
4235
  return object;
4227
4236
  };
4228
4237
  NameValue.prototype.toJSON = function toJSON() {
@@ -4458,8 +4467,7 @@ var sesame = $root.sesame = (() => {
4458
4467
  values[valuesById[1] = "EVENT_TOPIC_ERROR"] = 1;
4459
4468
  values[valuesById[2] = "EVENT_TOPIC_TRANSPORT"] = 2;
4460
4469
  values[valuesById[3] = "EVENT_TOPIC_CALLBACK"] = 3;
4461
- values[valuesById[4] = "EVENT_TOPIC_PLAYLIST_EXPORT"] = 4;
4462
- values[valuesById[5] = "EVENT_TOPIC_CLIP_IMPORT"] = 5;
4470
+ values[valuesById[4] = "EVENT_TOPIC_JOB"] = 4;
4463
4471
  values[valuesById[6] = "EVENT_TOPIC_RECORDER"] = 6;
4464
4472
  return values;
4465
4473
  }();
@@ -4519,14 +4527,6 @@ var sesame = $root.sesame = (() => {
4519
4527
  values[valuesById[15] = "SOURCE_TRANSPORT_CMD_SET_SCRUBBING"] = 15;
4520
4528
  return values;
4521
4529
  }();
4522
- sources.DecoderType = function() {
4523
- const valuesById = {}, values = Object.create(valuesById);
4524
- values[valuesById[0] = "DECODER_TYPE_UNSPECIFIED"] = 0;
4525
- values[valuesById[1] = "DECODER_TYPE_H264"] = 1;
4526
- values[valuesById[2] = "DECODER_TYPE_HEVC"] = 2;
4527
- values[valuesById[3] = "DECODER_TYPE_AV1"] = 3;
4528
- return values;
4529
- }();
4530
4530
  sources.SourceTextureSize = function() {
4531
4531
  const valuesById = {}, values = Object.create(valuesById);
4532
4532
  values[valuesById[0] = "SOURCE_TEXTURE_SIZE_UNSPECIFIED"] = 0;
@@ -5288,7 +5288,7 @@ var sesame = $root.sesame = (() => {
5288
5288
  }
5289
5289
  }
5290
5290
  RecorderSourceConfig.prototype.recorderId = "";
5291
- RecorderSourceConfig.prototype.decoderType = 0;
5291
+ RecorderSourceConfig.prototype.codec = 0;
5292
5292
  RecorderSourceConfig.create = function create(properties) {
5293
5293
  return new RecorderSourceConfig(properties);
5294
5294
  };
@@ -5300,11 +5300,11 @@ var sesame = $root.sesame = (() => {
5300
5300
  /* id 1, wireType 2 =*/
5301
5301
  10
5302
5302
  ).string(message.recorderId);
5303
- if (message.decoderType != null && Object.hasOwnProperty.call(message, "decoderType"))
5303
+ if (message.codec != null && Object.hasOwnProperty.call(message, "codec"))
5304
5304
  writer.uint32(
5305
5305
  /* id 2, wireType 0 =*/
5306
5306
  16
5307
- ).int32(message.decoderType);
5307
+ ).int32(message.codec);
5308
5308
  return writer;
5309
5309
  };
5310
5310
  RecorderSourceConfig.encodeDelimited = function encodeDelimited(message, writer) {
@@ -5324,7 +5324,7 @@ var sesame = $root.sesame = (() => {
5324
5324
  break;
5325
5325
  }
5326
5326
  case 2: {
5327
- message.decoderType = reader.int32();
5327
+ message.codec = reader.int32();
5328
5328
  break;
5329
5329
  }
5330
5330
  default:
@@ -5346,14 +5346,22 @@ var sesame = $root.sesame = (() => {
5346
5346
  if (!$util.isString(message.recorderId))
5347
5347
  return "recorderId: string expected";
5348
5348
  }
5349
- if (message.decoderType != null && message.hasOwnProperty("decoderType"))
5350
- switch (message.decoderType) {
5349
+ if (message.codec != null && message.hasOwnProperty("codec"))
5350
+ switch (message.codec) {
5351
5351
  default:
5352
- return "decoderType: enum value expected";
5352
+ return "codec: enum value expected";
5353
5353
  case 0:
5354
5354
  case 1:
5355
5355
  case 2:
5356
5356
  case 3:
5357
+ case 4:
5358
+ case 5:
5359
+ case 6:
5360
+ case 7:
5361
+ case 64:
5362
+ case 65:
5363
+ case 66:
5364
+ case 67:
5357
5365
  break;
5358
5366
  }
5359
5367
  return null;
@@ -5364,28 +5372,60 @@ var sesame = $root.sesame = (() => {
5364
5372
  let message = new $root.sesame.v1.sources.RecorderSourceConfig();
5365
5373
  if (object.recorderId != null)
5366
5374
  message.recorderId = String(object.recorderId);
5367
- switch (object.decoderType) {
5375
+ switch (object.codec) {
5368
5376
  default:
5369
- if (typeof object.decoderType === "number") {
5370
- message.decoderType = object.decoderType;
5377
+ if (typeof object.codec === "number") {
5378
+ message.codec = object.codec;
5371
5379
  break;
5372
5380
  }
5373
5381
  break;
5374
- case "DECODER_TYPE_UNSPECIFIED":
5382
+ case "CODEC_TYPE_UNSPECIFIED":
5375
5383
  case 0:
5376
- message.decoderType = 0;
5384
+ message.codec = 0;
5377
5385
  break;
5378
- case "DECODER_TYPE_H264":
5386
+ case "CODEC_TYPE_VIDEO_VP8":
5379
5387
  case 1:
5380
- message.decoderType = 1;
5388
+ message.codec = 1;
5381
5389
  break;
5382
- case "DECODER_TYPE_HEVC":
5390
+ case "CODEC_TYPE_VIDEO_VP9":
5383
5391
  case 2:
5384
- message.decoderType = 2;
5392
+ message.codec = 2;
5385
5393
  break;
5386
- case "DECODER_TYPE_AV1":
5394
+ case "CODEC_TYPE_VIDEO_AVC":
5387
5395
  case 3:
5388
- message.decoderType = 3;
5396
+ message.codec = 3;
5397
+ break;
5398
+ case "CODEC_TYPE_VIDEO_HEVC":
5399
+ case 4:
5400
+ message.codec = 4;
5401
+ break;
5402
+ case "CODEC_TYPE_VIDEO_AV1":
5403
+ case 5:
5404
+ message.codec = 5;
5405
+ break;
5406
+ case "CODEC_TYPE_VIDEO_PRORES":
5407
+ case 6:
5408
+ message.codec = 6;
5409
+ break;
5410
+ case "CODEC_TYPE_VIDEO_DNXHR":
5411
+ case 7:
5412
+ message.codec = 7;
5413
+ break;
5414
+ case "CODEC_TYPE_AUDIO_OPUS":
5415
+ case 64:
5416
+ message.codec = 64;
5417
+ break;
5418
+ case "CODEC_TYPE_AUDIO_AAC":
5419
+ case 65:
5420
+ message.codec = 65;
5421
+ break;
5422
+ case "CODEC_TYPE_AUDIO_PCM":
5423
+ case 66:
5424
+ message.codec = 66;
5425
+ break;
5426
+ case "CODEC_TYPE_AUDIO_PCM_S24LE":
5427
+ case 67:
5428
+ message.codec = 67;
5389
5429
  break;
5390
5430
  }
5391
5431
  return message;
@@ -5396,12 +5436,12 @@ var sesame = $root.sesame = (() => {
5396
5436
  let object = {};
5397
5437
  if (options.defaults) {
5398
5438
  object.recorderId = "";
5399
- object.decoderType = options.enums === String ? "DECODER_TYPE_UNSPECIFIED" : 0;
5439
+ object.codec = options.enums === String ? "CODEC_TYPE_UNSPECIFIED" : 0;
5400
5440
  }
5401
5441
  if (message.recorderId != null && message.hasOwnProperty("recorderId"))
5402
5442
  object.recorderId = message.recorderId;
5403
- if (message.decoderType != null && message.hasOwnProperty("decoderType"))
5404
- object.decoderType = options.enums === String ? $root.sesame.v1.sources.DecoderType[message.decoderType] === void 0 ? message.decoderType : $root.sesame.v1.sources.DecoderType[message.decoderType] : message.decoderType;
5443
+ if (message.codec != null && message.hasOwnProperty("codec"))
5444
+ object.codec = options.enums === String ? $root.sesame.v1.common.CodecType[message.codec] === void 0 ? message.codec : $root.sesame.v1.common.CodecType[message.codec] : message.codec;
5405
5445
  return object;
5406
5446
  };
5407
5447
  RecorderSourceConfig.prototype.toJSON = function toJSON() {
@@ -8575,7 +8615,7 @@ var sesame = $root.sesame = (() => {
8575
8615
  RecorderClip.prototype.endTimeUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
8576
8616
  RecorderClip.prototype.lockedStartUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
8577
8617
  RecorderClip.prototype.lockedEndUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
8578
- RecorderClip.prototype.userTimeMs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
8618
+ RecorderClip.prototype.userTimeUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
8579
8619
  RecorderClip.create = function create(properties) {
8580
8620
  return new RecorderClip(properties);
8581
8621
  };
@@ -8622,11 +8662,11 @@ var sesame = $root.sesame = (() => {
8622
8662
  /* id 8, wireType 0 =*/
8623
8663
  64
8624
8664
  ).int64(message.lockedEndUs);
8625
- if (message.userTimeMs != null && Object.hasOwnProperty.call(message, "userTimeMs"))
8665
+ if (message.userTimeUs != null && Object.hasOwnProperty.call(message, "userTimeUs"))
8626
8666
  writer.uint32(
8627
8667
  /* id 9, wireType 0 =*/
8628
8668
  72
8629
- ).int64(message.userTimeMs);
8669
+ ).int64(message.userTimeUs);
8630
8670
  return writer;
8631
8671
  };
8632
8672
  RecorderClip.encodeDelimited = function encodeDelimited(message, writer) {
@@ -8674,7 +8714,7 @@ var sesame = $root.sesame = (() => {
8674
8714
  break;
8675
8715
  }
8676
8716
  case 9: {
8677
- message.userTimeMs = reader.int64();
8717
+ message.userTimeUs = reader.int64();
8678
8718
  break;
8679
8719
  }
8680
8720
  default:
@@ -8724,9 +8764,9 @@ var sesame = $root.sesame = (() => {
8724
8764
  if (!$util.isInteger(message.lockedEndUs) && !(message.lockedEndUs && $util.isInteger(message.lockedEndUs.low) && $util.isInteger(message.lockedEndUs.high)))
8725
8765
  return "lockedEndUs: integer|Long expected";
8726
8766
  }
8727
- if (message.userTimeMs != null && message.hasOwnProperty("userTimeMs")) {
8728
- if (!$util.isInteger(message.userTimeMs) && !(message.userTimeMs && $util.isInteger(message.userTimeMs.low) && $util.isInteger(message.userTimeMs.high)))
8729
- return "userTimeMs: integer|Long expected";
8767
+ if (message.userTimeUs != null && message.hasOwnProperty("userTimeUs")) {
8768
+ if (!$util.isInteger(message.userTimeUs) && !(message.userTimeUs && $util.isInteger(message.userTimeUs.low) && $util.isInteger(message.userTimeUs.high)))
8769
+ return "userTimeUs: integer|Long expected";
8730
8770
  }
8731
8771
  return null;
8732
8772
  };
@@ -8798,15 +8838,15 @@ var sesame = $root.sesame = (() => {
8798
8838
  else if (typeof object.lockedEndUs === "object")
8799
8839
  message.lockedEndUs = new $util.LongBits(object.lockedEndUs.low >>> 0, object.lockedEndUs.high >>> 0).toNumber();
8800
8840
  }
8801
- if (object.userTimeMs != null) {
8841
+ if (object.userTimeUs != null) {
8802
8842
  if ($util.Long)
8803
- (message.userTimeMs = $util.Long.fromValue(object.userTimeMs)).unsigned = false;
8804
- else if (typeof object.userTimeMs === "string")
8805
- message.userTimeMs = parseInt(object.userTimeMs, 10);
8806
- else if (typeof object.userTimeMs === "number")
8807
- message.userTimeMs = object.userTimeMs;
8808
- else if (typeof object.userTimeMs === "object")
8809
- message.userTimeMs = new $util.LongBits(object.userTimeMs.low >>> 0, object.userTimeMs.high >>> 0).toNumber();
8843
+ (message.userTimeUs = $util.Long.fromValue(object.userTimeUs)).unsigned = false;
8844
+ else if (typeof object.userTimeUs === "string")
8845
+ message.userTimeUs = parseInt(object.userTimeUs, 10);
8846
+ else if (typeof object.userTimeUs === "number")
8847
+ message.userTimeUs = object.userTimeUs;
8848
+ else if (typeof object.userTimeUs === "object")
8849
+ message.userTimeUs = new $util.LongBits(object.userTimeUs.low >>> 0, object.userTimeUs.high >>> 0).toNumber();
8810
8850
  }
8811
8851
  return message;
8812
8852
  };
@@ -8849,9 +8889,9 @@ var sesame = $root.sesame = (() => {
8849
8889
  object.lockedEndUs = options.longs === String ? "0" : 0;
8850
8890
  if ($util.Long) {
8851
8891
  let long = new $util.Long(0, 0, false);
8852
- object.userTimeMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
8892
+ object.userTimeUs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
8853
8893
  } else
8854
- object.userTimeMs = options.longs === String ? "0" : 0;
8894
+ object.userTimeUs = options.longs === String ? "0" : 0;
8855
8895
  }
8856
8896
  if (message.id != null && message.hasOwnProperty("id"))
8857
8897
  if (typeof message.id === "number")
@@ -8887,11 +8927,11 @@ var sesame = $root.sesame = (() => {
8887
8927
  object.lockedEndUs = options.longs === String ? String(message.lockedEndUs) : message.lockedEndUs;
8888
8928
  else
8889
8929
  object.lockedEndUs = options.longs === String ? $util.Long.prototype.toString.call(message.lockedEndUs) : options.longs === Number ? new $util.LongBits(message.lockedEndUs.low >>> 0, message.lockedEndUs.high >>> 0).toNumber() : message.lockedEndUs;
8890
- if (message.userTimeMs != null && message.hasOwnProperty("userTimeMs"))
8891
- if (typeof message.userTimeMs === "number")
8892
- object.userTimeMs = options.longs === String ? String(message.userTimeMs) : message.userTimeMs;
8930
+ if (message.userTimeUs != null && message.hasOwnProperty("userTimeUs"))
8931
+ if (typeof message.userTimeUs === "number")
8932
+ object.userTimeUs = options.longs === String ? String(message.userTimeUs) : message.userTimeUs;
8893
8933
  else
8894
- object.userTimeMs = options.longs === String ? $util.Long.prototype.toString.call(message.userTimeMs) : options.longs === Number ? new $util.LongBits(message.userTimeMs.low >>> 0, message.userTimeMs.high >>> 0).toNumber() : message.userTimeMs;
8934
+ object.userTimeUs = options.longs === String ? $util.Long.prototype.toString.call(message.userTimeUs) : options.longs === Number ? new $util.LongBits(message.userTimeUs.low >>> 0, message.userTimeUs.high >>> 0).toNumber() : message.userTimeUs;
8895
8935
  return object;
8896
8936
  };
8897
8937
  RecorderClip.prototype.toJSON = function toJSON() {
@@ -13699,15 +13739,22 @@ var sesame = $root.sesame = (() => {
13699
13739
  }
13700
13740
  TransportEvent.prototype.sourceId = "";
13701
13741
  TransportEvent.prototype.userId = "";
13742
+ TransportEvent.prototype.uri = "";
13702
13743
  TransportEvent.prototype.state = 0;
13703
13744
  TransportEvent.prototype.durationUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
13704
13745
  TransportEvent.prototype.positionUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
13705
13746
  TransportEvent.prototype.materialPositionUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
13747
+ TransportEvent.prototype.userTimeUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
13748
+ TransportEvent.prototype.speed = 0;
13706
13749
  TransportEvent.prototype.userPlaylistId = "";
13707
13750
  TransportEvent.prototype.playlistIndex = 0;
13708
13751
  TransportEvent.prototype.playlistLength = 0;
13709
13752
  TransportEvent.prototype.clipId = $util.Long ? $util.Long.fromBits(0, 0, true) : 0;
13710
13753
  TransportEvent.prototype.clipPositionUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
13754
+ TransportEvent.prototype.clipDurationUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
13755
+ TransportEvent.prototype.preroll = 0;
13756
+ TransportEvent.prototype.postroll = 0;
13757
+ TransportEvent.prototype.metadata = null;
13711
13758
  TransportEvent.create = function create(properties) {
13712
13759
  return new TransportEvent(properties);
13713
13760
  };
@@ -13724,51 +13771,86 @@ var sesame = $root.sesame = (() => {
13724
13771
  /* id 2, wireType 2 =*/
13725
13772
  18
13726
13773
  ).string(message.userId);
13774
+ if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
13775
+ writer.uint32(
13776
+ /* id 3, wireType 2 =*/
13777
+ 26
13778
+ ).string(message.uri);
13727
13779
  if (message.state != null && Object.hasOwnProperty.call(message, "state"))
13728
13780
  writer.uint32(
13729
- /* id 3, wireType 0 =*/
13730
- 24
13781
+ /* id 4, wireType 0 =*/
13782
+ 32
13731
13783
  ).int32(message.state);
13732
13784
  if (message.durationUs != null && Object.hasOwnProperty.call(message, "durationUs"))
13733
13785
  writer.uint32(
13734
- /* id 4, wireType 0 =*/
13735
- 32
13786
+ /* id 5, wireType 0 =*/
13787
+ 40
13736
13788
  ).int64(message.durationUs);
13737
13789
  if (message.positionUs != null && Object.hasOwnProperty.call(message, "positionUs"))
13738
13790
  writer.uint32(
13739
- /* id 5, wireType 0 =*/
13740
- 40
13791
+ /* id 6, wireType 0 =*/
13792
+ 48
13741
13793
  ).int64(message.positionUs);
13742
13794
  if (message.materialPositionUs != null && Object.hasOwnProperty.call(message, "materialPositionUs"))
13743
13795
  writer.uint32(
13744
- /* id 6, wireType 0 =*/
13745
- 48
13796
+ /* id 7, wireType 0 =*/
13797
+ 56
13746
13798
  ).int64(message.materialPositionUs);
13799
+ if (message.userTimeUs != null && Object.hasOwnProperty.call(message, "userTimeUs"))
13800
+ writer.uint32(
13801
+ /* id 8, wireType 0 =*/
13802
+ 64
13803
+ ).int64(message.userTimeUs);
13804
+ if (message.speed != null && Object.hasOwnProperty.call(message, "speed"))
13805
+ writer.uint32(
13806
+ /* id 9, wireType 5 =*/
13807
+ 77
13808
+ ).float(message.speed);
13747
13809
  if (message.userPlaylistId != null && Object.hasOwnProperty.call(message, "userPlaylistId"))
13748
13810
  writer.uint32(
13749
- /* id 7, wireType 2 =*/
13750
- 58
13811
+ /* id 10, wireType 2 =*/
13812
+ 82
13751
13813
  ).string(message.userPlaylistId);
13752
13814
  if (message.playlistIndex != null && Object.hasOwnProperty.call(message, "playlistIndex"))
13753
13815
  writer.uint32(
13754
- /* id 8, wireType 0 =*/
13755
- 64
13816
+ /* id 11, wireType 0 =*/
13817
+ 88
13756
13818
  ).uint32(message.playlistIndex);
13757
13819
  if (message.playlistLength != null && Object.hasOwnProperty.call(message, "playlistLength"))
13758
13820
  writer.uint32(
13759
- /* id 9, wireType 0 =*/
13760
- 72
13821
+ /* id 12, wireType 0 =*/
13822
+ 96
13761
13823
  ).uint32(message.playlistLength);
13762
13824
  if (message.clipId != null && Object.hasOwnProperty.call(message, "clipId"))
13763
13825
  writer.uint32(
13764
- /* id 10, wireType 0 =*/
13765
- 80
13826
+ /* id 13, wireType 0 =*/
13827
+ 104
13766
13828
  ).uint64(message.clipId);
13767
13829
  if (message.clipPositionUs != null && Object.hasOwnProperty.call(message, "clipPositionUs"))
13768
13830
  writer.uint32(
13769
- /* id 11, wireType 0 =*/
13770
- 88
13831
+ /* id 14, wireType 0 =*/
13832
+ 112
13771
13833
  ).int64(message.clipPositionUs);
13834
+ if (message.clipDurationUs != null && Object.hasOwnProperty.call(message, "clipDurationUs"))
13835
+ writer.uint32(
13836
+ /* id 15, wireType 0 =*/
13837
+ 120
13838
+ ).int64(message.clipDurationUs);
13839
+ if (message.preroll != null && Object.hasOwnProperty.call(message, "preroll"))
13840
+ writer.uint32(
13841
+ /* id 16, wireType 0 =*/
13842
+ 128
13843
+ ).uint32(message.preroll);
13844
+ if (message.postroll != null && Object.hasOwnProperty.call(message, "postroll"))
13845
+ writer.uint32(
13846
+ /* id 17, wireType 0 =*/
13847
+ 136
13848
+ ).uint32(message.postroll);
13849
+ if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
13850
+ $root.sesame.v1.common.TransportMetadata.encode(message.metadata, writer.uint32(
13851
+ /* id 18, wireType 2 =*/
13852
+ 146
13853
+ ).fork()).ldelim();
13772
13854
  return writer;
13773
13855
  };
13774
13856
  TransportEvent.encodeDelimited = function encodeDelimited(message, writer) {
@@ -13792,41 +13874,69 @@ var sesame = $root.sesame = (() => {
13792
13874
  break;
13793
13875
  }
13794
13876
  case 3: {
13795
- message.state = reader.int32();
13877
+ message.uri = reader.string();
13796
13878
  break;
13797
13879
  }
13798
13880
  case 4: {
13799
- message.durationUs = reader.int64();
13881
+ message.state = reader.int32();
13800
13882
  break;
13801
13883
  }
13802
13884
  case 5: {
13803
- message.positionUs = reader.int64();
13885
+ message.durationUs = reader.int64();
13804
13886
  break;
13805
13887
  }
13806
13888
  case 6: {
13807
- message.materialPositionUs = reader.int64();
13889
+ message.positionUs = reader.int64();
13808
13890
  break;
13809
13891
  }
13810
13892
  case 7: {
13811
- message.userPlaylistId = reader.string();
13893
+ message.materialPositionUs = reader.int64();
13812
13894
  break;
13813
13895
  }
13814
13896
  case 8: {
13815
- message.playlistIndex = reader.uint32();
13897
+ message.userTimeUs = reader.int64();
13816
13898
  break;
13817
13899
  }
13818
13900
  case 9: {
13819
- message.playlistLength = reader.uint32();
13901
+ message.speed = reader.float();
13820
13902
  break;
13821
13903
  }
13822
13904
  case 10: {
13823
- message.clipId = reader.uint64();
13905
+ message.userPlaylistId = reader.string();
13824
13906
  break;
13825
13907
  }
13826
13908
  case 11: {
13909
+ message.playlistIndex = reader.uint32();
13910
+ break;
13911
+ }
13912
+ case 12: {
13913
+ message.playlistLength = reader.uint32();
13914
+ break;
13915
+ }
13916
+ case 13: {
13917
+ message.clipId = reader.uint64();
13918
+ break;
13919
+ }
13920
+ case 14: {
13827
13921
  message.clipPositionUs = reader.int64();
13828
13922
  break;
13829
13923
  }
13924
+ case 15: {
13925
+ message.clipDurationUs = reader.int64();
13926
+ break;
13927
+ }
13928
+ case 16: {
13929
+ message.preroll = reader.uint32();
13930
+ break;
13931
+ }
13932
+ case 17: {
13933
+ message.postroll = reader.uint32();
13934
+ break;
13935
+ }
13936
+ case 18: {
13937
+ message.metadata = $root.sesame.v1.common.TransportMetadata.decode(reader, reader.uint32());
13938
+ break;
13939
+ }
13830
13940
  default:
13831
13941
  reader.skipType(tag & 7);
13832
13942
  break;
@@ -13850,6 +13960,10 @@ var sesame = $root.sesame = (() => {
13850
13960
  if (!$util.isString(message.userId))
13851
13961
  return "userId: string expected";
13852
13962
  }
13963
+ if (message.uri != null && message.hasOwnProperty("uri")) {
13964
+ if (!$util.isString(message.uri))
13965
+ return "uri: string expected";
13966
+ }
13853
13967
  if (message.state != null && message.hasOwnProperty("state"))
13854
13968
  switch (message.state) {
13855
13969
  default:
@@ -13873,6 +13987,14 @@ var sesame = $root.sesame = (() => {
13873
13987
  if (!$util.isInteger(message.materialPositionUs) && !(message.materialPositionUs && $util.isInteger(message.materialPositionUs.low) && $util.isInteger(message.materialPositionUs.high)))
13874
13988
  return "materialPositionUs: integer|Long expected";
13875
13989
  }
13990
+ if (message.userTimeUs != null && message.hasOwnProperty("userTimeUs")) {
13991
+ if (!$util.isInteger(message.userTimeUs) && !(message.userTimeUs && $util.isInteger(message.userTimeUs.low) && $util.isInteger(message.userTimeUs.high)))
13992
+ return "userTimeUs: integer|Long expected";
13993
+ }
13994
+ if (message.speed != null && message.hasOwnProperty("speed")) {
13995
+ if (typeof message.speed !== "number")
13996
+ return "speed: number expected";
13997
+ }
13876
13998
  if (message.userPlaylistId != null && message.hasOwnProperty("userPlaylistId")) {
13877
13999
  if (!$util.isString(message.userPlaylistId))
13878
14000
  return "userPlaylistId: string expected";
@@ -13893,6 +14015,23 @@ var sesame = $root.sesame = (() => {
13893
14015
  if (!$util.isInteger(message.clipPositionUs) && !(message.clipPositionUs && $util.isInteger(message.clipPositionUs.low) && $util.isInteger(message.clipPositionUs.high)))
13894
14016
  return "clipPositionUs: integer|Long expected";
13895
14017
  }
14018
+ if (message.clipDurationUs != null && message.hasOwnProperty("clipDurationUs")) {
14019
+ if (!$util.isInteger(message.clipDurationUs) && !(message.clipDurationUs && $util.isInteger(message.clipDurationUs.low) && $util.isInteger(message.clipDurationUs.high)))
14020
+ return "clipDurationUs: integer|Long expected";
14021
+ }
14022
+ if (message.preroll != null && message.hasOwnProperty("preroll")) {
14023
+ if (!$util.isInteger(message.preroll))
14024
+ return "preroll: integer expected";
14025
+ }
14026
+ if (message.postroll != null && message.hasOwnProperty("postroll")) {
14027
+ if (!$util.isInteger(message.postroll))
14028
+ return "postroll: integer expected";
14029
+ }
14030
+ if (message.metadata != null && message.hasOwnProperty("metadata")) {
14031
+ let error = $root.sesame.v1.common.TransportMetadata.verify(message.metadata);
14032
+ if (error)
14033
+ return "metadata." + error;
14034
+ }
13896
14035
  return null;
13897
14036
  };
13898
14037
  TransportEvent.fromObject = function fromObject(object) {
@@ -13903,6 +14042,8 @@ var sesame = $root.sesame = (() => {
13903
14042
  message.sourceId = String(object.sourceId);
13904
14043
  if (object.userId != null)
13905
14044
  message.userId = String(object.userId);
14045
+ if (object.uri != null)
14046
+ message.uri = String(object.uri);
13906
14047
  switch (object.state) {
13907
14048
  default:
13908
14049
  if (typeof object.state === "number") {
@@ -13961,6 +14102,18 @@ var sesame = $root.sesame = (() => {
13961
14102
  else if (typeof object.materialPositionUs === "object")
13962
14103
  message.materialPositionUs = new $util.LongBits(object.materialPositionUs.low >>> 0, object.materialPositionUs.high >>> 0).toNumber();
13963
14104
  }
14105
+ if (object.userTimeUs != null) {
14106
+ if ($util.Long)
14107
+ (message.userTimeUs = $util.Long.fromValue(object.userTimeUs)).unsigned = false;
14108
+ else if (typeof object.userTimeUs === "string")
14109
+ message.userTimeUs = parseInt(object.userTimeUs, 10);
14110
+ else if (typeof object.userTimeUs === "number")
14111
+ message.userTimeUs = object.userTimeUs;
14112
+ else if (typeof object.userTimeUs === "object")
14113
+ message.userTimeUs = new $util.LongBits(object.userTimeUs.low >>> 0, object.userTimeUs.high >>> 0).toNumber();
14114
+ }
14115
+ if (object.speed != null)
14116
+ message.speed = Number(object.speed);
13964
14117
  if (object.userPlaylistId != null)
13965
14118
  message.userPlaylistId = String(object.userPlaylistId);
13966
14119
  if (object.playlistIndex != null)
@@ -13987,6 +14140,25 @@ var sesame = $root.sesame = (() => {
13987
14140
  else if (typeof object.clipPositionUs === "object")
13988
14141
  message.clipPositionUs = new $util.LongBits(object.clipPositionUs.low >>> 0, object.clipPositionUs.high >>> 0).toNumber();
13989
14142
  }
14143
+ if (object.clipDurationUs != null) {
14144
+ if ($util.Long)
14145
+ (message.clipDurationUs = $util.Long.fromValue(object.clipDurationUs)).unsigned = false;
14146
+ else if (typeof object.clipDurationUs === "string")
14147
+ message.clipDurationUs = parseInt(object.clipDurationUs, 10);
14148
+ else if (typeof object.clipDurationUs === "number")
14149
+ message.clipDurationUs = object.clipDurationUs;
14150
+ else if (typeof object.clipDurationUs === "object")
14151
+ message.clipDurationUs = new $util.LongBits(object.clipDurationUs.low >>> 0, object.clipDurationUs.high >>> 0).toNumber();
14152
+ }
14153
+ if (object.preroll != null)
14154
+ message.preroll = object.preroll >>> 0;
14155
+ if (object.postroll != null)
14156
+ message.postroll = object.postroll >>> 0;
14157
+ if (object.metadata != null) {
14158
+ if (typeof object.metadata !== "object")
14159
+ throw TypeError(".sesame.v1.status.TransportEvent.metadata: object expected");
14160
+ message.metadata = $root.sesame.v1.common.TransportMetadata.fromObject(object.metadata);
14161
+ }
13990
14162
  return message;
13991
14163
  };
13992
14164
  TransportEvent.toObject = function toObject(message, options) {
@@ -13996,6 +14168,7 @@ var sesame = $root.sesame = (() => {
13996
14168
  if (options.defaults) {
13997
14169
  object.sourceId = "";
13998
14170
  object.userId = "";
14171
+ object.uri = "";
13999
14172
  object.state = options.enums === String ? "SOURCE_TRANSPORT_STATE_STOPPED" : 0;
14000
14173
  if ($util.Long) {
14001
14174
  let long = new $util.Long(0, 0, false);
@@ -14012,6 +14185,12 @@ var sesame = $root.sesame = (() => {
14012
14185
  object.materialPositionUs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
14013
14186
  } else
14014
14187
  object.materialPositionUs = options.longs === String ? "0" : 0;
14188
+ if ($util.Long) {
14189
+ let long = new $util.Long(0, 0, false);
14190
+ object.userTimeUs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
14191
+ } else
14192
+ object.userTimeUs = options.longs === String ? "0" : 0;
14193
+ object.speed = 0;
14015
14194
  object.userPlaylistId = "";
14016
14195
  object.playlistIndex = 0;
14017
14196
  object.playlistLength = 0;
@@ -14025,11 +14204,21 @@ var sesame = $root.sesame = (() => {
14025
14204
  object.clipPositionUs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
14026
14205
  } else
14027
14206
  object.clipPositionUs = options.longs === String ? "0" : 0;
14207
+ if ($util.Long) {
14208
+ let long = new $util.Long(0, 0, false);
14209
+ object.clipDurationUs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
14210
+ } else
14211
+ object.clipDurationUs = options.longs === String ? "0" : 0;
14212
+ object.preroll = 0;
14213
+ object.postroll = 0;
14214
+ object.metadata = null;
14028
14215
  }
14029
14216
  if (message.sourceId != null && message.hasOwnProperty("sourceId"))
14030
14217
  object.sourceId = message.sourceId;
14031
14218
  if (message.userId != null && message.hasOwnProperty("userId"))
14032
14219
  object.userId = message.userId;
14220
+ if (message.uri != null && message.hasOwnProperty("uri"))
14221
+ object.uri = message.uri;
14033
14222
  if (message.state != null && message.hasOwnProperty("state"))
14034
14223
  object.state = options.enums === String ? $root.sesame.v1.sources.SourceTransportState[message.state] === void 0 ? message.state : $root.sesame.v1.sources.SourceTransportState[message.state] : message.state;
14035
14224
  if (message.durationUs != null && message.hasOwnProperty("durationUs"))
@@ -14047,6 +14236,13 @@ var sesame = $root.sesame = (() => {
14047
14236
  object.materialPositionUs = options.longs === String ? String(message.materialPositionUs) : message.materialPositionUs;
14048
14237
  else
14049
14238
  object.materialPositionUs = options.longs === String ? $util.Long.prototype.toString.call(message.materialPositionUs) : options.longs === Number ? new $util.LongBits(message.materialPositionUs.low >>> 0, message.materialPositionUs.high >>> 0).toNumber() : message.materialPositionUs;
14239
+ if (message.userTimeUs != null && message.hasOwnProperty("userTimeUs"))
14240
+ if (typeof message.userTimeUs === "number")
14241
+ object.userTimeUs = options.longs === String ? String(message.userTimeUs) : message.userTimeUs;
14242
+ else
14243
+ object.userTimeUs = options.longs === String ? $util.Long.prototype.toString.call(message.userTimeUs) : options.longs === Number ? new $util.LongBits(message.userTimeUs.low >>> 0, message.userTimeUs.high >>> 0).toNumber() : message.userTimeUs;
14244
+ if (message.speed != null && message.hasOwnProperty("speed"))
14245
+ object.speed = options.json && !isFinite(message.speed) ? String(message.speed) : message.speed;
14050
14246
  if (message.userPlaylistId != null && message.hasOwnProperty("userPlaylistId"))
14051
14247
  object.userPlaylistId = message.userPlaylistId;
14052
14248
  if (message.playlistIndex != null && message.hasOwnProperty("playlistIndex"))
@@ -14063,6 +14259,17 @@ var sesame = $root.sesame = (() => {
14063
14259
  object.clipPositionUs = options.longs === String ? String(message.clipPositionUs) : message.clipPositionUs;
14064
14260
  else
14065
14261
  object.clipPositionUs = options.longs === String ? $util.Long.prototype.toString.call(message.clipPositionUs) : options.longs === Number ? new $util.LongBits(message.clipPositionUs.low >>> 0, message.clipPositionUs.high >>> 0).toNumber() : message.clipPositionUs;
14262
+ if (message.clipDurationUs != null && message.hasOwnProperty("clipDurationUs"))
14263
+ if (typeof message.clipDurationUs === "number")
14264
+ object.clipDurationUs = options.longs === String ? String(message.clipDurationUs) : message.clipDurationUs;
14265
+ else
14266
+ object.clipDurationUs = options.longs === String ? $util.Long.prototype.toString.call(message.clipDurationUs) : options.longs === Number ? new $util.LongBits(message.clipDurationUs.low >>> 0, message.clipDurationUs.high >>> 0).toNumber() : message.clipDurationUs;
14267
+ if (message.preroll != null && message.hasOwnProperty("preroll"))
14268
+ object.preroll = message.preroll;
14269
+ if (message.postroll != null && message.hasOwnProperty("postroll"))
14270
+ object.postroll = message.postroll;
14271
+ if (message.metadata != null && message.hasOwnProperty("metadata"))
14272
+ object.metadata = $root.sesame.v1.common.TransportMetadata.toObject(message.metadata, options);
14066
14273
  return object;
14067
14274
  };
14068
14275
  TransportEvent.prototype.toJSON = function toJSON() {
@@ -14087,12 +14294,11 @@ var sesame = $root.sesame = (() => {
14087
14294
  Event2.prototype.errorEvent = null;
14088
14295
  Event2.prototype.transportEvent = null;
14089
14296
  Event2.prototype.callbackEvent = null;
14090
- Event2.prototype.playlistExportEvent = null;
14091
- Event2.prototype.clipImportEvent = null;
14297
+ Event2.prototype.jobEvent = null;
14092
14298
  Event2.prototype.recorderEvent = null;
14093
14299
  let $oneOfFields;
14094
14300
  Object.defineProperty(Event2.prototype, "event", {
14095
- get: $util.oneOfGetter($oneOfFields = ["errorEvent", "transportEvent", "callbackEvent", "playlistExportEvent", "clipImportEvent", "recorderEvent"]),
14301
+ get: $util.oneOfGetter($oneOfFields = ["errorEvent", "transportEvent", "callbackEvent", "jobEvent", "recorderEvent"]),
14096
14302
  set: $util.oneOfSetter($oneOfFields)
14097
14303
  });
14098
14304
  Event2.create = function create(properties) {
@@ -14116,16 +14322,11 @@ var sesame = $root.sesame = (() => {
14116
14322
  /* id 3, wireType 2 =*/
14117
14323
  26
14118
14324
  ).fork()).ldelim();
14119
- if (message.playlistExportEvent != null && Object.hasOwnProperty.call(message, "playlistExportEvent"))
14120
- $root.sesame.v1.jobs.JobEvent.encode(message.playlistExportEvent, writer.uint32(
14325
+ if (message.jobEvent != null && Object.hasOwnProperty.call(message, "jobEvent"))
14326
+ $root.sesame.v1.jobs.Job.encode(message.jobEvent, writer.uint32(
14121
14327
  /* id 4, wireType 2 =*/
14122
14328
  34
14123
14329
  ).fork()).ldelim();
14124
- if (message.clipImportEvent != null && Object.hasOwnProperty.call(message, "clipImportEvent"))
14125
- $root.sesame.v1.jobs.JobEvent.encode(message.clipImportEvent, writer.uint32(
14126
- /* id 5, wireType 2 =*/
14127
- 42
14128
- ).fork()).ldelim();
14129
14330
  if (message.recorderEvent != null && Object.hasOwnProperty.call(message, "recorderEvent"))
14130
14331
  $root.sesame.v1.recorder.RecorderEvent.encode(message.recorderEvent, writer.uint32(
14131
14332
  /* id 6, wireType 2 =*/
@@ -14158,11 +14359,7 @@ var sesame = $root.sesame = (() => {
14158
14359
  break;
14159
14360
  }
14160
14361
  case 4: {
14161
- message.playlistExportEvent = $root.sesame.v1.jobs.JobEvent.decode(reader, reader.uint32());
14162
- break;
14163
- }
14164
- case 5: {
14165
- message.clipImportEvent = $root.sesame.v1.jobs.JobEvent.decode(reader, reader.uint32());
14362
+ message.jobEvent = $root.sesame.v1.jobs.Job.decode(reader, reader.uint32());
14166
14363
  break;
14167
14364
  }
14168
14365
  case 6: {
@@ -14213,24 +14410,14 @@ var sesame = $root.sesame = (() => {
14213
14410
  return "callbackEvent." + error;
14214
14411
  }
14215
14412
  }
14216
- if (message.playlistExportEvent != null && message.hasOwnProperty("playlistExportEvent")) {
14217
- if (properties.event === 1)
14218
- return "event: multiple values";
14219
- properties.event = 1;
14220
- {
14221
- let error = $root.sesame.v1.jobs.JobEvent.verify(message.playlistExportEvent);
14222
- if (error)
14223
- return "playlistExportEvent." + error;
14224
- }
14225
- }
14226
- if (message.clipImportEvent != null && message.hasOwnProperty("clipImportEvent")) {
14413
+ if (message.jobEvent != null && message.hasOwnProperty("jobEvent")) {
14227
14414
  if (properties.event === 1)
14228
14415
  return "event: multiple values";
14229
14416
  properties.event = 1;
14230
14417
  {
14231
- let error = $root.sesame.v1.jobs.JobEvent.verify(message.clipImportEvent);
14418
+ let error = $root.sesame.v1.jobs.Job.verify(message.jobEvent);
14232
14419
  if (error)
14233
- return "clipImportEvent." + error;
14420
+ return "jobEvent." + error;
14234
14421
  }
14235
14422
  }
14236
14423
  if (message.recorderEvent != null && message.hasOwnProperty("recorderEvent")) {
@@ -14264,15 +14451,10 @@ var sesame = $root.sesame = (() => {
14264
14451
  throw TypeError(".sesame.v1.status.Event.callbackEvent: object expected");
14265
14452
  message.callbackEvent = $root.sesame.v1.common.Callback.fromObject(object.callbackEvent);
14266
14453
  }
14267
- if (object.playlistExportEvent != null) {
14268
- if (typeof object.playlistExportEvent !== "object")
14269
- throw TypeError(".sesame.v1.status.Event.playlistExportEvent: object expected");
14270
- message.playlistExportEvent = $root.sesame.v1.jobs.JobEvent.fromObject(object.playlistExportEvent);
14271
- }
14272
- if (object.clipImportEvent != null) {
14273
- if (typeof object.clipImportEvent !== "object")
14274
- throw TypeError(".sesame.v1.status.Event.clipImportEvent: object expected");
14275
- message.clipImportEvent = $root.sesame.v1.jobs.JobEvent.fromObject(object.clipImportEvent);
14454
+ if (object.jobEvent != null) {
14455
+ if (typeof object.jobEvent !== "object")
14456
+ throw TypeError(".sesame.v1.status.Event.jobEvent: object expected");
14457
+ message.jobEvent = $root.sesame.v1.jobs.Job.fromObject(object.jobEvent);
14276
14458
  }
14277
14459
  if (object.recorderEvent != null) {
14278
14460
  if (typeof object.recorderEvent !== "object")
@@ -14300,15 +14482,10 @@ var sesame = $root.sesame = (() => {
14300
14482
  if (options.oneofs)
14301
14483
  object.event = "callbackEvent";
14302
14484
  }
14303
- if (message.playlistExportEvent != null && message.hasOwnProperty("playlistExportEvent")) {
14304
- object.playlistExportEvent = $root.sesame.v1.jobs.JobEvent.toObject(message.playlistExportEvent, options);
14305
- if (options.oneofs)
14306
- object.event = "playlistExportEvent";
14307
- }
14308
- if (message.clipImportEvent != null && message.hasOwnProperty("clipImportEvent")) {
14309
- object.clipImportEvent = $root.sesame.v1.jobs.JobEvent.toObject(message.clipImportEvent, options);
14485
+ if (message.jobEvent != null && message.hasOwnProperty("jobEvent")) {
14486
+ object.jobEvent = $root.sesame.v1.jobs.Job.toObject(message.jobEvent, options);
14310
14487
  if (options.oneofs)
14311
- object.event = "clipImportEvent";
14488
+ object.event = "jobEvent";
14312
14489
  }
14313
14490
  if (message.recorderEvent != null && message.hasOwnProperty("recorderEvent")) {
14314
14491
  object.recorderEvent = $root.sesame.v1.recorder.RecorderEvent.toObject(message.recorderEvent, options);
@@ -14419,7 +14596,6 @@ var sesame = $root.sesame = (() => {
14419
14596
  case 2:
14420
14597
  case 3:
14421
14598
  case 4:
14422
- case 5:
14423
14599
  case 6:
14424
14600
  break;
14425
14601
  }
@@ -14464,14 +14640,10 @@ var sesame = $root.sesame = (() => {
14464
14640
  case 3:
14465
14641
  message.eventTopics[i] = 3;
14466
14642
  break;
14467
- case "EVENT_TOPIC_PLAYLIST_EXPORT":
14643
+ case "EVENT_TOPIC_JOB":
14468
14644
  case 4:
14469
14645
  message.eventTopics[i] = 4;
14470
14646
  break;
14471
- case "EVENT_TOPIC_CLIP_IMPORT":
14472
- case 5:
14473
- message.eventTopics[i] = 5;
14474
- break;
14475
14647
  case "EVENT_TOPIC_RECORDER":
14476
14648
  case 6:
14477
14649
  message.eventTopics[i] = 6;
@@ -14557,7 +14729,7 @@ var sesame = $root.sesame = (() => {
14557
14729
  this[keys[i]] = properties[keys[i]];
14558
14730
  }
14559
14731
  }
14560
- EncoderConfig.prototype.codecId = 0;
14732
+ EncoderConfig.prototype.codec = 0;
14561
14733
  EncoderConfig.prototype.preset = 0;
14562
14734
  EncoderConfig.prototype.bitrateKbps = 0;
14563
14735
  EncoderConfig.prototype.keyframeInterval = 0;
@@ -14570,11 +14742,11 @@ var sesame = $root.sesame = (() => {
14570
14742
  EncoderConfig.encode = function encode(message, writer) {
14571
14743
  if (!writer)
14572
14744
  writer = $Writer.create();
14573
- if (message.codecId != null && Object.hasOwnProperty.call(message, "codecId"))
14745
+ if (message.codec != null && Object.hasOwnProperty.call(message, "codec"))
14574
14746
  writer.uint32(
14575
14747
  /* id 1, wireType 0 =*/
14576
14748
  8
14577
- ).int32(message.codecId);
14749
+ ).int32(message.codec);
14578
14750
  if (message.preset != null && Object.hasOwnProperty.call(message, "preset"))
14579
14751
  writer.uint32(
14580
14752
  /* id 2, wireType 0 =*/
@@ -14620,7 +14792,7 @@ var sesame = $root.sesame = (() => {
14620
14792
  break;
14621
14793
  switch (tag >>> 3) {
14622
14794
  case 1: {
14623
- message.codecId = reader.int32();
14795
+ message.codec = reader.int32();
14624
14796
  break;
14625
14797
  }
14626
14798
  case 2: {
@@ -14662,10 +14834,10 @@ var sesame = $root.sesame = (() => {
14662
14834
  EncoderConfig.verify = function verify(message) {
14663
14835
  if (typeof message !== "object" || message === null)
14664
14836
  return "object expected";
14665
- if (message.codecId != null && message.hasOwnProperty("codecId"))
14666
- switch (message.codecId) {
14837
+ if (message.codec != null && message.hasOwnProperty("codec"))
14838
+ switch (message.codec) {
14667
14839
  default:
14668
- return "codecId: enum value expected";
14840
+ return "codec: enum value expected";
14669
14841
  case 0:
14670
14842
  case 1:
14671
14843
  case 2:
@@ -14673,6 +14845,11 @@ var sesame = $root.sesame = (() => {
14673
14845
  case 4:
14674
14846
  case 5:
14675
14847
  case 6:
14848
+ case 7:
14849
+ case 64:
14850
+ case 65:
14851
+ case 66:
14852
+ case 67:
14676
14853
  break;
14677
14854
  }
14678
14855
  if (message.preset != null && message.hasOwnProperty("preset"))
@@ -14711,40 +14888,60 @@ var sesame = $root.sesame = (() => {
14711
14888
  if (object instanceof $root.sesame.v1.outputs.EncoderConfig)
14712
14889
  return object;
14713
14890
  let message = new $root.sesame.v1.outputs.EncoderConfig();
14714
- switch (object.codecId) {
14891
+ switch (object.codec) {
14715
14892
  default:
14716
- if (typeof object.codecId === "number") {
14717
- message.codecId = object.codecId;
14893
+ if (typeof object.codec === "number") {
14894
+ message.codec = object.codec;
14718
14895
  break;
14719
14896
  }
14720
14897
  break;
14721
- case "CODEC_ID_UNSPECIFIED":
14898
+ case "CODEC_TYPE_UNSPECIFIED":
14722
14899
  case 0:
14723
- message.codecId = 0;
14900
+ message.codec = 0;
14724
14901
  break;
14725
- case "CODEC_ID_H264":
14902
+ case "CODEC_TYPE_VIDEO_VP8":
14726
14903
  case 1:
14727
- message.codecId = 1;
14904
+ message.codec = 1;
14728
14905
  break;
14729
- case "CODEC_ID_HEVC":
14906
+ case "CODEC_TYPE_VIDEO_VP9":
14730
14907
  case 2:
14731
- message.codecId = 2;
14908
+ message.codec = 2;
14732
14909
  break;
14733
- case "CODEC_ID_AV1":
14910
+ case "CODEC_TYPE_VIDEO_AVC":
14734
14911
  case 3:
14735
- message.codecId = 3;
14912
+ message.codec = 3;
14736
14913
  break;
14737
- case "CODEC_ID_VP8":
14914
+ case "CODEC_TYPE_VIDEO_HEVC":
14738
14915
  case 4:
14739
- message.codecId = 4;
14916
+ message.codec = 4;
14740
14917
  break;
14741
- case "CODEC_ID_PRORES":
14918
+ case "CODEC_TYPE_VIDEO_AV1":
14742
14919
  case 5:
14743
- message.codecId = 5;
14920
+ message.codec = 5;
14744
14921
  break;
14745
- case "CODEC_ID_DNXHR":
14922
+ case "CODEC_TYPE_VIDEO_PRORES":
14746
14923
  case 6:
14747
- message.codecId = 6;
14924
+ message.codec = 6;
14925
+ break;
14926
+ case "CODEC_TYPE_VIDEO_DNXHR":
14927
+ case 7:
14928
+ message.codec = 7;
14929
+ break;
14930
+ case "CODEC_TYPE_AUDIO_OPUS":
14931
+ case 64:
14932
+ message.codec = 64;
14933
+ break;
14934
+ case "CODEC_TYPE_AUDIO_AAC":
14935
+ case 65:
14936
+ message.codec = 65;
14937
+ break;
14938
+ case "CODEC_TYPE_AUDIO_PCM":
14939
+ case 66:
14940
+ message.codec = 66;
14941
+ break;
14942
+ case "CODEC_TYPE_AUDIO_PCM_S24LE":
14943
+ case 67:
14944
+ message.codec = 67;
14748
14945
  break;
14749
14946
  }
14750
14947
  switch (object.preset) {
@@ -14788,7 +14985,7 @@ var sesame = $root.sesame = (() => {
14788
14985
  options = {};
14789
14986
  let object = {};
14790
14987
  if (options.defaults) {
14791
- object.codecId = options.enums === String ? "CODEC_ID_UNSPECIFIED" : 0;
14988
+ object.codec = options.enums === String ? "CODEC_TYPE_UNSPECIFIED" : 0;
14792
14989
  object.preset = options.enums === String ? "ENCODER_PRESET_UNSPECIFIED" : 0;
14793
14990
  object.bitrateKbps = 0;
14794
14991
  object.keyframeInterval = 0;
@@ -14796,8 +14993,8 @@ var sesame = $root.sesame = (() => {
14796
14993
  object.height = 0;
14797
14994
  object.fps = 0;
14798
14995
  }
14799
- if (message.codecId != null && message.hasOwnProperty("codecId"))
14800
- object.codecId = options.enums === String ? $root.sesame.v1.common.CodecId[message.codecId] === void 0 ? message.codecId : $root.sesame.v1.common.CodecId[message.codecId] : message.codecId;
14996
+ if (message.codec != null && message.hasOwnProperty("codec"))
14997
+ object.codec = options.enums === String ? $root.sesame.v1.common.CodecType[message.codec] === void 0 ? message.codec : $root.sesame.v1.common.CodecType[message.codec] : message.codec;
14801
14998
  if (message.preset != null && message.hasOwnProperty("preset"))
14802
14999
  object.preset = options.enums === String ? $root.sesame.v1.outputs.EncoderPreset[message.preset] === void 0 ? message.preset : $root.sesame.v1.outputs.EncoderPreset[message.preset] : message.preset;
14803
15000
  if (message.bitrateKbps != null && message.hasOwnProperty("bitrateKbps"))
@@ -18379,6 +18576,13 @@ var sesame = $root.sesame = (() => {
18379
18576
  }();
18380
18577
  v1.jobs = function() {
18381
18578
  const jobs = {};
18579
+ jobs.JobType = function() {
18580
+ const valuesById = {}, values = Object.create(valuesById);
18581
+ values[valuesById[0] = "JOB_TYPE_UNSPECIFIED"] = 0;
18582
+ values[valuesById[1] = "JOB_TYPE_EXPORT"] = 1;
18583
+ values[valuesById[2] = "JOB_TYPE_IMPORT"] = 2;
18584
+ return values;
18585
+ }();
18382
18586
  jobs.JobStatus = function() {
18383
18587
  const valuesById = {}, values = Object.create(valuesById);
18384
18588
  values[valuesById[0] = "JOB_STATUS_UNSPECIFIED"] = 0;
@@ -18398,15 +18602,6 @@ var sesame = $root.sesame = (() => {
18398
18602
  values[valuesById[4] = "CONTAINER_FORMAT_MXF"] = 4;
18399
18603
  return values;
18400
18604
  }();
18401
- jobs.AudioCodecId = function() {
18402
- const valuesById = {}, values = Object.create(valuesById);
18403
- values[valuesById[0] = "AUDIO_CODEC_ID_UNSPECIFIED"] = 0;
18404
- values[valuesById[1] = "AUDIO_CODEC_ID_AAC"] = 1;
18405
- values[valuesById[2] = "AUDIO_CODEC_ID_OPUS"] = 2;
18406
- values[valuesById[3] = "AUDIO_CODEC_ID_PCM_S16LE"] = 3;
18407
- values[valuesById[4] = "AUDIO_CODEC_ID_PCM_S24LE"] = 4;
18408
- return values;
18409
- }();
18410
18605
  jobs.RateControlMode = function() {
18411
18606
  const valuesById = {}, values = Object.create(valuesById);
18412
18607
  values[valuesById[0] = "RATE_CONTROL_MODE_UNSPECIFIED"] = 0;
@@ -18553,107 +18748,131 @@ var sesame = $root.sesame = (() => {
18553
18748
  };
18554
18749
  return TimingInfo;
18555
18750
  }();
18556
- jobs.JobStatusResponse = function() {
18557
- function JobStatusResponse(properties) {
18751
+ jobs.Job = function() {
18752
+ function Job(properties) {
18558
18753
  if (properties) {
18559
18754
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
18560
18755
  if (properties[keys[i]] != null)
18561
18756
  this[keys[i]] = properties[keys[i]];
18562
18757
  }
18563
18758
  }
18564
- JobStatusResponse.prototype.jobId = 0;
18565
- JobStatusResponse.prototype.name = "";
18566
- JobStatusResponse.prototype.description = "";
18567
- JobStatusResponse.prototype.status = 0;
18568
- JobStatusResponse.prototype.error = null;
18569
- JobStatusResponse.prototype.progress = 0;
18570
- JobStatusResponse.prototype.total = 0;
18759
+ Job.prototype.id = 0;
18760
+ Job.prototype.type = 0;
18761
+ Job.prototype.status = 0;
18762
+ Job.prototype.name = "";
18763
+ Job.prototype.description = "";
18764
+ Job.prototype.error = null;
18765
+ Job.prototype.progress = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
18766
+ Job.prototype.total = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
18767
+ Job.prototype.timingInfo = null;
18571
18768
  let $oneOfFields;
18572
- Object.defineProperty(JobStatusResponse.prototype, "_error", {
18769
+ Object.defineProperty(Job.prototype, "_error", {
18573
18770
  get: $util.oneOfGetter($oneOfFields = ["error"]),
18574
18771
  set: $util.oneOfSetter($oneOfFields)
18575
18772
  });
18576
- JobStatusResponse.create = function create(properties) {
18577
- return new JobStatusResponse(properties);
18773
+ Object.defineProperty(Job.prototype, "_timingInfo", {
18774
+ get: $util.oneOfGetter($oneOfFields = ["timingInfo"]),
18775
+ set: $util.oneOfSetter($oneOfFields)
18776
+ });
18777
+ Job.create = function create(properties) {
18778
+ return new Job(properties);
18578
18779
  };
18579
- JobStatusResponse.encode = function encode(message, writer) {
18780
+ Job.encode = function encode(message, writer) {
18580
18781
  if (!writer)
18581
18782
  writer = $Writer.create();
18582
- if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
18783
+ if (message.id != null && Object.hasOwnProperty.call(message, "id"))
18583
18784
  writer.uint32(
18584
18785
  /* id 1, wireType 0 =*/
18585
18786
  8
18586
- ).uint32(message.jobId);
18787
+ ).uint32(message.id);
18788
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
18789
+ writer.uint32(
18790
+ /* id 2, wireType 0 =*/
18791
+ 16
18792
+ ).int32(message.type);
18793
+ if (message.status != null && Object.hasOwnProperty.call(message, "status"))
18794
+ writer.uint32(
18795
+ /* id 3, wireType 0 =*/
18796
+ 24
18797
+ ).int32(message.status);
18587
18798
  if (message.name != null && Object.hasOwnProperty.call(message, "name"))
18588
18799
  writer.uint32(
18589
- /* id 2, wireType 2 =*/
18590
- 18
18800
+ /* id 4, wireType 2 =*/
18801
+ 34
18591
18802
  ).string(message.name);
18592
18803
  if (message.description != null && Object.hasOwnProperty.call(message, "description"))
18593
18804
  writer.uint32(
18594
- /* id 3, wireType 2 =*/
18595
- 26
18805
+ /* id 5, wireType 2 =*/
18806
+ 42
18596
18807
  ).string(message.description);
18597
- if (message.status != null && Object.hasOwnProperty.call(message, "status"))
18598
- writer.uint32(
18599
- /* id 4, wireType 0 =*/
18600
- 32
18601
- ).int32(message.status);
18602
18808
  if (message.error != null && Object.hasOwnProperty.call(message, "error"))
18603
18809
  writer.uint32(
18604
- /* id 5, wireType 2 =*/
18605
- 42
18810
+ /* id 6, wireType 2 =*/
18811
+ 50
18606
18812
  ).string(message.error);
18607
18813
  if (message.progress != null && Object.hasOwnProperty.call(message, "progress"))
18608
- writer.uint32(
18609
- /* id 6, wireType 0 =*/
18610
- 48
18611
- ).uint32(message.progress);
18612
- if (message.total != null && Object.hasOwnProperty.call(message, "total"))
18613
18814
  writer.uint32(
18614
18815
  /* id 7, wireType 0 =*/
18615
18816
  56
18616
- ).uint32(message.total);
18817
+ ).int64(message.progress);
18818
+ if (message.total != null && Object.hasOwnProperty.call(message, "total"))
18819
+ writer.uint32(
18820
+ /* id 8, wireType 0 =*/
18821
+ 64
18822
+ ).int64(message.total);
18823
+ if (message.timingInfo != null && Object.hasOwnProperty.call(message, "timingInfo"))
18824
+ $root.sesame.v1.jobs.TimingInfo.encode(message.timingInfo, writer.uint32(
18825
+ /* id 9, wireType 2 =*/
18826
+ 74
18827
+ ).fork()).ldelim();
18617
18828
  return writer;
18618
18829
  };
18619
- JobStatusResponse.encodeDelimited = function encodeDelimited(message, writer) {
18830
+ Job.encodeDelimited = function encodeDelimited(message, writer) {
18620
18831
  return this.encode(message, writer).ldelim();
18621
18832
  };
18622
- JobStatusResponse.decode = function decode(reader, length, error) {
18833
+ Job.decode = function decode(reader, length, error) {
18623
18834
  if (!(reader instanceof $Reader))
18624
18835
  reader = $Reader.create(reader);
18625
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobStatusResponse();
18836
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.Job();
18626
18837
  while (reader.pos < end) {
18627
18838
  let tag = reader.uint32();
18628
18839
  if (tag === error)
18629
18840
  break;
18630
18841
  switch (tag >>> 3) {
18631
18842
  case 1: {
18632
- message.jobId = reader.uint32();
18843
+ message.id = reader.uint32();
18633
18844
  break;
18634
18845
  }
18635
18846
  case 2: {
18636
- message.name = reader.string();
18847
+ message.type = reader.int32();
18637
18848
  break;
18638
18849
  }
18639
18850
  case 3: {
18640
- message.description = reader.string();
18851
+ message.status = reader.int32();
18641
18852
  break;
18642
18853
  }
18643
18854
  case 4: {
18644
- message.status = reader.int32();
18855
+ message.name = reader.string();
18645
18856
  break;
18646
18857
  }
18647
18858
  case 5: {
18648
- message.error = reader.string();
18859
+ message.description = reader.string();
18649
18860
  break;
18650
18861
  }
18651
18862
  case 6: {
18652
- message.progress = reader.uint32();
18863
+ message.error = reader.string();
18653
18864
  break;
18654
18865
  }
18655
18866
  case 7: {
18656
- message.total = reader.uint32();
18867
+ message.progress = reader.int64();
18868
+ break;
18869
+ }
18870
+ case 8: {
18871
+ message.total = reader.int64();
18872
+ break;
18873
+ }
18874
+ case 9: {
18875
+ message.timingInfo = $root.sesame.v1.jobs.TimingInfo.decode(reader, reader.uint32());
18657
18876
  break;
18658
18877
  }
18659
18878
  default:
@@ -18663,27 +18882,28 @@ var sesame = $root.sesame = (() => {
18663
18882
  }
18664
18883
  return message;
18665
18884
  };
18666
- JobStatusResponse.decodeDelimited = function decodeDelimited(reader) {
18885
+ Job.decodeDelimited = function decodeDelimited(reader) {
18667
18886
  if (!(reader instanceof $Reader))
18668
18887
  reader = new $Reader(reader);
18669
18888
  return this.decode(reader, reader.uint32());
18670
18889
  };
18671
- JobStatusResponse.verify = function verify(message) {
18890
+ Job.verify = function verify(message) {
18672
18891
  if (typeof message !== "object" || message === null)
18673
18892
  return "object expected";
18674
18893
  let properties = {};
18675
- if (message.jobId != null && message.hasOwnProperty("jobId")) {
18676
- if (!$util.isInteger(message.jobId))
18677
- return "jobId: integer expected";
18678
- }
18679
- if (message.name != null && message.hasOwnProperty("name")) {
18680
- if (!$util.isString(message.name))
18681
- return "name: string expected";
18682
- }
18683
- if (message.description != null && message.hasOwnProperty("description")) {
18684
- if (!$util.isString(message.description))
18685
- return "description: string expected";
18894
+ if (message.id != null && message.hasOwnProperty("id")) {
18895
+ if (!$util.isInteger(message.id))
18896
+ return "id: integer expected";
18686
18897
  }
18898
+ if (message.type != null && message.hasOwnProperty("type"))
18899
+ switch (message.type) {
18900
+ default:
18901
+ return "type: enum value expected";
18902
+ case 0:
18903
+ case 1:
18904
+ case 2:
18905
+ break;
18906
+ }
18687
18907
  if (message.status != null && message.hasOwnProperty("status"))
18688
18908
  switch (message.status) {
18689
18909
  default:
@@ -18696,31 +18916,63 @@ var sesame = $root.sesame = (() => {
18696
18916
  case 5:
18697
18917
  break;
18698
18918
  }
18919
+ if (message.name != null && message.hasOwnProperty("name")) {
18920
+ if (!$util.isString(message.name))
18921
+ return "name: string expected";
18922
+ }
18923
+ if (message.description != null && message.hasOwnProperty("description")) {
18924
+ if (!$util.isString(message.description))
18925
+ return "description: string expected";
18926
+ }
18699
18927
  if (message.error != null && message.hasOwnProperty("error")) {
18700
18928
  properties._error = 1;
18701
18929
  if (!$util.isString(message.error))
18702
18930
  return "error: string expected";
18703
18931
  }
18704
18932
  if (message.progress != null && message.hasOwnProperty("progress")) {
18705
- if (!$util.isInteger(message.progress))
18706
- return "progress: integer expected";
18933
+ if (!$util.isInteger(message.progress) && !(message.progress && $util.isInteger(message.progress.low) && $util.isInteger(message.progress.high)))
18934
+ return "progress: integer|Long expected";
18707
18935
  }
18708
18936
  if (message.total != null && message.hasOwnProperty("total")) {
18709
- if (!$util.isInteger(message.total))
18710
- return "total: integer expected";
18937
+ if (!$util.isInteger(message.total) && !(message.total && $util.isInteger(message.total.low) && $util.isInteger(message.total.high)))
18938
+ return "total: integer|Long expected";
18939
+ }
18940
+ if (message.timingInfo != null && message.hasOwnProperty("timingInfo")) {
18941
+ properties._timingInfo = 1;
18942
+ {
18943
+ let error = $root.sesame.v1.jobs.TimingInfo.verify(message.timingInfo);
18944
+ if (error)
18945
+ return "timingInfo." + error;
18946
+ }
18711
18947
  }
18712
18948
  return null;
18713
18949
  };
18714
- JobStatusResponse.fromObject = function fromObject(object) {
18715
- if (object instanceof $root.sesame.v1.jobs.JobStatusResponse)
18950
+ Job.fromObject = function fromObject(object) {
18951
+ if (object instanceof $root.sesame.v1.jobs.Job)
18716
18952
  return object;
18717
- let message = new $root.sesame.v1.jobs.JobStatusResponse();
18718
- if (object.jobId != null)
18719
- message.jobId = object.jobId >>> 0;
18720
- if (object.name != null)
18721
- message.name = String(object.name);
18722
- if (object.description != null)
18723
- message.description = String(object.description);
18953
+ let message = new $root.sesame.v1.jobs.Job();
18954
+ if (object.id != null)
18955
+ message.id = object.id >>> 0;
18956
+ switch (object.type) {
18957
+ default:
18958
+ if (typeof object.type === "number") {
18959
+ message.type = object.type;
18960
+ break;
18961
+ }
18962
+ break;
18963
+ case "JOB_TYPE_UNSPECIFIED":
18964
+ case 0:
18965
+ message.type = 0;
18966
+ break;
18967
+ case "JOB_TYPE_EXPORT":
18968
+ case 1:
18969
+ message.type = 1;
18970
+ break;
18971
+ case "JOB_TYPE_IMPORT":
18972
+ case 2:
18973
+ message.type = 2;
18974
+ break;
18975
+ }
18724
18976
  switch (object.status) {
18725
18977
  default:
18726
18978
  if (typeof object.status === "number") {
@@ -18753,58 +19005,105 @@ var sesame = $root.sesame = (() => {
18753
19005
  message.status = 5;
18754
19006
  break;
18755
19007
  }
19008
+ if (object.name != null)
19009
+ message.name = String(object.name);
19010
+ if (object.description != null)
19011
+ message.description = String(object.description);
18756
19012
  if (object.error != null)
18757
19013
  message.error = String(object.error);
18758
- if (object.progress != null)
18759
- message.progress = object.progress >>> 0;
18760
- if (object.total != null)
18761
- message.total = object.total >>> 0;
19014
+ if (object.progress != null) {
19015
+ if ($util.Long)
19016
+ (message.progress = $util.Long.fromValue(object.progress)).unsigned = false;
19017
+ else if (typeof object.progress === "string")
19018
+ message.progress = parseInt(object.progress, 10);
19019
+ else if (typeof object.progress === "number")
19020
+ message.progress = object.progress;
19021
+ else if (typeof object.progress === "object")
19022
+ message.progress = new $util.LongBits(object.progress.low >>> 0, object.progress.high >>> 0).toNumber();
19023
+ }
19024
+ if (object.total != null) {
19025
+ if ($util.Long)
19026
+ (message.total = $util.Long.fromValue(object.total)).unsigned = false;
19027
+ else if (typeof object.total === "string")
19028
+ message.total = parseInt(object.total, 10);
19029
+ else if (typeof object.total === "number")
19030
+ message.total = object.total;
19031
+ else if (typeof object.total === "object")
19032
+ message.total = new $util.LongBits(object.total.low >>> 0, object.total.high >>> 0).toNumber();
19033
+ }
19034
+ if (object.timingInfo != null) {
19035
+ if (typeof object.timingInfo !== "object")
19036
+ throw TypeError(".sesame.v1.jobs.Job.timingInfo: object expected");
19037
+ message.timingInfo = $root.sesame.v1.jobs.TimingInfo.fromObject(object.timingInfo);
19038
+ }
18762
19039
  return message;
18763
19040
  };
18764
- JobStatusResponse.toObject = function toObject(message, options) {
19041
+ Job.toObject = function toObject(message, options) {
18765
19042
  if (!options)
18766
19043
  options = {};
18767
19044
  let object = {};
18768
19045
  if (options.defaults) {
18769
- object.jobId = 0;
19046
+ object.id = 0;
19047
+ object.type = options.enums === String ? "JOB_TYPE_UNSPECIFIED" : 0;
19048
+ object.status = options.enums === String ? "JOB_STATUS_UNSPECIFIED" : 0;
18770
19049
  object.name = "";
18771
19050
  object.description = "";
18772
- object.status = options.enums === String ? "JOB_STATUS_UNSPECIFIED" : 0;
18773
- object.progress = 0;
18774
- object.total = 0;
19051
+ if ($util.Long) {
19052
+ let long = new $util.Long(0, 0, false);
19053
+ object.progress = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
19054
+ } else
19055
+ object.progress = options.longs === String ? "0" : 0;
19056
+ if ($util.Long) {
19057
+ let long = new $util.Long(0, 0, false);
19058
+ object.total = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
19059
+ } else
19060
+ object.total = options.longs === String ? "0" : 0;
18775
19061
  }
18776
- if (message.jobId != null && message.hasOwnProperty("jobId"))
18777
- object.jobId = message.jobId;
19062
+ if (message.id != null && message.hasOwnProperty("id"))
19063
+ object.id = message.id;
19064
+ if (message.type != null && message.hasOwnProperty("type"))
19065
+ object.type = options.enums === String ? $root.sesame.v1.jobs.JobType[message.type] === void 0 ? message.type : $root.sesame.v1.jobs.JobType[message.type] : message.type;
19066
+ if (message.status != null && message.hasOwnProperty("status"))
19067
+ object.status = options.enums === String ? $root.sesame.v1.jobs.JobStatus[message.status] === void 0 ? message.status : $root.sesame.v1.jobs.JobStatus[message.status] : message.status;
18778
19068
  if (message.name != null && message.hasOwnProperty("name"))
18779
19069
  object.name = message.name;
18780
19070
  if (message.description != null && message.hasOwnProperty("description"))
18781
19071
  object.description = message.description;
18782
- if (message.status != null && message.hasOwnProperty("status"))
18783
- object.status = options.enums === String ? $root.sesame.v1.jobs.JobStatus[message.status] === void 0 ? message.status : $root.sesame.v1.jobs.JobStatus[message.status] : message.status;
18784
19072
  if (message.error != null && message.hasOwnProperty("error")) {
18785
19073
  object.error = message.error;
18786
19074
  if (options.oneofs)
18787
19075
  object._error = "error";
18788
19076
  }
18789
19077
  if (message.progress != null && message.hasOwnProperty("progress"))
18790
- object.progress = message.progress;
19078
+ if (typeof message.progress === "number")
19079
+ object.progress = options.longs === String ? String(message.progress) : message.progress;
19080
+ else
19081
+ object.progress = options.longs === String ? $util.Long.prototype.toString.call(message.progress) : options.longs === Number ? new $util.LongBits(message.progress.low >>> 0, message.progress.high >>> 0).toNumber() : message.progress;
18791
19082
  if (message.total != null && message.hasOwnProperty("total"))
18792
- object.total = message.total;
19083
+ if (typeof message.total === "number")
19084
+ object.total = options.longs === String ? String(message.total) : message.total;
19085
+ else
19086
+ object.total = options.longs === String ? $util.Long.prototype.toString.call(message.total) : options.longs === Number ? new $util.LongBits(message.total.low >>> 0, message.total.high >>> 0).toNumber() : message.total;
19087
+ if (message.timingInfo != null && message.hasOwnProperty("timingInfo")) {
19088
+ object.timingInfo = $root.sesame.v1.jobs.TimingInfo.toObject(message.timingInfo, options);
19089
+ if (options.oneofs)
19090
+ object._timingInfo = "timingInfo";
19091
+ }
18793
19092
  return object;
18794
19093
  };
18795
- JobStatusResponse.prototype.toJSON = function toJSON() {
19094
+ Job.prototype.toJSON = function toJSON() {
18796
19095
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
18797
19096
  };
18798
- JobStatusResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
19097
+ Job.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
18799
19098
  if (typeUrlPrefix === void 0) {
18800
19099
  typeUrlPrefix = "type.googleapis.com";
18801
19100
  }
18802
- return typeUrlPrefix + "/sesame.v1.jobs.JobStatusResponse";
19101
+ return typeUrlPrefix + "/sesame.v1.jobs.Job";
18803
19102
  };
18804
- return JobStatusResponse;
19103
+ return Job;
18805
19104
  }();
18806
- jobs.JobListResponse = function() {
18807
- function JobListResponse(properties) {
19105
+ jobs.JobList = function() {
19106
+ function JobList(properties) {
18808
19107
  this.jobs = [];
18809
19108
  if (properties) {
18810
19109
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
@@ -18812,28 +19111,28 @@ var sesame = $root.sesame = (() => {
18812
19111
  this[keys[i]] = properties[keys[i]];
18813
19112
  }
18814
19113
  }
18815
- JobListResponse.prototype.jobs = $util.emptyArray;
18816
- JobListResponse.create = function create(properties) {
18817
- return new JobListResponse(properties);
19114
+ JobList.prototype.jobs = $util.emptyArray;
19115
+ JobList.create = function create(properties) {
19116
+ return new JobList(properties);
18818
19117
  };
18819
- JobListResponse.encode = function encode(message, writer) {
19118
+ JobList.encode = function encode(message, writer) {
18820
19119
  if (!writer)
18821
19120
  writer = $Writer.create();
18822
19121
  if (message.jobs != null && message.jobs.length)
18823
19122
  for (let i = 0; i < message.jobs.length; ++i)
18824
- $root.sesame.v1.jobs.JobStatusResponse.encode(message.jobs[i], writer.uint32(
19123
+ $root.sesame.v1.jobs.Job.encode(message.jobs[i], writer.uint32(
18825
19124
  /* id 1, wireType 2 =*/
18826
19125
  10
18827
19126
  ).fork()).ldelim();
18828
19127
  return writer;
18829
19128
  };
18830
- JobListResponse.encodeDelimited = function encodeDelimited(message, writer) {
19129
+ JobList.encodeDelimited = function encodeDelimited(message, writer) {
18831
19130
  return this.encode(message, writer).ldelim();
18832
19131
  };
18833
- JobListResponse.decode = function decode(reader, length, error) {
19132
+ JobList.decode = function decode(reader, length, error) {
18834
19133
  if (!(reader instanceof $Reader))
18835
19134
  reader = $Reader.create(reader);
18836
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobListResponse();
19135
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobList();
18837
19136
  while (reader.pos < end) {
18838
19137
  let tag = reader.uint32();
18839
19138
  if (tag === error)
@@ -18842,7 +19141,7 @@ var sesame = $root.sesame = (() => {
18842
19141
  case 1: {
18843
19142
  if (!(message.jobs && message.jobs.length))
18844
19143
  message.jobs = [];
18845
- message.jobs.push($root.sesame.v1.jobs.JobStatusResponse.decode(reader, reader.uint32()));
19144
+ message.jobs.push($root.sesame.v1.jobs.Job.decode(reader, reader.uint32()));
18846
19145
  break;
18847
19146
  }
18848
19147
  default:
@@ -18852,42 +19151,42 @@ var sesame = $root.sesame = (() => {
18852
19151
  }
18853
19152
  return message;
18854
19153
  };
18855
- JobListResponse.decodeDelimited = function decodeDelimited(reader) {
19154
+ JobList.decodeDelimited = function decodeDelimited(reader) {
18856
19155
  if (!(reader instanceof $Reader))
18857
19156
  reader = new $Reader(reader);
18858
19157
  return this.decode(reader, reader.uint32());
18859
19158
  };
18860
- JobListResponse.verify = function verify(message) {
19159
+ JobList.verify = function verify(message) {
18861
19160
  if (typeof message !== "object" || message === null)
18862
19161
  return "object expected";
18863
19162
  if (message.jobs != null && message.hasOwnProperty("jobs")) {
18864
19163
  if (!Array.isArray(message.jobs))
18865
19164
  return "jobs: array expected";
18866
19165
  for (let i = 0; i < message.jobs.length; ++i) {
18867
- let error = $root.sesame.v1.jobs.JobStatusResponse.verify(message.jobs[i]);
19166
+ let error = $root.sesame.v1.jobs.Job.verify(message.jobs[i]);
18868
19167
  if (error)
18869
19168
  return "jobs." + error;
18870
19169
  }
18871
19170
  }
18872
19171
  return null;
18873
19172
  };
18874
- JobListResponse.fromObject = function fromObject(object) {
18875
- if (object instanceof $root.sesame.v1.jobs.JobListResponse)
19173
+ JobList.fromObject = function fromObject(object) {
19174
+ if (object instanceof $root.sesame.v1.jobs.JobList)
18876
19175
  return object;
18877
- let message = new $root.sesame.v1.jobs.JobListResponse();
19176
+ let message = new $root.sesame.v1.jobs.JobList();
18878
19177
  if (object.jobs) {
18879
19178
  if (!Array.isArray(object.jobs))
18880
- throw TypeError(".sesame.v1.jobs.JobListResponse.jobs: array expected");
19179
+ throw TypeError(".sesame.v1.jobs.JobList.jobs: array expected");
18881
19180
  message.jobs = [];
18882
19181
  for (let i = 0; i < object.jobs.length; ++i) {
18883
19182
  if (typeof object.jobs[i] !== "object")
18884
- throw TypeError(".sesame.v1.jobs.JobListResponse.jobs: object expected");
18885
- message.jobs[i] = $root.sesame.v1.jobs.JobStatusResponse.fromObject(object.jobs[i]);
19183
+ throw TypeError(".sesame.v1.jobs.JobList.jobs: object expected");
19184
+ message.jobs[i] = $root.sesame.v1.jobs.Job.fromObject(object.jobs[i]);
18886
19185
  }
18887
19186
  }
18888
19187
  return message;
18889
19188
  };
18890
- JobListResponse.toObject = function toObject(message, options) {
19189
+ JobList.toObject = function toObject(message, options) {
18891
19190
  if (!options)
18892
19191
  options = {};
18893
19192
  let object = {};
@@ -18896,116 +19195,72 @@ var sesame = $root.sesame = (() => {
18896
19195
  if (message.jobs && message.jobs.length) {
18897
19196
  object.jobs = [];
18898
19197
  for (let j = 0; j < message.jobs.length; ++j)
18899
- object.jobs[j] = $root.sesame.v1.jobs.JobStatusResponse.toObject(message.jobs[j], options);
19198
+ object.jobs[j] = $root.sesame.v1.jobs.Job.toObject(message.jobs[j], options);
18900
19199
  }
18901
19200
  return object;
18902
19201
  };
18903
- JobListResponse.prototype.toJSON = function toJSON() {
19202
+ JobList.prototype.toJSON = function toJSON() {
18904
19203
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
18905
19204
  };
18906
- JobListResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
19205
+ JobList.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
18907
19206
  if (typeUrlPrefix === void 0) {
18908
19207
  typeUrlPrefix = "type.googleapis.com";
18909
19208
  }
18910
- return typeUrlPrefix + "/sesame.v1.jobs.JobListResponse";
19209
+ return typeUrlPrefix + "/sesame.v1.jobs.JobList";
18911
19210
  };
18912
- return JobListResponse;
19211
+ return JobList;
18913
19212
  }();
18914
- jobs.JobEvent = function() {
18915
- function JobEvent(properties) {
19213
+ jobs.JobStartRequest = function() {
19214
+ function JobStartRequest(properties) {
18916
19215
  if (properties) {
18917
19216
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
18918
19217
  if (properties[keys[i]] != null)
18919
19218
  this[keys[i]] = properties[keys[i]];
18920
19219
  }
18921
19220
  }
18922
- JobEvent.prototype.jobId = 0;
18923
- JobEvent.prototype.source = "";
18924
- JobEvent.prototype.status = 0;
18925
- JobEvent.prototype.statusText = "";
18926
- JobEvent.prototype.error = null;
18927
- JobEvent.prototype.timingInfo = null;
19221
+ JobStartRequest.prototype.exportRequest = null;
19222
+ JobStartRequest.prototype.importRequest = null;
18928
19223
  let $oneOfFields;
18929
- Object.defineProperty(JobEvent.prototype, "_error", {
18930
- get: $util.oneOfGetter($oneOfFields = ["error"]),
18931
- set: $util.oneOfSetter($oneOfFields)
18932
- });
18933
- Object.defineProperty(JobEvent.prototype, "_timingInfo", {
18934
- get: $util.oneOfGetter($oneOfFields = ["timingInfo"]),
19224
+ Object.defineProperty(JobStartRequest.prototype, "config", {
19225
+ get: $util.oneOfGetter($oneOfFields = ["exportRequest", "importRequest"]),
18935
19226
  set: $util.oneOfSetter($oneOfFields)
18936
19227
  });
18937
- JobEvent.create = function create(properties) {
18938
- return new JobEvent(properties);
19228
+ JobStartRequest.create = function create(properties) {
19229
+ return new JobStartRequest(properties);
18939
19230
  };
18940
- JobEvent.encode = function encode(message, writer) {
19231
+ JobStartRequest.encode = function encode(message, writer) {
18941
19232
  if (!writer)
18942
19233
  writer = $Writer.create();
18943
- if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
18944
- writer.uint32(
18945
- /* id 1, wireType 0 =*/
18946
- 8
18947
- ).uint32(message.jobId);
18948
- if (message.source != null && Object.hasOwnProperty.call(message, "source"))
18949
- writer.uint32(
19234
+ if (message.exportRequest != null && Object.hasOwnProperty.call(message, "exportRequest"))
19235
+ $root.sesame.v1.jobs.ExportStartRequest.encode(message.exportRequest, writer.uint32(
19236
+ /* id 1, wireType 2 =*/
19237
+ 10
19238
+ ).fork()).ldelim();
19239
+ if (message.importRequest != null && Object.hasOwnProperty.call(message, "importRequest"))
19240
+ $root.sesame.v1.jobs.ImportStartRequest.encode(message.importRequest, writer.uint32(
18950
19241
  /* id 2, wireType 2 =*/
18951
19242
  18
18952
- ).string(message.source);
18953
- if (message.status != null && Object.hasOwnProperty.call(message, "status"))
18954
- writer.uint32(
18955
- /* id 3, wireType 0 =*/
18956
- 24
18957
- ).int32(message.status);
18958
- if (message.statusText != null && Object.hasOwnProperty.call(message, "statusText"))
18959
- writer.uint32(
18960
- /* id 4, wireType 2 =*/
18961
- 34
18962
- ).string(message.statusText);
18963
- if (message.error != null && Object.hasOwnProperty.call(message, "error"))
18964
- writer.uint32(
18965
- /* id 5, wireType 2 =*/
18966
- 42
18967
- ).string(message.error);
18968
- if (message.timingInfo != null && Object.hasOwnProperty.call(message, "timingInfo"))
18969
- $root.sesame.v1.jobs.TimingInfo.encode(message.timingInfo, writer.uint32(
18970
- /* id 6, wireType 2 =*/
18971
- 50
18972
19243
  ).fork()).ldelim();
18973
19244
  return writer;
18974
19245
  };
18975
- JobEvent.encodeDelimited = function encodeDelimited(message, writer) {
19246
+ JobStartRequest.encodeDelimited = function encodeDelimited(message, writer) {
18976
19247
  return this.encode(message, writer).ldelim();
18977
19248
  };
18978
- JobEvent.decode = function decode(reader, length, error) {
19249
+ JobStartRequest.decode = function decode(reader, length, error) {
18979
19250
  if (!(reader instanceof $Reader))
18980
19251
  reader = $Reader.create(reader);
18981
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobEvent();
19252
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobStartRequest();
18982
19253
  while (reader.pos < end) {
18983
19254
  let tag = reader.uint32();
18984
19255
  if (tag === error)
18985
19256
  break;
18986
19257
  switch (tag >>> 3) {
18987
19258
  case 1: {
18988
- message.jobId = reader.uint32();
19259
+ message.exportRequest = $root.sesame.v1.jobs.ExportStartRequest.decode(reader, reader.uint32());
18989
19260
  break;
18990
19261
  }
18991
19262
  case 2: {
18992
- message.source = reader.string();
18993
- break;
18994
- }
18995
- case 3: {
18996
- message.status = reader.int32();
18997
- break;
18998
- }
18999
- case 4: {
19000
- message.statusText = reader.string();
19001
- break;
19002
- }
19003
- case 5: {
19004
- message.error = reader.string();
19005
- break;
19006
- }
19007
- case 6: {
19008
- message.timingInfo = $root.sesame.v1.jobs.TimingInfo.decode(reader, reader.uint32());
19263
+ message.importRequest = $root.sesame.v1.jobs.ImportStartRequest.decode(reader, reader.uint32());
19009
19264
  break;
19010
19265
  }
19011
19266
  default:
@@ -19015,174 +19270,346 @@ var sesame = $root.sesame = (() => {
19015
19270
  }
19016
19271
  return message;
19017
19272
  };
19018
- JobEvent.decodeDelimited = function decodeDelimited(reader) {
19273
+ JobStartRequest.decodeDelimited = function decodeDelimited(reader) {
19019
19274
  if (!(reader instanceof $Reader))
19020
19275
  reader = new $Reader(reader);
19021
19276
  return this.decode(reader, reader.uint32());
19022
19277
  };
19023
- JobEvent.verify = function verify(message) {
19278
+ JobStartRequest.verify = function verify(message) {
19024
19279
  if (typeof message !== "object" || message === null)
19025
19280
  return "object expected";
19026
19281
  let properties = {};
19027
- if (message.jobId != null && message.hasOwnProperty("jobId")) {
19028
- if (!$util.isInteger(message.jobId))
19029
- return "jobId: integer expected";
19030
- }
19031
- if (message.source != null && message.hasOwnProperty("source")) {
19032
- if (!$util.isString(message.source))
19033
- return "source: string expected";
19034
- }
19035
- if (message.status != null && message.hasOwnProperty("status"))
19036
- switch (message.status) {
19037
- default:
19038
- return "status: enum value expected";
19039
- case 0:
19040
- case 1:
19041
- case 2:
19042
- case 3:
19043
- case 4:
19044
- case 5:
19045
- break;
19282
+ if (message.exportRequest != null && message.hasOwnProperty("exportRequest")) {
19283
+ properties.config = 1;
19284
+ {
19285
+ let error = $root.sesame.v1.jobs.ExportStartRequest.verify(message.exportRequest);
19286
+ if (error)
19287
+ return "exportRequest." + error;
19046
19288
  }
19047
- if (message.statusText != null && message.hasOwnProperty("statusText")) {
19048
- if (!$util.isString(message.statusText))
19049
- return "statusText: string expected";
19050
- }
19051
- if (message.error != null && message.hasOwnProperty("error")) {
19052
- properties._error = 1;
19053
- if (!$util.isString(message.error))
19054
- return "error: string expected";
19055
19289
  }
19056
- if (message.timingInfo != null && message.hasOwnProperty("timingInfo")) {
19057
- properties._timingInfo = 1;
19290
+ if (message.importRequest != null && message.hasOwnProperty("importRequest")) {
19291
+ if (properties.config === 1)
19292
+ return "config: multiple values";
19293
+ properties.config = 1;
19058
19294
  {
19059
- let error = $root.sesame.v1.jobs.TimingInfo.verify(message.timingInfo);
19295
+ let error = $root.sesame.v1.jobs.ImportStartRequest.verify(message.importRequest);
19060
19296
  if (error)
19061
- return "timingInfo." + error;
19297
+ return "importRequest." + error;
19062
19298
  }
19063
19299
  }
19064
19300
  return null;
19065
19301
  };
19066
- JobEvent.fromObject = function fromObject(object) {
19067
- if (object instanceof $root.sesame.v1.jobs.JobEvent)
19302
+ JobStartRequest.fromObject = function fromObject(object) {
19303
+ if (object instanceof $root.sesame.v1.jobs.JobStartRequest)
19068
19304
  return object;
19069
- let message = new $root.sesame.v1.jobs.JobEvent();
19070
- if (object.jobId != null)
19071
- message.jobId = object.jobId >>> 0;
19072
- if (object.source != null)
19073
- message.source = String(object.source);
19074
- switch (object.status) {
19075
- default:
19076
- if (typeof object.status === "number") {
19077
- message.status = object.status;
19078
- break;
19079
- }
19080
- break;
19081
- case "JOB_STATUS_UNSPECIFIED":
19082
- case 0:
19083
- message.status = 0;
19084
- break;
19085
- case "JOB_STATUS_PENDING":
19086
- case 1:
19087
- message.status = 1;
19088
- break;
19089
- case "JOB_STATUS_IN_PROGRESS":
19090
- case 2:
19091
- message.status = 2;
19092
- break;
19093
- case "JOB_STATUS_COMPLETE":
19094
- case 3:
19095
- message.status = 3;
19096
- break;
19097
- case "JOB_STATUS_ABORTED":
19098
- case 4:
19099
- message.status = 4;
19100
- break;
19101
- case "JOB_STATUS_ERROR":
19102
- case 5:
19103
- message.status = 5;
19104
- break;
19305
+ let message = new $root.sesame.v1.jobs.JobStartRequest();
19306
+ if (object.exportRequest != null) {
19307
+ if (typeof object.exportRequest !== "object")
19308
+ throw TypeError(".sesame.v1.jobs.JobStartRequest.exportRequest: object expected");
19309
+ message.exportRequest = $root.sesame.v1.jobs.ExportStartRequest.fromObject(object.exportRequest);
19105
19310
  }
19106
- if (object.statusText != null)
19107
- message.statusText = String(object.statusText);
19108
- if (object.error != null)
19109
- message.error = String(object.error);
19110
- if (object.timingInfo != null) {
19111
- if (typeof object.timingInfo !== "object")
19112
- throw TypeError(".sesame.v1.jobs.JobEvent.timingInfo: object expected");
19113
- message.timingInfo = $root.sesame.v1.jobs.TimingInfo.fromObject(object.timingInfo);
19311
+ if (object.importRequest != null) {
19312
+ if (typeof object.importRequest !== "object")
19313
+ throw TypeError(".sesame.v1.jobs.JobStartRequest.importRequest: object expected");
19314
+ message.importRequest = $root.sesame.v1.jobs.ImportStartRequest.fromObject(object.importRequest);
19114
19315
  }
19115
19316
  return message;
19116
19317
  };
19117
- JobEvent.toObject = function toObject(message, options) {
19318
+ JobStartRequest.toObject = function toObject(message, options) {
19118
19319
  if (!options)
19119
19320
  options = {};
19120
19321
  let object = {};
19121
- if (options.defaults) {
19122
- object.jobId = 0;
19123
- object.source = "";
19124
- object.status = options.enums === String ? "JOB_STATUS_UNSPECIFIED" : 0;
19125
- object.statusText = "";
19126
- }
19127
- if (message.jobId != null && message.hasOwnProperty("jobId"))
19128
- object.jobId = message.jobId;
19129
- if (message.source != null && message.hasOwnProperty("source"))
19130
- object.source = message.source;
19131
- if (message.status != null && message.hasOwnProperty("status"))
19132
- object.status = options.enums === String ? $root.sesame.v1.jobs.JobStatus[message.status] === void 0 ? message.status : $root.sesame.v1.jobs.JobStatus[message.status] : message.status;
19133
- if (message.statusText != null && message.hasOwnProperty("statusText"))
19134
- object.statusText = message.statusText;
19135
- if (message.error != null && message.hasOwnProperty("error")) {
19136
- object.error = message.error;
19322
+ if (message.exportRequest != null && message.hasOwnProperty("exportRequest")) {
19323
+ object.exportRequest = $root.sesame.v1.jobs.ExportStartRequest.toObject(message.exportRequest, options);
19137
19324
  if (options.oneofs)
19138
- object._error = "error";
19325
+ object.config = "exportRequest";
19139
19326
  }
19140
- if (message.timingInfo != null && message.hasOwnProperty("timingInfo")) {
19141
- object.timingInfo = $root.sesame.v1.jobs.TimingInfo.toObject(message.timingInfo, options);
19327
+ if (message.importRequest != null && message.hasOwnProperty("importRequest")) {
19328
+ object.importRequest = $root.sesame.v1.jobs.ImportStartRequest.toObject(message.importRequest, options);
19142
19329
  if (options.oneofs)
19143
- object._timingInfo = "timingInfo";
19330
+ object.config = "importRequest";
19144
19331
  }
19145
19332
  return object;
19146
19333
  };
19147
- JobEvent.prototype.toJSON = function toJSON() {
19334
+ JobStartRequest.prototype.toJSON = function toJSON() {
19148
19335
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
19149
19336
  };
19150
- JobEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
19337
+ JobStartRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
19151
19338
  if (typeUrlPrefix === void 0) {
19152
19339
  typeUrlPrefix = "type.googleapis.com";
19153
19340
  }
19154
- return typeUrlPrefix + "/sesame.v1.jobs.JobEvent";
19341
+ return typeUrlPrefix + "/sesame.v1.jobs.JobStartRequest";
19155
19342
  };
19156
- return JobEvent;
19343
+ return JobStartRequest;
19157
19344
  }();
19158
- jobs.ExportConfiguration = function() {
19159
- function ExportConfiguration(properties) {
19160
- this.audioRouting = [];
19345
+ jobs.JobAbortRequest = function() {
19346
+ function JobAbortRequest(properties) {
19161
19347
  if (properties) {
19162
19348
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
19163
19349
  if (properties[keys[i]] != null)
19164
19350
  this[keys[i]] = properties[keys[i]];
19165
19351
  }
19166
19352
  }
19167
- ExportConfiguration.prototype.filename = "";
19168
- ExportConfiguration.prototype.container = 0;
19169
- ExportConfiguration.prototype.videoCodec = 0;
19170
- ExportConfiguration.prototype.width = 0;
19171
- ExportConfiguration.prototype.height = 0;
19172
- ExportConfiguration.prototype.fpsNum = 0;
19173
- ExportConfiguration.prototype.fpsDen = 0;
19174
- ExportConfiguration.prototype.rateControl = 0;
19175
- ExportConfiguration.prototype.videoBitrateKbps = 0;
19176
- ExportConfiguration.prototype.maxVideoBitrateKbps = 0;
19177
- ExportConfiguration.prototype.gopSize = 0;
19178
- ExportConfiguration.prototype.maxBFrames = 0;
19179
- ExportConfiguration.prototype.profile = "";
19180
- ExportConfiguration.prototype.level = "";
19181
- ExportConfiguration.prototype.pixelFormat = "";
19182
- ExportConfiguration.prototype.colorPrimaries = "";
19183
- ExportConfiguration.prototype.colorTransfer = "";
19184
- ExportConfiguration.prototype.colorMatrix = "";
19185
- ExportConfiguration.prototype.fullRange = false;
19353
+ JobAbortRequest.prototype.jobId = 0;
19354
+ JobAbortRequest.create = function create(properties) {
19355
+ return new JobAbortRequest(properties);
19356
+ };
19357
+ JobAbortRequest.encode = function encode(message, writer) {
19358
+ if (!writer)
19359
+ writer = $Writer.create();
19360
+ if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
19361
+ writer.uint32(
19362
+ /* id 1, wireType 0 =*/
19363
+ 8
19364
+ ).uint32(message.jobId);
19365
+ return writer;
19366
+ };
19367
+ JobAbortRequest.encodeDelimited = function encodeDelimited(message, writer) {
19368
+ return this.encode(message, writer).ldelim();
19369
+ };
19370
+ JobAbortRequest.decode = function decode(reader, length, error) {
19371
+ if (!(reader instanceof $Reader))
19372
+ reader = $Reader.create(reader);
19373
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobAbortRequest();
19374
+ while (reader.pos < end) {
19375
+ let tag = reader.uint32();
19376
+ if (tag === error)
19377
+ break;
19378
+ switch (tag >>> 3) {
19379
+ case 1: {
19380
+ message.jobId = reader.uint32();
19381
+ break;
19382
+ }
19383
+ default:
19384
+ reader.skipType(tag & 7);
19385
+ break;
19386
+ }
19387
+ }
19388
+ return message;
19389
+ };
19390
+ JobAbortRequest.decodeDelimited = function decodeDelimited(reader) {
19391
+ if (!(reader instanceof $Reader))
19392
+ reader = new $Reader(reader);
19393
+ return this.decode(reader, reader.uint32());
19394
+ };
19395
+ JobAbortRequest.verify = function verify(message) {
19396
+ if (typeof message !== "object" || message === null)
19397
+ return "object expected";
19398
+ if (message.jobId != null && message.hasOwnProperty("jobId")) {
19399
+ if (!$util.isInteger(message.jobId))
19400
+ return "jobId: integer expected";
19401
+ }
19402
+ return null;
19403
+ };
19404
+ JobAbortRequest.fromObject = function fromObject(object) {
19405
+ if (object instanceof $root.sesame.v1.jobs.JobAbortRequest)
19406
+ return object;
19407
+ let message = new $root.sesame.v1.jobs.JobAbortRequest();
19408
+ if (object.jobId != null)
19409
+ message.jobId = object.jobId >>> 0;
19410
+ return message;
19411
+ };
19412
+ JobAbortRequest.toObject = function toObject(message, options) {
19413
+ if (!options)
19414
+ options = {};
19415
+ let object = {};
19416
+ if (options.defaults)
19417
+ object.jobId = 0;
19418
+ if (message.jobId != null && message.hasOwnProperty("jobId"))
19419
+ object.jobId = message.jobId;
19420
+ return object;
19421
+ };
19422
+ JobAbortRequest.prototype.toJSON = function toJSON() {
19423
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
19424
+ };
19425
+ JobAbortRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
19426
+ if (typeUrlPrefix === void 0) {
19427
+ typeUrlPrefix = "type.googleapis.com";
19428
+ }
19429
+ return typeUrlPrefix + "/sesame.v1.jobs.JobAbortRequest";
19430
+ };
19431
+ return JobAbortRequest;
19432
+ }();
19433
+ jobs.JobStatusRequest = function() {
19434
+ function JobStatusRequest(properties) {
19435
+ if (properties) {
19436
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
19437
+ if (properties[keys[i]] != null)
19438
+ this[keys[i]] = properties[keys[i]];
19439
+ }
19440
+ }
19441
+ JobStatusRequest.prototype.jobId = 0;
19442
+ JobStatusRequest.create = function create(properties) {
19443
+ return new JobStatusRequest(properties);
19444
+ };
19445
+ JobStatusRequest.encode = function encode(message, writer) {
19446
+ if (!writer)
19447
+ writer = $Writer.create();
19448
+ if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
19449
+ writer.uint32(
19450
+ /* id 1, wireType 0 =*/
19451
+ 8
19452
+ ).uint32(message.jobId);
19453
+ return writer;
19454
+ };
19455
+ JobStatusRequest.encodeDelimited = function encodeDelimited(message, writer) {
19456
+ return this.encode(message, writer).ldelim();
19457
+ };
19458
+ JobStatusRequest.decode = function decode(reader, length, error) {
19459
+ if (!(reader instanceof $Reader))
19460
+ reader = $Reader.create(reader);
19461
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobStatusRequest();
19462
+ while (reader.pos < end) {
19463
+ let tag = reader.uint32();
19464
+ if (tag === error)
19465
+ break;
19466
+ switch (tag >>> 3) {
19467
+ case 1: {
19468
+ message.jobId = reader.uint32();
19469
+ break;
19470
+ }
19471
+ default:
19472
+ reader.skipType(tag & 7);
19473
+ break;
19474
+ }
19475
+ }
19476
+ return message;
19477
+ };
19478
+ JobStatusRequest.decodeDelimited = function decodeDelimited(reader) {
19479
+ if (!(reader instanceof $Reader))
19480
+ reader = new $Reader(reader);
19481
+ return this.decode(reader, reader.uint32());
19482
+ };
19483
+ JobStatusRequest.verify = function verify(message) {
19484
+ if (typeof message !== "object" || message === null)
19485
+ return "object expected";
19486
+ if (message.jobId != null && message.hasOwnProperty("jobId")) {
19487
+ if (!$util.isInteger(message.jobId))
19488
+ return "jobId: integer expected";
19489
+ }
19490
+ return null;
19491
+ };
19492
+ JobStatusRequest.fromObject = function fromObject(object) {
19493
+ if (object instanceof $root.sesame.v1.jobs.JobStatusRequest)
19494
+ return object;
19495
+ let message = new $root.sesame.v1.jobs.JobStatusRequest();
19496
+ if (object.jobId != null)
19497
+ message.jobId = object.jobId >>> 0;
19498
+ return message;
19499
+ };
19500
+ JobStatusRequest.toObject = function toObject(message, options) {
19501
+ if (!options)
19502
+ options = {};
19503
+ let object = {};
19504
+ if (options.defaults)
19505
+ object.jobId = 0;
19506
+ if (message.jobId != null && message.hasOwnProperty("jobId"))
19507
+ object.jobId = message.jobId;
19508
+ return object;
19509
+ };
19510
+ JobStatusRequest.prototype.toJSON = function toJSON() {
19511
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
19512
+ };
19513
+ JobStatusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
19514
+ if (typeUrlPrefix === void 0) {
19515
+ typeUrlPrefix = "type.googleapis.com";
19516
+ }
19517
+ return typeUrlPrefix + "/sesame.v1.jobs.JobStatusRequest";
19518
+ };
19519
+ return JobStatusRequest;
19520
+ }();
19521
+ jobs.JobListRequest = function() {
19522
+ function JobListRequest(properties) {
19523
+ if (properties) {
19524
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
19525
+ if (properties[keys[i]] != null)
19526
+ this[keys[i]] = properties[keys[i]];
19527
+ }
19528
+ }
19529
+ JobListRequest.create = function create(properties) {
19530
+ return new JobListRequest(properties);
19531
+ };
19532
+ JobListRequest.encode = function encode(message, writer) {
19533
+ if (!writer)
19534
+ writer = $Writer.create();
19535
+ return writer;
19536
+ };
19537
+ JobListRequest.encodeDelimited = function encodeDelimited(message, writer) {
19538
+ return this.encode(message, writer).ldelim();
19539
+ };
19540
+ JobListRequest.decode = function decode(reader, length, error) {
19541
+ if (!(reader instanceof $Reader))
19542
+ reader = $Reader.create(reader);
19543
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobListRequest();
19544
+ while (reader.pos < end) {
19545
+ let tag = reader.uint32();
19546
+ if (tag === error)
19547
+ break;
19548
+ switch (tag >>> 3) {
19549
+ default:
19550
+ reader.skipType(tag & 7);
19551
+ break;
19552
+ }
19553
+ }
19554
+ return message;
19555
+ };
19556
+ JobListRequest.decodeDelimited = function decodeDelimited(reader) {
19557
+ if (!(reader instanceof $Reader))
19558
+ reader = new $Reader(reader);
19559
+ return this.decode(reader, reader.uint32());
19560
+ };
19561
+ JobListRequest.verify = function verify(message) {
19562
+ if (typeof message !== "object" || message === null)
19563
+ return "object expected";
19564
+ return null;
19565
+ };
19566
+ JobListRequest.fromObject = function fromObject(object) {
19567
+ if (object instanceof $root.sesame.v1.jobs.JobListRequest)
19568
+ return object;
19569
+ return new $root.sesame.v1.jobs.JobListRequest();
19570
+ };
19571
+ JobListRequest.toObject = function toObject() {
19572
+ return {};
19573
+ };
19574
+ JobListRequest.prototype.toJSON = function toJSON() {
19575
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
19576
+ };
19577
+ JobListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
19578
+ if (typeUrlPrefix === void 0) {
19579
+ typeUrlPrefix = "type.googleapis.com";
19580
+ }
19581
+ return typeUrlPrefix + "/sesame.v1.jobs.JobListRequest";
19582
+ };
19583
+ return JobListRequest;
19584
+ }();
19585
+ jobs.ExportConfiguration = function() {
19586
+ function ExportConfiguration(properties) {
19587
+ this.audioRouting = [];
19588
+ if (properties) {
19589
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
19590
+ if (properties[keys[i]] != null)
19591
+ this[keys[i]] = properties[keys[i]];
19592
+ }
19593
+ }
19594
+ ExportConfiguration.prototype.filename = "";
19595
+ ExportConfiguration.prototype.container = 0;
19596
+ ExportConfiguration.prototype.videoCodec = 0;
19597
+ ExportConfiguration.prototype.width = 0;
19598
+ ExportConfiguration.prototype.height = 0;
19599
+ ExportConfiguration.prototype.fpsNum = 0;
19600
+ ExportConfiguration.prototype.fpsDen = 0;
19601
+ ExportConfiguration.prototype.rateControl = 0;
19602
+ ExportConfiguration.prototype.videoBitrateKbps = 0;
19603
+ ExportConfiguration.prototype.maxVideoBitrateKbps = 0;
19604
+ ExportConfiguration.prototype.gopSize = 0;
19605
+ ExportConfiguration.prototype.maxBFrames = 0;
19606
+ ExportConfiguration.prototype.profile = "";
19607
+ ExportConfiguration.prototype.level = "";
19608
+ ExportConfiguration.prototype.pixelFormat = "";
19609
+ ExportConfiguration.prototype.colorPrimaries = "";
19610
+ ExportConfiguration.prototype.colorTransfer = "";
19611
+ ExportConfiguration.prototype.colorMatrix = "";
19612
+ ExportConfiguration.prototype.fullRange = false;
19186
19613
  ExportConfiguration.prototype.audioCodec = 0;
19187
19614
  ExportConfiguration.prototype.audioBitrateKbps = 0;
19188
19615
  ExportConfiguration.prototype.audioSampleRateHz = 0;
@@ -19476,6 +19903,11 @@ var sesame = $root.sesame = (() => {
19476
19903
  case 4:
19477
19904
  case 5:
19478
19905
  case 6:
19906
+ case 7:
19907
+ case 64:
19908
+ case 65:
19909
+ case 66:
19910
+ case 67:
19479
19911
  break;
19480
19912
  }
19481
19913
  if (message.width != null && message.hasOwnProperty("width")) {
@@ -19557,6 +19989,13 @@ var sesame = $root.sesame = (() => {
19557
19989
  case 2:
19558
19990
  case 3:
19559
19991
  case 4:
19992
+ case 5:
19993
+ case 6:
19994
+ case 7:
19995
+ case 64:
19996
+ case 65:
19997
+ case 66:
19998
+ case 67:
19560
19999
  break;
19561
20000
  }
19562
20001
  if (message.audioBitrateKbps != null && message.hasOwnProperty("audioBitrateKbps")) {
@@ -19621,34 +20060,54 @@ var sesame = $root.sesame = (() => {
19621
20060
  break;
19622
20061
  }
19623
20062
  break;
19624
- case "CODEC_ID_UNSPECIFIED":
20063
+ case "CODEC_TYPE_UNSPECIFIED":
19625
20064
  case 0:
19626
20065
  message.videoCodec = 0;
19627
20066
  break;
19628
- case "CODEC_ID_H264":
20067
+ case "CODEC_TYPE_VIDEO_VP8":
19629
20068
  case 1:
19630
20069
  message.videoCodec = 1;
19631
20070
  break;
19632
- case "CODEC_ID_HEVC":
20071
+ case "CODEC_TYPE_VIDEO_VP9":
19633
20072
  case 2:
19634
20073
  message.videoCodec = 2;
19635
20074
  break;
19636
- case "CODEC_ID_AV1":
20075
+ case "CODEC_TYPE_VIDEO_AVC":
19637
20076
  case 3:
19638
20077
  message.videoCodec = 3;
19639
20078
  break;
19640
- case "CODEC_ID_VP8":
20079
+ case "CODEC_TYPE_VIDEO_HEVC":
19641
20080
  case 4:
19642
20081
  message.videoCodec = 4;
19643
20082
  break;
19644
- case "CODEC_ID_PRORES":
20083
+ case "CODEC_TYPE_VIDEO_AV1":
19645
20084
  case 5:
19646
20085
  message.videoCodec = 5;
19647
20086
  break;
19648
- case "CODEC_ID_DNXHR":
20087
+ case "CODEC_TYPE_VIDEO_PRORES":
19649
20088
  case 6:
19650
20089
  message.videoCodec = 6;
19651
20090
  break;
20091
+ case "CODEC_TYPE_VIDEO_DNXHR":
20092
+ case 7:
20093
+ message.videoCodec = 7;
20094
+ break;
20095
+ case "CODEC_TYPE_AUDIO_OPUS":
20096
+ case 64:
20097
+ message.videoCodec = 64;
20098
+ break;
20099
+ case "CODEC_TYPE_AUDIO_AAC":
20100
+ case 65:
20101
+ message.videoCodec = 65;
20102
+ break;
20103
+ case "CODEC_TYPE_AUDIO_PCM":
20104
+ case 66:
20105
+ message.videoCodec = 66;
20106
+ break;
20107
+ case "CODEC_TYPE_AUDIO_PCM_S24LE":
20108
+ case 67:
20109
+ message.videoCodec = 67;
20110
+ break;
19652
20111
  }
19653
20112
  if (object.width != null)
19654
20113
  message.width = object.width >>> 0;
@@ -19711,26 +20170,54 @@ var sesame = $root.sesame = (() => {
19711
20170
  break;
19712
20171
  }
19713
20172
  break;
19714
- case "AUDIO_CODEC_ID_UNSPECIFIED":
20173
+ case "CODEC_TYPE_UNSPECIFIED":
19715
20174
  case 0:
19716
20175
  message.audioCodec = 0;
19717
20176
  break;
19718
- case "AUDIO_CODEC_ID_AAC":
20177
+ case "CODEC_TYPE_VIDEO_VP8":
19719
20178
  case 1:
19720
20179
  message.audioCodec = 1;
19721
20180
  break;
19722
- case "AUDIO_CODEC_ID_OPUS":
20181
+ case "CODEC_TYPE_VIDEO_VP9":
19723
20182
  case 2:
19724
20183
  message.audioCodec = 2;
19725
20184
  break;
19726
- case "AUDIO_CODEC_ID_PCM_S16LE":
20185
+ case "CODEC_TYPE_VIDEO_AVC":
19727
20186
  case 3:
19728
20187
  message.audioCodec = 3;
19729
20188
  break;
19730
- case "AUDIO_CODEC_ID_PCM_S24LE":
20189
+ case "CODEC_TYPE_VIDEO_HEVC":
19731
20190
  case 4:
19732
20191
  message.audioCodec = 4;
19733
20192
  break;
20193
+ case "CODEC_TYPE_VIDEO_AV1":
20194
+ case 5:
20195
+ message.audioCodec = 5;
20196
+ break;
20197
+ case "CODEC_TYPE_VIDEO_PRORES":
20198
+ case 6:
20199
+ message.audioCodec = 6;
20200
+ break;
20201
+ case "CODEC_TYPE_VIDEO_DNXHR":
20202
+ case 7:
20203
+ message.audioCodec = 7;
20204
+ break;
20205
+ case "CODEC_TYPE_AUDIO_OPUS":
20206
+ case 64:
20207
+ message.audioCodec = 64;
20208
+ break;
20209
+ case "CODEC_TYPE_AUDIO_AAC":
20210
+ case 65:
20211
+ message.audioCodec = 65;
20212
+ break;
20213
+ case "CODEC_TYPE_AUDIO_PCM":
20214
+ case 66:
20215
+ message.audioCodec = 66;
20216
+ break;
20217
+ case "CODEC_TYPE_AUDIO_PCM_S24LE":
20218
+ case 67:
20219
+ message.audioCodec = 67;
20220
+ break;
19734
20221
  }
19735
20222
  if (object.audioBitrateKbps != null)
19736
20223
  message.audioBitrateKbps = object.audioBitrateKbps >>> 0;
@@ -19756,7 +20243,7 @@ var sesame = $root.sesame = (() => {
19756
20243
  if (options.defaults) {
19757
20244
  object.filename = "";
19758
20245
  object.container = options.enums === String ? "CONTAINER_FORMAT_UNSPECIFIED" : 0;
19759
- object.videoCodec = options.enums === String ? "CODEC_ID_UNSPECIFIED" : 0;
20246
+ object.videoCodec = options.enums === String ? "CODEC_TYPE_UNSPECIFIED" : 0;
19760
20247
  object.width = 0;
19761
20248
  object.height = 0;
19762
20249
  object.fpsNum = 0;
@@ -19773,7 +20260,7 @@ var sesame = $root.sesame = (() => {
19773
20260
  object.colorTransfer = "";
19774
20261
  object.colorMatrix = "";
19775
20262
  object.fullRange = false;
19776
- object.audioCodec = options.enums === String ? "AUDIO_CODEC_ID_UNSPECIFIED" : 0;
20263
+ object.audioCodec = options.enums === String ? "CODEC_TYPE_UNSPECIFIED" : 0;
19777
20264
  object.audioBitrateKbps = 0;
19778
20265
  object.audioSampleRateHz = 0;
19779
20266
  object.audioChannels = 0;
@@ -19783,7 +20270,7 @@ var sesame = $root.sesame = (() => {
19783
20270
  if (message.container != null && message.hasOwnProperty("container"))
19784
20271
  object.container = options.enums === String ? $root.sesame.v1.jobs.ContainerFormat[message.container] === void 0 ? message.container : $root.sesame.v1.jobs.ContainerFormat[message.container] : message.container;
19785
20272
  if (message.videoCodec != null && message.hasOwnProperty("videoCodec"))
19786
- object.videoCodec = options.enums === String ? $root.sesame.v1.common.CodecId[message.videoCodec] === void 0 ? message.videoCodec : $root.sesame.v1.common.CodecId[message.videoCodec] : message.videoCodec;
20273
+ object.videoCodec = options.enums === String ? $root.sesame.v1.common.CodecType[message.videoCodec] === void 0 ? message.videoCodec : $root.sesame.v1.common.CodecType[message.videoCodec] : message.videoCodec;
19787
20274
  if (message.width != null && message.hasOwnProperty("width"))
19788
20275
  object.width = message.width;
19789
20276
  if (message.height != null && message.hasOwnProperty("height"))
@@ -19817,7 +20304,7 @@ var sesame = $root.sesame = (() => {
19817
20304
  if (message.fullRange != null && message.hasOwnProperty("fullRange"))
19818
20305
  object.fullRange = message.fullRange;
19819
20306
  if (message.audioCodec != null && message.hasOwnProperty("audioCodec"))
19820
- object.audioCodec = options.enums === String ? $root.sesame.v1.jobs.AudioCodecId[message.audioCodec] === void 0 ? message.audioCodec : $root.sesame.v1.jobs.AudioCodecId[message.audioCodec] : message.audioCodec;
20307
+ object.audioCodec = options.enums === String ? $root.sesame.v1.common.CodecType[message.audioCodec] === void 0 ? message.audioCodec : $root.sesame.v1.common.CodecType[message.audioCodec] : message.audioCodec;
19821
20308
  if (message.audioBitrateKbps != null && message.hasOwnProperty("audioBitrateKbps"))
19822
20309
  object.audioBitrateKbps = message.audioBitrateKbps;
19823
20310
  if (message.audioSampleRateHz != null && message.hasOwnProperty("audioSampleRateHz"))
@@ -19974,268 +20461,28 @@ var sesame = $root.sesame = (() => {
19974
20461
  };
19975
20462
  return ExportStartRequest;
19976
20463
  }();
19977
- jobs.ExportAbortRequest = function() {
19978
- function ExportAbortRequest(properties) {
20464
+ jobs.ImportConfiguration = function() {
20465
+ function ImportConfiguration(properties) {
20466
+ this.audioRouting = [];
19979
20467
  if (properties) {
19980
20468
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
19981
20469
  if (properties[keys[i]] != null)
19982
20470
  this[keys[i]] = properties[keys[i]];
19983
20471
  }
19984
20472
  }
19985
- ExportAbortRequest.prototype.jobId = 0;
19986
- ExportAbortRequest.create = function create(properties) {
19987
- return new ExportAbortRequest(properties);
20473
+ ImportConfiguration.prototype.srcFilename = "";
20474
+ ImportConfiguration.prototype.audioRouting = $util.emptyArray;
20475
+ ImportConfiguration.prototype.dstRecorderId = "";
20476
+ ImportConfiguration.prototype.dstClipId = $util.Long ? $util.Long.fromBits(0, 0, true) : 0;
20477
+ ImportConfiguration.prototype.dstClipName = "";
20478
+ ImportConfiguration.prototype.dstClipUserData = "";
20479
+ ImportConfiguration.create = function create(properties) {
20480
+ return new ImportConfiguration(properties);
19988
20481
  };
19989
- ExportAbortRequest.encode = function encode(message, writer) {
20482
+ ImportConfiguration.encode = function encode(message, writer) {
19990
20483
  if (!writer)
19991
20484
  writer = $Writer.create();
19992
- if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
19993
- writer.uint32(
19994
- /* id 1, wireType 0 =*/
19995
- 8
19996
- ).uint32(message.jobId);
19997
- return writer;
19998
- };
19999
- ExportAbortRequest.encodeDelimited = function encodeDelimited(message, writer) {
20000
- return this.encode(message, writer).ldelim();
20001
- };
20002
- ExportAbortRequest.decode = function decode(reader, length, error) {
20003
- if (!(reader instanceof $Reader))
20004
- reader = $Reader.create(reader);
20005
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.ExportAbortRequest();
20006
- while (reader.pos < end) {
20007
- let tag = reader.uint32();
20008
- if (tag === error)
20009
- break;
20010
- switch (tag >>> 3) {
20011
- case 1: {
20012
- message.jobId = reader.uint32();
20013
- break;
20014
- }
20015
- default:
20016
- reader.skipType(tag & 7);
20017
- break;
20018
- }
20019
- }
20020
- return message;
20021
- };
20022
- ExportAbortRequest.decodeDelimited = function decodeDelimited(reader) {
20023
- if (!(reader instanceof $Reader))
20024
- reader = new $Reader(reader);
20025
- return this.decode(reader, reader.uint32());
20026
- };
20027
- ExportAbortRequest.verify = function verify(message) {
20028
- if (typeof message !== "object" || message === null)
20029
- return "object expected";
20030
- if (message.jobId != null && message.hasOwnProperty("jobId")) {
20031
- if (!$util.isInteger(message.jobId))
20032
- return "jobId: integer expected";
20033
- }
20034
- return null;
20035
- };
20036
- ExportAbortRequest.fromObject = function fromObject(object) {
20037
- if (object instanceof $root.sesame.v1.jobs.ExportAbortRequest)
20038
- return object;
20039
- let message = new $root.sesame.v1.jobs.ExportAbortRequest();
20040
- if (object.jobId != null)
20041
- message.jobId = object.jobId >>> 0;
20042
- return message;
20043
- };
20044
- ExportAbortRequest.toObject = function toObject(message, options) {
20045
- if (!options)
20046
- options = {};
20047
- let object = {};
20048
- if (options.defaults)
20049
- object.jobId = 0;
20050
- if (message.jobId != null && message.hasOwnProperty("jobId"))
20051
- object.jobId = message.jobId;
20052
- return object;
20053
- };
20054
- ExportAbortRequest.prototype.toJSON = function toJSON() {
20055
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
20056
- };
20057
- ExportAbortRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
20058
- if (typeUrlPrefix === void 0) {
20059
- typeUrlPrefix = "type.googleapis.com";
20060
- }
20061
- return typeUrlPrefix + "/sesame.v1.jobs.ExportAbortRequest";
20062
- };
20063
- return ExportAbortRequest;
20064
- }();
20065
- jobs.ExportStatusRequest = function() {
20066
- function ExportStatusRequest(properties) {
20067
- if (properties) {
20068
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
20069
- if (properties[keys[i]] != null)
20070
- this[keys[i]] = properties[keys[i]];
20071
- }
20072
- }
20073
- ExportStatusRequest.prototype.jobId = 0;
20074
- ExportStatusRequest.create = function create(properties) {
20075
- return new ExportStatusRequest(properties);
20076
- };
20077
- ExportStatusRequest.encode = function encode(message, writer) {
20078
- if (!writer)
20079
- writer = $Writer.create();
20080
- if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
20081
- writer.uint32(
20082
- /* id 1, wireType 0 =*/
20083
- 8
20084
- ).uint32(message.jobId);
20085
- return writer;
20086
- };
20087
- ExportStatusRequest.encodeDelimited = function encodeDelimited(message, writer) {
20088
- return this.encode(message, writer).ldelim();
20089
- };
20090
- ExportStatusRequest.decode = function decode(reader, length, error) {
20091
- if (!(reader instanceof $Reader))
20092
- reader = $Reader.create(reader);
20093
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.ExportStatusRequest();
20094
- while (reader.pos < end) {
20095
- let tag = reader.uint32();
20096
- if (tag === error)
20097
- break;
20098
- switch (tag >>> 3) {
20099
- case 1: {
20100
- message.jobId = reader.uint32();
20101
- break;
20102
- }
20103
- default:
20104
- reader.skipType(tag & 7);
20105
- break;
20106
- }
20107
- }
20108
- return message;
20109
- };
20110
- ExportStatusRequest.decodeDelimited = function decodeDelimited(reader) {
20111
- if (!(reader instanceof $Reader))
20112
- reader = new $Reader(reader);
20113
- return this.decode(reader, reader.uint32());
20114
- };
20115
- ExportStatusRequest.verify = function verify(message) {
20116
- if (typeof message !== "object" || message === null)
20117
- return "object expected";
20118
- if (message.jobId != null && message.hasOwnProperty("jobId")) {
20119
- if (!$util.isInteger(message.jobId))
20120
- return "jobId: integer expected";
20121
- }
20122
- return null;
20123
- };
20124
- ExportStatusRequest.fromObject = function fromObject(object) {
20125
- if (object instanceof $root.sesame.v1.jobs.ExportStatusRequest)
20126
- return object;
20127
- let message = new $root.sesame.v1.jobs.ExportStatusRequest();
20128
- if (object.jobId != null)
20129
- message.jobId = object.jobId >>> 0;
20130
- return message;
20131
- };
20132
- ExportStatusRequest.toObject = function toObject(message, options) {
20133
- if (!options)
20134
- options = {};
20135
- let object = {};
20136
- if (options.defaults)
20137
- object.jobId = 0;
20138
- if (message.jobId != null && message.hasOwnProperty("jobId"))
20139
- object.jobId = message.jobId;
20140
- return object;
20141
- };
20142
- ExportStatusRequest.prototype.toJSON = function toJSON() {
20143
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
20144
- };
20145
- ExportStatusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
20146
- if (typeUrlPrefix === void 0) {
20147
- typeUrlPrefix = "type.googleapis.com";
20148
- }
20149
- return typeUrlPrefix + "/sesame.v1.jobs.ExportStatusRequest";
20150
- };
20151
- return ExportStatusRequest;
20152
- }();
20153
- jobs.ExportListRequest = function() {
20154
- function ExportListRequest(properties) {
20155
- if (properties) {
20156
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
20157
- if (properties[keys[i]] != null)
20158
- this[keys[i]] = properties[keys[i]];
20159
- }
20160
- }
20161
- ExportListRequest.create = function create(properties) {
20162
- return new ExportListRequest(properties);
20163
- };
20164
- ExportListRequest.encode = function encode(message, writer) {
20165
- if (!writer)
20166
- writer = $Writer.create();
20167
- return writer;
20168
- };
20169
- ExportListRequest.encodeDelimited = function encodeDelimited(message, writer) {
20170
- return this.encode(message, writer).ldelim();
20171
- };
20172
- ExportListRequest.decode = function decode(reader, length, error) {
20173
- if (!(reader instanceof $Reader))
20174
- reader = $Reader.create(reader);
20175
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.ExportListRequest();
20176
- while (reader.pos < end) {
20177
- let tag = reader.uint32();
20178
- if (tag === error)
20179
- break;
20180
- switch (tag >>> 3) {
20181
- default:
20182
- reader.skipType(tag & 7);
20183
- break;
20184
- }
20185
- }
20186
- return message;
20187
- };
20188
- ExportListRequest.decodeDelimited = function decodeDelimited(reader) {
20189
- if (!(reader instanceof $Reader))
20190
- reader = new $Reader(reader);
20191
- return this.decode(reader, reader.uint32());
20192
- };
20193
- ExportListRequest.verify = function verify(message) {
20194
- if (typeof message !== "object" || message === null)
20195
- return "object expected";
20196
- return null;
20197
- };
20198
- ExportListRequest.fromObject = function fromObject(object) {
20199
- if (object instanceof $root.sesame.v1.jobs.ExportListRequest)
20200
- return object;
20201
- return new $root.sesame.v1.jobs.ExportListRequest();
20202
- };
20203
- ExportListRequest.toObject = function toObject() {
20204
- return {};
20205
- };
20206
- ExportListRequest.prototype.toJSON = function toJSON() {
20207
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
20208
- };
20209
- ExportListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
20210
- if (typeUrlPrefix === void 0) {
20211
- typeUrlPrefix = "type.googleapis.com";
20212
- }
20213
- return typeUrlPrefix + "/sesame.v1.jobs.ExportListRequest";
20214
- };
20215
- return ExportListRequest;
20216
- }();
20217
- jobs.ImportConfiguration = function() {
20218
- function ImportConfiguration(properties) {
20219
- this.audioRouting = [];
20220
- if (properties) {
20221
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
20222
- if (properties[keys[i]] != null)
20223
- this[keys[i]] = properties[keys[i]];
20224
- }
20225
- }
20226
- ImportConfiguration.prototype.srcFilename = "";
20227
- ImportConfiguration.prototype.audioRouting = $util.emptyArray;
20228
- ImportConfiguration.prototype.dstRecorderId = "";
20229
- ImportConfiguration.prototype.dstClipId = $util.Long ? $util.Long.fromBits(0, 0, true) : 0;
20230
- ImportConfiguration.prototype.dstClipName = "";
20231
- ImportConfiguration.prototype.dstClipUserData = "";
20232
- ImportConfiguration.create = function create(properties) {
20233
- return new ImportConfiguration(properties);
20234
- };
20235
- ImportConfiguration.encode = function encode(message, writer) {
20236
- if (!writer)
20237
- writer = $Writer.create();
20238
- if (message.srcFilename != null && Object.hasOwnProperty.call(message, "srcFilename"))
20485
+ if (message.srcFilename != null && Object.hasOwnProperty.call(message, "srcFilename"))
20239
20486
  writer.uint32(
20240
20487
  /* id 1, wireType 2 =*/
20241
20488
  10
@@ -20529,42 +20776,71 @@ var sesame = $root.sesame = (() => {
20529
20776
  };
20530
20777
  return ImportStartRequest;
20531
20778
  }();
20532
- jobs.ImportAbortRequest = function() {
20533
- function ImportAbortRequest(properties) {
20779
+ return jobs;
20780
+ }();
20781
+ v1.rpc = function() {
20782
+ const rpc = {};
20783
+ rpc.Message = function() {
20784
+ function Message2(properties) {
20534
20785
  if (properties) {
20535
20786
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
20536
20787
  if (properties[keys[i]] != null)
20537
20788
  this[keys[i]] = properties[keys[i]];
20538
20789
  }
20539
20790
  }
20540
- ImportAbortRequest.prototype.jobId = 0;
20541
- ImportAbortRequest.create = function create(properties) {
20542
- return new ImportAbortRequest(properties);
20791
+ Message2.prototype.request = null;
20792
+ Message2.prototype.response = null;
20793
+ Message2.prototype.event = null;
20794
+ let $oneOfFields;
20795
+ Object.defineProperty(Message2.prototype, "payload", {
20796
+ get: $util.oneOfGetter($oneOfFields = ["request", "response", "event"]),
20797
+ set: $util.oneOfSetter($oneOfFields)
20798
+ });
20799
+ Message2.create = function create(properties) {
20800
+ return new Message2(properties);
20543
20801
  };
20544
- ImportAbortRequest.encode = function encode(message, writer) {
20802
+ Message2.encode = function encode(message, writer) {
20545
20803
  if (!writer)
20546
20804
  writer = $Writer.create();
20547
- if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
20548
- writer.uint32(
20549
- /* id 1, wireType 0 =*/
20550
- 8
20551
- ).uint32(message.jobId);
20805
+ if (message.request != null && Object.hasOwnProperty.call(message, "request"))
20806
+ $root.sesame.v1.rpc.Request.encode(message.request, writer.uint32(
20807
+ /* id 1, wireType 2 =*/
20808
+ 10
20809
+ ).fork()).ldelim();
20810
+ if (message.response != null && Object.hasOwnProperty.call(message, "response"))
20811
+ $root.sesame.v1.rpc.Response.encode(message.response, writer.uint32(
20812
+ /* id 2, wireType 2 =*/
20813
+ 18
20814
+ ).fork()).ldelim();
20815
+ if (message.event != null && Object.hasOwnProperty.call(message, "event"))
20816
+ $root.sesame.v1.rpc.Event.encode(message.event, writer.uint32(
20817
+ /* id 3, wireType 2 =*/
20818
+ 26
20819
+ ).fork()).ldelim();
20552
20820
  return writer;
20553
20821
  };
20554
- ImportAbortRequest.encodeDelimited = function encodeDelimited(message, writer) {
20822
+ Message2.encodeDelimited = function encodeDelimited(message, writer) {
20555
20823
  return this.encode(message, writer).ldelim();
20556
20824
  };
20557
- ImportAbortRequest.decode = function decode(reader, length, error) {
20825
+ Message2.decode = function decode(reader, length, error) {
20558
20826
  if (!(reader instanceof $Reader))
20559
20827
  reader = $Reader.create(reader);
20560
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.ImportAbortRequest();
20828
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.rpc.Message();
20561
20829
  while (reader.pos < end) {
20562
20830
  let tag = reader.uint32();
20563
20831
  if (tag === error)
20564
20832
  break;
20565
20833
  switch (tag >>> 3) {
20566
20834
  case 1: {
20567
- message.jobId = reader.uint32();
20835
+ message.request = $root.sesame.v1.rpc.Request.decode(reader, reader.uint32());
20836
+ break;
20837
+ }
20838
+ case 2: {
20839
+ message.response = $root.sesame.v1.rpc.Response.decode(reader, reader.uint32());
20840
+ break;
20841
+ }
20842
+ case 3: {
20843
+ message.event = $root.sesame.v1.rpc.Event.decode(reader, reader.uint32());
20568
20844
  break;
20569
20845
  }
20570
20846
  default:
@@ -20574,291 +20850,22 @@ var sesame = $root.sesame = (() => {
20574
20850
  }
20575
20851
  return message;
20576
20852
  };
20577
- ImportAbortRequest.decodeDelimited = function decodeDelimited(reader) {
20853
+ Message2.decodeDelimited = function decodeDelimited(reader) {
20578
20854
  if (!(reader instanceof $Reader))
20579
20855
  reader = new $Reader(reader);
20580
20856
  return this.decode(reader, reader.uint32());
20581
20857
  };
20582
- ImportAbortRequest.verify = function verify(message) {
20858
+ Message2.verify = function verify(message) {
20583
20859
  if (typeof message !== "object" || message === null)
20584
20860
  return "object expected";
20585
- if (message.jobId != null && message.hasOwnProperty("jobId")) {
20586
- if (!$util.isInteger(message.jobId))
20587
- return "jobId: integer expected";
20588
- }
20589
- return null;
20590
- };
20591
- ImportAbortRequest.fromObject = function fromObject(object) {
20592
- if (object instanceof $root.sesame.v1.jobs.ImportAbortRequest)
20593
- return object;
20594
- let message = new $root.sesame.v1.jobs.ImportAbortRequest();
20595
- if (object.jobId != null)
20596
- message.jobId = object.jobId >>> 0;
20597
- return message;
20598
- };
20599
- ImportAbortRequest.toObject = function toObject(message, options) {
20600
- if (!options)
20601
- options = {};
20602
- let object = {};
20603
- if (options.defaults)
20604
- object.jobId = 0;
20605
- if (message.jobId != null && message.hasOwnProperty("jobId"))
20606
- object.jobId = message.jobId;
20607
- return object;
20608
- };
20609
- ImportAbortRequest.prototype.toJSON = function toJSON() {
20610
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
20611
- };
20612
- ImportAbortRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
20613
- if (typeUrlPrefix === void 0) {
20614
- typeUrlPrefix = "type.googleapis.com";
20615
- }
20616
- return typeUrlPrefix + "/sesame.v1.jobs.ImportAbortRequest";
20617
- };
20618
- return ImportAbortRequest;
20619
- }();
20620
- jobs.ImportStatusRequest = function() {
20621
- function ImportStatusRequest(properties) {
20622
- if (properties) {
20623
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
20624
- if (properties[keys[i]] != null)
20625
- this[keys[i]] = properties[keys[i]];
20626
- }
20627
- }
20628
- ImportStatusRequest.prototype.jobId = 0;
20629
- ImportStatusRequest.create = function create(properties) {
20630
- return new ImportStatusRequest(properties);
20631
- };
20632
- ImportStatusRequest.encode = function encode(message, writer) {
20633
- if (!writer)
20634
- writer = $Writer.create();
20635
- if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
20636
- writer.uint32(
20637
- /* id 1, wireType 0 =*/
20638
- 8
20639
- ).uint32(message.jobId);
20640
- return writer;
20641
- };
20642
- ImportStatusRequest.encodeDelimited = function encodeDelimited(message, writer) {
20643
- return this.encode(message, writer).ldelim();
20644
- };
20645
- ImportStatusRequest.decode = function decode(reader, length, error) {
20646
- if (!(reader instanceof $Reader))
20647
- reader = $Reader.create(reader);
20648
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.ImportStatusRequest();
20649
- while (reader.pos < end) {
20650
- let tag = reader.uint32();
20651
- if (tag === error)
20652
- break;
20653
- switch (tag >>> 3) {
20654
- case 1: {
20655
- message.jobId = reader.uint32();
20656
- break;
20657
- }
20658
- default:
20659
- reader.skipType(tag & 7);
20660
- break;
20661
- }
20662
- }
20663
- return message;
20664
- };
20665
- ImportStatusRequest.decodeDelimited = function decodeDelimited(reader) {
20666
- if (!(reader instanceof $Reader))
20667
- reader = new $Reader(reader);
20668
- return this.decode(reader, reader.uint32());
20669
- };
20670
- ImportStatusRequest.verify = function verify(message) {
20671
- if (typeof message !== "object" || message === null)
20672
- return "object expected";
20673
- if (message.jobId != null && message.hasOwnProperty("jobId")) {
20674
- if (!$util.isInteger(message.jobId))
20675
- return "jobId: integer expected";
20676
- }
20677
- return null;
20678
- };
20679
- ImportStatusRequest.fromObject = function fromObject(object) {
20680
- if (object instanceof $root.sesame.v1.jobs.ImportStatusRequest)
20681
- return object;
20682
- let message = new $root.sesame.v1.jobs.ImportStatusRequest();
20683
- if (object.jobId != null)
20684
- message.jobId = object.jobId >>> 0;
20685
- return message;
20686
- };
20687
- ImportStatusRequest.toObject = function toObject(message, options) {
20688
- if (!options)
20689
- options = {};
20690
- let object = {};
20691
- if (options.defaults)
20692
- object.jobId = 0;
20693
- if (message.jobId != null && message.hasOwnProperty("jobId"))
20694
- object.jobId = message.jobId;
20695
- return object;
20696
- };
20697
- ImportStatusRequest.prototype.toJSON = function toJSON() {
20698
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
20699
- };
20700
- ImportStatusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
20701
- if (typeUrlPrefix === void 0) {
20702
- typeUrlPrefix = "type.googleapis.com";
20703
- }
20704
- return typeUrlPrefix + "/sesame.v1.jobs.ImportStatusRequest";
20705
- };
20706
- return ImportStatusRequest;
20707
- }();
20708
- jobs.ImportListRequest = function() {
20709
- function ImportListRequest(properties) {
20710
- if (properties) {
20711
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
20712
- if (properties[keys[i]] != null)
20713
- this[keys[i]] = properties[keys[i]];
20714
- }
20715
- }
20716
- ImportListRequest.create = function create(properties) {
20717
- return new ImportListRequest(properties);
20718
- };
20719
- ImportListRequest.encode = function encode(message, writer) {
20720
- if (!writer)
20721
- writer = $Writer.create();
20722
- return writer;
20723
- };
20724
- ImportListRequest.encodeDelimited = function encodeDelimited(message, writer) {
20725
- return this.encode(message, writer).ldelim();
20726
- };
20727
- ImportListRequest.decode = function decode(reader, length, error) {
20728
- if (!(reader instanceof $Reader))
20729
- reader = $Reader.create(reader);
20730
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.ImportListRequest();
20731
- while (reader.pos < end) {
20732
- let tag = reader.uint32();
20733
- if (tag === error)
20734
- break;
20735
- switch (tag >>> 3) {
20736
- default:
20737
- reader.skipType(tag & 7);
20738
- break;
20739
- }
20740
- }
20741
- return message;
20742
- };
20743
- ImportListRequest.decodeDelimited = function decodeDelimited(reader) {
20744
- if (!(reader instanceof $Reader))
20745
- reader = new $Reader(reader);
20746
- return this.decode(reader, reader.uint32());
20747
- };
20748
- ImportListRequest.verify = function verify(message) {
20749
- if (typeof message !== "object" || message === null)
20750
- return "object expected";
20751
- return null;
20752
- };
20753
- ImportListRequest.fromObject = function fromObject(object) {
20754
- if (object instanceof $root.sesame.v1.jobs.ImportListRequest)
20755
- return object;
20756
- return new $root.sesame.v1.jobs.ImportListRequest();
20757
- };
20758
- ImportListRequest.toObject = function toObject() {
20759
- return {};
20760
- };
20761
- ImportListRequest.prototype.toJSON = function toJSON() {
20762
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
20763
- };
20764
- ImportListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
20765
- if (typeUrlPrefix === void 0) {
20766
- typeUrlPrefix = "type.googleapis.com";
20767
- }
20768
- return typeUrlPrefix + "/sesame.v1.jobs.ImportListRequest";
20769
- };
20770
- return ImportListRequest;
20771
- }();
20772
- return jobs;
20773
- }();
20774
- v1.rpc = function() {
20775
- const rpc = {};
20776
- rpc.Message = function() {
20777
- function Message2(properties) {
20778
- if (properties) {
20779
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
20780
- if (properties[keys[i]] != null)
20781
- this[keys[i]] = properties[keys[i]];
20782
- }
20783
- }
20784
- Message2.prototype.request = null;
20785
- Message2.prototype.response = null;
20786
- Message2.prototype.event = null;
20787
- let $oneOfFields;
20788
- Object.defineProperty(Message2.prototype, "payload", {
20789
- get: $util.oneOfGetter($oneOfFields = ["request", "response", "event"]),
20790
- set: $util.oneOfSetter($oneOfFields)
20791
- });
20792
- Message2.create = function create(properties) {
20793
- return new Message2(properties);
20794
- };
20795
- Message2.encode = function encode(message, writer) {
20796
- if (!writer)
20797
- writer = $Writer.create();
20798
- if (message.request != null && Object.hasOwnProperty.call(message, "request"))
20799
- $root.sesame.v1.rpc.Request.encode(message.request, writer.uint32(
20800
- /* id 1, wireType 2 =*/
20801
- 10
20802
- ).fork()).ldelim();
20803
- if (message.response != null && Object.hasOwnProperty.call(message, "response"))
20804
- $root.sesame.v1.rpc.Response.encode(message.response, writer.uint32(
20805
- /* id 2, wireType 2 =*/
20806
- 18
20807
- ).fork()).ldelim();
20808
- if (message.event != null && Object.hasOwnProperty.call(message, "event"))
20809
- $root.sesame.v1.rpc.Event.encode(message.event, writer.uint32(
20810
- /* id 3, wireType 2 =*/
20811
- 26
20812
- ).fork()).ldelim();
20813
- return writer;
20814
- };
20815
- Message2.encodeDelimited = function encodeDelimited(message, writer) {
20816
- return this.encode(message, writer).ldelim();
20817
- };
20818
- Message2.decode = function decode(reader, length, error) {
20819
- if (!(reader instanceof $Reader))
20820
- reader = $Reader.create(reader);
20821
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.rpc.Message();
20822
- while (reader.pos < end) {
20823
- let tag = reader.uint32();
20824
- if (tag === error)
20825
- break;
20826
- switch (tag >>> 3) {
20827
- case 1: {
20828
- message.request = $root.sesame.v1.rpc.Request.decode(reader, reader.uint32());
20829
- break;
20830
- }
20831
- case 2: {
20832
- message.response = $root.sesame.v1.rpc.Response.decode(reader, reader.uint32());
20833
- break;
20834
- }
20835
- case 3: {
20836
- message.event = $root.sesame.v1.rpc.Event.decode(reader, reader.uint32());
20837
- break;
20838
- }
20839
- default:
20840
- reader.skipType(tag & 7);
20841
- break;
20842
- }
20843
- }
20844
- return message;
20845
- };
20846
- Message2.decodeDelimited = function decodeDelimited(reader) {
20847
- if (!(reader instanceof $Reader))
20848
- reader = new $Reader(reader);
20849
- return this.decode(reader, reader.uint32());
20850
- };
20851
- Message2.verify = function verify(message) {
20852
- if (typeof message !== "object" || message === null)
20853
- return "object expected";
20854
- let properties = {};
20855
- if (message.request != null && message.hasOwnProperty("request")) {
20856
- properties.payload = 1;
20857
- {
20858
- let error = $root.sesame.v1.rpc.Request.verify(message.request);
20859
- if (error)
20860
- return "request." + error;
20861
- }
20861
+ let properties = {};
20862
+ if (message.request != null && message.hasOwnProperty("request")) {
20863
+ properties.payload = 1;
20864
+ {
20865
+ let error = $root.sesame.v1.rpc.Request.verify(message.request);
20866
+ if (error)
20867
+ return "request." + error;
20868
+ }
20862
20869
  }
20863
20870
  if (message.response != null && message.hasOwnProperty("response")) {
20864
20871
  if (properties.payload === 1)
@@ -21187,93 +21194,799 @@ var sesame = $root.sesame = (() => {
21187
21194
  else if (object.payload.length >= 0)
21188
21195
  message.payload = object.payload;
21189
21196
  }
21190
- if (object.error != null)
21191
- message.error = String(object.error);
21197
+ if (object.error != null)
21198
+ message.error = String(object.error);
21199
+ return message;
21200
+ };
21201
+ Response2.toObject = function toObject(message, options) {
21202
+ if (!options)
21203
+ options = {};
21204
+ let object = {};
21205
+ if (options.defaults) {
21206
+ object.seq = 0;
21207
+ object.ok = false;
21208
+ if (options.bytes === String)
21209
+ object.payload = "";
21210
+ else {
21211
+ object.payload = [];
21212
+ if (options.bytes !== Array)
21213
+ object.payload = $util.newBuffer(object.payload);
21214
+ }
21215
+ object.error = "";
21216
+ }
21217
+ if (message.seq != null && message.hasOwnProperty("seq"))
21218
+ object.seq = message.seq;
21219
+ if (message.ok != null && message.hasOwnProperty("ok"))
21220
+ object.ok = message.ok;
21221
+ if (message.payload != null && message.hasOwnProperty("payload"))
21222
+ object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload;
21223
+ if (message.error != null && message.hasOwnProperty("error"))
21224
+ object.error = message.error;
21225
+ return object;
21226
+ };
21227
+ Response2.prototype.toJSON = function toJSON() {
21228
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
21229
+ };
21230
+ Response2.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
21231
+ if (typeUrlPrefix === void 0) {
21232
+ typeUrlPrefix = "type.googleapis.com";
21233
+ }
21234
+ return typeUrlPrefix + "/sesame.v1.rpc.Response";
21235
+ };
21236
+ return Response2;
21237
+ }();
21238
+ rpc.Event = function() {
21239
+ function Event2(properties) {
21240
+ if (properties) {
21241
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
21242
+ if (properties[keys[i]] != null)
21243
+ this[keys[i]] = properties[keys[i]];
21244
+ }
21245
+ }
21246
+ Event2.prototype.topic = 0;
21247
+ Event2.prototype.payload = $util.newBuffer([]);
21248
+ Event2.create = function create(properties) {
21249
+ return new Event2(properties);
21250
+ };
21251
+ Event2.encode = function encode(message, writer) {
21252
+ if (!writer)
21253
+ writer = $Writer.create();
21254
+ if (message.topic != null && Object.hasOwnProperty.call(message, "topic"))
21255
+ writer.uint32(
21256
+ /* id 1, wireType 0 =*/
21257
+ 8
21258
+ ).int32(message.topic);
21259
+ if (message.payload != null && Object.hasOwnProperty.call(message, "payload"))
21260
+ writer.uint32(
21261
+ /* id 2, wireType 2 =*/
21262
+ 18
21263
+ ).bytes(message.payload);
21264
+ return writer;
21265
+ };
21266
+ Event2.encodeDelimited = function encodeDelimited(message, writer) {
21267
+ return this.encode(message, writer).ldelim();
21268
+ };
21269
+ Event2.decode = function decode(reader, length, error) {
21270
+ if (!(reader instanceof $Reader))
21271
+ reader = $Reader.create(reader);
21272
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.rpc.Event();
21273
+ while (reader.pos < end) {
21274
+ let tag = reader.uint32();
21275
+ if (tag === error)
21276
+ break;
21277
+ switch (tag >>> 3) {
21278
+ case 1: {
21279
+ message.topic = reader.int32();
21280
+ break;
21281
+ }
21282
+ case 2: {
21283
+ message.payload = reader.bytes();
21284
+ break;
21285
+ }
21286
+ default:
21287
+ reader.skipType(tag & 7);
21288
+ break;
21289
+ }
21290
+ }
21291
+ return message;
21292
+ };
21293
+ Event2.decodeDelimited = function decodeDelimited(reader) {
21294
+ if (!(reader instanceof $Reader))
21295
+ reader = new $Reader(reader);
21296
+ return this.decode(reader, reader.uint32());
21297
+ };
21298
+ Event2.verify = function verify(message) {
21299
+ if (typeof message !== "object" || message === null)
21300
+ return "object expected";
21301
+ if (message.topic != null && message.hasOwnProperty("topic"))
21302
+ switch (message.topic) {
21303
+ default:
21304
+ return "topic: enum value expected";
21305
+ case 0:
21306
+ case 1:
21307
+ case 2:
21308
+ case 3:
21309
+ case 4:
21310
+ case 6:
21311
+ break;
21312
+ }
21313
+ if (message.payload != null && message.hasOwnProperty("payload")) {
21314
+ if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload)))
21315
+ return "payload: buffer expected";
21316
+ }
21317
+ return null;
21318
+ };
21319
+ Event2.fromObject = function fromObject(object) {
21320
+ if (object instanceof $root.sesame.v1.rpc.Event)
21321
+ return object;
21322
+ let message = new $root.sesame.v1.rpc.Event();
21323
+ switch (object.topic) {
21324
+ default:
21325
+ if (typeof object.topic === "number") {
21326
+ message.topic = object.topic;
21327
+ break;
21328
+ }
21329
+ break;
21330
+ case "EVENT_TOPIC_UNSPECIFIED":
21331
+ case 0:
21332
+ message.topic = 0;
21333
+ break;
21334
+ case "EVENT_TOPIC_ERROR":
21335
+ case 1:
21336
+ message.topic = 1;
21337
+ break;
21338
+ case "EVENT_TOPIC_TRANSPORT":
21339
+ case 2:
21340
+ message.topic = 2;
21341
+ break;
21342
+ case "EVENT_TOPIC_CALLBACK":
21343
+ case 3:
21344
+ message.topic = 3;
21345
+ break;
21346
+ case "EVENT_TOPIC_JOB":
21347
+ case 4:
21348
+ message.topic = 4;
21349
+ break;
21350
+ case "EVENT_TOPIC_RECORDER":
21351
+ case 6:
21352
+ message.topic = 6;
21353
+ break;
21354
+ }
21355
+ if (object.payload != null) {
21356
+ if (typeof object.payload === "string")
21357
+ $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0);
21358
+ else if (object.payload.length >= 0)
21359
+ message.payload = object.payload;
21360
+ }
21361
+ return message;
21362
+ };
21363
+ Event2.toObject = function toObject(message, options) {
21364
+ if (!options)
21365
+ options = {};
21366
+ let object = {};
21367
+ if (options.defaults) {
21368
+ object.topic = options.enums === String ? "EVENT_TOPIC_UNSPECIFIED" : 0;
21369
+ if (options.bytes === String)
21370
+ object.payload = "";
21371
+ else {
21372
+ object.payload = [];
21373
+ if (options.bytes !== Array)
21374
+ object.payload = $util.newBuffer(object.payload);
21375
+ }
21376
+ }
21377
+ if (message.topic != null && message.hasOwnProperty("topic"))
21378
+ object.topic = options.enums === String ? $root.sesame.v1.common.EventTopic[message.topic] === void 0 ? message.topic : $root.sesame.v1.common.EventTopic[message.topic] : message.topic;
21379
+ if (message.payload != null && message.hasOwnProperty("payload"))
21380
+ object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload;
21381
+ return object;
21382
+ };
21383
+ Event2.prototype.toJSON = function toJSON() {
21384
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
21385
+ };
21386
+ Event2.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
21387
+ if (typeUrlPrefix === void 0) {
21388
+ typeUrlPrefix = "type.googleapis.com";
21389
+ }
21390
+ return typeUrlPrefix + "/sesame.v1.rpc.Event";
21391
+ };
21392
+ return Event2;
21393
+ }();
21394
+ rpc.SesameAPIService = function() {
21395
+ function SesameAPIService(rpcImpl, requestDelimited, responseDelimited) {
21396
+ $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
21397
+ }
21398
+ (SesameAPIService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SesameAPIService;
21399
+ SesameAPIService.create = function create(rpcImpl, requestDelimited, responseDelimited) {
21400
+ return new this(rpcImpl, requestDelimited, responseDelimited);
21401
+ };
21402
+ Object.defineProperty(SesameAPIService.prototype.executeCommandList = function executeCommandList(request, callback) {
21403
+ return this.rpcCall(executeCommandList, $root.sesame.v1.commands.CommandList, $root.sesame.v1.commands.CommandExecutionResponse, request, callback);
21404
+ }, "name", { value: "ExecuteCommandList" });
21405
+ Object.defineProperty(SesameAPIService.prototype.updateSubscriptions = function updateSubscriptions(request, callback) {
21406
+ return this.rpcCall(updateSubscriptions, $root.sesame.v1.status.SubscriptionRequest, $root.sesame.v1.common.Empty, request, callback);
21407
+ }, "name", { value: "UpdateSubscriptions" });
21408
+ Object.defineProperty(SesameAPIService.prototype.notImplemented = function notImplemented(request, callback) {
21409
+ return this.rpcCall(notImplemented, $root.sesame.v1.common.Empty, $root.sesame.v1.common.Empty, request, callback);
21410
+ }, "name", { value: "NotImplemented" });
21411
+ Object.defineProperty(SesameAPIService.prototype.requestEvents = function requestEvents(request, callback) {
21412
+ return this.rpcCall(requestEvents, $root.sesame.v1.common.Empty, $root.sesame.v1.status.Event, request, callback);
21413
+ }, "name", { value: "RequestEvents" });
21414
+ Object.defineProperty(SesameAPIService.prototype.requestStatus = function requestStatus(request, callback) {
21415
+ return this.rpcCall(requestStatus, $root.sesame.v1.common.Empty, $root.sesame.v1.status.Status, request, callback);
21416
+ }, "name", { value: "RequestStatus" });
21417
+ Object.defineProperty(SesameAPIService.prototype.requestRecorderOperation = function requestRecorderOperation(request, callback) {
21418
+ return this.rpcCall(requestRecorderOperation, $root.sesame.v1.recorder.RecorderRequest, $root.sesame.v1.recorder.RecorderResponse, request, callback);
21419
+ }, "name", { value: "RequestRecorderOperation" });
21420
+ Object.defineProperty(SesameAPIService.prototype.startJob = function startJob(request, callback) {
21421
+ return this.rpcCall(startJob, $root.sesame.v1.jobs.JobStartRequest, $root.sesame.v1.jobs.Job, request, callback);
21422
+ }, "name", { value: "StartJob" });
21423
+ Object.defineProperty(SesameAPIService.prototype.abortJob = function abortJob(request, callback) {
21424
+ return this.rpcCall(abortJob, $root.sesame.v1.jobs.JobAbortRequest, $root.sesame.v1.jobs.Job, request, callback);
21425
+ }, "name", { value: "AbortJob" });
21426
+ Object.defineProperty(SesameAPIService.prototype.getJobStatus = function getJobStatus(request, callback) {
21427
+ return this.rpcCall(getJobStatus, $root.sesame.v1.jobs.JobStatusRequest, $root.sesame.v1.jobs.Job, request, callback);
21428
+ }, "name", { value: "GetJobStatus" });
21429
+ Object.defineProperty(SesameAPIService.prototype.listJobs = function listJobs(request, callback) {
21430
+ return this.rpcCall(listJobs, $root.sesame.v1.jobs.JobListRequest, $root.sesame.v1.jobs.JobList, request, callback);
21431
+ }, "name", { value: "ListJobs" });
21432
+ Object.defineProperty(SesameAPIService.prototype.requestKeyframe = function requestKeyframe(request, callback) {
21433
+ return this.rpcCall(requestKeyframe, $root.sesame.v1.outputs.KeyframeRequest, $root.sesame.v1.common.Empty, request, callback);
21434
+ }, "name", { value: "RequestKeyframe" });
21435
+ Object.defineProperty(SesameAPIService.prototype.requestIODeviceList = function requestIODeviceList(request, callback) {
21436
+ return this.rpcCall(requestIODeviceList, $root.sesame.v1.common.Empty, $root.sesame.v1.status.IODeviceListResponse, request, callback);
21437
+ }, "name", { value: "RequestIODeviceList" });
21438
+ return SesameAPIService;
21439
+ }();
21440
+ return rpc;
21441
+ }();
21442
+ v1.wire = function() {
21443
+ const wire = {};
21444
+ wire.FrameType = function() {
21445
+ const valuesById = {}, values = Object.create(valuesById);
21446
+ values[valuesById[0] = "FRAME_TYPE_UNSPECIFIED"] = 0;
21447
+ values[valuesById[1] = "FRAME_TYPE_RPC"] = 1;
21448
+ values[valuesById[2] = "FRAME_TYPE_VIDEO"] = 2;
21449
+ values[valuesById[3] = "FRAME_TYPE_AUDIO"] = 3;
21450
+ values[valuesById[4] = "FRAME_TYPE_MUXED"] = 4;
21451
+ values[valuesById[5] = "FRAME_TYPE_DECODER_DATA"] = 5;
21452
+ values[valuesById[6] = "FRAME_TYPE_DATA"] = 6;
21453
+ return values;
21454
+ }();
21455
+ wire.MediaCodecData = function() {
21456
+ function MediaCodecData2(properties) {
21457
+ if (properties) {
21458
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
21459
+ if (properties[keys[i]] != null)
21460
+ this[keys[i]] = properties[keys[i]];
21461
+ }
21462
+ }
21463
+ MediaCodecData2.prototype.codecType = 0;
21464
+ MediaCodecData2.prototype.sampleRate = 0;
21465
+ MediaCodecData2.prototype.timebaseNum = 0;
21466
+ MediaCodecData2.prototype.timebaseDen = 0;
21467
+ MediaCodecData2.prototype.codecProfile = 0;
21468
+ MediaCodecData2.prototype.codecLevel = 0;
21469
+ MediaCodecData2.prototype.width = 0;
21470
+ MediaCodecData2.prototype.height = 0;
21471
+ MediaCodecData2.prototype.channels = 0;
21472
+ MediaCodecData2.prototype.bitDepth = 0;
21473
+ MediaCodecData2.create = function create(properties) {
21474
+ return new MediaCodecData2(properties);
21475
+ };
21476
+ MediaCodecData2.encode = function encode(message, writer) {
21477
+ if (!writer)
21478
+ writer = $Writer.create();
21479
+ if (message.codecType != null && Object.hasOwnProperty.call(message, "codecType"))
21480
+ writer.uint32(
21481
+ /* id 1, wireType 0 =*/
21482
+ 8
21483
+ ).int32(message.codecType);
21484
+ if (message.sampleRate != null && Object.hasOwnProperty.call(message, "sampleRate"))
21485
+ writer.uint32(
21486
+ /* id 2, wireType 0 =*/
21487
+ 16
21488
+ ).uint32(message.sampleRate);
21489
+ if (message.timebaseNum != null && Object.hasOwnProperty.call(message, "timebaseNum"))
21490
+ writer.uint32(
21491
+ /* id 3, wireType 0 =*/
21492
+ 24
21493
+ ).uint32(message.timebaseNum);
21494
+ if (message.timebaseDen != null && Object.hasOwnProperty.call(message, "timebaseDen"))
21495
+ writer.uint32(
21496
+ /* id 4, wireType 0 =*/
21497
+ 32
21498
+ ).uint32(message.timebaseDen);
21499
+ if (message.codecProfile != null && Object.hasOwnProperty.call(message, "codecProfile"))
21500
+ writer.uint32(
21501
+ /* id 5, wireType 0 =*/
21502
+ 40
21503
+ ).uint32(message.codecProfile);
21504
+ if (message.codecLevel != null && Object.hasOwnProperty.call(message, "codecLevel"))
21505
+ writer.uint32(
21506
+ /* id 6, wireType 0 =*/
21507
+ 48
21508
+ ).uint32(message.codecLevel);
21509
+ if (message.width != null && Object.hasOwnProperty.call(message, "width"))
21510
+ writer.uint32(
21511
+ /* id 7, wireType 0 =*/
21512
+ 56
21513
+ ).uint32(message.width);
21514
+ if (message.height != null && Object.hasOwnProperty.call(message, "height"))
21515
+ writer.uint32(
21516
+ /* id 8, wireType 0 =*/
21517
+ 64
21518
+ ).uint32(message.height);
21519
+ if (message.channels != null && Object.hasOwnProperty.call(message, "channels"))
21520
+ writer.uint32(
21521
+ /* id 9, wireType 0 =*/
21522
+ 72
21523
+ ).uint32(message.channels);
21524
+ if (message.bitDepth != null && Object.hasOwnProperty.call(message, "bitDepth"))
21525
+ writer.uint32(
21526
+ /* id 10, wireType 0 =*/
21527
+ 80
21528
+ ).uint32(message.bitDepth);
21529
+ return writer;
21530
+ };
21531
+ MediaCodecData2.encodeDelimited = function encodeDelimited(message, writer) {
21532
+ return this.encode(message, writer).ldelim();
21533
+ };
21534
+ MediaCodecData2.decode = function decode(reader, length, error) {
21535
+ if (!(reader instanceof $Reader))
21536
+ reader = $Reader.create(reader);
21537
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.wire.MediaCodecData();
21538
+ while (reader.pos < end) {
21539
+ let tag = reader.uint32();
21540
+ if (tag === error)
21541
+ break;
21542
+ switch (tag >>> 3) {
21543
+ case 1: {
21544
+ message.codecType = reader.int32();
21545
+ break;
21546
+ }
21547
+ case 2: {
21548
+ message.sampleRate = reader.uint32();
21549
+ break;
21550
+ }
21551
+ case 3: {
21552
+ message.timebaseNum = reader.uint32();
21553
+ break;
21554
+ }
21555
+ case 4: {
21556
+ message.timebaseDen = reader.uint32();
21557
+ break;
21558
+ }
21559
+ case 5: {
21560
+ message.codecProfile = reader.uint32();
21561
+ break;
21562
+ }
21563
+ case 6: {
21564
+ message.codecLevel = reader.uint32();
21565
+ break;
21566
+ }
21567
+ case 7: {
21568
+ message.width = reader.uint32();
21569
+ break;
21570
+ }
21571
+ case 8: {
21572
+ message.height = reader.uint32();
21573
+ break;
21574
+ }
21575
+ case 9: {
21576
+ message.channels = reader.uint32();
21577
+ break;
21578
+ }
21579
+ case 10: {
21580
+ message.bitDepth = reader.uint32();
21581
+ break;
21582
+ }
21583
+ default:
21584
+ reader.skipType(tag & 7);
21585
+ break;
21586
+ }
21587
+ }
21588
+ return message;
21589
+ };
21590
+ MediaCodecData2.decodeDelimited = function decodeDelimited(reader) {
21591
+ if (!(reader instanceof $Reader))
21592
+ reader = new $Reader(reader);
21593
+ return this.decode(reader, reader.uint32());
21594
+ };
21595
+ MediaCodecData2.verify = function verify(message) {
21596
+ if (typeof message !== "object" || message === null)
21597
+ return "object expected";
21598
+ if (message.codecType != null && message.hasOwnProperty("codecType"))
21599
+ switch (message.codecType) {
21600
+ default:
21601
+ return "codecType: enum value expected";
21602
+ case 0:
21603
+ case 1:
21604
+ case 2:
21605
+ case 3:
21606
+ case 4:
21607
+ case 5:
21608
+ case 6:
21609
+ case 7:
21610
+ case 64:
21611
+ case 65:
21612
+ case 66:
21613
+ case 67:
21614
+ break;
21615
+ }
21616
+ if (message.sampleRate != null && message.hasOwnProperty("sampleRate")) {
21617
+ if (!$util.isInteger(message.sampleRate))
21618
+ return "sampleRate: integer expected";
21619
+ }
21620
+ if (message.timebaseNum != null && message.hasOwnProperty("timebaseNum")) {
21621
+ if (!$util.isInteger(message.timebaseNum))
21622
+ return "timebaseNum: integer expected";
21623
+ }
21624
+ if (message.timebaseDen != null && message.hasOwnProperty("timebaseDen")) {
21625
+ if (!$util.isInteger(message.timebaseDen))
21626
+ return "timebaseDen: integer expected";
21627
+ }
21628
+ if (message.codecProfile != null && message.hasOwnProperty("codecProfile")) {
21629
+ if (!$util.isInteger(message.codecProfile))
21630
+ return "codecProfile: integer expected";
21631
+ }
21632
+ if (message.codecLevel != null && message.hasOwnProperty("codecLevel")) {
21633
+ if (!$util.isInteger(message.codecLevel))
21634
+ return "codecLevel: integer expected";
21635
+ }
21636
+ if (message.width != null && message.hasOwnProperty("width")) {
21637
+ if (!$util.isInteger(message.width))
21638
+ return "width: integer expected";
21639
+ }
21640
+ if (message.height != null && message.hasOwnProperty("height")) {
21641
+ if (!$util.isInteger(message.height))
21642
+ return "height: integer expected";
21643
+ }
21644
+ if (message.channels != null && message.hasOwnProperty("channels")) {
21645
+ if (!$util.isInteger(message.channels))
21646
+ return "channels: integer expected";
21647
+ }
21648
+ if (message.bitDepth != null && message.hasOwnProperty("bitDepth")) {
21649
+ if (!$util.isInteger(message.bitDepth))
21650
+ return "bitDepth: integer expected";
21651
+ }
21652
+ return null;
21653
+ };
21654
+ MediaCodecData2.fromObject = function fromObject(object) {
21655
+ if (object instanceof $root.sesame.v1.wire.MediaCodecData)
21656
+ return object;
21657
+ let message = new $root.sesame.v1.wire.MediaCodecData();
21658
+ switch (object.codecType) {
21659
+ default:
21660
+ if (typeof object.codecType === "number") {
21661
+ message.codecType = object.codecType;
21662
+ break;
21663
+ }
21664
+ break;
21665
+ case "CODEC_TYPE_UNSPECIFIED":
21666
+ case 0:
21667
+ message.codecType = 0;
21668
+ break;
21669
+ case "CODEC_TYPE_VIDEO_VP8":
21670
+ case 1:
21671
+ message.codecType = 1;
21672
+ break;
21673
+ case "CODEC_TYPE_VIDEO_VP9":
21674
+ case 2:
21675
+ message.codecType = 2;
21676
+ break;
21677
+ case "CODEC_TYPE_VIDEO_AVC":
21678
+ case 3:
21679
+ message.codecType = 3;
21680
+ break;
21681
+ case "CODEC_TYPE_VIDEO_HEVC":
21682
+ case 4:
21683
+ message.codecType = 4;
21684
+ break;
21685
+ case "CODEC_TYPE_VIDEO_AV1":
21686
+ case 5:
21687
+ message.codecType = 5;
21688
+ break;
21689
+ case "CODEC_TYPE_VIDEO_PRORES":
21690
+ case 6:
21691
+ message.codecType = 6;
21692
+ break;
21693
+ case "CODEC_TYPE_VIDEO_DNXHR":
21694
+ case 7:
21695
+ message.codecType = 7;
21696
+ break;
21697
+ case "CODEC_TYPE_AUDIO_OPUS":
21698
+ case 64:
21699
+ message.codecType = 64;
21700
+ break;
21701
+ case "CODEC_TYPE_AUDIO_AAC":
21702
+ case 65:
21703
+ message.codecType = 65;
21704
+ break;
21705
+ case "CODEC_TYPE_AUDIO_PCM":
21706
+ case 66:
21707
+ message.codecType = 66;
21708
+ break;
21709
+ case "CODEC_TYPE_AUDIO_PCM_S24LE":
21710
+ case 67:
21711
+ message.codecType = 67;
21712
+ break;
21713
+ }
21714
+ if (object.sampleRate != null)
21715
+ message.sampleRate = object.sampleRate >>> 0;
21716
+ if (object.timebaseNum != null)
21717
+ message.timebaseNum = object.timebaseNum >>> 0;
21718
+ if (object.timebaseDen != null)
21719
+ message.timebaseDen = object.timebaseDen >>> 0;
21720
+ if (object.codecProfile != null)
21721
+ message.codecProfile = object.codecProfile >>> 0;
21722
+ if (object.codecLevel != null)
21723
+ message.codecLevel = object.codecLevel >>> 0;
21724
+ if (object.width != null)
21725
+ message.width = object.width >>> 0;
21726
+ if (object.height != null)
21727
+ message.height = object.height >>> 0;
21728
+ if (object.channels != null)
21729
+ message.channels = object.channels >>> 0;
21730
+ if (object.bitDepth != null)
21731
+ message.bitDepth = object.bitDepth >>> 0;
21732
+ return message;
21733
+ };
21734
+ MediaCodecData2.toObject = function toObject(message, options) {
21735
+ if (!options)
21736
+ options = {};
21737
+ let object = {};
21738
+ if (options.defaults) {
21739
+ object.codecType = options.enums === String ? "CODEC_TYPE_UNSPECIFIED" : 0;
21740
+ object.sampleRate = 0;
21741
+ object.timebaseNum = 0;
21742
+ object.timebaseDen = 0;
21743
+ object.codecProfile = 0;
21744
+ object.codecLevel = 0;
21745
+ object.width = 0;
21746
+ object.height = 0;
21747
+ object.channels = 0;
21748
+ object.bitDepth = 0;
21749
+ }
21750
+ if (message.codecType != null && message.hasOwnProperty("codecType"))
21751
+ object.codecType = options.enums === String ? $root.sesame.v1.common.CodecType[message.codecType] === void 0 ? message.codecType : $root.sesame.v1.common.CodecType[message.codecType] : message.codecType;
21752
+ if (message.sampleRate != null && message.hasOwnProperty("sampleRate"))
21753
+ object.sampleRate = message.sampleRate;
21754
+ if (message.timebaseNum != null && message.hasOwnProperty("timebaseNum"))
21755
+ object.timebaseNum = message.timebaseNum;
21756
+ if (message.timebaseDen != null && message.hasOwnProperty("timebaseDen"))
21757
+ object.timebaseDen = message.timebaseDen;
21758
+ if (message.codecProfile != null && message.hasOwnProperty("codecProfile"))
21759
+ object.codecProfile = message.codecProfile;
21760
+ if (message.codecLevel != null && message.hasOwnProperty("codecLevel"))
21761
+ object.codecLevel = message.codecLevel;
21762
+ if (message.width != null && message.hasOwnProperty("width"))
21763
+ object.width = message.width;
21764
+ if (message.height != null && message.hasOwnProperty("height"))
21765
+ object.height = message.height;
21766
+ if (message.channels != null && message.hasOwnProperty("channels"))
21767
+ object.channels = message.channels;
21768
+ if (message.bitDepth != null && message.hasOwnProperty("bitDepth"))
21769
+ object.bitDepth = message.bitDepth;
21770
+ return object;
21771
+ };
21772
+ MediaCodecData2.prototype.toJSON = function toJSON() {
21773
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
21774
+ };
21775
+ MediaCodecData2.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
21776
+ if (typeUrlPrefix === void 0) {
21777
+ typeUrlPrefix = "type.googleapis.com";
21778
+ }
21779
+ return typeUrlPrefix + "/sesame.v1.wire.MediaCodecData";
21780
+ };
21781
+ return MediaCodecData2;
21782
+ }();
21783
+ wire.MediaFrameData = function() {
21784
+ function MediaFrameData(properties) {
21785
+ if (properties) {
21786
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
21787
+ if (properties[keys[i]] != null)
21788
+ this[keys[i]] = properties[keys[i]];
21789
+ }
21790
+ }
21791
+ MediaFrameData.prototype.pts = $util.Long ? $util.Long.fromBits(0, 0, true) : 0;
21792
+ MediaFrameData.prototype.keyframe = false;
21793
+ MediaFrameData.prototype.codecData = null;
21794
+ MediaFrameData.create = function create(properties) {
21795
+ return new MediaFrameData(properties);
21796
+ };
21797
+ MediaFrameData.encode = function encode(message, writer) {
21798
+ if (!writer)
21799
+ writer = $Writer.create();
21800
+ if (message.pts != null && Object.hasOwnProperty.call(message, "pts"))
21801
+ writer.uint32(
21802
+ /* id 1, wireType 0 =*/
21803
+ 8
21804
+ ).uint64(message.pts);
21805
+ if (message.keyframe != null && Object.hasOwnProperty.call(message, "keyframe"))
21806
+ writer.uint32(
21807
+ /* id 2, wireType 0 =*/
21808
+ 16
21809
+ ).bool(message.keyframe);
21810
+ if (message.codecData != null && Object.hasOwnProperty.call(message, "codecData"))
21811
+ $root.sesame.v1.wire.MediaCodecData.encode(message.codecData, writer.uint32(
21812
+ /* id 3, wireType 2 =*/
21813
+ 26
21814
+ ).fork()).ldelim();
21815
+ return writer;
21816
+ };
21817
+ MediaFrameData.encodeDelimited = function encodeDelimited(message, writer) {
21818
+ return this.encode(message, writer).ldelim();
21819
+ };
21820
+ MediaFrameData.decode = function decode(reader, length, error) {
21821
+ if (!(reader instanceof $Reader))
21822
+ reader = $Reader.create(reader);
21823
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.wire.MediaFrameData();
21824
+ while (reader.pos < end) {
21825
+ let tag = reader.uint32();
21826
+ if (tag === error)
21827
+ break;
21828
+ switch (tag >>> 3) {
21829
+ case 1: {
21830
+ message.pts = reader.uint64();
21831
+ break;
21832
+ }
21833
+ case 2: {
21834
+ message.keyframe = reader.bool();
21835
+ break;
21836
+ }
21837
+ case 3: {
21838
+ message.codecData = $root.sesame.v1.wire.MediaCodecData.decode(reader, reader.uint32());
21839
+ break;
21840
+ }
21841
+ default:
21842
+ reader.skipType(tag & 7);
21843
+ break;
21844
+ }
21845
+ }
21846
+ return message;
21847
+ };
21848
+ MediaFrameData.decodeDelimited = function decodeDelimited(reader) {
21849
+ if (!(reader instanceof $Reader))
21850
+ reader = new $Reader(reader);
21851
+ return this.decode(reader, reader.uint32());
21852
+ };
21853
+ MediaFrameData.verify = function verify(message) {
21854
+ if (typeof message !== "object" || message === null)
21855
+ return "object expected";
21856
+ if (message.pts != null && message.hasOwnProperty("pts")) {
21857
+ if (!$util.isInteger(message.pts) && !(message.pts && $util.isInteger(message.pts.low) && $util.isInteger(message.pts.high)))
21858
+ return "pts: integer|Long expected";
21859
+ }
21860
+ if (message.keyframe != null && message.hasOwnProperty("keyframe")) {
21861
+ if (typeof message.keyframe !== "boolean")
21862
+ return "keyframe: boolean expected";
21863
+ }
21864
+ if (message.codecData != null && message.hasOwnProperty("codecData")) {
21865
+ let error = $root.sesame.v1.wire.MediaCodecData.verify(message.codecData);
21866
+ if (error)
21867
+ return "codecData." + error;
21868
+ }
21869
+ return null;
21870
+ };
21871
+ MediaFrameData.fromObject = function fromObject(object) {
21872
+ if (object instanceof $root.sesame.v1.wire.MediaFrameData)
21873
+ return object;
21874
+ let message = new $root.sesame.v1.wire.MediaFrameData();
21875
+ if (object.pts != null) {
21876
+ if ($util.Long)
21877
+ (message.pts = $util.Long.fromValue(object.pts)).unsigned = true;
21878
+ else if (typeof object.pts === "string")
21879
+ message.pts = parseInt(object.pts, 10);
21880
+ else if (typeof object.pts === "number")
21881
+ message.pts = object.pts;
21882
+ else if (typeof object.pts === "object")
21883
+ message.pts = new $util.LongBits(object.pts.low >>> 0, object.pts.high >>> 0).toNumber(true);
21884
+ }
21885
+ if (object.keyframe != null)
21886
+ message.keyframe = Boolean(object.keyframe);
21887
+ if (object.codecData != null) {
21888
+ if (typeof object.codecData !== "object")
21889
+ throw TypeError(".sesame.v1.wire.MediaFrameData.codecData: object expected");
21890
+ message.codecData = $root.sesame.v1.wire.MediaCodecData.fromObject(object.codecData);
21891
+ }
21192
21892
  return message;
21193
21893
  };
21194
- Response2.toObject = function toObject(message, options) {
21894
+ MediaFrameData.toObject = function toObject(message, options) {
21195
21895
  if (!options)
21196
21896
  options = {};
21197
21897
  let object = {};
21198
21898
  if (options.defaults) {
21199
- object.seq = 0;
21200
- object.ok = false;
21201
- if (options.bytes === String)
21202
- object.payload = "";
21203
- else {
21204
- object.payload = [];
21205
- if (options.bytes !== Array)
21206
- object.payload = $util.newBuffer(object.payload);
21207
- }
21208
- object.error = "";
21899
+ if ($util.Long) {
21900
+ let long = new $util.Long(0, 0, true);
21901
+ object.pts = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
21902
+ } else
21903
+ object.pts = options.longs === String ? "0" : 0;
21904
+ object.keyframe = false;
21905
+ object.codecData = null;
21209
21906
  }
21210
- if (message.seq != null && message.hasOwnProperty("seq"))
21211
- object.seq = message.seq;
21212
- if (message.ok != null && message.hasOwnProperty("ok"))
21213
- object.ok = message.ok;
21214
- if (message.payload != null && message.hasOwnProperty("payload"))
21215
- object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload;
21216
- if (message.error != null && message.hasOwnProperty("error"))
21217
- object.error = message.error;
21907
+ if (message.pts != null && message.hasOwnProperty("pts"))
21908
+ if (typeof message.pts === "number")
21909
+ object.pts = options.longs === String ? String(message.pts) : message.pts;
21910
+ else
21911
+ object.pts = options.longs === String ? $util.Long.prototype.toString.call(message.pts) : options.longs === Number ? new $util.LongBits(message.pts.low >>> 0, message.pts.high >>> 0).toNumber(true) : message.pts;
21912
+ if (message.keyframe != null && message.hasOwnProperty("keyframe"))
21913
+ object.keyframe = message.keyframe;
21914
+ if (message.codecData != null && message.hasOwnProperty("codecData"))
21915
+ object.codecData = $root.sesame.v1.wire.MediaCodecData.toObject(message.codecData, options);
21218
21916
  return object;
21219
21917
  };
21220
- Response2.prototype.toJSON = function toJSON() {
21918
+ MediaFrameData.prototype.toJSON = function toJSON() {
21221
21919
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
21222
21920
  };
21223
- Response2.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
21921
+ MediaFrameData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
21224
21922
  if (typeUrlPrefix === void 0) {
21225
21923
  typeUrlPrefix = "type.googleapis.com";
21226
21924
  }
21227
- return typeUrlPrefix + "/sesame.v1.rpc.Response";
21925
+ return typeUrlPrefix + "/sesame.v1.wire.MediaFrameData";
21228
21926
  };
21229
- return Response2;
21927
+ return MediaFrameData;
21230
21928
  }();
21231
- rpc.Event = function() {
21232
- function Event2(properties) {
21929
+ wire.FrameHeader = function() {
21930
+ function FrameHeader2(properties) {
21233
21931
  if (properties) {
21234
21932
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
21235
21933
  if (properties[keys[i]] != null)
21236
21934
  this[keys[i]] = properties[keys[i]];
21237
21935
  }
21238
21936
  }
21239
- Event2.prototype.topic = 0;
21240
- Event2.prototype.payload = $util.newBuffer([]);
21241
- Event2.create = function create(properties) {
21242
- return new Event2(properties);
21937
+ FrameHeader2.prototype.type = 0;
21938
+ FrameHeader2.prototype.routingMetadata = "";
21939
+ FrameHeader2.prototype.media = null;
21940
+ let $oneOfFields;
21941
+ Object.defineProperty(FrameHeader2.prototype, "typeData", {
21942
+ get: $util.oneOfGetter($oneOfFields = ["media"]),
21943
+ set: $util.oneOfSetter($oneOfFields)
21944
+ });
21945
+ FrameHeader2.create = function create(properties) {
21946
+ return new FrameHeader2(properties);
21243
21947
  };
21244
- Event2.encode = function encode(message, writer) {
21948
+ FrameHeader2.encode = function encode(message, writer) {
21245
21949
  if (!writer)
21246
21950
  writer = $Writer.create();
21247
- if (message.topic != null && Object.hasOwnProperty.call(message, "topic"))
21951
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
21248
21952
  writer.uint32(
21249
21953
  /* id 1, wireType 0 =*/
21250
21954
  8
21251
- ).int32(message.topic);
21252
- if (message.payload != null && Object.hasOwnProperty.call(message, "payload"))
21955
+ ).int32(message.type);
21956
+ if (message.routingMetadata != null && Object.hasOwnProperty.call(message, "routingMetadata"))
21253
21957
  writer.uint32(
21254
- /* id 2, wireType 2 =*/
21255
- 18
21256
- ).bytes(message.payload);
21958
+ /* id 6, wireType 2 =*/
21959
+ 50
21960
+ ).string(message.routingMetadata);
21961
+ if (message.media != null && Object.hasOwnProperty.call(message, "media"))
21962
+ $root.sesame.v1.wire.MediaFrameData.encode(message.media, writer.uint32(
21963
+ /* id 7, wireType 2 =*/
21964
+ 58
21965
+ ).fork()).ldelim();
21257
21966
  return writer;
21258
21967
  };
21259
- Event2.encodeDelimited = function encodeDelimited(message, writer) {
21968
+ FrameHeader2.encodeDelimited = function encodeDelimited(message, writer) {
21260
21969
  return this.encode(message, writer).ldelim();
21261
21970
  };
21262
- Event2.decode = function decode(reader, length, error) {
21971
+ FrameHeader2.decode = function decode(reader, length, error) {
21263
21972
  if (!(reader instanceof $Reader))
21264
21973
  reader = $Reader.create(reader);
21265
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.rpc.Event();
21974
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.wire.FrameHeader();
21266
21975
  while (reader.pos < end) {
21267
21976
  let tag = reader.uint32();
21268
21977
  if (tag === error)
21269
21978
  break;
21270
21979
  switch (tag >>> 3) {
21271
21980
  case 1: {
21272
- message.topic = reader.int32();
21981
+ message.type = reader.int32();
21273
21982
  break;
21274
21983
  }
21275
- case 2: {
21276
- message.payload = reader.bytes();
21984
+ case 6: {
21985
+ message.routingMetadata = reader.string();
21986
+ break;
21987
+ }
21988
+ case 7: {
21989
+ message.media = $root.sesame.v1.wire.MediaFrameData.decode(reader, reader.uint32());
21277
21990
  break;
21278
21991
  }
21279
21992
  default:
@@ -21283,18 +21996,19 @@ var sesame = $root.sesame = (() => {
21283
21996
  }
21284
21997
  return message;
21285
21998
  };
21286
- Event2.decodeDelimited = function decodeDelimited(reader) {
21999
+ FrameHeader2.decodeDelimited = function decodeDelimited(reader) {
21287
22000
  if (!(reader instanceof $Reader))
21288
22001
  reader = new $Reader(reader);
21289
22002
  return this.decode(reader, reader.uint32());
21290
22003
  };
21291
- Event2.verify = function verify(message) {
22004
+ FrameHeader2.verify = function verify(message) {
21292
22005
  if (typeof message !== "object" || message === null)
21293
22006
  return "object expected";
21294
- if (message.topic != null && message.hasOwnProperty("topic"))
21295
- switch (message.topic) {
22007
+ let properties = {};
22008
+ if (message.type != null && message.hasOwnProperty("type"))
22009
+ switch (message.type) {
21296
22010
  default:
21297
- return "topic: enum value expected";
22011
+ return "type: enum value expected";
21298
22012
  case 0:
21299
22013
  case 1:
21300
22014
  case 2:
@@ -21304,150 +22018,100 @@ var sesame = $root.sesame = (() => {
21304
22018
  case 6:
21305
22019
  break;
21306
22020
  }
21307
- if (message.payload != null && message.hasOwnProperty("payload")) {
21308
- if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload)))
21309
- return "payload: buffer expected";
22021
+ if (message.routingMetadata != null && message.hasOwnProperty("routingMetadata")) {
22022
+ if (!$util.isString(message.routingMetadata))
22023
+ return "routingMetadata: string expected";
22024
+ }
22025
+ if (message.media != null && message.hasOwnProperty("media")) {
22026
+ properties.typeData = 1;
22027
+ {
22028
+ let error = $root.sesame.v1.wire.MediaFrameData.verify(message.media);
22029
+ if (error)
22030
+ return "media." + error;
22031
+ }
21310
22032
  }
21311
22033
  return null;
21312
22034
  };
21313
- Event2.fromObject = function fromObject(object) {
21314
- if (object instanceof $root.sesame.v1.rpc.Event)
22035
+ FrameHeader2.fromObject = function fromObject(object) {
22036
+ if (object instanceof $root.sesame.v1.wire.FrameHeader)
21315
22037
  return object;
21316
- let message = new $root.sesame.v1.rpc.Event();
21317
- switch (object.topic) {
22038
+ let message = new $root.sesame.v1.wire.FrameHeader();
22039
+ switch (object.type) {
21318
22040
  default:
21319
- if (typeof object.topic === "number") {
21320
- message.topic = object.topic;
22041
+ if (typeof object.type === "number") {
22042
+ message.type = object.type;
21321
22043
  break;
21322
22044
  }
21323
22045
  break;
21324
- case "EVENT_TOPIC_UNSPECIFIED":
22046
+ case "FRAME_TYPE_UNSPECIFIED":
21325
22047
  case 0:
21326
- message.topic = 0;
22048
+ message.type = 0;
21327
22049
  break;
21328
- case "EVENT_TOPIC_ERROR":
22050
+ case "FRAME_TYPE_RPC":
21329
22051
  case 1:
21330
- message.topic = 1;
22052
+ message.type = 1;
21331
22053
  break;
21332
- case "EVENT_TOPIC_TRANSPORT":
22054
+ case "FRAME_TYPE_VIDEO":
21333
22055
  case 2:
21334
- message.topic = 2;
22056
+ message.type = 2;
21335
22057
  break;
21336
- case "EVENT_TOPIC_CALLBACK":
22058
+ case "FRAME_TYPE_AUDIO":
21337
22059
  case 3:
21338
- message.topic = 3;
22060
+ message.type = 3;
21339
22061
  break;
21340
- case "EVENT_TOPIC_PLAYLIST_EXPORT":
22062
+ case "FRAME_TYPE_MUXED":
21341
22063
  case 4:
21342
- message.topic = 4;
22064
+ message.type = 4;
21343
22065
  break;
21344
- case "EVENT_TOPIC_CLIP_IMPORT":
22066
+ case "FRAME_TYPE_DECODER_DATA":
21345
22067
  case 5:
21346
- message.topic = 5;
22068
+ message.type = 5;
21347
22069
  break;
21348
- case "EVENT_TOPIC_RECORDER":
22070
+ case "FRAME_TYPE_DATA":
21349
22071
  case 6:
21350
- message.topic = 6;
22072
+ message.type = 6;
21351
22073
  break;
21352
22074
  }
21353
- if (object.payload != null) {
21354
- if (typeof object.payload === "string")
21355
- $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0);
21356
- else if (object.payload.length >= 0)
21357
- message.payload = object.payload;
22075
+ if (object.routingMetadata != null)
22076
+ message.routingMetadata = String(object.routingMetadata);
22077
+ if (object.media != null) {
22078
+ if (typeof object.media !== "object")
22079
+ throw TypeError(".sesame.v1.wire.FrameHeader.media: object expected");
22080
+ message.media = $root.sesame.v1.wire.MediaFrameData.fromObject(object.media);
21358
22081
  }
21359
22082
  return message;
21360
22083
  };
21361
- Event2.toObject = function toObject(message, options) {
22084
+ FrameHeader2.toObject = function toObject(message, options) {
21362
22085
  if (!options)
21363
22086
  options = {};
21364
22087
  let object = {};
21365
22088
  if (options.defaults) {
21366
- object.topic = options.enums === String ? "EVENT_TOPIC_UNSPECIFIED" : 0;
21367
- if (options.bytes === String)
21368
- object.payload = "";
21369
- else {
21370
- object.payload = [];
21371
- if (options.bytes !== Array)
21372
- object.payload = $util.newBuffer(object.payload);
21373
- }
22089
+ object.type = options.enums === String ? "FRAME_TYPE_UNSPECIFIED" : 0;
22090
+ object.routingMetadata = "";
22091
+ }
22092
+ if (message.type != null && message.hasOwnProperty("type"))
22093
+ object.type = options.enums === String ? $root.sesame.v1.wire.FrameType[message.type] === void 0 ? message.type : $root.sesame.v1.wire.FrameType[message.type] : message.type;
22094
+ if (message.routingMetadata != null && message.hasOwnProperty("routingMetadata"))
22095
+ object.routingMetadata = message.routingMetadata;
22096
+ if (message.media != null && message.hasOwnProperty("media")) {
22097
+ object.media = $root.sesame.v1.wire.MediaFrameData.toObject(message.media, options);
22098
+ if (options.oneofs)
22099
+ object.typeData = "media";
21374
22100
  }
21375
- if (message.topic != null && message.hasOwnProperty("topic"))
21376
- object.topic = options.enums === String ? $root.sesame.v1.common.EventTopic[message.topic] === void 0 ? message.topic : $root.sesame.v1.common.EventTopic[message.topic] : message.topic;
21377
- if (message.payload != null && message.hasOwnProperty("payload"))
21378
- object.payload = options.bytes === String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === Array ? Array.prototype.slice.call(message.payload) : message.payload;
21379
22101
  return object;
21380
22102
  };
21381
- Event2.prototype.toJSON = function toJSON() {
22103
+ FrameHeader2.prototype.toJSON = function toJSON() {
21382
22104
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
21383
22105
  };
21384
- Event2.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
22106
+ FrameHeader2.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
21385
22107
  if (typeUrlPrefix === void 0) {
21386
22108
  typeUrlPrefix = "type.googleapis.com";
21387
22109
  }
21388
- return typeUrlPrefix + "/sesame.v1.rpc.Event";
21389
- };
21390
- return Event2;
21391
- }();
21392
- rpc.SesameAPIService = function() {
21393
- function SesameAPIService(rpcImpl, requestDelimited, responseDelimited) {
21394
- $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
21395
- }
21396
- (SesameAPIService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SesameAPIService;
21397
- SesameAPIService.create = function create(rpcImpl, requestDelimited, responseDelimited) {
21398
- return new this(rpcImpl, requestDelimited, responseDelimited);
22110
+ return typeUrlPrefix + "/sesame.v1.wire.FrameHeader";
21399
22111
  };
21400
- Object.defineProperty(SesameAPIService.prototype.executeCommandList = function executeCommandList(request, callback) {
21401
- return this.rpcCall(executeCommandList, $root.sesame.v1.commands.CommandList, $root.sesame.v1.commands.CommandExecutionResponse, request, callback);
21402
- }, "name", { value: "ExecuteCommandList" });
21403
- Object.defineProperty(SesameAPIService.prototype.updateSubscriptions = function updateSubscriptions(request, callback) {
21404
- return this.rpcCall(updateSubscriptions, $root.sesame.v1.status.SubscriptionRequest, $root.sesame.v1.common.Empty, request, callback);
21405
- }, "name", { value: "UpdateSubscriptions" });
21406
- Object.defineProperty(SesameAPIService.prototype.notImplemented = function notImplemented(request, callback) {
21407
- return this.rpcCall(notImplemented, $root.sesame.v1.common.Empty, $root.sesame.v1.common.Empty, request, callback);
21408
- }, "name", { value: "NotImplemented" });
21409
- Object.defineProperty(SesameAPIService.prototype.requestEvents = function requestEvents(request, callback) {
21410
- return this.rpcCall(requestEvents, $root.sesame.v1.common.Empty, $root.sesame.v1.status.Event, request, callback);
21411
- }, "name", { value: "RequestEvents" });
21412
- Object.defineProperty(SesameAPIService.prototype.requestStatus = function requestStatus(request, callback) {
21413
- return this.rpcCall(requestStatus, $root.sesame.v1.common.Empty, $root.sesame.v1.status.Status, request, callback);
21414
- }, "name", { value: "RequestStatus" });
21415
- Object.defineProperty(SesameAPIService.prototype.requestRecorderOperation = function requestRecorderOperation(request, callback) {
21416
- return this.rpcCall(requestRecorderOperation, $root.sesame.v1.recorder.RecorderRequest, $root.sesame.v1.recorder.RecorderResponse, request, callback);
21417
- }, "name", { value: "RequestRecorderOperation" });
21418
- Object.defineProperty(SesameAPIService.prototype.requestPlaylistExportStart = function requestPlaylistExportStart(request, callback) {
21419
- return this.rpcCall(requestPlaylistExportStart, $root.sesame.v1.jobs.ExportStartRequest, $root.sesame.v1.jobs.JobStatusResponse, request, callback);
21420
- }, "name", { value: "RequestPlaylistExportStart" });
21421
- Object.defineProperty(SesameAPIService.prototype.requestPlaylistExportAbort = function requestPlaylistExportAbort(request, callback) {
21422
- return this.rpcCall(requestPlaylistExportAbort, $root.sesame.v1.jobs.ExportAbortRequest, $root.sesame.v1.jobs.JobStatusResponse, request, callback);
21423
- }, "name", { value: "RequestPlaylistExportAbort" });
21424
- Object.defineProperty(SesameAPIService.prototype.requestPlaylistExportStatus = function requestPlaylistExportStatus(request, callback) {
21425
- return this.rpcCall(requestPlaylistExportStatus, $root.sesame.v1.jobs.ExportStatusRequest, $root.sesame.v1.jobs.JobStatusResponse, request, callback);
21426
- }, "name", { value: "RequestPlaylistExportStatus" });
21427
- Object.defineProperty(SesameAPIService.prototype.requestPlaylistExportList = function requestPlaylistExportList(request, callback) {
21428
- return this.rpcCall(requestPlaylistExportList, $root.sesame.v1.jobs.ExportListRequest, $root.sesame.v1.jobs.JobListResponse, request, callback);
21429
- }, "name", { value: "RequestPlaylistExportList" });
21430
- Object.defineProperty(SesameAPIService.prototype.requestClipImportStart = function requestClipImportStart(request, callback) {
21431
- return this.rpcCall(requestClipImportStart, $root.sesame.v1.jobs.ImportStartRequest, $root.sesame.v1.jobs.JobStatusResponse, request, callback);
21432
- }, "name", { value: "RequestClipImportStart" });
21433
- Object.defineProperty(SesameAPIService.prototype.requestClipImportAbort = function requestClipImportAbort(request, callback) {
21434
- return this.rpcCall(requestClipImportAbort, $root.sesame.v1.jobs.ImportAbortRequest, $root.sesame.v1.jobs.JobStatusResponse, request, callback);
21435
- }, "name", { value: "RequestClipImportAbort" });
21436
- Object.defineProperty(SesameAPIService.prototype.requestClipImportStatus = function requestClipImportStatus(request, callback) {
21437
- return this.rpcCall(requestClipImportStatus, $root.sesame.v1.jobs.ImportStatusRequest, $root.sesame.v1.jobs.JobStatusResponse, request, callback);
21438
- }, "name", { value: "RequestClipImportStatus" });
21439
- Object.defineProperty(SesameAPIService.prototype.requestClipImportList = function requestClipImportList(request, callback) {
21440
- return this.rpcCall(requestClipImportList, $root.sesame.v1.jobs.ImportListRequest, $root.sesame.v1.jobs.JobListResponse, request, callback);
21441
- }, "name", { value: "RequestClipImportList" });
21442
- Object.defineProperty(SesameAPIService.prototype.requestKeyframe = function requestKeyframe(request, callback) {
21443
- return this.rpcCall(requestKeyframe, $root.sesame.v1.outputs.KeyframeRequest, $root.sesame.v1.common.Empty, request, callback);
21444
- }, "name", { value: "RequestKeyframe" });
21445
- Object.defineProperty(SesameAPIService.prototype.requestIODeviceList = function requestIODeviceList(request, callback) {
21446
- return this.rpcCall(requestIODeviceList, $root.sesame.v1.common.Empty, $root.sesame.v1.status.IODeviceListResponse, request, callback);
21447
- }, "name", { value: "RequestIODeviceList" });
21448
- return SesameAPIService;
22112
+ return FrameHeader2;
21449
22113
  }();
21450
- return rpc;
22114
+ return wire;
21451
22115
  }();
21452
22116
  return v1;
21453
22117
  }();
@@ -21846,8 +22510,8 @@ var RPCClient = class extends import_events.EventEmitter {
21846
22510
  } else {
21847
22511
  throw new Error("Unsupported RPC message payload");
21848
22512
  }
21849
- } catch (cause) {
21850
- const error = new Error("got invalid message");
22513
+ } catch (err) {
22514
+ const error = new Error(`Got invalid message: ${err instanceof Error ? err.message : String(err)}`);
21851
22515
  this.errorHandler(error);
21852
22516
  }
21853
22517
  };
@@ -21856,10 +22520,33 @@ var RPCClient = class extends import_events.EventEmitter {
21856
22520
  this.connection.on("rpc", (data) => this.messageHandler(data));
21857
22521
  this.connection.on("error", this.errorHandler);
21858
22522
  this.options = options;
21859
- this.service = service.create(this.rpcImpl);
22523
+ this.service = this.wrapServicePromises(service.create(this.rpcImpl));
21860
22524
  this.eventTypes = options.eventTypes || {};
21861
22525
  this.sendTimeout = options.sendTimeout || 5 * 1e3;
21862
22526
  }
22527
+ /**
22528
+ * Wraps service method calls to attach a rejection handler on all returned
22529
+ * promises. This prevents unhandled promise rejections (e.g. from timeouts
22530
+ * while disconnected) from crashing the host process. Callers can still
22531
+ * catch errors normally via await / .catch().
22532
+ */
22533
+ wrapServicePromises(service) {
22534
+ const self = this;
22535
+ return new Proxy(service, {
22536
+ get(target, prop) {
22537
+ const value = target[prop];
22538
+ if (typeof value !== "function") return value;
22539
+ return function(...args) {
22540
+ const result = value.apply(target, args);
22541
+ if (result != null && typeof result.catch === "function") {
22542
+ result.catch(() => {
22543
+ });
22544
+ }
22545
+ return result;
22546
+ };
22547
+ }
22548
+ });
22549
+ }
21863
22550
  async flushMessageBuffer() {
21864
22551
  const messages = [];
21865
22552
  for (const seq in this.messageBuffer) {
@@ -21888,7 +22575,8 @@ var RPCClient = class extends import_events.EventEmitter {
21888
22575
  eventHandler(event) {
21889
22576
  const topic = event.topic ?? 0;
21890
22577
  if (topic === sesame.v1.common.EventTopic.EVENT_TOPIC_UNSPECIFIED) {
21891
- throw new Error(`Unknown event topic: ${event.topic}`);
22578
+ log.warn(`Ignoring event with unspecified topic: ${event.topic}`);
22579
+ return;
21892
22580
  }
21893
22581
  const type = this.eventTypes[topic];
21894
22582
  let payload;
@@ -21898,8 +22586,8 @@ var RPCClient = class extends import_events.EventEmitter {
21898
22586
  try {
21899
22587
  payload = type.decode(event.payload);
21900
22588
  object = type.toObject(payload, { longs: Number });
21901
- } catch (cause) {
21902
- const error = new Error("could not decode event payload");
22589
+ } catch (err) {
22590
+ const error = new Error(`Could not decode event payload: ${err instanceof Error ? err.message : String(err)}`);
21903
22591
  this.errorHandler(error);
21904
22592
  return;
21905
22593
  }
@@ -21914,255 +22602,58 @@ var RPCClient = class extends import_events.EventEmitter {
21914
22602
  // src/sesame-connection.ts
21915
22603
  var import_events2 = __toESM(require_events());
21916
22604
 
21917
- // src/sesame-binary-protocol.ts
21918
- var PROTOCOL_MAGIC = 1297302867;
21919
- var PROTOCOL_VERSION = 1;
21920
- var HEADER_DATA_SIZE = 32;
21921
- var HEADER_CODEC_DATA_SIZE = 24;
21922
- var HEADER_METADATA_SIZE = 64;
21923
- var FLAG_HAS_CODEC_DATA = 1 << 0;
21924
- var FLAG_HAS_METADATA = 1 << 1;
21925
- var FLAG_IS_KEYFRAME = 1 << 2;
21926
- var PacketType = /* @__PURE__ */ ((PacketType2) => {
21927
- PacketType2[PacketType2["VIDEO_FRAME"] = 1] = "VIDEO_FRAME";
21928
- PacketType2[PacketType2["AUDIO_FRAME"] = 2] = "AUDIO_FRAME";
21929
- PacketType2[PacketType2["RPC"] = 3] = "RPC";
21930
- PacketType2[PacketType2["MUXED_DATA"] = 4] = "MUXED_DATA";
21931
- PacketType2[PacketType2["DECODER_DATA"] = 5] = "DECODER_DATA";
21932
- return PacketType2;
21933
- })(PacketType || {});
21934
- var CodecType = /* @__PURE__ */ ((CodecType2) => {
21935
- CodecType2[CodecType2["VIDEO_VP8"] = 1] = "VIDEO_VP8";
21936
- CodecType2[CodecType2["VIDEO_VP9"] = 2] = "VIDEO_VP9";
21937
- CodecType2[CodecType2["VIDEO_AVC"] = 3] = "VIDEO_AVC";
21938
- CodecType2[CodecType2["VIDEO_HEVC"] = 4] = "VIDEO_HEVC";
21939
- CodecType2[CodecType2["VIDEO_AV1"] = 5] = "VIDEO_AV1";
21940
- CodecType2[CodecType2["AUDIO_OPUS"] = 64] = "AUDIO_OPUS";
21941
- CodecType2[CodecType2["AUDIO_AAC"] = 65] = "AUDIO_AAC";
21942
- CodecType2[CodecType2["AUDIO_PCM"] = 66] = "AUDIO_PCM";
21943
- return CodecType2;
21944
- })(CodecType || {});
21945
- var SesameBinaryProtocol = class {
21946
- /**
21947
- * Initialize a header data structure with proper defaults
21948
- */
21949
- static initHeader(type, flags, pts, id) {
21950
- return {
21951
- magic: PROTOCOL_MAGIC,
21952
- version: PROTOCOL_VERSION,
21953
- header_size: this.calculateHeaderSize(flags),
21954
- type,
21955
- flags,
21956
- pts,
21957
- id,
21958
- reserved: 0
21959
- // Always zero reserved fields
21960
- };
21961
- }
21962
- /**
21963
- * Calculate the total header size based on flags
21964
- */
21965
- static calculateHeaderSize(flags) {
21966
- let size = HEADER_DATA_SIZE;
21967
- if (flags & FLAG_HAS_METADATA) {
21968
- size += HEADER_METADATA_SIZE;
21969
- }
21970
- if (flags & FLAG_HAS_CODEC_DATA) {
21971
- size += HEADER_CODEC_DATA_SIZE;
21972
- }
21973
- return size;
21974
- }
21975
- /**
21976
- * Validate a header structure
21977
- */
21978
- static validateHeader(header, totalSize) {
21979
- if (header.magic !== PROTOCOL_MAGIC) {
21980
- return false;
21981
- }
21982
- if (header.version !== PROTOCOL_VERSION) {
21983
- return false;
21984
- }
21985
- const expectedHeaderSize = this.calculateHeaderSize(header.flags);
21986
- if (header.header_size !== expectedHeaderSize) {
21987
- return false;
21988
- }
21989
- if (totalSize < header.header_size) {
21990
- return false;
21991
- }
21992
- return true;
21993
- }
22605
+ // src/sesame-wire-protocol.ts
22606
+ var FrameType = sesame.v1.wire.FrameType;
22607
+ var FrameHeader = sesame.v1.wire.FrameHeader;
22608
+ var MediaCodecData = sesame.v1.wire.MediaCodecData;
22609
+ var CodecType = sesame.v1.common.CodecType;
22610
+ var PREFIX_SIZE = 4;
22611
+ var WireProtocol = class {
21994
22612
  /**
21995
- * Serialize data into a Uint8Array buffer
22613
+ * Serialize a wire frame: 4-byte LE header_size + protobuf FrameHeader + payload.
21996
22614
  */
21997
- static serialize(header, metadata = null, codecData = null, payload = null) {
21998
- const includeMetadata = metadata !== null && header.flags & FLAG_HAS_METADATA;
21999
- const includeCodec = codecData !== null && header.flags & FLAG_HAS_CODEC_DATA;
22000
- let totalSize = HEADER_DATA_SIZE;
22001
- if (includeMetadata) totalSize += HEADER_METADATA_SIZE;
22002
- if (includeCodec) totalSize += HEADER_CODEC_DATA_SIZE;
22003
- if (payload) totalSize += payload.length;
22004
- header.header_size = totalSize - (payload ? payload.length : 0);
22005
- const buffer = new ArrayBuffer(totalSize);
22006
- const view = new DataView(buffer);
22007
- let offset = 0;
22008
- view.setUint32(offset, header.magic, true);
22009
- offset += 4;
22010
- view.setUint32(offset, header.flags, true);
22011
- offset += 4;
22012
- view.setBigUint64(offset, header.pts, true);
22013
- offset += 8;
22014
- view.setBigUint64(offset, header.id, true);
22015
- offset += 8;
22016
- view.setUint16(offset, header.version, true);
22017
- offset += 2;
22018
- view.setUint16(offset, header.header_size, true);
22019
- offset += 2;
22020
- view.setUint16(offset, header.type, true);
22021
- offset += 2;
22022
- view.setUint16(offset, header.reserved, true);
22023
- offset += 2;
22024
- if (includeMetadata && metadata) {
22025
- const metadataBytes = this.stringToFixedBytes(metadata.metadata, 64);
22026
- new Uint8Array(buffer, offset, 64).set(metadataBytes);
22027
- offset += 64;
22028
- }
22029
- if (includeCodec && codecData) {
22030
- view.setUint32(offset, codecData.sample_rate, true);
22031
- offset += 4;
22032
- view.setUint32(offset, codecData.timebase_num, true);
22033
- offset += 4;
22034
- view.setUint32(offset, codecData.timebase_den, true);
22035
- offset += 4;
22036
- view.setUint16(offset, codecData.codec_profile, true);
22037
- offset += 2;
22038
- view.setUint16(offset, codecData.codec_level, true);
22039
- offset += 2;
22040
- view.setUint16(offset, codecData.width, true);
22041
- offset += 2;
22042
- view.setUint16(offset, codecData.height, true);
22043
- offset += 2;
22044
- view.setUint8(offset, codecData.codec_type);
22045
- offset += 1;
22046
- view.setUint8(offset, codecData.channels);
22047
- offset += 1;
22048
- view.setUint8(offset, codecData.bit_depth);
22049
- offset += 1;
22050
- view.setUint8(offset, codecData.reserved);
22051
- offset += 1;
22052
- }
22053
- if (payload && payload.length > 0) {
22054
- new Uint8Array(buffer, offset).set(payload);
22615
+ static serialize(header, payload) {
22616
+ const headerBytes = sesame.v1.wire.FrameHeader.encode(header).finish();
22617
+ const headerSize = headerBytes.length;
22618
+ const payloadSize = payload ? payload.length : 0;
22619
+ const total = PREFIX_SIZE + headerSize + payloadSize;
22620
+ const buffer = new Uint8Array(total);
22621
+ const view = new DataView(buffer.buffer);
22622
+ view.setUint32(0, headerSize, true);
22623
+ buffer.set(headerBytes, PREFIX_SIZE);
22624
+ if (payload && payloadSize > 0) {
22625
+ buffer.set(payload, PREFIX_SIZE + headerSize);
22055
22626
  }
22056
- return new Uint8Array(buffer);
22627
+ return buffer;
22057
22628
  }
22058
22629
  /**
22059
- * Parse incoming binary data
22630
+ * Parse an incoming wire frame.
22060
22631
  */
22061
- static parseData(data) {
22062
- const result = {
22063
- valid: false,
22064
- header: null,
22065
- metadata: null,
22066
- codec_data: null,
22067
- payload: null,
22068
- payload_size: 0
22069
- };
22070
- if (!data || data.length < 36) {
22071
- return result;
22072
- }
22073
- const view = new DataView(data.buffer, data.byteOffset);
22074
- let offset = 0;
22075
- const header = {
22076
- magic: view.getUint32(offset, true),
22077
- flags: view.getUint32(offset + 4, true),
22078
- pts: view.getBigUint64(offset + 8, true),
22079
- id: view.getBigUint64(offset + 16, true),
22080
- version: view.getUint16(offset + 24, true),
22081
- header_size: view.getUint16(offset + 26, true),
22082
- type: view.getUint16(offset + 28, true),
22083
- reserved: view.getUint16(offset + 30, true)
22084
- };
22085
- offset += HEADER_DATA_SIZE;
22086
- if (!this.validateHeader(header, data.length)) {
22087
- return result;
22088
- }
22089
- result.header = header;
22090
- if (header.flags & FLAG_HAS_METADATA) {
22091
- if (data.length < offset + HEADER_METADATA_SIZE) {
22092
- return result;
22093
- }
22094
- const metadataBytes = data.slice(offset, offset + HEADER_METADATA_SIZE);
22095
- const metadataStr = this.fixedBytesToString(metadataBytes);
22096
- result.metadata = { metadata: metadataStr };
22097
- offset += HEADER_METADATA_SIZE;
22098
- }
22099
- if (header.flags & FLAG_HAS_CODEC_DATA) {
22100
- if (data.length < offset + HEADER_CODEC_DATA_SIZE) {
22101
- return result;
22102
- }
22103
- result.codec_data = {
22104
- sample_rate: view.getUint32(offset, true),
22105
- timebase_num: view.getUint32(offset + 4, true),
22106
- timebase_den: view.getUint32(offset + 8, true),
22107
- codec_profile: view.getUint16(offset + 12, true),
22108
- codec_level: view.getUint16(offset + 14, true),
22109
- width: view.getUint16(offset + 16, true),
22110
- height: view.getUint16(offset + 18, true),
22111
- codec_type: view.getUint8(offset + 20),
22112
- channels: view.getUint8(offset + 21),
22113
- bit_depth: view.getUint8(offset + 22),
22114
- reserved: view.getUint8(offset + 23)
22115
- };
22116
- offset += HEADER_CODEC_DATA_SIZE;
22632
+ static parse(data) {
22633
+ const result = { valid: false, header: null, payload: null };
22634
+ if (!data || data.length < PREFIX_SIZE) return result;
22635
+ const view = new DataView(data.buffer, data.byteOffset, data.byteLength);
22636
+ const headerSize = view.getUint32(0, true);
22637
+ if (data.length < PREFIX_SIZE + headerSize) return result;
22638
+ try {
22639
+ const headerBytes = data.subarray(PREFIX_SIZE, PREFIX_SIZE + headerSize);
22640
+ result.header = sesame.v1.wire.FrameHeader.decode(headerBytes);
22641
+ result.payload = data.subarray(PREFIX_SIZE + headerSize);
22642
+ result.valid = true;
22643
+ } catch {
22117
22644
  }
22118
- if (offset < data.length) {
22119
- result.payload = data.slice(offset);
22120
- result.payload_size = result.payload.length;
22121
- } else {
22122
- result.payload = new Uint8Array(0);
22123
- result.payload_size = 0;
22124
- }
22125
- result.valid = true;
22126
22645
  return result;
22127
22646
  }
22128
- /**
22129
- * Helper: Convert string to fixed-size byte array (null-terminated)
22130
- */
22131
- static stringToFixedBytes(str, size) {
22132
- const bytes = new Uint8Array(size);
22133
- let encoded;
22134
- if (typeof TextEncoder !== "undefined") {
22135
- const encoder = new TextEncoder();
22136
- encoded = encoder.encode(str);
22137
- } else {
22138
- encoded = new Uint8Array(Buffer.from(str, "utf8"));
22139
- }
22140
- const copyLen = Math.min(encoded.length, size - 1);
22141
- bytes.set(encoded.slice(0, copyLen));
22142
- bytes[copyLen] = 0;
22143
- return bytes;
22144
- }
22145
- /**
22146
- * Helper: Convert fixed-size byte array to string (null-terminated)
22147
- */
22148
- static fixedBytesToString(bytes) {
22149
- let len = bytes.length;
22150
- for (let i = 0; i < bytes.length; i++) {
22151
- if (bytes[i] === 0) {
22152
- len = i;
22153
- break;
22154
- }
22155
- }
22156
- if (typeof TextDecoder !== "undefined") {
22157
- const decoder = new TextDecoder();
22158
- return decoder.decode(bytes.slice(0, len));
22159
- } else {
22160
- return Buffer.from(bytes.slice(0, len)).toString("utf8");
22161
- }
22162
- }
22163
22647
  };
22164
22648
 
22165
22649
  // src/sesame-connection.ts
22650
+ var ConnectionState = /* @__PURE__ */ ((ConnectionState2) => {
22651
+ ConnectionState2["Disconnected"] = "disconnected";
22652
+ ConnectionState2["Connecting"] = "connecting";
22653
+ ConnectionState2["Connected"] = "connected";
22654
+ ConnectionState2["Reconnecting"] = "reconnecting";
22655
+ return ConnectionState2;
22656
+ })(ConnectionState || {});
22166
22657
  function waitForEvent(emitter, eventName) {
22167
22658
  return new Promise((resolve) => {
22168
22659
  emitter.once(eventName, resolve);
@@ -22175,6 +22666,7 @@ var SesameConnection = class extends import_events2.EventEmitter {
22175
22666
  this.numRetries = 0;
22176
22667
  this.url = "";
22177
22668
  this.autoReconnect = true;
22669
+ this._state = "disconnected" /* Disconnected */;
22178
22670
  /* Bound listeners so we can removeEventListener later */
22179
22671
  this.boundMessageHandler = (event) => this.messageHandler(event);
22180
22672
  this.boundOpenHandler = () => this.openHandler();
@@ -22182,52 +22674,97 @@ var SesameConnection = class extends import_events2.EventEmitter {
22182
22674
  this.boundErrorHandler = (event) => this.errorHandler(event);
22183
22675
  this.openHandler = () => {
22184
22676
  this.numRetries = 0;
22677
+ this.setState("connected" /* Connected */);
22185
22678
  this.emit("open");
22186
22679
  };
22187
22680
  this.messageHandler = (event) => {
22188
22681
  if (event.data instanceof ArrayBuffer) {
22189
- const parsed = SesameBinaryProtocol.parseData(new Uint8Array(event.data));
22190
- if (!parsed.valid) this.emit("error", new Error("Invalid packet received"));
22191
- if (parsed.header?.type == 1 /* VIDEO_FRAME */) {
22192
- this.emit("video-packet", event.data);
22193
- } else if (parsed.header?.type == 2 /* AUDIO_FRAME */) {
22194
- this.emit("audio-packet", event.data);
22195
- } else if (parsed.header?.type == 3 /* RPC */) {
22682
+ const parsed = WireProtocol.parse(new Uint8Array(event.data));
22683
+ if (!parsed.valid) {
22684
+ this.emit("error", new Error("Invalid packet received"));
22685
+ return;
22686
+ }
22687
+ const frameType = parsed.header?.type;
22688
+ if (frameType === FrameType.FRAME_TYPE_RPC) {
22196
22689
  this.emit("rpc", parsed.payload);
22690
+ } else {
22691
+ this.emit("media-packet", parsed);
22197
22692
  }
22198
22693
  }
22199
22694
  };
22200
22695
  this.url = options.url;
22201
22696
  this.autoReconnect = options.autoReconnect;
22202
- if (options.autoConnect) this.connect().catch(() => log.debug("failed connect"));
22697
+ if (options.autoConnect) this.connect().catch(() => {
22698
+ });
22699
+ }
22700
+ get state() {
22701
+ return this._state;
22702
+ }
22703
+ setState(newState) {
22704
+ if (this._state === newState) return;
22705
+ const prev = this._state;
22706
+ this._state = newState;
22707
+ switch (newState) {
22708
+ case "connected" /* Connected */:
22709
+ log.info("Connected to Sesame");
22710
+ break;
22711
+ case "reconnecting" /* Reconnecting */:
22712
+ if (prev === "connected" /* Connected */) {
22713
+ log.warn("Lost connection to Sesame, will try reconnect..");
22714
+ } else {
22715
+ log.warn("Failed to connect to Sesame, will try reconnect..");
22716
+ }
22717
+ break;
22718
+ case "disconnected" /* Disconnected */:
22719
+ log.info("Disconnected from Sesame");
22720
+ break;
22721
+ }
22722
+ this.emit("state", newState, prev);
22203
22723
  }
22204
22724
  isConnected() {
22205
22725
  return this.socket !== void 0 && this.socket.readyState === WebSocket.OPEN;
22206
22726
  }
22207
22727
  async send(data) {
22208
22728
  if (!this.isConnected()) throw new Error("Not connected");
22209
- const header = SesameBinaryProtocol.initHeader(3 /* RPC */, 0, BigInt(0), BigInt(0));
22210
- const data_to_send = SesameBinaryProtocol.serialize(header, null, null, data);
22211
- if (!data_to_send) throw new Error("Failed to serialize data");
22212
- this.socket.send(data_to_send);
22729
+ const header = { type: sesame.v1.wire.FrameType.FRAME_TYPE_RPC };
22730
+ const frame = WireProtocol.serialize(header, data);
22731
+ this.socket.send(frame);
22213
22732
  return Promise.resolve();
22214
22733
  }
22215
22734
  async connect() {
22216
22735
  this.active = true;
22736
+ if (this._state === "disconnected" /* Disconnected */) {
22737
+ this.setState("connecting" /* Connecting */);
22738
+ }
22217
22739
  this.socket = new WebSocket(this.url);
22218
22740
  this.socket.addEventListener("message", this.boundMessageHandler);
22219
22741
  this.socket.addEventListener("open", this.boundOpenHandler);
22220
22742
  this.socket.addEventListener("close", this.boundCloseHandler);
22221
22743
  this.socket.addEventListener("error", this.boundErrorHandler);
22222
22744
  this.socket.binaryType = "arraybuffer";
22223
- await new Promise((resolve) => {
22224
- const done = () => {
22225
- this.removeListener("open", done);
22226
- this.removeListener("close", done);
22227
- resolve(null);
22745
+ await new Promise((resolve, reject) => {
22746
+ const cleanup = () => {
22747
+ this.removeListener("open", onOpen);
22748
+ this.removeListener("close", onClose);
22749
+ this.removeListener("error", onError);
22228
22750
  };
22229
- this.on("open", done);
22230
- this.on("close", done);
22751
+ const onOpen = () => {
22752
+ cleanup();
22753
+ resolve();
22754
+ };
22755
+ const onError = (err) => {
22756
+ cleanup();
22757
+ reject(err instanceof Error ? err : new Error("WebSocket connection error"));
22758
+ };
22759
+ const onClose = () => {
22760
+ if (!this.isConnected()) {
22761
+ cleanup();
22762
+ reject(new Error("WebSocket connection closed before opening"));
22763
+ }
22764
+ };
22765
+ this.on("open", onOpen);
22766
+ this.on("close", onClose);
22767
+ this.on("error", onError);
22231
22768
  });
22232
22769
  }
22233
22770
  /**
@@ -22236,6 +22773,7 @@ var SesameConnection = class extends import_events2.EventEmitter {
22236
22773
  async disconnect() {
22237
22774
  this.active = false;
22238
22775
  if (!this.socket) {
22776
+ this.setState("disconnected" /* Disconnected */);
22239
22777
  return;
22240
22778
  }
22241
22779
  const sock = this.socket;
@@ -22253,7 +22791,8 @@ var SesameConnection = class extends import_events2.EventEmitter {
22253
22791
  }
22254
22792
  retryHandler() {
22255
22793
  if (this.active && this.autoReconnect) {
22256
- this.connect().catch((err) => log.error("Retry failed", err));
22794
+ this.connect().catch(() => {
22795
+ });
22257
22796
  }
22258
22797
  }
22259
22798
  closeHandler() {
@@ -22263,13 +22802,17 @@ var SesameConnection = class extends import_events2.EventEmitter {
22263
22802
  }
22264
22803
  this.socket = void 0;
22265
22804
  if (this.active) {
22266
- try {
22805
+ if (this.autoReconnect) {
22806
+ this.setState("reconnecting" /* Reconnecting */);
22267
22807
  setTimeout(() => {
22268
22808
  this.retryHandler();
22269
22809
  }, defaultBackoff(++this.numRetries));
22270
- } catch (err) {
22271
- log.error("Connection error", err);
22810
+ } else {
22811
+ this.active = false;
22812
+ this.setState("disconnected" /* Disconnected */);
22272
22813
  }
22814
+ } else {
22815
+ this.setState("disconnected" /* Disconnected */);
22273
22816
  }
22274
22817
  }
22275
22818
  errorHandler(error) {
@@ -22295,9 +22838,6 @@ var StatusApi = class {
22295
22838
  async getIODevices() {
22296
22839
  return this.rpc.service.requestIODeviceList(new sesame.v1.common.Empty());
22297
22840
  }
22298
- async requestKeyframe(outputId) {
22299
- await this.rpc.service.requestKeyframe({ id: outputId });
22300
- }
22301
22841
  };
22302
22842
 
22303
22843
  // src/recorder-api.ts
@@ -22354,55 +22894,52 @@ var JobsApi = class {
22354
22894
  this.rpc = rpc;
22355
22895
  }
22356
22896
  async importClip(config) {
22357
- const msg = sesame.v1.jobs.ImportStartRequest.create();
22358
- msg.config = config;
22359
- const res = await this.rpc.service.requestClipImportStart(msg);
22897
+ const importReq = sesame.v1.jobs.ImportStartRequest.create();
22898
+ importReq.config = config;
22899
+ const msg = sesame.v1.jobs.JobStartRequest.create({ importRequest: importReq });
22900
+ const res = await this.rpc.service.startJob(msg);
22360
22901
  if (res.error) {
22361
22902
  throw new Error(res.error);
22362
22903
  }
22363
22904
  return res;
22364
22905
  }
22365
- async getImportStatus() {
22366
- const msg = sesame.v1.jobs.ImportListRequest.create();
22367
- return this.rpc.service.requestClipImportList(msg);
22368
- }
22369
- async abortImport(jobId) {
22370
- const msg = { jobId };
22371
- return this.rpc.service.requestClipImportAbort(msg);
22372
- }
22373
22906
  async exportPlaylist(playlist, config) {
22374
- const msg = sesame.v1.jobs.ExportStartRequest.create();
22907
+ const exportReq = sesame.v1.jobs.ExportStartRequest.create();
22375
22908
  if (!config.filename) throw new Error("Filename is required");
22376
- msg.config = {
22909
+ exportReq.config = {
22377
22910
  ...config,
22378
- filename: config.filename,
22379
- videoCodec: config.videoCodec ?? sesame.v1.common.CodecId.CODEC_ID_H264,
22911
+ videoCodec: config.videoCodec ?? sesame.v1.common.CodecType.CODEC_TYPE_VIDEO_AVC,
22380
22912
  videoBitrateKbps: config.videoBitrateKbps ?? 1024,
22381
- audioCodec: config.audioCodec ?? sesame.v1.jobs.AudioCodecId.AUDIO_CODEC_ID_AAC,
22913
+ audioCodec: config.audioCodec ?? sesame.v1.common.CodecType.CODEC_TYPE_AUDIO_AAC,
22382
22914
  audioBitrateKbps: config.audioBitrateKbps ?? 128,
22383
22915
  audioChannels: config.audioChannels ?? 4,
22384
22916
  audioRouting: config.audioRouting ?? [0, 1, 2, 3]
22385
22917
  };
22386
- msg.items = playlist.clips.map((clip) => ({
22387
- id: clip.id,
22388
- recorderId: clip.recorderId,
22918
+ exportReq.items = playlist.clips.map((clip) => ({
22919
+ ...clip,
22389
22920
  transitionTimeUs: clip.transitionTimeUs ?? 0,
22390
22921
  transitionType: clip.transitionType ?? sesame.v1.recorder.TransitionType.TRANSITION_TYPE_MIX,
22391
22922
  transitionFadeColor: clip.transitionFadeColor ?? { x: 0, y: 0, z: 0, w: 0 },
22392
- speed: clip.speed ?? 1,
22393
- audioRouting: clip.audioRouting,
22394
- startTimeUs: clip.startTimeUs,
22395
- endTimeUs: clip.endTimeUs
22923
+ speed: clip.speed ?? 1
22396
22924
  }));
22397
- await this.rpc.service.requestPlaylistExportStart(msg);
22925
+ const msg = sesame.v1.jobs.JobStartRequest.create({ exportRequest: exportReq });
22926
+ const job = await this.rpc.service.startJob(msg);
22927
+ if (job.error) {
22928
+ throw new Error(job.error);
22929
+ }
22930
+ return job;
22398
22931
  }
22399
- async getExportStatus() {
22400
- const msg = sesame.v1.jobs.ExportListRequest.create();
22401
- return this.rpc.service.requestPlaylistExportList(msg);
22932
+ async abortJob(jobId) {
22933
+ const msg = { jobId };
22934
+ return this.rpc.service.abortJob(msg);
22402
22935
  }
22403
- async abortExport(jobId) {
22936
+ async getJobStatus(jobId) {
22404
22937
  const msg = { jobId };
22405
- return this.rpc.service.requestPlaylistExportAbort(msg);
22938
+ return this.rpc.service.getJobStatus(msg);
22939
+ }
22940
+ async listJobs() {
22941
+ const msg = {};
22942
+ return this.rpc.service.listJobs(msg);
22406
22943
  }
22407
22944
  };
22408
22945
 
@@ -22446,10 +22983,7 @@ var SesameClient = class extends import_events3.EventEmitter {
22446
22983
  constructor(portOrUrl) {
22447
22984
  super();
22448
22985
  this.subscriptions = [];
22449
- this.errorIsLogged = false;
22450
- this.onVideoPacket = () => {
22451
- };
22452
- this.onAudioPacket = () => {
22986
+ this.onMediaPacket = () => {
22453
22987
  };
22454
22988
  this.onCallbackMessage = () => {
22455
22989
  };
@@ -22460,17 +22994,12 @@ var SesameClient = class extends import_events3.EventEmitter {
22460
22994
  autoReconnect: true
22461
22995
  });
22462
22996
  this.conn.on("error", () => {
22463
- if (!this.errorIsLogged) {
22464
- log.warn("Could not connect to Sesame Engine, will keep trying..");
22465
- this.errorIsLogged = true;
22466
- }
22467
22997
  });
22468
22998
  let events = {
22469
22999
  [sesame.v1.common.EventTopic.EVENT_TOPIC_ERROR]: sesame.v1.status.Event,
22470
23000
  [sesame.v1.common.EventTopic.EVENT_TOPIC_TRANSPORT]: sesame.v1.status.Event,
22471
23001
  [sesame.v1.common.EventTopic.EVENT_TOPIC_CALLBACK]: sesame.v1.status.Event,
22472
- [sesame.v1.common.EventTopic.EVENT_TOPIC_PLAYLIST_EXPORT]: sesame.v1.status.Event,
22473
- [sesame.v1.common.EventTopic.EVENT_TOPIC_CLIP_IMPORT]: sesame.v1.status.Event,
23002
+ [sesame.v1.common.EventTopic.EVENT_TOPIC_JOB]: sesame.v1.status.Event,
22474
23003
  [sesame.v1.common.EventTopic.EVENT_TOPIC_RECORDER]: sesame.v1.status.Event
22475
23004
  };
22476
23005
  let options = {
@@ -22488,18 +23017,18 @@ var SesameClient = class extends import_events3.EventEmitter {
22488
23017
  }
22489
23018
  });
22490
23019
  this.rpc.on("error", (err) => {
22491
- log.error(`RPC error: ${err.message}`);
23020
+ if (this.isConnected()) {
23021
+ log.error(`RPC error: ${err.message}`);
23022
+ }
22492
23023
  });
22493
23024
  this.conn.on("open", async () => {
22494
23025
  this.sendSubscriptions();
22495
- this.errorIsLogged = false;
22496
23026
  this.emit("connected");
22497
23027
  });
22498
23028
  this.conn.on("close", () => {
22499
23029
  this.emit("disconnected");
22500
23030
  });
22501
- this.conn.on("video-packet", (data) => this.onVideoPacket(this.videoSubscriptionId, data));
22502
- this.conn.on("audio-packet", (data) => this.onAudioPacket(this.videoSubscriptionId, data));
23031
+ this.conn.on("media-packet", (frame) => this.onMediaPacket(this.mediaSubscriptionId, frame));
22503
23032
  this.subscriptions = [];
22504
23033
  }
22505
23034
  isConnected() {
@@ -22509,14 +23038,14 @@ var SesameClient = class extends import_events3.EventEmitter {
22509
23038
  if (!this.isConnected()) return;
22510
23039
  const eventTopics = this.subscriptions.map((subscription) => subscription.topic);
22511
23040
  const channels = [];
22512
- if (this.videoSubscriptionId) channels.push(`video/${this.videoSubscriptionId}`);
23041
+ if (this.mediaSubscriptionId) channels.push(`media-stream/${this.mediaSubscriptionId}`);
22513
23042
  let subs = { eventTopics, channels };
22514
23043
  this.rpc.service.updateSubscriptions(subs).catch((err) => {
22515
23044
  log.error(`Failed to update subscriptions: ${err.message}`);
22516
23045
  });
22517
23046
  }
22518
- addVideoSubscription(id) {
22519
- this.videoSubscriptionId = id;
23047
+ addMediaSubscription(id) {
23048
+ this.mediaSubscriptionId = id;
22520
23049
  this.sendSubscriptions();
22521
23050
  }
22522
23051
  addSubscription(topic, callback) {
@@ -22535,6 +23064,9 @@ var SesameClient = class extends import_events3.EventEmitter {
22535
23064
  getService() {
22536
23065
  return this.rpc;
22537
23066
  }
23067
+ async requestKeyframe(outputId) {
23068
+ await this.rpc.service.requestKeyframe({ id: outputId });
23069
+ }
22538
23070
  async execute(cl) {
22539
23071
  cl.filterCreatedAndDestroyedSources();
22540
23072
  if (cl.getCommandListMsg().commandList.length > 0) {
@@ -22554,19 +23086,21 @@ var Event = sesame.v1.rpc.Event;
22554
23086
  export {
22555
23087
  CodecType,
22556
23088
  CommandList,
23089
+ ConnectionState,
22557
23090
  EaseKind,
22558
23091
  Event,
23092
+ FrameHeader,
23093
+ FrameType,
22559
23094
  JobsApi,
22560
23095
  Message,
22561
- PacketType,
22562
23096
  RPCClient,
22563
23097
  RecorderApi,
22564
23098
  Request,
22565
23099
  Response,
22566
- SesameBinaryProtocol,
22567
23100
  SesameClient,
22568
23101
  SesameConnection,
22569
23102
  StatusApi,
23103
+ WireProtocol,
22570
23104
  getLogger,
22571
23105
  log,
22572
23106
  sesame,